summaryrefslogtreecommitdiff
path: root/frontends
diff options
context:
space:
mode:
Diffstat (limited to 'frontends')
-rw-r--r--frontends/Makefile.hts122
-rw-r--r--frontends/amiga/Makefile36
-rw-r--r--frontends/amiga/Makefile.defaults17
-rw-r--r--frontends/amiga/Makefile.tools21
-rw-r--r--frontends/amiga/arexx.c120
-rw-r--r--frontends/amiga/bitmap.c103
-rwxr-xr-xfrontends/amiga/bitmap.h16
-rw-r--r--frontends/amiga/clipboard.c66
-rw-r--r--frontends/amiga/cookies.c12
-rw-r--r--frontends/amiga/cookies.h2
-rw-r--r--frontends/amiga/corewindow.c63
-rw-r--r--frontends/amiga/ctxmenu.c84
-rw-r--r--frontends/amiga/ctxmenu.h7
-rw-r--r--frontends/amiga/dist/Rexx/YT_download_page.nsrx21
-rw-r--r--frontends/amiga/dist/Rexx/YT_open.nsrx21
-rw-r--r--frontends/amiga/dist/Rexx/YT_play.nsrx19
-rw-r--r--frontends/amiga/download.c64
-rw-r--r--frontends/amiga/drag.c61
-rw-r--r--frontends/amiga/drag.h3
-rw-r--r--frontends/amiga/dt_anim.c25
-rw-r--r--frontends/amiga/dt_picture.c22
-rw-r--r--frontends/amiga/dt_sound.c19
-rw-r--r--frontends/amiga/file.c37
-rw-r--r--frontends/amiga/font.c4
-rw-r--r--frontends/amiga/font_bullet.c24
-rw-r--r--frontends/amiga/font_diskfont.c19
-rw-r--r--frontends/amiga/font_scan.c2
-rw-r--r--frontends/amiga/gui.c1374
-rw-r--r--frontends/amiga/gui.h328
-rw-r--r--frontends/amiga/gui_menu.c201
-rw-r--r--frontends/amiga/gui_menu.h11
-rwxr-xr-xfrontends/amiga/gui_options.c116
-rw-r--r--frontends/amiga/history.c10
-rw-r--r--frontends/amiga/history_local.c27
-rw-r--r--frontends/amiga/history_local.h4
-rw-r--r--frontends/amiga/hotlist.c10
-rw-r--r--frontends/amiga/icon.c29
-rw-r--r--frontends/amiga/iff_dr2d.c25
-rwxr-xr-xfrontends/amiga/launch.c2
-rw-r--r--frontends/amiga/libs.c38
-rw-r--r--frontends/amiga/libs.h1
-rwxr-xr-xfrontends/amiga/login.c244
-rw-r--r--frontends/amiga/menu.c3
-rwxr-xr-xfrontends/amiga/misc.c14
-rw-r--r--frontends/amiga/options.h19
-rw-r--r--frontends/amiga/os3support.c7
-rw-r--r--frontends/amiga/os3support.h13
-rw-r--r--frontends/amiga/pageinfo.c283
-rw-r--r--frontends/amiga/pageinfo.h (renamed from frontends/gtk/login.h)18
-rw-r--r--frontends/amiga/pkg/SearchEngines2
-rwxr-xr-xfrontends/amiga/pkg/makereslinks24
-rwxr-xr-xfrontends/amiga/pkg/netsurf.readme4
-rw-r--r--frontends/amiga/pkg/netsurf_os3.readme10
-rw-r--r--frontends/amiga/plotters.c89
-rw-r--r--frontends/amiga/plugin_hack.c15
-rw-r--r--frontends/amiga/print.c67
l---------frontends/amiga/resources/AdBlock.css2
-rwxr-xr-xfrontends/amiga/resources/Themes/AISS/Theme5
-rwxr-xr-xfrontends/amiga/resources/Themes/Default/Theme5
l---------frontends/amiga/resources/ca-bundle2
l---------frontends/amiga/resources/de1
l---------frontends/amiga/resources/en1
l---------frontends/amiga/resources/fr1
l---------frontends/amiga/resources/it1
l---------frontends/amiga/resources/nl1
l---------frontends/amiga/resources/nsdefault.css2
l---------frontends/amiga/resources/quirks.css2
-rw-r--r--frontends/amiga/rtg.c3
-rw-r--r--frontends/amiga/schedule.c34
-rwxr-xr-xfrontends/amiga/search.c165
-rwxr-xr-xfrontends/amiga/search.h2
-rw-r--r--frontends/amiga/selectmenu.c12
-rw-r--r--frontends/amiga/sslcert.c375
-rwxr-xr-xfrontends/amiga/stringview/stringview.c4
-rwxr-xr-xfrontends/amiga/stringview/stringview.h4
-rw-r--r--frontends/amiga/theme.c67
-rw-r--r--frontends/amiga/theme.h2
-rwxr-xr-xfrontends/amiga/utf8.c70
-rw-r--r--frontends/amiga/version.c2
-rw-r--r--frontends/atari/Makefile74
-rw-r--r--frontends/atari/Makefile.tools19
-rw-r--r--frontends/atari/bitmap.c96
-rw-r--r--frontends/atari/bitmap.h4
-rw-r--r--frontends/atari/certview.c293
-rw-r--r--frontends/atari/certview.h51
-rw-r--r--frontends/atari/ctxmenu.c6
-rw-r--r--frontends/atari/deskmenu.c10
-rw-r--r--frontends/atari/encoding.h2
-rw-r--r--frontends/atari/file.c12
-rw-r--r--frontends/atari/file.h2
-rw-r--r--frontends/atari/font.h2
-rw-r--r--frontends/atari/gui.c104
-rw-r--r--frontends/atari/gui.h1
-rw-r--r--frontends/atari/login.c67
-rw-r--r--frontends/atari/login.h26
-rw-r--r--frontends/atari/plot/font_freetype.c3
-rw-r--r--frontends/atari/plot/font_internal.c1
-rw-r--r--frontends/atari/plot/font_vdi.c14
-rw-r--r--frontends/atari/plot/plot.c8
-rwxr-xr-xfrontends/atari/res/netsurf.rsh3
-rwxr-xr-xfrontends/atari/res/netsurf.rsm3
-rw-r--r--frontends/atari/rootwin.c2
-rw-r--r--frontends/atari/search.h2
-rw-r--r--frontends/atari/settings.c29
-rw-r--r--frontends/atari/toolbar.c4
-rw-r--r--frontends/atari/treeview.c34
-rw-r--r--frontends/atari/verify_ssl.c273
-rw-r--r--frontends/beos/Makefile66
-rw-r--r--frontends/beos/Makefile.tools14
-rw-r--r--frontends/beos/bitmap.cpp76
-rw-r--r--frontends/beos/filetype.cpp1
-rw-r--r--frontends/beos/font.cpp2
-rw-r--r--frontends/beos/gui.cpp49
-rw-r--r--frontends/beos/gui.h7
-rw-r--r--frontends/beos/login.cpp31
-rw-r--r--frontends/beos/options.h5
-rw-r--r--frontends/beos/plotters.cpp8
l---------frontends/beos/res/adblock.css2
l---------frontends/beos/res/ca-bundle.txt2
l---------frontends/beos/res/de/welcome.html2
l---------frontends/beos/res/default.css2
l---------frontends/beos/res/en/credits.html2
l---------frontends/beos/res/en/licence.html2
l---------frontends/beos/res/en/maps.html1
l---------frontends/beos/res/en/welcome.html2
l---------frontends/beos/res/icons2
l---------frontends/beos/res/internal.css2
l---------frontends/beos/res/it/credits.html2
l---------frontends/beos/res/it/licence.html2
l---------frontends/beos/res/it/welcome.html2
l---------frontends/beos/res/ja/welcome.html2
l---------frontends/beos/res/maps.html1
l---------frontends/beos/res/netsurf.png2
l---------frontends/beos/res/quirks.css2
-rw-r--r--frontends/beos/window.cpp216
-rw-r--r--frontends/beos/window.h2
-rw-r--r--frontends/framebuffer/Makefile108
-rw-r--r--frontends/framebuffer/Makefile.defaults4
-rw-r--r--frontends/framebuffer/Makefile.tools15
-rw-r--r--frontends/framebuffer/bitmap.c79
-rw-r--r--frontends/framebuffer/convert_font.c1215
-rw-r--r--frontends/framebuffer/convert_image.c304
-rw-r--r--frontends/framebuffer/corewindow.c32
-rw-r--r--frontends/framebuffer/fbtk/event.c2
-rw-r--r--frontends/framebuffer/fbtk/text.c18
-rw-r--r--frontends/framebuffer/fetch.h2
-rw-r--r--frontends/framebuffer/findfile.c109
-rw-r--r--frontends/framebuffer/findfile.h2
-rw-r--r--frontends/framebuffer/font_freetype.c4
-rw-r--r--frontends/framebuffer/font_internal.c11
-rw-r--r--frontends/framebuffer/framebuffer.c8
-rw-r--r--frontends/framebuffer/gui.c158
-rw-r--r--frontends/framebuffer/local_history.c1
l---------frontends/framebuffer/res/Messages2
l---------frontends/framebuffer/res/adblock.css2
l---------frontends/framebuffer/res/credits.html2
l---------frontends/framebuffer/res/de/welcome.html1
l---------frontends/framebuffer/res/default.css2
l---------frontends/framebuffer/res/en/credits.html1
l---------frontends/framebuffer/res/en/licence.html1
l---------frontends/framebuffer/res/en/welcome.html1
-rw-r--r--frontends/framebuffer/res/fonts/glyph_data95
l---------frontends/framebuffer/res/internal.css2
l---------frontends/framebuffer/res/it/credits.html1
l---------frontends/framebuffer/res/it/licence.html1
l---------frontends/framebuffer/res/ja/welcome.html1
l---------frontends/framebuffer/res/licence.html2
l---------frontends/framebuffer/res/maps.html1
l---------frontends/framebuffer/res/netsurf.png2
l---------frontends/framebuffer/res/nl/credits.html1
l---------frontends/framebuffer/res/nl/licence.html1
l---------frontends/framebuffer/res/nl/welcome.html1
l---------frontends/framebuffer/res/quirks.css2
l---------frontends/framebuffer/res/welcome.html2
-rw-r--r--frontends/gtk/Makefile49
-rw-r--r--frontends/gtk/Makefile.tools16
-rw-r--r--frontends/gtk/accelerator.c79
-rw-r--r--frontends/gtk/accelerator.h2
-rw-r--r--frontends/gtk/bitmap.c278
-rw-r--r--frontends/gtk/bitmap.h2
-rw-r--r--frontends/gtk/compat.c55
-rw-r--r--frontends/gtk/compat.h47
-rw-r--r--frontends/gtk/completion.c55
-rw-r--r--frontends/gtk/completion.h9
-rw-r--r--frontends/gtk/cookies.c7
-rw-r--r--frontends/gtk/cookies.h2
-rw-r--r--frontends/gtk/corewindow.c116
-rw-r--r--frontends/gtk/download.c854
-rw-r--r--frontends/gtk/download.h27
-rw-r--r--frontends/gtk/fetch.c14
-rw-r--r--frontends/gtk/fetch.h2
-rw-r--r--frontends/gtk/gdk.c5
-rw-r--r--frontends/gtk/global_history.c6
-rw-r--r--frontends/gtk/gui.c1319
-rw-r--r--frontends/gtk/gui.h3
-rw-r--r--frontends/gtk/hotlist.c2
-rw-r--r--frontends/gtk/layout_pango.c2
-rw-r--r--frontends/gtk/local_history.c37
-rw-r--r--frontends/gtk/local_history.h5
-rw-r--r--frontends/gtk/login.c232
-rw-r--r--frontends/gtk/menu.c267
-rw-r--r--frontends/gtk/menu.h240
-rw-r--r--frontends/gtk/misc.c192
-rw-r--r--frontends/gtk/misc.h (renamed from frontends/windows/filetype.h)8
-rw-r--r--frontends/gtk/options.h15
-rw-r--r--frontends/gtk/page_info.c258
-rw-r--r--frontends/gtk/page_info.h (renamed from frontends/gtk/ssl_cert.h)29
-rw-r--r--frontends/gtk/plotters.c37
-rw-r--r--frontends/gtk/preferences.c41
-rw-r--r--frontends/gtk/print.c32
-rw-r--r--frontends/gtk/res/accelerators40
l---------frontends/gtk/res/adblock.css2
-rw-r--r--frontends/gtk/res/arrow_down_8x32.pngbin206 -> 0 bytes
l---------frontends/gtk/res/ca-bundle.txt2
l---------frontends/gtk/res/de/welcome.html2
l---------frontends/gtk/res/default.css2
l---------frontends/gtk/res/en/credits.html2
l---------frontends/gtk/res/en/licence.html2
l---------frontends/gtk/res/en/maps.html1
l---------frontends/gtk/res/en/welcome.html2
l---------frontends/gtk/res/fr/credits.html1
l---------frontends/gtk/res/fr/licence.html1
l---------frontends/gtk/res/fr/welcome.html1
-rw-r--r--frontends/gtk/res/gtk2/cookies.ui (renamed from frontends/gtk/res/cookies.gtk2.ui)0
-rw-r--r--frontends/gtk/res/gtk2/downloads.ui (renamed from frontends/gtk/res/downloads.gtk2.ui)0
-rw-r--r--frontends/gtk/res/gtk2/globalhistory.ui (renamed from frontends/gtk/res/globalhistory.gtk2.ui)0
-rw-r--r--frontends/gtk/res/gtk2/hotlist.ui (renamed from frontends/gtk/res/hotlist.gtk2.ui)0
-rw-r--r--frontends/gtk/res/gtk2/localhistory.ui (renamed from frontends/gtk/res/localhistory.gtk2.ui)1
-rw-r--r--frontends/gtk/res/gtk2/netsurf.ui90
-rw-r--r--frontends/gtk/res/gtk2/options.ui (renamed from frontends/gtk/res/options.gtk2.ui)672
-rw-r--r--frontends/gtk/res/gtk2/pageinfo.ui16
-rw-r--r--frontends/gtk/res/gtk2/password.ui (renamed from frontends/gtk/res/password.gtk2.ui)0
-rw-r--r--frontends/gtk/res/gtk2/tabcontents.ui229
-rw-r--r--frontends/gtk/res/gtk2/toolbar.ui120
-rw-r--r--frontends/gtk/res/gtk2/viewdata.ui (renamed from frontends/gtk/res/viewdata.gtk2.ui)0
-rw-r--r--frontends/gtk/res/gtk2/warning.ui (renamed from frontends/gtk/res/warning.gtk2.ui)0
-rw-r--r--frontends/gtk/res/gtk3/cookies.ui (renamed from frontends/gtk/res/cookies.gtk3.ui)2
-rw-r--r--frontends/gtk/res/gtk3/downloads.ui (renamed from frontends/gtk/res/downloads.gtk3.ui)0
-rw-r--r--frontends/gtk/res/gtk3/globalhistory.ui (renamed from frontends/gtk/res/globalhistory.gtk3.ui)2
-rw-r--r--frontends/gtk/res/gtk3/hotlist.ui (renamed from frontends/gtk/res/hotlist.gtk3.ui)2
-rw-r--r--frontends/gtk/res/gtk3/localhistory.ui (renamed from frontends/gtk/res/localhistory.gtk3.ui)3
-rw-r--r--frontends/gtk/res/gtk3/netsurf.ui61
-rw-r--r--frontends/gtk/res/gtk3/options.ui (renamed from frontends/gtk/res/options.gtk3.ui)216
-rw-r--r--frontends/gtk/res/gtk3/pageinfo.ui22
-rw-r--r--frontends/gtk/res/gtk3/password.ui (renamed from frontends/gtk/res/password.gtk3.ui)0
-rw-r--r--frontends/gtk/res/gtk3/tabcontents.ui229
-rw-r--r--frontends/gtk/res/gtk3/toolbar.ui126
-rw-r--r--frontends/gtk/res/gtk3/viewdata.ui (renamed from frontends/gtk/res/viewdata.gtk3.ui)0
-rw-r--r--frontends/gtk/res/gtk3/warning.ui (renamed from frontends/gtk/res/warning.gtk3.ui)0
l---------frontends/gtk/res/icons2
l---------frontends/gtk/res/internal.css2
l---------frontends/gtk/res/it/credits.html2
l---------frontends/gtk/res/it/licence.html2
l---------frontends/gtk/res/it/welcome.html2
l---------frontends/gtk/res/ja/welcome.html2
-rw-r--r--frontends/gtk/res/login.gtk2.ui223
-rw-r--r--frontends/gtk/res/login.gtk3.ui223
l---------frontends/gtk/res/maps.html1
-rw-r--r--frontends/gtk/res/messages.gresource.xml1
-rw-r--r--frontends/gtk/res/netsurf.gresource.xml49
-rw-r--r--frontends/gtk/res/netsurf.gtk2.ui212
-rw-r--r--frontends/gtk/res/netsurf.gtk3.ui207
l---------frontends/gtk/res/netsurf.png2
l---------frontends/gtk/res/nl/credits.html2
l---------frontends/gtk/res/nl/licence.html2
l---------frontends/gtk/res/nl/welcome.html2
l---------frontends/gtk/res/quirks.css2
-rw-r--r--frontends/gtk/res/ssl.gtk2.ui202
-rw-r--r--frontends/gtk/res/ssl.gtk3.ui181
-rw-r--r--frontends/gtk/res/tabcontents.gtk2.ui92
-rw-r--r--frontends/gtk/res/tabcontents.gtk3.ui92
-rw-r--r--frontends/gtk/res/toolbar.gtk2.ui189
-rw-r--r--frontends/gtk/res/toolbar.gtk3.ui189
-rw-r--r--frontends/gtk/res/ui.gresource.xml18
l---------frontends/gtk/res/zh_CN/credits.html1
l---------frontends/gtk/res/zh_CN/licence.html1
l---------frontends/gtk/res/zh_CN/welcome.html1
-rw-r--r--frontends/gtk/resources.c54
-rw-r--r--frontends/gtk/scaffolding.c2869
-rw-r--r--frontends/gtk/scaffolding.h176
-rw-r--r--frontends/gtk/schedule.c52
-rw-r--r--frontends/gtk/search.c418
-rw-r--r--frontends/gtk/search.h49
-rw-r--r--frontends/gtk/selection.c1
-rw-r--r--frontends/gtk/selection.h2
-rw-r--r--frontends/gtk/ssl_cert.c259
-rw-r--r--frontends/gtk/tabs.c379
-rw-r--r--frontends/gtk/tabs.h48
-rw-r--r--frontends/gtk/throbber.c48
-rw-r--r--frontends/gtk/throbber.h33
-rw-r--r--frontends/gtk/toolbar.c4596
-rw-r--r--frontends/gtk/toolbar.h184
-rw-r--r--frontends/gtk/toolbar_items.h159
-rw-r--r--frontends/gtk/viewsource.c15
-rw-r--r--frontends/gtk/window.c715
-rw-r--r--frontends/gtk/window.h110
-rw-r--r--frontends/monkey/401login.c212
-rw-r--r--frontends/monkey/401login.h38
-rw-r--r--frontends/monkey/Makefile36
-rw-r--r--frontends/monkey/Makefile.defaults1
-rw-r--r--frontends/monkey/Makefile.tools15
-rw-r--r--frontends/monkey/bitmap.c48
-rw-r--r--frontends/monkey/browser.c406
-rw-r--r--frontends/monkey/cert.c59
-rw-r--r--frontends/monkey/dispatch.c13
-rw-r--r--frontends/monkey/dispatch.h2
-rw-r--r--frontends/monkey/download.c16
-rw-r--r--frontends/monkey/farmer.py363
-rw-r--r--frontends/monkey/fetch.h2
-rw-r--r--frontends/monkey/filetype.c10
-rw-r--r--frontends/monkey/layout.c10
-rw-r--r--frontends/monkey/main.c128
-rw-r--r--frontends/monkey/options.h6
-rw-r--r--frontends/monkey/output.c (renamed from frontends/monkey/cert.h)41
-rw-r--r--[-rwxr-xr-x]frontends/monkey/output.h (renamed from frontends/amiga/login.h)22
-rw-r--r--frontends/monkey/plot.c42
-rw-r--r--frontends/monkey/schedule.c10
-rw-r--r--frontends/riscos/401login.c235
-rw-r--r--frontends/riscos/Makefile97
-rw-r--r--frontends/riscos/Makefile.tools100
-rw-r--r--frontends/riscos/appdir/!Boot,feb88
-rw-r--r--frontends/riscos/appdir/!Sprites,ff9bin0 -> 1580 bytes
-rw-r--r--frontends/riscos/appdir/!Sprites22,ff9bin0 -> 11528 bytes
-rwxr-xr-xfrontends/riscos/appdir/5Sprites,ff9bin0 -> 30964 bytes
-rwxr-xr-xfrontends/riscos/appdir/5Sprites11,ff9bin0 -> 64228 bytes
-rwxr-xr-xfrontends/riscos/appdir/5Sprites22,ff9bin0 -> 40800 bytes
-rwxr-xr-xfrontends/riscos/appdir/ASprites,ff9bin0 -> 3664 bytes
-rwxr-xr-xfrontends/riscos/appdir/ASprites11,ff9bin0 -> 15892 bytes
-rwxr-xr-xfrontends/riscos/appdir/ASprites22,ff9bin0 -> 12668 bytes
-rw-r--r--frontends/riscos/appdir/ChkSprites,ffbbin0 -> 2029 bytes
-rwxr-xr-xfrontends/riscos/appdir/Docs/online,b60bin0 -> 165 bytes
-rw-r--r--frontends/riscos/appdir/FixFonts,ffb147
-rw-r--r--frontends/riscos/appdir/KickNS,ffbbin0 -> 1511 bytes
-rwxr-xr-xfrontends/riscos/appdir/OpenChoices,feb1
-rw-r--r--frontends/riscos/appdir/OpenHelp,ffbbin0 -> 925 bytes
-rwxr-xr-xfrontends/riscos/appdir/OpenScrap,feb1
l---------frontends/riscos/appdir/Resources/AdBlock,f791
-rw-r--r--frontends/riscos/appdir/Resources/Aletheia,ffdbin0 -> 17159 bytes
l---------frontends/riscos/appdir/Resources/CSS,f791
-rw-r--r--frontends/riscos/appdir/Resources/Fonts/NSSymbol/Encoding39
-rw-r--r--frontends/riscos/appdir/Resources/Fonts/NSSymbol/IntMetrics,ff6bin0 -> 344 bytes
-rw-r--r--frontends/riscos/appdir/Resources/Fonts/NSSymbol/Outlines,ff6bin0 -> 904 bytes
l---------frontends/riscos/appdir/Resources/Icons1
-rwxr-xr-xfrontends/riscos/appdir/Resources/Image,ff9bin0 -> 111972 bytes
-rw-r--r--frontends/riscos/appdir/Resources/LangNames52
l---------frontends/riscos/appdir/Resources/Quirks,f791
-rw-r--r--frontends/riscos/appdir/Resources/SearchEngines21
-rwxr-xr-xfrontends/riscos/appdir/Resources/Sprites,ff9bin0 -> 77336 bytes
l---------frontends/riscos/appdir/Resources/ca-bundle1
l---------frontends/riscos/appdir/Resources/de/Messages1
l---------frontends/riscos/appdir/Resources/de/welcome.html,faf1
-rw-r--r--frontends/riscos/appdir/Resources/en/!Help14
l---------frontends/riscos/appdir/Resources/en/Messages1
l---------frontends/riscos/appdir/Resources/en/credits.html,faf1
l---------frontends/riscos/appdir/Resources/en/licence.html,faf1
l---------frontends/riscos/appdir/Resources/en/welcome.html,faf1
l---------frontends/riscos/appdir/Resources/fr/Messages1
l---------frontends/riscos/appdir/Resources/internal.css,f791
l---------frontends/riscos/appdir/Resources/it/Messages1
l---------frontends/riscos/appdir/Resources/it/credits.html,faf1
l---------frontends/riscos/appdir/Resources/it/licence.html,faf1
l---------frontends/riscos/appdir/Resources/it/welcome.html,faf1
l---------frontends/riscos/appdir/Resources/ja/welcome.html,faf1
l---------frontends/riscos/appdir/Resources/netsurf.png,b601
-rw-r--r--frontends/riscos/appdir/Resources/nl/!Help15
l---------frontends/riscos/appdir/Resources/nl/Messages1
l---------frontends/riscos/appdir/Resources/nl/credits.html,faf1
l---------frontends/riscos/appdir/Resources/nl/licence.html,faf1
l---------frontends/riscos/appdir/Resources/nl/welcome.html,faf1
-rw-r--r--frontends/riscos/bitmap.c84
-rw-r--r--frontends/riscos/bitmap.h13
-rw-r--r--frontends/riscos/buffer.c2
-rw-r--r--frontends/riscos/buffer.h2
-rw-r--r--frontends/riscos/configure/con_content.c14
-rw-r--r--frontends/riscos/configure/con_image.c31
-rw-r--r--frontends/riscos/content-handlers/artworks.c57
-rw-r--r--frontends/riscos/content-handlers/awrender.s82
-rw-r--r--frontends/riscos/content-handlers/draw.c13
-rw-r--r--frontends/riscos/content-handlers/sprite.c15
-rw-r--r--frontends/riscos/cookies.c15
-rw-r--r--frontends/riscos/cookies.h2
-rw-r--r--frontends/riscos/corewindow.c119
-rw-r--r--frontends/riscos/dialog.c67
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/!Boot,feb2
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/!Help6
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/!Run,feb2
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Acorn/Latin1,ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Acorn/Latin1)bin256 -> 256 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Apple/CentEuro,ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Apple/CentEuro)bin256 -> 256 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Apple/Cyrillic,ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Apple/Cyrillic)bin256 -> 256 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Apple/Roman,ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Apple/Roman)bin256 -> 256 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Apple/Ukrainian,ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Apple/Ukrainian)bin256 -> 256 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/BigFive,ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/BigFive)bin29516 -> 29516 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/C0/40[ISO646],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/C0/40[ISO646])bin64 -> 64 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/C1/43[IS6429],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/C1/43[IS6429])bin64 -> 64 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/40[646old],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/40[646old])bin188 -> 188 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/41[646-GB],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/41[646-GB])bin188 -> 188 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/42[646IRV],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/42[646IRV])bin188 -> 188 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/43[FinSwe],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/43[FinSwe])bin188 -> 188 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/47[646-SE],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/47[646-SE])bin188 -> 188 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/48[646-SE],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/48[646-SE])bin188 -> 188 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/49[JS201K],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/49[JS201K])0
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/4A[JS201R],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/4A[JS201R])bin188 -> 188 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/4B[646-DE],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/4B[646-DE])bin188 -> 188 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/4C[646-PT],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/4C[646-PT])bin188 -> 188 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/54[GB1988],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/54[GB1988])bin188 -> 188 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/56[Teltxt],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/56[Teltxt])bin188 -> 188 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/59[646-IT],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/59[646-IT])bin188 -> 188 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/5A[646-ES],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/5A[646-ES])bin188 -> 188 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/60[646-NO],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/60[646-NO])bin188 -> 188 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/66[646-FR],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/66[646-FR])bin188 -> 188 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/69[646-HU],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/69[646-HU])bin188 -> 188 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/6B[Arabic],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/6B[Arabic])bin188 -> 188 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/6C[IS6937],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/6C[IS6937])bin188 -> 188 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/7A[SerbCr],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/7A[SerbCr])bin188 -> 188 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/40[JS6226],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/40[JS6226])bin17672 -> 17672 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/41[GB2312],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/41[GB2312])bin17672 -> 17672 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/42[JIS208],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/42[JIS208])bin17672 -> 17672 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/43[KS1001],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/43[KS1001])bin17672 -> 17672 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/44[JIS212],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/44[JIS212])bin17672 -> 17672 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/47[CNS1],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/47[CNS1])bin17672 -> 17672 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/48[CNS2],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/48[CNS2])bin17672 -> 17672 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/49[CNS3],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/49[CNS3])bin17672 -> 17672 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/4A[CNS4],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/4A[CNS4])bin17672 -> 17672 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/4B[CNS5],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/4B[CNS5])bin17672 -> 17672 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/4C[CNS6],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/4C[CNS6])bin17672 -> 17672 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/4D[CNS7],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/4D[CNS7])0
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/41[Lat1],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/41[Lat1])bin192 -> 192 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/42[Lat2],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/42[Lat2])bin192 -> 192 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/43[Lat3],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/43[Lat3])bin192 -> 192 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/44[Lat4],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/44[Lat4])bin192 -> 192 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/46[Greek],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/46[Greek])bin192 -> 192 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/47[Arabic],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/47[Arabic])bin192 -> 192 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/48[Hebrew],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/48[Hebrew])bin192 -> 192 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/4C[Cyrill],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/4C[Cyrill])bin192 -> 192 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/4D[Lat5],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/4D[Lat5])bin192 -> 192 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/50[LatSup],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/50[LatSup])bin192 -> 192 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/52[IS6937],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/52[IS6937])bin192 -> 192 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/54[Thai],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/54[Thai])bin192 -> 192 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/56[Lat6],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/56[Lat6])bin192 -> 192 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/58[L6Sami],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/58[L6Sami])bin192 -> 192 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/59[Lat7],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/59[Lat7])bin192 -> 192 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/5C[Welsh],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/5C[Welsh])bin192 -> 192 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/5D[Sami],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/5D[Sami])bin192 -> 192 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/5E[Hebrew],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/5E[Hebrew])bin192 -> 192 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/5F[Lat8],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/5F[Lat8])bin192 -> 192 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/62[Lat9],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/62[Lat9])bin192 -> 192 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/66[Lat10],ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/66[Lat10])bin192 -> 192 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/KOI8-R,ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/KOI8-R)bin256 -> 256 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1250,ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1250)bin256 -> 256 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1251,ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1251)bin256 -> 256 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1252,ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1252)bin256 -> 256 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1253,ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1253)bin256 -> 256 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1254,ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1254)bin256 -> 256 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1256,ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1256)bin256 -> 256 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP866,ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP866)bin256 -> 256 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP874,ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP874)bin256 -> 256 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP932,ffd (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP932)bin996 -> 996 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Files/CharNames14016
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Themes/!Sprites,ff9 (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/!Sprites,ff9)bin5780 -> 5780 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Themes/!Sprites11,ff9 (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/!Sprites11,ff9)bin11132 -> 11132 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Themes/!Sprites22,ff9 (renamed from frontends/riscos/distribution/!Boot/Resources/!Unicode/!Sprites22,ff9)bin7324 -> 7324 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Themes/Morris4/!Sprites,ff9bin0 -> 996 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Themes/Morris4/!Sprites22,ff9bin0 -> 1892 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Themes/Ursula/!Sprites,ff9bin0 -> 1684 bytes
-rw-r--r--frontends/riscos/distribution/!Boot/Resources/!Unicode/Themes/Ursula/!Sprites22,ff9bin0 -> 3268 bytes
-rw-r--r--frontends/riscos/distribution/!System/310/Modules/Network/URI,ffabin9188 -> 7120 bytes
-rw-r--r--[-rwxr-xr-x]frontends/riscos/distribution/!System/310/Modules/SharedULib,ffabin3116 -> 3192 bytes
-rw-r--r--frontends/riscos/distribution/!System/400/Modules/ARMEABISupport,ffabin0 -> 26504 bytes
-rw-r--r--frontends/riscos/distribution/3rdParty/ARMEABISupport/Copyright20
-rw-r--r--frontends/riscos/distribution/3rdParty/ARMEABISupport/Origin,b281
-rw-r--r--frontends/riscos/distribution/3rdParty/AcornURI/!ReadMe34
-rw-r--r--frontends/riscos/distribution/3rdParty/AcornURI/Apache-2.0202
-rw-r--r--frontends/riscos/distribution/3rdParty/AcornURI/Copying526
-rw-r--r--frontends/riscos/distribution/3rdParty/AcornURI/Origin,b281
-rw-r--r--frontends/riscos/distribution/3rdParty/Cache/Copyright20
-rw-r--r--frontends/riscos/distribution/3rdParty/Cache/Origin,b281
-rw-r--r--frontends/riscos/distribution/3rdParty/CryptRand/Origin,b281
-rw-r--r--frontends/riscos/distribution/3rdParty/Iconv/COPYING140
-rw-r--r--frontends/riscos/distribution/3rdParty/Iconv/Origin,b281
-rw-r--r--frontends/riscos/distribution/3rdParty/Iconv/ReadMe21
-rw-r--r--frontends/riscos/distribution/3rdParty/Iconv/licenses/Apache-2.0202
-rw-r--r--frontends/riscos/distribution/3rdParty/Iconv/licenses/LGPL-2481
-rw-r--r--frontends/riscos/distribution/3rdParty/SharedULib/Copyright15
-rw-r--r--frontends/riscos/distribution/3rdParty/SharedULib/Origin,b281
-rw-r--r--frontends/riscos/distribution/3rdParty/Tinct/Origin,b281
-rw-r--r--frontends/riscos/distribution/3rdParty/Unicode/Apache-2.0202
-rw-r--r--frontends/riscos/distribution/3rdParty/Unicode/Copyright66
-rw-r--r--frontends/riscos/distribution/3rdParty/Unicode/Origin,b281
-rw-r--r--frontends/riscos/distribution/LeesMij14
-rw-r--r--frontends/riscos/distribution/ReadMe23
-rw-r--r--frontends/riscos/download.c19
-rw-r--r--frontends/riscos/filetype.c2
-rw-r--r--frontends/riscos/filetype.h3
-rw-r--r--frontends/riscos/font.c2
-rw-r--r--frontends/riscos/font.h2
-rw-r--r--frontends/riscos/global_history.c14
-rw-r--r--frontends/riscos/gui.c141
-rw-r--r--frontends/riscos/gui.h13
-rw-r--r--frontends/riscos/gui/button_bar.c3
-rw-r--r--frontends/riscos/gui/throbber.c4
-rw-r--r--frontends/riscos/gui/url_bar.c1356
-rw-r--r--frontends/riscos/gui/url_bar.h15
-rw-r--r--frontends/riscos/hotlist.c10
-rw-r--r--frontends/riscos/iconbar.c4
-rw-r--r--frontends/riscos/image.c230
-rw-r--r--frontends/riscos/local_history.c22
-rw-r--r--frontends/riscos/options.h26
-rw-r--r--frontends/riscos/pageinfo.c325
-rw-r--r--frontends/riscos/pageinfo.h48
-rw-r--r--frontends/riscos/plotters.c58
-rw-r--r--frontends/riscos/print.c7
-rw-r--r--frontends/riscos/save.c20
-rw-r--r--frontends/riscos/save_draw.c9
-rw-r--r--frontends/riscos/scripts/Run13
-rw-r--r--frontends/riscos/sslcert.c415
-rw-r--r--frontends/riscos/sslcert.h47
-rw-r--r--frontends/riscos/templates/de450
-rw-r--r--frontends/riscos/templates/en449
-rw-r--r--frontends/riscos/templates/fr456
-rw-r--r--frontends/riscos/templates/nl453
-rw-r--r--frontends/riscos/textarea.c3
-rw-r--r--frontends/riscos/textselection.c3
-rw-r--r--frontends/riscos/textselection.h2
-rw-r--r--frontends/riscos/theme_install.c63
-rw-r--r--frontends/riscos/tinct.h13
-rw-r--r--frontends/riscos/toolbar.c40
-rw-r--r--frontends/riscos/toolbar.h10
-rw-r--r--frontends/riscos/ucstables.c219
-rw-r--r--frontends/riscos/ucstables.h2
-rw-r--r--frontends/riscos/wimputils.h26
-rw-r--r--frontends/riscos/window.c543
-rw-r--r--frontends/riscos/window.h11
-rw-r--r--frontends/windows/Makefile22
-rw-r--r--frontends/windows/Makefile.defaults4
-rw-r--r--frontends/windows/Makefile.tools19
-rw-r--r--frontends/windows/about.c4
-rw-r--r--frontends/windows/about.h6
-rw-r--r--frontends/windows/bitmap.c67
-rw-r--r--frontends/windows/bitmap.h4
-rw-r--r--frontends/windows/clipboard.c131
-rw-r--r--frontends/windows/clipboard.h (renamed from frontends/atari/verify_ssl.h)11
-rw-r--r--frontends/windows/cookies.c8
-rw-r--r--frontends/windows/cookies.h2
-rw-r--r--frontends/windows/corewindow.c28
-rw-r--r--frontends/windows/download.c3
-rw-r--r--frontends/windows/drawable.c197
-rw-r--r--frontends/windows/fetch.c (renamed from frontends/windows/filetype.c)69
-rw-r--r--frontends/windows/fetch.h (renamed from frontends/amiga/sslcert.h)34
-rw-r--r--frontends/windows/file.h2
-rw-r--r--frontends/windows/font.c222
-rw-r--r--frontends/windows/font.h4
-rw-r--r--frontends/windows/gui.c153
-rw-r--r--frontends/windows/gui.h42
-rw-r--r--frontends/windows/local_history.c1
-rw-r--r--frontends/windows/main.c207
-rw-r--r--frontends/windows/plot.c10
-rw-r--r--frontends/windows/pointers.c1
-rw-r--r--frontends/windows/prefs.c33
l---------frontends/windows/res/adblock.css2
l---------frontends/windows/res/ca-bundle.crt2
l---------frontends/windows/res/credits.html2
l---------frontends/windows/res/default.css2
l---------frontends/windows/res/icons/arrow-l.png1
l---------frontends/windows/res/icons/content.png1
l---------frontends/windows/res/icons/directory.png1
l---------frontends/windows/res/icons/directory2.png1
l---------frontends/windows/res/icons/hotlist-add.png1
l---------frontends/windows/res/icons/hotlist-rmv.png1
l---------frontends/windows/res/icons/search.png1
-rw-r--r--frontends/windows/res/installer.nsi8
l---------frontends/windows/res/internal.css2
l---------frontends/windows/res/licence.html2
l---------frontends/windows/res/netsurf.png2
-rw-r--r--frontends/windows/res/page-info-insecure.bmpbin0 -> 890 bytes
-rw-r--r--frontends/windows/res/page-info-internal.bmpbin0 -> 890 bytes
-rw-r--r--frontends/windows/res/page-info-local.bmpbin0 -> 890 bytes
-rw-r--r--frontends/windows/res/page-info-secure.bmpbin0 -> 890 bytes
-rw-r--r--frontends/windows/res/page-info-warning.bmpbin0 -> 890 bytes
l---------frontends/windows/res/quirks.css2
-rw-r--r--frontends/windows/res/resource.rc558
l---------frontends/windows/res/welcome.html2
-rw-r--r--frontends/windows/resourceid.h45
-rw-r--r--frontends/windows/ssl_cert.c471
-rw-r--r--frontends/windows/ssl_cert.h51
-rw-r--r--frontends/windows/windbg.h11
-rw-r--r--frontends/windows/window.c560
-rw-r--r--frontends/windows/window.h9
587 files changed, 34676 insertions, 19601 deletions
diff --git a/frontends/Makefile.hts b/frontends/Makefile.hts
new file mode 100644
index 000000000..b5af240f1
--- /dev/null
+++ b/frontends/Makefile.hts
@@ -0,0 +1,122 @@
+# -*- mode: makefile-gmake -*-
+##
+## determine the HOST TARGET and SUBTARGET
+##
+
+# Determine host type
+# NOTE: HOST determination on RISC OS could fail because of missing bug fixes
+# in UnixLib which only got addressed in UnixLib 5 / GCCSDK 4.
+# When you don't have 'uname' available, you will see:
+# File 'uname' not found
+# When you do and using a 'uname' compiled with a buggy UnixLib, you
+# will see the following printed on screen:
+# RISC OS
+# In both cases HOST make variable is empty and we recover from that by
+# assuming we're building on RISC OS.
+# In case you don't see anything printed (including the warning), you
+# have an up-to-date RISC OS build system. ;-)
+HOST := $(shell uname -s)
+
+# Sanitise host
+# TODO: Ideally, we want the equivalent of s/[^A-Za-z0-9]/_/g here
+HOST := $(subst .,_,$(subst -,_,$(subst /,_,$(HOST))))
+
+ifeq ($(HOST),)
+ HOST := riscos
+ $(warning Build platform determination failed but that's a known problem for RISC OS so we're assuming a native RISC OS build.)
+else
+ ifeq ($(HOST),RISC OS)
+ # Fixup uname -s returning "RISC OS"
+ HOST := riscos
+ endif
+endif
+ifeq ($(HOST),riscos)
+ # Build happening on RO platform, default target is RO backend
+ ifeq ($(TARGET),)
+ TARGET := riscos
+ endif
+endif
+
+ifeq ($(HOST),BeOS)
+ HOST := beos
+endif
+ifeq ($(HOST),Haiku)
+ # Haiku implements the BeOS API
+ HOST := beos
+endif
+ifeq ($(HOST),beos)
+ # Build happening on BeOS platform, default target is BeOS backend
+ ifeq ($(TARGET),)
+ TARGET := beos
+ endif
+ ifeq ($(TARGET),haiku)
+ override TARGET := beos
+ endif
+endif
+
+ifeq ($(HOST),AmigaOS)
+ HOST := amiga
+ ifeq ($(TARGET),)
+ TARGET := amiga
+ endif
+endif
+
+ifeq ($(HOST),FreeMiNT)
+ HOST := mint
+endif
+ifeq ($(HOST),mint)
+ ifeq ($(TARGET),)
+ TARGET := atari
+ endif
+endif
+
+ifeq ($(findstring MINGW,$(HOST)),MINGW)
+ # MSYS' uname reports the likes of "MINGW32_NT-6.0"
+ HOST := windows
+endif
+ifeq ($(HOST),windows)
+ ifeq ($(TARGET),)
+ TARGET := windows
+ endif
+endif
+
+# Setup (sub)targets
+
+# empty default sub target
+SUBTARGET=
+
+# Default target is GTK 3 backend
+ifeq ($(TARGET),)
+ override TARGET := gtk
+ SUBTARGET = 3
+else
+ ifeq ($(TARGET),gtk)
+ # unspecified gtk is gtk3
+ SUBTARGET = 3
+ else
+ ifeq ($(TARGET),gtk3)
+ # gtk3 is gtk target with subtarget of 3
+ override TARGET := gtk
+ SUBTARGET = 3
+ else
+ ifeq ($(TARGET),gtk2)
+ # gtk2 is gtk target with subtarget of 2
+ override TARGET := gtk
+ SUBTARGET = 2
+ else
+ ifeq ($(TARGET),amigaos3)
+ override TARGET := amiga
+ SUBTARGET = os3
+ endif
+ endif
+ endif
+ endif
+endif
+
+# valid values for the TARGET
+VLDTARGET := amiga atari beos framebuffer gtk monkey riscos windows
+
+# Check for valid TARGET
+ifeq ($(filter $(VLDTARGET),$(TARGET)),)
+ $(error Unknown TARGET "$(TARGET)", Must be one of $(VLDTARGET))
+endif
diff --git a/frontends/amiga/Makefile b/frontends/amiga/Makefile
index f57b4ef8a..f537a1163 100644
--- a/frontends/amiga/Makefile
+++ b/frontends/amiga/Makefile
@@ -5,27 +5,34 @@
CFLAGS += -std=c99 -Dnsamiga
ifneq ($(SUBTARGET),os3)
- CFLAGS += -O2 -finline-functions -U__STRICT_ANSI__ -D__USE_INLINE__ -D__USE_BASETYPE__
+ CFLAGS += -O2 -mstrict-align -finline-functions -U__STRICT_ANSI__ -D__USE_INLINE__ -D__USE_BASETYPE__
else
CFLAGS += -O2 -DPATH_MAX=1024 -D__m68k__ -m68020
endif
$(eval $(call feature_enabled,AMIGA_ICON,-DWITH_AMIGA_ICON,,Amiga icon))
$(eval $(call feature_enabled,AMIGA_DATATYPES,-DWITH_AMIGA_DATATYPES,,DataTypes))
+$(eval $(call feature_enabled,AMISSL,-DWITH_AMISSL -DWITH_OPENSSL -D__NO_NET_API -D__NO_NETINCLUDE_ERRNO -I$(GCCSDK_INSTALL_ENV)/netinclude,-lamisslauto,AmiSSL))
CFLAGS += -I$(GCCSDK_INSTALL_ENV)/include
CFLAGS += $(shell $(PKG_CONFIG) --cflags tre)
-LDFLAGS += $(shell $(PKG_CONFIG) --static --libs libcurl openssl)
+LDFLAGS += $(shell $(PKG_CONFIG) --static --libs libcurl)
LDFLAGS += $(shell $(PKG_CONFIG) --libs tre)
LDFLAGS += -L$(GCCSDK_INSTALL_ENV)/lib
LDFLAGS += -lpbl -liconv
+ifeq ($(NETSURF_USE_OPENSSL),YES)
+ LDFLAGS += $(shell $(PKG_CONFIG) --static --libs openssl)
+endif
+
ifeq ($(SUBTARGET),os3)
LDFLAGS += -lamiga -lm
endif
+COMMON_WARNFLAGS += -Wno-cast-align
+
EXETARGET := NetSurf
# The filter and target for split messages
@@ -37,16 +44,16 @@ MESSAGES_FILTER=ami
# sources purely for the Amiga build
S_FRONTEND := gui.c history.c hotlist.c schedule.c file.c \
- misc.c bitmap.c font.c filetype.c utf8.c login.c memory.c \
+ misc.c bitmap.c font.c filetype.c utf8.c memory.c \
plotters.c object.c menu.c save_pdf.c arexx.c version.c \
cookies.c ctxmenu.c clipboard.c help.c font_scan.c \
launch.c search.c history_local.c download.c iff_dr2d.c \
- sslcert.c gui_options.c print.c theme.c drag.c icon.c libs.c \
+ gui_options.c print.c theme.c drag.c icon.c libs.c \
datatypes.c dt_picture.c dt_anim.c dt_sound.c plugin_hack.c \
stringview/stringview.c stringview/urlhistory.c rtg.c \
agclass/amigaguide_class.c os3support.c font_diskfont.c \
selectmenu.c hash/xxhash.c font_cache.c font_bullet.c \
- nsoption.c corewindow.c gui_menu.c
+ nsoption.c corewindow.c gui_menu.c pageinfo.c
# This is the final source build list
# Note this is deliberately *not* expanded here as common and image
@@ -67,26 +74,27 @@ package-amiga: netsurf.lha
AMIGA_LANGUAGES := de en it ja nl
AMIGA_PLATFORM_RESOURCES := Pointers Themes default.css default.css.info favicon.png LangNames mimetypes Resource.map splash.png
-AMIGA_GENERIC_RESOURCES := $(AMIGA_LANGUAGES) ca-bundle Icons
-AMIGA_RESOURCES := $(addprefix $(FRONTEND_SOURCE_DIR)/resources/,$(AMIGA_PLATFORM_RESOURCES)) $(addprefix \!NetSurf/Resources/,$(AMIGA_GENERIC_RESOURCES))
+AMIGA_GENERIC_RESOURCES := $(AMIGA_LANGUAGES) ca-bundle icons
+AMIGA_RESOURCES := $(addprefix $(FRONTEND_SOURCE_DIR)/resources/,$(AMIGA_PLATFORM_RESOURCES)) $(addprefix resources/,$(AMIGA_GENERIC_RESOURCES))
AMIGA_DISTRIBUTION_FILES := $(FRONTEND_SOURCE_DIR)/dist/*
AMIGA_PKG_DIR := $(FRONTEND_SOURCE_DIR)/pkg
AMIGA_INSTALL_TARGET_DIR := NetSurf_Amiga
-netsurf.lha: $(EXETARGET)
+netsurf.lha: $(EXETARGET) $(POSTEXES)
$(VQ)echo Creating netsurf.lha
$(Q)rm -rf $(AMIGA_INSTALL_TARGET_DIR)
$(Q)$(MKDIR) -p $(AMIGA_INSTALL_TARGET_DIR)/NetSurf
$(Q)cp -p $(EXETARGET) $(AMIGA_INSTALL_TARGET_DIR)/NetSurf
$(Q)$(MKDIR) $(AMIGA_INSTALL_TARGET_DIR)/NetSurf/Resources
$(Q)cp -rp $(AMIGA_RESOURCES) $(AMIGA_INSTALL_TARGET_DIR)/NetSurf/Resources
+ $(Q)mv $(AMIGA_INSTALL_TARGET_DIR)/NetSurf/Resources/icons $(AMIGA_INSTALL_TARGET_DIR)/NetSurf/Resources/Icons
$(Q)cp -rp $(AMIGA_DISTRIBUTION_FILES) $(AMIGA_INSTALL_TARGET_DIR)/NetSurf
$(Q)cat resources/SearchEngines $(AMIGA_PKG_DIR)/SearchEngines >$(AMIGA_INSTALL_TARGET_DIR)/NetSurf/Resources/SearchEngines
- $(Q)cp -p \!NetSurf/Resources/AdBlock,f79 $(AMIGA_INSTALL_TARGET_DIR)/NetSurf/Resources/adblock.css
- $(Q)cp -p \!NetSurf/Resources/CSS,f79 $(AMIGA_INSTALL_TARGET_DIR)/NetSurf/Resources/nsdefault.css
- $(Q)cp -p \!NetSurf/Resources/internal.css,f79 $(AMIGA_INSTALL_TARGET_DIR)/NetSurf/Resources/internal.css
- $(Q)cp -p \!NetSurf/Resources/Quirks,f79 $(AMIGA_INSTALL_TARGET_DIR)/NetSurf/Resources/quirks.css
- $(Q)cp -p \!NetSurf/Resources/netsurf.png,b60 $(AMIGA_INSTALL_TARGET_DIR)/NetSurf/Resources/netsurf.png
+ $(Q)cp -p resources/adblock.css $(AMIGA_INSTALL_TARGET_DIR)/NetSurf/Resources/adblock.css
+ $(Q)cp -p resources/default.css $(AMIGA_INSTALL_TARGET_DIR)/NetSurf/Resources/nsdefault.css
+ $(Q)cp -p resources/internal.css $(AMIGA_INSTALL_TARGET_DIR)/NetSurf/Resources/internal.css
+ $(Q)cp -p resources/quirks.css $(AMIGA_INSTALL_TARGET_DIR)/NetSurf/Resources/quirks.css
+ $(Q)cp -p resources/netsurf.png $(AMIGA_INSTALL_TARGET_DIR)/NetSurf/Resources/netsurf.png
$(Q)cp -p $(AMIGA_PKG_DIR)/drawer.info $(AMIGA_INSTALL_TARGET_DIR)/NetSurf.info
$(Q)cp -p $(AMIGA_PKG_DIR)/AutoInstall $(AMIGA_INSTALL_TARGET_DIR)
ifeq ($(SUBTARGET),os3)
@@ -97,5 +105,5 @@ netsurf.lha: $(EXETARGET)
$(Q)cp -p $(AMIGA_PKG_DIR)/netsurf.readme.info $(AMIGA_INSTALL_TARGET_DIR)/NetSurf
endif
$(Q)cd $(AMIGA_INSTALL_TARGET_DIR); \
- lha a netsurf.lha NetSurf NetSurf.info AutoInstall
+ lha ao6 netsurf.lha NetSurf NetSurf.info AutoInstall
diff --git a/frontends/amiga/Makefile.defaults b/frontends/amiga/Makefile.defaults
index f19d6e394..25e1f42e4 100644
--- a/frontends/amiga/Makefile.defaults
+++ b/frontends/amiga/Makefile.defaults
@@ -6,6 +6,12 @@
# Valid options: YES, NO
NETSURF_USE_LIBICONV_PLUG := NO
+# Use AmiSSL for secure connections.
+# Either this or NETSURF_USE_OPENSSL should be specified, not both.
+# libcurl must have been built against the same library.
+# Valid options: YES, NO
+NETSURF_USE_AMISSL := NO
+
# Enable NetSurf's use of librosprite for displaying RISC OS Sprites
# Valid options: YES, NO, AUTO
NETSURF_USE_ROSPRITE := NO
@@ -28,5 +34,14 @@ NETSURF_USE_NSSVG := YES
NETSURF_FS_BACKING_STORE := YES
# Optimisation levels
-CFLAGS += -fomit-frame-pointer -gstabs
+CFLAGS += -fomit-frame-pointer
+
+# Target-specific
+ifeq ($(SUBTARGET),os3)
+ NETSURF_USE_OPENSSL := NO
+ NETSURF_USE_AMISSL := YES
+ NETSURF_FS_BACKING_STORE := YES
+else
+ CFLAGS += -gstabs
+endif
diff --git a/frontends/amiga/Makefile.tools b/frontends/amiga/Makefile.tools
new file mode 100644
index 000000000..c16928783
--- /dev/null
+++ b/frontends/amiga/Makefile.tools
@@ -0,0 +1,21 @@
+# -*- mode: makefile-gmake -*-
+##
+## amiga target tool setup
+##
+
+ifeq ($(findstring amiga,$(HOST)),amiga)
+ # building for amiga on amiga
+ PKG_CONFIG := pkg-config
+else
+ ifeq ($(SUBTARGET),os3)
+ GCCSDK_INSTALL_ENV ?= /opt/netsurf/m68k-unknown-amigaos/env
+ GCCSDK_INSTALL_CROSSBIN ?= /opt/netsurf/m68k-unknown-amigaos/cross/bin
+ else
+ GCCSDK_INSTALL_ENV ?= /opt/netsurf/ppc-amigaos/env
+ GCCSDK_INSTALL_CROSSBIN ?= /opt/netsurf/ppc-amigaos/cross/bin
+ endif
+
+ CC := $(wildcard $(GCCSDK_INSTALL_CROSSBIN)/*gcc)
+
+ PKG_CONFIG := PKG_CONFIG_LIBDIR="$(GCCSDK_INSTALL_ENV)/lib/pkgconfig" pkg-config
+endif
diff --git a/frontends/amiga/arexx.c b/frontends/amiga/arexx.c
index 9484ee92b..243e927f8 100644
--- a/frontends/amiga/arexx.c
+++ b/frontends/amiga/arexx.c
@@ -69,7 +69,8 @@ enum
RX_ACTIVE,
RX_CLOSE,
RX_HOTLIST,
- RX_SLABSTATS
+ RX_SLABSTATS,
+ RX_EXEC
};
static Object *arexx_obj = NULL;
@@ -98,6 +99,7 @@ RXHOOKF(rx_active);
RXHOOKF(rx_close);
RXHOOKF(rx_hotlist);
RXHOOKF(rx_slabstats);
+RXHOOKF(rx_exec);
STATIC struct ARexxCmd Commands[] =
{
@@ -118,6 +120,7 @@ STATIC struct ARexxCmd Commands[] =
{"CLOSE", RX_CLOSE, rx_close, "W=WINDOW/K/N,T=TAB/K/N", 0, NULL, 0, 0, NULL },
{"HOTLIST", RX_HOTLIST, rx_hotlist, "A=ACTION/A", 0, NULL, 0, 0, NULL },
{"SLABSTATS", RX_SLABSTATS, rx_slabstats, "FILE", 0, NULL, 0, 0, NULL },
+ {"EXEC", RX_EXEC, rx_exec, "W=WINDOW/K/N,T=TAB/K/N,COMMAND/A/F", 0, NULL, 0, 0, NULL },
{ NULL, 0, NULL, NULL, 0, NULL, 0, 0, NULL }
};
@@ -191,9 +194,9 @@ static struct gui_window *ami_find_tab_gwin(struct gui_window_2 *gwin, int tab)
struct Node *ntab;
struct gui_window *gw;
- if((tab == 0) || (gwin->tabs == 0)) return gwin->gw;
+ if((tab == 0) || (ami_gui2_get_tabs(gwin) == 0)) return ami_gui2_get_gui_window(gwin);
- ctab = GetHead(&gwin->tab_list);
+ ctab = GetHead(ami_gui2_get_tab_list(gwin));
do
{
@@ -215,9 +218,9 @@ static int ami_find_tab_bw(struct gui_window_2 *gwin, struct browser_window *bw)
struct Node *ntab;
struct gui_window *tgw = NULL;
- if((bw == NULL) || (gwin->tabs == 0)) return 1;
+ if((bw == NULL) || (ami_gui2_get_tabs(gwin) == 0)) return 1;
- ctab = GetHead(&gwin->tab_list);
+ ctab = GetHead(ami_gui2_get_tab_list(gwin));
do
{
@@ -226,7 +229,7 @@ static int ami_find_tab_bw(struct gui_window_2 *gwin, struct browser_window *bw)
GetClickTabNodeAttrs(ctab,
TNA_UserData, &tgw,
TAG_DONE);
- if(tgw->bw == bw) return tabs;
+ if(ami_gui_get_browser_window(tgw) == bw) return tabs;
} while((ctab=ntab));
return 0;
@@ -235,6 +238,7 @@ static int ami_find_tab_bw(struct gui_window_2 *gwin, struct browser_window *bw)
static struct gui_window *ami_find_tab(int window, int tab)
{
struct nsObject *node, *nnode;
+ struct MinList *window_list = ami_gui_get_window_list();
if(!IsMinListEmpty(window_list))
{
@@ -260,7 +264,7 @@ static struct gui_window *ami_find_tab(int window, int tab)
RXHOOKF(rx_open)
{
struct dlnode *dln;
- struct gui_window *gw = cur_gw;
+ struct gui_window *gw = ami_gui_get_active_gw();
nsurl *url;
cmd->ac_RC = 0;
@@ -281,8 +285,8 @@ RXHOOKF(rx_open)
dln->filename = strdup((char *)cmd->ac_ArgList[3]);
dln->node.ln_Name = strdup((char *)cmd->ac_ArgList[0]);
dln->node.ln_Type = NT_USER;
- AddTail(&gw->dllist, (struct Node *)dln);
- browser_window_navigate(gw->bw,
+ AddTail(ami_gui_get_download_list(gw), (struct Node *)dln);
+ browser_window_navigate(ami_gui_get_browser_window(gw),
url,
NULL,
BW_NAVIGATE_DOWNLOAD,
@@ -303,11 +307,11 @@ RXHOOKF(rx_open)
BW_CREATE_TAB,
url,
NULL,
- gw->bw,
+ ami_gui_get_browser_window(gw),
NULL);
if(cmd->ac_ArgList[6]) {
- ami_gui_switch_to_new_tab(gw->shared);
+ ami_gui_switch_to_new_tab(ami_gui_get_gui_window_2(gw));
}
}
}
@@ -323,7 +327,7 @@ RXHOOKF(rx_open)
{
if(gw)
{
- browser_window_navigate(gw->bw,
+ browser_window_navigate(ami_gui_get_browser_window(gw),
url,
NULL,
BW_NAVIGATE_HISTORY,
@@ -346,9 +350,7 @@ RXHOOKF(rx_open)
RXHOOKF(rx_save)
{
BPTR fh = 0;
- ULONG source_size;
- const char *source_data;
- struct gui_window *gw = cur_gw;
+ struct gui_window *gw = ami_gui_get_active_gw();
cmd->ac_RC = 0;
@@ -357,19 +359,23 @@ RXHOOKF(rx_save)
if(!gw) return;
- ami_set_pointer(gw->shared, GUI_POINTER_WAIT, false);
+ ami_set_pointer(ami_gui_get_gui_window_2(gw), GUI_POINTER_WAIT, false);
if((fh = FOpen((char *)cmd->ac_ArgList[0], MODE_NEWFILE, 0)))
{
- struct hlcache_handle *h = browser_window_get_content(gw->bw);
- if((source_data = content_get_source_data(h, &source_size)))
+ const uint8_t *source_data;
+ size_t source_size;
+ struct hlcache_handle *h = browser_window_get_content(ami_gui_get_browser_window(gw));
+ source_data = content_get_source_data(h, &source_size);
+ if (source_data != NULL) {
FWrite(fh, source_data, 1, source_size);
+ }
FClose(fh);
- SetComment((char *)cmd->ac_ArgList[0], nsurl_access(browser_window_get_url(gw->bw)));
+ SetComment((char *)cmd->ac_ArgList[0], nsurl_access(browser_window_access_url(ami_gui_get_browser_window(gw))));
}
- ami_reset_pointer(gw->shared);
+ ami_reset_pointer(ami_gui_get_gui_window_2(gw));
}
RXHOOKF(rx_quit)
@@ -381,21 +387,21 @@ RXHOOKF(rx_quit)
RXHOOKF(rx_tofront)
{
cmd->ac_RC = 0;
- ScreenToFront(scrn);
+ ScreenToFront(ami_gui_get_screen());
}
RXHOOKF(rx_geturl)
{
- struct gui_window *gw = cur_gw;
+ struct gui_window *gw = ami_gui_get_active_gw();
cmd->ac_RC = 0;
if((cmd->ac_ArgList[0]) && (cmd->ac_ArgList[1]))
gw = ami_find_tab(*(ULONG *)cmd->ac_ArgList[0], *(ULONG *)cmd->ac_ArgList[1]);
- if(gw && gw->bw)
+ if(gw && ami_gui_get_browser_window(gw))
{
- strcpy(result, nsurl_access(browser_window_get_url(gw->bw)));
+ strcpy(result, nsurl_access(browser_window_access_url(ami_gui_get_browser_window(gw))));
}
else
{
@@ -407,7 +413,7 @@ RXHOOKF(rx_geturl)
RXHOOKF(rx_gettitle)
{
- struct gui_window *gw = cur_gw;
+ struct gui_window *gw = ami_gui_get_active_gw();
cmd->ac_RC = 0;
@@ -416,10 +422,10 @@ RXHOOKF(rx_gettitle)
if(gw)
{
- if(gw->shared->tabs > 1)
- strcpy(result, gw->tabtitle);
+ if(ami_gui2_get_tabs(ami_gui_get_gui_window_2(gw)) > 1)
+ strcpy(result, ami_gui_get_tab_title(gw));
else
- strcpy(result, gw->shared->wintitle);
+ strcpy(result, ami_gui_get_win_title(gw));
}
else
{
@@ -513,32 +519,32 @@ RXHOOKF(rx_pubscreen)
RXHOOKF(rx_back)
{
- struct gui_window *gw = cur_gw;
+ struct gui_window *gw = ami_gui_get_active_gw();
cmd->ac_RC = 0;
if((cmd->ac_ArgList[0]) && (cmd->ac_ArgList[1]))
gw = ami_find_tab(*(ULONG *)cmd->ac_ArgList[0], *(ULONG *)cmd->ac_ArgList[1]);
- if(gw) ami_gui_history(gw->shared, true);
+ if(gw) ami_gui_history(ami_gui_get_gui_window_2(gw), true);
}
RXHOOKF(rx_forward)
{
- struct gui_window *gw = cur_gw;
+ struct gui_window *gw = ami_gui_get_active_gw();
cmd->ac_RC = 0;
if((cmd->ac_ArgList[0]) && (cmd->ac_ArgList[1]))
gw = ami_find_tab(*(ULONG *)cmd->ac_ArgList[0], *(ULONG *)cmd->ac_ArgList[1]);
- if(gw) ami_gui_history(gw->shared, false);
+ if(gw) ami_gui_history(ami_gui_get_gui_window_2(gw), false);
}
RXHOOKF(rx_home)
{
- struct gui_window *gw = cur_gw;
+ struct gui_window *gw = ami_gui_get_active_gw();
nsurl *url;
cmd->ac_RC = 0;
@@ -551,7 +557,7 @@ RXHOOKF(rx_home)
if (nsurl_create(nsoption_charp(homepage_url), &url) != NSERROR_OK) {
amiga_warn_user("NoMemory", 0);
} else {
- browser_window_navigate(gw->bw,
+ browser_window_navigate(ami_gui_get_browser_window(gw),
url,
NULL,
BW_NAVIGATE_HISTORY,
@@ -564,7 +570,7 @@ RXHOOKF(rx_home)
RXHOOKF(rx_reload)
{
- struct gui_window *gw = cur_gw;
+ struct gui_window *gw = ami_gui_get_active_gw();
cmd->ac_RC = 0;
@@ -575,11 +581,11 @@ RXHOOKF(rx_reload)
{
if(cmd->ac_ArgList[0]) /* FORCE */
{
- browser_window_reload(gw->bw, true);
+ browser_window_reload(ami_gui_get_browser_window(gw), true);
}
else
{
- browser_window_reload(gw->bw, false);
+ browser_window_reload(ami_gui_get_browser_window(gw), false);
}
}
}
@@ -602,9 +608,10 @@ RXHOOKF(rx_windows)
RXHOOKF(rx_active)
{
int window = 0, tab = 0;
- struct gui_window *gw = cur_gw;
+ struct gui_window *gw = ami_gui_get_active_gw();
struct nsObject *node, *nnode;
struct gui_window_2 *gwin = NULL;
+ struct MinList *window_list = ami_gui_get_window_list();
cmd->ac_RC = 0;
@@ -623,7 +630,7 @@ RXHOOKF(rx_active)
if(node->Type == AMINS_WINDOW)
{
windows++;
- if(gwin->gw == gw)
+ if(IS_CURRENT_GW(gwin,gw))
{
window = windows;
break;
@@ -634,7 +641,7 @@ RXHOOKF(rx_active)
if(cmd->ac_ArgList[0])
{
- tab = ami_find_tab_bw(gwin, gw->bw);
+ tab = ami_find_tab_bw(gwin, ami_gui_get_browser_window(gw));
}
if(cmd->ac_ArgList[0]) sprintf(result, "%d", tab);
@@ -644,7 +651,7 @@ RXHOOKF(rx_active)
RXHOOKF(rx_close)
{
- struct gui_window *gw = cur_gw;
+ struct gui_window *gw = ami_gui_get_active_gw();
cmd->ac_RC = 0;
@@ -652,11 +659,11 @@ RXHOOKF(rx_close)
gw = ami_find_tab(*(ULONG *)cmd->ac_ArgList[0], *(ULONG *)cmd->ac_ArgList[1]);
else if(cmd->ac_ArgList[0])
{
- ami_gui_close_window(gw->shared);
+ ami_gui_close_window(ami_gui_get_gui_window_2(gw));
return;
}
- if(gw) browser_window_destroy(gw->bw);
+ if(gw) browser_window_destroy(ami_gui_get_browser_window(gw));
}
RXHOOKF(rx_hotlist)
@@ -670,6 +677,33 @@ RXHOOKF(rx_hotlist)
}
}
+RXHOOKF(rx_exec)
+{
+ struct gui_window *gw = ami_gui_get_active_gw();
+ bool res = false;
+
+ if(nsoption_bool(arexx_allow_exec) == false) {
+ cmd->ac_RC = RETURN_FAIL;
+ return;
+ }
+
+ if((cmd->ac_ArgList[0]) && (cmd->ac_ArgList[1]))
+ gw = ami_find_tab(*(ULONG *)cmd->ac_ArgList[0], *(ULONG *)cmd->ac_ArgList[1]);
+
+ if(gw) {
+ NSLOG(netsurf, WARNING, "Executing js: %s", (char *)cmd->ac_ArgList[2]);
+ res = browser_window_exec(ami_gui_get_browser_window(gw),
+ (char *)cmd->ac_ArgList[2], strlen((char *)cmd->ac_ArgList[2]));
+ }
+
+ if(res == false) {
+ cmd->ac_RC = RETURN_ERROR;
+ } else {
+ cmd->ac_RC = RETURN_OK;
+ }
+
+}
+
RXHOOKF(rx_slabstats)
{
#ifndef __amigaos4__
diff --git a/frontends/amiga/bitmap.c b/frontends/amiga/bitmap.c
index 0fde677ae..e8534a395 100644
--- a/frontends/amiga/bitmap.c
+++ b/frontends/amiga/bitmap.c
@@ -108,7 +108,7 @@ static APTR pool_bitmap = NULL;
static bool guigfx_warned = false;
/* exported function documented in amiga/bitmap.h */
-void *amiga_bitmap_create(int width, int height, unsigned int state)
+void *amiga_bitmap_create(int width, int height, enum gui_bitmap_flags flags)
{
struct bitmap *bitmap;
@@ -139,8 +139,7 @@ void *amiga_bitmap_create(int width, int height, unsigned int state)
bitmap->width = width;
bitmap->height = height;
- if(state & BITMAP_OPAQUE) bitmap->opaque = true;
- else bitmap->opaque = false;
+ bitmap->opaque = (flags & BITMAP_OPAQUE) == BITMAP_OPAQUE;
bitmap->nativebm = NULL;
bitmap->nativebmwidth = 0;
@@ -307,25 +306,6 @@ void amiga_bitmap_set_opaque(void *bitmap, bool opaque)
/* exported function documented in amiga/bitmap.h */
-bool amiga_bitmap_test_opaque(void *bitmap)
-{
- struct bitmap *bm = bitmap;
- uint32 p = bm->width * bm->height;
- uint32 a = 0;
- uint32 *bmi = (uint32 *)amiga_bitmap_get_buffer(bm);
-
- assert(bitmap);
-
- for(a=0;a<p;a+=4)
- {
- if ((*bmi & 0x000000ffU) != 0x000000ffU) return false;
- bmi++;
- }
- return true;
-}
-
-
-/* exported function documented in amiga/bitmap.h */
bool amiga_bitmap_get_opaque(void *bitmap)
{
struct bitmap *bm = bitmap;
@@ -367,40 +347,6 @@ int bitmap_get_height(void *bitmap)
}
}
-
-/**
- * Find the bytes per pixel of a bitmap
- *
- * \param vbitmap a bitmap, as returned by bitmap_create()
- * \return bytes per pixel
- */
-static size_t bitmap_get_bpp(void *vbitmap)
-{
- struct bitmap *bitmap = (struct bitmap *)vbitmap;
- assert(bitmap);
- return 4;
-}
-
-static void ami_bitmap_argb_to_rgba(struct bitmap *bm)
-{
- if(bm == NULL) return;
-
- ULONG *data = (ULONG *)amiga_bitmap_get_buffer(bm);
- for(int i = 0; i < (bm->width * bm->height); i++) {
- data[i] = (data[i] << 8) | (data[i] >> 24);
- }
-}
-
-static void ami_bitmap_rgba_to_argb(struct bitmap *bm)
-{
- if(bm == NULL) return;
-
- ULONG *data = (ULONG *)amiga_bitmap_get_buffer(bm);
- for(int i = 0; i < (bm->width * bm->height); i++) {
- data[i] = (data[ i] >> 8) | (data[i] << 24);
- }
-}
-
#ifdef BITMAP_DUMP
void bitmap_dump(struct bitmap *bitmap)
{
@@ -436,7 +382,7 @@ Object *ami_datatype_object_from_bitmap(struct bitmap *bitmap)
{
bmhd->bmh_Width = (UWORD)bitmap_get_width(bitmap);
bmhd->bmh_Height = (UWORD)bitmap_get_height(bitmap);
- bmhd->bmh_Depth = (UBYTE)bitmap_get_bpp(bitmap) * 8;
+ bmhd->bmh_Depth = (UBYTE)32;
if(!amiga_bitmap_get_opaque(bitmap)) bmhd->bmh_Masking = mskHasAlpha;
}
@@ -450,7 +396,7 @@ Object *ami_datatype_object_from_bitmap(struct bitmap *bitmap)
TAG_DONE);
IDoMethod(dto, PDTM_WRITEPIXELARRAY, amiga_bitmap_get_buffer(bitmap),
- PBPAFMT_RGBA, amiga_bitmap_get_rowstride(bitmap), 0, 0,
+ PBPAFMT_ARGB, amiga_bitmap_get_rowstride(bitmap), 0, 0,
bitmap_get_width(bitmap), bitmap_get_height(bitmap));
}
@@ -475,10 +421,10 @@ struct bitmap *ami_bitmap_from_datatype(char *filename)
bm = amiga_bitmap_create(bmh->bmh_Width, bmh->bmh_Height, 0);
IDoMethod(dto, PDTM_READPIXELARRAY, amiga_bitmap_get_buffer(bm),
- PBPAFMT_RGBA, amiga_bitmap_get_rowstride(bm), 0, 0,
+ PBPAFMT_ARGB, amiga_bitmap_get_rowstride(bm), 0, 0,
bmh->bmh_Width, bmh->bmh_Height);
- amiga_bitmap_set_opaque(bm, amiga_bitmap_test_opaque(bm));
+ amiga_bitmap_set_opaque(bm, bitmap_test_opaque(bm));
}
DisposeDTObject(dto);
}
@@ -490,6 +436,7 @@ static inline struct BitMap *ami_bitmap_get_generic(struct bitmap *bitmap,
int width, int height, struct BitMap *restrict friendbm, int type)
{
struct BitMap *restrict tbm = NULL;
+ struct Screen *scrn = ami_gui_get_screen();
if(bitmap->nativebm)
{
@@ -530,19 +477,22 @@ static inline struct BitMap *ami_bitmap_get_generic(struct bitmap *bitmap,
dithermode = DITHERMODE_FS;
}
- ami_bitmap_rgba_to_argb(bitmap);
- bitmap->drawhandle = ObtainDrawHandle(NULL,
- &rp, scrn->ViewPort.ColorMap,
- GGFX_DitherMode, dithermode,
- TAG_DONE);
-
- APTR ddh = CreateDirectDrawHandle(bitmap->drawhandle,
- bitmap->width, bitmap->height,
- width, height, NULL);
-
- DirectDrawTrueColor(ddh, (ULONG *)amiga_bitmap_get_buffer(bitmap), 0, 0, TAG_DONE);
- DeleteDirectDrawHandle(ddh);
- ami_bitmap_argb_to_rgba(bitmap);
+ bitmap->drawhandle = ObtainDrawHandle(
+ NULL,
+ &rp,
+ scrn->ViewPort.ColorMap,
+ GGFX_DitherMode, dithermode,
+ TAG_DONE);
+ if(bitmap->drawhandle) {
+ APTR ddh = CreateDirectDrawHandle(bitmap->drawhandle,
+ bitmap->width, bitmap->height,
+ width, height, NULL);
+
+ DirectDrawTrueColor(ddh, (ULONG *)amiga_bitmap_get_buffer(bitmap), 0, 0, TAG_DONE);
+ DeleteDirectDrawHandle(ddh);
+ ReleaseDrawHandle(bitmap->drawhandle);
+ bitmap->drawhandle = NULL;
+ }
} else {
if(guigfx_warned == false) {
amiga_warn_user("BMConvErr", NULL);
@@ -692,7 +642,7 @@ PLANEPTR ami_bitmap_get_mask(struct bitmap *bitmap, int width,
for(y=0; y<height; y++) {
for(x=0; x<width; x++) {
- if ((*bmi & 0x000000ffU) <= (ULONG)nsoption_int(mask_alpha)) maskbit = 0;
+ if ((*bmi & 0xff000000U) <= (ULONG)nsoption_int(mask_alpha)) maskbit = 0;
else maskbit = 1;
bmi++;
bitmap->native_mask[(y*bpr) + (x/8)] |=
@@ -769,8 +719,6 @@ static nserror bitmap_render(struct bitmap *bitmap, struct hlcache_handle *conte
BLITA_DestY, 0,
TAG_DONE);
- ami_bitmap_argb_to_rgba(bitmap);
-
/**\todo In theory we should be able to move the bitmap to our native area
to try to avoid re-conversion (at the expense of memory) */
@@ -818,13 +766,10 @@ static struct gui_bitmap_table bitmap_table = {
.destroy = amiga_bitmap_destroy,
.set_opaque = amiga_bitmap_set_opaque,
.get_opaque = amiga_bitmap_get_opaque,
- .test_opaque = amiga_bitmap_test_opaque,
.get_buffer = amiga_bitmap_get_buffer,
.get_rowstride = amiga_bitmap_get_rowstride,
.get_width = bitmap_get_width,
.get_height = bitmap_get_height,
- .get_bpp = bitmap_get_bpp,
- .save = amiga_bitmap_save,
.modified = amiga_bitmap_modified,
.render = bitmap_render,
};
diff --git a/frontends/amiga/bitmap.h b/frontends/amiga/bitmap.h
index aaec26ac2..a7dc9198f 100755
--- a/frontends/amiga/bitmap.h
+++ b/frontends/amiga/bitmap.h
@@ -25,7 +25,9 @@
#include <intuition/classusr.h>
#include <libraries/Picasso96.h>
-#define AMI_BITMAP_FORMAT RGBFB_R8G8B8A8
+#include "netsurf/bitmap.h"
+
+#define AMI_BITMAP_FORMAT RGBFB_A8R8G8B8
#define AMI_BITMAP_SCALE_ICON 0xFF
extern struct gui_bitmap_table *amiga_bitmap_table;
@@ -101,10 +103,10 @@ void ami_bitmap_fini(void);
*
* \param width width of image in pixels
* \param height width of image in pixels
- * \param state a flag word indicating the initial state
+ * \param flags flags for bitmap creation
* \return an opaque struct bitmap, or NULL on memory exhaustion
*/
-void *amiga_bitmap_create(int width, int height, unsigned int state);
+void *amiga_bitmap_create(int width, int height, enum gui_bitmap_flags flags);
/**
* Return a pointer to the pixel data in a bitmap.
@@ -174,14 +176,6 @@ void amiga_bitmap_modified(void *bitmap);
void amiga_bitmap_set_opaque(void *bitmap, bool opaque);
/**
- * Tests whether a bitmap has an opaque alpha channel
- *
- * \param bitmap a bitmap, as returned by bitmap_create()
- * \return whether the bitmap is opaque
- */
-bool amiga_bitmap_test_opaque(void *bitmap);
-
-/**
* Gets whether a bitmap should be plotted opaque
*
* \param bitmap a bitmap, as returned by bitmap_create()
diff --git a/frontends/amiga/clipboard.c b/frontends/amiga/clipboard.c
index 27b801540..05a83606e 100644
--- a/frontends/amiga/clipboard.c
+++ b/frontends/amiga/clipboard.c
@@ -17,6 +17,7 @@
*/
#include <stdlib.h>
+#include <string.h>
#include <proto/iffparse.h>
#include <proto/intuition.h>
#include <proto/exec.h>
@@ -86,14 +87,14 @@ void ami_clipboard_free(void)
void gui_start_selection(struct gui_window *g)
{
if(!g) return;
- if(!g->shared->win) return;
+ if(!ami_gui_get_window(g)) return;
if(nsoption_bool(kiosk_mode) == true) return;
- ami_gui_menu_set_disabled(g->shared->win, g->shared->imenu, M_COPY, false);
- ami_gui_menu_set_disabled(g->shared->win, g->shared->imenu, M_CLEAR, false);
+ ami_gui_menu_set_disabled(ami_gui_get_window(g), ami_gui_get_menu(g), M_COPY, false);
+ ami_gui_menu_set_disabled(ami_gui_get_window(g), ami_gui_get_menu(g), M_CLEAR, false);
- if (browser_window_get_editor_flags(g->bw) & BW_EDITOR_CAN_CUT)
- ami_gui_menu_set_disabled(g->shared->win, g->shared->imenu, M_CUT, false);
+ if (browser_window_get_editor_flags(ami_gui_get_browser_window(g)) & BW_EDITOR_CAN_CUT)
+ ami_gui_menu_set_disabled(ami_gui_get_window(g), ami_gui_get_menu(g), M_CUT, false);
}
static char *ami_clipboard_cat_collection(struct CollectionItem *ci, LONG codeset, size_t *text_length)
@@ -276,54 +277,54 @@ void ami_drag_selection(struct gui_window *g)
if(!gwin)
{
- DisplayBeep(scrn);
+ ami_gui_beep();
return;
}
- x = gwin->win->MouseX;
- y = gwin->win->MouseY;
+ x = ami_gui2_get_window(gwin)->MouseX;
+ y = ami_gui2_get_window(gwin)->MouseY;
if(ami_text_box_at_point(gwin, (ULONG *)&x, (ULONG *)&y))
{
iffh = ami_clipboard_init_internal(1);
- browser_window_key_press(g->bw, NS_KEY_COPY_SELECTION);
- browser_window_mouse_click(gwin->gw->bw, BROWSER_MOUSE_PRESS_1, x, y);
- browser_window_key_press(gwin->gw->bw, NS_KEY_PASTE);
+ browser_window_key_press(ami_gui_get_browser_window(g), NS_KEY_COPY_SELECTION);
+ browser_window_mouse_click(ami_gui2_get_browser_window(gwin), BROWSER_MOUSE_PRESS_1, x, y);
+ browser_window_key_press(ami_gui2_get_browser_window(gwin), NS_KEY_PASTE);
ami_clipboard_free_internal(iffh);
iffh = old_iffh;
}
else
{
- x = gwin->win->MouseX;
- y = gwin->win->MouseY;
+ x = ami_gui2_get_window(gwin)->MouseX;
+ y = ami_gui2_get_window(gwin)->MouseY;
- if(ami_gadget_hit(gwin->objects[GID_URL], x, y))
+ if(ami_gadget_hit(ami_gui2_get_object(gwin, AMI_GAD_URL), x, y))
{
- if((sel = browser_window_get_selection(g->bw)))
+ if((sel = browser_window_get_selection(ami_gui_get_browser_window(g))))
{
utf8text = ami_utf8_easy(sel);
- RefreshSetGadgetAttrs((struct Gadget *)gwin->objects[GID_URL],
- gwin->win, NULL, STRINGA_TextVal, utf8text, TAG_DONE);
+ RefreshSetGadgetAttrs((struct Gadget *)ami_gui2_get_object(gwin, AMI_GAD_URL),
+ ami_gui2_get_window(gwin), NULL, STRINGA_TextVal, utf8text, TAG_DONE);
free(sel);
ami_utf8_free(utf8text);
}
}
- else if(ami_gadget_hit(gwin->objects[GID_SEARCHSTRING], x, y))
+ else if(ami_gadget_hit(ami_gui2_get_object(gwin, AMI_GAD_SEARCH), x, y))
{
- if((sel = browser_window_get_selection(g->bw)))
+ if((sel = browser_window_get_selection(ami_gui_get_browser_window(g))))
{
utf8text = ami_utf8_easy(sel);
- RefreshSetGadgetAttrs((struct Gadget *)gwin->objects[GID_SEARCHSTRING],
- gwin->win, NULL, STRINGA_TextVal, utf8text, TAG_DONE);
+ RefreshSetGadgetAttrs((struct Gadget *)ami_gui2_get_object(gwin, AMI_GAD_SEARCH),
+ ami_gui2_get_window(gwin), NULL, STRINGA_TextVal, utf8text, TAG_DONE);
free(sel);
ami_utf8_free(utf8text);
}
}
else
{
- DisplayBeep(scrn);
+ ami_gui_beep();
}
}
}
@@ -349,15 +350,22 @@ bool ami_easy_clipboard_bitmap(struct bitmap *bitmap)
#ifdef WITH_NS_SVG
bool ami_easy_clipboard_svg(struct hlcache_handle *c)
{
- const char *source_data;
- ULONG source_size;
+ const uint8_t *source_data;
+ size_t source_size;
- if(ami_mime_compare(c, "svg") == false) return false;
- if((source_data = content_get_source_data(c, &source_size)) == NULL) return false;
+ if (ami_mime_compare(c, "svg") == false) {
+ return false;
+ }
+ source_data = content_get_source_data(c, &source_size);
+ if (source_data == NULL) {
+ return false;
+ }
- if(!(OpenIFF(iffh,IFFF_WRITE)))
- {
- ami_svg_to_dr2d(iffh, source_data, source_size, nsurl_access(hlcache_handle_get_url(c)));
+ if (!(OpenIFF(iffh,IFFF_WRITE))) {
+ ami_svg_to_dr2d(iffh,
+ (const char *)source_data,
+ source_size,
+ nsurl_access(hlcache_handle_get_url(c)));
CloseIFF(iffh);
}
diff --git a/frontends/amiga/cookies.c b/frontends/amiga/cookies.c
index 45e883fde..3cd32f37e 100644
--- a/frontends/amiga/cookies.c
+++ b/frontends/amiga/cookies.c
@@ -310,7 +310,7 @@ ami_cookies_create_window(struct ami_cookie_window *cookie_win)
WA_Left, nsoption_int(cookies_window_xpos),
WA_Width, nsoption_int(cookies_window_xsize),
WA_Height, nsoption_int(cookies_window_ysize),
- WA_PubScreen, scrn,
+ WA_PubScreen, ami_gui_get_screen(),
WA_ReportMouse, TRUE,
refresh_mode, TRUE,
WA_IDCMP, IDCMP_MOUSEMOVE | IDCMP_MOUSEBUTTONS | IDCMP_NEWSIZE |
@@ -319,7 +319,7 @@ ami_cookies_create_window(struct ami_cookie_window *cookie_win)
WINDOW_IDCMPHook, &ami_cw->idcmp_hook,
WINDOW_IDCMPHookBits, IDCMP_IDCMPUPDATE | IDCMP_EXTENDEDMOUSE |
IDCMP_SIZEVERIFY | IDCMP_REFRESHWINDOW,
- WINDOW_SharedPort, sport,
+ WINDOW_SharedPort, ami_gui_get_shared_msgport(),
WINDOW_HorizProp, 1,
WINDOW_VertProp, 1,
WINDOW_UserData, cookie_win,
@@ -345,7 +345,7 @@ ami_cookies_create_window(struct ami_cookie_window *cookie_win)
}
/* exported interface documented in amiga/cookies.h */
-nserror ami_cookies_present(void)
+nserror ami_cookies_present(const char *search_term)
{
struct ami_cookie_window *ncwin;
nserror res;
@@ -395,6 +395,10 @@ nserror ami_cookies_present(void)
cookie_window = ncwin;
- return NSERROR_OK;
+ if (search_term != NULL) {
+ res = cookie_manager_set_search_string(search_term);
+ }
+
+ return res;
}
diff --git a/frontends/amiga/cookies.h b/frontends/amiga/cookies.h
index 6858e4cab..6eb525cbe 100644
--- a/frontends/amiga/cookies.h
+++ b/frontends/amiga/cookies.h
@@ -20,6 +20,6 @@
#define AMIGA_COOKIES_H
/** Open the cookie viewer */
-nserror ami_cookies_present(void);
+nserror ami_cookies_present(const char *search_term);
#endif
diff --git a/frontends/amiga/corewindow.c b/frontends/amiga/corewindow.c
index 42ee866ea..bfb0eb202 100644
--- a/frontends/amiga/corewindow.c
+++ b/frontends/amiga/corewindow.c
@@ -68,17 +68,19 @@
#include "amiga/utf8.h"
static void
-ami_cw_scroller_top(struct ami_corewindow *ami_cw, ULONG *restrict x, ULONG *restrict y)
+ami_cw_scroller_top(struct ami_corewindow *ami_cw,
+ ULONG *restrict x,
+ ULONG *restrict y)
{
ULONG xs = 0;
ULONG ys = 0;
if(ami_cw->scroll_x_visible == true) {
- GetAttr(SCROLLER_Top, ami_cw->objects[GID_CW_HSCROLL], (ULONG *)&xs);
+ GetAttr(SCROLLER_Top, ami_cw->objects[GID_CW_HSCROLL], &xs);
}
if(ami_cw->scroll_y_visible == true) {
- GetAttr(SCROLLER_Top, ami_cw->objects[GID_CW_VSCROLL], (ULONG *)&ys);
+ GetAttr(SCROLLER_Top, ami_cw->objects[GID_CW_VSCROLL], &ys);
}
*x = xs;
@@ -243,15 +245,15 @@ ami_cw_redraw_rect(struct ami_corewindow *ami_cw, struct rect *r)
ami_cw_scroller_top(ami_cw, &pos_x, &pos_y);
- if(x - pos_x + width > bbox->Width) width = bbox->Width - (x - pos_x);
- if(y - pos_y + height > bbox->Height) height = bbox->Height - (y - pos_y);
+ if(x - (LONG)pos_x + width > bbox->Width) width = bbox->Width - (x - pos_x);
+ if(y - (LONG)pos_y + height > bbox->Height) height = bbox->Height - (y - pos_y);
- if(x < pos_x) {
+ if(x < (LONG)pos_x) {
width -= pos_x - x;
x = pos_x;
}
- if(y < pos_y) {
+ if(y < (LONG)pos_y) {
height -= pos_y - y;
y = pos_y;
}
@@ -585,6 +587,7 @@ static void
ami_cw_drag_end(struct ami_corewindow *ami_cw, int x, int y)
{
if(ami_cw->dragging == false) return;
+ struct Screen *scrn = ami_gui_get_screen();
switch(ami_cw->drag_status) {
case CORE_WINDOW_DRAG_SELECTION:
@@ -822,16 +825,18 @@ ami_cw_invalidate_area(struct core_window *cw, const struct rect *r)
}
-static void
-ami_cw_get_window_dimensions(struct core_window *cw, int *width, int *height)
+static nserror
+ami_cw_get_window_dimensions(const struct core_window *cw,
+ int *width, int *height)
{
struct ami_corewindow *ami_cw = (struct ami_corewindow *)cw;
ami_cw_window_size(ami_cw, width, height);
+ return NSERROR_OK;
}
-static void
+static nserror
ami_cw_update_size(struct core_window *cw, int width, int height)
{
struct ami_corewindow *ami_cw = (struct ami_corewindow *)cw;
@@ -858,61 +863,61 @@ ami_cw_update_size(struct core_window *cw, int width, int height)
SCROLLER_Visible, win_h,
TAG_DONE);
}
+ return NSERROR_OK;
}
-static void
-ami_cw_scroll_visible(struct core_window *cw, const struct rect *r)
+static nserror
+ami_cw_get_scroll(const struct core_window *cw, int *x, int *y)
{
struct ami_corewindow *ami_cw = (struct ami_corewindow *)cw;
-
- int scrollsetx;
- int scrollsety;
- int win_w = 0, win_h = 0;
ULONG win_x0, win_y0;
- int win_x1, win_y1;
-
- ami_cw_window_size(ami_cw, &win_w, &win_h);
ami_cw_scroller_top(ami_cw, &win_x0, &win_y0);
- win_x1 = win_x0 + win_w;
- win_y1 = win_y0 + win_h;
+ *x = win_x0;
+ *y = win_y0;
+ return NSERROR_OK;
+}
+
- if(r->y1 > win_y1) scrollsety = r->y1 - win_h;
- if(r->y0 < win_y0) scrollsety = r->y0;
- if(r->x1 > win_x1) scrollsetx = r->x1 - win_w;
- if(r->x0 < win_x0) scrollsetx = r->x0;
+static nserror
+ami_cw_set_scroll(struct core_window *cw, int x, int y)
+{
+ struct ami_corewindow *ami_cw = (struct ami_corewindow *)cw;
if(ami_cw->scroll_y_visible == true) {
RefreshSetGadgetAttrs((APTR)ami_cw->objects[GID_CW_VSCROLL], ami_cw->win, NULL,
- SCROLLER_Top, scrollsety,
+ SCROLLER_Top, y,
TAG_DONE);
}
if(ami_cw->scroll_x_visible == true) {
RefreshSetGadgetAttrs((APTR)ami_cw->objects[GID_CW_HSCROLL], ami_cw->win, NULL,
- SCROLLER_Top, scrollsetx,
+ SCROLLER_Top, x,
TAG_DONE);
}
/* probably need to redraw here */
ami_cw_redraw(ami_cw, NULL);
+ return NSERROR_OK;
}
-static void
+static nserror
ami_cw_drag_status(struct core_window *cw, core_window_drag_status ds)
{
struct ami_corewindow *ami_cw = (struct ami_corewindow *)cw;
ami_cw->drag_status = ds;
+ return NSERROR_OK;
}
struct core_window_callback_table ami_cw_cb_table = {
.invalidate = ami_cw_invalidate_area,
.update_size = ami_cw_update_size,
- .scroll_visible = ami_cw_scroll_visible,
+ .set_scroll = ami_cw_set_scroll,
+ .get_scroll = ami_cw_get_scroll,
.get_window_dimensions = ami_cw_get_window_dimensions,
.drag_status = ami_cw_drag_status
};
diff --git a/frontends/amiga/ctxmenu.c b/frontends/amiga/ctxmenu.c
index 717096f52..42826a3a5 100644
--- a/frontends/amiga/ctxmenu.c
+++ b/frontends/amiga/ctxmenu.c
@@ -107,8 +107,8 @@ HOOKF(void, ami_ctxmenu_item_selcopy, APTR, window, struct IntuiMessage *)
{
struct gui_window_2 *gwin = (struct gui_window_2 *)hook->h_Data;
- browser_window_key_press(gwin->gw->bw, NS_KEY_COPY_SELECTION);
- browser_window_key_press(gwin->gw->bw, NS_KEY_CLEAR_SELECTION);
+ browser_window_key_press(ami_gui2_get_browser_window(gwin), NS_KEY_COPY_SELECTION);
+ browser_window_key_press(ami_gui2_get_browser_window(gwin), NS_KEY_CLEAR_SELECTION);
}
HOOKF(void, ami_ctxmenu_item_websearch, APTR, window, struct IntuiMessage *)
@@ -117,11 +117,11 @@ HOOKF(void, ami_ctxmenu_item_websearch, APTR, window, struct IntuiMessage *)
nsurl *url;
struct gui_window_2 *gwin = (struct gui_window_2 *)hook->h_Data;
- char *sel = browser_window_get_selection(gwin->gw->bw);
+ char *sel = browser_window_get_selection(ami_gui2_get_browser_window(gwin));
ret = search_web_omni(sel, SEARCH_WEB_OMNI_SEARCHONLY, &url);
if (ret == NSERROR_OK) {
- browser_window_navigate(gwin->gw->bw,
+ browser_window_navigate(ami_gui2_get_browser_window(gwin),
url,
NULL,
BW_NAVIGATE_HISTORY,
@@ -146,8 +146,8 @@ HOOKF(void, ami_ctxmenu_item_urlopentab, APTR, window, struct IntuiMessage *)
GetAttr(WINDOW_UserData, (Object *)window, (ULONG *)&gwin);
nserror error = browser_window_create(BW_CREATE_CLONE | BW_CREATE_HISTORY | BW_CREATE_TAB,
url,
- browser_window_get_url(gwin->gw->bw),
- gwin->gw->bw,
+ browser_window_access_url(ami_gui2_get_browser_window(gwin)),
+ ami_gui2_get_browser_window(gwin),
&bw);
if (error != NSERROR_OK)
@@ -163,8 +163,8 @@ HOOKF(void, ami_ctxmenu_item_urlopenwin, APTR, window, struct IntuiMessage *)
GetAttr(WINDOW_UserData, (Object *)window, (ULONG *)&gwin);
nserror error = browser_window_create(BW_CREATE_CLONE | BW_CREATE_HISTORY,
url,
- browser_window_get_url(gwin->gw->bw),
- gwin->gw->bw,
+ browser_window_access_url(ami_gui2_get_browser_window(gwin)),
+ ami_gui2_get_browser_window(gwin),
&bw);
if (error != NSERROR_OK)
@@ -178,9 +178,9 @@ HOOKF(void, ami_ctxmenu_item_urldownload, APTR, window, struct IntuiMessage *)
GetAttr(WINDOW_UserData, (Object *)window, (ULONG *)&gwin);
- browser_window_navigate(gwin->gw->bw,
+ browser_window_navigate(ami_gui2_get_browser_window(gwin),
url,
- browser_window_get_url(gwin->gw->bw),
+ browser_window_access_url(ami_gui2_get_browser_window(gwin)),
BW_NAVIGATE_DOWNLOAD,
NULL,
NULL,
@@ -198,9 +198,9 @@ HOOKF(void, ami_ctxmenu_item_objshow, APTR, window, struct IntuiMessage *)
struct gui_window_2 *gwin;
GetAttr(WINDOW_UserData, (Object *)window, (ULONG *)&gwin);
- browser_window_navigate(gwin->gw->bw,
+ browser_window_navigate(ami_gui2_get_browser_window(gwin),
hlcache_handle_get_url(hook->h_Data),
- browser_window_get_url(gwin->gw->bw),
+ browser_window_access_url(ami_gui2_get_browser_window(gwin)),
BW_NAVIGATE_HISTORY,
NULL,
NULL,
@@ -238,9 +238,9 @@ HOOKF(void, ami_ctxmenu_item_frameshow, APTR, window, struct IntuiMessage *)
struct gui_window_2 *gwin;
GetAttr(WINDOW_UserData, (Object *)window, (ULONG *)&gwin);
- browser_window_navigate(gwin->gw->bw,
+ browser_window_navigate(ami_gui2_get_browser_window(gwin),
hlcache_handle_get_url(hook->h_Data),
- browser_window_get_url(gwin->gw->bw),
+ browser_window_access_url(ami_gui2_get_browser_window(gwin)),
BW_NAVIGATE_HISTORY,
NULL,
NULL,
@@ -271,7 +271,8 @@ HOOKF(void, ami_ctxmenu_item_history, APTR, window, struct IntuiMessage *)
GetAttr(WINDOW_UserData, (Object *)window, (ULONG *)&gwin);
- browser_window_history_go(gwin->gw->bw, (struct history_entry *)hook->h_Data, false);
+ browser_window_history_go(ami_gui2_get_browser_window(gwin),
+ (struct history_entry *)hook->h_Data, false);
}
@@ -300,7 +301,7 @@ static uint32 ami_ctxmenu_hook_func(struct Hook *hook, struct Window *window, st
Object *root_menu;
bool ctxmenu_has_content = false;
struct gui_window_2 *gwin = hook->h_Data;
- struct hlcache_handle *cc = browser_window_get_content(gwin->gw->bw);
+ struct hlcache_handle *cc = browser_window_get_content(ami_gui2_get_browser_window(gwin));
struct browser_window_features ccdata;
int mx = window->MouseX;
int my = window->MouseY;
@@ -328,11 +329,11 @@ static uint32 ami_ctxmenu_hook_func(struct Hook *hook, struct Window *window, st
return 0;
}
- browser_window_get_features(gwin->gw->bw, x, y, &ccdata);
+ browser_window_get_features(ami_gui2_get_browser_window(gwin), x, y, &ccdata);
- if((browser_window_can_select(gwin->gw->bw)) &&
- ((browser_window_get_editor_flags(gwin->gw->bw) & BW_EDITOR_CAN_COPY)) &&
- (sel = browser_window_get_selection(gwin->gw->bw))) {
+ if((browser_window_can_select(ami_gui2_get_browser_window(gwin))) &&
+ ((browser_window_get_editor_flags(ami_gui2_get_browser_window(gwin)) & BW_EDITOR_CAN_COPY)) &&
+ (sel = browser_window_get_selection(ami_gui2_get_browser_window(gwin)))) {
ami_ctxmenu_add_item(root_menu, AMI_CTX_ID_SELCOPY, gwin);
ami_ctxmenu_add_item(root_menu, AMI_CTX_ID_WEBSEARCH, gwin);
@@ -401,7 +402,7 @@ static void ami_ctxmenu_alloc_item(int id, const char *label, const char *key, c
if(image != NULL) {
ctxmenu_item_image[id] = BitMapObj,
- BITMAP_Screen, scrn,
+ BITMAP_Screen, ami_gui_get_screen(),
BITMAP_SourceFile, image,
BITMAP_Masking, TRUE,
BitMapEnd;
@@ -498,25 +499,26 @@ void ami_ctxmenu_init(void)
static bool ami_ctxmenu_history(int direction, struct gui_window_2 *gwin, const struct history_entry *entry)
{
Object *history_root;
- int id = AMI_CTX_ID_HISTORY0 + gwin->temp;
+ int id = AMI_CTX_ID_HISTORY0 + ami_gui2_get_ctxmenu_history_tmp(gwin);
if(direction == AMI_CTXMENU_HISTORY_FORWARD) id += 10;
- if(gwin->temp >= 10) return false;
+ if(ami_gui2_get_ctxmenu_history_tmp(gwin) >= 10) return false;
ctxmenu_item_hook[id].h_Entry = (HOOKFUNC)ami_ctxmenu_item_history;
ctxmenu_item_hook[id].h_Data = (APTR)entry;
- history_root = (Object *)IDoMethod(gwin->history_ctxmenu[direction], MM_FINDID, 0, AMI_CTX_ID_HISTORY);
+ history_root = (Object *)IDoMethod(ami_gui2_get_ctxmenu_history(gwin, direction), MM_FINDID, 0, AMI_CTX_ID_HISTORY);
IDoMethod(history_root, OM_ADDMEMBER, MStrip,
MA_Type, T_ITEM,
+ /* TODO: MA_Label should be in local charset */
MA_Label, browser_window_history_entry_get_title(entry),
MA_ID, id,
MA_Image, NULL,
MA_UserData, &ctxmenu_item_hook[id],
MEnd);
- gwin->temp++;
+ ami_gui2_set_ctxmenu_history_tmp(gwin, ami_gui2_get_ctxmenu_history_tmp(gwin) + 1);
return true;
}
@@ -542,11 +544,11 @@ struct Menu *ami_ctxmenu_history_create(int direction, struct gui_window_2 *gwin
{
Object *obj;
- if(gwin->history_ctxmenu[direction] == NULL) {
+ if(ami_gui2_get_ctxmenu_history(gwin, direction) == NULL) {
if(ctxmenu_item_label[AMI_CTX_ID_HISTORY] == NULL)
ctxmenu_item_label[AMI_CTX_ID_HISTORY] = ami_utf8_easy(messages_get("History"));
- gwin->history_ctxmenu[direction] = MStrip,
+ obj = MStrip,
MA_Type, T_ROOT,
MA_AddChild, MStrip,
MA_Type, T_MENU,
@@ -556,23 +558,26 @@ struct Menu *ami_ctxmenu_history_create(int direction, struct gui_window_2 *gwin
//MA_FreeImage, FALSE,
MEnd,
MEnd;
+
+ ami_gui2_set_ctxmenu_history(gwin, direction, obj);
+
} else {
for (int i = 0; i < 20; i++) {
- obj = (Object *)IDoMethod(gwin->history_ctxmenu[direction],
+ obj = (Object *)IDoMethod(ami_gui2_get_ctxmenu_history(gwin, direction),
MM_FINDID, 0, AMI_CTX_ID_HISTORY0 + i);
- if(obj != NULL) IDoMethod(gwin->history_ctxmenu[direction], OM_REMMEMBER, obj);
+ if(obj != NULL) IDoMethod(ami_gui2_get_ctxmenu_history(gwin, direction), OM_REMMEMBER, obj);
}
- gwin->temp = 0;
+ ami_gui2_set_ctxmenu_history_tmp(gwin, 0);
if(direction == AMI_CTXMENU_HISTORY_BACK) {
- browser_window_history_enumerate_back(gwin->gw->bw, ami_ctxmenu_history_back, gwin);
+ browser_window_history_enumerate_back(ami_gui2_get_browser_window(gwin), ami_ctxmenu_history_back, gwin);
} else {
- browser_window_history_enumerate_forward(gwin->gw->bw, ami_ctxmenu_history_forward, gwin);
+ browser_window_history_enumerate_forward(ami_gui2_get_browser_window(gwin), ami_ctxmenu_history_forward, gwin);
}
}
- return (struct Menu *)gwin->history_ctxmenu[direction];
+ return (struct Menu *)ami_gui2_get_ctxmenu_history(gwin, direction);
}
@@ -581,13 +586,16 @@ struct Menu *ami_ctxmenu_history_create(int direction, struct gui_window_2 *gwin
**************************/
/** Exported interface documented in ctxmenu.h **/
-struct Menu *ami_ctxmenu_clicktab_create(struct gui_window_2 *gwin)
+struct Menu *ami_ctxmenu_clicktab_create(struct gui_window_2 *gwin, Object **clicktab_obj)
{
Object *root_menu;
+ Object *clicktab;
- if(gwin->clicktab_ctxmenu != NULL) return (struct Menu *)gwin->clicktab_ctxmenu;
+ if(*clicktab_obj != NULL) {
+ return (struct Menu *)*clicktab_obj;
+ }
- gwin->clicktab_ctxmenu = MStrip,
+ clicktab = MStrip,
MA_Type, T_ROOT,
MA_AddChild, root_menu = MStrip,
MA_Type, T_MENU,
@@ -596,10 +604,12 @@ struct Menu *ami_ctxmenu_clicktab_create(struct gui_window_2 *gwin)
MEnd,
MEnd;
+ *clicktab_obj = clicktab;
+
ami_ctxmenu_add_item(root_menu, AMI_CTX_ID_TABNEW, gwin);
ami_ctxmenu_add_item(root_menu, AMI_CTX_ID_TABCLOSE_OTHER, gwin);
- return (struct Menu *)gwin->clicktab_ctxmenu;
+ return (struct Menu *)clicktab;
}
diff --git a/frontends/amiga/ctxmenu.h b/frontends/amiga/ctxmenu.h
index 08a5fe582..76beff5b0 100644
--- a/frontends/amiga/ctxmenu.h
+++ b/frontends/amiga/ctxmenu.h
@@ -75,10 +75,11 @@ struct Menu *ami_ctxmenu_history_create(int direction, struct gui_window_2 *gwin
* Create ClickTab context menu
*
* \param gwin struct gui_window_2 *
- * \returns pointer to menu (for convenience, is also stored in gwin structure)
+ * \param clicktab_obj ptr to memory to hold clicktab menu object
+ * \returns pointer to menu (for convenience)
* The returned pointer MUST be disposed of with DisposeObject before program exit.
*/
-struct Menu *ami_ctxmenu_clicktab_create(struct gui_window_2 *gwin);
+struct Menu *ami_ctxmenu_clicktab_create(struct gui_window_2 *gwin, Object **clicktab_obj);
#else //__amigaos4__
inline void ami_ctxmenu_init(void) {}
@@ -86,7 +87,7 @@ inline void ami_ctxmenu_free(void) {}
inline struct Hook *ami_ctxmenu_get_hook(APTR data) {return NULL;}
inline void ami_ctxmenu_release_hook(struct Hook *hook) {}
inline struct Menu *ami_ctxmenu_history_create(int direction, struct gui_window_2 *gwin) {return NULL;}
-inline struct Menu *ami_ctxmenu_clicktab_create(struct gui_window_2 *gwin) {return NULL;}
+inline struct Menu *ami_ctxmenu_clicktab_create(struct gui_window_2 *gwin, Object **clicktab_obj) {return NULL;}
#endif //__amigaos4__
#endif //AMIGA_CTXMENU_H
diff --git a/frontends/amiga/dist/Rexx/YT_download_page.nsrx b/frontends/amiga/dist/Rexx/YT_download_page.nsrx
new file mode 100644
index 000000000..fdc06923d
--- /dev/null
+++ b/frontends/amiga/dist/Rexx/YT_download_page.nsrx
@@ -0,0 +1,21 @@
+/* YT play.nsrx by Chris Handley
+ This script shows download links for a YouTube video using YT (OS4Depot:video/misc/yt.lha)
+*/
+
+options results
+
+if ~open('yt','AppDir:YT','R') then do
+ GETSCREENNAME
+ address command 'requestchoice >NIL: "NetSurf" "YT must be installed for this script to function.*n*nIt can be downloaded from OS4Depot:video/misc/yt" "OK" PubScreen='||result
+ OPEN 'http://os4depot.net/?function=showfile&file=video/misc/yt.lha' NEWTAB ACTIVE /* This doesn't work due to a NetSurf(?) bug */
+ exit
+end
+close('yt')
+
+GETURL
+/*address command 'requestchoice >NIL: "TEST" "'||result||'" "OK"'*/
+address command 'AppDir:YT <>CON:0/30/640/256/YT/AUTO/CLOSE "'||result||'" html silent'
+
+/* Hack to activate the newest tab */
+OPEN 'file:///RAM:' NEWTAB ACTIVE
+CLOSE
diff --git a/frontends/amiga/dist/Rexx/YT_open.nsrx b/frontends/amiga/dist/Rexx/YT_open.nsrx
new file mode 100644
index 000000000..4454f0c29
--- /dev/null
+++ b/frontends/amiga/dist/Rexx/YT_open.nsrx
@@ -0,0 +1,21 @@
+/* YT play.nsrx by Chris Handley
+ This script opens a YouTube video using YT (OS4Depot:video/misc/yt.lha)
+*/
+
+options results
+
+if ~open('yt','AppDir:YT','R') then do
+ GETSCREENNAME
+ address command 'requestchoice >NIL: "NetSurf" "YT must be installed for this script to function.*n*nIt can be downloaded from OS4Depot:video/misc/yt" "OK" PubScreen='||result
+ OPEN 'http://os4depot.net/?function=showfile&file=video/misc/yt.lha' NEWTAB ACTIVE /* This doesn't work due to a NetSurf(?) bug */
+ exit
+end
+close('yt')
+
+address COMMAND 'Run >NIL: RequestChoice Title="NetSurf" BODY="When finished with YT, click OK to return to NetSurf" GADGETS="OK" INACTIVE >NIL:' /* Hack to get Workbench to front */
+
+GETURL
+/*address command 'requestchoice >NIL: "TEST" "'||result||'" "OK"'*/
+address command 'AppDir:YT <>CON:0/30/640/256/YT/AUTO/CLOSE "'||result||'"'
+
+/*TOBACK*/ /* ideally we'd bring Workbench to front */
diff --git a/frontends/amiga/dist/Rexx/YT_play.nsrx b/frontends/amiga/dist/Rexx/YT_play.nsrx
new file mode 100644
index 000000000..a8e29162f
--- /dev/null
+++ b/frontends/amiga/dist/Rexx/YT_play.nsrx
@@ -0,0 +1,19 @@
+/* YT play.nsrx by Chris Handley
+ This script auto-plays a YouTube video using YT (OS4Depot:video/misc/yt.lha)
+*/
+
+options results
+
+if ~open('yt','AppDir:YT','R') then do
+ GETSCREENNAME
+ address command 'requestchoice >NIL: "NetSurf" "YT must be installed for this script to function.*n*nIt can be downloaded from OS4Depot:video/misc/yt" "OK" PubScreen='||result
+ OPEN 'http://os4depot.net/?function=showfile&file=video/misc/yt.lha' NEWTAB ACTIVE /* This doesn't work due to a NetSurf(?) bug */
+ exit
+end
+close('yt')
+
+GETURL
+/*address command 'requestchoice >NIL: "TEST" "'||result||'" "OK"'*/
+address command 'AppDir:YT <>CON:0/30/640/256/YT/AUTO/CLOSE "'||result||'" AutoPlay'
+
+/*TOBACK*/ /* ideally we'd bring Workbench to front */
diff --git a/frontends/amiga/download.c b/frontends/amiga/download.c
index 41ff6a689..cb9e99785 100644
--- a/frontends/amiga/download.c
+++ b/frontends/amiga/download.c
@@ -80,10 +80,18 @@
#define APPNOTIFY_StopBackMsg ( TAG_USER + 17 )
#endif
+enum {
+ OID_D_MAIN = 0,
+ GID_D_MAIN,
+ GID_D_STATUS,
+ GID_D_CANCEL,
+ GID_D_LAST
+};
+
struct gui_download_window {
struct ami_generic_window w;
struct Window *win;
- Object *objects[GID_LAST];
+ Object *objects[GID_D_LAST];
BPTR fh;
uint32 size;
uint32 downloaded;
@@ -124,8 +132,8 @@ static struct gui_download_window *gui_download_window_create(download_context *
dw = calloc(1, sizeof(struct gui_download_window));
- if(gui && (!IsListEmpty(&gui->dllist)) && (dw->dln = (struct dlnode *)FindName(&gui->dllist,url)))
- {
+ if(gui && (!IsListEmpty(ami_gui_get_download_list(gui)) &&
+ (dw->dln = (struct dlnode *)FindName(ami_gui_get_download_list(gui), url)))) {
strcpy(dw->fname, dw->dln->filename);
free(dw->dln->node.ln_Name);
dw->dln->node.ln_Name = NULL;
@@ -133,16 +141,16 @@ static struct gui_download_window *gui_download_window_create(download_context *
else
{
if(AslRequestTags(savereq,
- ASLFR_Window, gui->shared->win,
+ ASLFR_Window, ami_gui_get_window(gui),
ASLFR_SleepWindow, TRUE,
ASLFR_TitleText, messages_get("NetSurf"),
- ASLFR_Screen, scrn,
+ ASLFR_Screen, ami_gui_get_screen(),
ASLFR_InitialFile, dl_filename,
TAG_DONE))
{
strlcpy(dw->fname, savereq->fr_Drawer, 1024);
AddPart((STRPTR)&dw->fname,savereq->fr_File,1024);
- if(!ami_download_check_overwrite(dw->fname, gui->shared->win, total_size))
+ if(!ami_download_check_overwrite(dw->fname, ami_gui_get_window(gui), total_size))
{
free(dw);
return NULL;
@@ -158,7 +166,7 @@ static struct gui_download_window *gui_download_window_create(download_context *
if(dl_filename) ami_utf8_free(dl_filename);
dw->size = total_size;
dw->downloaded = 0;
- if(gui) dw->bw = gui->bw;
+ if(gui) dw->bw = ami_gui_get_browser_window(gui);
dw->url = url;
va[0] = (APTR)dw->downloaded;
@@ -183,7 +191,7 @@ static struct gui_download_window *gui_download_window_create(download_context *
APPNOTIFY_StopBackMsg, bkm,
TAG_DONE);
} else {
- dw->objects[OID_MAIN] = WindowObj,
+ dw->objects[OID_D_MAIN] = WindowObj,
WA_ScreenTitle, ami_gui_get_screen_title(),
WA_Title, dw->url,
WA_Activate, TRUE,
@@ -191,15 +199,15 @@ static struct gui_download_window *gui_download_window_create(download_context *
WA_DragBar, TRUE,
WA_CloseGadget, FALSE,
WA_SizeGadget, TRUE,
- WA_PubScreen,scrn,
- WINDOW_SharedPort,sport,
+ WA_PubScreen, ami_gui_get_screen(),
+ WINDOW_SharedPort, ami_gui_get_shared_msgport(),
WINDOW_UserData,dw,
WINDOW_IconifyGadget, FALSE,
WINDOW_LockHeight,TRUE,
WINDOW_Position, WPOS_CENTERSCREEN,
- WINDOW_ParentGroup, dw->objects[GID_MAIN] = LayoutVObj,
- LAYOUT_AddChild, dw->objects[GID_STATUS] = FuelGaugeObj,
- GA_ID,GID_STATUS,
+ WINDOW_ParentGroup, dw->objects[GID_D_MAIN] = LayoutVObj,
+ LAYOUT_AddChild, dw->objects[GID_D_STATUS] = FuelGaugeObj,
+ GA_ID,GID_D_STATUS,
GA_Text,messages_get("amiDownload"),
FUELGAUGE_Min,0,
FUELGAUGE_Max,total_size,
@@ -212,8 +220,8 @@ static struct gui_download_window *gui_download_window_create(download_context *
FuelGaugeEnd,
CHILD_NominalSize,TRUE,
CHILD_WeightedHeight,0,
- LAYOUT_AddChild, dw->objects[GID_CANCEL] = ButtonObj,
- GA_ID,GID_CANCEL,
+ LAYOUT_AddChild, dw->objects[GID_D_CANCEL] = ButtonObj,
+ GA_ID,GID_D_CANCEL,
GA_RelVerify,TRUE,
GA_Text,messages_get("Abort"),
GA_TabCycle,TRUE,
@@ -221,7 +229,7 @@ static struct gui_download_window *gui_download_window_create(download_context *
EndGroup,
EndWindow;
- dw->win = (struct Window *)RA_OpenWindow(dw->objects[OID_MAIN]);
+ dw->win = (struct Window *)RA_OpenWindow(dw->objects[OID_D_MAIN]);
}
dw->ctx = ctx;
@@ -256,7 +264,7 @@ static nserror gui_download_window_data(struct gui_download_window *dw,
APPNOTIFY_Percentage, dw->progress,
TAG_DONE);
} else {
- RefreshSetGadgetAttrs((struct Gadget *)dw->objects[GID_STATUS], dw->win, NULL,
+ RefreshSetGadgetAttrs((struct Gadget *)dw->objects[GID_D_STATUS], dw->win, NULL,
FUELGAUGE_Level, dw->downloaded,
GA_Text, messages_get("amiDownload"),
FUELGAUGE_VarArgs, va,
@@ -271,7 +279,7 @@ static nserror gui_download_window_data(struct gui_download_window *dw,
APPNOTIFY_Percentage, 100,
TAG_DONE);
} else {
- RefreshSetGadgetAttrs((struct Gadget *)dw->objects[GID_STATUS], dw->win, NULL,
+ RefreshSetGadgetAttrs((struct Gadget *)dw->objects[GID_D_STATUS], dw->win, NULL,
FUELGAUGE_Level, dw->downloaded,
GA_Text, messages_get("amiDownloadU"),
FUELGAUGE_VarArgs, va,
@@ -330,8 +338,8 @@ static void gui_download_window_done(struct gui_download_window *dw)
downloads_in_progress--;
- if(dw->objects[OID_MAIN] != NULL) {
- DisposeObject(dw->objects[OID_MAIN]);
+ if(dw->objects[OID_D_MAIN] != NULL) {
+ DisposeObject(dw->objects[OID_D_MAIN]);
}
ami_gui_win_list_remove(dw);
@@ -378,14 +386,14 @@ static BOOL ami_download_window_event(void *w)
if(dw == NULL) return FALSE; /* We may not have a real window */
- while((result = RA_HandleInput(dw->objects[OID_MAIN], &code)) != WMHI_LASTMSG)
+ while((result = RA_HandleInput(dw->objects[OID_D_MAIN], &code)) != WMHI_LASTMSG)
{
switch(result & WMHI_CLASSMASK) // class
{
case WMHI_GADGETUP:
switch(result & WMHI_GADGETMASK)
{
- case GID_CANCEL:
+ case GID_D_CANCEL:
ami_download_window_abort(dw);
return TRUE;
break;
@@ -426,19 +434,19 @@ gui_window_save_link(struct gui_window *g, nsurl *url, const char *title)
linkname = ASPrintf("Link_to_%s",FilePart(nsurl_access(url)));
if(AslRequestTags(savereq,
- ASLFR_Window, g->shared->win,
+ ASLFR_Window, ami_gui_get_window(g),
ASLFR_SleepWindow, TRUE,
ASLFR_TitleText,messages_get("NetSurf"),
- ASLFR_Screen,scrn,
- ASLFR_InitialFile,linkname,
+ ASLFR_Screen, ami_gui_get_screen(),
+ ASLFR_InitialFile, linkname,
TAG_DONE))
{
strlcpy(fname, savereq->fr_Drawer, 1024);
AddPart(fname,savereq->fr_File,1024);
- ami_set_pointer(g->shared, GUI_POINTER_WAIT, false);
+ ami_set_pointer(ami_gui_get_gui_window_2(g), GUI_POINTER_WAIT, false);
- if(ami_download_check_overwrite(fname, g->shared->win, 0))
+ if(ami_download_check_overwrite(fname, ami_gui_get_window(g), 0))
{
BPTR fh;
@@ -465,7 +473,7 @@ gui_window_save_link(struct gui_window *g, nsurl *url, const char *title)
}
FreeVec(linkname);
}
- ami_reset_pointer(g->shared);
+ ami_reset_pointer(ami_gui_get_gui_window_2(g));
}
return NSERROR_OK;
}
diff --git a/frontends/amiga/drag.c b/frontends/amiga/drag.c
index ec0ee3c6a..907d8f865 100644
--- a/frontends/amiga/drag.c
+++ b/frontends/amiga/drag.c
@@ -24,7 +24,6 @@
#include <proto/intuition.h>
#include <proto/utility.h>
#include <proto/icon.h>
-#include <proto/layers.h>
#include <graphics/blitattr.h>
#include <workbench/icon.h>
@@ -89,7 +88,7 @@ void gui_drag_save_object(struct gui_window *g, struct hlcache_handle *c,
break;
}
- ami_drag_icon_show(g->shared->win, filetype);
+ ami_drag_icon_show(ami_gui_get_window(g), filetype);
drag_save_data = c;
drag_save_gui = g;
@@ -98,7 +97,7 @@ void gui_drag_save_object(struct gui_window *g, struct hlcache_handle *c,
void gui_drag_save_selection(struct gui_window *g, const char *selection)
{
- ami_drag_icon_show(g->shared->win, "ascii");
+ ami_drag_icon_show(ami_gui_get_window(g), "ascii");
ami_autoscroll = true;
drag_save_data = g;
@@ -109,6 +108,7 @@ void ami_drag_save(struct Window *win)
{
ULONG which = WBO_NONE, type;
char path[1025], dpath[1025];
+ struct Screen *scrn = ami_gui_get_screen();
path[0] = 0; /* ensure path is terminated */
@@ -134,7 +134,7 @@ void ami_drag_save(struct Window *win)
{
if(drag_save == GUI_SAVE_TEXT_SELECTION)
ami_drag_selection((struct gui_window *)drag_save_data);
- else DisplayBeep(scrn);
+ else ami_gui_beep();
drag_save = 0;
drag_save_data = NULL;
@@ -143,7 +143,7 @@ void ami_drag_save(struct Window *win)
if(path[0] == '\0')
{
- DisplayBeep(scrn);
+ ami_gui_beep();
drag_save = 0;
drag_save_data = NULL;
return;
@@ -166,7 +166,7 @@ void ami_drag_save(struct Window *win)
case GUI_SAVE_TEXT_SELECTION: // selection
AddPart(path,"netsurf_text_selection",1024);
struct gui_window *g = (struct gui_window *) drag_save_data;
- ami_file_save(AMINS_SAVE_SELECTION, path, win, NULL, NULL, g->bw);
+ ami_file_save(AMINS_SAVE_SELECTION, path, win, NULL, NULL, ami_gui_get_browser_window(g));
break;
case GUI_SAVE_COMPLETE:
@@ -174,7 +174,7 @@ void ami_drag_save(struct Window *win)
struct hlcache_handle *c = drag_save_data;
AddPart(path, content_get_title(c), 1024);
- ami_file_save(AMINS_SAVE_COMPLETE, path, win, c, drag_save_gui->favicon, NULL);
+ ami_file_save(AMINS_SAVE_COMPLETE, path, win, c, ami_gui_get_favicon(drag_save_gui), NULL);
}
break;
@@ -204,7 +204,7 @@ void ami_drag_icon_show(struct Window *win, const char *type)
struct DiskObject *dobj = NULL;
ULONG width, height;
int deftype = WBPROJECT;
-
+ struct Screen *scrn = ami_gui_get_screen();
drag_in_progress = TRUE;
if(nsoption_bool(drag_save_icons) == false)
@@ -255,6 +255,7 @@ void ami_drag_icon_show(struct Window *win, const char *type)
bool ami_drag_icon_move(void)
{
if(drag_icon == NULL) return FALSE;
+ struct Screen *scrn = ami_gui_get_screen();
ChangeWindowBox(drag_icon, scrn->MouseX - (drag_icon_width / 2),
scrn->MouseY - (drag_icon_height / 2),
@@ -288,44 +289,9 @@ bool ami_drag_has_data(void)
else return false;
}
-static void *ami_find_gwin_by_id(struct Window *win, uint32 type)
-{
- struct nsObject *node, *nnode;
- struct gui_window_2 *gwin;
-
- if(!IsMinListEmpty(window_list))
- {
- node = (struct nsObject *)GetHead((struct List *)window_list);
-
- do
- {
- nnode=(struct nsObject *)GetSucc((struct Node *)node);
-
- if(node->Type == type)
- {
- gwin = node->objstruct;
- if(win == gwin->win) return gwin;
- }
- } while((node = nnode));
- }
- return NULL;
-}
-
-void *ami_window_at_pointer(int type)
-{
- struct Layer *layer;
-
- LockLayerInfo(&scrn->LayerInfo);
-
- layer = WhichLayer(&scrn->LayerInfo, scrn->MouseX, scrn->MouseY);
-
- UnlockLayerInfo(&scrn->LayerInfo);
-
- if(layer) return ami_find_gwin_by_id(layer->Window, type);
- else return NULL;
-}
-
#else
+#include <stddef.h>
+
#include "utils/errors.h"
#include "amiga/drag.h"
@@ -364,10 +330,5 @@ bool ami_drag_has_data(void)
{
return false;
}
-
-void *ami_window_at_pointer(int type)
-{
- return NULL;
-}
#endif
diff --git a/frontends/amiga/drag.h b/frontends/amiga/drag.h
index c0b040f72..1a546682c 100644
--- a/frontends/amiga/drag.h
+++ b/frontends/amiga/drag.h
@@ -35,8 +35,5 @@ void ami_drag_icon_close(struct Window *win);
bool ami_drag_icon_move(void);
BOOL ami_drag_in_progress(void);
bool ami_drag_has_data(void);
-
-void *ami_window_at_pointer(int type);
-
#endif
diff --git a/frontends/amiga/dt_anim.c b/frontends/amiga/dt_anim.c
index bd049206c..1162d7214 100644
--- a/frontends/amiga/dt_anim.c
+++ b/frontends/amiga/dt_anim.c
@@ -40,7 +40,9 @@
#include "netsurf/plotters.h"
#include "netsurf/bitmap.h"
#include "netsurf/content.h"
+#include "content/content.h"
#include "content/content_protected.h"
+#include "content/content_factory.h"
#include "content/llcache.h"
#include "amiga/bitmap.h"
@@ -72,9 +74,9 @@ static void amiga_dt_anim_destroy(struct content *c);
static bool amiga_dt_anim_redraw(struct content *c,
struct content_redraw_data *data, const struct rect *clip,
const struct redraw_context *ctx);
-static void amiga_dt_anim_open(struct content *c, struct browser_window *bw,
+static nserror amiga_dt_anim_open(struct content *c, struct browser_window *bw,
struct content *page, struct object_params *params);
-static void amiga_dt_anim_close(struct content *c);
+static nserror amiga_dt_anim_close(struct content *c);
static nserror amiga_dt_anim_clone(const struct content *old, struct content **newc);
static content_type amiga_dt_anim_content_type(void);
@@ -167,15 +169,15 @@ bool amiga_dt_anim_convert(struct content *c)
amiga_dt_anim_content *plugin = (amiga_dt_anim_content *) c;
union content_msg_data msg_data;
int width, height;
- const uint8 *data;
+ const uint8_t *data;
+ size_t size;
UBYTE *bm_buffer;
- ULONG size;
struct BitMapHeader *bmh;
- unsigned int bm_flags = BITMAP_NEW | BITMAP_OPAQUE;
+ unsigned int bm_flags = BITMAP_OPAQUE;
struct adtFrame adt_frame;
APTR clut;
- data = (uint8 *)content__get_source_data(c, &size);
+ data = content__get_source_data(c, &size);
if((plugin->dto = NewDTObject(NULL,
DTA_SourceType, DTST_MEMORY,
@@ -189,7 +191,8 @@ bool amiga_dt_anim_convert(struct content *c)
plugin->bitmap = amiga_bitmap_create(width, height, bm_flags);
if (!plugin->bitmap) {
- msg_data.error = messages_get("NoMemory");
+ msg_data.errordata.errorcode = NSERROR_NOMEM;
+ msg_data.errordata.errormsg = messages_get("NoMemory");
content_broadcast(c, CONTENT_MSG_ERROR, &msg_data);
return false;
}
@@ -287,18 +290,18 @@ bool amiga_dt_anim_redraw(struct content *c,
* \param box box containing c, or 0 if not an object
* \param params object parameters, or 0 if not an object
*/
-void amiga_dt_anim_open(struct content *c, struct browser_window *bw,
+nserror amiga_dt_anim_open(struct content *c, struct browser_window *bw,
struct content *page, struct object_params *params)
{
NSLOG(netsurf, INFO, "amiga_dt_anim_open");
- return;
+ return NSERROR_OK;
}
-void amiga_dt_anim_close(struct content *c)
+nserror amiga_dt_anim_close(struct content *c)
{
NSLOG(netsurf, INFO, "amiga_dt_anim_close");
- return;
+ return NSERROR_OK;
}
void amiga_dt_anim_reformat(struct content *c, int width, int height)
diff --git a/frontends/amiga/dt_picture.c b/frontends/amiga/dt_picture.c
index 88ce1c834..e13790d5c 100644
--- a/frontends/amiga/dt_picture.c
+++ b/frontends/amiga/dt_picture.c
@@ -25,6 +25,7 @@
#include <stdbool.h>
#include <stdlib.h>
+#include <string.h>
#include <proto/datatypes.h>
#include <proto/dos.h>
#include <proto/intuition.h>
@@ -36,7 +37,9 @@
#include "netsurf/plotters.h"
#include "netsurf/bitmap.h"
#include "content/llcache.h"
+#include "content/content.h"
#include "content/content_protected.h"
+#include "content/content_factory.h"
#include "content/handlers/image/image_cache.h"
#include "amiga/bitmap.h"
@@ -131,11 +134,11 @@ nserror amiga_dt_picture_create(const content_handler *handler,
static Object *amiga_dt_picture_newdtobject(struct amiga_dt_picture_content *adt)
{
- const uint8 *data;
- ULONG size;
+ const uint8_t *data;
+ size_t size;
if(adt->dto == NULL) {
- data = (uint8 *)content__get_source_data((struct content *)adt, &size);
+ data = content__get_source_data((struct content *)adt, &size);
adt->dto = NewDTObject(NULL,
DTA_SourceType, DTST_MEMORY,
@@ -152,12 +155,12 @@ static Object *amiga_dt_picture_newdtobject(struct amiga_dt_picture_content *adt
static char *amiga_dt_picture_datatype(struct content *c)
{
- const uint8 *data;
- ULONG size;
+ const uint8_t *data;
+ size_t size;
struct DataType *dt;
char *filetype = NULL;
- data = (uint8 *)content__get_source_data(c, &size);
+ data = content__get_source_data(c, &size);
if((dt = ObtainDataType(DTST_MEMORY, NULL,
DTA_SourceAddress, data,
@@ -184,9 +187,10 @@ static struct bitmap *amiga_dt_picture_cache_convert(struct content *c)
if((dto = amiga_dt_picture_newdtobject(adt)))
{
- bitmap = amiga_bitmap_create(c->width, c->height, BITMAP_NEW);
+ bitmap = amiga_bitmap_create(c->width, c->height, BITMAP_NONE);
if (!bitmap) {
- msg_data.error = messages_get("NoMemory");
+ msg_data.errordata.errorcode = NSERROR_NOMEM;
+ msg_data.errordata.errormsg = messages_get("NoMemory");
content_broadcast(c, CONTENT_MSG_ERROR, &msg_data);
return NULL;
}
@@ -198,7 +202,7 @@ static struct bitmap *amiga_dt_picture_cache_convert(struct content *c)
amiga_bitmap_get_rowstride(bitmap),
0, 0, c->width, c->height);
- amiga_bitmap_set_opaque(bitmap, amiga_bitmap_test_opaque(bitmap));
+ amiga_bitmap_set_opaque(bitmap, bitmap_test_opaque(bitmap));
DisposeDTObject(dto);
adt->dto = NULL;
diff --git a/frontends/amiga/dt_sound.c b/frontends/amiga/dt_sound.c
index e0f48da83..16b4f7c62 100644
--- a/frontends/amiga/dt_sound.c
+++ b/frontends/amiga/dt_sound.c
@@ -23,6 +23,8 @@
#ifdef WITH_AMIGA_DATATYPES
#include "amiga/os3support.h"
+#include <string.h>
+
#include <proto/datatypes.h>
#include <proto/dos.h>
#include <proto/intuition.h>
@@ -33,9 +35,10 @@
#include "utils/messages.h"
#include "netsurf/plotters.h"
#include "netsurf/content.h"
-#include "render/box.h"
+#include "html/box.h"
#include "content/llcache.h"
#include "content/content_protected.h"
+#include "content/content_factory.h"
#include "amiga/filetype.h"
#include "amiga/datatypes.h"
@@ -57,7 +60,7 @@ static void amiga_dt_sound_destroy(struct content *c);
static bool amiga_dt_sound_redraw(struct content *c,
struct content_redraw_data *data, const struct rect *clip,
const struct redraw_context *ctx);
-static void amiga_dt_sound_open(struct content *c, struct browser_window *bw,
+static nserror amiga_dt_sound_open(struct content *c, struct browser_window *bw,
struct content *page, struct object_params *params);
static nserror amiga_dt_sound_clone(const struct content *old, struct content **newc);
static content_type amiga_dt_sound_content_type(void);
@@ -150,10 +153,10 @@ bool amiga_dt_sound_convert(struct content *c)
amiga_dt_sound_content *plugin = (amiga_dt_sound_content *) c;
int width = 50, height = 50;
- const uint8 *data;
- ULONG size;
+ const uint8_t *data;
+ size_t size;
- data = (uint8 *)content__get_source_data(c, &size);
+ data = content__get_source_data(c, &size);
plugin->dto = NewDTObject(NULL,
DTA_SourceType, DTST_MEMORY,
@@ -195,7 +198,7 @@ bool amiga_dt_sound_redraw(struct content *c,
.fill_type = PLOT_OP_TYPE_SOLID,
.fill_colour = 0xffffff,
.stroke_colour = 0x000000,
- .stroke_width = 1,
+ .stroke_width = plot_style_int_to_fixed(1),
};
struct rect rect;
@@ -220,7 +223,7 @@ bool amiga_dt_sound_redraw(struct content *c,
}
-void amiga_dt_sound_open(struct content *c, struct browser_window *bw,
+nserror amiga_dt_sound_open(struct content *c, struct browser_window *bw,
struct content *page, struct object_params *params)
{
amiga_dt_sound_content *plugin = (amiga_dt_sound_content *) c;
@@ -247,7 +250,7 @@ void amiga_dt_sound_open(struct content *c, struct browser_window *bw,
if(plugin->dto && (plugin->immediate == true))
amiga_dt_sound_play(plugin->dto);
- return;
+ return NSERROR_OK;
}
diff --git a/frontends/amiga/file.c b/frontends/amiga/file.c
index 0fd43781d..79acb1a21 100644
--- a/frontends/amiga/file.c
+++ b/frontends/amiga/file.c
@@ -22,6 +22,8 @@
#include <proto/icon.h>
#include <workbench/icon.h>
+#include <string.h>
+
#include "utils/utils.h"
#include "utils/nsoption.h"
#include "utils/file.h"
@@ -29,6 +31,7 @@
#include "utils/nsurl.h"
#include "netsurf/browser_window.h"
#include "netsurf/content.h"
+#include "content/content_factory.h"
#include "desktop/save_complete.h"
#include "desktop/save_pdf.h"
#include "desktop/save_text.h"
@@ -84,9 +87,9 @@ void ami_file_open(struct gui_window_2 *gwin)
if(AslRequestTags(filereq,
ASLFR_TitleText, messages_get("NetSurf"),
- ASLFR_Window, gwin->win,
+ ASLFR_Window, ami_gui2_get_window(gwin),
ASLFR_SleepWindow, TRUE,
- ASLFR_Screen, scrn,
+ ASLFR_Screen, ami_gui_get_screen(),
ASLFR_DoSaveMode, FALSE,
ASLFR_RejectIcons, TRUE,
ASLFR_FilterFunc, &aslhookfunc,
@@ -100,7 +103,7 @@ void ami_file_open(struct gui_window_2 *gwin)
if (netsurf_path_to_nsurl(temp, &url) != NSERROR_OK) {
amiga_warn_user("NoMemory", 0);
} else {
- browser_window_navigate(gwin->gw->bw,
+ browser_window_navigate(ami_gui2_get_browser_window(gwin),
url,
NULL,
BW_NAVIGATE_HISTORY,
@@ -146,8 +149,9 @@ void ami_file_save(int type, char *fname, struct Window *win,
struct browser_window *bw)
{
BPTR lock, fh;
- const char *source_data;
- ULONG source_size;
+ const uint8_t *source_data;
+ char *selection;
+ size_t source_size;
struct bitmap *bm;
ami_update_pointer(win, GUI_POINTER_WAIT);
@@ -155,7 +159,8 @@ void ami_file_save(int type, char *fname, struct Window *win,
if(ami_download_check_overwrite(fname, win, 0)) {
switch(type) {
case AMINS_SAVE_SOURCE:
- if((source_data = content_get_source_data(object, &source_size))) {
+ source_data = content_get_source_data(object, &source_size);
+ if(source_data) {
BPTR fh;
if((fh = FOpen(fname, MODE_NEWFILE,0))) {
FWrite(fh, source_data, 1, source_size);
@@ -197,12 +202,17 @@ void ami_file_save(int type, char *fname, struct Window *win,
break;
case AMINS_SAVE_SELECTION:
- if((source_data = browser_window_get_selection(bw))) {
- if((fh = FOpen(fname, MODE_NEWFILE,0))) {
- FWrite(fh, source_data, 1, strlen(source_data));
+ selection = browser_window_get_selection(bw);
+ if(selection) {
+ fh = FOpen(fname, MODE_NEWFILE,0);
+ if (fh) {
+ FWrite(fh,
+ selection,
+ 1,
+ strlen(selection));
FClose(fh);
}
- free((void *)source_data);
+ free(selection);
}
break;
}
@@ -250,17 +260,18 @@ void ami_file_save_req(int type, struct gui_window_2 *gwin,
}
if(AslRequestTags(savereq,
- ASLFR_Window, gwin->win,
+ ASLFR_Window, ami_gui2_get_window(gwin),
ASLFR_SleepWindow, TRUE,
ASLFR_TitleText, messages_get("NetSurf"),
- ASLFR_Screen, scrn,
+ ASLFR_Screen, ami_gui_get_screen(),
ASLFR_InitialFile, fname_with_ext ? fname_with_ext : "",
TAG_DONE))
{
strlcpy(fname, savereq->fr_Drawer, 1024);
AddPart(fname, savereq->fr_File, 1024);
- ami_file_save(type, fname, gwin->win, object, gwin->gw->favicon, gwin->gw->bw);
+ ami_file_save(type, fname, ami_gui2_get_window(gwin), object,
+ ami_gui_get_favicon(ami_gui2_get_gui_window(gwin)), ami_gui2_get_browser_window(gwin));
}
if(fname) free(fname);
diff --git a/frontends/amiga/font.c b/frontends/amiga/font.c
index 63172623f..65e791416 100644
--- a/frontends/amiga/font.c
+++ b/frontends/amiga/font.c
@@ -24,7 +24,7 @@
#include "utils/log.h"
#include "utils/nsoption.h"
-#include "netsurf/browser_window.h"
+#include "netsurf/browser.h"
#include "netsurf/layout.h"
#include "amiga/font.h"
@@ -37,7 +37,7 @@ static ULONG ami_xdpi = 72;
ULONG ami_font_dpi_get_devicedpi(void)
{
- return ami_devicedpi;
+ return (ami_xdpi << 16) | ami_devicedpi;
}
ULONG ami_font_dpi_get_xdpi(void)
diff --git a/frontends/amiga/font_bullet.c b/frontends/amiga/font_bullet.c
index c8ad34c04..43f7b9488 100644
--- a/frontends/amiga/font_bullet.c
+++ b/frontends/amiga/font_bullet.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2008 - 2016 Chris Young <chris@unsatisfactorysoftware.co.uk>
+ * Copyright 2008 - 2019 Chris Young <chris@unsatisfactorysoftware.co.uk>
*
* This file is part of NetSurf, http://www.netsurf-browser.org/
*
@@ -63,7 +63,7 @@
#define NSA_VALUE_SHEARSIN (1 << 14)
#define NSA_VALUE_SHEARCOS (1 << 16)
-#define NSA_FONT_EMWIDTH(s) (s / FONT_SIZE_SCALE) * (ami_font_dpi_get_xdpi() / 72.0)
+#define NSA_FONT_EMWIDTH(s) (s / PLOT_STYLE_SCALE) * (ami_font_dpi_get_xdpi() / 72.0)
const uint16 sc_table[] = {
0x0061, 0x1D00, /* a */
@@ -82,7 +82,7 @@ const uint16 sc_table[] = {
0x006E, 0x0274, /* n */
0x006F, 0x1D0F, /* o */
0x0070, 0x1D18, /* p */
- 0x0071, 0xA7EE, /* q (proposed) (Adobe codepoint 0xF771) */
+ 0x0071, 0xA7AF, /* q */
0x0072, 0x0280, /* r */
0x0073, 0xA731, /* s */
0x0074, 0x1D1B, /* t */
@@ -169,7 +169,9 @@ static nserror amiga_nsfont_width(const plot_font_style_t *fstyle,
{
*width = ami_font_unicode_width(string, length, fstyle, 0, 0, false);
- if(*width <= 0) *width == length; // fudge
+ if(*width <= 0) {
+ *width = length; /* fudge */
+ }
return NSERROR_OK;
}
@@ -347,6 +349,11 @@ static nserror amiga_nsfont_split(const plot_font_style_t *fstyle,
*/
static struct ami_font_cache_node *ami_font_open(const char *font, bool critical)
{
+ if(font == NULL) {
+ NSLOG(netsurf, INFO, "Requested NULL font");
+ return NULL;
+ }
+
struct ami_font_cache_node *nodedata = ami_font_cache_locate(font);
if(nodedata) return nodedata;
@@ -512,7 +519,7 @@ static struct OutlineFont *ami_open_outline_font(const plot_font_style_t *fstyle
}
/* Scale to 16.16 fixed point */
- ysize = fstyle->size * ((1 << 16) / FONT_SIZE_SCALE);
+ ysize = fstyle->size * ((1 << 16) / PLOT_STYLE_SCALE);
if(designed_node == NULL) {
ofont = node->font;
@@ -547,6 +554,7 @@ static inline int32 ami_font_plot_glyph(struct OutlineFont *ofont, struct RastPo
FIXED kern = 0;
ULONG glyphmaptag;
ULONG template_type;
+ bool skip_c2 = false;
uint32 long_char_1 = 0, long_char_2 = 0;
#ifndef __amigaos4__
struct BulletBase *BulletBase = ofont->BulletBase;
@@ -564,6 +572,8 @@ static inline int32 ami_font_plot_glyph(struct OutlineFont *ofont, struct RastPo
}
#endif
+ if (*char2 < 0x0020) skip_c2 = true;
+
#ifdef __amigaos4__
if(__builtin_expect(aa == true, 1)) {
glyphmaptag = OT_GlyphMap8Bit;
@@ -626,7 +636,7 @@ static inline int32 ami_font_plot_glyph(struct OutlineFont *ofont, struct RastPo
kern = 0;
- if(*char2) EObtainInfo(AMI_OFONT_ENGINE,
+ if((*char2) && (!skip_c2)) EObtainInfo(AMI_OFONT_ENGINE,
OT_TextKernPair, &kern,
TAG_END);
@@ -636,7 +646,7 @@ static inline int32 ami_font_plot_glyph(struct OutlineFont *ofont, struct RastPo
glyphmaptag, glyph,
TAG_END);
- if(*char2) EReleaseInfo(AMI_OFONT_ENGINE,
+ if((*char2) && (!skip_c2)) EReleaseInfo(AMI_OFONT_ENGINE,
OT_TextKernPair, kern,
TAG_END);
}
diff --git a/frontends/amiga/font_diskfont.c b/frontends/amiga/font_diskfont.c
index 658829237..be1b89194 100644
--- a/frontends/amiga/font_diskfont.c
+++ b/frontends/amiga/font_diskfont.c
@@ -55,7 +55,6 @@ static struct TextFont *ami_font_bm_open(struct RastPort *rp, const plot_font_st
(fstyle->size == prev_fstyle->size) &&
(fstyle->flags == prev_fstyle->flags) &&
(fstyle->weight == prev_fstyle->weight)) {
- NSLOG(netsurf, INFO, "(using current font)");
return prev_font;
}
@@ -98,10 +97,13 @@ static struct TextFont *ami_font_bm_open(struct RastPort *rp, const plot_font_st
snprintf(font, MAX_FONT_NAME_SIZE, "%s.font", fontname);
tattr.ta_Name = font;
- tattr.ta_YSize = fstyle->size / FONT_SIZE_SCALE;
+ tattr.ta_YSize = fstyle->size / PLOT_STYLE_SCALE;
NSLOG(netsurf, INFO, "font: %s/%d", tattr.ta_Name, tattr.ta_YSize);
- if(prev_font != NULL) CloseFont(prev_font);
+ if(prev_font != NULL) {
+ CloseFont(prev_font);
+ prev_font = NULL;
+ }
if((bmfont = OpenDiskFont(&tattr))) {
SetRPAttrs(rp, RPTAG_Font, bmfont, TAG_DONE);
@@ -301,7 +303,14 @@ void ami_font_diskfont_init(void)
void ami_font_diskfont_fini(void)
{
- if(prev_font != NULL) CloseFont(prev_font);
- if(prev_fstyle != NULL) free(prev_fstyle);
+ if(prev_font != NULL) {
+ CloseFont(prev_font);
+ prev_font = NULL;
+ }
+
+ if(prev_fstyle != NULL) {
+ free(prev_fstyle);
+ prev_fstyle = NULL;
+ }
}
diff --git a/frontends/amiga/font_scan.c b/frontends/amiga/font_scan.c
index cb37f97fa..3fa71f737 100644
--- a/frontends/amiga/font_scan.c
+++ b/frontends/amiga/font_scan.c
@@ -114,7 +114,7 @@ static struct ami_font_scan_window *ami_font_scan_gui_open(int32 fonts)
WA_DragBar, TRUE,
WA_CloseGadget, FALSE,
WA_SizeGadget, TRUE,
- WA_PubScreen, scrn,
+ WA_PubScreen, ami_gui_get_screen(),
WA_BusyPointer, TRUE,
WA_Width, 400,
WINDOW_UserData, fsw,
diff --git a/frontends/amiga/gui.c b/frontends/amiga/gui.c
index d88c577ce..8eb34fb92 100644
--- a/frontends/amiga/gui.c
+++ b/frontends/amiga/gui.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2008-2016 Chris Young <chris@unsatisfactorysoftware.co.uk>
+ * Copyright 2008-2020 Chris Young <chris@unsatisfactorysoftware.co.uk>
*
* This file is part of NetSurf, http://www.netsurf-browser.org/
*
@@ -36,10 +36,17 @@
#include <proto/icon.h>
#include <proto/intuition.h>
#include <proto/keymap.h>
+#include <proto/layers.h>
#include <proto/locale.h>
#include <proto/utility.h>
#include <proto/wb.h>
+#ifdef WITH_AMISSL
+/* AmiSSL needs everything to use bsdsocket.library directly to avoid problems */
+#include <proto/bsdsocket.h>
+#define waitselect WaitSelect
+#endif
+
/* Other OS includes */
#include <datatypes/textclass.h>
#include <devices/inputevent.h>
@@ -65,6 +72,7 @@
#include <proto/clicktab.h>
#include <proto/label.h>
#include <proto/layout.h>
+#include <proto/listbrowser.h>
#include <proto/scroller.h>
#include <proto/space.h>
#include <proto/speedbar.h>
@@ -76,6 +84,7 @@
#include <gadgets/chooser.h>
#include <gadgets/clicktab.h>
#include <gadgets/layout.h>
+#include <gadgets/listbrowser.h>
#include <gadgets/scroller.h>
#include <gadgets/space.h>
#include <gadgets/speedbar.h>
@@ -139,11 +148,11 @@
#include "amiga/icon.h"
#include "amiga/launch.h"
#include "amiga/libs.h"
-#include "amiga/login.h"
#include "amiga/memory.h"
#include "amiga/menu.h"
#include "amiga/misc.h"
#include "amiga/nsoption.h"
+#include "amiga/pageinfo.h"
#include "amiga/plotters.h"
#include "amiga/plugin_hack.h"
#include "amiga/print.h"
@@ -152,7 +161,6 @@
#include "amiga/selectmenu.h"
#include "amiga/theme.h"
#include "amiga/utf8.h"
-#include "amiga/sslcert.h"
#define AMINS_SCROLLERPEN NUMDRIPENS
#define NSA_KBD_SCROLL_PX 10
@@ -187,16 +195,137 @@
extern struct gui_utf8_table *amiga_utf8_table;
+enum
+{
+ OID_MAIN = 0,
+ OID_VSCROLL,
+ OID_HSCROLL,
+ GID_MAIN,
+ GID_TABLAYOUT,
+ GID_BROWSER,
+ GID_STATUS,
+ GID_URL,
+ GID_ICON,
+ GID_STOP,
+ GID_RELOAD,
+ GID_HOME,
+ GID_BACK,
+ GID_FORWARD,
+ GID_THROBBER,
+ GID_SEARCH_ICON,
+ GID_PAGEINFO,
+ GID_PAGEINFO_INSECURE_BM,
+ GID_PAGEINFO_INTERNAL_BM,
+ GID_PAGEINFO_LOCAL_BM,
+ GID_PAGEINFO_SECURE_BM,
+ GID_PAGEINFO_WARNING_BM,
+ GID_FAVE,
+ GID_FAVE_ADD,
+ GID_FAVE_RMV,
+ GID_CLOSETAB,
+ GID_CLOSETAB_BM,
+ GID_ADDTAB,
+ GID_ADDTAB_BM,
+ GID_TABS,
+ GID_TABS_FLAG,
+ GID_SEARCHSTRING,
+ GID_TOOLBARLAYOUT,
+ GID_HOTLIST,
+ GID_HOTLISTLAYOUT,
+ GID_HOTLISTSEPBAR,
+ GID_HSCROLL,
+ GID_HSCROLLLAYOUT,
+ GID_VSCROLL,
+ GID_VSCROLLLAYOUT,
+ GID_LOGLAYOUT,
+ GID_LOG,
+ GID_LAST
+};
+
+struct gui_window_2 {
+ struct ami_generic_window w;
+ struct Window *win;
+ Object *restrict objects[GID_LAST];
+ struct gui_window *gw; /* currently-displayed gui_window */
+ bool redraw_required;
+ int throbber_frame;
+ struct List tab_list;
+ ULONG tabs;
+ ULONG next_tab;
+ struct Node *last_new_tab;
+ struct Hook scrollerhook;
+ browser_mouse_state mouse_state;
+ browser_mouse_state key_state;
+ ULONG throbber_update_count;
+ struct find_window *searchwin;
+ ULONG oldh;
+ ULONG oldv;
+ int temp;
+ bool redraw_scroll;
+ bool new_content;
+ struct ami_menu_data *menu_data[AMI_MENU_AREXX_MAX + 1]; /* only for GadTools menus */
+ ULONG hotlist_items;
+ Object *restrict hotlist_toolbar_lab[AMI_GUI_TOOLBAR_MAX];
+ struct List hotlist_toolbar_list;
+ struct List *web_search_list;
+ Object *search_bm;
+ char *restrict svbuffer;
+ char *restrict status;
+ char *restrict wintitle;
+ char *restrict helphints[GID_LAST];
+ browser_mouse_state prev_mouse_state;
+ struct timeval lastclick;
+ struct AppIcon *appicon; /* iconify appicon */
+ struct DiskObject *dobj; /* iconify appicon */
+ struct Hook favicon_hook;
+ struct Hook throbber_hook;
+ struct Hook browser_hook;
+ struct Hook *ctxmenu_hook;
+ Object *restrict history_ctxmenu[2];
+ Object *clicktab_ctxmenu;
+ gui_drag_type drag_op;
+ struct IBox *ptr_lock;
+ struct AppWindow *appwin;
+ struct MinList *shared_pens;
+ gui_pointer_shape mouse_pointer;
+ struct Menu *imenu; /* Intuition menu */
+ bool closed; /* Window has been closed (via menu) */
+};
+
+struct gui_window
+{
+ struct gui_window_2 *shared;
+ int tab;
+ struct Node *tab_node;
+ int c_x; /* Caret X posn */
+ int c_y; /* Caret Y posn */
+ int c_w; /* Caret width */
+ int c_h; /* Caret height */
+ int c_h_temp;
+ int scrollx;
+ int scrolly;
+ struct ami_history_local_window *hw;
+ struct List dllist;
+ struct hlcache_handle *favicon;
+ bool throbbing;
+ char *tabtitle;
+ APTR deferred_rects_pool;
+ struct MinList *deferred_rects;
+ struct browser_window *bw;
+ struct ColumnInfo *logcolumns;
+ struct List loglist;
+};
+
struct ami_gui_tb_userdata {
struct List *sblist;
struct gui_window_2 *gw;
int items;
};
-struct MinList *window_list = NULL;
-struct Screen *scrn = NULL;
-struct MsgPort *sport = NULL;
-struct gui_window *cur_gw = NULL;
+static struct MinList *window_list = NULL;
+static struct Screen *scrn = NULL;
+static struct MsgPort *sport = NULL;
+static struct gui_window *cur_gw = NULL;
static bool ami_quit = false;
@@ -231,17 +360,15 @@ static const __attribute__((used)) char *stack_cookie = "\0$STACK:196608\0";
const char * const versvn;
const char * const verdate;
-void ami_switch_tab(struct gui_window_2 *gwin, bool redraw);
-void ami_change_tab(struct gui_window_2 *gwin, int direction);
-void ami_get_hscroll_pos(struct gui_window_2 *gwin, ULONG *xs);
-void ami_get_vscroll_pos(struct gui_window_2 *gwin, ULONG *ys);
-void ami_quit_netsurf_delayed(void);
-Object *ami_gui_splash_open(void);
-void ami_gui_splash_close(Object *win_obj);
-HOOKF(uint32, ami_set_favicon_render_hook, APTR, space, struct gpRender *);
-HOOKF(uint32, ami_set_throbber_render_hook, APTR, space, struct gpRender *);
-bool ami_gui_map_filename(char **remapped, const char *restrict path, const char *restrict file,
- const char *restrict map);
+static void ami_switch_tab(struct gui_window_2 *gwin, bool redraw);
+static void ami_change_tab(struct gui_window_2 *gwin, int direction);
+static void ami_get_hscroll_pos(struct gui_window_2 *gwin, ULONG *xs);
+static void ami_get_vscroll_pos(struct gui_window_2 *gwin, ULONG *ys);
+static void ami_quit_netsurf_delayed(void);
+static Object *ami_gui_splash_open(void);
+static void ami_gui_splash_close(Object *win_obj);
+static bool ami_gui_map_filename(char **remapped, const char *restrict path,
+ const char *restrict file, const char *restrict map);
static void ami_gui_window_update_box_deferred(struct gui_window *g, bool draw);
static void ami_do_redraw(struct gui_window_2 *g);
static void ami_schedule_redraw_remove(struct gui_window_2 *gwin);
@@ -250,8 +377,10 @@ static bool gui_window_get_scroll(struct gui_window *g, int *restrict sx, int *r
static nserror gui_window_set_scroll(struct gui_window *g, const struct rect *rect);
static void gui_window_remove_caret(struct gui_window *g);
static void gui_window_place_caret(struct gui_window *g, int x, int y, int height, const struct rect *clip);
-//static void amiga_window_invalidate_area(struct gui_window *g, const struct rect *restrict rect);
+HOOKF(uint32, ami_set_favicon_render_hook, APTR, space, struct gpRender *);
+HOOKF(uint32, ami_set_throbber_render_hook, APTR, space, struct gpRender *);
+HOOKF(uint32, ami_gui_browser_render_hook, APTR, space, struct gpRender *);
/* accessors for default options - user option is updated if it is set as per default */
#define nsoption_default_set_int(OPTION, VALUE) \
@@ -259,6 +388,315 @@ static void gui_window_place_caret(struct gui_window *g, int x, int y, int heigh
nsoptions[NSOPTION_##OPTION].value.i = VALUE; \
nsoptions_default[NSOPTION_##OPTION].value.i = VALUE
+/* Functions documented in gui.h */
+struct MsgPort *ami_gui_get_shared_msgport(void)
+{
+ assert(sport != NULL);
+ return sport;
+}
+
+struct gui_window *ami_gui_get_active_gw(void)
+{
+ return cur_gw;
+}
+
+struct Screen *ami_gui_get_screen(void)
+{
+ return scrn;
+}
+
+struct MinList *ami_gui_get_window_list(void)
+{
+ assert(window_list != NULL);
+ return window_list;
+}
+
+void ami_gui_beep(void)
+{
+ DisplayBeep(scrn);
+}
+
+struct browser_window *ami_gui_get_browser_window(struct gui_window *gw)
+{
+ assert(gw != NULL);
+ return gw->bw;
+}
+
+struct browser_window *ami_gui2_get_browser_window(struct gui_window_2 *gwin)
+{
+ assert(gwin != NULL);
+ return ami_gui_get_browser_window(gwin->gw);
+}
+
+struct List *ami_gui_get_download_list(struct gui_window *gw)
+{
+ assert(gw != NULL);
+ return &gw->dllist;
+}
+
+struct gui_window_2 *ami_gui_get_gui_window_2(struct gui_window *gw)
+{
+ assert(gw != NULL);
+ return gw->shared;
+}
+
+struct gui_window *ami_gui2_get_gui_window(struct gui_window_2 *gwin)
+{
+ assert(gwin != NULL);
+ return gwin->gw;
+}
+
+const char *ami_gui_get_win_title(struct gui_window *gw)
+{
+ assert(gw != NULL);
+ assert(gw->shared != NULL);
+ return (const char *)gw->shared->wintitle;
+}
+
+const char *ami_gui_get_tab_title(struct gui_window *gw)
+{
+ assert(gw != NULL);
+ return (const char *)gw->tabtitle;
+}
+
+struct Node *ami_gui_get_tab_node(struct gui_window *gw)
+{
+ assert(gw != NULL);
+ return gw->tab_node;
+}
+
+ULONG ami_gui2_get_tabs(struct gui_window_2 *gwin)
+{
+ assert(gwin != NULL);
+ return gwin->tabs;
+}
+
+struct List *ami_gui2_get_tab_list(struct gui_window_2 *gwin)
+{
+ assert(gwin != NULL);
+ return &gwin->tab_list;
+}
+
+struct hlcache_handle *ami_gui_get_favicon(struct gui_window *gw)
+{
+ assert(gw != NULL);
+ return gw->favicon;
+}
+
+struct ami_history_local_window *ami_gui_get_history_window(struct gui_window *gw)
+{
+ assert(gw != NULL);
+ return gw->hw;
+}
+
+void ami_gui_set_history_window(struct gui_window *gw, struct ami_history_local_window *hw)
+{
+ assert(gw != NULL);
+ gw->hw = hw;
+}
+
+void ami_gui_set_find_window(struct gui_window *gw, struct find_window *fw)
+{
+ /* This needs to be in gui_window_2 as it is shared amongst tabs (I think),
+ * it just happens that the find code only knows of the gui_window
+ */
+ assert(gw != NULL);
+ assert(gw->shared != NULL);
+ gw->shared->searchwin = fw;
+}
+
+bool ami_gui_get_throbbing(struct gui_window *gw)
+{
+ assert(gw != NULL);
+ return gw->throbbing;
+}
+
+void ami_gui_set_throbbing(struct gui_window *gw, bool throbbing)
+{
+ assert(gw != NULL);
+ gw->throbbing = throbbing;
+}
+
+int ami_gui_get_throbber_frame(struct gui_window *gw)
+{
+ assert(gw != NULL);
+ assert(gw->shared != NULL);
+ return gw->shared->throbber_frame;
+}
+
+void ami_gui_set_throbber_frame(struct gui_window *gw, int frame)
+{
+ assert(gw != NULL);
+ assert(gw->shared != NULL);
+ gw->shared->throbber_frame = frame;
+}
+
+Object *ami_gui2_get_object(struct gui_window_2 *gwin, int object_type)
+{
+ ULONG obj = 0;
+
+ assert(gwin != NULL);
+
+ switch(object_type) {
+ case AMI_WIN_MAIN:
+ obj = OID_MAIN;
+ break;
+
+ case AMI_GAD_THROBBER:
+ obj = GID_THROBBER;
+ break;
+
+ case AMI_GAD_TABS:
+ obj = GID_TABS;
+ break;
+
+ case AMI_GAD_URL:
+ obj = GID_URL;
+ break;
+
+ case AMI_GAD_SEARCH:
+ obj = GID_SEARCHSTRING;
+ break;
+
+ default:
+ return NULL;
+ break;
+ }
+
+ return gwin->objects[obj];
+}
+
+
+struct Window *ami_gui2_get_window(struct gui_window_2 *gwin)
+{
+ assert(gwin != NULL);
+ return gwin->win;
+}
+
+struct Window *ami_gui_get_window(struct gui_window *gw)
+{
+ assert(gw != NULL);
+ return ami_gui2_get_window(gw->shared);
+}
+
+struct Menu *ami_gui_get_menu(struct gui_window *gw)
+{
+ assert(gw != NULL);
+ assert(gw->shared != NULL);
+ return gw->shared->imenu;
+}
+
+void ami_gui2_set_menu(struct gui_window_2 *gwin, struct Menu *menu)
+{
+ if(menu != NULL) {
+ gwin->imenu = menu;
+ } else {
+ ami_gui_menu_freemenus(gwin->imenu, gwin->menu_data);
+ }
+}
+
+struct ami_menu_data **ami_gui2_get_menu_data(struct gui_window_2 *gwin)
+{
+ assert(gwin != NULL);
+ return gwin->menu_data;
+}
+
+void ami_gui2_set_ctxmenu_history_tmp(struct gui_window_2 *gwin, int temp)
+{
+ assert(gwin != NULL);
+ gwin->temp = temp;
+}
+
+int ami_gui2_get_ctxmenu_history_tmp(struct gui_window_2 *gwin)
+{
+ assert(gwin != NULL);
+ return gwin->temp;
+}
+
+Object *ami_gui2_get_ctxmenu_history(struct gui_window_2 *gwin, ULONG direction)
+{
+ assert(gwin != NULL);
+ return gwin->history_ctxmenu[direction];
+}
+
+void ami_gui2_set_ctxmenu_history(struct gui_window_2 *gwin, ULONG direction, Object *ctx_hist)
+{
+ assert(gwin != NULL);
+ gwin->history_ctxmenu[direction] = ctx_hist;
+}
+
+void ami_gui2_set_closed(struct gui_window_2 *gwin, bool closed)
+{
+ assert(gwin != NULL);
+ gwin->closed = closed;
+}
+
+void ami_gui2_set_new_content(struct gui_window_2 *gwin, bool new_content)
+{
+ assert(gwin != NULL);
+ gwin->new_content = new_content;
+}
+
+/** undocumented, or internal, or documented elsewhere **/
+
+#ifdef __amigaos4__
+static void *ami_find_gwin_by_id(struct Window *win, uint32 type)
+{
+ struct nsObject *node, *nnode;
+ struct gui_window_2 *gwin;
+
+ if(!IsMinListEmpty(window_list))
+ {
+ node = (struct nsObject *)GetHead((struct List *)window_list);
+
+ do
+ {
+ nnode=(struct nsObject *)GetSucc((struct Node *)node);
+
+ if(node->Type == type)
+ {
+ gwin = node->objstruct;
+ if(win == ami_gui2_get_window(gwin)) return gwin;
+ }
+ } while((node = nnode));
+ }
+ return NULL;
+}
+
+void *ami_window_at_pointer(int type)
+{
+ struct Layer *layer;
+ struct Screen *scrn = ami_gui_get_screen();
+
+ LockLayerInfo(&scrn->LayerInfo);
+
+ layer = WhichLayer(&scrn->LayerInfo, scrn->MouseX, scrn->MouseY);
+
+ UnlockLayerInfo(&scrn->LayerInfo);
+
+ if(layer) return ami_find_gwin_by_id(layer->Window, type);
+ else return NULL;
+}
+#else
+/**\todo check if OS4 version of this function will build on OS3, even if it isn't called */
+void *ami_window_at_pointer(int type)
+{
+ return NULL;
+}
+#endif
+
+void ami_set_pointer(struct gui_window_2 *gwin, gui_pointer_shape shape, bool update)
+{
+ if(gwin->mouse_pointer == shape) return;
+ ami_update_pointer(ami_gui2_get_window(gwin), shape);
+ if(update == true) gwin->mouse_pointer = shape;
+}
+
+/* reset the mouse pointer back to what NetSurf last set it as */
+void ami_reset_pointer(struct gui_window_2 *gwin)
+{
+ ami_update_pointer(ami_gui2_get_window(gwin), gwin->mouse_pointer);
+}
STRPTR ami_locale_langs(int *codeset)
@@ -302,7 +740,7 @@ STRPTR ami_locale_langs(int *codeset)
return acceptlangs;
}
-bool ami_gui_map_filename(char **remapped, const char *restrict path,
+static bool ami_gui_map_filename(char **remapped, const char *restrict path,
const char *restrict file, const char *restrict map)
{
BPTR fh = 0;
@@ -657,6 +1095,7 @@ static nserror ami_set_options(struct nsoption_s *defaults)
const char *encname = (const char *)ObtainCharsetInfo(DFCS_NUMBER, codeset,
DFCS_MIMENAME);
nsoption_set_charp(local_charset, strdup(encname));
+ nsoption_set_int(local_codeset, codeset);
#else
nsoption_set_bool(download_notify, false);
nsoption_set_bool(font_antialiasing, false);
@@ -777,25 +1216,10 @@ static void ami_amiupdate(void)
static nsurl *gui_get_resource_url(const char *path)
{
char buf[1024];
- char path2[1024];
nsurl *url = NULL;
if(ami_locate_resource(buf, path) == false)
- {
- if((strncmp(path + strlen(path) - SLEN(".htm"), ".htm", SLEN(".htm")) == 0) ||
- (strncmp(path + strlen(path) - SLEN(".html"), ".html", SLEN(".html")) == 0))
- {
- /* Try with RISC OS HTML filetype, might work */
- strcpy(path2, path);
- strcat(path2, ",faf");
-
- if(ami_locate_resource(buf, path2) == false)
- {
- return NULL;
- }
- }
- else return NULL;
- }
+ return NULL;
netsurf_path_to_nsurl(buf, &url);
@@ -1037,6 +1461,10 @@ static void gui_init2(int argc, char** argv)
(nsoption_bool(startup_no_window) == false))
ami_openscreenfirst();
+ if(cli_force == true) {
+ notalreadyrunning = TRUE;
+ }
+
if(temp_homepage_url && notalreadyrunning) {
error = nsurl_create(temp_homepage_url, &url);
if (error == NSERROR_OK) {
@@ -1054,10 +1482,6 @@ static void gui_init2(int argc, char** argv)
temp_homepage_url = NULL;
}
- if(cli_force == true) {
- notalreadyrunning = TRUE;
- }
-
if(argc == 0) { // WB
struct WBStartup *WBenchMsg = (struct WBStartup *)argv;
struct WBArg *wbarg;
@@ -1359,6 +1783,7 @@ int ami_key_to_nskey(ULONG keycode, struct InputEvent *ie)
case RAWKEY_F8:
case RAWKEY_F9:
case RAWKEY_F10:
+ case RAWKEY_F12:
case RAWKEY_HELP:
// don't translate
nskey = keycode;
@@ -1461,9 +1886,6 @@ static bool ami_spacebox_to_ns_coords(struct gui_window_2 *gwin,
int ns_x = space_x;
int ns_y = space_y;
- ns_x /= gwin->gw->scale;
- ns_y /= gwin->gw->scale;
-
ns_x += gwin->gw->scrollx;
ns_y += gwin->gw->scrolly;
@@ -1506,8 +1928,7 @@ static void ami_gui_scroll_internal(struct gui_window_2 *gwin, int xs, int ys)
if(ami_mouse_to_ns_coords(gwin, &x, &y, -1, -1) == true)
{
- if(browser_window_scroll_at_point(gwin->gw->bw, x, y,
- xs, ys) == false)
+ if(browser_window_scroll_at_point(gwin->gw->bw, x, y, xs, ys) == false)
{
int width, height;
@@ -1589,11 +2010,11 @@ static struct IBox *ami_ns_rect_to_ibox(struct gui_window_2 *gwin, const struct
return NULL;
}
- ibox->Left = gwin->win->MouseX + (rect->x0 * gwin->gw->scale);
- ibox->Top = gwin->win->MouseY + (rect->y0 * gwin->gw->scale);
+ ibox->Left = gwin->win->MouseX + (rect->x0);
+ ibox->Top = gwin->win->MouseY + (rect->y0);
- ibox->Width = (rect->x1 - rect->x0) * gwin->gw->scale;
- ibox->Height = (rect->y1 - rect->y0) * gwin->gw->scale;
+ ibox->Width = (rect->x1 - rect->x0);
+ ibox->Height = (rect->y1 - rect->y0);
if(ibox->Left < bbox->Left) ibox->Left = bbox->Left;
if(ibox->Top < bbox->Top) ibox->Top = bbox->Top;
@@ -1659,18 +2080,20 @@ static void ami_gui_menu_update_all(void)
* \param gw The gui window to measure content area of.
* \param width receives width of window
* \param height receives height of window
- * \param scaled whether to return scaled values
* \return NSERROR_OK on sucess and width and height updated
* else error code.
*/
-static nserror gui_window_get_dimensions(struct gui_window *gw,
- int *restrict width, int *restrict height, bool scaled)
+static nserror
+gui_window_get_dimensions(struct gui_window *gw,
+ int *restrict width,
+ int *restrict height)
{
struct IBox *bbox;
nserror res;
- res = ami_gui_get_space_box((Object *)gw->shared->objects[GID_BROWSER], &bbox);
- if(res != NSERROR_OK) {
+ res = ami_gui_get_space_box((Object *)gw->shared->objects[GID_BROWSER],
+ &bbox);
+ if (res != NSERROR_OK) {
amiga_warn_user("NoMemory", "");
return res;
}
@@ -1680,11 +2103,6 @@ static nserror gui_window_get_dimensions(struct gui_window *gw,
ami_gui_free_space_box(bbox);
- if(scaled) {
- *width /= gw->scale;
- *height /= gw->scale;
- }
-
return NSERROR_OK;
}
@@ -1801,7 +2219,7 @@ static void ami_gui_scroller_update(struct gui_window_2 *gwin)
rethinkh = ami_gui_hscroll_remove(gwin);
} else {
if((browser_window_get_extents(gwin->gw->bw, false, &w, &h) == NSERROR_OK)) {
- gui_window_get_dimensions(gwin->gw, &ww, &wh, false);
+ gui_window_get_dimensions(gwin->gw, &ww, &wh);
}
if(vscroll == BW_SCROLLING_NO) {
@@ -1827,6 +2245,217 @@ static void ami_gui_scroller_update(struct gui_window_2 *gwin)
}
}
+/* For future use
+static void ami_gui_console_log_clear(struct gui_window *g)
+{
+ if(g->shared->objects[GID_LOG] != NULL) {
+ SetGadgetAttrs((struct Gadget *)g->shared->objects[GID_LOG], g->shared->win, NULL,
+ LISTBROWSER_Labels, NULL,
+ TAG_DONE);
+ }
+
+ FreeListBrowserList(&g->loglist);
+
+ NewList(&g->loglist);
+
+ if(g->shared->objects[GID_LOG] != NULL) {
+ SetGadgetAttrs((struct Gadget *)g->shared->objects[GID_LOG], g->shared->win, NULL,
+ LISTBROWSER_Labels, &g->loglist,
+ TAG_DONE);
+ }
+}
+*/
+
+static void ami_gui_console_log_add(struct gui_window *g)
+{
+ struct TagItem attrs[2];
+
+ if(g->shared->objects[GID_LOG] != NULL) return;
+
+ attrs[0].ti_Tag = CHILD_MinHeight;
+ attrs[0].ti_Data = 50;
+ attrs[1].ti_Tag = TAG_DONE;
+ attrs[1].ti_Data = 0;
+
+ g->shared->objects[GID_LOG] = ListBrowserObj,
+ GA_ID, GID_LOG,
+ LISTBROWSER_ColumnInfo, g->logcolumns,
+ LISTBROWSER_ColumnTitles, TRUE,
+ LISTBROWSER_Labels, &g->loglist,
+ LISTBROWSER_Striping, LBS_ROWS,
+ ListBrowserEnd;
+
+#ifdef __amigaos4__
+ IDoMethod(g->shared->objects[GID_LOGLAYOUT], LM_ADDCHILD,
+ g->shared->win, g->shared->objects[GID_LOG], NULL);
+#else
+ SetAttrs(g->shared->objects[GID_LOGLAYOUT],
+ LAYOUT_AddChild, g->shared->objects[GID_LOG], TAG_MORE, &attrs);
+#endif
+
+ FlushLayoutDomainCache((struct Gadget *)g->shared->objects[GID_MAIN]);
+
+ RethinkLayout((struct Gadget *)g->shared->objects[GID_MAIN],
+ g->shared->win, NULL, TRUE);
+
+ ami_schedule_redraw(g->shared, true);
+}
+
+static void ami_gui_console_log_remove(struct gui_window *g)
+{
+ if(g->shared->objects[GID_LOG] == NULL) return;
+
+#ifdef __amigaos4__
+ IDoMethod(g->shared->objects[GID_LOGLAYOUT], LM_REMOVECHILD,
+ g->shared->win, g->shared->objects[GID_LOG]);
+#else
+ SetAttrs(g->shared->objects[GID_LOGLAYOUT],
+ LAYOUT_RemoveChild, g->shared->objects[GID_LOG], TAG_DONE);
+#endif
+
+ g->shared->objects[GID_LOG] = NULL;
+
+ FlushLayoutDomainCache((struct Gadget *)g->shared->objects[GID_MAIN]);
+
+ RethinkLayout((struct Gadget *)g->shared->objects[GID_MAIN],
+ g->shared->win, NULL, TRUE);
+
+ ami_schedule_redraw(g->shared, true);
+}
+
+static bool ami_gui_console_log_toggle(struct gui_window *g)
+{
+ if(g->shared->objects[GID_LOG] == NULL) {
+ ami_gui_console_log_add(g);
+ return true;
+ } else {
+ ami_gui_console_log_remove(g);
+ return false;
+ }
+}
+
+static void ami_gui_console_log_switch(struct gui_window *g)
+{
+ if(g->shared->objects[GID_LOG] == NULL) return;
+
+ RefreshSetGadgetAttrs((struct Gadget *)g->shared->objects[GID_LOG], g->shared->win, NULL,
+ LISTBROWSER_ColumnInfo, g->logcolumns,
+ LISTBROWSER_Labels, &g->loglist,
+ TAG_DONE);
+}
+
+static void
+gui_window_console_log(struct gui_window *g,
+ browser_window_console_source src,
+ const char *msg,
+ size_t msglen,
+ browser_window_console_flags flags)
+{
+ bool foldable = !!(flags & BW_CS_FLAG_FOLDABLE);
+ const char *src_text;
+ const char *level_text;
+ struct Node *node;
+ ULONG style = 0;
+ ULONG fgpen = TEXTPEN;
+ ULONG lbflags = LBFLG_READONLY;
+ char timestamp[256];
+ time_t now = time(NULL);
+ struct tm *timedata = localtime(&now);
+
+ strftime(timestamp, 256, "%c", timedata);
+
+ if(foldable) lbflags |= LBFLG_HASCHILDREN;
+
+ switch (src) {
+ case BW_CS_INPUT:
+ src_text = "client-input";
+ break;
+ case BW_CS_SCRIPT_ERROR:
+ src_text = "scripting-error";
+ break;
+ case BW_CS_SCRIPT_CONSOLE:
+ src_text = "scripting-console";
+ break;
+ default:
+ assert(0 && "Unknown scripting source");
+ src_text = "unknown";
+ break;
+ }
+
+ switch (flags & BW_CS_FLAG_LEVEL_MASK) {
+ case BW_CS_FLAG_LEVEL_DEBUG:
+ level_text = "DEBUG";
+ fgpen = DISABLEDTEXTPEN;
+ lbflags |= LBFLG_CUSTOMPENS;
+ break;
+ case BW_CS_FLAG_LEVEL_LOG:
+ level_text = "LOG";
+ fgpen = DISABLEDTEXTPEN;
+ lbflags |= LBFLG_CUSTOMPENS;
+ break;
+ case BW_CS_FLAG_LEVEL_INFO:
+ level_text = "INFO";
+ break;
+ case BW_CS_FLAG_LEVEL_WARN:
+ level_text = "WARN";
+ break;
+ case BW_CS_FLAG_LEVEL_ERROR:
+ level_text = "ERROR";
+ style = FSF_BOLD;
+ break;
+ default:
+ assert(0 && "Unknown console logging level");
+ level_text = "unknown";
+ break;
+ }
+
+ if(g->shared->objects[GID_LOG] != NULL) {
+ SetGadgetAttrs((struct Gadget *)g->shared->objects[GID_LOG], g->shared->win, NULL,
+ LISTBROWSER_Labels, NULL,
+ TAG_DONE);
+ }
+
+ /* Add log entry to list irrespective of whether the log is open. */
+ if((node = AllocListBrowserNode(4,
+ LBNA_Flags, lbflags,
+ LBNA_Column, 0,
+ LBNCA_SoftStyle, style,
+ LBNCA_FGPen, fgpen,
+ LBNCA_CopyText, TRUE,
+ LBNCA_Text, timestamp,
+ LBNA_Column, 1,
+ LBNCA_SoftStyle, style,
+ LBNCA_FGPen, fgpen,
+ LBNCA_CopyText, TRUE,
+ LBNCA_Text, src_text,
+ LBNA_Column, 2,
+ LBNCA_SoftStyle, style,
+ LBNCA_FGPen, fgpen,
+ LBNCA_CopyText, TRUE,
+ LBNCA_Text, level_text,
+ LBNA_Column, 3,
+ LBNCA_SoftStyle, style,
+ LBNCA_FGPen, fgpen,
+ LBNCA_CopyText, TRUE,
+ LBNCA_Text, msg,
+ TAG_DONE))) {
+ AddTail(&g->loglist, node);
+ }
+
+ if(g->shared->objects[GID_LOG] != NULL) {
+ RefreshSetGadgetAttrs((struct Gadget *)g->shared->objects[GID_LOG], g->shared->win, NULL,
+ LISTBROWSER_Labels, &g->loglist,
+ TAG_DONE);
+ }
+
+#ifdef __amigaos4__
+ DebugPrintF("NETSURF: CONSOLE_LOG SOURCE %s %sFOLDABLE %s %.*s\n",
+ src_text, foldable ? "" : "NOT-", level_text,
+ (int)msglen, msg);
+#endif
+}
+
+
/**
* function to add retrieved favicon to gui
*/
@@ -2027,8 +2656,8 @@ static BOOL ami_gui_event(void *w)
break;
}
- x = (ULONG)((gwin->win->MouseX - bbox->Left) / gwin->gw->scale);
- y = (ULONG)((gwin->win->MouseY - bbox->Top) / gwin->gw->scale);
+ x = (ULONG)((gwin->win->MouseX - bbox->Left));
+ y = (ULONG)((gwin->win->MouseY - bbox->Top));
ami_get_hscroll_pos(gwin, (ULONG *)&xs);
ami_get_vscroll_pos(gwin, (ULONG *)&ys);
@@ -2088,8 +2717,8 @@ static BOOL ami_gui_event(void *w)
return FALSE;
}
- x = (ULONG)((gwin->win->MouseX - bbox->Left) / gwin->gw->scale);
- y = (ULONG)((gwin->win->MouseY - bbox->Top) / gwin->gw->scale);
+ x = (ULONG)(gwin->win->MouseX - bbox->Left);
+ y = (ULONG)(gwin->win->MouseY - bbox->Top);
ami_get_hscroll_pos(gwin, (ULONG *)&xs);
ami_get_vscroll_pos(gwin, (ULONG *)&ys);
@@ -2371,6 +3000,25 @@ static BOOL ami_gui_event(void *w)
ami_gui_history(gwin, false);
break;
+ case GID_PAGEINFO:
+ {
+ ULONG w_top, w_left;
+ ULONG g_top, g_left, g_height;
+
+ GetAttr(WA_Top, gwin->objects[OID_MAIN], &w_top);
+ GetAttr(WA_Left, gwin->objects[OID_MAIN], &w_left);
+ GetAttr(GA_Top, gwin->objects[GID_PAGEINFO], &g_top);
+ GetAttr(GA_Left, gwin->objects[GID_PAGEINFO], &g_left);
+ GetAttr(GA_Height, gwin->objects[GID_PAGEINFO], &g_height);
+
+ if(ami_pageinfo_open(gwin->gw->bw,
+ w_left + g_left,
+ w_top + g_top + g_height) != NSERROR_OK) {
+ NSLOG(netsurf, INFO, "Unable to open page info window");
+ }
+ }
+ break;
+
case GID_FAVE:
GetAttr(STRINGA_TextVal,
(Object *)gwin->objects[GID_URL],
@@ -2493,13 +3141,17 @@ static BOOL ami_gui_event(void *w)
break;
case RAWKEY_F9: // decrease scale
- ami_gui_set_scale(gwin->gw, gwin->gw->scale - 0.1);
+ ami_gui_adjust_scale(gwin->gw, -0.1);
break;
case RAWKEY_F10: // increase scale
- ami_gui_set_scale(gwin->gw, gwin->gw->scale + 0.1);
+ ami_gui_adjust_scale(gwin->gw, +0.1);
break;
+ case RAWKEY_F12: // console log
+ ami_gui_console_log_toggle(gwin->gw);
+ break;
+
case RAWKEY_HELP: // help
ami_help_open(AMI_HELP_GUI, scrn);
break;
@@ -2602,6 +3254,56 @@ static void ami_gui_appicon_remove(struct gui_window_2 *gwin)
}
}
+static nserror gui_page_info_change(struct gui_window *gw)
+{
+ int bm_idx;
+ browser_window_page_info_state pistate;
+ struct gui_window_2 *gwin = ami_gui_get_gui_window_2(gw);
+ struct browser_window *bw = ami_gui_get_browser_window(gw);
+
+ /* if this isn't the visible tab, don't do anything */
+ if((gwin == NULL) || (gwin->gw != gw)) return NSERROR_OK;
+
+ pistate = browser_window_get_page_info_state(bw);
+
+ switch(pistate) {
+ case PAGE_STATE_INTERNAL:
+ bm_idx = GID_PAGEINFO_INTERNAL_BM;
+ break;
+
+ case PAGE_STATE_LOCAL:
+ bm_idx = GID_PAGEINFO_LOCAL_BM;
+ break;
+
+ case PAGE_STATE_INSECURE:
+ bm_idx = GID_PAGEINFO_INSECURE_BM;
+ break;
+
+ case PAGE_STATE_SECURE_OVERRIDE:
+ bm_idx = GID_PAGEINFO_WARNING_BM;
+ break;
+
+ case PAGE_STATE_SECURE_ISSUES:
+ bm_idx = GID_PAGEINFO_WARNING_BM;
+ break;
+
+ case PAGE_STATE_SECURE:
+ bm_idx = GID_PAGEINFO_SECURE_BM;
+ break;
+
+ default:
+ bm_idx = GID_PAGEINFO_INTERNAL_BM;
+ break;
+ }
+
+ RefreshSetGadgetAttrs((struct Gadget *)gwin->objects[GID_PAGEINFO], gwin->win, NULL,
+ BUTTON_RenderImage, gwin->objects[bm_idx],
+ GA_HintInfo, gwin->helphints[bm_idx],
+ TAG_DONE);
+
+ return NSERROR_OK;
+}
+
static void ami_handle_appmsg(void)
{
struct AppMessage *appmsg;
@@ -2873,7 +3575,7 @@ void ami_get_msg(void)
ami_quit_netsurf_delayed();
}
-void ami_change_tab(struct gui_window_2 *gwin, int direction)
+static void ami_change_tab(struct gui_window_2 *gwin, int direction)
{
struct Node *tab_node = gwin->gw->tab_node;
struct Node *ptab = NULL;
@@ -2895,7 +3597,136 @@ void ami_change_tab(struct gui_window_2 *gwin, int direction)
ami_switch_tab(gwin, true);
}
-void ami_switch_tab(struct gui_window_2 *gwin, bool redraw)
+
+static void gui_window_set_title(struct gui_window *g, const char *restrict title)
+{
+ struct Node *node;
+ char *restrict utf8title;
+
+ if(!g) return;
+ if(!title) return;
+
+ utf8title = ami_utf8_easy((char *)title);
+
+ if(g->tab_node) {
+ node = g->tab_node;
+
+ if((g->tabtitle == NULL) || (strcmp(utf8title, g->tabtitle)))
+ {
+ SetGadgetAttrs((struct Gadget *)g->shared->objects[GID_TABS],
+ g->shared->win, NULL,
+ CLICKTAB_Labels, ~0,
+ TAG_DONE);
+
+ if(g->tabtitle) free(g->tabtitle);
+ g->tabtitle = strdup(utf8title);
+
+ SetClickTabNodeAttrs(node, TNA_Text, g->tabtitle,
+ TNA_HintInfo, g->tabtitle,
+ TAG_DONE);
+
+ RefreshSetGadgetAttrs((struct Gadget *)g->shared->objects[GID_TABS],
+ g->shared->win, NULL,
+ CLICKTAB_Labels, &g->shared->tab_list,
+ TAG_DONE);
+
+ if(ClickTabBase->lib_Version < 53)
+ RethinkLayout((struct Gadget *)g->shared->objects[GID_TABLAYOUT],
+ g->shared->win, NULL, TRUE);
+ }
+ }
+
+ if(g == g->shared->gw) {
+ if((g->shared->wintitle == NULL) || (strcmp(utf8title, g->shared->wintitle)))
+ {
+ if(g->shared->wintitle) free(g->shared->wintitle);
+ g->shared->wintitle = strdup(utf8title);
+ SetWindowTitles(g->shared->win, g->shared->wintitle, ami_gui_get_screen_title());
+ }
+ }
+
+ ami_utf8_free(utf8title);
+}
+
+static void gui_window_update_extent(struct gui_window *g)
+{
+ struct IBox *bbox;
+
+ if(!g || !g->bw) return;
+ if(browser_window_has_content(g->bw) == false) return;
+
+ if(g == g->shared->gw) {
+ int width, height;
+ if(ami_gui_get_space_box((Object *)g->shared->objects[GID_BROWSER], &bbox) != NSERROR_OK) {
+ amiga_warn_user("NoMemory", "");
+ return;
+ }
+
+ if(g->shared->objects[GID_VSCROLL]) {
+ browser_window_get_extents(g->bw, true, &width, &height);
+ RefreshSetGadgetAttrs((struct Gadget *)(APTR)g->shared->objects[GID_VSCROLL],g->shared->win,NULL,
+ SCROLLER_Total, (ULONG)(height),
+ SCROLLER_Visible, bbox->Height,
+ TAG_DONE);
+ }
+
+ if(g->shared->objects[GID_HSCROLL])
+ {
+ browser_window_get_extents(g->bw, true, &width, &height);
+ RefreshSetGadgetAttrs((struct Gadget *)(APTR)g->shared->objects[GID_HSCROLL],
+ g->shared->win, NULL,
+ SCROLLER_Total, (ULONG)(width),
+ SCROLLER_Visible, bbox->Width,
+ TAG_DONE);
+ }
+
+ ami_gui_free_space_box(bbox);
+ }
+
+ ami_gui_scroller_update(g->shared);
+ g->shared->new_content = true;
+}
+
+
+/**
+ * Invalidates an area of an amiga browser window
+ *
+ * \param g gui_window
+ * \param rect area to redraw or NULL for the entire window area
+ * \return NSERROR_OK on success or appropriate error code
+ */
+static nserror amiga_window_invalidate_area(struct gui_window *g,
+ const struct rect *restrict rect)
+{
+ struct nsObject *nsobj;
+ struct rect *restrict deferred_rect;
+
+ if(!g) return NSERROR_BAD_PARAMETER;
+
+ if (rect == NULL) {
+ if (g != g->shared->gw) {
+ return NSERROR_OK;
+ }
+ } else {
+ if (ami_gui_window_update_box_deferred_check(g->deferred_rects, rect,
+ g->deferred_rects_pool)) {
+ deferred_rect = ami_memory_itempool_alloc(g->deferred_rects_pool,
+ sizeof(struct rect));
+ CopyMem(rect, deferred_rect, sizeof(struct rect));
+ nsobj = AddObject(g->deferred_rects, AMINS_RECT);
+ nsobj->objstruct = deferred_rect;
+ } else {
+ NSLOG(netsurf, INFO,
+ "Ignoring duplicate or subset of queued box redraw");
+ }
+ }
+ ami_schedule_redraw(g->shared, false);
+
+ return NSERROR_OK;
+}
+
+
+static void ami_switch_tab(struct gui_window_2 *gwin, bool redraw)
{
struct Node *tabnode;
struct IBox *bbox;
@@ -2915,6 +3746,8 @@ void ami_switch_tab(struct gui_window_2 *gwin, bool redraw)
TAG_DONE);
cur_gw = gwin->gw;
+ ami_gui_console_log_switch(gwin->gw);
+
if(ami_gui_get_space_box((Object *)gwin->objects[GID_BROWSER], &bbox) != NSERROR_OK) {
amiga_warn_user("NoMemory", "");
return;
@@ -2938,7 +3771,10 @@ void ami_switch_tab(struct gui_window_2 *gwin, bool redraw)
struct rect rect;
ami_plot_clear_bbox(gwin->win->RPort, bbox);
- browser_window_update(gwin->gw->bw, false);
+ gui_window_set_title(gwin->gw,
+ browser_window_get_title(gwin->gw->bw));
+ gui_window_update_extent(gwin->gw);
+ amiga_window_invalidate_area(gwin->gw, NULL);
rect.x0 = rect.x1 = gwin->gw->scrollx;
rect.y0 = rect.y1 = gwin->gw->scrolly;
@@ -2952,6 +3788,7 @@ void ami_switch_tab(struct gui_window_2 *gwin, bool redraw)
ami_throbber_redraw_schedule(0, gwin->gw);
gui_window_set_icon(gwin->gw, gwin->gw->favicon);
+ gui_page_info_change(gwin->gw);
}
ami_gui_free_space_box(bbox);
@@ -2991,7 +3828,7 @@ void ami_quit_netsurf(void)
}
}
-void ami_quit_netsurf_delayed(void)
+static void ami_quit_netsurf_delayed(void)
{
int res = -1;
#ifdef __amigaos4__
@@ -3395,7 +4232,7 @@ static void ami_toggletabbar(struct gui_window_2 *gwin, bool show)
GA_ID, GID_TABS,
GA_RelVerify, TRUE,
GA_Underscore, 13, // disable kb shortcuts
- GA_ContextMenu, ami_ctxmenu_clicktab_create(gwin),
+ GA_ContextMenu, ami_ctxmenu_clicktab_create(gwin, &gwin->clicktab_ctxmenu),
CLICKTAB_Labels, &gwin->tab_list,
CLICKTAB_LabelTruncate, TRUE,
CLICKTAB_CloseImage, gwin->objects[GID_CLOSETAB_BM],
@@ -3444,7 +4281,12 @@ static void ami_toggletabbar(struct gui_window_2 *gwin, bool show)
RethinkLayout((struct Gadget *)gwin->objects[GID_MAIN],
gwin->win, NULL, TRUE);
- if(gwin->gw && gwin->gw->bw) browser_window_update(gwin->gw->bw, false);
+ if (gwin->gw && gwin->gw->bw) {
+ gui_window_set_title(gwin->gw,
+ browser_window_get_title(gwin->gw->bw));
+ gui_window_update_extent(gwin->gw);
+ amiga_window_invalidate_area(gwin->gw, NULL);
+ }
}
void ami_gui_tabs_toggle_all(void)
@@ -3517,9 +4359,14 @@ int ami_gui_count_windows(int window, int *tabs)
*/
void ami_gui_set_scale(struct gui_window *gw, float scale)
{
- if(scale <= 0.0) return;
- gw->scale = scale;
browser_window_set_scale(gw->bw, scale, true);
+ ami_schedule_redraw(gw->shared, true);
+}
+
+void ami_gui_adjust_scale(struct gui_window *gw, float adjustment)
+{
+ browser_window_set_scale(gw->bw, adjustment, false);
+ ami_schedule_redraw(gw->shared, true);
}
void ami_gui_switch_to_new_tab(struct gui_window_2 *gwin)
@@ -3572,10 +4419,6 @@ static void ami_do_redraw_tiled(struct gui_window_2 *gwin, bool busy,
int tile_size_y;
ami_plot_ra_get_size(glob, &tile_size_x, &tile_size_y);
-
- int tile_x_scale = (int)(tile_size_x / gwin->gw->scale);
- int tile_y_scale = (int)(tile_size_y / gwin->gw->scale);
-
ami_plot_ra_set_pen_list(glob, gwin->shared_pens);
if(top < 0) {
@@ -3608,19 +4451,19 @@ static void ami_do_redraw_tiled(struct gui_window_2 *gwin, bool busy,
if(busy) ami_set_pointer(gwin, GUI_POINTER_WAIT, false);
- for(y = top; y < (top + height); y += tile_y_scale) {
+ for(y = top; y < (top + height); y += tile_size_y) {
clip.y0 = 0;
clip.y1 = tile_size_y;
if(clip.y1 > height) clip.y1 = height;
- if((((y - sy) * gwin->gw->scale) + clip.y1) > bbox->Height)
- clip.y1 = bbox->Height - ((y - sy) * gwin->gw->scale);
+ if(((y - sy) + clip.y1) > bbox->Height)
+ clip.y1 = bbox->Height - (y - sy);
- for(x = left; x < (left + width); x += tile_x_scale) {
+ for(x = left; x < (left + width); x += tile_size_x) {
clip.x0 = 0;
clip.x1 = tile_size_x;
if(clip.x1 > width) clip.x1 = width;
- if((((x - sx) * gwin->gw->scale) + clip.x1) > bbox->Width)
- clip.x1 = bbox->Width - ((x - sx) * gwin->gw->scale);
+ if(((x - sx) + clip.x1) > bbox->Width)
+ clip.x1 = bbox->Width - (x - sx);
if(browser_window_redraw(gwin->gw->bw,
clip.x0 - (int)x,
@@ -3635,15 +4478,15 @@ static void ami_do_redraw_tiled(struct gui_window_2 *gwin, bool busy,
BLITA_SrcY, 0,
BLITA_DestType, BLITT_RASTPORT,
BLITA_Dest, gwin->win->RPort,
- BLITA_DestX, bbox->Left + (int)((x - sx) * gwin->gw->scale),
- BLITA_DestY, bbox->Top + (int)((y - sy) * gwin->gw->scale),
+ BLITA_DestX, bbox->Left + (int)(x - sx),
+ BLITA_DestY, bbox->Top + (int)(y - sy),
BLITA_Width, (int)(clip.x1),
BLITA_Height, (int)(clip.y1),
TAG_DONE);
#else
BltBitMapRastPort(ami_plot_ra_get_bitmap(glob), 0, 0, gwin->win->RPort,
- bbox->Left + (int)((x - sx) * gwin->gw->scale),
- bbox->Top + (int)((y - sy) * gwin->gw->scale),
+ bbox->Left + (int)(x - sx),
+ bbox->Top + (int)(y - sy),
(int)(clip.x1), (int)(clip.y1), 0xC0);
#endif
}
@@ -3693,7 +4536,7 @@ static void ami_do_redraw_limits(struct gui_window *g, struct browser_window *bw
}
ami_do_redraw_tiled(g->shared, busy, x0, y0,
- (x1 - x0) * g->scale, (y1 - y0) * g->scale, sx, sy, bbox, &ctx);
+ x1 - x0, y1 - y0, sx, sy, bbox, &ctx);
ami_gui_free_space_box(bbox);
@@ -3701,44 +4544,6 @@ static void ami_do_redraw_limits(struct gui_window *g, struct browser_window *bw
}
-/**
- * Invalidates an area of an amiga browser window
- *
- * \param g gui_window
- * \param rect area to redraw or NULL for the entire window area
- * \return NSERROR_OK on success or appropriate error code
- */
-static nserror amiga_window_invalidate_area(struct gui_window *g,
- const struct rect *restrict rect)
-{
- struct nsObject *nsobj;
- struct rect *restrict deferred_rect;
-
- if(!g) return NSERROR_BAD_PARAMETER;
-
- if (rect == NULL) {
- if (g != g->shared->gw) {
- return NSERROR_OK;
- }
- } else {
- if (ami_gui_window_update_box_deferred_check(g->deferred_rects, rect,
- g->deferred_rects_pool)) {
- deferred_rect = ami_memory_itempool_alloc(g->deferred_rects_pool,
- sizeof(struct rect));
- CopyMem(rect, deferred_rect, sizeof(struct rect));
- nsobj = AddObject(g->deferred_rects, AMINS_RECT);
- nsobj->objstruct = deferred_rect;
- } else {
- NSLOG(netsurf, INFO,
- "Ignoring duplicate or subset of queued box redraw");
- }
- }
- ami_schedule_redraw(g->shared, false);
-
- return NSERROR_OK;
-}
-
-
static void ami_refresh_window(struct gui_window_2 *gwin)
{
/* simplerefresh only */
@@ -3760,14 +4565,10 @@ static void ami_refresh_window(struct gui_window_2 *gwin)
BeginRefresh(gwin->win);
- r.x0 = ((gwin->win->RPort->Layer->DamageList->bounds.MinX - bbox->Left) /
- browser_window_get_scale(gwin->gw->bw)) + sx - 1;
- r.x1 = ((gwin->win->RPort->Layer->DamageList->bounds.MaxX - bbox->Left) /
- browser_window_get_scale(gwin->gw->bw)) + sx + 2;
- r.y0 = ((gwin->win->RPort->Layer->DamageList->bounds.MinY - bbox->Top) /
- browser_window_get_scale(gwin->gw->bw)) + sy - 1;
- r.y1 = ((gwin->win->RPort->Layer->DamageList->bounds.MaxY - bbox->Top) /
- browser_window_get_scale(gwin->gw->bw)) + sy + 2;
+ r.x0 = (gwin->win->RPort->Layer->DamageList->bounds.MinX - bbox->Left) + sx - 1;
+ r.x1 = (gwin->win->RPort->Layer->DamageList->bounds.MaxX - bbox->Left) + sx + 2;
+ r.y0 = (gwin->win->RPort->Layer->DamageList->bounds.MinY - bbox->Top) + sy - 1;
+ r.y1 = (gwin->win->RPort->Layer->DamageList->bounds.MaxY - bbox->Top) + sy + 2;
regrect = gwin->win->RPort->Layer->DamageList->RegionRectangle;
@@ -3775,14 +4576,10 @@ static void ami_refresh_window(struct gui_window_2 *gwin)
while(regrect)
{
- r.x0 = ((regrect->bounds.MinX - bbox->Left) /
- browser_window_get_scale(gwin->gw->bw)) + sx - 1;
- r.x1 = ((regrect->bounds.MaxX - bbox->Left) /
- browser_window_get_scale(gwin->gw->bw)) + sx + 2;
- r.y0 = ((regrect->bounds.MinY - bbox->Top) /
- browser_window_get_scale(gwin->gw->bw)) + sy - 1;
- r.y1 = ((regrect->bounds.MaxY - bbox->Top) /
- browser_window_get_scale(gwin->gw->bw)) + sy + 2;
+ r.x0 = (regrect->bounds.MinX - bbox->Left) + sx - 1;
+ r.x1 = (regrect->bounds.MaxX - bbox->Left) + sx + 2;
+ r.y0 = (regrect->bounds.MinY - bbox->Top) + sy - 1;
+ r.y1 = (regrect->bounds.MaxY - bbox->Top) + sy + 2;
regrect = regrect->Next;
@@ -3915,6 +4712,7 @@ gui_window_create(struct browser_window *bw,
char closetab[100],closetab_s[100],closetab_g[100];
char addtab[100],addtab_s[100],addtab_g[100];
char fave[100], unfave[100];
+ char pi_insecure[100], pi_internal[100], pi_local[100], pi_secure[100], pi_warning[100];
char tabthrobber[100];
ULONG refresh_mode = WA_SmartRefresh;
ULONG defer_layout = TRUE;
@@ -3956,7 +4754,38 @@ gui_window_create(struct browser_window *bw,
g->deferred_rects = NewObjList();
g->deferred_rects_pool = ami_memory_itempool_create(sizeof(struct rect));
g->bw = bw;
- g->scale = browser_window_get_scale(bw);
+
+ NewList(&g->loglist);
+#ifdef __amigaos4__
+ g->logcolumns = AllocLBColumnInfo(4,
+ LBCIA_Column, 0,
+ // LBCIA_CopyTitle, TRUE,
+ LBCIA_Title, "time", /**\TODO: add these to Messages */
+ LBCIA_Weight, 10,
+ LBCIA_DraggableSeparator, TRUE,
+ LBCIA_Separator, TRUE,
+ LBCIA_Column, 1,
+ // LBCIA_CopyTitle, TRUE,
+ LBCIA_Title, "source", /**\TODO: add these to Messages */
+ LBCIA_Weight, 10,
+ LBCIA_DraggableSeparator, TRUE,
+ LBCIA_Separator, TRUE,
+ LBCIA_Column, 2,
+ // LBCIA_CopyTitle, TRUE,
+ LBCIA_Title, "level", /**\TODO: add these to Messages */
+ LBCIA_Weight, 5,
+ LBCIA_DraggableSeparator, TRUE,
+ LBCIA_Separator, TRUE,
+ LBCIA_Column, 3,
+ // LBCIA_CopyTitle, TRUE,
+ LBCIA_Title, "message", /**\TODO: add these to Messages */
+ LBCIA_Weight, 75,
+ LBCIA_DraggableSeparator, TRUE,
+ LBCIA_Separator, TRUE,
+ TAG_DONE);
+#else
+ /**\TODO write OS3-compatible version */
+#endif
if((flags & GW_CREATE_TAB) && existing)
{
@@ -4037,6 +4866,9 @@ gui_window_create(struct browser_window *bw,
g->shared->throbber_hook.h_Entry = (void *)ami_set_throbber_render_hook;
g->shared->throbber_hook.h_Data = g->shared;
+ g->shared->browser_hook.h_Entry = (void *)ami_gui_browser_render_hook;
+ g->shared->browser_hook.h_Data = g->shared;
+
newprefs_hook.h_Entry = (void *)ami_gui_newprefs_hook;
newprefs_hook.h_Data = 0;
@@ -4059,10 +4891,12 @@ gui_window_create(struct browser_window *bw,
ULONG addtabclosegadget = TAG_IGNORE;
ULONG iconifygadget = FALSE;
+#ifdef __amigaos4__
if (nsoption_charp(pubscreen_name) &&
(locked_screen == TRUE) &&
(strcmp(nsoption_charp(pubscreen_name), "Workbench") == 0))
iconifygadget = TRUE;
+#endif
NSLOG(netsurf, INFO, "Creating menu");
struct Menu *menu = ami_gui_menu_create(g->shared);
@@ -4100,6 +4934,12 @@ gui_window_create(struct browser_window *bw,
g->shared->helphints[GID_ADDTAB] =
translate_escape_chars(messages_get("HelpToolbarAddTab"));
+ g->shared->helphints[GID_PAGEINFO_INSECURE_BM] = ami_utf8_easy(messages_get("PageInfoInsecure"));
+ g->shared->helphints[GID_PAGEINFO_LOCAL_BM] = ami_utf8_easy(messages_get("PageInfoLocal"));
+ g->shared->helphints[GID_PAGEINFO_SECURE_BM] = ami_utf8_easy(messages_get("PageInfoSecure"));
+ g->shared->helphints[GID_PAGEINFO_WARNING_BM] = ami_utf8_easy(messages_get("PageInfoWarning"));
+ g->shared->helphints[GID_PAGEINFO_INTERNAL_BM] = ami_utf8_easy(messages_get("PageInfoInternal"));
+
ami_get_theme_filename(nav_west, "theme_nav_west", false);
ami_get_theme_filename(nav_west_s, "theme_nav_west_s", false);
ami_get_theme_filename(nav_west_g, "theme_nav_west_g", false);
@@ -4124,6 +4964,11 @@ gui_window_create(struct browser_window *bw,
ami_get_theme_filename(tabthrobber, "theme_tab_loading", false);
ami_get_theme_filename(fave, "theme_fave", false);
ami_get_theme_filename(unfave, "theme_unfave", false);
+ ami_get_theme_filename(pi_insecure, "theme_pageinfo_insecure", false);
+ ami_get_theme_filename(pi_internal, "theme_pageinfo_internal", false);
+ ami_get_theme_filename(pi_local, "theme_pageinfo_local", false);
+ ami_get_theme_filename(pi_secure, "theme_pageinfo_secure", false);
+ ami_get_theme_filename(pi_warning, "theme_pageinfo_warning", false);
g->shared->objects[GID_FAVE_ADD] = BitMapObj,
BITMAP_SourceFile, fave,
@@ -4153,6 +4998,37 @@ gui_window_create(struct browser_window *bw,
BITMAP_Masking, TRUE,
BitMapEnd;
+ g->shared->objects[GID_PAGEINFO_INSECURE_BM] = BitMapObj,
+ BITMAP_SourceFile, pi_insecure,
+ BITMAP_Screen, scrn,
+ BITMAP_Masking, TRUE,
+ BitMapEnd;
+
+ g->shared->objects[GID_PAGEINFO_INTERNAL_BM] = BitMapObj,
+ BITMAP_SourceFile, pi_internal,
+ BITMAP_Screen, scrn,
+ BITMAP_Masking, TRUE,
+ BitMapEnd;
+
+ g->shared->objects[GID_PAGEINFO_LOCAL_BM] = BitMapObj,
+ BITMAP_SourceFile, pi_local,
+ BITMAP_Screen, scrn,
+ BITMAP_Masking, TRUE,
+ BitMapEnd;
+
+ g->shared->objects[GID_PAGEINFO_SECURE_BM] = BitMapObj,
+ BITMAP_SourceFile, pi_secure,
+ BITMAP_Screen, scrn,
+ BITMAP_Masking, TRUE,
+ BitMapEnd;
+
+ g->shared->objects[GID_PAGEINFO_WARNING_BM] = BitMapObj,
+ BITMAP_SourceFile, pi_warning,
+ BITMAP_Screen, scrn,
+ BITMAP_Masking, TRUE,
+ BitMapEnd;
+
+
if(ClickTabBase->lib_Version < 53)
{
addtabclosegadget = LAYOUT_AddChild;
@@ -4311,6 +5187,14 @@ gui_window_create(struct browser_window *bw,
SpaceEnd,
CHILD_WeightedWidth, 0,
CHILD_WeightedHeight, 0,
+ LAYOUT_AddChild, g->shared->objects[GID_PAGEINFO] = ButtonObj,
+ GA_ID, GID_PAGEINFO,
+ GA_RelVerify, TRUE,
+ GA_ReadOnly, FALSE,
+ BUTTON_RenderImage, g->shared->objects[GID_PAGEINFO_INTERNAL_BM],
+ ButtonEnd,
+ CHILD_WeightedWidth, 0,
+ CHILD_WeightedHeight, 0,
LAYOUT_AddChild, g->shared->objects[GID_URL] =
#ifdef __amigaos4__
NewObject(urlStringClass, NULL,
@@ -4399,10 +5283,15 @@ gui_window_create(struct browser_window *bw,
LAYOUT_AddChild, g->shared->objects[GID_BROWSER] = SpaceObj,
GA_ID,GID_BROWSER,
SPACE_Transparent,TRUE,
+ SPACE_RenderHook, &g->shared->browser_hook,
SpaceEnd,
EndGroup,
EndGroup,
EndGroup,
+// LAYOUT_WeightBar, TRUE,
+ LAYOUT_AddChild, g->shared->objects[GID_LOGLAYOUT] = LayoutVObj,
+ EndGroup,
+ CHILD_WeightedHeight, 0,
#ifndef __amigaos4__
LAYOUT_AddChild, g->shared->objects[GID_STATUS] = StringObj,
GA_ID, GID_STATUS,
@@ -4648,6 +5537,11 @@ static void gui_window_destroy(struct gui_window *g)
if((g->shared->tabs == 1) && (nsoption_bool(tab_always_show) == false))
ami_toggletabbar(g->shared, false);
+ FreeListBrowserList(&g->loglist);
+#ifdef __amigaos4__
+ FreeLBColumnInfo(g->logcolumns);
+#endif
+
if(g->tabtitle) free(g->tabtitle);
free(g);
return;
@@ -4670,6 +5564,11 @@ static void gui_window_destroy(struct gui_window *g)
DisposeObject(g->shared->objects[GID_TABS_FLAG]);
DisposeObject(g->shared->objects[GID_FAVE_ADD]);
DisposeObject(g->shared->objects[GID_FAVE_RMV]);
+ DisposeObject(g->shared->objects[GID_PAGEINFO_INSECURE_BM]);
+ DisposeObject(g->shared->objects[GID_PAGEINFO_INTERNAL_BM]);
+ DisposeObject(g->shared->objects[GID_PAGEINFO_LOCAL_BM]);
+ DisposeObject(g->shared->objects[GID_PAGEINFO_SECURE_BM]);
+ DisposeObject(g->shared->objects[GID_PAGEINFO_WARNING_BM]);
ami_gui_opts_websearch_free(g->shared->web_search_list);
if(g->shared->search_bm) DisposeObject(g->shared->search_bm);
@@ -4681,12 +5580,17 @@ static void gui_window_destroy(struct gui_window *g)
ami_ctxmenu_release_hook(g->shared->ctxmenu_hook);
ami_gui_menu_free(g->shared);
+ FreeListBrowserList(&g->loglist);
+#ifdef __amigaos4__
+ FreeLBColumnInfo(g->logcolumns);
+#endif
+
free(g->shared->wintitle);
ami_utf8_free(g->shared->status);
free(g->shared->svbuffer);
for(gid = 0; gid < GID_LAST; gid++)
- free(g->shared->helphints[gid]);
+ ami_utf8_free(g->shared->helphints[gid]);
ami_gui_win_list_remove(g->shared);
if(g->tab_node) {
@@ -4705,55 +5609,6 @@ static void gui_window_destroy(struct gui_window *g)
win_destroyed = true;
}
-static void gui_window_set_title(struct gui_window *g, const char *restrict title)
-{
- struct Node *node;
- char *restrict utf8title;
-
- if(!g) return;
- if(!title) return;
-
- utf8title = ami_utf8_easy((char *)title);
-
- if(g->tab_node) {
- node = g->tab_node;
-
- if((g->tabtitle == NULL) || (strcmp(utf8title, g->tabtitle)))
- {
- SetGadgetAttrs((struct Gadget *)g->shared->objects[GID_TABS],
- g->shared->win, NULL,
- CLICKTAB_Labels, ~0,
- TAG_DONE);
-
- if(g->tabtitle) free(g->tabtitle);
- g->tabtitle = strdup(utf8title);
-
- SetClickTabNodeAttrs(node, TNA_Text, g->tabtitle,
- TNA_HintInfo, g->tabtitle,
- TAG_DONE);
-
- RefreshSetGadgetAttrs((struct Gadget *)g->shared->objects[GID_TABS],
- g->shared->win, NULL,
- CLICKTAB_Labels, &g->shared->tab_list,
- TAG_DONE);
-
- if(ClickTabBase->lib_Version < 53)
- RethinkLayout((struct Gadget *)g->shared->objects[GID_TABLAYOUT],
- g->shared->win, NULL, TRUE);
- }
- }
-
- if(g == g->shared->gw) {
- if((g->shared->wintitle == NULL) || (strcmp(utf8title, g->shared->wintitle)))
- {
- if(g->shared->wintitle) free(g->shared->wintitle);
- g->shared->wintitle = strdup(utf8title);
- SetWindowTitles(g->shared->win, g->shared->wintitle, ami_gui_get_screen_title());
- }
- }
-
- ami_utf8_free(utf8title);
-}
static void ami_redraw_callback(void *p)
{
@@ -4891,7 +5746,6 @@ static void ami_do_redraw(struct gui_window_2 *gwin)
gwin->redraw_scroll = false;
if(gwin->new_content) gwin->redraw_scroll = false;
-// if(gwin->gw->scale != 1.0) gwin->redraw_scroll = false;
}
if(gwin->redraw_scroll)
@@ -4960,7 +5814,7 @@ static void ami_do_redraw(struct gui_window_2 *gwin)
}
-void ami_get_hscroll_pos(struct gui_window_2 *gwin, ULONG *xs)
+static void ami_get_hscroll_pos(struct gui_window_2 *gwin, ULONG *xs)
{
if(gwin->objects[GID_HSCROLL])
{
@@ -4968,19 +5822,15 @@ void ami_get_hscroll_pos(struct gui_window_2 *gwin, ULONG *xs)
} else {
*xs = 0;
}
-
- *xs /= gwin->gw->scale;
}
-void ami_get_vscroll_pos(struct gui_window_2 *gwin, ULONG *ys)
+static void ami_get_vscroll_pos(struct gui_window_2 *gwin, ULONG *ys)
{
if(gwin->objects[GID_VSCROLL]) {
GetAttr(SCROLLER_Top, gwin->objects[GID_VSCROLL], ys);
} else {
*ys = 0;
}
-
- *ys /= gwin->gw->scale;
}
static bool gui_window_get_scroll(struct gui_window *g, int *restrict sx, int *restrict sy)
@@ -5046,7 +5896,7 @@ gui_window_set_scroll(struct gui_window *g, const struct rect *rect)
if(g->shared->objects[GID_VSCROLL]) {
RefreshSetGadgetAttrs((struct Gadget *)(APTR)g->shared->objects[GID_VSCROLL],
g->shared->win, NULL,
- SCROLLER_Top, (ULONG)(sy * g->scale),
+ SCROLLER_Top, (ULONG)(sy),
TAG_DONE);
}
@@ -5054,7 +5904,7 @@ gui_window_set_scroll(struct gui_window *g, const struct rect *rect)
{
RefreshSetGadgetAttrs((struct Gadget *)(APTR)g->shared->objects[GID_HSCROLL],
g->shared->win, NULL,
- SCROLLER_Top, (ULONG)(sx * g->scale),
+ SCROLLER_Top, (ULONG)(sx),
TAG_DONE);
}
@@ -5069,45 +5919,6 @@ gui_window_set_scroll(struct gui_window *g, const struct rect *rect)
return NSERROR_OK;
}
-static void gui_window_update_extent(struct gui_window *g)
-{
- struct IBox *bbox;
-
- if(!g || !g->bw) return;
- if(browser_window_has_content(g->bw) == false) return;
-
- if(g == g->shared->gw) {
- int width, height;
- if(ami_gui_get_space_box((Object *)g->shared->objects[GID_BROWSER], &bbox) != NSERROR_OK) {
- amiga_warn_user("NoMemory", "");
- return;
- }
-
- if(g->shared->objects[GID_VSCROLL]) {
- browser_window_get_extents(g->bw, true, &width, &height);
- RefreshSetGadgetAttrs((struct Gadget *)(APTR)g->shared->objects[GID_VSCROLL],g->shared->win,NULL,
- SCROLLER_Total, (ULONG)(height),
- SCROLLER_Visible, bbox->Height,
- TAG_DONE);
- }
-
- if(g->shared->objects[GID_HSCROLL])
- {
- browser_window_get_extents(g->bw, true, &width, &height);
- RefreshSetGadgetAttrs((struct Gadget *)(APTR)g->shared->objects[GID_HSCROLL],
- g->shared->win, NULL,
- SCROLLER_Total, (ULONG)(width),
- SCROLLER_Visible, bbox->Width,
- TAG_DONE);
- }
-
- ami_gui_free_space_box(bbox);
- }
-
- ami_gui_scroller_update(g->shared);
- g->shared->new_content = true;
-}
-
static void gui_window_set_status(struct gui_window *g, const char *text)
{
char *utf8text;
@@ -5248,6 +6059,19 @@ HOOKF(uint32, ami_set_throbber_render_hook, APTR, space, struct gpRender *)
return 0;
}
+HOOKF(uint32, ami_gui_browser_render_hook, APTR, space, struct gpRender *)
+{
+ struct gui_window_2 *gwin = hook->h_Data;
+
+ NSLOG(netsurf, DEBUG, "Render hook called with %ld (REDRAW=1)", msg->gpr_Redraw);
+
+ if(msg->gpr_Redraw != GREDRAW_REDRAW) return 0;
+
+ ami_schedule_redraw(gwin, true);
+
+ return 0;
+}
+
static void gui_window_place_caret(struct gui_window *g, int x, int y, int height,
const struct rect *clip)
{
@@ -5395,7 +6219,7 @@ BOOL ami_gadget_hit(Object *obj, int x, int y)
else return FALSE;
}
-Object *ami_gui_splash_open(void)
+static Object *ami_gui_splash_open(void)
{
Object *restrict win_obj, *restrict bm_obj;
struct Window *win;
@@ -5494,7 +6318,7 @@ Object *ami_gui_splash_open(void)
return win_obj;
}
-void ami_gui_splash_close(Object *win_obj)
+static void ami_gui_splash_close(Object *win_obj)
{
if(win_obj == NULL) return;
@@ -5605,6 +6429,53 @@ static char *ami_gui_get_user_dir(STRPTR current_user)
return current_user_dir;
}
+
+/**
+ * process miscellaneous window events
+ *
+ * \param gw The window receiving the event.
+ * \param event The event code.
+ * \return NSERROR_OK when processed ok
+ */
+static nserror
+gui_window_event(struct gui_window *gw, enum gui_window_event event)
+{
+ switch (event) {
+ case GW_EVENT_UPDATE_EXTENT:
+ gui_window_update_extent(gw);
+ break;
+
+ case GW_EVENT_REMOVE_CARET:
+ gui_window_remove_caret(gw);
+ break;
+
+ case GW_EVENT_NEW_CONTENT:
+ gui_window_new_content(gw);
+ break;
+
+ case GW_EVENT_START_SELECTION:
+ gui_start_selection(gw);
+ break;
+
+ case GW_EVENT_START_THROBBER:
+ gui_window_start_throbber(gw);
+ break;
+
+ case GW_EVENT_STOP_THROBBER:
+ gui_window_stop_throbber(gw);
+ break;
+
+ case GW_EVENT_PAGE_INFO_CHANGE:
+ gui_page_info_change(gw);
+ break;
+
+ default:
+ break;
+ }
+ return NSERROR_OK;
+}
+
+
static struct gui_window_table amiga_window_table = {
.create = gui_window_create,
.destroy = gui_window_destroy,
@@ -5612,26 +6483,23 @@ static struct gui_window_table amiga_window_table = {
.get_scroll = gui_window_get_scroll,
.set_scroll = gui_window_set_scroll,
.get_dimensions = gui_window_get_dimensions,
- .update_extent = gui_window_update_extent,
+ .event = gui_window_event,
.set_icon = gui_window_set_icon,
.set_title = gui_window_set_title,
.set_url = gui_window_set_url,
.set_status = gui_window_set_status,
.place_caret = gui_window_place_caret,
- .remove_caret = gui_window_remove_caret,
.drag_start = gui_window_drag_start,
- .new_content = gui_window_new_content,
.create_form_select_menu = gui_create_form_select_menu,
.file_gadget_open = gui_file_gadget_open,
.drag_save_object = gui_drag_save_object,
- .drag_save_selection =gui_drag_save_selection,
- .start_selection = gui_start_selection,
+ .drag_save_selection = gui_drag_save_selection,
+
+ .console_log = gui_window_console_log,
/* from theme */
.set_pointer = gui_window_set_pointer,
- .start_throbber = gui_window_start_throbber,
- .stop_throbber = gui_window_stop_throbber,
/* from download */
.save_link = gui_window_save_link,
@@ -5650,12 +6518,10 @@ static struct gui_search_web_table amiga_search_web_table = {
static struct gui_misc_table amiga_misc_table = {
.schedule = ami_schedule,
- .warning = amiga_warn_user,
.quit = gui_quit,
.launch_url = gui_launch_url,
- .cert_verify = ami_cert_verify,
- .login = gui_401login_open,
+ .present_cookies = ami_cookies_present,
};
/** Normal entry point from OS */
diff --git a/frontends/amiga/gui.h b/frontends/amiga/gui.h
index bf4ec9139..70f1c505e 100644
--- a/frontends/amiga/gui.h
+++ b/frontends/amiga/gui.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2008-2017 Chris Young <chris@unsatisfactorysoftware.co.uk>
+ * Copyright 2008-2019 Chris Young <chris@unsatisfactorysoftware.co.uk>
*
* This file is part of NetSurf, http://www.netsurf-browser.org/
*
@@ -38,57 +38,21 @@
#define HOOKF(ret,func,type,ptr,msgtype) static ASM ret func(REG(a0, struct Hook *hook),REG(a2, type ptr), REG(a1, msgtype msg))
#endif
-enum
-{
- OID_MAIN = 0,
- OID_VSCROLL,
- OID_HSCROLL,
- OID_LAST, /* for compatibility */
- GID_MAIN,
- GID_TABLAYOUT,
- GID_BROWSER,
- GID_STATUS,
- GID_URL,
- GID_ICON,
- GID_STOP,
- GID_RELOAD,
- GID_HOME,
- GID_BACK,
- GID_FORWARD,
- GID_THROBBER,
- GID_SEARCH_ICON,
- GID_FAVE,
- GID_FAVE_ADD,
- GID_FAVE_RMV,
- GID_CLOSETAB,
- GID_CLOSETAB_BM,
- GID_ADDTAB,
- GID_ADDTAB_BM,
- GID_TABS,
- GID_TABS_FLAG,
- GID_USER,
- GID_PASS,
- GID_LOGIN,
- GID_CANCEL,
- GID_NEXT,
- GID_PREV,
- GID_SEARCHSTRING,
- GID_SHOWALL,
- GID_CASE,
- GID_TOOLBARLAYOUT,
- GID_HOTLIST,
- GID_HOTLISTLAYOUT,
- GID_HOTLISTSEPBAR,
- GID_HSCROLL,
- GID_HSCROLLLAYOUT,
- GID_VSCROLL,
- GID_VSCROLLLAYOUT,
- GID_LAST
+/* valid options for ami_gui_get_object */
+enum {
+ AMI_GAD_THROBBER = 0,
+ AMI_GAD_TABS,
+ AMI_GAD_URL,
+ AMI_GAD_SEARCH,
+ AMI_WIN_MAIN
};
struct find_window;
struct ami_history_local_window;
struct ami_menu_data;
+struct gui_window;
+struct gui_window_2;
+struct IBox;
#define AMI_GUI_TOOLBAR_MAX 20
@@ -111,83 +75,7 @@ struct ami_generic_window {
const struct ami_win_event_table *tbl;
};
-struct gui_window_2 {
- struct ami_generic_window w;
- struct Window *win;
- Object *restrict objects[GID_LAST];
- struct gui_window *gw; /* currently-displayed gui_window */
- bool redraw_required;
- int throbber_frame;
- struct List tab_list;
- ULONG tabs;
- ULONG next_tab;
- struct Node *last_new_tab;
- struct Hook scrollerhook;
- struct form_control *control;
- browser_mouse_state mouse_state;
- browser_mouse_state key_state;
- ULONG throbber_update_count;
- struct find_window *searchwin;
- ULONG oldh;
- ULONG oldv;
- int temp;
- bool redraw_scroll;
- bool new_content;
- struct ami_menu_data *menu_data[AMI_MENU_AREXX_MAX + 1]; /* only for GadTools menus */
- ULONG hotlist_items;
- Object *restrict hotlist_toolbar_lab[AMI_GUI_TOOLBAR_MAX];
- struct List hotlist_toolbar_list;
- struct List *web_search_list;
- Object *search_bm;
- char *restrict svbuffer;
- char *restrict status;
- char *restrict wintitle;
- char *restrict helphints[GID_LAST];
- browser_mouse_state prev_mouse_state;
- struct timeval lastclick;
- struct AppIcon *appicon; /* iconify appicon */
- struct DiskObject *dobj; /* iconify appicon */
- struct Hook favicon_hook;
- struct Hook throbber_hook;
- struct Hook *ctxmenu_hook;
- Object *restrict history_ctxmenu[2];
- Object *restrict clicktab_ctxmenu;
- gui_drag_type drag_op;
- struct IBox *ptr_lock;
- struct AppWindow *appwin;
- struct MinList *shared_pens;
- gui_pointer_shape mouse_pointer;
- struct Menu *imenu; /* Intuition menu */
- bool closed; /* Window has been closed (via menu) */
-};
-
-struct gui_window
-{
- struct gui_window_2 *shared;
- int tab;
- struct Node *tab_node;
- int c_x; /* Caret X posn */
- int c_y; /* Caret Y posn */
- int c_w; /* Caret width */
- int c_h; /* Caret height */
- int c_h_temp;
- int scrollx;
- int scrolly;
- struct ami_history_local_window *hw;
- struct List dllist;
- struct hlcache_handle *favicon;
- bool throbbing;
- char *tabtitle;
- APTR deferred_rects_pool;
- struct MinList *deferred_rects;
- struct browser_window *bw;
- float scale;
-};
-
-extern struct MinList *window_list; /**\todo stop arexx.c poking about in here */
-extern struct Screen *scrn;
-extern struct MsgPort *sport;
-extern struct gui_window *cur_gw;
+#define IS_CURRENT_GW(GWIN,GW) (ami_gui2_get_gui_window(GWIN) == GW)
/* The return value for these functions must be deallocated using FreeVec() */
STRPTR ami_locale_langs(int *codeset);
@@ -211,7 +99,14 @@ void ami_gui_update_hotlist_button(struct gui_window_2 *gwin);
nserror ami_gui_new_blank_tab(struct gui_window_2 *gwin);
int ami_gui_count_windows(int window, int *tabs);
void ami_gui_set_scale(struct gui_window *gw, float scale);
+void ami_set_pointer(struct gui_window_2 *gwin, gui_pointer_shape shape, bool update);
+void ami_reset_pointer(struct gui_window_2 *gwin);
+void *ami_window_at_pointer(int type);
+/**
+ * Beep
+ */
+void ami_gui_beep(void);
/**
* Close a window and all tabs attached to it.
@@ -244,6 +139,13 @@ nserror ami_gui_get_space_box(Object *obj, struct IBox **bbox);
void ami_gui_free_space_box(struct IBox *bbox);
/**
+ * Get shared message port
+ *
+ * @return Pointer to an initialised MsgPort
+ */
+struct MsgPort *ami_gui_get_shared_msgport(void);
+
+/**
* Get the application.library ID NetSurf is registered as.
*
* @return App ID.
@@ -251,6 +153,13 @@ void ami_gui_free_space_box(struct IBox *bbox);
uint32 ami_gui_get_app_id(void);
/**
+ * Get a pointer to the screen NetSurf is running on.
+ *
+ * @return Pointer to struct Screen.
+ */
+struct Screen *ami_gui_get_screen(void);
+
+/**
* Get the string for NetSurf's screen titlebar.
*
* @return String to use as the screen's titlebar text.
@@ -273,6 +182,15 @@ nserror ami_gui_win_list_add(void *win, int type, const struct ami_win_event_tab
void ami_gui_win_list_remove(void *win);
/**
+ * Get the window list.
+ *
+ *\TODO: Nothing should be poking around in this list, but we aren't
+ * assigning unique IDs to windows (ARexx interface needs this)
+ * ami_find_gwin_by_id() is close but not ARexx-friendly
+ */
+struct MinList *ami_gui_get_window_list(void);
+
+/**
* Get which qualifier keys are being pressed
*/
int ami_gui_get_quals(Object *win_obj);
@@ -283,5 +201,167 @@ int ami_gui_get_quals(Object *win_obj);
bool ami_gui_window_update_box_deferred_check(struct MinList *deferred_rects,
const struct rect *restrict new_rect, APTR mempool);
+/**
+ * Adjust scale by specified amount
+ */
+void ami_gui_adjust_scale(struct gui_window *gw, float adjustment);
+
+/**
+ * Get a pointer to the gui_window which NetSurf considers
+ * to be the current/active one
+ */
+struct gui_window *ami_gui_get_active_gw(void);
+
+/**
+ * Get browser window from gui_window
+ */
+struct browser_window *ami_gui_get_browser_window(struct gui_window *gw);
+
+/**
+ * Get browser window from gui_window_2
+ */
+struct browser_window *ami_gui2_get_browser_window(struct gui_window_2 *gwin);
+
+/**
+ * Get gui_window_2 from gui_window
+ */
+struct gui_window_2 *ami_gui_get_gui_window_2(struct gui_window *gw);
+
+/**
+ * Get gui_window from gui_window_2
+ */
+struct gui_window *ami_gui2_get_gui_window(struct gui_window_2 *gwin);
+
+/**
+ * Get download list from gui_window
+ */
+struct List *ami_gui_get_download_list(struct gui_window *gw);
+
+/**
+ * Get tab title from gui_window
+ */
+const char *ami_gui_get_tab_title(struct gui_window *gw);
+
+/**
+ * Get window title from gui_window
+ */
+const char *ami_gui_get_win_title(struct gui_window *gw);
+
+/**
+ * Get tab node from gui_window
+ */
+struct Node *ami_gui_get_tab_node(struct gui_window *gw);
+
+/**
+ * Get tabs from gui_window_2
+ */
+ULONG ami_gui2_get_tabs(struct gui_window_2 *gwin);
+
+/**
+ * Get tab list from gui_window_2
+ */
+struct List *ami_gui2_get_tab_list(struct gui_window_2 *gwin);
+
+/**
+ * Get favicon from gui_window
+ */
+struct hlcache_handle *ami_gui_get_favicon(struct gui_window *gw);
+
+/**
+ * Get local history window from gui_window
+ */
+struct ami_history_local_window *ami_gui_get_history_window(struct gui_window *gw);
+
+/**
+ * Set local history window in gui_window
+ */
+void ami_gui_set_history_window(struct gui_window *gw, struct ami_history_local_window *hw);
+
+/**
+ * Set search window in gui_window
+ */
+void ami_gui_set_find_window(struct gui_window *gw, struct find_window *fw);
+
+/**
+ * Get throbbing status from gui_window
+ */
+bool ami_gui_get_throbbing(struct gui_window *gw);
+
+/**
+ * Get throbbing frame from gui_window
+ */
+int ami_gui_get_throbber_frame(struct gui_window *gw);
+
+/**
+ * Set throbbing frame in gui_window
+ */
+void ami_gui_set_throbber_frame(struct gui_window *gw, int frame);
+
+/**
+ * Set throbbing status in gui_window
+ */
+void ami_gui_set_throbbing(struct gui_window *gw, bool throbbing);
+
+/**
+ * Get object from gui_window
+ */
+Object *ami_gui2_get_object(struct gui_window_2 *gwin, int object_type);
+
+/**
+ * Get window from gui_window
+ */
+struct Window *ami_gui_get_window(struct gui_window *gw);
+
+/**
+ * Get window from gui_window_2
+ */
+struct Window *ami_gui2_get_window(struct gui_window_2 *gwin);
+
+/**
+ * Get imenu from gui_window
+ */
+struct Menu *ami_gui_get_menu(struct gui_window *gw);
+
+/**
+ * Set imenu to gui_window_2. A value of NULL will free the menu (and menu_data!)
+ */
+void ami_gui2_set_menu(struct gui_window_2 *gwin, struct Menu *menu);
+
+/**
+ * Get menu_data from gui_window_2
+ */
+struct ami_menu_data **ami_gui2_get_menu_data(struct gui_window_2 *gwin);
+
+/**
+ * Set ctxmenu history tmp in gui_window_2
+ */
+void ami_gui2_set_ctxmenu_history_tmp(struct gui_window_2 *gwin, int temp);
+
+/**
+ * Get ctxmenu history tmp from gui_window_2
+ */
+int ami_gui2_get_ctxmenu_history_tmp(struct gui_window_2 *gwin);
+
+/**
+ * Get ctxmenu history from gui_window_2
+ */
+Object *ami_gui2_get_ctxmenu_history(struct gui_window_2 *gwin, ULONG direction);
+
+/**
+ * Set ctxmenu history in gui_window_2
+ */
+void ami_gui2_set_ctxmenu_history(struct gui_window_2 *gwin, ULONG direction, Object *ctx_hist);
+
+/**
+ * Set closed in gui_window_2
+ */
+void ami_gui2_set_closed(struct gui_window_2 *gwin, bool closed);
+
+/**
+ * Set new_content in gui_window_2
+ * Indicates the window needs redrawing
+ */
+void ami_gui2_set_new_content(struct gui_window_2 *gwin, bool new_content);
+
#endif
diff --git a/frontends/amiga/gui_menu.c b/frontends/amiga/gui_menu.c
index 756f5e66c..dc1450fce 100644
--- a/frontends/amiga/gui_menu.c
+++ b/frontends/amiga/gui_menu.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2017 Chris Young <chris@unsatisfactorysoftware.co.uk>
+ * Copyright 2017-2024 Chris Young <chris@unsatisfactorysoftware.co.uk>
*
* This file is part of NetSurf, http://www.netsurf-browser.org/
*
@@ -141,7 +141,7 @@ HOOKF(void, ami_menu_item_project_save, APTR, window, struct IntuiMessage *)
GetAttr(WINDOW_UserData, (Object *)window, (ULONG *)&gwin);
- ami_file_save_req(type, gwin, browser_window_get_content(gwin->gw->bw));
+ ami_file_save_req(type, gwin, browser_window_get_content(ami_gui2_get_browser_window(gwin)));
}
HOOKF(void, ami_menu_item_project_closetab, APTR, window, struct IntuiMessage *)
@@ -149,7 +149,7 @@ HOOKF(void, ami_menu_item_project_closetab, APTR, window, struct IntuiMessage *)
struct gui_window_2 *gwin;
GetAttr(WINDOW_UserData, (Object *)window, (ULONG *)&gwin);
- browser_window_destroy(gwin->gw->bw);
+ browser_window_destroy(ami_gui2_get_browser_window(gwin));
}
HOOKF(void, ami_menu_item_project_closewin, APTR, window, struct IntuiMessage *)
@@ -157,7 +157,7 @@ HOOKF(void, ami_menu_item_project_closewin, APTR, window, struct IntuiMessage *)
struct gui_window_2 *gwin;
GetAttr(WINDOW_UserData, (Object *)window, (ULONG *)&gwin);
- gwin->closed = true;
+ ami_gui2_set_closed(gwin, true);
}
HOOKF(void, ami_menu_item_project_print, APTR, window, struct IntuiMessage *)
@@ -166,7 +166,7 @@ HOOKF(void, ami_menu_item_project_print, APTR, window, struct IntuiMessage *)
GetAttr(WINDOW_UserData, (Object *)window, (ULONG *)&gwin);
ami_set_pointer(gwin, GUI_POINTER_WAIT, false);
- ami_print_ui(browser_window_get_content(gwin->gw->bw));
+ ami_print_ui(browser_window_get_content(ami_gui2_get_browser_window(gwin)));
ami_reset_pointer(gwin);
}
@@ -191,7 +191,7 @@ HOOKF(void, ami_menu_item_project_about, APTR, window, struct IntuiMessage *)
#ifdef __amigaos4__
sel = TimedDosRequesterTags(TDR_ImageType,TDRIMAGE_INFO,
TDR_TitleString, messages_get("NetSurf"),
- TDR_Window, gwin->win,
+ TDR_Window, ami_gui2_get_window(gwin),
TDR_GadgetString, temp2,
TDR_FormatString,"NetSurf %s\nBuild date %s\n\nhttp://www.netsurf-browser.org",
TDR_Arg1,netsurf_version,
@@ -206,7 +206,7 @@ HOOKF(void, ami_menu_item_project_about, APTR, window, struct IntuiMessage *)
temp2,
};
- sel = EasyRequest(gwin->win, &about_req, NULL, netsurf_version, verdate);
+ sel = EasyRequest(ami_gui2_get_window(gwin), &about_req, NULL, netsurf_version, verdate);
#endif
free(temp2);
@@ -243,7 +243,7 @@ HOOKF(void, ami_menu_item_edit_cut, APTR, window, struct IntuiMessage *)
struct gui_window_2 *gwin;
GetAttr(WINDOW_UserData, (Object *)window, (ULONG *)&gwin);
- browser_window_key_press(gwin->gw->bw, NS_KEY_CUT_SELECTION);
+ browser_window_key_press(ami_gui2_get_browser_window(gwin), NS_KEY_CUT_SELECTION);
}
HOOKF(void, ami_menu_item_edit_copy, APTR, window, struct IntuiMessage *)
@@ -252,22 +252,22 @@ HOOKF(void, ami_menu_item_edit_copy, APTR, window, struct IntuiMessage *)
struct gui_window_2 *gwin;
GetAttr(WINDOW_UserData, (Object *)window, (ULONG *)&gwin);
- if(browser_window_can_select(gwin->gw->bw)) {
- browser_window_key_press(gwin->gw->bw, NS_KEY_COPY_SELECTION);
- browser_window_key_press(gwin->gw->bw, NS_KEY_CLEAR_SELECTION);
+ if(browser_window_can_select(ami_gui2_get_browser_window(gwin))) {
+ browser_window_key_press(ami_gui2_get_browser_window(gwin), NS_KEY_COPY_SELECTION);
+ browser_window_key_press(ami_gui2_get_browser_window(gwin), NS_KEY_CLEAR_SELECTION);
}
- else if((bm = content_get_bitmap(browser_window_get_content(gwin->gw->bw)))) {
+ else if((bm = content_get_bitmap(browser_window_get_content(ami_gui2_get_browser_window(gwin))))) {
/** @todo It should be checked that the lifetime of
* the objects containing the values returned (and the
* constness cast away) is safe.
*/
- ami_bitmap_set_url(bm, browser_window_get_url(gwin->gw->bw));
- ami_bitmap_set_title(bm, browser_window_get_title(gwin->gw->bw));
+ ami_bitmap_set_url(bm, browser_window_access_url(ami_gui2_get_browser_window(gwin)));
+ ami_bitmap_set_title(bm, browser_window_get_title(ami_gui2_get_browser_window(gwin)));
ami_easy_clipboard_bitmap(bm);
}
#ifdef WITH_NS_SVG
- else if(ami_mime_compare(browser_window_get_content(gwin->gw->bw), "svg") == true) {
- ami_easy_clipboard_svg(browser_window_get_content(gwin->gw->bw));
+ else if(ami_mime_compare(browser_window_get_content(ami_gui2_get_browser_window(gwin)), "svg") == true) {
+ ami_easy_clipboard_svg(browser_window_get_content(ami_gui2_get_browser_window(gwin)));
}
#endif
}
@@ -277,7 +277,7 @@ HOOKF(void, ami_menu_item_edit_paste, APTR, window, struct IntuiMessage *)
struct gui_window_2 *gwin;
GetAttr(WINDOW_UserData, (Object *)window, (ULONG *)&gwin);
- browser_window_key_press(gwin->gw->bw, NS_KEY_PASTE);
+ browser_window_key_press(ami_gui2_get_browser_window(gwin), NS_KEY_PASTE);
}
HOOKF(void, ami_menu_item_edit_selectall, APTR, window, struct IntuiMessage *)
@@ -285,8 +285,8 @@ HOOKF(void, ami_menu_item_edit_selectall, APTR, window, struct IntuiMessage *)
struct gui_window_2 *gwin;
GetAttr(WINDOW_UserData, (Object *)window, (ULONG *)&gwin);
- browser_window_key_press(gwin->gw->bw, NS_KEY_SELECT_ALL);
- gui_start_selection(gwin->gw);
+ browser_window_key_press(ami_gui2_get_browser_window(gwin), NS_KEY_SELECT_ALL);
+ gui_start_selection(ami_gui2_get_gui_window(gwin));
}
HOOKF(void, ami_menu_item_edit_clearsel, APTR, window, struct IntuiMessage *)
@@ -294,7 +294,7 @@ HOOKF(void, ami_menu_item_edit_clearsel, APTR, window, struct IntuiMessage *)
struct gui_window_2 *gwin;
GetAttr(WINDOW_UserData, (Object *)window, (ULONG *)&gwin);
- browser_window_key_press(gwin->gw->bw, NS_KEY_CLEAR_SELECTION);
+ browser_window_key_press(ami_gui2_get_browser_window(gwin), NS_KEY_CLEAR_SELECTION);
}
HOOKF(void, ami_menu_item_edit_undo, APTR, window, struct IntuiMessage *)
@@ -302,7 +302,7 @@ HOOKF(void, ami_menu_item_edit_undo, APTR, window, struct IntuiMessage *)
struct gui_window_2 *gwin;
GetAttr(WINDOW_UserData, (Object *)window, (ULONG *)&gwin);
- browser_window_key_press(gwin->gw->bw, NS_KEY_UNDO);
+ browser_window_key_press(ami_gui2_get_browser_window(gwin), NS_KEY_UNDO);
}
HOOKF(void, ami_menu_item_edit_redo, APTR, window, struct IntuiMessage *)
@@ -310,7 +310,7 @@ HOOKF(void, ami_menu_item_edit_redo, APTR, window, struct IntuiMessage *)
struct gui_window_2 *gwin;
GetAttr(WINDOW_UserData, (Object *)window, (ULONG *)&gwin);
- browser_window_key_press(gwin->gw->bw, NS_KEY_REDO);
+ browser_window_key_press(ami_gui2_get_browser_window(gwin), NS_KEY_REDO);
}
HOOKF(void, ami_menu_item_browser_find, APTR, window, struct IntuiMessage *)
@@ -318,7 +318,7 @@ HOOKF(void, ami_menu_item_browser_find, APTR, window, struct IntuiMessage *)
struct gui_window_2 *gwin;
GetAttr(WINDOW_UserData, (Object *)window, (ULONG *)&gwin);
- ami_search_open(gwin->gw);
+ ami_search_open(ami_gui2_get_gui_window(gwin));
}
HOOKF(void, ami_menu_item_browser_localhistory, APTR, window, struct IntuiMessage *)
@@ -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_local_present(gwin->gw);
+ ami_history_local_present(ami_gui2_get_gui_window(gwin));
}
HOOKF(void, ami_menu_item_browser_globalhistory, APTR, window, struct IntuiMessage *)
@@ -336,7 +336,7 @@ HOOKF(void, ami_menu_item_browser_globalhistory, APTR, window, struct IntuiMessa
HOOKF(void, ami_menu_item_browser_cookies, APTR, window, struct IntuiMessage *)
{
- ami_cookies_present();
+ ami_cookies_present(NULL);
}
HOOKF(void, ami_menu_item_browser_foreimg, APTR, window, struct IntuiMessage *)
@@ -375,12 +375,24 @@ HOOKF(void, ami_menu_item_browser_enablejs, APTR, window, struct IntuiMessage *)
ami_gui_menu_set_check_toggled();
}
+HOOKF(void, ami_menu_item_browser_enablecss, APTR, window, struct IntuiMessage *)
+{
+ struct Menu *menustrip;
+ bool checked = false;
+
+ GetAttr(WINDOW_MenuStrip, (Object *)window, (ULONG *)&menustrip);
+ checked = ami_menu_get_selected(menustrip, msg);
+
+ nsoption_set_bool(author_level_css, checked);
+ ami_gui_menu_set_check_toggled();
+}
+
HOOKF(void, ami_menu_item_browser_scale_decrease, APTR, window, struct IntuiMessage *)
{
struct gui_window_2 *gwin;
GetAttr(WINDOW_UserData, (Object *)window, (ULONG *)&gwin);
- ami_gui_set_scale(gwin->gw, gwin->gw->scale - 0.1);
+ ami_gui_adjust_scale(ami_gui2_get_gui_window(gwin), -0.1);
}
HOOKF(void, ami_menu_item_browser_scale_normal, APTR, window, struct IntuiMessage *)
@@ -388,7 +400,7 @@ HOOKF(void, ami_menu_item_browser_scale_normal, APTR, window, struct IntuiMessag
struct gui_window_2 *gwin;
GetAttr(WINDOW_UserData, (Object *)window, (ULONG *)&gwin);
- ami_gui_set_scale(gwin->gw, 1.0);
+ ami_gui_set_scale(ami_gui2_get_gui_window(gwin), 1.0);
}
HOOKF(void, ami_menu_item_browser_scale_increase, APTR, window, struct IntuiMessage *)
@@ -396,7 +408,7 @@ HOOKF(void, ami_menu_item_browser_scale_increase, APTR, window, struct IntuiMess
struct gui_window_2 *gwin;
GetAttr(WINDOW_UserData, (Object *)window, (ULONG *)&gwin);
- ami_gui_set_scale(gwin->gw, gwin->gw->scale + 0.1);
+ ami_gui_adjust_scale(ami_gui2_get_gui_window(gwin), +0.1);
}
HOOKF(void, ami_menu_item_browser_redraw, APTR, window, struct IntuiMessage *)
@@ -405,7 +417,7 @@ HOOKF(void, ami_menu_item_browser_redraw, APTR, window, struct IntuiMessage *)
GetAttr(WINDOW_UserData, (Object *)window, (ULONG *)&gwin);
ami_schedule_redraw(gwin, true);
- gwin->new_content = true;
+ ami_gui2_set_new_content(gwin, true);
}
HOOKF(void, ami_menu_item_hotlist_add, APTR, window, struct IntuiMessage *)
@@ -414,12 +426,12 @@ HOOKF(void, ami_menu_item_hotlist_add, APTR, window, struct IntuiMessage *)
struct gui_window_2 *gwin;
GetAttr(WINDOW_UserData, (Object *)window, (ULONG *)&gwin);
- bw = gwin->gw->bw;
+ bw = ami_gui2_get_browser_window(gwin);
if (bw == NULL || browser_window_has_content(bw) == false)
return;
- hotlist_add_url(browser_window_get_url(bw));
+ hotlist_add_url(browser_window_access_url(bw));
ami_gui_update_hotlist_button(gwin);
}
@@ -436,7 +448,7 @@ HOOKF(void, ami_menu_item_hotlist_entries, APTR, window, struct IntuiMessage *)
if(url == NULL) return;
- browser_window_navigate(gwin->gw->bw,
+ browser_window_navigate(ami_gui2_get_browser_window(gwin),
url,
NULL,
BW_NAVIGATE_HISTORY,
@@ -455,10 +467,10 @@ HOOKF(void, ami_menu_item_settings_snapshot, APTR, window, struct IntuiMessage *
struct gui_window_2 *gwin;
GetAttr(WINDOW_UserData, (Object *)window, (ULONG *)&gwin);
- nsoption_set_int(window_x, gwin->win->LeftEdge);
- nsoption_set_int(window_y, gwin->win->TopEdge);
- nsoption_set_int(window_width, gwin->win->Width);
- nsoption_set_int(window_height, gwin->win->Height);
+ nsoption_set_int(window_x, ami_gui2_get_window(gwin)->LeftEdge);
+ nsoption_set_int(window_y, ami_gui2_get_window(gwin)->TopEdge);
+ nsoption_set_int(window_width, ami_gui2_get_window(gwin)->Width);
+ nsoption_set_int(window_height, ami_gui2_get_window(gwin)->Height);
}
HOOKF(void, ami_menu_item_settings_save, APTR, window, struct IntuiMessage *)
@@ -473,10 +485,10 @@ HOOKF(void, ami_menu_item_arexx_execute, APTR, window, struct IntuiMessage *)
GetAttr(WINDOW_UserData, (Object *)window, (ULONG *)&gwin);
if(AslRequestTags(filereq,
- ASLFR_Window, gwin->win,
+ ASLFR_Window, ami_gui2_get_window(gwin),
ASLFR_SleepWindow, TRUE,
ASLFR_TitleText, messages_get("NetSurf"),
- ASLFR_Screen, scrn,
+ ASLFR_Screen, ami_gui_get_screen(),
ASLFR_DoSaveMode, FALSE,
ASLFR_InitialDrawer, nsoption_charp(arexx_dir),
ASLFR_InitialPattern, "#?.nsrx",
@@ -582,6 +594,10 @@ ULONG ami_gui_menu_number(int item)
case M_JS:
menu_num = FULLMENUNUM(2,9,0);
break;
+
+ case M_CSS:
+ menu_num = FULLMENUNUM(2,10,0);
+ break;
default:
NSLOG(netsurf, INFO,
@@ -681,7 +697,7 @@ void ami_gui_menu_update_checked(struct gui_window_2 *gwin)
struct Menu *menustrip;
- GetAttr(WINDOW_MenuStrip, gwin->objects[OID_MAIN], (ULONG *)&menustrip);
+ GetAttr(WINDOW_MenuStrip, ami_gui2_get_object(gwin, AMI_WIN_MAIN), (ULONG *)&menustrip);
if(!menustrip) return;
if(nsoption_bool(enable_javascript) == true) {
if((ItemAddress(menustrip, ami_gui_menu_number(M_JS))->Flags & CHECKED) == 0)
@@ -690,6 +706,13 @@ void ami_gui_menu_update_checked(struct gui_window_2 *gwin)
if(ItemAddress(menustrip, ami_gui_menu_number(M_JS))->Flags & CHECKED)
ItemAddress(menustrip, ami_gui_menu_number(M_JS))->Flags ^= CHECKED;
}
+ if(nsoption_bool(author_level_css) == true) {
+ if((ItemAddress(menustrip, ami_gui_menu_number(M_CSS))->Flags & CHECKED) == 0)
+ ItemAddress(menustrip, ami_gui_menu_number(M_CSS))->Flags ^= CHECKED;
+ } else {
+ if(ItemAddress(menustrip, ami_gui_menu_number(M_CSS))->Flags & CHECKED)
+ ItemAddress(menustrip, ami_gui_menu_number(M_CSS))->Flags ^= CHECKED;
+ }
if(nsoption_bool(foreground_images) == true) {
if((ItemAddress(menustrip, ami_gui_menu_number(M_IMGFORE))->Flags & CHECKED) == 0)
ItemAddress(menustrip, ami_gui_menu_number(M_IMGFORE))->Flags ^= CHECKED;
@@ -706,24 +729,24 @@ void ami_gui_menu_update_checked(struct gui_window_2 *gwin)
ItemAddress(menustrip, ami_gui_menu_number(M_IMGBACK))->Flags ^= CHECKED;
}
- ResetMenuStrip(gwin->win, menustrip);
+ ResetMenuStrip(ami_gui2_get_window(gwin), menustrip);
}
void ami_gui_menu_update_disabled(struct gui_window *g, struct hlcache_handle *c)
{
- struct Window *win = g->shared->win;
+ struct Window *win = ami_gui_get_window(g);
if(nsoption_bool(kiosk_mode) == true) return;
if(content_get_type(c) <= CONTENT_CSS)
{
- ami_gui_menu_set_disabled(win, g->shared->imenu, M_SAVETXT, false);
- ami_gui_menu_set_disabled(win, g->shared->imenu, M_SAVECOMP, false);
+ ami_gui_menu_set_disabled(win, ami_gui_get_menu(g), M_SAVETXT, false);
+ ami_gui_menu_set_disabled(win, ami_gui_get_menu(g), M_SAVECOMP, false);
#ifdef WITH_PDF_EXPORT
- ami_gui_menu_set_disabled(win, g->shared->imenu, M_SAVEPDF, false);
+ ami_gui_menu_set_disabled(win, ami_gui_get_menu(g), M_SAVEPDF, false);
#endif
#if 0
- if(browser_window_get_editor_flags(g->bw) & BW_EDITOR_CAN_COPY) {
+ if(browser_window_get_editor_flags(ami_gui_get_browser_window(g)) & BW_EDITOR_CAN_COPY) {
OnMenu(win,AMI_MENU_COPY);
OnMenu(win,AMI_MENU_CLEAR);
} else {
@@ -731,39 +754,39 @@ void ami_gui_menu_update_disabled(struct gui_window *g, struct hlcache_handle *c
OffMenu(win,AMI_MENU_CLEAR);
}
- if(browser_window_get_editor_flags(g->bw) & BW_EDITOR_CAN_CUT)
+ if(browser_window_get_editor_flags(ami_gui_get_browser_window(g)) & BW_EDITOR_CAN_CUT)
OnMenu(win,AMI_MENU_CUT);
else
OffMenu(win,AMI_MENU_CUT);
- if(browser_window_get_editor_flags(g->bw) & BW_EDITOR_CAN_PASTE)
+ if(browser_window_get_editor_flags(ami_gui_get_browser_window(g)) & BW_EDITOR_CAN_PASTE)
OnMenu(win,AMI_MENU_PASTE);
else
OffMenu(win,AMI_MENU_PASTE);
#else
- ami_gui_menu_set_disabled(win, g->shared->imenu, M_CUT, false);
- ami_gui_menu_set_disabled(win, g->shared->imenu, M_COPY, false);
- ami_gui_menu_set_disabled(win, g->shared->imenu, M_PASTE, false);
- ami_gui_menu_set_disabled(win, g->shared->imenu, M_CLEAR, false);
+ ami_gui_menu_set_disabled(win, ami_gui_get_menu(g), M_CUT, false);
+ ami_gui_menu_set_disabled(win, ami_gui_get_menu(g), M_COPY, false);
+ ami_gui_menu_set_disabled(win, ami_gui_get_menu(g), M_PASTE, false);
+ ami_gui_menu_set_disabled(win, ami_gui_get_menu(g), M_CLEAR, false);
#endif
- ami_gui_menu_set_disabled(win, g->shared->imenu, M_SELALL, false);
- ami_gui_menu_set_disabled(win, g->shared->imenu, M_FIND, false);
- ami_gui_menu_set_disabled(win, g->shared->imenu, M_SAVEIFF, true);
+ ami_gui_menu_set_disabled(win, ami_gui_get_menu(g), M_SELALL, false);
+ ami_gui_menu_set_disabled(win, ami_gui_get_menu(g), M_FIND, false);
+ ami_gui_menu_set_disabled(win, ami_gui_get_menu(g), M_SAVEIFF, true);
}
else
{
- ami_gui_menu_set_disabled(win, g->shared->imenu, M_CUT, true);
- ami_gui_menu_set_disabled(win, g->shared->imenu, M_PASTE, true);
- ami_gui_menu_set_disabled(win, g->shared->imenu, M_CLEAR, true);
+ ami_gui_menu_set_disabled(win, ami_gui_get_menu(g), M_CUT, true);
+ ami_gui_menu_set_disabled(win, ami_gui_get_menu(g), M_PASTE, true);
+ ami_gui_menu_set_disabled(win, ami_gui_get_menu(g), M_CLEAR, true);
- ami_gui_menu_set_disabled(win, g->shared->imenu, M_SAVETXT, true);
- ami_gui_menu_set_disabled(win, g->shared->imenu, M_SAVECOMP, true);
+ ami_gui_menu_set_disabled(win, ami_gui_get_menu(g), M_SAVETXT, true);
+ ami_gui_menu_set_disabled(win, ami_gui_get_menu(g), M_SAVECOMP, true);
#ifdef WITH_PDF_EXPORT
- ami_gui_menu_set_disabled(win, g->shared->imenu, M_SAVEPDF, true);
+ ami_gui_menu_set_disabled(win, ami_gui_get_menu(g), M_SAVEPDF, true);
#endif
- ami_gui_menu_set_disabled(win, g->shared->imenu, M_SELALL, true);
- ami_gui_menu_set_disabled(win, g->shared->imenu, M_FIND, true);
+ ami_gui_menu_set_disabled(win, ami_gui_get_menu(g), M_SELALL, true);
+ ami_gui_menu_set_disabled(win, ami_gui_get_menu(g), M_FIND, true);
#ifdef WITH_NS_SVG
if(content_get_bitmap(c) || (ami_mime_compare(c, "svg") == true))
@@ -771,13 +794,13 @@ void ami_gui_menu_update_disabled(struct gui_window *g, struct hlcache_handle *c
if(content_get_bitmap(c))
#endif
{
- ami_gui_menu_set_disabled(win, g->shared->imenu, M_COPY, false);
- ami_gui_menu_set_disabled(win, g->shared->imenu, M_SAVEIFF, false);
+ ami_gui_menu_set_disabled(win, ami_gui_get_menu(g), M_COPY, false);
+ ami_gui_menu_set_disabled(win, ami_gui_get_menu(g), M_SAVEIFF, false);
}
else
{
- ami_gui_menu_set_disabled(win, g->shared->imenu, M_COPY, true);
- ami_gui_menu_set_disabled(win, g->shared->imenu, M_SAVEIFF, true);
+ ami_gui_menu_set_disabled(win, ami_gui_get_menu(g), M_COPY, true);
+ ami_gui_menu_set_disabled(win, ami_gui_get_menu(g), M_SAVEIFF, true);
}
}
}
@@ -919,6 +942,10 @@ static void ami_init_menulabs(struct ami_menu_data **md)
if(nsoption_bool(enable_javascript) == true)
js_flags |= CHECKED;
+ UWORD css_flags = CHECKIT | MENUTOGGLE;
+ if(nsoption_bool(author_level_css) == true)
+ css_flags |= CHECKED;
+
UWORD imgfore_flags = CHECKIT | MENUTOGGLE;
if(nsoption_bool(foreground_images) == true)
imgfore_flags |= CHECKED;
@@ -1007,6 +1034,8 @@ static void ami_init_menulabs(struct ami_menu_data **md)
ami_menu_item_browser_backimg, NULL, imgback_flags);
ami_menu_alloc_item(md, M_JS, NM_ITEM, "EnableJS", NULL, NULL,
ami_menu_item_browser_enablejs, NULL, js_flags);
+ ami_menu_alloc_item(md, M_CSS, NM_ITEM, "EnableCSS", NULL, NULL,
+ ami_menu_item_browser_enablecss, NULL, css_flags);
ami_menu_alloc_item(md, M_BAR_B4, NM_ITEM, NM_BARLABEL, NULL, NULL, NULL, NULL, 0);
ami_menu_alloc_item(md, M_REDRAW, NM_ITEM, "Redraw", NULL, "TBImages:list_wand",
ami_menu_item_browser_redraw, NULL, 0);
@@ -1035,26 +1064,32 @@ struct Menu *ami_gui_menu_create(struct gui_window_2 *gwin)
if(LIB_IS_AT_LEAST((struct Library *)IntuitionBase, 54, 6)) {
#ifdef __amigaos4__
if(gui_menu != NULL) {
- gwin->imenu = gui_menu;
+ ami_gui2_set_menu(gwin, gui_menu);
gui_menu_count++;
- return gwin->imenu;
+ return gui_menu;
}
ami_init_menulabs(gui_menu_data);
ami_menu_scan(gui_menu_data);
ami_menu_arexx_scan(gui_menu_data);
- gwin->imenu = ami_menu_layout(gui_menu_data, AMI_MENU_AREXX_MAX);
+ gui_menu = ami_menu_layout(gui_menu_data, AMI_MENU_AREXX_MAX);
- gui_menu = gwin->imenu;
+ ami_gui2_set_menu(gwin, gui_menu);
gui_menu_count++;
+ return gui_menu;
#endif
} else {
- ami_init_menulabs(gwin->menu_data);
- ami_menu_scan(gwin->menu_data);
- ami_menu_arexx_scan(gwin->menu_data);
- gwin->imenu = ami_menu_layout(gwin->menu_data, AMI_MENU_AREXX_MAX);
+ struct Menu *temp_menu;
+ struct ami_menu_data **md = ami_gui2_get_menu_data(gwin);
+
+ ami_init_menulabs(md);
+ ami_menu_scan(md);
+ ami_menu_arexx_scan(md);
+ temp_menu = ami_menu_layout(md, AMI_MENU_AREXX_MAX);
+ ami_gui2_set_menu(gwin, temp_menu);
+ return temp_menu;
}
- return gwin->imenu;
+ return NULL; // shouldn't get this far
}
static void ami_free_menulabs(struct ami_menu_data **md)
@@ -1089,13 +1124,24 @@ static void ami_free_menulabs(struct ami_menu_data **md)
}
}
+void ami_gui_menu_freemenus(struct Menu *menu, struct ami_menu_data **md)
+{
+ if(menu != NULL) {
+ FreeMenus(menu);
+ }
+
+ if(md != NULL) {
+ ami_free_menulabs(md);
+ }
+}
+
void ami_gui_menu_free(struct gui_window_2 *gwin)
{
if(LIB_IS_AT_LEAST((struct Library *)IntuitionBase, 54, 6)) {
#ifdef __amigaos4__
gui_menu_count--;
- SetAttrs(gwin->objects[OID_MAIN], WINDOW_MenuStrip, NULL, TAG_DONE);
+ SetAttrs(ami_gui2_get_object(gwin, AMI_WIN_MAIN), WINDOW_MenuStrip, NULL, TAG_DONE);
if(gui_menu_count == 0) {
ami_free_menulabs(gui_menu_data);
@@ -1105,8 +1151,7 @@ void ami_gui_menu_free(struct gui_window_2 *gwin)
}
#endif
} else {
- ami_free_menulabs(gwin->menu_data);
- FreeMenus(gwin->imenu);
+ ami_gui2_set_menu(gwin, NULL);
}
}
diff --git a/frontends/amiga/gui_menu.h b/frontends/amiga/gui_menu.h
index 3490fe9c1..ae36397c5 100644
--- a/frontends/amiga/gui_menu.h
+++ b/frontends/amiga/gui_menu.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2008-2017 Chris Young <chris@unsatisfactorysoftware.co.uk>
+ * Copyright 2008-2024 Chris Young <chris@unsatisfactorysoftware.co.uk>
*
* This file is part of NetSurf, http://www.netsurf-browser.org/
*
@@ -78,13 +78,14 @@ enum {
M_IMGFORE,
M_IMGBACK,
M_JS,
+ M_CSS,
M_BAR_B4,
M_REDRAW,
/* Hotlist menu */
M_HOTLIST,
M_HLADD,
M_HLSHOW,
- M_BAR_H1, // 47
+ M_BAR_H1, // 48
AMI_MENU_HOTLIST, /* Where the hotlist entries start */
AMI_MENU_HOTLIST_MAX = AMI_MENU_HOTLIST + AMI_HOTLIST_ITEMS,
/* Settings menu */
@@ -109,6 +110,7 @@ struct gui_window;
struct gui_window_2;
struct hlcache_handle;
struct Window;
+struct ami_menu_data;
ULONG ami_gui_menu_number(int item);
struct Menu *ami_gui_menu_create(struct gui_window_2 *gwin);
@@ -154,5 +156,10 @@ void ami_gui_menu_refresh_hotlist(void);
* \return true if NetSurf has been quit
*/
bool ami_gui_menu_quit_selected(void);
+
+/**
+ * Frees a menu. Only used on OS3 and old OS4.
+ */
+void ami_gui_menu_freemenus(struct Menu *menu, struct ami_menu_data **md);
#endif
diff --git a/frontends/amiga/gui_options.c b/frontends/amiga/gui_options.c
index 8a9fd7bd7..c8c51b012 100755
--- a/frontends/amiga/gui_options.c
+++ b/frontends/amiga/gui_options.c
@@ -83,7 +83,8 @@
enum
{
- GID_OPTS_MAIN = GID_MAIN,
+ OID_MAIN = 0,
+ GID_OPTS_MAIN,
GID_OPTS_HOMEPAGE,
GID_OPTS_HOMEPAGE_DEFAULT,
GID_OPTS_HOMEPAGE_CURRENT,
@@ -93,6 +94,7 @@ enum
GID_OPTS_FROMLOCALE,
GID_OPTS_HISTORY,
GID_OPTS_JAVASCRIPT,
+ GID_OPTS_ENABLECSS,
GID_OPTS_REFERRAL,
GID_OPTS_DONOTTRACK,
GID_OPTS_FASTSCROLL,
@@ -101,6 +103,9 @@ enum
GID_OPTS_SCREENNAME,
GID_OPTS_WIN_SIMPLE,
GID_OPTS_THEME,
+ GID_OPTS_THEMEPAGE,
+ GID_OPTS_DARK,
+ GID_OPTS_LIGHT,
GID_OPTS_PTRTRUE,
GID_OPTS_PTROS,
GID_OPTS_PROXY,
@@ -115,7 +120,6 @@ enum
GID_OPTS_NATIVEBM,
GID_OPTS_SCALEQ,
GID_OPTS_DITHERQ,
- GID_OPTS_ANIMSPEED,
GID_OPTS_ANIMDISABLE,
GID_OPTS_DPI_Y,
GID_OPTS_FONT_SANS,
@@ -210,6 +214,7 @@ enum
#define OPTS_LAST LAB_OPTS_LAST
#define OPTS_MAX_TABS 10
#define OPTS_MAX_SCREEN 4
+#define OPTS_MAX_THEMEPAGE 3
#define OPTS_MAX_PROXY 5
#define OPTS_MAX_NATIVEBM 4
#define OPTS_MAX_DITHER 4
@@ -227,6 +232,7 @@ struct ami_gui_opts_window {
#ifndef __amigaos4__
struct List clicktablist;
struct List screenoptslist;
+ struct List pagethemeoptslist;
struct List proxyoptslist;
struct List nativebmoptslist;
struct List ditheroptslist;
@@ -246,6 +252,7 @@ static struct ami_gui_opts_window *gow = NULL;
static CONST_STRPTR tabs[OPTS_MAX_TABS];
static STRPTR screenopts[OPTS_MAX_SCREEN];
+static CONST_STRPTR pagethemeopts[OPTS_MAX_THEMEPAGE];
static CONST_STRPTR proxyopts[OPTS_MAX_PROXY];
static CONST_STRPTR nativebmopts[OPTS_MAX_NATIVEBM];
static CONST_STRPTR ditheropts[OPTS_MAX_DITHER];
@@ -270,9 +277,8 @@ static void ami_gui_opts_array_to_list(struct List *list, const char *array[], i
node = AllocChooserNode(CNA_Text, array[i], TAG_DONE);
break;
case NSA_LIST_RADIO:
- /* Note: RBNA_Labels is RBNA_Label in OS4
- * Also note: These labels don't work (FIXME) */
- node = AllocRadioButtonNode(RBNA_Labels, array[i], TAG_DONE);
+ /* Note: RBNA_Labels is RBNA_Label in OS4 */
+ node = AllocRadioButtonNode(0, RBNA_Labels, array[i], TAG_DONE);
break;
default:
break;
@@ -334,6 +340,10 @@ static void ami_gui_opts_setup(struct ami_gui_opts_window *gow)
screenopts[2] = (char *)ami_utf8_easy((char *)messages_get("ScreenPublic"));
screenopts[3] = NULL;
+ pagethemeopts[0] = (char *)ami_utf8_easy((char *)messages_get("Light"));
+ pagethemeopts[1] = (char *)ami_utf8_easy((char *)messages_get("Dark"));
+ pagethemeopts[2] = NULL;
+
proxyopts[0] = (char *)ami_utf8_easy((char *)messages_get("ProxyNone"));
proxyopts[1] = (char *)ami_utf8_easy((char *)messages_get("ProxyNoAuth"));
proxyopts[2] = (char *)ami_utf8_easy((char *)messages_get("ProxyBasic"));
@@ -360,10 +370,15 @@ static void ami_gui_opts_setup(struct ami_gui_opts_window *gow)
gadlab[GID_OPTS_FROMLOCALE] = (char *)ami_utf8_easy((char *)messages_get("LocaleLang"));
gadlab[GID_OPTS_HISTORY] = (char *)ami_utf8_easy((char *)messages_get("HistoryAge"));
gadlab[GID_OPTS_JAVASCRIPT] = (char *)ami_utf8_easy((char *)messages_get("EnableJS"));
+ gadlab[GID_OPTS_ENABLECSS] = (char *)ami_utf8_easy((char *)messages_get("EnableCSS"));
gadlab[GID_OPTS_REFERRAL] = (char *)ami_utf8_easy((char *)messages_get("SendReferer"));
gadlab[GID_OPTS_DONOTTRACK] = (char *)ami_utf8_easy((char *)messages_get("DoNotTrack"));
gadlab[GID_OPTS_FASTSCROLL] = (char *)ami_utf8_easy((char *)messages_get("FastScrolling"));
gadlab[GID_OPTS_WIN_SIMPLE] = (char *)ami_utf8_easy((char *)messages_get("SimpleRefresh"));
+ gadlab[GID_OPTS_THEME] = (char *)ami_utf8_easy((char *)messages_get("ThemeGUI"));
+ gadlab[GID_OPTS_THEMEPAGE] = (char *)ami_utf8_easy((char *)messages_get("ThemePage"));
+ gadlab[GID_OPTS_DARK] = (char *)ami_utf8_easy((char *)messages_get("Dark"));
+ gadlab[GID_OPTS_LIGHT] = (char *)ami_utf8_easy((char *)messages_get("Light"));
gadlab[GID_OPTS_PTRTRUE] = (char *)ami_utf8_easy((char *)messages_get("TrueColour"));
gadlab[GID_OPTS_PTROS] = (char *)ami_utf8_easy((char *)messages_get("OSPointers"));
gadlab[GID_OPTS_PROXY] = (char *)ami_utf8_easy((char *)messages_get("ProxyType"));
@@ -377,7 +392,6 @@ static void ami_gui_opts_setup(struct ami_gui_opts_window *gow)
gadlab[GID_OPTS_NATIVEBM] = (char *)ami_utf8_easy((char *)messages_get("CacheNative"));
gadlab[GID_OPTS_SCALEQ] = (char *)ami_utf8_easy((char *)messages_get("ScaleQuality"));
gadlab[GID_OPTS_DITHERQ] = (char *)ami_utf8_easy((char *)messages_get("DitherQuality"));
- gadlab[GID_OPTS_ANIMSPEED] = (char *)ami_utf8_easy((char *)messages_get("AnimSpeedLimit"));
gadlab[GID_OPTS_DPI_Y] = (char *)ami_utf8_easy((char *)messages_get("ResolutionY"));
gadlab[GID_OPTS_ANIMDISABLE] = (char *)ami_utf8_easy((char *)messages_get("AnimDisable"));
gadlab[GID_OPTS_FONT_SANS] = (char *)ami_utf8_easy((char *)messages_get("FontSans"));
@@ -423,7 +437,6 @@ static void ami_gui_opts_setup(struct ami_gui_opts_window *gow)
gadlab[LAB_OPTS_WINTITLE] = (char *)ami_utf8_easy((char *)messages_get("Preferences"));
gadlab[LAB_OPTS_RESTART] = (char *)ami_utf8_easy((char *)messages_get("NeedRestart"));
gadlab[LAB_OPTS_DAYS] = (char *)ami_utf8_easy((char *)messages_get("Days"));
- gadlab[LAB_OPTS_SECS] = (char *)ami_utf8_easy((char *)messages_get("AnimSpeedFrames"));
gadlab[LAB_OPTS_PT] = (char *)ami_utf8_easy((char *)messages_get("Pt"));
gadlab[LAB_OPTS_MM] = (char *)ami_utf8_easy((char *)messages_get("MM"));
gadlab[LAB_OPTS_MB] = (char *)ami_utf8_easy((char *)messages_get("MBytes"));
@@ -469,6 +482,7 @@ static void ami_gui_opts_setup(struct ami_gui_opts_window *gow)
#ifndef __amigaos4__
ami_gui_opts_array_to_list(&gow->clicktablist, tabs, NSA_LIST_CLICKTAB);
ami_gui_opts_array_to_list(&gow->screenoptslist, screenopts, NSA_LIST_RADIO);
+ ami_gui_opts_array_to_list(&gow->pagethemeoptslist, pagethemeopts, NSA_LIST_CHOOSER);
ami_gui_opts_array_to_list(&gow->proxyoptslist, proxyopts, NSA_LIST_CHOOSER);
ami_gui_opts_array_to_list(&gow->nativebmoptslist, nativebmopts, NSA_LIST_CHOOSER);
ami_gui_opts_array_to_list(&gow->ditheroptslist, ditheropts, NSA_LIST_CHOOSER);
@@ -500,6 +514,7 @@ static void ami_gui_opts_free(struct ami_gui_opts_window *gow)
#ifndef __amigaos4__
ami_gui_opts_free_list(&gow->clicktablist, NSA_LIST_CLICKTAB);
ami_gui_opts_free_list(&gow->screenoptslist, NSA_LIST_RADIO);
+ ami_gui_opts_free_list(&gow->pagethemeoptslist, NSA_LIST_CHOOSER);
ami_gui_opts_free_list(&gow->proxyoptslist, NSA_LIST_CHOOSER);
ami_gui_opts_free_list(&gow->nativebmoptslist, NSA_LIST_CHOOSER);
ami_gui_opts_free_list(&gow->ditheroptslist, NSA_LIST_CHOOSER);
@@ -514,12 +529,11 @@ void ami_gui_opts_open(void)
ULONG proxytype = 0;
BOOL screenmodedisabled = FALSE, screennamedisabled = FALSE;
BOOL proxyhostdisabled = TRUE, proxyauthdisabled = TRUE, proxybypassdisabled = FALSE;
- BOOL disableanims, animspeeddisabled = FALSE, acceptlangdisabled = FALSE;
+ BOOL disableanims, acceptlangdisabled = FALSE;
BOOL scaleselected = nsoption_bool(scale_quality), scaledisabled = FALSE;
BOOL ditherdisable = TRUE;
BOOL download_notify_disabled = FALSE, tab_always_show_disabled = FALSE;
BOOL ptr_disable = FALSE;
- char animspeed[10];
char *homepage_url_lc = ami_utf8_easy(nsoption_charp(homepage_url));
struct TextAttr fontsans, fontserif, fontmono, fontcursive, fontfantasy;
@@ -583,17 +597,13 @@ void ami_gui_opts_open(void)
proxybypassdisabled = TRUE;
}
- sprintf(animspeed,"%.2f",(float)(nsoption_int(minimum_gif_delay)/100.0));
-
if(nsoption_bool(animate_images))
{
disableanims = FALSE;
- animspeeddisabled = FALSE;
}
else
{
disableanims = TRUE;
- animspeeddisabled = TRUE;
}
if(nsoption_bool(accept_lang_locale))
@@ -657,8 +667,8 @@ void ami_gui_opts_open(void)
WA_DragBar, TRUE,
WA_CloseGadget, TRUE,
WA_SizeGadget, FALSE,
- WA_PubScreen,scrn,
- WINDOW_SharedPort,sport,
+ WA_PubScreen, ami_gui_get_screen(),
+ WINDOW_SharedPort, ami_gui_get_shared_msgport(),
WINDOW_UserData,gow,
WINDOW_IconifyGadget, FALSE,
WINDOW_Position, WPOS_CENTERSCREEN,
@@ -866,6 +876,23 @@ void ami_gui_opts_open(void)
GETFILE_ReadOnly, TRUE,
GETFILE_FullFileExpand, FALSE,
GetFileEnd,
+ CHILD_Label, LabelObj,
+ LABEL_Text, gadlab[GID_OPTS_THEME],
+ LabelEnd,
+ LAYOUT_AddChild, gow->objects[GID_OPTS_THEMEPAGE] = ChooserObj,
+ GA_ID, GID_OPTS_THEMEPAGE,
+ GA_RelVerify, TRUE,
+ CHOOSER_PopUp, TRUE,
+#ifdef __amigaos4__
+ CHOOSER_LabelArray, pagethemeopts,
+#else
+ CHOOSER_Labels, &gow->pagethemeoptslist,
+#endif
+ CHOOSER_Selected, nsoption_bool(prefer_dark_mode),
+ ChooserEnd,
+ CHILD_Label, LabelObj,
+ LABEL_Text, gadlab[GID_OPTS_THEMEPAGE],
+ LabelEnd,
LayoutEnd, // theme
CHILD_WeightedHeight, 0,
LAYOUT_AddChild, LayoutVObj,
@@ -1071,24 +1098,6 @@ void ami_gui_opts_open(void)
LAYOUT_SpaceOuter, TRUE,
LAYOUT_BevelStyle, BVS_GROUP,
LAYOUT_Label, gadlab[GRP_OPTS_ANIMS],
- LAYOUT_AddChild, LayoutHObj,
- LAYOUT_LabelColumn, PLACETEXT_RIGHT,
- LAYOUT_AddChild, gow->objects[GID_OPTS_ANIMSPEED] = StringObj,
- GA_ID, GID_OPTS_ANIMSPEED,
- GA_RelVerify, TRUE,
- GA_Disabled, animspeeddisabled,
- STRINGA_HookType, SHK_FLOAT,
- STRINGA_TextVal, animspeed,
- STRINGA_BufferPos,0,
- StringEnd,
- CHILD_WeightedWidth, 0,
- CHILD_Label, LabelObj,
- LABEL_Text, gadlab[LAB_OPTS_SECS],
- LabelEnd,
- LayoutEnd,
- CHILD_Label, LabelObj,
- LABEL_Text, gadlab[GID_OPTS_ANIMSPEED],
- LabelEnd,
LAYOUT_AddChild, gow->objects[GID_OPTS_ANIMDISABLE] = CheckBoxObj,
GA_ID, GID_OPTS_ANIMDISABLE,
GA_RelVerify, TRUE,
@@ -1492,6 +1501,12 @@ void ami_gui_opts_open(void)
GA_Selected, !nsoption_bool(core_select_menu),
GA_Disabled, !ami_selectmenu_is_safe(),
CheckBoxEnd,
+ LAYOUT_AddChild, gow->objects[GID_OPTS_ENABLECSS] = CheckBoxObj,
+ GA_ID, GID_OPTS_ENABLECSS,
+ GA_RelVerify, TRUE,
+ GA_Text, gadlab[GID_OPTS_ENABLECSS],
+ GA_Selected, nsoption_bool(author_level_css),
+ CheckBoxEnd,
LayoutEnd, // misc
CHILD_WeightedHeight, 0,
@@ -1684,7 +1699,6 @@ void ami_gui_opts_open(void)
static void ami_gui_opts_use(bool save)
{
ULONG data, id = 0;
- float animspeed;
struct TextAttr *tattr;
char *dot;
bool rescan_fonts = false;
@@ -1736,7 +1750,16 @@ static void ami_gui_opts_use(bool save)
} else {
nsoption_set_bool(do_not_track, false);
}
-
+
+ GetAttr(GA_Selected,gow->objects[GID_OPTS_ENABLECSS],(ULONG *)&data);
+ if (data) {
+ nsoption_set_bool(author_level_css, true);
+ } else {
+ nsoption_set_bool(author_level_css, false);
+ }
+
+ ami_gui_menu_set_checked(NULL, M_CSS, nsoption_bool(author_level_css));
+
GetAttr(GA_Selected,gow->objects[GID_OPTS_FASTSCROLL],(ULONG *)&data);
if (data) {
nsoption_set_bool(faster_scroll, true);
@@ -1748,7 +1771,7 @@ static void ami_gui_opts_use(bool save)
switch(data)
{
case 0:
- nsoption_set_charp(pubscreen_name, strdup("\0"));
+ nsoption_set_charp(pubscreen_name, NULL);
break;
case 1:
@@ -1781,6 +1804,13 @@ static void ami_gui_opts_use(bool save)
GetAttr(GETFILE_Drawer,gow->objects[GID_OPTS_THEME],(ULONG *)&data);
nsoption_set_charp(theme, (char *)strdup((char *)data));
+ GetAttr(CHOOSER_Selected,gow->objects[GID_OPTS_THEMEPAGE],(ULONG *)&data);
+ if(data) {
+ nsoption_set_bool(prefer_dark_mode, true);
+ } else {
+ nsoption_set_bool(prefer_dark_mode, false);
+ }
+
GetAttr(GA_Selected,gow->objects[GID_OPTS_PTRTRUE],(ULONG *)&data);
if (data) {
nsoption_set_bool(truecolour_mouse_pointers, true);
@@ -1835,10 +1865,6 @@ static void ami_gui_opts_use(bool save)
GetAttr(CHOOSER_Selected,gow->objects[GID_OPTS_DITHERQ],(ULONG *)&nsoption_int(dither_quality));
- GetAttr(STRINGA_TextVal,gow->objects[GID_OPTS_ANIMSPEED],(ULONG *)&data);
- animspeed = strtof((char *)data, NULL);
- nsoption_set_int(minimum_gif_delay, (int)(animspeed * 100));
-
GetAttr(GA_Selected,gow->objects[GID_OPTS_ANIMDISABLE],(ULONG *)&data);
if(data) {
nsoption_set_bool(animate_images, false);
@@ -2109,10 +2135,10 @@ static BOOL ami_gui_opts_event(void *w)
case WMHI_GADGETHELP:
if((result & WMHI_GADGETMASK) == 0) {
/* Pointer not over our window */
- ami_help_open(AMI_HELP_MAIN, scrn);
+ ami_help_open(AMI_HELP_MAIN, ami_gui_get_screen());
} else {
/* TODO: Make this sensitive to the tab the user is currently on */
- ami_help_open(AMI_HELP_PREFS, scrn);
+ ami_help_open(AMI_HELP_PREFS, ami_gui_get_screen());
}
break;
@@ -2141,9 +2167,9 @@ static BOOL ami_gui_opts_event(void *w)
break;
case GID_OPTS_HOMEPAGE_CURRENT:
- if(cur_gw) RefreshSetGadgetAttrs((struct Gadget *)gow->objects[GID_OPTS_HOMEPAGE],
+ if(ami_gui_get_active_gw()) RefreshSetGadgetAttrs((struct Gadget *)gow->objects[GID_OPTS_HOMEPAGE],
gow->win, NULL, STRINGA_TextVal,
- nsurl_access(browser_window_get_url(cur_gw->bw)), TAG_DONE);
+ nsurl_access(browser_window_access_url(ami_gui_get_browser_window(ami_gui_get_active_gw()))), TAG_DONE);
break;
case GID_OPTS_HOMEPAGE_BLANK:
@@ -2250,8 +2276,6 @@ static BOOL ami_gui_opts_event(void *w)
break;
case GID_OPTS_ANIMDISABLE:
- RefreshSetGadgetAttrs((struct Gadget *)gow->objects[GID_OPTS_ANIMSPEED],
- gow->win,NULL, GA_Disabled, code, TAG_DONE);
break;
case GID_OPTS_FONT_SANS:
diff --git a/frontends/amiga/history.c b/frontends/amiga/history.c
index e724f3e70..fd33a67f3 100644
--- a/frontends/amiga/history.c
+++ b/frontends/amiga/history.c
@@ -200,10 +200,10 @@ ami_history_global_drag_end(struct ami_corewindow *ami_cw, int x, int y)
}
if((ok == false) || (url == NULL)) {
- DisplayBeep(scrn);
+ ami_gui_beep();
} else if(url) {
if((gwin = ami_window_at_pointer(AMINS_WINDOW))) {
- browser_window_navigate(gwin->gw->bw,
+ browser_window_navigate(ami_gui2_get_browser_window(gwin),
url,
NULL,
BW_NAVIGATE_HISTORY,
@@ -233,7 +233,7 @@ HOOKF(void, ami_history_global_menu_item_project_export, APTR, window, struct In
ASLFR_Window, ami_cw->win,
ASLFR_SleepWindow, TRUE,
ASLFR_TitleText, messages_get("NetSurf"),
- ASLFR_Screen, scrn,
+ ASLFR_Screen, ami_gui_get_screen(),
ASLFR_InitialFile, "history.html",
TAG_DONE)) {
strlcpy(fname, savereq->fr_Drawer, 1024);
@@ -384,7 +384,7 @@ ami_history_global_create_window(struct ami_history_global_window *history_win)
WA_Left, nsoption_int(history_window_xpos),
WA_Width, nsoption_int(history_window_xsize),
WA_Height, nsoption_int(history_window_ysize),
- WA_PubScreen, scrn,
+ WA_PubScreen, ami_gui_get_screen(),
WA_ReportMouse, TRUE,
refresh_mode, TRUE,
WA_IDCMP, IDCMP_MOUSEMOVE | IDCMP_MOUSEBUTTONS | IDCMP_NEWSIZE |
@@ -393,7 +393,7 @@ ami_history_global_create_window(struct ami_history_global_window *history_win)
WINDOW_IDCMPHook, &ami_cw->idcmp_hook,
WINDOW_IDCMPHookBits, IDCMP_IDCMPUPDATE | IDCMP_EXTENDEDMOUSE |
IDCMP_SIZEVERIFY | IDCMP_REFRESHWINDOW,
- WINDOW_SharedPort, sport,
+ WINDOW_SharedPort, ami_gui_get_shared_msgport(),
WINDOW_HorizProp, 1,
WINDOW_VertProp, 1,
WINDOW_UserData, history_win,
diff --git a/frontends/amiga/history_local.c b/frontends/amiga/history_local.c
index 0ae9cc040..5ad77ead7 100644
--- a/frontends/amiga/history_local.c
+++ b/frontends/amiga/history_local.c
@@ -81,13 +81,22 @@ ami_history_local_destroy(struct ami_history_local_window *history_local_win)
res = local_history_fini(history_local_win->session);
if (res == NSERROR_OK) {
- history_local_win->gw->hw = NULL;
+ ami_gui_set_history_window(history_local_win->gw, NULL);
res = ami_corewindow_fini(&history_local_win->core); /* closes the window for us */
history_local_window = NULL;
}
return res;
}
+static void ami_history_local_destroy_cw(struct ami_corewindow *ami_cw)
+{
+ struct ami_history_local_window *history_local_win;
+ /* technically degenerate container of */
+ history_local_win = (struct ami_history_local_window *)ami_cw;
+
+ ami_history_local_destroy(history_local_win);
+}
+
/**
* callback for mouse action for local history on core window
*
@@ -200,7 +209,7 @@ ami_history_local_create_window(struct ami_history_local_window *history_local_w
WA_SizeBRight, TRUE,
WA_Width, 100,
WA_Height, 100,
- WA_PubScreen, scrn,
+ WA_PubScreen, ami_gui_get_screen(),
WA_ReportMouse, TRUE,
refresh_mode, TRUE,
WA_IDCMP, IDCMP_MOUSEMOVE | IDCMP_MOUSEBUTTONS | IDCMP_NEWSIZE |
@@ -209,7 +218,7 @@ ami_history_local_create_window(struct ami_history_local_window *history_local_w
WINDOW_IDCMPHook, &ami_cw->idcmp_hook,
WINDOW_IDCMPHookBits, IDCMP_IDCMPUPDATE | IDCMP_EXTENDEDMOUSE |
IDCMP_SIZEVERIFY | IDCMP_REFRESHWINDOW,
- WINDOW_SharedPort, sport,
+ WINDOW_SharedPort, ami_gui_get_shared_msgport(),
WINDOW_HorizProp, 1,
WINDOW_VertProp, 1,
WINDOW_UserData, history_local_win,
@@ -244,8 +253,8 @@ nserror ami_history_local_present(struct gui_window *gw)
if(history_local_window != NULL) {
//windowtofront()
- if (gw->hw != NULL) {
- res = local_history_set(gw->hw->session, gw->bw);
+ if (ami_gui_get_history_window(gw) != NULL) {
+ res = local_history_set(ami_gui_get_history_window(gw)->session, ami_gui_get_browser_window(gw));
return res;
}
@@ -271,7 +280,7 @@ nserror ami_history_local_present(struct gui_window *gw)
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.close = ami_history_local_destroy_cw;
ncwin->core.event = NULL;
ncwin->core.drag_end = NULL;
ncwin->core.icon_drop = NULL;
@@ -286,7 +295,7 @@ nserror ami_history_local_present(struct gui_window *gw)
res = local_history_init(ncwin->core.cb_table,
(struct core_window *)ncwin,
- gw->bw,
+ ami_gui_get_browser_window(gw),
&ncwin->session);
if (res != NSERROR_OK) {
ami_utf8_free(ncwin->core.wintitle);
@@ -308,7 +317,9 @@ nserror ami_history_local_present(struct gui_window *gw)
ncwin->gw = gw;
history_local_window = ncwin;
- gw->hw = ncwin;
+ ami_gui_set_history_window(gw, ncwin);
+
+ local_history_scroll_to_cursor(ncwin->session);
return NSERROR_OK;
}
diff --git a/frontends/amiga/history_local.h b/frontends/amiga/history_local.h
index 72ba7fa8b..0a265d821 100644
--- a/frontends/amiga/history_local.h
+++ b/frontends/amiga/history_local.h
@@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef AMIGA_HISTORY_GLOBAL_H
-#define AMIGA_HISTORY_GLOBAL_H
+#ifndef AMIGA_HISTORY_LOCAL_H
+#define AMIGA_HISTORY_LOCAL_H
struct gui_window;
struct ami_history_local_window;
diff --git a/frontends/amiga/hotlist.c b/frontends/amiga/hotlist.c
index c7efe9148..9a1d423bc 100644
--- a/frontends/amiga/hotlist.c
+++ b/frontends/amiga/hotlist.c
@@ -251,10 +251,10 @@ ami_hotlist_drag_end(struct ami_corewindow *ami_cw, int x, int y)
}
if((ok == false) || (url == NULL)) {
- DisplayBeep(scrn);
+ ami_gui_beep();
} else if(url) {
if((gwin = ami_window_at_pointer(AMINS_WINDOW))) {
- browser_window_navigate(gwin->gw->bw,
+ browser_window_navigate(ami_gui2_get_browser_window(gwin),
url,
NULL,
BW_NAVIGATE_HISTORY,
@@ -313,7 +313,7 @@ HOOKF(void, ami_hotlist_menu_item_project_export, APTR, window, struct IntuiMess
ASLFR_Window, ami_cw->win,
ASLFR_SleepWindow, TRUE,
ASLFR_TitleText, messages_get("NetSurf"),
- ASLFR_Screen, scrn,
+ ASLFR_Screen, ami_gui_get_screen(),
ASLFR_InitialFile, "hotlist.html",
TAG_DONE)) {
strlcpy(fname, savereq->fr_Drawer, 1024);
@@ -487,7 +487,7 @@ ami_hotlist_create_window(struct ami_hotlist_window *hotlist_win)
WA_Left, nsoption_int(hotlist_window_xpos),
WA_Width, nsoption_int(hotlist_window_xsize),
WA_Height, nsoption_int(hotlist_window_ysize),
- WA_PubScreen, scrn,
+ WA_PubScreen, ami_gui_get_screen(),
WA_ReportMouse, TRUE,
refresh_mode, TRUE,
WA_IDCMP, IDCMP_MOUSEMOVE | IDCMP_MOUSEBUTTONS | IDCMP_NEWSIZE |
@@ -496,7 +496,7 @@ ami_hotlist_create_window(struct ami_hotlist_window *hotlist_win)
WINDOW_IDCMPHook, &ami_cw->idcmp_hook,
WINDOW_IDCMPHookBits, IDCMP_IDCMPUPDATE | IDCMP_EXTENDEDMOUSE |
IDCMP_SIZEVERIFY | IDCMP_REFRESHWINDOW,
- WINDOW_SharedPort, sport,
+ WINDOW_SharedPort, ami_gui_get_shared_msgport(),
WINDOW_HorizProp, 1,
WINDOW_VertProp, 1,
WINDOW_UserData, hotlist_win,
diff --git a/frontends/amiga/icon.c b/frontends/amiga/icon.c
index 582d355b6..2b7f61281 100644
--- a/frontends/amiga/icon.c
+++ b/frontends/amiga/icon.c
@@ -45,7 +45,10 @@
#include "netsurf/plotters.h"
#include "netsurf/bitmap.h"
#include "netsurf/content.h"
+#include "content/content.h"
#include "content/content_protected.h"
+#include "content/content_factory.h"
+#include "desktop/gui_internal.h"
#include "amiga/os3support.h"
#include "amiga/bitmap.h"
@@ -85,6 +88,17 @@ static void *amiga_icon_get_internal(const struct content *c, void *context)
return icon_c->bitmap;
}
+static bool amiga_icon_is_opaque(struct content *c)
+{
+ amiga_icon_content *icon_c = (amiga_icon_content *)c;
+
+ if (icon_c->bitmap != NULL) {
+ return guit->bitmap->get_opaque(icon_c->bitmap);
+ }
+
+ return false;
+}
+
static const content_handler amiga_icon_content_handler = {
.create = amiga_icon_create,
.data_complete = amiga_icon_convert,
@@ -93,6 +107,7 @@ static const content_handler amiga_icon_content_handler = {
.clone = amiga_icon_clone,
.get_internal = amiga_icon_get_internal,
.type = amiga_icon_content_type,
+ .is_opaque = amiga_icon_is_opaque,
.no_share = false,
};
@@ -154,7 +169,8 @@ bool amiga_icon_convert(struct content *c)
/* This loader will only work on local files, so fail if not a local path */
if(filename == NULL)
{
- msg_data.error = messages_get("NoMemory");
+ msg_data.errordata.errorcode = NSERROR_NOMEM;
+ msg_data.errordata.errormsg = messages_get("NoMemory");
content_broadcast(c, CONTENT_MSG_ERROR, &msg_data);
return false;
}
@@ -166,7 +182,8 @@ bool amiga_icon_convert(struct content *c)
if(dobj == NULL)
{
- msg_data.error = messages_get("NoMemory");
+ msg_data.errordata.errorcode = NSERROR_NOMEM;
+ msg_data.errordata.errormsg = messages_get("NoMemory");
content_broadcast(c, CONTENT_MSG_ERROR, &msg_data);
return false;
}
@@ -184,16 +201,18 @@ bool amiga_icon_convert(struct content *c)
return false;
}
- icon_c->bitmap = amiga_bitmap_create(width, height, BITMAP_NEW);
+ icon_c->bitmap = amiga_bitmap_create(width, height, BITMAP_NONE);
if (!icon_c->bitmap) {
- msg_data.error = messages_get("NoMemory");
+ msg_data.errordata.errorcode = NSERROR_NOMEM;
+ msg_data.errordata.errormsg = messages_get("NoMemory");
content_broadcast(c, CONTENT_MSG_ERROR, &msg_data);
if(dobj) FreeDiskObject(dobj);
return false;
}
imagebuf = (ULONG *) amiga_bitmap_get_buffer(icon_c->bitmap);
if (!imagebuf) {
- msg_data.error = messages_get("NoMemory");
+ msg_data.errordata.errorcode = NSERROR_NOMEM;
+ msg_data.errordata.errormsg = messages_get("NoMemory");
content_broadcast(c, CONTENT_MSG_ERROR, &msg_data);
if(dobj) FreeDiskObject(dobj);
return false;
diff --git a/frontends/amiga/iff_dr2d.c b/frontends/amiga/iff_dr2d.c
index a4c5855a1..624b501ff 100644
--- a/frontends/amiga/iff_dr2d.c
+++ b/frontends/amiga/iff_dr2d.c
@@ -120,6 +120,7 @@ bool ami_svg_to_dr2d(struct IFFHandle *iffh, const char *buffer,
if(!(PushChunk(iffh,0,ID_NAME,IFFSIZE_UNKNOWN)))
{
WriteChunkBytes(iffh,url,strlen(url));
+ WriteChunkBytes(iffh,"\0",1);
PopChunk(iffh);
}
@@ -185,6 +186,7 @@ bool ami_svg_to_dr2d(struct IFFHandle *iffh, const char *buffer,
attr->DashPattern = 1;
attr->EdgeValue = findcolour(diagram->shape[i].stroke);
}
+
attr->EdgeThick = (float) diagram->shape[i].stroke_width;
if(!(PushChunk(iffh,0,ID_ATTR,IFFSIZE_UNKNOWN)))
@@ -281,7 +283,7 @@ bool ami_svg_to_dr2d(struct IFFHandle *iffh, const char *buffer,
if(!(PushChunk(iffh, 0, ID_FONS, IFFSIZE_UNKNOWN)))
{
WriteChunkBytes(iffh, fons, sizeof(struct fons_struct));
- WriteChunkBytes(iffh, "Topaz\0", 6);
+ WriteChunkBytes(iffh, "Helvetica\0", 10);
PopChunk(iffh);
}
free(fons);
@@ -310,22 +312,27 @@ bool ami_svg_to_dr2d(struct IFFHandle *iffh, const char *buffer,
bool ami_save_svg(struct hlcache_handle *c,char *filename)
{
struct IFFHandle *iffh;
- const char *source_data;
- ULONG source_size;
+ const uint8_t *source_data;
+ size_t source_size;
- if(!ami_download_check_overwrite(filename, NULL, 0)) return false;
+ if (!ami_download_check_overwrite(filename, NULL, 0)) return false;
- if((iffh = AllocIFF())) {
- if((iffh->iff_Stream = Open(filename,MODE_NEWFILE))) {
+ if ((iffh = AllocIFF())) {
+ if ((iffh->iff_Stream = Open(filename,MODE_NEWFILE))) {
InitIFFasDOS(iffh);
}
else return false;
}
- if((OpenIFF(iffh,IFFF_WRITE))) return false;
+ if ((OpenIFF(iffh,IFFF_WRITE))) return false;
- if((source_data = content_get_source_data(c, &source_size)))
- ami_svg_to_dr2d(iffh, source_data, source_size, nsurl_access(hlcache_handle_get_url(c)));
+ source_data = content_get_source_data(c, &source_size);
+ if (source_data != NULL) {
+ ami_svg_to_dr2d(iffh,
+ (const char *)source_data,
+ source_size,
+ nsurl_access(hlcache_handle_get_url(c)));
+ }
if(iffh) CloseIFF(iffh);
if(iffh->iff_Stream) Close((BPTR)iffh->iff_Stream);
diff --git a/frontends/amiga/launch.c b/frontends/amiga/launch.c
index 10c32aeed..785f667ce 100755
--- a/frontends/amiga/launch.c
+++ b/frontends/amiga/launch.c
@@ -74,7 +74,7 @@ static void ami_openurl_free_list(struct MinList *list)
struct ami_protocol *node;
struct ami_protocol *nnode;
- if(IsMinListEmpty(list) == NULL) {
+ if(!IsMinListEmpty(list)) {
node = (struct ami_protocol *)GetHead((struct List *)list);
do
diff --git a/frontends/amiga/libs.c b/frontends/amiga/libs.c
index 43fe43f1a..eb1f21617 100644
--- a/frontends/amiga/libs.c
+++ b/frontends/amiga/libs.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2014 Chris Young <chris@unsatisfactorysoftware.co.uk>
+ * Copyright 2014-2020 Chris Young <chris@unsatisfactorysoftware.co.uk>
*
* This file is part of NetSurf, http://www.netsurf-browser.org/
*
@@ -23,6 +23,7 @@
#include "utils/utils.h"
#include "utils/log.h"
+#include <proto/dos.h>
#include <proto/exec.h>
#include <proto/intuition.h>
#include <proto/utility.h>
@@ -58,6 +59,7 @@
#define AMINS_LIB_OPEN(LIB, LIBVER, PREFIX, INTERFACE, INTVER, FAIL) \
NSLOG(netsurf, INFO, "Opening %s v%d", LIB, LIBVER); \
if((PREFIX##Base = (struct PREFIX##Base *)OpenLibrary(LIB, LIBVER))) { \
+ NSLOG(netsurf, INFO, " -> opened v%d.%d", ((struct Library *)PREFIX##Base)->lib_Version, ((struct Library *)PREFIX##Base)->lib_Revision); \
I##PREFIX = (struct PREFIX##IFace *)GetInterface((struct Library *)PREFIX##Base, INTERFACE, INTVER, NULL); \
if(I##PREFIX == NULL) { \
NSLOG(netsurf, INFO, "Failed to get %s interface v%d of %s", INTERFACE, INTVER, LIB); \
@@ -92,15 +94,17 @@
#define AMINS_CLASS_OPEN(CLASS, CLASSVER, PREFIX, CLASSGET, NEEDINTERFACE) \
NSLOG(netsurf, INFO, "Opening %s v%d", CLASS, CLASSVER); \
if((PREFIX##Base = OpenClass(CLASS, CLASSVER, &PREFIX##Class))) { \
+ NSLOG(netsurf, INFO, " -> opened v%d.%d", ((struct Library *)PREFIX##Base)->lib_Version, ((struct Library *)PREFIX##Base)->lib_Revision); \
if(NEEDINTERFACE == true) { \
NSLOG(netsurf, INFO, " + interface"); \
I##PREFIX = (struct PREFIX##IFace *)GetInterface((struct Library *)PREFIX##Base, "main", 1, NULL); \
if(I##PREFIX == NULL) { \
- NSLOG(netsurf, INFO, "Failed to get main interface v1 of %s", CLASS); \
+ NSLOG(netsurf, ERROR, "Failed to get main interface v1 of %s", CLASS); \
} \
} \
} \
if(PREFIX##Class == NULL) { \
+ NSLOG(netsurf, INFO, "Failed to open %s v%d", CLASS, CLASSVER); \
STRPTR error = ASPrintf("Unable to open %s v%d (fatal error)", CLASS, CLASSVER); \
ami_misc_fatal_error(error); \
FreeVec(error); \
@@ -109,7 +113,9 @@
#define AMINS_CLASS_CLOSE(PREFIX) \
if(I##PREFIX) DropInterface((struct Interface *)I##PREFIX); \
- if(PREFIX##Base) CloseClass(PREFIX##Base);
+ if(PREFIX##Base) CloseClass(PREFIX##Base); \
+ I##PREFIX = NULL; \
+ PREFIX##Base = NULL;
#define AMINS_CLASS_STRUCT(PREFIX) \
struct ClassLibrary *PREFIX##Base = NULL; \
@@ -120,6 +126,7 @@
#define AMINS_LIB_OPEN(LIB, LIBVER, PREFIX, INTERFACE, INTVER, FAIL) \
NSLOG(netsurf, INFO, "Opening %s v%d", LIB, LIBVER); \
if((PREFIX##Base = (struct PREFIX##Base *)OpenLibrary(LIB, LIBVER))) { \
+ NSLOG(netsurf, INFO, " -> opened v%d.%d", ((struct Library *)PREFIX##Base)->lib_Version, ((struct Library *)PREFIX##Base)->lib_Revision); \
} else { \
NSLOG(netsurf, INFO, "Failed to open %s v%d", LIB, LIBVER); \
if(FAIL == true) { \
@@ -131,7 +138,8 @@
}
#define AMINS_LIB_CLOSE(PREFIX) \
- if(PREFIX##Base) CloseLibrary((struct Library *)PREFIX##Base);
+ if(PREFIX##Base) CloseLibrary((struct Library *)PREFIX##Base); \
+ PREFIX##Base = NULL;
#define AMINS_LIB_STRUCT(PREFIX) \
struct PREFIX##Base *PREFIX##Base = NULL;
@@ -139,9 +147,11 @@
#define AMINS_CLASS_OPEN(CLASS, CLASSVER, PREFIX, CLASSGET, NEEDINTERFACE) \
NSLOG(netsurf, INFO, "Opening %s v%d", CLASS, CLASSVER); \
if((PREFIX##Base = OpenLibrary(CLASS, CLASSVER))) { \
+ NSLOG(netsurf, INFO, " -> opened v%d.%d", ((struct Library *)PREFIX##Base)->lib_Version, ((struct Library *)PREFIX##Base)->lib_Revision); \
PREFIX##Class = CLASSGET##_GetClass(); \
} \
if(PREFIX##Class == NULL) { \
+ NSLOG(netsurf, INFO, "Failed to open %s v%d", CLASS, CLASSVER); \
STRPTR error = ASPrintf("Unable to open %s v%d (fatal error)", CLASS, CLASSVER); \
ami_misc_fatal_error(error); \
FreeVec(error); \
@@ -149,7 +159,8 @@
}
#define AMINS_CLASS_CLOSE(PREFIX) \
- if(PREFIX##Base) CloseLibrary(PREFIX##Base);
+ if(PREFIX##Base) CloseLibrary(PREFIX##Base); \
+ PREFIX##Base = NULL;
#define AMINS_CLASS_STRUCT(PREFIX) \
struct Library *PREFIX##Base = NULL; \
@@ -178,6 +189,7 @@ AMINS_LIB_STRUCT(Locale);
AMINS_LIB_STRUCT(P96);
AMINS_LIB_STRUCT(Workbench);
+AMINS_LIB_STRUCT(Codesets);
AMINS_LIB_STRUCT(GuiGFX);
AMINS_CLASS_STRUCT(ARexx);
@@ -211,6 +223,7 @@ bool ami_libs_open(void)
#ifdef __amigaos4__
/* Libraries only needed on OS4 */
AMINS_LIB_OPEN("application.library", 53, Application, "application", 2, false)
+ AMINS_LIB_OPEN("dos.library", 37, DOS, "main", 1, true)
#else
/* Libraries we get automatically on OS4 but not OS3 */
AMINS_LIB_OPEN("utility.library", 37, Utility, "main", 1, true)
@@ -236,7 +249,8 @@ bool ami_libs_open(void)
AMINS_LIB_OPEN("Picasso96API.library", 0, P96, "main", 1, false)
/* Non-OS provided libraries */
- AMINS_LIB_OPEN("guigfx.library", 9, GuiGFX, "main", 1, false)
+ AMINS_LIB_OPEN("codesets.library", 6, Codesets, "main", 1, false)
+ AMINS_LIB_OPEN("guigfx.library", 9, GuiGFX, "main", 1, false)
/* NB: timer.device is opened in schedule.c (ultimately by the scheduler process).
* The library base and interface are obtained there, rather than here, due to
@@ -268,6 +282,7 @@ bool ami_libs_open(void)
AMINS_CLASS_OPEN("gadgets/integer.gadget", 41, Integer, INTEGER, false)
AMINS_CLASS_OPEN("images/label.image", 41, Label, LABEL, false)
AMINS_CLASS_OPEN("gadgets/layout.gadget", 43, Layout, LAYOUT, true)
+ AMINS_CLASS_OPEN("gadgets/listbrowser.gadget", 41, ListBrowser, LISTBROWSER, true)
AMINS_CLASS_OPEN("gadgets/radiobutton.gadget", 41, RadioButton, RADIOBUTTON, false)
AMINS_CLASS_OPEN("gadgets/scroller.gadget", 42, Scroller, SCROLLER, false)
AMINS_CLASS_OPEN("gadgets/space.gadget", 41, Space, SPACE, false)
@@ -275,10 +290,7 @@ bool ami_libs_open(void)
AMINS_CLASS_OPEN("gadgets/string.gadget", 41, String, STRING, false)
AMINS_CLASS_OPEN("window.class", 42, Window, WINDOW, false)
-#ifdef __amigaos4__
- /* BOOPSI classes only required on OS4 */
- AMINS_CLASS_OPEN("gadgets/listbrowser.gadget", 45, ListBrowser, LISTBROWSER, true)
-#else
+#ifndef __amigaos4__
/* BOOPSI classes only required prior to OS4 */
PageClass = PAGE_GetClass();
#endif
@@ -305,17 +317,16 @@ void ami_libs_close(void)
AMINS_CLASS_CLOSE(Integer)
AMINS_CLASS_CLOSE(Label)
AMINS_CLASS_CLOSE(Layout)
+ AMINS_CLASS_CLOSE(ListBrowser)
AMINS_CLASS_CLOSE(RadioButton)
AMINS_CLASS_CLOSE(Scroller)
AMINS_CLASS_CLOSE(Space)
AMINS_CLASS_CLOSE(SpeedBar)
AMINS_CLASS_CLOSE(String)
AMINS_CLASS_CLOSE(Window)
-#ifdef __amigaos4__
- AMINS_CLASS_CLOSE(ListBrowser)
-#endif
/* Libraries */
+ AMINS_LIB_CLOSE(Codesets)
AMINS_LIB_CLOSE(GuiGFX)
AMINS_LIB_CLOSE(Asl)
@@ -333,6 +344,7 @@ void ami_libs_close(void)
AMINS_LIB_CLOSE(Workbench)
#ifdef __amigaos4__
AMINS_LIB_CLOSE(Application)
+ AMINS_LIB_CLOSE(DOS)
#else
AMINS_LIB_CLOSE(Utility)
#endif
diff --git a/frontends/amiga/libs.h b/frontends/amiga/libs.h
index aa3622af2..db5b65c75 100644
--- a/frontends/amiga/libs.h
+++ b/frontends/amiga/libs.h
@@ -63,6 +63,7 @@ extern Class *WindowClass;
#define LabelObj NewObject(LabelClass, NULL
#define LayoutHObj NewObject(LayoutClass, NULL, LAYOUT_Orientation, LAYOUT_ORIENT_HORIZ
#define LayoutVObj NewObject(LayoutClass, NULL, LAYOUT_Orientation, LAYOUT_ORIENT_VERT
+#define ListBrowserObj NewObject(ListBrowserClass, NULL
#ifdef __amigaos4__
#define PageObj NewObject(NULL, "page.gadget"
#else
diff --git a/frontends/amiga/login.c b/frontends/amiga/login.c
deleted file mode 100755
index 85324b0f1..000000000
--- a/frontends/amiga/login.c
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
- * Copyright 2008 Chris Young <chris@unsatisfactorysoftware.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 "amiga/os3support.h"
-
-#include <assert.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <proto/exec.h>
-#include <proto/intuition.h>
-#include <proto/utility.h>
-
-#include <proto/window.h>
-#include <proto/layout.h>
-#include <proto/string.h>
-#include <proto/button.h>
-#include <proto/label.h>
-#include <classes/window.h>
-#include <gadgets/layout.h>
-#include <gadgets/string.h>
-#include <gadgets/button.h>
-#include <images/label.h>
-#include <reaction/reaction_macros.h>
-
-#include "utils/messages.h"
-#include "utils/nsurl.h"
-#include "netsurf/mouse.h"
-#include "netsurf/window.h"
-#include "netsurf/url_db.h"
-
-#include "amiga/gui.h"
-#include "amiga/libs.h"
-#include "amiga/object.h"
-#include "amiga/login.h"
-
-struct gui_login_window {
- struct ami_generic_window w;
- struct Window *win;
- Object *objects[GID_LAST];
- nserror (*cb)(bool proceed, void *pw);
- void *cbpw;
- nsurl *url;
- char *realm;
- lwc_string *host;
- char uname[256];
- char pwd[256];
-};
-
-static BOOL ami_401login_event(void *w);
-
-static const struct ami_win_event_table ami_login_table = {
- ami_401login_event,
- NULL, /* we don't explicitly close the login window at all.
- @todo check if this prevents us from quitting NetSurf */
-};
-
-void gui_401login_open(nsurl *url, const char *realm,
- nserror (*cb)(bool proceed, void *pw), void *cbpw)
-{
- const char *auth;
- struct gui_login_window *lw = calloc(1, sizeof(struct gui_login_window));
- lwc_string *host = nsurl_get_component(url, NSURL_HOST);
-
- assert(host != NULL);
-
- lw->host = host;
- lw->url = nsurl_ref(url);
- lw->realm = (char *)realm;
- lw->cb = cb;
- lw->cbpw = cbpw;
-
- auth = urldb_get_auth_details(lw->url, realm);
-
- if (auth == NULL) {
- lw->uname[0] = '\0';
- lw->pwd[0] = '\0';
- } else {
- const char *pwd;
- size_t pwd_len;
-
- pwd = strchr(auth, ':');
- assert(pwd && pwd < auth + sizeof(lw->uname));
- memcpy(lw->uname, auth, pwd - auth);
- lw->uname[pwd - auth] = '\0';
- ++pwd;
- pwd_len = strlen(pwd);
- assert(pwd_len < sizeof(lw->pwd));
- memcpy(lw->pwd, pwd, pwd_len);
- lw->pwd[pwd_len] = '\0';
- }
-
- lw->objects[OID_MAIN] = WindowObj,
- WA_ScreenTitle, ami_gui_get_screen_title(),
- WA_Title, nsurl_access(lw->url),
- WA_Activate, TRUE,
- WA_DepthGadget, TRUE,
- WA_DragBar, TRUE,
- WA_CloseGadget, FALSE,
- WA_SizeGadget, TRUE,
- WA_PubScreen,scrn,
- WINDOW_SharedPort,sport,
- WINDOW_UserData,lw,
- WINDOW_IconifyGadget, FALSE,
- WINDOW_LockHeight,TRUE,
- WINDOW_Position, WPOS_CENTERSCREEN,
- WINDOW_ParentGroup, lw->objects[GID_MAIN] = LayoutVObj,
- LAYOUT_AddChild, StringObj,
- STRINGA_TextVal,
- lwc_string_data(lw->host),
- GA_ReadOnly,TRUE,
- StringEnd,
- CHILD_Label, LabelObj,
- LABEL_Text,messages_get("Host"),
- LabelEnd,
- CHILD_WeightedHeight,0,
- LAYOUT_AddChild, StringObj,
- STRINGA_TextVal,lw->realm,
- GA_ReadOnly,TRUE,
- StringEnd,
- CHILD_Label, LabelObj,
- LABEL_Text,messages_get("Realm"),
- LabelEnd,
- CHILD_WeightedHeight,0,
- LAYOUT_AddChild, lw->objects[GID_USER] = StringObj,
- GA_ID,GID_USER,
- GA_TabCycle,TRUE,
- STRINGA_TextVal, lw->uname,
- StringEnd,
- CHILD_Label, LabelObj,
- LABEL_Text,messages_get("Username"),
- LabelEnd,
- CHILD_WeightedHeight,0,
- LAYOUT_AddChild, lw->objects[GID_PASS] = StringObj,
- GA_ID,GID_PASS,
- STRINGA_HookType,SHK_PASSWORD,
- GA_TabCycle,TRUE,
- STRINGA_TextVal, lw->pwd,
- StringEnd,
- CHILD_Label, LabelObj,
- LABEL_Text,messages_get("Password"),
- LabelEnd,
- CHILD_WeightedHeight,0,
- LAYOUT_AddChild, LayoutHObj,
- LAYOUT_AddChild, lw->objects[GID_LOGIN] = ButtonObj,
- GA_ID,GID_LOGIN,
- GA_RelVerify,TRUE,
- GA_Text,messages_get("Login"),
- GA_TabCycle,TRUE,
- ButtonEnd,
- CHILD_WeightedHeight,0,
- LAYOUT_AddChild, lw->objects[GID_CANCEL] = ButtonObj,
- GA_ID,GID_CANCEL,
- GA_RelVerify,TRUE,
- GA_Text,messages_get("Cancel"),
- GA_TabCycle,TRUE,
- ButtonEnd,
- LayoutEnd,
- CHILD_WeightedHeight,0,
- EndGroup,
- EndWindow;
-
- lw->win = (struct Window *)RA_OpenWindow(lw->objects[OID_MAIN]);
- ami_gui_win_list_add(lw, AMINS_LOGINWINDOW, &ami_login_table);
-}
-
-static void ami_401login_close(struct gui_login_window *lw)
-{
- /* If continuation exists, then forbid refetch */
- if (lw->cb != NULL)
- lw->cb(false, lw->cbpw);
-
- DisposeObject(lw->objects[OID_MAIN]);
- lwc_string_unref(lw->host);
- nsurl_unref(lw->url);
- ami_gui_win_list_remove(lw);
-}
-
-static void ami_401login_login(struct gui_login_window *lw)
-{
- ULONG *user,*pass;
- STRPTR userpass;
-
- GetAttr(STRINGA_TextVal,lw->objects[GID_USER],(ULONG *)&user);
- GetAttr(STRINGA_TextVal,lw->objects[GID_PASS],(ULONG *)&pass);
-
- userpass = ASPrintf("%s:%s",user,pass);
- urldb_set_auth_details(lw->url,lw->realm,userpass);
- FreeVec(userpass);
-
- lw->cb(true, lw->cbpw);
-
- /* Invalidate continuation */
- lw->cb = NULL;
- lw->cbpw = NULL;
-
- ami_401login_close(lw);
-}
-
-static BOOL ami_401login_event(void *w)
-{
- /* return TRUE if window destroyed */
- struct gui_login_window *lw = (struct gui_login_window *)w;
- ULONG result;
- uint16 code;
-
- while((result = RA_HandleInput(lw->objects[OID_MAIN], &code)) != WMHI_LASTMSG)
- {
- switch(result & WMHI_CLASSMASK) // class
- {
- case WMHI_GADGETUP:
- switch(result & WMHI_GADGETMASK)
- {
- case GID_LOGIN:
- ami_401login_login(lw);
- return TRUE;
- break;
-
- case GID_CANCEL:
- ami_401login_close(lw);
- return TRUE;
- break;
- }
- break;
- }
- }
- return FALSE;
-}
-
diff --git a/frontends/amiga/menu.c b/frontends/amiga/menu.c
index 1f3f981ea..85b2ec43f 100644
--- a/frontends/amiga/menu.c
+++ b/frontends/amiga/menu.c
@@ -251,7 +251,7 @@ static int ami_menu_layout_mc_recursive(Object *menu_parent, struct ami_menu_dat
MA_Image,
BitMapObj,
IA_Scalable, TRUE,
- BITMAP_Screen, scrn,
+ BITMAP_Screen, ami_gui_get_screen(),
BITMAP_SourceFile, md[j]->menuicon,
BITMAP_Masking, TRUE,
BitMapEnd,
@@ -298,6 +298,7 @@ static struct Menu *ami_menu_layout_gt(struct ami_menu_data **md, int max)
struct NewMenu *nm;
struct Menu *imenu = NULL;
struct VisualInfo *vi;
+ struct Screen *scrn = ami_gui_get_screen();
struct RastPort *rp = &scrn->RastPort;
struct DrawInfo *dri = GetScreenDrawInfo(scrn);
int space_width = TextLength(rp, " ", 1);
diff --git a/frontends/amiga/misc.c b/frontends/amiga/misc.c
index 532d2f182..57afbdd97 100755
--- a/frontends/amiga/misc.c
+++ b/frontends/amiga/misc.c
@@ -45,6 +45,7 @@
static LONG ami_misc_req(const char *message, uint32 type)
{
LONG ret = 0;
+ struct gui_window *cur_gw = ami_gui_get_active_gw();
NSLOG(netsurf, INFO, "%s", message);
#ifdef __amigaos4__
@@ -53,7 +54,7 @@ static LONG ami_misc_req(const char *message, uint32 type)
TDR_FormatString, message,
TDR_GadgetString, messages_get("OK"),
TDR_ImageType, type,
- TDR_Window, cur_gw ? cur_gw->shared->win : NULL,
+ TDR_Window, cur_gw ? ami_gui_get_window(cur_gw) : NULL,
TAG_DONE);
#else
struct EasyStruct easyreq = {
@@ -64,7 +65,7 @@ static LONG ami_misc_req(const char *message, uint32 type)
messages_get("OK"),
};
- ret = EasyRequest(cur_gw ? cur_gw->shared->win : NULL, &easyreq, NULL);
+ ret = EasyRequest(cur_gw ? ami_gui_get_window(cur_gw) : NULL, &easyreq, NULL);
#endif
return ret;
}
@@ -237,7 +238,8 @@ static nserror amiga_path_to_nsurl(const char *path, struct nsurl **url_out)
}
/**
- * returns a string with escape chars translated.
+ * returns a string with escape chars translated
+ * and string converted to local charset
* (based on remove_underscores from utils.c)
*/
@@ -245,6 +247,7 @@ char *translate_escape_chars(const char *s)
{
size_t i, ii, len;
char *ret;
+ char *outs;
len = strlen(s);
ret = malloc(len + 1);
if (ret == NULL)
@@ -259,7 +262,10 @@ char *translate_escape_chars(const char *s)
}
}
ret[ii] = '\0';
- return ret;
+
+ outs = ami_utf8_easy(ret);
+ free(ret);
+ return outs;
}
/**
diff --git a/frontends/amiga/options.h b/frontends/amiga/options.h
index a23435ca6..101558f6a 100644
--- a/frontends/amiga/options.h
+++ b/frontends/amiga/options.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2008 - 2012 Chris Young <chris@unsatisfactorysoftware.co.uk>
+ * Copyright 2008 - 2020 Chris Young <chris@unsatisfactorysoftware.co.uk>
*
* This file is part of NetSurf, http://www.netsurf-browser.org/
*
@@ -47,6 +47,7 @@ NSOPTION_STRING(search_engines_file, "PROGDIR:Resources/SearchEngines")
NSOPTION_STRING(arexx_dir, "PROGDIR:Rexx")
NSOPTION_STRING(arexx_startup, "Startup.nsrx")
NSOPTION_STRING(arexx_shutdown, "Shutdown.nsrx")
+NSOPTION_BOOL(arexx_allow_exec, false)
NSOPTION_STRING(download_dir, NULL)
NSOPTION_BOOL(download_notify, true)
NSOPTION_BOOL(download_notify_progress, false)
@@ -80,7 +81,7 @@ NSOPTION_INTEGER(cookies_window_ypos, 0)
NSOPTION_INTEGER(cookies_window_xsize, 0)
NSOPTION_INTEGER(cookies_window_ysize, 0)
NSOPTION_INTEGER(web_search_width, 0)
-NSOPTION_BOOL(window_simple_refresh, false)
+NSOPTION_BOOL(window_simple_refresh, true)
NSOPTION_BOOL(resize_with_contents, false)
NSOPTION_INTEGER(reformat_delay, 0)
NSOPTION_INTEGER(redraw_tile_size_x, 0)
@@ -88,12 +89,22 @@ NSOPTION_INTEGER(redraw_tile_size_y, 0)
NSOPTION_INTEGER(monitor_aspect_x, 0)
NSOPTION_INTEGER(monitor_aspect_y, 0)
NSOPTION_BOOL(accept_lang_locale, true)
+
+/* Local charset when using iconv */
NSOPTION_STRING(local_charset, "ISO-8859-1")
+
#ifdef __amigaos4__
-/* Options relevant for OS4 only */
+/** Options relevant for OS4 only **/
+
+/* Local charset IANA number when using codesets */
+NSOPTION_INTEGER(local_codeset, 0)
+
+/* Use ExtMem */
NSOPTION_BOOL(use_extmem, true)
+
#else
-/* Options relevant for OS3 only */
+/** Options relevant for OS3 only **/
+
NSOPTION_BOOL(friend_bitmap, false)
#endif
diff --git a/frontends/amiga/os3support.c b/frontends/amiga/os3support.c
index 645496b73..98843c702 100644
--- a/frontends/amiga/os3support.c
+++ b/frontends/amiga/os3support.c
@@ -28,7 +28,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
-#include <dirent.h>
#include <proto/bullet.h>
#include <proto/exec.h>
@@ -182,6 +181,12 @@ char *strsep(char **s1, const char *s2)
return p1;
}
+int alphasort(const struct dirent **d1, const struct dirent **d2)
+{
+ /*\todo stub function, needs writing, preferably into clib2 */
+ return 0;
+}
+
int scandir(const char *dir, struct dirent ***namelist,
int (*filter)(const struct dirent *),
int (*compar)(const struct dirent **, const struct dirent **))
diff --git a/frontends/amiga/os3support.h b/frontends/amiga/os3support.h
index aa3027d36..dc4e06503 100644
--- a/frontends/amiga/os3support.h
+++ b/frontends/amiga/os3support.h
@@ -27,6 +27,7 @@
#ifndef __amigaos4__
#include <stdint.h>
+#include <dirent.h>
#include <proto/exec.h>
#include <proto/dos.h>
@@ -78,6 +79,8 @@
#define GAUGEIA_Level TAG_IGNORE
#define IA_InBorder TAG_IGNORE
#define IA_Label TAG_IGNORE
+#define LBNCA_SoftStyle TAG_IGNORE
+#define LISTBROWSER_Striping TAG_IGNORE
#define SA_Compositing TAG_IGNORE
#define SBNA_Text TAG_IGNORE
#define SBNA_HintInfo TAG_IGNORE
@@ -104,10 +107,15 @@
#define RAWKEY_F8 0x57
#define RAWKEY_F9 0x58
#define RAWKEY_F10 0x59
+#define RAWKEY_F12 0x6F
#define RAWKEY_HELP 0x5F
#define RAWKEY_HOME 0x70
#define RAWKEY_END 0x71
+/* New pens - these may not be equivalent */
+#define DISABLEDTEXTPEN HIGHLIGHTTEXTPEN
+#define TITLEPEN FILLPEN
+
/* Other constants */
#define BVS_DISPLAY BVS_NONE
#define IDCMP_EXTENDEDMOUSE 0
@@ -117,6 +125,7 @@
#define OFF_OPEN 0
#define AFF_OTAG 0
#define ML_SEPARATOR NM_BARLABEL
+#define LBS_ROWS 0
/* Renamed structures */
#define AnchorPathOld AnchorPath
@@ -249,6 +258,10 @@ char *ASPrintf(const char *fmt, ...);
/* C */
char *strlwr(char *str);
+int alphasort(const struct dirent **d1, const struct dirent **d2);
+int scandir(const char *dir, struct dirent ***namelist,
+ int (*filter)(const struct dirent *),
+ int (*compar)(const struct dirent **, const struct dirent **));
#endif
#endif
diff --git a/frontends/amiga/pageinfo.c b/frontends/amiga/pageinfo.c
new file mode 100644
index 000000000..54de0d008
--- /dev/null
+++ b/frontends/amiga/pageinfo.c
@@ -0,0 +1,283 @@
+/*
+ * Copyright 2020 Chris Young <chris@unsatisfactorysoftware.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/>.
+ */
+
+/**
+ * \file
+ * Amiga implementation of page info using core windows.
+ */
+
+#include <stdint.h>
+#include <stdlib.h>
+
+#include <proto/intuition.h>
+
+#include <classes/window.h>
+#include <gadgets/layout.h>
+#include <gadgets/scroller.h>
+#include <gadgets/space.h>
+#include <images/label.h>
+
+#include <intuition/icclass.h>
+#include <reaction/reaction_macros.h>
+
+#include "utils/log.h"
+#include "netsurf/keypress.h"
+#include "netsurf/plotters.h"
+#include "desktop/page-info.h"
+#include "utils/messages.h"
+#include "utils/nsoption.h"
+
+#include "amiga/corewindow.h"
+#include "amiga/libs.h"
+#include "amiga/pageinfo.h"
+#include "amiga/schedule.h"
+#include "amiga/utf8.h"
+
+
+/**
+ * Amiga page info window context
+ */
+struct ami_pageinfo_window {
+ /** Amiga core window context */
+ struct ami_corewindow core;
+ /** core pageinfo */
+ struct page_info *pi;
+};
+
+/**
+ * destroy a previously created pageinfo window
+ */
+static void
+ami_pageinfo_destroy(struct ami_corewindow *ami_cw)
+{
+ nserror res;
+ struct ami_pageinfo_window *pageinfo_win = (struct ami_pageinfo_window *)ami_cw;
+ if(pageinfo_win->pi != NULL) {
+ res = page_info_destroy(pageinfo_win->pi);
+
+ if (res == NSERROR_OK) {
+ pageinfo_win->pi = NULL;
+ ami_corewindow_fini(&pageinfo_win->core); /* closes the window for us */
+ }
+ }
+}
+
+/**
+ * close pageinfo window (callback)
+ */
+static void
+ami_pageinfo_close_cb(void *p)
+{
+ ami_pageinfo_destroy((struct ami_corewindow *)p);
+}
+
+/**
+ * callback for unknown events on Amiga core window
+ * (result & WMHI_CLASSMASK) gives the class of event (eg. WMHI_GADGETUP)
+ * (result & WMHI_GADGETMASK) gives the gadget ID (eg. GID_SSLCERT_ACCEPT)
+ *
+ * \param ami_cw The Amiga core window structure.
+ * \param result event as returned by RA_HandleInput()
+ * \return TRUE if window closed during event processing
+ */
+static BOOL
+ami_pageinfo_event(struct ami_corewindow *ami_cw, ULONG result)
+{
+ if((result & WMHI_CLASSMASK) == WMHI_INACTIVE) {
+ /* Window went inactive, so schedule to close it */
+ ami_schedule(0, ami_pageinfo_close_cb, ami_cw);
+ /* NB: do not return TRUE here as we're still open for now */
+ }
+ return FALSE;
+}
+
+/**
+ * callback for mouse action for pageinfo 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_pageinfo_mouse(struct ami_corewindow *ami_cw,
+ browser_mouse_state mouse_state,
+ int x, int y)
+{
+ bool did_something = false;
+ struct ami_pageinfo_window *pageinfo_win = (struct ami_pageinfo_window *)ami_cw;
+
+ if(page_info_mouse_action(pageinfo_win->pi, mouse_state, x, y, &did_something) == NSERROR_OK)
+ if (did_something == true) {
+ /* Something happened so we need to close ourselves */
+ ami_schedule(0, ami_pageinfo_close_cb, pageinfo_win);
+ }
+
+ return NSERROR_OK;
+}
+
+/**
+ * callback for keypress for pageinfo 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_pageinfo_key(struct ami_corewindow *ami_cw, uint32_t nskey)
+{
+ struct ami_pageinfo_window *pageinfo_win = (struct ami_pageinfo_window *)ami_cw;
+
+ if (page_info_keypress(pageinfo_win->pi, nskey)) {
+ return NSERROR_OK;
+ }
+ return NSERROR_NOT_IMPLEMENTED;
+}
+
+/**
+ * callback on draw event for pageinfo on core window
+ *
+ * \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_pageinfo_draw(struct ami_corewindow *ami_cw, int x, int y, struct rect *r, struct redraw_context *ctx)
+{
+ struct ami_pageinfo_window *pageinfo_win = (struct ami_pageinfo_window *)ami_cw;
+
+ page_info_redraw(pageinfo_win->pi, x, y, r, ctx);
+
+ return NSERROR_OK;
+}
+
+static nserror
+ami_pageinfo_create_window(struct ami_pageinfo_window *pageinfo_win, ULONG left, ULONG top)
+{
+ struct ami_corewindow *ami_cw = (struct ami_corewindow *)&pageinfo_win->core;
+ ULONG refresh_mode = WA_SmartRefresh;
+ struct Screen *scrn = ami_gui_get_screen();
+
+ if(nsoption_bool(window_simple_refresh) == true) {
+ refresh_mode = WA_SimpleRefresh;
+ }
+
+ ami_cw->objects[GID_CW_WIN] = WindowObj,
+ WA_ScreenTitle, ami_gui_get_screen_title(),
+ WA_Activate, TRUE,
+ WA_DepthGadget, FALSE,
+ WA_DragBar, FALSE,
+ WA_CloseGadget, FALSE,
+ WA_SizeGadget, FALSE,
+ WA_Borderless, TRUE,
+ WA_Left, left,
+ WA_Top, top,
+ WA_PubScreen, scrn,
+ WA_ReportMouse, TRUE,
+ refresh_mode, TRUE,
+ WA_IDCMP, IDCMP_MOUSEMOVE | IDCMP_MOUSEBUTTONS | IDCMP_NEWSIZE |
+ IDCMP_RAWKEY | IDCMP_IDCMPUPDATE | IDCMP_INACTIVEWINDOW |
+ IDCMP_EXTENDEDMOUSE | IDCMP_SIZEVERIFY | IDCMP_REFRESHWINDOW,
+ WINDOW_IDCMPHook, &ami_cw->idcmp_hook,
+ WINDOW_IDCMPHookBits, IDCMP_IDCMPUPDATE | IDCMP_EXTENDEDMOUSE |
+ IDCMP_SIZEVERIFY | IDCMP_REFRESHWINDOW,
+ WINDOW_SharedPort, ami_gui_get_shared_msgport(),
+ WINDOW_UserData, pageinfo_win,
+ WINDOW_IconifyGadget, FALSE,
+ 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_BOX,
+ GA_RelVerify, TRUE,
+ SpaceEnd,
+ EndGroup,
+ EndWindow;
+
+ if(ami_cw->objects[GID_CW_WIN] == NULL) {
+ return NSERROR_NOMEM;
+ }
+
+ return NSERROR_OK;
+}
+
+/* exported interface documented in amiga/pageinfo.h */
+nserror ami_pageinfo_open(struct browser_window *bw, ULONG left, ULONG top)
+{
+ struct ami_pageinfo_window *ncwin;
+ nserror res;
+ int width, height;
+
+ ncwin = calloc(1, sizeof(struct ami_pageinfo_window));
+ if (ncwin == NULL) {
+ return NSERROR_NOMEM;
+ }
+
+ ncwin->core.wintitle = ami_utf8_easy((char *)messages_get("PageInfo"));
+
+ res = ami_pageinfo_create_window(ncwin, left, top);
+ if (res != NSERROR_OK) {
+ NSLOG(netsurf, INFO, "Page info init failed");
+ ami_utf8_free(ncwin->core.wintitle);
+ free(ncwin);
+ return res;
+ }
+
+ /* initialise Amiga core window */
+ ncwin->core.draw = ami_pageinfo_draw;
+ ncwin->core.key = ami_pageinfo_key;
+ ncwin->core.mouse = ami_pageinfo_mouse;
+ ncwin->core.close = ami_pageinfo_destroy;
+ ncwin->core.event = ami_pageinfo_event;
+
+ 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 = page_info_create(ncwin->core.cb_table,
+ (struct core_window *)ncwin,
+ bw,
+ &ncwin->pi);
+
+ if (res != NSERROR_OK) {
+ ami_utf8_free(ncwin->core.wintitle);
+ DisposeObject(ncwin->core.objects[GID_CW_WIN]);
+ free(ncwin);
+ return res;
+ }
+
+ if(page_info_get_size(ncwin->pi, &width, &height) == NSERROR_OK) {
+ /* Set window to the correct size.
+ * TODO: this should really set the size of ncwin->core.objects[GID_CW_DRAW]
+ * and let the window adjust, here we've hardcoded to add 6x4px as that's
+ * what window.class does before v45.
+ */
+ SetAttrs(ncwin->core.objects[GID_CW_WIN], WA_InnerWidth, width + 6, WA_InnerHeight, height + 4, TAG_DONE);
+ }
+
+ return NSERROR_OK;
+}
+
diff --git a/frontends/gtk/login.h b/frontends/amiga/pageinfo.h
index 00c29000c..e48925e26 100644
--- a/frontends/gtk/login.h
+++ b/frontends/amiga/pageinfo.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 Vincent Sanders <vince@netsurf-browser.org>
+ * Copyright 2020 Chris Young <chris@unsatisfactorysoftware.co.uk>
*
* This file is part of NetSurf, http://www.netsurf-browser.org/
*
@@ -16,16 +16,16 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/** \file
- * Login interfaces.
- */
-
-#ifndef __NSGTK_LOGIN_H__
-#define __NSGTK_LOGIN_H__
+#ifndef AMIGA_PAGEINFO_H
+#define AMIGA_PAGEINFO_H
/**
- * login window request.
+ * Open the page info window
+ *
+ * \param bw the browser window
+ * \return NSERROR_OK or error code if window creation failed.
*/
-extern void gui_401login_open(struct nsurl *url, const char *realm, nserror (*cb)(bool proceed, void *pw), void *cbpw);
+nserror ami_pageinfo_open(struct browser_window *bw, ULONG left, ULONG top);
#endif
+
diff --git a/frontends/amiga/pkg/SearchEngines b/frontends/amiga/pkg/SearchEngines
index 3f4bdd95b..3095d43cf 100644
--- a/frontends/amiga/pkg/SearchEngines
+++ b/frontends/amiga/pkg/SearchEngines
@@ -1,2 +1,2 @@
-Aminet|www.aminet.net|http://aminet.net/search?query=%s|http://aminet.net/favicon.ico|
+Aminet|www.aminet.net|https://aminet.net/search?query=%s|https://aminet.net/favicon.ico|
OS4Depot|www.os4depot.net|http://www.os4depot.net/index.php?function=search&tool=simple&f_fields=%s|http://www.os4depot.net/favicon.ico|
diff --git a/frontends/amiga/pkg/makereslinks b/frontends/amiga/pkg/makereslinks
index 4302dbd23..a9f7dfb94 100755
--- a/frontends/amiga/pkg/makereslinks
+++ b/frontends/amiga/pkg/makereslinks
@@ -3,26 +3,26 @@
failat 50
makedir Resources
cd Resources
-makelink AdBlock.css /!NetSurf/Resources/AdBlock,f79 soft
+makelink AdBlock.css /resources/adblock.css soft
makelink default.css /amiga/resources/default.css soft
-makelink ca-bundle /!NetSurf/Resources/ca-bundle soft
-makelink de /!NetSurf/Resources/de soft
-makelink nsdefault.css /!NetSurf/Resources/CSS,f79 soft
+makelink ca-bundle /resources/ca-bundle soft
+makelink de /resources/de soft
+makelink nsdefault.css /resources/default.css soft
makelink favicon.png /amiga/resources/favicon.png soft
makelink Resource.map /amiga/resources/Resource.map soft
-makelink en /!NetSurf/Resources/en soft
-makelink fr /!NetSurf/Resources/fr soft
-makelink internal.css /!NetSurf/Resources/internal.css,f79 soft
-makelink it /!NetSurf/Resources/it soft
+makelink en /resources/en soft
+makelink fr /resources/fr soft
+makelink internal.css /resources/internal.css soft
+makelink it /resources/it soft
makelink LangNames /amiga/resources/LangNames soft
-makelink netsurf.png /!NetSurf/Resources/netsurf.png,b60 soft
-makelink nl /!NetSurf/Resources/nl soft
+makelink netsurf.png /resources/netsurf.png soft
+makelink nl /resources/nl soft
makelink Pointers /amiga/resources/Pointers soft
-makelink quirks.css /!NetSurf/Resources/Quirks,f79 soft
+makelink quirks.css /resources/quirks.css soft
makelink SearchEngines /amiga/resources/SearchEngines soft
makelink splash.png /amiga/resources/splash.png soft
makelink Themes /amiga/resources/Themes soft
makelink mimetypes /amiga/resources/mimetypes soft
/
-makelink amiga/resources/nsdefault.css //!NetSurf/Resources/CSS,f79 soft
+makelink amiga/resources/nsdefault.css //resources/default.css soft
diff --git a/frontends/amiga/pkg/netsurf.readme b/frontends/amiga/pkg/netsurf.readme
index 817e07435..d2d83ac56 100755
--- a/frontends/amiga/pkg/netsurf.readme
+++ b/frontends/amiga/pkg/netsurf.readme
@@ -2,11 +2,11 @@ Short: Fast CSS capable web browser
Uploader: chris@unsatisfactorysoftware.co.uk (Chris Young)
Author: NetSurf contributors (OS4 port by Chris Young)
Type: comm/www
-Version: 3.8
+Version: 3.11
Requires: dev/misc/guigfxlib.lha
Architecture: ppc-amigaos >= 4.0.0
-This is NetSurf 3.8 for AmigaOS 4 (native frontend).
+This is NetSurf 3.11 for AmigaOS 4 (native frontend).
For the latest version, visit http://www.netsurf-browser.org
*******************************************
diff --git a/frontends/amiga/pkg/netsurf_os3.readme b/frontends/amiga/pkg/netsurf_os3.readme
index 087e586f9..53514f8db 100644
--- a/frontends/amiga/pkg/netsurf_os3.readme
+++ b/frontends/amiga/pkg/netsurf_os3.readme
@@ -2,14 +2,14 @@ Short: Fast CSS capable web browser
Uploader: chris@unsatisfactorysoftware.co.uk (Chris Young)
Author: NetSurf contributors (OS4 port by Chris Young)
Type: comm/www
-Version: 3.8 BETA
-Requires: dev/misc/guigfxlib.lha
-Architecture: m68k-amigaos >= 3.5.0
+Version: 3.11 BETA
+Requires: dev/misc/guigfxlib.lha util/libs/AmiSSL-5.13-OS3.lha
+Architecture: m68k-amigaos >= 3.2.0
-This is NetSurf 3.8 BETA for AmigaOS 3.
+This is NetSurf 3.11 BETA for AmigaOS 3.
It is built off of the OS4 (Reaction) frontend.
-Requirements are AmigaOS 3.5 or 3.9, 32MB RAM.
+Requirements are AmigaOS 3.2, 3.5 or 3.9, 32MB RAM.
THIS IS EARLY BETA QUALITY SOFTWARE FOR TESTING ONLY.
ALL USE IS AT YOUR OWN RISK. IT *WILL* CRASH!
diff --git a/frontends/amiga/plotters.c b/frontends/amiga/plotters.c
index 7c5df4678..8bc1712dd 100644
--- a/frontends/amiga/plotters.c
+++ b/frontends/amiga/plotters.c
@@ -115,6 +115,7 @@ struct gui_globals *ami_plot_ra_alloc(ULONG width, ULONG height, bool force32bit
/* init shared bitmaps */
int depth = 32;
struct BitMap *friend = NULL;
+ struct Screen *scrn = ami_gui_get_screen();
struct gui_globals *gg = malloc(sizeof(struct gui_globals));
@@ -125,11 +126,34 @@ struct gui_globals *ami_plot_ra_alloc(ULONG width, ULONG height, bool force32bit
if(depth < 16) {
gg->palette_mapped = true;
if(force32bit == false) palette_mapped = true;
+
+ bitmap_set_format(&(bitmap_fmt_t) {
+ .layout = BITMAP_LAYOUT_ARGB8888,
+ .pma = true,
+ });
+
+ NSLOG(netsurf, INFO, "Set bitmap format to 0xAARRGGBB (native endian) (PMA)");
+
} else {
gg->palette_mapped = false;
- if(force32bit == false) palette_mapped = false;
+
+ bitmap_set_format(&(bitmap_fmt_t) {
+ .layout = BITMAP_LAYOUT_ARGB8888,
+ .pma = false,
+ });
+
+ NSLOG(netsurf, INFO, "Set bitmap format to 0xAARRGGBB (native endian)");
+
}
#else
+ bitmap_set_format(&(bitmap_fmt_t) {
+ .layout = BITMAP_LAYOUT_ARGB8888,
+ .pma = true,
+ });
+
+ NSLOG(netsurf, INFO, "Set bitmap format to 0xAARRGGBB (native endian) (PMA)");
+
+
/* Friend BitMaps are weird.
* For OS4, we shouldn't use a friend BitMap here (see below).
* For OS3 AGA, we get no display blitted if we use a friend BitMap,
@@ -143,16 +167,12 @@ struct gui_globals *ami_plot_ra_alloc(ULONG width, ULONG height, bool force32bit
if((depth > 8) && (force32bit == false)) friend = scrn->RastPort.BitMap;
}
- /* OS3 is locked to using palette-mapped display even on RTG.
- * To change this, comment out the below and build with the similar OS4 lines above.
- * Various bits of RTG code are OS4-only and OS3 versions will need to be written,
- * however a brief test reveals a negative performance benefit, so this lock to a
- * palette-mapped display is most likely permanent.
- */
-#warning OS3 locked to palette-mapped modes
- gg->palette_mapped = true;
- palette_mapped = true;
- if(depth > 8) depth = 8;
+ if(depth < 16) {
+ gg->palette_mapped = true;
+ if(force32bit == false) palette_mapped = true;
+ } else {
+ gg->palette_mapped = false;
+ }
#endif
/* Probably need to fix this next line */
@@ -239,13 +259,15 @@ void ami_plot_ra_free(struct gui_globals *gg)
{
init_layers_count--;
+ if(init_layers_count < 0) return;
+
if((init_layers_count == 0) && (pool_pens != NULL)) {
ami_memory_itempool_delete(pool_pens);
pool_pens = NULL;
}
if(gg->rp) {
- DeleteLayer(0,gg->rp->Layer);
+ if(gg->rp->Layer != NULL) DeleteLayer(0, gg->rp->Layer);
free(gg->rp->TmpRas);
free(gg->rp->AreaInfo);
free(gg->rp);
@@ -254,11 +276,7 @@ void ami_plot_ra_free(struct gui_globals *gg)
ami_memory_chip_free(gg->tmprasbuf);
free(gg->areabuf);
DisposeLayerInfo(gg->layerinfo);
- if(gg->palette_mapped == false) {
- if(gg->bm) ami_rtg_freebitmap(gg->bm);
- } else {
- if(gg->bm) FreeBitMap(gg->bm);
- }
+ if(gg->bm) ami_rtg_freebitmap(gg->bm);
if(gg->managed_pen_list == true) {
ami_plot_release_pens(gg->shared_pens);
@@ -293,6 +311,7 @@ void ami_plot_ra_set_pen_list(struct gui_globals *gg, struct MinList *pen_list)
void ami_clearclipreg(struct gui_globals *gg)
{
struct Region *reg = NULL;
+ struct Screen *scrn = ami_gui_get_screen();
reg = InstallClipRegion(gg->rp->Layer,NULL);
if(reg) DisposeRegion(reg);
@@ -311,6 +330,8 @@ void ami_clearclipreg(struct gui_globals *gg)
static ULONG ami_plot_obtain_pen(struct MinList *shared_pens, ULONG colr)
{
struct ami_plot_pen *node;
+ struct Screen *scrn = ami_gui_get_screen();
+
LONG pen = ObtainBestPenA(scrn->ViewPort.ColorMap,
(colr & 0x000000ff) << 24,
(colr & 0x0000ff00) << 16,
@@ -334,6 +355,7 @@ static ULONG ami_plot_obtain_pen(struct MinList *shared_pens, ULONG colr)
void ami_plot_release_pens(struct MinList *shared_pens)
{
+ struct Screen *scrn = ami_gui_get_screen();
struct ami_plot_pen *node;
struct ami_plot_pen *nnode;
@@ -398,10 +420,10 @@ void ami_plot_clear_bbox(struct RastPort *rp, struct IBox *bbox)
static void ami_arc_gfxlib(struct RastPort *rp, int x, int y, int radius, int angle1, int angle2)
{
- double angle1_r = (double)(angle1) * (M_PI / 180.0);
- double angle2_r = (double)(angle2) * (M_PI / 180.0);
- double angle, b, c;
- double step = 0.1; //(angle2_r - angle1_r) / ((angle2_r - angle1_r) * (double)radius);
+ float angle1_r = (float)(angle1) * (M_PI / 180.0);
+ float angle2_r = (float)(angle2) * (M_PI / 180.0);
+ float angle, b, c;
+ float step = 0.1; //(angle2_r - angle1_r) / ((angle2_r - angle1_r) * (float)radius);
int x0, y0, x1, y1;
x0 = x;
@@ -410,13 +432,13 @@ static void ami_arc_gfxlib(struct RastPort *rp, int x, int y, int radius, int an
b = angle1_r;
c = angle2_r;
- x1 = (int)(cos(b) * (double)radius);
- y1 = (int)(sin(b) * (double)radius);
+ x1 = (int)(cos(b) * (float)radius);
+ y1 = (int)(sin(b) * (float)radius);
Move(rp, x0 + x1, y0 - y1);
for(angle = (b + step); angle <= c; angle += step) {
- x1 = (int)(cos(angle) * (double)radius);
- y1 = (int)(sin(angle) * (double)radius);
+ x1 = (int)(cos(angle) * (float)radius);
+ y1 = (int)(sin(angle) * (float)radius);
Draw(rp, x0 + x1, y0 - y1);
}
}
@@ -427,7 +449,7 @@ static nserror
ami_bitmap(struct gui_globals *glob, int x, int y, int width, int height, struct bitmap *bitmap)
{
NSLOG(plot, DEEPDEBUG, "[ami_plotter] Entered ami_bitmap()");
-
+ struct Screen *scrn = ami_gui_get_screen();
struct BitMap *tbm;
if (!width || !height) {
@@ -517,6 +539,7 @@ HOOKF(void, ami_bitmap_tile_hook, struct RastPort *, rp, struct BackFillMessage
{
int xf,yf;
struct bfbitmap *bfbm = (struct bfbitmap *)hook->h_Data;
+ struct Screen *scrn = ami_gui_get_screen();
/* tile down and across to extents (msg->Bounds.MinX)*/
for (xf = -bfbm->offsetx; xf < msg->Bounds.MaxX; xf += bfbm->width) {
@@ -578,7 +601,7 @@ HOOKF(void, ami_bitmap_tile_hook, struct RastPort *, rp, struct BackFillMessage
static void ami_bezier(struct bez_point *restrict a, struct bez_point *restrict b,
struct bez_point *restrict c, struct bez_point *restrict d,
- double t, struct bez_point *restrict p) {
+ float t, struct bez_point *restrict p) {
p->x = pow((1 - t), 3) * a->x + 3 * t * pow((1 -t), 2) * b->x + 3 * (1-t) * pow(t, 2)* c->x + pow (t, 3)* d->x;
p->y = pow((1 - t), 3) * a->y + 3 * t * pow((1 -t), 2) * b->y + 3 * (1-t) * pow(t, 2)* c->y + pow (t, 3)* d->y;
}
@@ -720,8 +743,8 @@ ami_line(const struct redraw_context *ctx,
struct gui_globals *glob = (struct gui_globals *)ctx->priv;
- glob->rp->PenWidth = style->stroke_width;
- glob->rp->PenHeight = style->stroke_width;
+ glob->rp->PenWidth = plot_style_fixed_to_int(style->stroke_width);
+ glob->rp->PenHeight = plot_style_fixed_to_int(style->stroke_width);
switch (style->stroke_type) {
case PLOT_OP_TYPE_SOLID: /**< Solid colour */
@@ -778,8 +801,8 @@ ami_rectangle(const struct redraw_context *ctx,
}
if (style->stroke_type != PLOT_OP_TYPE_NONE) {
- glob->rp->PenWidth = style->stroke_width;
- glob->rp->PenHeight = style->stroke_width;
+ glob->rp->PenWidth = plot_style_fixed_to_int(style->stroke_width);
+ glob->rp->PenHeight = plot_style_fixed_to_int(style->stroke_width);
switch (style->stroke_type) {
case PLOT_OP_TYPE_SOLID: /**< Solid colour */
@@ -866,7 +889,6 @@ ami_polygon(const struct redraw_context *ctx,
* \param pstyle Style controlling the path plot.
* \param p elements of path
* \param n nunber of elements on path
- * \param width The width of the path
* \param transform A transform to apply to the path.
* \return NSERROR_OK on success else error code.
*/
@@ -875,7 +897,6 @@ ami_path(const struct redraw_context *ctx,
const plot_style_t *pstyle,
const float *p,
unsigned int n,
- float width,
const float transform[6])
{
unsigned int i;
@@ -953,7 +974,7 @@ ami_path(const struct redraw_context *ctx,
p_c.x = p[i+5];
p_c.y = p[i+6];
- for (double t = 0.0; t <= 1.0; t += 0.1) {
+ for (float t = 0.0; t <= 1.0; t += 0.1) {
ami_bezier(&cur_p, &p_a, &p_b, &p_c, t, &p_r);
if (pstyle->fill_colour != NS_TRANSPARENT) {
if (AreaDraw(glob->rp, p_r.x, p_r.y) == -1) {
diff --git a/frontends/amiga/plugin_hack.c b/frontends/amiga/plugin_hack.c
index 4fd1f03f7..a775936bb 100644
--- a/frontends/amiga/plugin_hack.c
+++ b/frontends/amiga/plugin_hack.c
@@ -35,6 +35,7 @@
#include "amiga/filetype.h"
#include "amiga/plugin_hack.h"
#include "content/content_protected.h"
+#include "content/content_factory.h"
#include "content/llcache.h"
@@ -52,9 +53,9 @@ static void amiga_plugin_hack_destroy(struct content *c);
static bool amiga_plugin_hack_redraw(struct content *c,
struct content_redraw_data *data, const struct rect *clip,
const struct redraw_context *ctx);
-static void amiga_plugin_hack_open(struct content *c, struct browser_window *bw,
+static nserror amiga_plugin_hack_open(struct content *c, struct browser_window *bw,
struct content *page, struct object_params *params);
-static void amiga_plugin_hack_close(struct content *c);
+static nserror amiga_plugin_hack_close(struct content *c);
static nserror amiga_plugin_hack_clone(const struct content *old, struct content **newc);
static content_type amiga_plugin_hack_content_type(void);
@@ -151,7 +152,7 @@ bool amiga_plugin_hack_redraw(struct content *c,
.fill_type = PLOT_OP_TYPE_SOLID,
.fill_colour = 0xffffff,
.stroke_colour = 0x000000,
- .stroke_width = 1,
+ .stroke_width = plot_style_int_to_fixed(1),
};
struct rect rect;
nserror res;
@@ -185,7 +186,7 @@ bool amiga_plugin_hack_redraw(struct content *c,
* object within a page
* \param params object parameters, or 0 if not an object
*/
-void amiga_plugin_hack_open(struct content *c, struct browser_window *bw,
+nserror amiga_plugin_hack_open(struct content *c, struct browser_window *bw,
struct content *page, struct object_params *params)
{
NSLOG(netsurf, INFO, "amiga_plugin_hack_open %s",
@@ -198,13 +199,13 @@ void amiga_plugin_hack_open(struct content *c, struct browser_window *bw,
c->height = 0;
}
- return;
+ return NSERROR_OK;
}
-void amiga_plugin_hack_close(struct content *c)
+nserror amiga_plugin_hack_close(struct content *c)
{
NSLOG(netsurf, INFO, "amiga_plugin_hack_close");
- return;
+ return NSERROR_OK;
}
void amiga_plugin_hack_reformat(struct content *c, int width, int height)
diff --git a/frontends/amiga/print.c b/frontends/amiga/print.c
index 8c8565478..97c70b96c 100644
--- a/frontends/amiga/print.c
+++ b/frontends/amiga/print.c
@@ -73,6 +73,20 @@ bool ami_print_dump(void);
void ami_print_progress(void);
void ami_print_close_device(void);
+enum
+{
+ POID_MAIN = 0,
+ POID_LAST,
+ PGID_MAIN,
+ PGID_PRINTER,
+ PGID_SCALE,
+ PGID_COPIES,
+ PGID_PRINT,
+ PGID_CANCEL,
+ PGID_STATUS,
+ PGID_LAST
+};
+
const struct printer amiprinter = {
&amiplot,
ami_print_begin,
@@ -91,30 +105,19 @@ struct ami_printer_info
struct print_settings *ps;
int page;
int pages;
- Object *gadgets[GID_LAST];
- Object *objects[OID_LAST];
+ Object *gadgets[PGID_LAST];
+ Object *objects[POID_LAST];
struct Window *win;
};
struct ami_print_window {
struct ami_generic_window w;
struct Window *win;
- Object *objects[OID_LAST];
- Object *gadgets[GID_LAST];
+ Object *objects[POID_LAST];
+ Object *gadgets[PGID_LAST];
struct hlcache_handle *c;
};
-enum
-{
- PGID_MAIN=0,
- PGID_PRINTER,
- PGID_SCALE,
- PGID_COPIES,
- PGID_PRINT,
- PGID_CANCEL,
- PGID_LAST
-};
-
#define IFFPrefChunkCnt 2
static LONG IFFPrefChunks[] =
{
@@ -265,7 +268,7 @@ void ami_print_ui(struct hlcache_handle *c)
ami_print_ui_setup();
- pw->objects[OID_MAIN] = WindowObj,
+ pw->objects[POID_MAIN] = WindowObj,
WA_ScreenTitle, ami_gui_get_screen_title(),
WA_Title, gadlab[PGID_PRINT],
WA_Activate, TRUE,
@@ -273,8 +276,8 @@ void ami_print_ui(struct hlcache_handle *c)
WA_DragBar, TRUE,
WA_CloseGadget, TRUE,
WA_SizeGadget, FALSE,
- WA_PubScreen, scrn,
- WINDOW_SharedPort, sport,
+ WA_PubScreen, ami_gui_get_screen(),
+ WINDOW_SharedPort, ami_gui_get_shared_msgport(),
WINDOW_UserData, pw,
WINDOW_IconifyGadget, FALSE,
WINDOW_Position, WPOS_CENTERSCREEN,
@@ -328,7 +331,7 @@ void ami_print_ui(struct hlcache_handle *c)
GA_TabCycle,TRUE,
ButtonEnd,
CHILD_WeightedHeight,0,
- LAYOUT_AddChild, pw->gadgets[GID_CANCEL] = ButtonObj,
+ LAYOUT_AddChild, pw->gadgets[PGID_CANCEL] = ButtonObj,
GA_ID, PGID_CANCEL,
GA_RelVerify, TRUE,
GA_Text, gadlab[PGID_CANCEL],
@@ -339,13 +342,13 @@ void ami_print_ui(struct hlcache_handle *c)
EndGroup,
EndWindow;
- pw->win = (struct Window *)RA_OpenWindow(pw->objects[OID_MAIN]);
+ pw->win = (struct Window *)RA_OpenWindow(pw->objects[POID_MAIN]);
ami_gui_win_list_add(pw, AMINS_PRINTWINDOW, &ami_print_table);
}
static void ami_print_close(struct ami_print_window *pw)
{
- DisposeObject(pw->objects[OID_MAIN]);
+ DisposeObject(pw->objects[POID_MAIN]);
ami_gui_win_list_remove(pw);
ami_print_ui_free();
@@ -362,7 +365,7 @@ static BOOL ami_print_event(void *w)
int print_scale;
int printer_unit;
- while((result = RA_HandleInput(pw->objects[OID_MAIN],&code)) != WMHI_LASTMSG)
+ while((result = RA_HandleInput(pw->objects[POID_MAIN],&code)) != WMHI_LASTMSG)
{
switch(result & WMHI_CLASSMASK) // class
{
@@ -509,7 +512,7 @@ bool ami_print_next_page(void)
{
ami_print_info.page++;
- RefreshSetGadgetAttrs((struct Gadget *)ami_print_info.gadgets[GID_STATUS],
+ RefreshSetGadgetAttrs((struct Gadget *)ami_print_info.gadgets[PGID_STATUS],
ami_print_info.win, NULL,
FUELGAUGE_Level, ami_print_info.page,
TAG_DONE);
@@ -519,7 +522,7 @@ bool ami_print_next_page(void)
void ami_print_end(void)
{
ami_plot_ra_free(ami_print_info.gg);
- DisposeObject(ami_print_info.objects[OID_MAIN]);
+ DisposeObject(ami_print_info.objects[POID_MAIN]);
ami_print_close_device();
ami_print_free();
@@ -554,7 +557,7 @@ bool ami_print_dump(void)
void ami_print_progress(void)
{
- ami_print_info.objects[OID_MAIN] = WindowObj,
+ ami_print_info.objects[POID_MAIN] = WindowObj,
WA_ScreenTitle, ami_gui_get_screen_title(),
WA_Title, messages_get("Printing"),
WA_Activate, TRUE,
@@ -562,15 +565,15 @@ void ami_print_progress(void)
WA_DragBar, TRUE,
WA_CloseGadget, FALSE,
WA_SizeGadget, TRUE,
- WA_PubScreen,scrn,
+ WA_PubScreen, ami_gui_get_screen(),
//WINDOW_SharedPort,sport,
WINDOW_UserData, &ami_print_info,
WINDOW_IconifyGadget, FALSE,
WINDOW_LockHeight,TRUE,
WINDOW_Position, WPOS_CENTERSCREEN,
- WINDOW_ParentGroup, ami_print_info.gadgets[GID_MAIN] = LayoutVObj,
- LAYOUT_AddChild, ami_print_info.gadgets[GID_STATUS] = FuelGaugeObj,
- GA_ID,GID_STATUS,
+ WINDOW_ParentGroup, ami_print_info.gadgets[PGID_MAIN] = LayoutVObj,
+ LAYOUT_AddChild, ami_print_info.gadgets[PGID_STATUS] = FuelGaugeObj,
+ GA_ID,PGID_STATUS,
FUELGAUGE_Min,0,
FUELGAUGE_Max,ami_print_info.pages,
FUELGAUGE_Level,0,
@@ -582,8 +585,8 @@ void ami_print_progress(void)
CHILD_NominalSize,TRUE,
CHILD_WeightedHeight,0,
/*
- LAYOUT_AddChild, ami_print_info.gadgets[GID_CANCEL] = ButtonObj,
- GA_ID,GID_CANCEL,
+ LAYOUT_AddChild, ami_print_info.gadgets[PGID_CANCEL] = ButtonObj,
+ GA_ID,PGID_CANCEL,
GA_Disabled,TRUE,
GA_RelVerify,TRUE,
GA_Text,messages_get("Abort"),
@@ -593,6 +596,6 @@ void ami_print_progress(void)
EndGroup,
EndWindow;
- ami_print_info.win = (struct Window *)RA_OpenWindow(ami_print_info.objects[OID_MAIN]);
+ ami_print_info.win = (struct Window *)RA_OpenWindow(ami_print_info.objects[POID_MAIN]);
}
diff --git a/frontends/amiga/resources/AdBlock.css b/frontends/amiga/resources/AdBlock.css
index e3811f62b..0d12aaa7c 120000
--- a/frontends/amiga/resources/AdBlock.css
+++ b/frontends/amiga/resources/AdBlock.css
@@ -1 +1 @@
-../../!NetSurf/Resources/AdBlock,f79 \ No newline at end of file
+../../../resources/adblock.css \ No newline at end of file
diff --git a/frontends/amiga/resources/Themes/AISS/Theme b/frontends/amiga/resources/Themes/AISS/Theme
index 8c5af103c..f8265bf73 100755
--- a/frontends/amiga/resources/Themes/AISS/Theme
+++ b/frontends/amiga/resources/Themes/AISS/Theme
@@ -31,6 +31,11 @@ theme_tab_loading:*TBImages:list_download
theme_search:*TBImages:list_search
theme_fave:*TBImages:list_favouriteadd
theme_unfave:*TBImages:list_favourite
+theme_pageinfo_insecure:*TBImages:list_warning
+theme_pageinfo_internal:*TBImages:list_info
+theme_pageinfo_local:*TBImages:list_info
+theme_pageinfo_secure:*TBImages:list_securezone
+theme_pageinfo_warning:*TBImages:list_warning
ptr_default:*PROGDIR:Resources/Pointers/Default
ptr_point:*PROGDIR:Resources/Pointers/Point
ptr_caret:*PROGDIR:Resources/Pointers/Caret
diff --git a/frontends/amiga/resources/Themes/Default/Theme b/frontends/amiga/resources/Themes/Default/Theme
index 141e84f54..7e8e9c8d6 100755
--- a/frontends/amiga/resources/Themes/Default/Theme
+++ b/frontends/amiga/resources/Themes/Default/Theme
@@ -44,6 +44,11 @@ theme_tab_loading:
theme_search:search.png
theme_fave:*PROGDIR:Resources/icons/hotlist-add.png
theme_unfave:*PROGDIR:Resources/icons/hotlist-rmv.png
+theme_pageinfo_insecure:*PROGDIR:Resources/icons/16x16/actions/page-info-insecure.png
+theme_pageinfo_internal:*PROGDIR:Resources/icons/16x16/actions/page-info-internal.png
+theme_pageinfo_local:*PROGDIR:Resources/icons/16x16/actions/page-info-local.png
+theme_pageinfo_secure:*PROGDIR:Resources/icons/16x16/actions/page-info-secure.png
+theme_pageinfo_warning:*PROGDIR:Resources/icons/16x16/actions/page-info-warning.png
ptr_default:*PROGDIR:Resources/Pointers/Default
ptr_point:*PROGDIR:Resources/Pointers/Point
ptr_caret:*PROGDIR:Resources/Pointers/Caret
diff --git a/frontends/amiga/resources/ca-bundle b/frontends/amiga/resources/ca-bundle
index ad2dd6b55..1187fa51a 120000
--- a/frontends/amiga/resources/ca-bundle
+++ b/frontends/amiga/resources/ca-bundle
@@ -1 +1 @@
-../../!NetSurf/Resources/ca-bundle \ No newline at end of file
+../../../resources/ca-bundle \ No newline at end of file
diff --git a/frontends/amiga/resources/de b/frontends/amiga/resources/de
deleted file mode 120000
index 38128816c..000000000
--- a/frontends/amiga/resources/de
+++ /dev/null
@@ -1 +0,0 @@
-../../!NetSurf/Resources/de \ No newline at end of file
diff --git a/frontends/amiga/resources/en b/frontends/amiga/resources/en
deleted file mode 120000
index d1dfaa9d2..000000000
--- a/frontends/amiga/resources/en
+++ /dev/null
@@ -1 +0,0 @@
-../../!NetSurf/Resources/en \ No newline at end of file
diff --git a/frontends/amiga/resources/fr b/frontends/amiga/resources/fr
deleted file mode 120000
index df1cbe3a1..000000000
--- a/frontends/amiga/resources/fr
+++ /dev/null
@@ -1 +0,0 @@
-../../!NetSurf/Resources/fr \ No newline at end of file
diff --git a/frontends/amiga/resources/it b/frontends/amiga/resources/it
deleted file mode 120000
index 6177e9176..000000000
--- a/frontends/amiga/resources/it
+++ /dev/null
@@ -1 +0,0 @@
-../../!NetSurf/Resources/it \ No newline at end of file
diff --git a/frontends/amiga/resources/nl b/frontends/amiga/resources/nl
deleted file mode 120000
index a07bd0469..000000000
--- a/frontends/amiga/resources/nl
+++ /dev/null
@@ -1 +0,0 @@
-../../!NetSurf/Resources/nl \ No newline at end of file
diff --git a/frontends/amiga/resources/nsdefault.css b/frontends/amiga/resources/nsdefault.css
index 6d2d4da5b..fa3ae6c26 120000
--- a/frontends/amiga/resources/nsdefault.css
+++ b/frontends/amiga/resources/nsdefault.css
@@ -1 +1 @@
-../../!NetSurf/Resources/CSS,f79 \ No newline at end of file
+../../../resources/default.css \ No newline at end of file
diff --git a/frontends/amiga/resources/quirks.css b/frontends/amiga/resources/quirks.css
index d9fb80334..1e752cb9e 120000
--- a/frontends/amiga/resources/quirks.css
+++ b/frontends/amiga/resources/quirks.css
@@ -1 +1 @@
-../../!NetSurf/Resources/Quirks,f79 \ No newline at end of file
+../../../resources/quirks.css \ No newline at end of file
diff --git a/frontends/amiga/rtg.c b/frontends/amiga/rtg.c
index 5e1cac290..8618c0a33 100644
--- a/frontends/amiga/rtg.c
+++ b/frontends/amiga/rtg.c
@@ -26,9 +26,6 @@ struct BitMap *ami_rtg_allocbitmap(ULONG width, ULONG height, ULONG depth,
ULONG flags, struct BitMap *friend, RGBFTYPE format)
{
if(P96Base == NULL) {
-#ifndef __amigaos4__
- if(depth > 8) depth = 8;
-#endif
return AllocBitMap(width, height, depth, flags, friend);
} else {
return p96AllocBitMap(width, height, depth, flags, friend, format);
diff --git a/frontends/amiga/schedule.c b/frontends/amiga/schedule.c
index 043edc7fe..307fff3e9 100644
--- a/frontends/amiga/schedule.c
+++ b/frontends/amiga/schedule.c
@@ -107,7 +107,8 @@ static nserror ami_schedule_add_timer_event(struct nscallback *nscb, int t)
* A scheduled callback matching both callback and p is returned, or NULL if none present.
*/
-static struct nscallback *ami_schedule_locate(void (*callback)(void *p), void *p, bool remove)
+static struct nscallback *
+ami_schedule_locate(void (*callback)(void *p), void *p, bool remove)
{
PblIterator *iterator;
struct nscallback *nscb;
@@ -119,7 +120,7 @@ static struct nscallback *ami_schedule_locate(void (*callback)(void *p), void *p
iterator = pblHeapIterator(schedule_list);
- while ((nscb = pblIteratorNext(iterator)) != -1) {
+ while ((nscb = pblIteratorNext(iterator)) != (void *)-1) {
if ((nscb->callback == callback) && (nscb->p == p)) {
if (remove == true) pblIteratorRemove(iterator);
found_cb = true;
@@ -170,7 +171,11 @@ static nserror schedule_remove(void (*callback)(void *p), void *p, bool abort)
if(nscb != NULL) {
if(abort == true) ami_schedule_remove_timer_event(nscb);
+#ifdef __amigaos4__
FreeSysObject(ASOT_IOREQUEST, nscb);
+#else
+ FreeVec(nscb);
+#endif
pblHeapConstruct(schedule_list);
}
@@ -186,11 +191,14 @@ static void schedule_remove_all(void)
iterator = pblHeapIterator(schedule_list);
- while ((nscb = pblIteratorNext(iterator)) != -1)
- {
+ while ((nscb = pblIteratorNext(iterator)) != (void *)-1) {
ami_schedule_remove_timer_event(nscb);
pblIteratorRemove(iterator);
+#ifdef __amigaos4__
FreeSysObject(ASOT_IOREQUEST, nscb);
+#else
+ FreeVec(nscb);
+#endif
};
pblIteratorFree(iterator);
@@ -218,18 +226,17 @@ static void ami_schedule_dump(void)
GetSysTime(&tv);
Amiga2Date(tv.Seconds, &clockdata);
- NSLOG(netsurf, INFO, "Current time = %d-%d-%d %d:%d:%d.%d",
+ NSLOG(netsurf, INFO, "Current time = %d-%d-%d %d:%d:%d.%lu",
clockdata.mday, clockdata.month, clockdata.year,
clockdata.hour, clockdata.min, clockdata.sec, tv.Microseconds);
NSLOG(netsurf, INFO, "Events remaining in queue:");
iterator = pblHeapIterator(schedule_list);
- while ((nscb = pblIteratorNext(iterator)) != -1)
- {
+ while ((nscb = pblIteratorNext(iterator)) != (void *)-1) {
Amiga2Date(nscb->tv.Seconds, &clockdata);
NSLOG(netsurf, INFO,
- "nscb: %p, at %d-%d-%d %d:%d:%d.%d, callback: %p, %p",
+ "nscb: %p, at %d-%d-%d %d:%d:%d.%lu, callback: %p, %p",
nscb, clockdata.mday, clockdata.month, clockdata.year,
clockdata.hour, clockdata.min, clockdata.sec,
nscb->tv.Microseconds, nscb->callback, nscb->p);
@@ -299,7 +306,10 @@ nserror ami_schedule_create(struct MsgPort *msgport)
schedule_msgport = msgport;
#endif
schedule_list = pblHeapNew();
- if(schedule_list == PBL_ERROR_OUT_OF_MEMORY) return NSERROR_NOMEM;
+
+ if (schedule_list == NULL) {
+ return NSERROR_NOMEM;
+ }
pblHeapSetCompareFunction(schedule_list, ami_schedule_compare);
@@ -335,11 +345,13 @@ nserror ami_schedule(int t, void (*callback)(void *p), void *p)
nscb = AllocSysObjectTags(ASOT_IOREQUEST,
ASOIOR_Duplicate, tioreq,
TAG_DONE);
+ if(nscb == NULL) return NSERROR_NOMEM;
#else
- nscb = (struct nscallback *)CreateIORequest(schedule_msgport, sizeof(struct nscallback));
+ if(schedule_msgport == NULL) return NSERROR_NOMEM;
+ nscb = AllocVec(sizeof(struct nscallback), MEMF_PUBLIC | MEMF_CLEAR);
+ if(nscb == NULL) return NSERROR_NOMEM;
*nscb = *tioreq;
#endif
- if(!nscb) return NSERROR_NOMEM;
if (ami_schedule_add_timer_event(nscb, t) != NSERROR_OK)
return NSERROR_NOMEM;
diff --git a/frontends/amiga/search.c b/frontends/amiga/search.c
index 99ee5b41e..853c06fef 100755
--- a/frontends/amiga/search.c
+++ b/frontends/amiga/search.c
@@ -61,6 +61,7 @@
#include "amiga/search.h"
#include "amiga/object.h"
#include "amiga/theme.h"
+#include "amiga/utf8.h"
#ifndef NOF_ELEMENTS
#define NOF_ELEMENTS(array) (sizeof(array)/sizeof(*(array)))
@@ -68,11 +69,33 @@
static bool search_insert;
+enum
+{
+ OID_S_MAIN = 0,
+ GID_S_MAIN,
+ GID_S_NEXT,
+ GID_S_PREV,
+ GID_S_SEARCHSTRING,
+ GID_S_SHOWALL,
+ GID_S_CASE,
+ GID_S_LAST
+};
+
+enum {
+ SSTR_TITLE = 0,
+ SSTR_CASE,
+ SSTR_SHOWALL,
+ SSTR_PREV,
+ SSTR_NEXT,
+ SSTR_LAST
+};
+
struct find_window {
struct ami_generic_window w;
struct Window *win;
- Object *objects[GID_LAST];
+ Object *objects[GID_S_LAST];
struct gui_window *gwin;
+ char *message[SSTR_LAST];
};
static struct find_window *fwin = NULL;
@@ -120,10 +143,10 @@ void ami_search_open(struct gui_window *gwin)
if(fwin)
{
- browser_window_search_clear(fwin->gwin->bw);
- fwin->gwin->shared->searchwin = NULL;
+ browser_window_search_clear(ami_gui_get_browser_window(fwin->gwin));
+ ami_gui_set_find_window(fwin->gwin, NULL);
fwin->gwin = gwin;
- gwin->shared->searchwin = fwin;
+ ami_gui_set_find_window(fwin->gwin, fwin);
WindowToFront(fwin->win);
ActivateWindow(fwin->win);
return;
@@ -131,77 +154,89 @@ void ami_search_open(struct gui_window *gwin)
fwin = calloc(1, sizeof(struct find_window));
- fwin->objects[OID_MAIN] = WindowObj,
+ /* Get local charset messages. If any of these are NULL it doesn't matter */
+ fwin->message[SSTR_TITLE] = ami_utf8_easy(messages_get("FindTextNS"));
+ fwin->message[SSTR_CASE] = ami_utf8_easy(messages_get("CaseSens"));
+ fwin->message[SSTR_SHOWALL] = ami_utf8_easy(messages_get("ShowAll"));
+ fwin->message[SSTR_PREV] = ami_utf8_easy(messages_get("Prev"));
+ fwin->message[SSTR_NEXT] = ami_utf8_easy(messages_get("Next"));
+
+ fwin->objects[OID_S_MAIN] = WindowObj,
WA_ScreenTitle, ami_gui_get_screen_title(),
- WA_Title,messages_get("FindTextNS"),
+ WA_Title, fwin->message[SSTR_TITLE],
WA_Activate, TRUE,
WA_DepthGadget, TRUE,
WA_DragBar, TRUE,
WA_CloseGadget, TRUE,
WA_SizeGadget, TRUE,
- WA_PubScreen,scrn,
- WINDOW_SharedPort,sport,
- WINDOW_UserData,fwin,
+ WA_PubScreen, ami_gui_get_screen(),
+ WINDOW_SharedPort, ami_gui_get_shared_msgport(),
+ WINDOW_UserData, fwin,
WINDOW_IconifyGadget, FALSE,
- WINDOW_LockHeight,TRUE,
+ WINDOW_LockHeight, TRUE,
WINDOW_Position, WPOS_CENTERSCREEN,
- WINDOW_ParentGroup, fwin->objects[GID_MAIN] = LayoutVObj,
- LAYOUT_AddChild, fwin->objects[GID_SEARCHSTRING] = StringObj,
- GA_ID,GID_SEARCHSTRING,
- GA_TabCycle,TRUE,
- GA_RelVerify,TRUE,
+ WINDOW_ParentGroup, fwin->objects[GID_S_MAIN] = LayoutVObj,
+ LAYOUT_AddChild, fwin->objects[GID_S_SEARCHSTRING] = StringObj,
+ GA_ID, GID_S_SEARCHSTRING,
+ GA_TabCycle, TRUE,
+ GA_RelVerify, TRUE,
StringEnd,
- CHILD_WeightedHeight,0,
- LAYOUT_AddChild, fwin->objects[GID_CASE] = CheckBoxObj,
- GA_ID,GID_CASE,
- GA_Text,messages_get("CaseSens"),
- GA_Selected,FALSE,
- GA_TabCycle,TRUE,
- GA_RelVerify,TRUE,
+ CHILD_WeightedHeight, 0,
+ LAYOUT_AddChild, fwin->objects[GID_S_CASE] = CheckBoxObj,
+ GA_ID, GID_S_CASE,
+ GA_Text, fwin->message[SSTR_CASE],
+ GA_Selected, FALSE,
+ GA_TabCycle, TRUE,
+ GA_RelVerify, TRUE,
CheckBoxEnd,
- LAYOUT_AddChild, fwin->objects[GID_SHOWALL] = CheckBoxObj,
- GA_ID,GID_SHOWALL,
- GA_Text,messages_get("ShowAll"),
- GA_Selected,FALSE,
- GA_TabCycle,TRUE,
- GA_RelVerify,TRUE,
+ LAYOUT_AddChild, fwin->objects[GID_S_SHOWALL] = CheckBoxObj,
+ GA_ID,GID_S_SHOWALL,
+ GA_Text, fwin->message[SSTR_SHOWALL],
+ GA_Selected, FALSE,
+ GA_TabCycle, TRUE,
+ GA_RelVerify, TRUE,
CheckBoxEnd,
-
LAYOUT_AddChild, LayoutHObj,
- LAYOUT_AddChild, fwin->objects[GID_PREV] = ButtonObj,
- GA_ID,GID_PREV,
- GA_RelVerify,TRUE,
- GA_Text,messages_get("Prev"),
- GA_TabCycle,TRUE,
- GA_Disabled,TRUE,
+ LAYOUT_AddChild, fwin->objects[GID_S_PREV] = ButtonObj,
+ GA_ID, GID_S_PREV,
+ GA_RelVerify, TRUE,
+ GA_Text, fwin->message[SSTR_PREV],
+ GA_TabCycle, TRUE,
+ GA_Disabled, TRUE,
ButtonEnd,
- CHILD_WeightedHeight,0,
- LAYOUT_AddChild, fwin->objects[GID_NEXT] = ButtonObj,
- GA_ID,GID_NEXT,
- GA_RelVerify,TRUE,
- GA_Text,messages_get("Next"),
- GA_TabCycle,TRUE,
- GA_Disabled,TRUE,
+ CHILD_WeightedHeight, 0,
+ LAYOUT_AddChild, fwin->objects[GID_S_NEXT] = ButtonObj,
+ GA_ID, GID_S_NEXT,
+ GA_RelVerify, TRUE,
+ GA_Text, fwin->message[SSTR_NEXT],
+ GA_TabCycle, TRUE,
+ GA_Disabled, TRUE,
ButtonEnd,
LayoutEnd,
CHILD_WeightedHeight,0,
EndGroup,
EndWindow;
- fwin->win = (struct Window *)RA_OpenWindow(fwin->objects[OID_MAIN]);
+ fwin->win = (struct Window *)RA_OpenWindow(fwin->objects[OID_S_MAIN]);
fwin->gwin = gwin;
ami_gui_win_list_add(fwin, AMINS_FINDWINDOW, &ami_search_table);
- gwin->shared->searchwin = fwin;
+ ami_gui_set_find_window(fwin->gwin, fwin);
- ActivateLayoutGadget((struct Gadget *)fwin->objects[GID_MAIN], fwin->win,
- NULL, (ULONG)fwin->objects[GID_SEARCHSTRING]);
+ ActivateLayoutGadget((struct Gadget *)fwin->objects[GID_S_MAIN], fwin->win,
+ NULL, (ULONG)fwin->objects[GID_S_SEARCHSTRING]);
}
void ami_search_close(void)
{
- browser_window_search_clear(fwin->gwin->bw);
- fwin->gwin->shared->searchwin = NULL;
- DisposeObject(fwin->objects[OID_MAIN]);
+ browser_window_search_clear(ami_gui_get_browser_window(fwin->gwin));
+ ami_gui_set_find_window(fwin->gwin, NULL);
+ DisposeObject(fwin->objects[OID_S_MAIN]);
+
+ /* Free local charset version of messages */
+ for(int i = 0; i < SSTR_LAST; i++) {
+ ami_utf8_free(fwin->message[i]);
+ }
+
ami_gui_win_list_remove(fwin);
fwin = NULL;
}
@@ -213,48 +248,48 @@ static BOOL ami_search_event(void *w)
uint16 code;
search_flags_t flags;
- while((result = RA_HandleInput(fwin->objects[OID_MAIN],&code)) != WMHI_LASTMSG)
+ while((result = RA_HandleInput(fwin->objects[OID_S_MAIN],&code)) != WMHI_LASTMSG)
{
switch(result & WMHI_CLASSMASK) // class
{
case WMHI_GADGETUP:
switch(result & WMHI_GADGETMASK)
{
- case GID_SEARCHSTRING:
- browser_window_search_clear(fwin->gwin->bw);
+ case GID_S_SEARCHSTRING:
+ browser_window_search_clear(ami_gui_get_browser_window(fwin->gwin));
- RefreshSetGadgetAttrs((struct Gadget *)fwin->objects[GID_PREV],
+ RefreshSetGadgetAttrs((struct Gadget *)fwin->objects[GID_S_PREV],
fwin->win, NULL,
GA_Disabled, FALSE,
TAG_DONE);
- RefreshSetGadgetAttrs((struct Gadget *)fwin->objects[GID_NEXT],
+ RefreshSetGadgetAttrs((struct Gadget *)fwin->objects[GID_S_NEXT],
fwin->win, NULL,
GA_Disabled, FALSE,
TAG_DONE);
/* fall through */
- case GID_NEXT:
+ case GID_S_NEXT:
search_insert = true;
flags = SEARCH_FLAG_FORWARDS |
ami_search_flags();
browser_window_search(
- fwin->gwin->bw,
+ ami_gui_get_browser_window(fwin->gwin),
NULL,
flags, ami_search_string());
- ActivateWindow(fwin->gwin->shared->win);
+ ActivateWindow(ami_gui_get_window(fwin->gwin));
break;
- case GID_PREV:
+ case GID_S_PREV:
search_insert = true;
flags = ~SEARCH_FLAG_FORWARDS &
ami_search_flags();
browser_window_search(
- fwin->gwin->bw,
+ ami_gui_get_browser_window(fwin->gwin),
NULL,
flags, ami_search_string());
- ActivateWindow(fwin->gwin->shared->win);
+ ActivateWindow(ami_gui_get_window(fwin->gwin));
break;
}
break;
@@ -299,7 +334,7 @@ void ami_search_set_hourglass(bool active, void *p)
char *ami_search_string(void)
{
char *text;
- GetAttr(STRINGA_TextVal,fwin->objects[GID_SEARCHSTRING],(ULONG *)&text);
+ GetAttr(STRINGA_TextVal,fwin->objects[GID_S_SEARCHSTRING],(ULONG *)&text);
return text;
}
@@ -325,7 +360,7 @@ void ami_search_add_recent(const char *string, void *p)
void ami_search_set_forward_state(bool active, void *p)
{
- RefreshSetGadgetAttrs((struct Gadget *)fwin->objects[GID_NEXT],
+ RefreshSetGadgetAttrs((struct Gadget *)fwin->objects[GID_S_NEXT],
fwin->win, NULL,
GA_Disabled, active ? FALSE : TRUE, TAG_DONE);
@@ -339,7 +374,7 @@ void ami_search_set_forward_state(bool active, void *p)
void ami_search_set_back_state(bool active, void *p)
{
- RefreshSetGadgetAttrs((struct Gadget *)fwin->objects[GID_PREV],
+ RefreshSetGadgetAttrs((struct Gadget *)fwin->objects[GID_S_PREV],
fwin->win, NULL,
GA_Disabled, active ? FALSE : TRUE, TAG_DONE);
}
@@ -352,8 +387,8 @@ search_flags_t ami_search_flags(void)
{
ULONG case_sensitive, showall;
search_flags_t flags;
- GetAttr(GA_Selected,fwin->objects[GID_CASE],(ULONG *)&case_sensitive);
- GetAttr(GA_Selected,fwin->objects[GID_SHOWALL],(ULONG *)&showall);
+ GetAttr(GA_Selected,fwin->objects[GID_S_CASE],(ULONG *)&case_sensitive);
+ GetAttr(GA_Selected,fwin->objects[GID_S_SHOWALL],(ULONG *)&showall);
flags = 0 | (case_sensitive ? SEARCH_FLAG_CASE_SENSITIVE : 0) |
(showall ? SEARCH_FLAG_SHOWALL : 0);
return flags;
diff --git a/frontends/amiga/search.h b/frontends/amiga/search.h
index f30352cd5..1815ef954 100755
--- a/frontends/amiga/search.h
+++ b/frontends/amiga/search.h
@@ -22,7 +22,7 @@
struct gui_search_table;
struct gui_window;
-struct gui_search_table *amiga_search_table;
+extern struct gui_search_table *amiga_search_table;
/**
* Change the displayed search status.
diff --git a/frontends/amiga/selectmenu.c b/frontends/amiga/selectmenu.c
index 8a8614136..873871d3d 100644
--- a/frontends/amiga/selectmenu.c
+++ b/frontends/amiga/selectmenu.c
@@ -71,10 +71,10 @@ BOOL ami_selectmenu_is_safe(void)
HOOKF(uint32, ami_popup_hook, Object *, item, APTR)
{
uint32 itemid = 0;
- struct gui_window *gwin = hook->h_Data;
+ struct form_control *control = hook->h_Data;
if(GetAttr(PMIA_ID, item, &itemid)) {
- form_select_process_selection(gwin->shared->control, itemid);
+ form_select_process_selection(control, itemid);
}
return itemid;
@@ -109,9 +109,7 @@ void gui_create_form_select_menu(struct gui_window *g,
selectmenuhook.h_Entry = ami_popup_hook;
selectmenuhook.h_SubEntry = NULL;
- selectmenuhook.h_Data = g;
-
- g->shared->control = control;
+ selectmenuhook.h_Data = control;
selectmenuobj = PMMENU(form_control_get_name(control)),
PMA_MenuHandler, &selectmenuhook, End;
@@ -166,9 +164,9 @@ void gui_create_form_select_menu(struct gui_window *g,
~0);
}
- ami_set_pointer(g->shared, GUI_POINTER_DEFAULT, false); // Clear the menu-style pointer
+ ami_set_pointer(ami_gui_get_gui_window_2(g), GUI_POINTER_DEFAULT, false); // Clear the menu-style pointer
- IDoMethod(selectmenuobj, PM_OPEN, g->shared->win);
+ IDoMethod(selectmenuobj, PM_OPEN, ami_gui_get_window(g));
/* PM_OPEN is blocking, so dispose menu immediately... */
if(selectmenuobj) DisposeObject(selectmenuobj);
diff --git a/frontends/amiga/sslcert.c b/frontends/amiga/sslcert.c
deleted file mode 100644
index 136b918fc..000000000
--- a/frontends/amiga/sslcert.c
+++ /dev/null
@@ -1,375 +0,0 @@
-/*
- * Copyright 2017 Chris Young <chris@unsatisfactorysoftware.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/>.
- */
-
-/**
- * \file
- * Implementation of Amiga certificate viewing using core windows.
- */
-
-#include <stdint.h>
-#include <stdlib.h>
-
-#include <proto/intuition.h>
-
-#include <classes/window.h>
-#include <gadgets/button.h>
-#include <gadgets/layout.h>
-#include <gadgets/scroller.h>
-#include <gadgets/space.h>
-#include <images/label.h>
-
-#include <intuition/icclass.h>
-#include <reaction/reaction_macros.h>
-
-#include "utils/log.h"
-#include "netsurf/keypress.h"
-#include "netsurf/plotters.h"
-#include "desktop/sslcert_viewer.h"
-#include "utils/messages.h"
-#include "utils/nsoption.h"
-
-#include "amiga/corewindow.h"
-#include "amiga/libs.h"
-#include "amiga/sslcert.h"
-#include "amiga/utf8.h"
-
-
-/**
- * Amiga certificate viewing window context
- */
-enum {
- GID_SSLCERT_ACCEPT = GID_CW_LAST,
- GID_SSLCERT_REJECT,
- GID_SSLCERT_LAST
-};
-
-#define GID_SSLCERT_SIZE GID_SSLCERT_LAST - GID_CW_LAST
-
-struct ami_crtvrfy_window {
- /** Amiga core window context */
- struct ami_corewindow core;
-
- /** Amiga GUI stuff */
- Object *sslcert_objects[GID_SSLCERT_LAST]; // technically wasting a few bytes here
-
- char *sslerr;
- char *sslaccept;
- char *sslreject;
-
- /** SSL certificate viewer context data */
- struct sslcert_session_data *ssl_data;
-};
-
-/**
- * destroy a previously created certificate view
- */
-static nserror
-ami_crtvrfy_destroy(struct ami_crtvrfy_window *crtvrfy_win)
-{
- nserror res;
-
- res = sslcert_viewer_fini(crtvrfy_win->ssl_data);
- if (res == NSERROR_OK) {
- ami_utf8_free(crtvrfy_win->sslerr);
- ami_utf8_free(crtvrfy_win->sslaccept);
- ami_utf8_free(crtvrfy_win->sslreject);
- res = ami_corewindow_fini(&crtvrfy_win->core); /* closes the window for us */
- }
- return res;
-}
-
-static void
-ami_crtvrfy_accept(struct ami_corewindow *ami_cw)
-{
- struct ami_crtvrfy_window *crtvrfy_win;
- /* technically degenerate container of */
- crtvrfy_win = (struct ami_crtvrfy_window *)ami_cw;
-
- sslcert_viewer_accept(crtvrfy_win->ssl_data);
-
- ami_crtvrfy_destroy(crtvrfy_win);
-}
-
-static void
-ami_crtvrfy_reject(struct ami_corewindow *ami_cw)
-{
- struct ami_crtvrfy_window *crtvrfy_win;
- /* technically degenerate container of */
- crtvrfy_win = (struct ami_crtvrfy_window *)ami_cw;
-
- sslcert_viewer_reject(crtvrfy_win->ssl_data);
-
- ami_crtvrfy_destroy(crtvrfy_win);
-}
-
-/**
- * callback for unknown events on Amiga core window
- * eg. buttons in the ssl cert window
- * (result & WMHI_CLASSMASK) gives the class of event (eg. WMHI_GADGETUP)
- * (result & WMHI_GADGETMASK) gives the gadget ID (eg. GID_SSLCERT_ACCEPT)
- *
- * \param ami_cw The Amiga core window structure.
- * \param result event as returned by RA_HandleInput()
- * \return TRUE if window closed during event processing
- */
-static BOOL
-ami_crtvrfy_event(struct ami_corewindow *ami_cw, ULONG result)
-{
- if((result & WMHI_CLASSMASK) == WMHI_GADGETUP) {
- switch(result & WMHI_GADGETMASK) {
- case GID_SSLCERT_ACCEPT:
- ami_crtvrfy_accept(ami_cw);
- return TRUE;
- break;
-
- case GID_SSLCERT_REJECT:
- ami_crtvrfy_reject(ami_cw);
- return TRUE;
- break;
- }
- }
- return FALSE;
-}
-
-/**
- * callback for mouse action for certificate verify 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_crtvrfy_mouse(struct ami_corewindow *ami_cw,
- browser_mouse_state mouse_state,
- int x, int y)
-{
- struct ami_crtvrfy_window *crtvrfy_win;
- /* technically degenerate container of */
- crtvrfy_win = (struct ami_crtvrfy_window *)ami_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 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_crtvrfy_key(struct ami_corewindow *ami_cw, uint32_t nskey)
-{
- struct ami_crtvrfy_window *crtvrfy_win;
-
- /* technically degenerate container of */
- crtvrfy_win = (struct ami_crtvrfy_window *)ami_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 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_crtvrfy_draw(struct ami_corewindow *ami_cw, int x, int y, struct rect *r, struct redraw_context *ctx)
-{
- struct ami_crtvrfy_window *crtvrfy_win;
-
- /* technically degenerate container of */
- crtvrfy_win = (struct ami_crtvrfy_window *)ami_cw;
-
- sslcert_viewer_redraw(crtvrfy_win->ssl_data, x, y, r, ctx);
-
- return NSERROR_OK;
-}
-
-static nserror
-ami_crtvrfy_create_window(struct ami_crtvrfy_window *crtvrfy_win)
-{
- struct ami_corewindow *ami_cw = (struct ami_corewindow *)&crtvrfy_win->core;
- ULONG refresh_mode = WA_SmartRefresh;
-
- if(nsoption_bool(window_simple_refresh) == true) {
- refresh_mode = WA_SimpleRefresh;
- }
-
- 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, FALSE,
- WA_SizeGadget, TRUE,
- WA_SizeBBottom, TRUE,
- WA_Height, scrn->Height / 2,
- 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_UserData, crtvrfy_win,
- /* WINDOW_NewMenu, twin->menu, -> No menu for SSL Cert */
- WINDOW_IconifyGadget, FALSE,
- WINDOW_Position, WPOS_CENTERSCREEN,
- WINDOW_ParentGroup, ami_cw->objects[GID_CW_MAIN] = LayoutVObj,
- LAYOUT_AddImage, LabelObj,
- LABEL_Text, crtvrfy_win->sslerr,
- LabelEnd,
- LAYOUT_AddChild, ami_cw->objects[GID_CW_HSCROLLLAYOUT] = LayoutVObj,
- LAYOUT_AddChild, ami_cw->objects[GID_CW_VSCROLLLAYOUT] = LayoutHObj,
- 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,
- LAYOUT_AddChild, ami_cw->objects[GID_CW_VSCROLL] = ScrollerObj,
- GA_ID, GID_CW_VSCROLL,
- GA_RelVerify, TRUE,
- ICA_TARGET, ICTARGET_IDCMP,
- ScrollerEnd,
- LayoutEnd,
- LAYOUT_AddChild, ami_cw->objects[GID_CW_HSCROLL] = ScrollerObj,
- GA_ID, GID_CW_HSCROLL,
- GA_RelVerify, TRUE,
- ICA_TARGET, ICTARGET_IDCMP,
- SCROLLER_Orientation, SORIENT_HORIZ,
- ScrollerEnd,
- LayoutEnd,
- LAYOUT_AddChild, LayoutHObj,
- LAYOUT_AddChild, crtvrfy_win->sslcert_objects[GID_SSLCERT_ACCEPT] = ButtonObj,
- GA_ID, GID_SSLCERT_ACCEPT,
- GA_Text, crtvrfy_win->sslaccept,
- GA_RelVerify, TRUE,
- ButtonEnd,
- LAYOUT_AddChild, crtvrfy_win->sslcert_objects[GID_SSLCERT_REJECT] = ButtonObj,
- GA_ID, GID_SSLCERT_REJECT,
- GA_Text, crtvrfy_win->sslreject,
- GA_RelVerify, TRUE,
- ButtonEnd,
- EndGroup,
- CHILD_WeightedHeight, 0,
- EndGroup,
- EndWindow;
-
- if(ami_cw->objects[GID_CW_WIN] == NULL) {
- return NSERROR_NOMEM;
- }
-
- return NSERROR_OK;
-}
-
-/* exported interface documented in amiga/ssl_cert.h */
-nserror ami_cert_verify(struct nsurl *url,
- const struct ssl_cert_info *certs,
- unsigned long num,
- nserror (*cb)(bool proceed, void *pw),
- void *cbpw)
-{
- struct ami_crtvrfy_window *ncwin;
- nserror res;
-
- ncwin = calloc(1, sizeof(struct ami_crtvrfy_window));
- if (ncwin == NULL) {
- return NSERROR_NOMEM;
- }
-
- ncwin->core.wintitle = ami_utf8_easy((char *)messages_get("SSLCerts"));
- ncwin->sslerr = ami_utf8_easy((char *)messages_get("SSLError"));
- ncwin->sslaccept = ami_utf8_easy((char *)messages_get("SSL_Certificate_Accept"));
- ncwin->sslreject = ami_utf8_easy((char *)messages_get("SSL_Certificate_Reject"));
-
- res = ami_crtvrfy_create_window(ncwin);
- if (res != NSERROR_OK) {
- NSLOG(netsurf, INFO, "SSL UI builder init failed");
- ami_utf8_free(ncwin->core.wintitle);
- ami_utf8_free(ncwin->sslerr);
- ami_utf8_free(ncwin->sslaccept);
- ami_utf8_free(ncwin->sslreject);
- free(ncwin);
- return res;
- }
-
- /* initialise Amiga core window */
- ncwin->core.draw = ami_crtvrfy_draw;
- ncwin->core.key = ami_crtvrfy_key;
- ncwin->core.mouse = ami_crtvrfy_mouse;
- ncwin->core.close = ami_crtvrfy_reject;
- ncwin->core.event = ami_crtvrfy_event;
-
- res = ami_corewindow_init(&ncwin->core);
- if (res != NSERROR_OK) {
- ami_utf8_free(ncwin->core.wintitle);
- ami_utf8_free(ncwin->sslerr);
- ami_utf8_free(ncwin->sslaccept);
- ami_utf8_free(ncwin->sslreject);
- DisposeObject(ncwin->core.objects[GID_CW_WIN]);
- 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) {
- ami_utf8_free(ncwin->core.wintitle);
- ami_utf8_free(ncwin->sslerr);
- ami_utf8_free(ncwin->sslaccept);
- ami_utf8_free(ncwin->sslreject);
- DisposeObject(ncwin->core.objects[GID_CW_WIN]);
- free(ncwin);
- return res;
- }
-
- res = sslcert_viewer_init(ncwin->core.cb_table,
- (struct core_window *)ncwin,
- ncwin->ssl_data);
- if (res != NSERROR_OK) {
- ami_utf8_free(ncwin->core.wintitle);
- ami_utf8_free(ncwin->sslerr);
- ami_utf8_free(ncwin->sslaccept);
- ami_utf8_free(ncwin->sslreject);
- DisposeObject(ncwin->core.objects[GID_CW_WIN]);
- free(ncwin);
- return res;
- }
-
- return NSERROR_OK;
-}
-
diff --git a/frontends/amiga/stringview/stringview.c b/frontends/amiga/stringview/stringview.c
index 245782b43..60c694a3c 100755
--- a/frontends/amiga/stringview/stringview.c
+++ b/frontends/amiga/stringview/stringview.c
@@ -161,7 +161,7 @@ static uint32 myStringSearch( Class *cl, Object *obj )
if(searchString)
{
searchString += 3;
- if (bufpos >= searchString - data->SearchBuffer)
+ if (bufpos >= (uint32)(searchString - data->SearchBuffer))
bufpos -= searchString - data->SearchBuffer;
}
else
@@ -848,7 +848,7 @@ Class *MakeStringClass( void )
if ( cl )
{
- cl->cl_Dispatcher.h_Entry = (uint32(*)())myStringClassDispatcher;
+ cl->cl_Dispatcher.h_Entry = (uint32(*)(void))myStringClassDispatcher;
}
URLHistory_Init();
diff --git a/frontends/amiga/stringview/stringview.h b/frontends/amiga/stringview/stringview.h
index 776705f0f..ecb53e802 100755
--- a/frontends/amiga/stringview/stringview.h
+++ b/frontends/amiga/stringview/stringview.h
@@ -41,8 +41,8 @@ struct myStringClassData
Object * WindowObject;
Object * ListviewObject;
struct List ListviewHeader;
- uint32 ListviewCount;
- uint32 ListviewSelected;
+ int32 ListviewCount;
+ int32 ListviewSelected;
struct List * SearchHeader;
STRPTR SearchBuffer;
};
diff --git a/frontends/amiga/theme.c b/frontends/amiga/theme.c
index 5e4be0710..3e6ed8647 100644
--- a/frontends/amiga/theme.c
+++ b/frontends/amiga/theme.c
@@ -54,7 +54,8 @@
static struct BitMap *throbber = NULL;
static struct bitmap *throbber_nsbm = NULL;
-static int throbber_frames, throbber_update_interval;
+static int throbber_frames = 1;
+static int throbber_update_interval;
static Object *mouseptrobj[AMI_LASTPOINTER+1];
static struct BitMap *mouseptrbm[AMI_LASTPOINTER+1];
@@ -176,6 +177,7 @@ void ami_theme_throbber_setup(void)
ami_get_theme_filename(throbberfile,"theme_throbber",false);
throbber_frames=atoi(messages_get("theme_throbber_frames"));
+ if(throbber_frames == 0) throbber_frames = 1;
throbber_update_interval = atoi(messages_get("theme_throbber_delay"));
if(throbber_update_interval == 0) throbber_update_interval = 250;
@@ -213,20 +215,7 @@ void ami_get_theme_filename(char *filename, const char *themestring, bool protoc
void gui_window_set_pointer(struct gui_window *g, gui_pointer_shape shape)
{
- ami_set_pointer(g->shared, shape, true);
-}
-
-void ami_set_pointer(struct gui_window_2 *gwin, gui_pointer_shape shape, bool update)
-{
- if(gwin->mouse_pointer == shape) return;
- ami_update_pointer(gwin->win, shape);
- if(update == true) gwin->mouse_pointer = shape;
-}
-
-/* reset the mouse pointer back to what NetSurf last set it as */
-void ami_reset_pointer(struct gui_window_2 *gwin)
-{
- ami_update_pointer(gwin->win, gwin->mouse_pointer);
+ ami_set_pointer(ami_gui_get_gui_window_2(g), shape, true);
}
void ami_update_pointer(struct Window *win, gui_pointer_shape shape)
@@ -427,16 +416,16 @@ void gui_window_start_throbber(struct gui_window *g)
if(nsoption_bool(kiosk_mode)) return;
#ifdef __amigaos4__
- if(g->tab_node && (g->shared->tabs > 1))
+ if(ami_gui_get_tab_node(g) && (ami_gui2_get_tabs(ami_gui_get_gui_window_2(g)) > 1))
{
- SetClickTabNodeAttrs(g->tab_node, TNA_Flagged, TRUE, TAG_DONE);
- RefreshGadgets((APTR)g->shared->objects[GID_TABS],
- g->shared->win, NULL);
+ SetClickTabNodeAttrs(ami_gui_get_tab_node(g), TNA_Flagged, TRUE, TAG_DONE);
+ RefreshGadgets((APTR)ami_gui2_get_object(ami_gui_get_gui_window_2(g), AMI_GAD_TABS),
+ ami_gui_get_window(g), NULL);
}
#endif
- g->throbbing = true;
- if(g->shared->throbber_frame == 0) g->shared->throbber_frame = 1;
+ ami_gui_set_throbbing(g, true);
+ if(ami_gui_get_throbber_frame(g) == 0) ami_gui_set_throbber_frame(g, 1);
ami_throbber_redraw_schedule(throbber_update_interval, g);
}
@@ -448,22 +437,22 @@ void gui_window_stop_throbber(struct gui_window *g)
if(nsoption_bool(kiosk_mode)) return;
#ifdef __amigaos4__
- if(g->tab_node && (g->shared->tabs > 1))
+ if(ami_gui_get_tab_node(g) && (ami_gui2_get_tabs(ami_gui_get_gui_window_2(g)) > 1))
{
- SetClickTabNodeAttrs(g->tab_node, TNA_Flagged, FALSE, TAG_DONE);
- RefreshGadgets((APTR)g->shared->objects[GID_TABS],
- g->shared->win, NULL);
+ SetClickTabNodeAttrs(ami_gui_get_tab_node(g), TNA_Flagged, FALSE, TAG_DONE);
+ RefreshGadgets((APTR)ami_gui2_get_object(ami_gui_get_gui_window_2(g), AMI_GAD_TABS),
+ ami_gui_get_window(g), NULL);
}
#endif
- if(g == g->shared->gw) {
- if(ami_gui_get_space_box(g->shared->objects[GID_THROBBER], &bbox) != NSERROR_OK) {
+ if(IS_CURRENT_GW(ami_gui_get_gui_window_2(g), g)) {
+ if(ami_gui_get_space_box(ami_gui2_get_object(ami_gui_get_gui_window_2(g), AMI_GAD_THROBBER), &bbox) != NSERROR_OK) {
amiga_warn_user("NoMemory", "");
return;
}
if(throbber != NULL) {
- BltBitMapRastPort(throbber, 0, 0, g->shared->win->RPort,
+ BltBitMapRastPort(throbber, 0, 0, ami_gui_get_window(g)->RPort,
bbox->Left, bbox->Top,
ami_theme_throbber_get_width(), ami_theme_throbber_get_height(),
0x0C0);
@@ -471,7 +460,7 @@ void gui_window_stop_throbber(struct gui_window *g)
ami_gui_free_space_box(bbox);
}
- g->throbbing = false;
+ ami_gui_set_throbbing(g, false);
ami_throbber_redraw_schedule(-1, g);
}
@@ -482,17 +471,17 @@ static void ami_throbber_update(void *p)
int frame = 0;
if(!g) return;
- if(!g->shared->objects[GID_THROBBER]) return;
+ if(!ami_gui2_get_object(ami_gui_get_gui_window_2(g), AMI_GAD_THROBBER)) return;
- if(g->throbbing == true) {
- frame = g->shared->throbber_frame;
- g->shared->throbber_frame++;
- if(g->shared->throbber_frame > (throbber_frames-1))
- g->shared->throbber_frame=1;
+ if(ami_gui_get_throbbing(g) == true) {
+ frame = ami_gui_get_throbber_frame(g);
+ ami_gui_set_throbber_frame(g, frame + 1);
+ if(ami_gui_get_throbber_frame(g) > (throbber_frames-1))
+ ami_gui_set_throbber_frame(g, 1);
}
- if(g->shared->gw == g) {
- if(ami_gui_get_space_box(g->shared->objects[GID_THROBBER], &bbox) != NSERROR_OK) {
+ if(IS_CURRENT_GW(ami_gui_get_gui_window_2(g),g)) {
+ if(ami_gui_get_space_box(ami_gui2_get_object(ami_gui_get_gui_window_2(g), AMI_GAD_THROBBER), &bbox) != NSERROR_OK) {
amiga_warn_user("NoMemory", "");
return;
}
@@ -506,14 +495,14 @@ static void ami_throbber_update(void *p)
BLITA_Width, ami_theme_throbber_get_width(),
BLITA_Height, ami_theme_throbber_get_height(),
BLITA_Source, throbber,
- BLITA_Dest, g->shared->win->RPort,
+ BLITA_Dest, ami_gui_get_window(g)->RPort,
BLITA_SrcType, BLITT_BITMAP,
BLITA_DestType, BLITT_RASTPORT,
// BLITA_UseSrcAlpha, TRUE,
TAG_DONE);
#else
BltBitMapRastPort(throbber, ami_theme_throbber_get_width() * frame,
- 0, g->shared->win->RPort,
+ 0, ami_gui_get_window(g)->RPort,
bbox->Left, bbox->Top,
ami_theme_throbber_get_width(), ami_theme_throbber_get_height(),
0xC0);
diff --git a/frontends/amiga/theme.h b/frontends/amiga/theme.h
index 6de7bc150..6ab3c0ea8 100644
--- a/frontends/amiga/theme.h
+++ b/frontends/amiga/theme.h
@@ -40,8 +40,6 @@ void ami_update_throbber(struct gui_window_2 *g,bool redraw);
void ami_init_mouse_pointers(void);
void ami_mouse_pointers_free(void);
-void ami_set_pointer(struct gui_window_2 *gwin, gui_pointer_shape shape, bool update);
-void ami_reset_pointer(struct gui_window_2 *gwin);
/* Use the following ONLY if nothing other than the Intuition window pointer is available,
* and ALWAYS in preference to SetWindowPointer(), as it features more pointers and uses
* the correct ones specified in user preferences. */
diff --git a/frontends/amiga/utf8.c b/frontends/amiga/utf8.c
index 5d05e9535..fabb1e24c 100755
--- a/frontends/amiga/utf8.c
+++ b/frontends/amiga/utf8.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2008 Chris Young <chris@unsatisfactorysoftware.co.uk>
+ * Copyright 2008-2021 Chris Young <chris@unsatisfactorysoftware.co.uk>
*
* This file is part of NetSurf, http://www.netsurf-browser.org/
*
@@ -22,6 +22,7 @@
#include <string.h>
#include <sys/types.h>
+#include <proto/codesets.h>
#include <proto/exec.h>
#include <proto/utility.h>
@@ -31,20 +32,73 @@
#include "amiga/utf8.h"
+static nserror ami_utf8_codesets(const char *string, size_t len, char **result, bool to_local)
+{
+ char *out;
+ ULONG utf8_tag = CSA_SourceCodeset, local_tag = CSA_DestCodeset, len_tag = CSA_SourceLen;
+ static struct codeset *utf8_cs = NULL;
+ static struct codeset *local_cs = NULL;
+
+ if(local_cs == NULL) local_cs = CodesetsFind(NULL,
+#ifdef __amigaos4__
+ CSA_MIBenum, nsoption_int(local_codeset),
+#else
+ NULL,
+#endif
+ TAG_DONE);
+
+ if(utf8_cs == NULL) utf8_cs = CodesetsFind(NULL,
+ CSA_MIBenum, CS_MIBENUM_UTF_8,
+ TAG_DONE);
+
+ if(to_local == false) {
+ local_tag = CSA_SourceCodeset;
+ utf8_tag = CSA_DestCodeset;
+ }
+
+ if(len == 0) len_tag = TAG_IGNORE;
+
+ out = CodesetsConvertStr(CSA_Source, string,
+ len_tag, len,
+#ifdef __amigaos4__
+ local_tag, local_cs,
+#endif
+ utf8_tag, utf8_cs,
+ CSA_MapForeignChars, TRUE,
+ TAG_DONE);
+
+ if(out != NULL) {
+ *result = strdup(out);
+ CodesetsFreeA(out, NULL);
+ } else {
+ return NSERROR_BAD_ENCODING;
+ }
+
+ return NSERROR_OK;
+}
+
nserror utf8_from_local_encoding(const char *string, size_t len, char **result)
{
- return utf8_from_enc(string, nsoption_charp(local_charset), len, result, NULL);
+ if(__builtin_expect((CodesetsBase == NULL), 0)) {
+ return utf8_from_enc(string, nsoption_charp(local_charset), len, result, NULL);
+ } else {
+ return ami_utf8_codesets(string, len, result, false);
+ }
}
nserror utf8_to_local_encoding(const char *string, size_t len, char **result)
{
- nserror err = NSERROR_NOMEM;
- char *local_charset = ASPrintf("%s//IGNORE", nsoption_charp(local_charset));
- if(local_charset) {
- err = utf8_to_enc(string, local_charset, len, result);
- FreeVec(local_charset);
+ if(__builtin_expect((CodesetsBase == NULL), 0)) {
+ nserror err = NSERROR_NOMEM;
+ char *local_charset = ASPrintf("%s//IGNORE", nsoption_charp(local_charset));
+ if(local_charset) {
+ err = utf8_to_enc(string, local_charset, len, result);
+ FreeVec(local_charset);
+ }
+ return err;
+ } else {
+ return ami_utf8_codesets(string, len, result, true);
}
- return err;
}
void ami_utf8_free(char *ptr)
diff --git a/frontends/amiga/version.c b/frontends/amiga/version.c
index c3cd9e2b5..ae898cb83 100644
--- a/frontends/amiga/version.c
+++ b/frontends/amiga/version.c
@@ -25,7 +25,7 @@
* problems created by "0" not being a valid AmigaOS revision number.
*/
#define NETSURF_VERSION_MAJOR "3"
-#define NETSURF_VERSION_MINOR_EXTERNAL "7"
+#define NETSURF_VERSION_MINOR_EXTERNAL "12"
#if defined(CI_BUILD)
#define NETSURF_VERSION_MINOR CI_BUILD
#else
diff --git a/frontends/atari/Makefile b/frontends/atari/Makefile
index a2f27e2f2..2f6d7118b 100644
--- a/frontends/atari/Makefile
+++ b/frontends/atari/Makefile
@@ -8,7 +8,7 @@
# toolchain is located in /usr/bin and the wildcard matching
# fails then. So this wildcard matches only works for
# the netsurf environment!
-STRIP := $(wildcard $(GCCSDK_INSTALL_CROSSBIN)/*strip)
+STRIP := $(wildcard $(GCCSDK_INSTALL_CROSSBIN)/*-strip)
STACK := $(wildcard $(GCCSDK_INSTALL_CROSSBIN)/*stack)
FT2CF := $(GCCSDK_INSTALL_ENV)/bin/freetype-config
@@ -33,10 +33,31 @@ endif
# non-pkgconfig components
-FREETYPE_FONT_CFLAGS := $(shell $(FT2CF) --cflags) -DWITH_FREETYPE_FONT_DRIVER
SPIDERMONKEY_CFLAGS := -DXP_UNIX -DJS_HAS_FILE_OBJECT=0 -DJSOPTION_JIT=0 -DPOSIX_SOURCE -D_BSD_SOURCE
-$(eval $(call feature_enabled,ATARI_FREETYPE_FONT,$(FREETYPE_FONT_CFLAGS),-lfreetype,(Freetype)))
+# freetype is optional but older versions do not use pkg-config
+ifeq ($(NETSURF_USE_ATARI_FREETYPE_FONT),YES)
+ NETSURF_USE_FREETYPE2 := AUTO
+ NETSURF_FEATURE_FREETYPE2_CFLAGS := -DWITH_FREETYPE_FONT_DRIVER
+
+ $(eval $(call pkg_config_find_and_add_enabled,FREETYPE2,freetype2,freetype2))
+
+ # try and use non pkg-config method
+ ifeq ($(NETSURF_USE_FREETYPE2),NO)
+ FREETYPE_CONFIG_EXISTS := $(shell $(FT2CF) --cflags >/dev/null && echo yes)
+ ifeq ($(FREETYPE_CONFIG_EXISTS),yes)
+ NETSURF_USE_FREETYPE2 := YES
+ CFLAGS += $(shell $(FT2CF) --cflags) $(NETSURF_FEATURE_FREETYPE2_CFLAGS)
+ LDFLAGS += $(shell $(FT2CF) --libs)
+ $(info FT2.CNFG: freetype2 (freetype2) enabled)
+ else
+ $(info FT2.CNFG: freetype2 (freetype2) failed)
+ $(error Unable to find library for: freetype2)
+ endif
+ endif
+endif
+
+
$(eval $(call feature_enabled,ATARI_NETSURF_FONT,-DWITH_INTERNAL_FONT_DRIVER,,(Internal Font)))
$(eval $(call feature_enabled,ATARI_VDI_FONT,-DWITH_VDI_FONT_DRIVER,,(VDI Font)))
$(eval $(call feature_enabled,ATARI_8BPP_SUPPORT,-DWITH_8BPP_SUPPORT,,(Indexed screen format support)))
@@ -64,7 +85,6 @@ S_FRONTEND := \
clipboard.c \
ctxmenu.c \
cookies.c \
- certview.c \
deskmenu.c \
download.c \
encoding.c \
@@ -75,7 +95,6 @@ S_FRONTEND := \
gui.c \
hotlist.c \
history.c \
- login.c \
misc.c \
osspec.c \
redrawslots.c \
@@ -104,8 +123,16 @@ S_FRONTEND := \
# Note this is deliberately *not* expanded here as common and image
# are not yet available
SOURCES = $(S_COMMON) $(S_IMAGE) $(S_BROWSER) $(S_FRONTEND)
+
+# ---------------------------------------------------------------------------
+# Target setup
+# ---------------------------------------------------------------------------
+
EXETARGET := ns$(SUBTARGET)$(PRGSUFFIX)
+# The filter and target for split messages
+MESSAGES_FILTER=atari
+
# ----------------------------------------------------------------------------
# Install target
# ----------------------------------------------------------------------------
@@ -118,12 +145,8 @@ ATARI_FONT_SOURCE_URL := http://ftp.gnome.org/pub/GNOME/sources/ttf-bitstream-ve
#ATARI_FONT_SOURCE_URL := http://localhost/$(ATARI_FONT_NAME).tar.gz
ATARI_FONT_TMP_DIR := $(DEPROOT)/../
ATARI_FONT_SOURCE_DIR := $(ATARI_FONT_TMP_DIR)$(ATARI_FONT_NAME)/
-ATARI_GENERIC_RESOURCES := de en it ja
-ATARI_RESOURCES := $(addprefix \!NetSurf/Resources/,$(ATARI_GENERIC_RESOURCES))
-
-# ----------------------------------------------------------------------------
-# Install target
-# ----------------------------------------------------------------------------
+ATARI_GENERIC_RESOURCES := de en it ja nl
+ATARI_RESOURCES := $(addprefix resources/,$(ATARI_GENERIC_RESOURCES))
install-atari:
@@ -138,7 +161,7 @@ $(ATARI_FONT_TMP_DIR)$(ATARI_FONT_NAME):
package-atari: $(ATARI_FONT_TMP_DIR)$(ATARI_FONT_NAME) $(PKGNAME)
$(VQ)echo Creating $(PKGNAME)
-$(PKGNAME): $(EXETARGET)
+$(PKGNAME): $(EXETARGET) $(POSTEXES)
ifneq ($(strip $(STRIP)),)
$(Q)echo Stripping symbols from $(EXETARGET) with $(STRIP)
$(Q)$(STRIP) $(EXETARGET)
@@ -168,20 +191,19 @@ endif
$(Q)cp $(ATARI_RES_DIR)/netsurf.rsc $(ATARI_TARGET_DIR)res/netsurf.rsc
$(Q)cp $(ATARI_RES_DIR)/languages $(ATARI_TARGET_DIR)res/languages
$(Q)cp $(ATARI_RES_DIR)/icons/toolbar -R $(ATARI_TARGET_DIR)res/icons
- $(Q)cp \!NetSurf/Resources/Icons/* -R $(ATARI_TARGET_DIR)res/icons/
-
- $(Q)cp \!NetSurf/Resources/netsurf.png,b60 $(ATARI_TARGET_DIR)res/netsurf.png
- $(Q)cp \!NetSurf/Resources/AdBlock,f79 $(ATARI_TARGET_DIR)res/adblock.css
- $(Q)cp \!NetSurf/Resources/CSS,f79 $(ATARI_TARGET_DIR)res/default.css
- $(Q)cp \!NetSurf/Resources/Quirks,f79 $(ATARI_TARGET_DIR)res/quirks.css
- $(Q)cp \!NetSurf/Resources/internal.css,f79 $(ATARI_TARGET_DIR)res/internal.css
- $(Q)cp \!NetSurf/Resources/SearchEngines $(ATARI_TARGET_DIR)res/search
- $(Q)cp \!NetSurf/Resources/ca-bundle $(ATARI_TARGET_DIR)res/cabundle
- $(Q)$(SPLIT_MESSAGES) -l en -p atari -f messages resources/FatMessages > $(ATARI_TARGET_DIR)res/messages
- $(Q)cp \!NetSurf/Resources/en/welcome.html,faf $(ATARI_TARGET_DIR)res/welcome.html
- $(Q)cp \!NetSurf/Resources/en/maps.html,faf $(ATARI_TARGET_DIR)res/maps.html
- $(Q)cp \!NetSurf/Resources/en/licence.html,faf $(ATARI_TARGET_DIR)res/licence.html
- $(Q)cp \!NetSurf/Resources/en/credits.html,faf $(ATARI_TARGET_DIR)res/credits.html
+ $(Q)cp resources/icons/* -R $(ATARI_TARGET_DIR)res/icons/
+
+ $(Q)cp resources/netsurf.png $(ATARI_TARGET_DIR)res/netsurf.png
+ $(Q)cp resources/adblock.css $(ATARI_TARGET_DIR)res/adblock.css
+ $(Q)cp resources/default.css $(ATARI_TARGET_DIR)res/default.css
+ $(Q)cp resources/quirks.css $(ATARI_TARGET_DIR)res/quirks.css
+ $(Q)cp resources/internal.css $(ATARI_TARGET_DIR)res/internal.css
+ $(Q)cp resources/SearchEngines $(ATARI_TARGET_DIR)res/search
+ $(Q)cp resources/ca-bundle $(ATARI_TARGET_DIR)res/cabundle
+ $(Q)$(INSTALL) -m 644 -T $(MESSAGES_TARGET)/en/Messages $(ATARI_TARGET_DIR)res/messages
+ $(Q)cp resources/en/welcome.html $(ATARI_TARGET_DIR)res/welcome.html
+ $(Q)cp resources/en/licence.html $(ATARI_TARGET_DIR)res/licence.html
+ $(Q)cp resources/en/credits.html $(ATARI_TARGET_DIR)res/credits.html
# copy "Bitstream Vera" font:
$(Q)cp $(ATARI_FONT_SOURCE_DIR)RELEASENOTES.TXT $(ATARI_TARGET_DIR)res/fonts/
diff --git a/frontends/atari/Makefile.tools b/frontends/atari/Makefile.tools
new file mode 100644
index 000000000..971ab21be
--- /dev/null
+++ b/frontends/atari/Makefile.tools
@@ -0,0 +1,19 @@
+# -*- mode: makefile-gmake -*-
+##
+## atari target tool setup
+##
+
+ifeq ($(HOST),atari)
+ PKG_CONFIG := pkg-config
+else
+ ifeq ($(HOST),mint)
+ PKG_CONFIG := pkg-config
+ else
+ GCCSDK_INSTALL_ENV ?= /opt/netsurf/m68k-atari-mint/env
+ GCCSDK_INSTALL_CROSSBIN ?= /opt/netsurf/m68k-atari-mint/cross/bin
+
+ CC := $(wildcard $(GCCSDK_INSTALL_CROSSBIN)/*gcc)
+
+ PKG_CONFIG := PKG_CONFIG_LIBDIR="$(GCCSDK_INSTALL_ENV)/lib/pkgconfig" pkg-config
+ endif
+endif \ No newline at end of file
diff --git a/frontends/atari/bitmap.c b/frontends/atari/bitmap.c
index ae42da837..9b5a016a5 100644
--- a/frontends/atari/bitmap.c
+++ b/frontends/atari/bitmap.c
@@ -77,36 +77,36 @@ int init_mfdb(int bpp, int w, int h, uint32_t flags, MFDB * out )
* \param pixdata NULL or an memory address to use as the bitmap pixdata
* \return an opaque struct bitmap, or NULL on memory exhaustion
*/
-static void *atari_bitmap_create_ex( int w, int h, short bpp, int rowstride, unsigned int state, void * pixdata )
+static void *atari_bitmap_create_ex( int w, int h, short bpp, int rowstride, enum gui_bitmap_flags flags, void * pixdata )
{
- struct bitmap * bitmap;
+ struct bitmap * bitmap;
- NSLOG(netsurf, INFO,
- "width %d (rowstride: %d, bpp: %d), height %d, state %u", w,
- rowstride, bpp, h, state);
+ NSLOG(netsurf, INFO,
+ "width %d (rowstride: %d, bpp: %d), height %d, flags %u", w,
+ rowstride, bpp, h, (unsigned)flags);
if( rowstride == 0) {
rowstride = bpp * w;
}
assert( rowstride >= (w * bpp) );
- bitmap = calloc(1 , sizeof(struct bitmap) );
- if (bitmap) {
+ bitmap = calloc(1 , sizeof(struct bitmap) );
+ if (bitmap) {
if( pixdata == NULL) {
- bitmap->pixdata = calloc(1, (rowstride * h)+128);
+ bitmap->pixdata = calloc(1, (rowstride * h)+128);
}
else {
bitmap->pixdata = pixdata;
}
- if (bitmap->pixdata != NULL) {
+ if (bitmap->pixdata != NULL) {
bitmap->width = w;
bitmap->height = h;
- bitmap->opaque = (state & BITMAP_OPAQUE) ? true : false;
+ bitmap->opaque = (flags & BITMAP_OPAQUE) ? true : false;
bitmap->bpp = bpp;
bitmap->resized = NULL;
bitmap->rowstride = rowstride;
- } else {
+ } else {
free(bitmap);
bitmap=NULL;
NSLOG(netsurf, INFO, "Out of memory!");
@@ -118,9 +118,9 @@ static void *atari_bitmap_create_ex( int w, int h, short bpp, int rowstride, uns
/* exported interface documented in atari/bitmap.h */
-void *atari_bitmap_create(int w, int h, unsigned int state)
+void *atari_bitmap_create(int w, int h, enum gui_bitmap_flags flags)
{
- return atari_bitmap_create_ex( w, h, NS_BMP_DEFAULT_BPP, w * NS_BMP_DEFAULT_BPP, state, NULL );
+ return atari_bitmap_create_ex( w, h, NS_BMP_DEFAULT_BPP, w * NS_BMP_DEFAULT_BPP, flags, NULL );
}
/**
@@ -249,21 +249,6 @@ void atari_bitmap_destroy(void *bitmap)
/**
- * Save a bitmap in the platform's native format.
- *
- * \param bitmap a bitmap, as returned by bitmap_create()
- * \param path pathname for file
- * \param flags flags controlling how the bitmap is saved.
- * \return true on success, false on error and error reported
- */
-
-static bool bitmap_save(void *bitmap, const char *path, unsigned flags)
-{
- return true;
-}
-
-
-/**
* Sets whether a bitmap should be plotted opaque
*
* \param bitmap a bitmap, as returned by bitmap_create()
@@ -284,40 +269,6 @@ static void bitmap_set_opaque(void *bitmap, bool opaque)
}
-/**
- * Tests whether a bitmap has an opaque alpha channel
- *
- * \param bitmap a bitmap, as returned by bitmap_create()
- * \return whether the bitmap is opaque
- */
-static bool bitmap_test_opaque(void *bitmap)
-{
- int tst;
- struct bitmap *bm = bitmap;
-
- if (bitmap == NULL) {
- NSLOG(netsurf, INFO, "NULL bitmap!");
- return false;
- }
-
- if( nsoption_int(atari_transparency) == 0 ){
- return( true );
- }
-
- tst = bm->width * bm->height;
-
- while (tst-- > 0) {
- if (bm->pixdata[(tst << 2) + 3] != 0xff) {
- NSLOG(netsurf, INFO,
- "bitmap %p has transparency", bm);
- return false;
- }
- }
- NSLOG(netsurf, INFO, "bitmap %p is opaque", bm);
- return true;
-}
-
-
/* exported interface documented in atari/bitmap.h */
bool atari_bitmap_get_opaque(void *bitmap)
{
@@ -358,22 +309,12 @@ int atari_bitmap_get_height(void *bitmap)
return(bm->height);
}
-
-/**
- * Gets the number of BYTES per pixel.
- */
-static size_t bitmap_get_bpp(void *bitmap)
-{
- struct bitmap *bm = bitmap;
- return bm->bpp;
-}
-
/* exported interface documented in atari/bitmap.h */
bool atari_bitmap_resize(struct bitmap *img, HermesHandle hermes_h,
HermesFormat *fmt, int nw, int nh)
{
- unsigned int state = 0;
- short bpp = bitmap_get_bpp( img );
+ enum gui_bitmap_flags flags = 0;
+ short bpp = img->bpp;
int stride = atari_bitmap_get_rowstride( img );
int err;
@@ -389,9 +330,9 @@ bool atari_bitmap_resize(struct bitmap *img, HermesHandle hermes_h,
/* allocate the mem for resized bitmap */
if (img->opaque == true) {
- state |= BITMAP_OPAQUE;
+ flags |= BITMAP_OPAQUE;
}
- img->resized = atari_bitmap_create_ex( nw, nh, bpp, nw*bpp, state, NULL );
+ img->resized = atari_bitmap_create_ex( nw, nh, bpp, nw*bpp, flags, NULL );
if( img->resized == NULL ) {
printf("W: %d, H: %d, bpp: %d\n", nw, nh, bpp);
assert(img->resized);
@@ -439,13 +380,10 @@ static struct gui_bitmap_table bitmap_table = {
.destroy = atari_bitmap_destroy,
.set_opaque = bitmap_set_opaque,
.get_opaque = atari_bitmap_get_opaque,
- .test_opaque = bitmap_test_opaque,
.get_buffer = bitmap_get_buffer,
.get_rowstride = atari_bitmap_get_rowstride,
.get_width = atari_bitmap_get_width,
.get_height = atari_bitmap_get_height,
- .get_bpp = bitmap_get_bpp,
- .save = bitmap_save,
.modified = bitmap_modified,
.render = bitmap_render,
};
diff --git a/frontends/atari/bitmap.h b/frontends/atari/bitmap.h
index b0fa18069..88985ad3c 100644
--- a/frontends/atari/bitmap.h
+++ b/frontends/atari/bitmap.h
@@ -54,7 +54,7 @@
*/
#define MFDB_SIZE( bpp, stride, h ) ( ((stride >> 3) * h) * bpp )
-struct gui_bitmap_table *atari_bitmap_table;
+extern struct gui_bitmap_table *atari_bitmap_table;
struct bitmap {
int width;
@@ -90,7 +90,7 @@ int init_mfdb(int bpp, int w, int h, uint32_t flags, MFDB * out );
* \param state a flag word indicating the initial state
* \return an opaque struct bitmap, or NULL on memory exhaustion
*/
-void *atari_bitmap_create(int w, int h, unsigned int state);
+void *atari_bitmap_create(int w, int h, enum gui_bitmap_flags flags);
/**
* Find the width of a pixel row in bytes.
diff --git a/frontends/atari/certview.c b/frontends/atari/certview.c
deleted file mode 100644
index 80d18a059..000000000
--- a/frontends/atari/certview.c
+++ /dev/null
@@ -1,293 +0,0 @@
-/*
- * Copyright 2013 Ole Loots <ole@monochrom.net>
- *
- * This file is part of NetSurf, http://www.netsurf-browser.org/
- *
- * NetSurf is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * NetSurf is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include <ctype.h>
-#include <string.h>
-#include <stdbool.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <time.h>
-
-#include "utils/nsoption.h"
-#include "utils/log.h"
-#include "utils/messages.h"
-#include "utils/utils.h"
-#include "desktop/sslcert_viewer.h"
-
-#include "atari/gui.h"
-#include "atari/misc.h"
-#include "atari/treeview.h"
-#include "atari/certview.h"
-#include "atari/findfile.h"
-#include "atari/gemtk/gemtk.h"
-#include "atari/res/netsurf.rsh"
-
-extern GRECT desk_area;
-
-
-/* Setup Atari Treeview Callbacks: */
-static nserror atari_sslcert_viewer_init_phase2(struct core_window *cw,
- struct core_window_callback_table * default_callbacks);
-static void atari_sslcert_viewer_finish(struct core_window *cw);
-static void atari_sslcert_viewer_keypress(struct core_window *cw,
- uint32_t ucs4);
-static void atari_sslcert_viewer_mouse_action(struct core_window *cw,
- browser_mouse_state mouse,
- int x, int y);
-static void atari_sslcert_viewer_draw(struct core_window *cw, int x,
- int y, struct rect *clip,
- const struct redraw_context *ctx);
-static short handle_event(GUIWIN *win, EVMULT_OUT *ev_out, short msg[8]);
-
-static struct atari_treeview_callbacks atari_sslcert_viewer_treeview_callbacks = {
- .init_phase2 = atari_sslcert_viewer_init_phase2,
- .finish = atari_sslcert_viewer_finish,
- .draw = atari_sslcert_viewer_draw,
- .keypress = atari_sslcert_viewer_keypress,
- .mouse_action = atari_sslcert_viewer_mouse_action,
- .gemtk_user_func = handle_event
-};
-
-/* static functions */
-static void atari_sslcert_viewer_destroy(struct atari_sslcert_viewer_s * cvwin);
-
-
-static nserror atari_sslcert_viewer_init_phase2(struct core_window *cw,
- struct core_window_callback_table *cb_t)
-{
- struct atari_sslcert_viewer_s *cvwin;
- struct sslcert_session_data *ssl_d;
-
- cvwin = (struct atari_sslcert_viewer_s *)atari_treeview_get_user_data(cw);
-
- assert(cvwin);
-
- ssl_d = cvwin->ssl_session_data;
-
- assert(ssl_d);
-
- NSLOG(netsurf, INFO, "cw %p", cw);
-
- return(sslcert_viewer_init(cb_t, cw, ssl_d));
-}
-
-static void atari_sslcert_viewer_finish(struct core_window *cw)
-{
- struct atari_sslcert_viewer_s *cvwin;
-
- assert(cw);
-
- cvwin = (struct atari_sslcert_viewer_s *)atari_treeview_get_user_data(cw);
-
- /* This will also free the session data: */
- sslcert_viewer_fini(cvwin->ssl_session_data);
-
- NSLOG(netsurf, INFO, "cw %p", cw);
-}
-
-static void atari_sslcert_viewer_draw(struct core_window *cw, int x,
- int y, struct rect *clip,
- const struct redraw_context *ctx)
-{
- struct atari_sslcert_viewer_s *cvwin;
-
- assert(cw);
-
- cvwin = (struct atari_sslcert_viewer_s *)atari_treeview_get_user_data(cw);
-
- assert(cvwin);
-
- sslcert_viewer_redraw(cvwin->ssl_session_data, x, y, clip, ctx);
-}
-
-static void atari_sslcert_viewer_keypress(struct core_window *cw, uint32_t ucs4)
-{
- struct atari_sslcert_viewer_s *cvwin;
-
- assert(cw);
-
- cvwin = (struct atari_sslcert_viewer_s *)atari_treeview_get_user_data(cw);
-
- NSLOG(netsurf, INFO, "ucs4: %"PRIu32, ucs4);
- sslcert_viewer_keypress(cvwin->ssl_session_data, ucs4);
-}
-
-static void atari_sslcert_viewer_mouse_action(struct core_window *cw,
- browser_mouse_state mouse,
- int x, int y)
-{
- struct atari_sslcert_viewer_s *cvwin;
-
- assert(cw);
-
- cvwin = (struct atari_sslcert_viewer_s *)atari_treeview_get_user_data(cw);
-
- sslcert_viewer_mouse_action(cvwin->ssl_session_data, mouse, x, y);
-}
-
-
-static short handle_event(GUIWIN *win, EVMULT_OUT *ev_out, short msg[8])
-{
- struct core_window *tv=NULL;
- GRECT tb_area;
- GUIWIN * gemtk_win;
- struct atari_sslcert_viewer_s *cvwin = NULL;
- short retval = 0;
- OBJECT *toolbar;
-
- NSLOG(netsurf, INFO, "win %p", win);
-
- if(ev_out->emo_events & MU_MESAG){
- switch (msg[0]) {
-
- case WM_TOOLBAR:
- toolbar = gemtk_obj_get_tree(TOOLBAR_SSL_CERT);
- NSLOG(netsurf, INFO, "CERTVIEWER WM_TOOLBAR");
- tv = (struct core_window*) gemtk_wm_get_user_data(win);
- assert(tv);
- cvwin = (struct atari_sslcert_viewer_s *)
- atari_treeview_get_user_data(tv);
- switch (msg[4]) {
-
- case TOOLBAR_SSL_CERT_TRUSTED:
-
- if (toolbar[msg[4]].ob_state & OS_SELECTED) {
-
- } else {
-
- }
- break;
- }
-
-
- gemtk_win = atari_treeview_get_gemtk_window(tv);
- assert(gemtk_win);
- //gemtk_obj_get_tree(TOOLBAR_HOTLIST)[msg[4]].ob_state &= ~OS_SELECTED;
- atari_treeview_get_grect(tv, TREEVIEW_AREA_TOOLBAR, &tb_area);
- evnt_timer(150);
- gemtk_wm_exec_redraw(gemtk_win, &tb_area);
- retval = 1;
- break;
-
- case WM_CLOSED:
- // TODO set perrmissions
- toolbar = gemtk_obj_get_tree(TOOLBAR_SSL_CERT);
- tv = (struct core_window*) gemtk_wm_get_user_data(win);
- assert(tv);
- cvwin = (struct atari_sslcert_viewer_s *)
- atari_treeview_get_user_data(tv);
- if (toolbar[TOOLBAR_SSL_CERT_TRUSTED].ob_state & OS_SELECTED) {
- sslcert_viewer_accept(cvwin->ssl_session_data);
- } else {
- sslcert_viewer_reject(cvwin->ssl_session_data);
- }
- atari_sslcert_viewer_destroy(cvwin);
- retval = 1;
- break;
-
- default: break;
- }
- }
-
- return(retval);
-}
-
-static void atari_sslcert_viewer_init(struct atari_sslcert_viewer_s * cvwin,
- struct sslcert_session_data *ssl_d)
-{
- assert(cvwin->init == false);
- assert(cvwin->window == NULL);
- assert(cvwin->tv == NULL);
-
- int flags = ATARI_TREEVIEW_WIDGETS;
- short handle = -1;
- OBJECT * tree = gemtk_obj_get_tree(TOOLBAR_SSL_CERT);
- assert( tree );
-
- handle = wind_create(flags, 0, 0, desk_area.g_w, desk_area.g_h);
- cvwin->window = gemtk_wm_add(handle,
- GEMTK_WM_FLAG_DEFAULTS, NULL);
- if (cvwin->window == NULL ) {
- gemtk_msg_box_show(GEMTK_MSG_BOX_ALERT,
- "Failed to allocate Treeview:\nCertviewer");
- return;
- }
- wind_set_str(handle, WF_NAME, (char*)"SSL Certificate");
- gemtk_wm_set_toolbar(cvwin->window, tree, 0, 0);
- gemtk_wm_unlink(cvwin->window);
-
- cvwin->ssl_session_data = ssl_d;
- cvwin->tv = atari_treeview_create(cvwin->window,
- &atari_sslcert_viewer_treeview_callbacks,
- cvwin, flags);
-
- if (cvwin->tv == NULL) {
- /* handle it properly, clean up previous allocs */
- NSLOG(netsurf, INFO, "Failed to allocate treeview");
- return;
- }
-
- cvwin->init = true;
-}
-
-/*
- * documented in certview.h
- */
-void atari_sslcert_viewer_open(struct sslcert_session_data *ssl_d)
-{
- struct atari_sslcert_viewer_s * cvwin;
-
- cvwin = calloc(1, sizeof(struct atari_sslcert_viewer_s));
-
- assert(cvwin);
-
- atari_sslcert_viewer_init(cvwin, ssl_d);
-
- if (atari_treeview_is_open(cvwin->tv) == false) {
-
- GRECT pos;
- pos.g_x = desk_area.g_w - desk_area.g_w / 4;
- pos.g_y = desk_area.g_y;
- pos.g_w = desk_area.g_w / 4;
- pos.g_h = desk_area.g_h;
-
- atari_treeview_open(cvwin->tv, &pos);
- } else {
- wind_set(gemtk_wm_get_handle(cvwin->window), WF_TOP, 1, 0,
- 0, 0);
- }
-}
-
-
-static void atari_sslcert_viewer_destroy(struct atari_sslcert_viewer_s * cvwin)
-{
- assert(cvwin);
- assert(cvwin->init);
- assert(cvwin->window);
-
- NSLOG(netsurf, INFO, "cvwin %p", cvwin);
-
- if (atari_treeview_is_open(cvwin->tv))
- atari_treeview_close(cvwin->tv);
- wind_delete(gemtk_wm_get_handle(cvwin->window));
- gemtk_wm_remove(cvwin->window);
- cvwin->window = NULL;
- atari_treeview_delete(cvwin->tv);
- free(cvwin);
- NSLOG(netsurf, INFO, "done");
-}
diff --git a/frontends/atari/certview.h b/frontends/atari/certview.h
deleted file mode 100644
index ff15d8076..000000000
--- a/frontends/atari/certview.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright 2013 Ole Loots <ole@monochrom.net>
- *
- * This file is part of NetSurf, http://www.netsurf-browser.org/
- *
- * NetSurf is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * NetSurf is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef CERTVIEW_H_INCLUDED
-#define CERTVIEW_H_INCLUDED
-
-#include <inttypes.h>
-#include <sys/types.h>
-#include <string.h>
-
-
-#include "assert.h"
-#include "utils/nsoption.h"
-#include "utils/log.h"
-#include "desktop/sslcert_viewer.h"
-
-struct core_window;
-
-struct atari_sslcert_viewer_s {
- GUIWIN * window;
- //struct atari_treeview_window *tv;/*< The hotlist treeview handle. */
- struct core_window *tv;
- struct sslcert_session_data *ssl_session_data;
- bool init;
-};
-
-/**
- * Initializes and opens an certificate inspector window
- * \param ssl_d ssl session data created by sslcert_viewer_create_session_data
- *
- * The window takes ownership of the session data and free's the memory on exit.
- */
-void atari_sslcert_viewer_open(struct sslcert_session_data *ssl_d);
-
-
-#endif // CERTVIEW_H_INCLUDED
diff --git a/frontends/atari/ctxmenu.c b/frontends/atari/ctxmenu.c
index ef4f01ae2..eb6cc1611 100644
--- a/frontends/atari/ctxmenu.c
+++ b/frontends/atari/ctxmenu.c
@@ -216,7 +216,7 @@ void context_popup(struct gui_window * gw, short x, short y)
browser_window_navigate(
gw->browser->bw,
hlcache_handle_get_url(ctx->ccdata.object),
- browser_window_get_url(gw->browser->bw),
+ browser_window_access_url(gw->browser->bw),
BW_NAVIGATE_DOWNLOAD,
NULL,
NULL,
@@ -232,7 +232,7 @@ void context_popup(struct gui_window * gw, short x, short y)
error = browser_window_navigate(
gw->browser->bw,
ctx->ccdata.link,
- browser_window_get_url(gw->browser->bw),
+ browser_window_access_url(gw->browser->bw),
BW_NAVIGATE_DOWNLOAD,
NULL,
NULL,
@@ -269,7 +269,7 @@ void context_popup(struct gui_window * gw, short x, short y)
error = browser_window_create(
BW_CREATE_HISTORY | BW_CREATE_CLONE,
ctx->ccdata.link,
- browser_window_get_url(gw->browser->bw),
+ browser_window_access_url(gw->browser->bw),
gw->browser->bw,
NULL);
if (error != NSERROR_OK) {
diff --git a/frontends/atari/deskmenu.c b/frontends/atari/deskmenu.c
index ded68ca5b..4426415bc 100644
--- a/frontends/atari/deskmenu.c
+++ b/frontends/atari/deskmenu.c
@@ -387,9 +387,7 @@ static void __CDECL menu_inc_scale(short item, short title, void *data)
if(input_window == NULL)
return;
- browser_window_set_scale(input_window->browser->bw,
- browser_window_get_scale(input_window->browser->bw) + 0.25,
- true);
+ browser_window_set_scale(input_window->browser->bw, +0.25, false);
}
@@ -398,9 +396,7 @@ static void __CDECL menu_dec_scale(short item, short title, void *data)
if(input_window == NULL)
return;
- browser_window_set_scale(input_window->browser->bw,
- browser_window_get_scale(input_window->browser->bw) - 0.25,
- true);
+ browser_window_set_scale(input_window->browser->bw, -0.25, false);
}
@@ -510,7 +506,7 @@ static void __CDECL menu_add_bookmark(short item, short title, void *data)
if (input_window) {
if( browser_window_has_content(input_window->browser->bw) ){
atari_hotlist_add_page(
- nsurl_access(browser_window_get_url(input_window->browser->bw)),
+ nsurl_access(browser_window_access_url(input_window->browser->bw)),
NULL
);
}
diff --git a/frontends/atari/encoding.h b/frontends/atari/encoding.h
index 784aa8273..53db7b78b 100644
--- a/frontends/atari/encoding.h
+++ b/frontends/atari/encoding.h
@@ -25,7 +25,7 @@
#include "utils/utf8.h"
-struct gui_utf8_table *atari_utf8_table;
+extern struct gui_utf8_table *atari_utf8_table;
nserror utf8_to_local_encoding(const char *string, size_t len, char **result);
nserror utf8_from_local_encoding(const char *string, size_t len, char **result);
diff --git a/frontends/atari/file.c b/frontends/atari/file.c
index 235d8240f..81b67e86c 100644
--- a/frontends/atari/file.c
+++ b/frontends/atari/file.c
@@ -234,7 +234,7 @@ static nserror atari_mkdir_all(const char *fname)
dname = strdup(fname);
- sep = strrchr(dname, '/');
+ sep = strrchr(dname, '\\');
if (sep == NULL) {
/* no directory separator path is just filename so its ok */
free(dname);
@@ -251,13 +251,13 @@ static nserror atari_mkdir_all(const char *fname)
}
return NSERROR_NOT_DIRECTORY;
}
- *sep = '/'; /* restore separator */
+ *sep = '\\'; /* restore separator */
sep = dname;
- while (*sep == '/') {
+ while (*sep == '\\') {
sep++;
}
- while ((sep = strchr(sep, '/')) != NULL) {
+ while ((sep = strchr(sep, '\\')) != NULL) {
*sep = 0;
if (stat(dname, &sb) != 0) {
if (nsmkdir(dname, S_IRWXU) != 0) {
@@ -272,9 +272,9 @@ static nserror atari_mkdir_all(const char *fname)
return NSERROR_NOT_DIRECTORY;
}
}
- *sep = '/'; /* restore separator */
+ *sep = '\\'; /* restore separator */
/* skip directory separators */
- while (*sep == '/') {
+ while (*sep == '\\') {
sep++;
}
}
diff --git a/frontends/atari/file.h b/frontends/atari/file.h
index b368567c7..3e568834b 100644
--- a/frontends/atari/file.h
+++ b/frontends/atari/file.h
@@ -21,7 +21,7 @@
#include "utils/file.h"
-struct gui_file_table *atari_file_table;
+extern struct gui_file_table *atari_file_table;
#endif /* FILE_C_INCLUDED */
diff --git a/frontends/atari/font.h b/frontends/atari/font.h
index a01d000c0..c0eb99dcd 100644
--- a/frontends/atari/font.h
+++ b/frontends/atari/font.h
@@ -19,7 +19,7 @@
#ifndef NS_ATARI_FONT_H
#define NS_ATARI_FONT_H
-struct gui_layout_table *atari_layout_table;
+extern struct gui_layout_table *atari_layout_table;
#endif /* NETSURF_FB_FONT_H */
diff --git a/frontends/atari/gui.c b/frontends/atari/gui.c
index 6ee63b301..3b324f507 100644
--- a/frontends/atari/gui.c
+++ b/frontends/atari/gui.c
@@ -29,6 +29,7 @@
#include "utils/log.h"
#include "utils/messages.h"
#include "utils/corestrings.h"
+#include "utils/nsoption.h"
#include "netsurf/browser_window.h"
#include "netsurf/layout.h"
#include "netsurf/window.h"
@@ -52,9 +53,7 @@
#include "atari/toolbar.h"
#include "atari/hotlist.h"
#include "atari/cookies.h"
-#include "atari/certview.h"
#include "atari/history.h"
-#include "atari/login.h"
#include "atari/encoding.h"
#include "atari/res/netsurf.rsh"
#include "atari/plot/plot.h"
@@ -299,15 +298,11 @@ void gui_window_destroy(struct gui_window *gw)
* \param gw The gui window to measure content area of.
* \param width receives width of window
* \param height receives height of window
- * \param scaled whether to return scaled values
* \return NSERROR_OK on sucess and width and height updated
* else error code.
*/
static nserror
-gui_window_get_dimensions(struct gui_window *gw,
- int *width,
- int *height,
- bool scaled)
+gui_window_get_dimensions(struct gui_window *gw, int *width, int *height)
{
GRECT rect;
window_get_grect(gw->root, BROWSER_AREA_CONTENT, &rect);
@@ -766,53 +761,6 @@ static void gui_set_clipboard(const char *buffer, size_t length,
}
}
-static void gui_401login_open(nsurl *url, const char *realm,
- nserror (*cb)(bool proceed, void *pw), void *cbpw)
-{
- bool bres;
- char * out = NULL;
- bres = login_form_do( url, (char*)realm, &out);
- if (bres) {
- NSLOG(netsurf, INFO, "url: %s, realm: %s, auth: %s\n",
- nsurl_access(url), realm, out);
- urldb_set_auth_details(url, realm, out);
- }
- if (out != NULL) {
- free( out );
- }
- if (cb != NULL) {
- cb(bres, cbpw);
- }
-
-}
-
-static nserror
-gui_cert_verify(nsurl *url, const struct ssl_cert_info *certs,
- unsigned long num, nserror (*cb)(bool proceed, void *pw),
- void *cbpw)
-{
- struct sslcert_session_data *data;
- NSLOG(netsurf, INFO, "url %s", nsurl_access(url));
-
- // TODO: localize string
- int b = form_alert(1, "[2][SSL Verify failed, continue?][Continue|Abort|Details...]");
- if(b == 1){
- // Accept
- urldb_set_cert_permissions(url, true);
- cb(true, cbpw);
- } else if(b == 2) {
- // Reject
- urldb_set_cert_permissions(url, false);
- cb(false, cbpw);
- } else if(b == 3) {
- // Inspect
- sslcert_viewer_create_session_data(num, url, cb, cbpw, certs,
- &data);
- atari_sslcert_viewer_open(data);
- }
- return NSERROR_OK;
-}
-
void gui_set_input_gui_window(struct gui_window *gw)
{
NSLOG(netsurf, INFO, "Setting input window from: %p to %p\n",
@@ -1065,6 +1013,45 @@ static void gui_init(int argc, char** argv)
toolbar_init();
}
+
+/**
+ * process miscellaneous window events
+ *
+ * \param gw The window receiving the event.
+ * \param event The event code.
+ * \return NSERROR_OK when processed ok
+ */
+static nserror
+gui_window_event(struct gui_window *gw, enum gui_window_event event)
+{
+ switch (event) {
+ case GW_EVENT_UPDATE_EXTENT:
+ gui_window_update_extent(gw);
+ break;
+
+ case GW_EVENT_REMOVE_CARET:
+ gui_window_remove_caret(gw);
+ break;
+
+ case GW_EVENT_NEW_CONTENT:
+ gui_window_new_content(gw);
+ break;
+
+ case GW_EVENT_START_THROBBER:
+ gui_window_start_throbber(gw);
+ break;
+
+ case GW_EVENT_STOP_THROBBER:
+ gui_window_stop_throbber(gw);
+ break;
+
+ default:
+ break;
+ }
+ return NSERROR_OK;
+}
+
+
static struct gui_window_table atari_window_table = {
.create = gui_window_create,
.destroy = gui_window_destroy,
@@ -1072,7 +1059,7 @@ static struct gui_window_table atari_window_table = {
.get_scroll = gui_window_get_scroll,
.set_scroll = gui_window_set_scroll,
.get_dimensions = gui_window_get_dimensions,
- .update_extent = gui_window_update_extent,
+ .event = gui_window_event,
.set_title = gui_window_set_title,
.set_url = gui_window_set_url,
@@ -1080,10 +1067,6 @@ static struct gui_window_table atari_window_table = {
.set_status = atari_window_set_status,
.set_pointer = gui_window_set_pointer,
.place_caret = gui_window_place_caret,
- .remove_caret = gui_window_remove_caret,
- .new_content = gui_window_new_content,
- .start_throbber = gui_window_start_throbber,
- .stop_throbber = gui_window_stop_throbber,
};
static struct gui_clipboard_table atari_clipboard_table = {
@@ -1099,11 +1082,8 @@ static struct gui_fetch_table atari_fetch_table = {
static struct gui_misc_table atari_misc_table = {
.schedule = atari_schedule,
- .warning = atari_warn_user,
.quit = gui_quit,
- .cert_verify = gui_cert_verify,
- .login = gui_401login_open,
};
/* #define WITH_DBG_LOGFILE 1 */
diff --git a/frontends/atari/gui.h b/frontends/atari/gui.h
index 9c9aaaa58..b10aef798 100644
--- a/frontends/atari/gui.h
+++ b/frontends/atari/gui.h
@@ -122,7 +122,6 @@ struct s_gui_win_root
CMP_TOOLBAR toolbar;
CMP_STATUSBAR statusbar;
struct s_focus_info focus;
- float scale;
char * title;
struct bitmap * icon;
struct gui_window *active_gui_window;
diff --git a/frontends/atari/login.c b/frontends/atari/login.c
deleted file mode 100644
index 1b21c5d2a..000000000
--- a/frontends/atari/login.c
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright 2010 Ole Loots <ole@monochrom.net>
- *
- * This file is part of NetSurf, http://www.netsurf-browser.org/
- *
- * NetSurf is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * NetSurf is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "utils/config.h"
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdbool.h>
-#include <cflib.h>
-
-#include "utils/errors.h"
-#include "utils/utils.h"
-#include "utils/messages.h"
-#include "utils/log.h"
-
-#include "atari/gui.h"
-#include "atari/misc.h"
-#include "atari/login.h"
-#include "atari/res/netsurf.rsh"
-
-
-bool login_form_do(nsurl * url, char * realm, char ** out)
-{
- char user[255];
- char pass[255];
- //const char * auth;
- short exit_obj = 0;
- OBJECT * tree;
-
- user[0] = 0;
- pass[0] = 0;
-
- // TODO: use auth details for predefined login data
- // auth = urldb_get_auth_details(url, realm);
- tree = gemtk_obj_get_tree(LOGIN);
-
- assert(tree != NULL);
-
- exit_obj = simple_mdial(tree, 0);
-
- if(exit_obj == LOGIN_BT_LOGIN) {
- get_string(tree, LOGIN_TB_USER, user);
- get_string(tree, LOGIN_TB_PASSWORD, pass);
- int size = strlen((char*)&user) + strlen((char*)&pass) + 2 ;
- *out = malloc(size);
- snprintf(*out, size, "%s:%s", user, pass);
- } else {
- *out = NULL;
- }
- return((exit_obj == LOGIN_BT_LOGIN));
-}
-
diff --git a/frontends/atari/login.h b/frontends/atari/login.h
deleted file mode 100644
index b61808c71..000000000
--- a/frontends/atari/login.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright 2010 Ole Loots <ole@monochrom.net>
- *
- * This file is part of NetSurf, http://www.netsurf-browser.org/
- *
- * NetSurf is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * NetSurf is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef NS_LOGIN_H_INCLUDED
-#define NS_LOGIN_H_INCLUDED
-
-#include "utils/nsurl.h"
-
-bool login_form_do( nsurl * host, char * realm, char **cbpw );
-
-#endif
diff --git a/frontends/atari/plot/font_freetype.c b/frontends/atari/plot/font_freetype.c
index 1688e978b..3ff4ab115 100644
--- a/frontends/atari/plot/font_freetype.c
+++ b/frontends/atari/plot/font_freetype.c
@@ -25,6 +25,7 @@
#include "utils/log.h"
#include "utils/nsoption.h"
#include "netsurf/mouse.h"
+#include "netsurf/bitmap.h"
#include "netsurf/plot_style.h"
#include "atari/gui.h"
@@ -250,7 +251,7 @@ static void ft_fill_scalar(const plot_font_style_t *fstyle, FTC_Scaler srec)
srec->face_id = (FTC_FaceID)font_faces[selected_face];
- srec->width = srec->height = (fstyle->size * 64) / FONT_SIZE_SCALE;
+ srec->width = srec->height = (fstyle->size * 64) / PLOT_STYLE_SCALE;
srec->pixel = 0;
/* calculate x/y resolution, when browser_get_dpi() isn't available */
diff --git a/frontends/atari/plot/font_internal.c b/frontends/atari/plot/font_internal.c
index 709697f74..11732c5ea 100644
--- a/frontends/atari/plot/font_internal.c
+++ b/frontends/atari/plot/font_internal.c
@@ -25,6 +25,7 @@
#include "utils/utf8.h"
#include "utils/log.h"
#include "netsurf/mouse.h"
+#include "netsurf/bitmap.h"
#include "netsurf/plot_style.h"
#include "atari/gui.h"
diff --git a/frontends/atari/plot/font_vdi.c b/frontends/atari/plot/font_vdi.c
index 7cd82ddc9..556c08e82 100644
--- a/frontends/atari/plot/font_vdi.c
+++ b/frontends/atari/plot/font_vdi.c
@@ -106,9 +106,9 @@ static int str_width( FONT_PLOTTER self,const plot_font_style_t *fstyle, const c
fx |= 1;
vst_effects( self->vdi_handle, fx );
/* TODO: replace 90 with global dpi setting */
- //pxsize = ceil( (fstyle->size/FONT_SIZE_SCALE) * 90 / 72 );
+ //pxsize = ceil( (fstyle->size/PLOT_STYLE_SCALE) * 90 / 72 );
//vst_height( self->vdi_handle, pxsize ,&cw, &ch, &cellw, &cellh);
- pxsize = ceil( (fstyle->size/FONT_SIZE_SCALE) * 90 );
+ pxsize = ceil( (fstyle->size/PLOT_STYLE_SCALE) * 90 );
vst_point( self->vdi_handle, pxsize, &cw, &ch, &cellw, &cellh);
/*
if(slen != utf8_bounded_length(str, length)){
@@ -148,10 +148,10 @@ static int str_split( FONT_PLOTTER self, const plot_font_style_t * fstyle, const
if( fstyle->weight > 450 )
fx |= 1;
vst_effects( self->vdi_handle, fx );
- //pxsize = ceil( (fstyle->size/FONT_SIZE_SCALE) * 90 / 72 );
+ //pxsize = ceil( (fstyle->size/PLOT_STYLE_SCALE) * 90 / 72 );
//vst_height( self->vdi_handle, pxsize ,&cw, &ch, &cellw, &cellh);
- pxsize = ceil( (fstyle->size/FONT_SIZE_SCALE) * 90 );
+ pxsize = ceil( (fstyle->size/PLOT_STYLE_SCALE) * 90 );
vst_point( self->vdi_handle, pxsize, &cw, &ch, &cellw, &cellh);
*actual_x = 0;
//*char_offset = 0;
@@ -216,7 +216,7 @@ static int pixel_pos( FONT_PLOTTER self, const plot_font_style_t * fstyle,const
if( fstyle->weight > 450 )
fx |= 1;
vst_effects(self->vdi_handle, fx);
- pxsize = ceil( (fstyle->size/FONT_SIZE_SCALE) * 90 / 72 );
+ pxsize = ceil( (fstyle->size/PLOT_STYLE_SCALE) * 90 / 72 );
vst_height( self->vdi_handle, pxsize ,&cw, &ch, &cellw, &cellh);
*actual_x = 0;
*char_offset = 0;
@@ -283,8 +283,8 @@ static int text( FONT_PLOTTER self, int x, int y, const char *text, size_t leng
/* TODO: netsurf uses 90 as default dpi ( somewhere defined in libcss),
use that value or pass it as arg, to reduce netsurf dependency */
- //pxsize = ceil( (fstyle->size/FONT_SIZE_SCALE) * 90 / 72 );
- pxsize = ceil( (fstyle->size/FONT_SIZE_SCALE) * 90 / 72 );
+ //pxsize = ceil( (fstyle->size/PLOT_STYLE_SCALE) * 90 / 72 );
+ pxsize = ceil( (fstyle->size/PLOT_STYLE_SCALE) * 90 / 72 );
plot_get_dimensions(&canvas);
x += canvas.g_x;
diff --git a/frontends/atari/plot/plot.c b/frontends/atari/plot/plot.c
index 14c670352..4935b1776 100644
--- a/frontends/atari/plot/plot.c
+++ b/frontends/atari/plot/plot.c
@@ -2124,7 +2124,7 @@ plot_line(const struct redraw_context *ctx,
{
short pxy[4];
uint32_t lt;
- int sw = pstyle->stroke_width;
+ int sw = plot_style_fixed_to_int(pstyle->stroke_width);
if (((line->x0 < 0) && (line->x1 < 0)) ||
((line->y0 < 0) && (line->y1 < 0))) {
@@ -2183,7 +2183,7 @@ plot_rectangle(const struct redraw_context *ctx,
{
short pxy[4];
GRECT r, rclip, sclip;
- int sw = pstyle->stroke_width;
+ int sw = plot_style_fixed_to_int(pstyle->stroke_width);
uint32_t lt;
/* current canvas clip: */
@@ -2266,7 +2266,7 @@ plot_rectangle(const struct redraw_context *ctx,
if (pstyle->fill_type != PLOT_OP_TYPE_NONE ) {
short stroke_width = (short)(pstyle->stroke_type != PLOT_OP_TYPE_NONE) ?
- pstyle->stroke_width : 0;
+ plot_style_fixed_to_int(pstyle->stroke_width) : 0;
vsf_rgbcolor(atari_plot_vdi_handle, pstyle->fill_colour);
vsf_perimeter(atari_plot_vdi_handle, 0);
@@ -2343,7 +2343,6 @@ plot_polygon(const struct redraw_context *ctx,
* \param pstyle Style controlling the path plot.
* \param p elements of path
* \param n nunber of elements on path
- * \param width The width of the path
* \param transform A transform to apply to the path.
* \return NSERROR_OK on success else error code.
*/
@@ -2352,7 +2351,6 @@ plot_path(const struct redraw_context *ctx,
const plot_style_t *pstyle,
const float *p,
unsigned int n,
- float width,
const float transform[6])
{
/** \todo Implement atari path plot */
diff --git a/frontends/atari/res/netsurf.rsh b/frontends/atari/res/netsurf.rsh
index c856501ae..be2bc949c 100755
--- a/frontends/atari/res/netsurf.rsh
+++ b/frontends/atari/res/netsurf.rsh
@@ -147,9 +147,6 @@
#define SETTINGS_EDIT_MIN_FONT_SIZE 28 /* FTEXT in tree SETTINGS */
#define SETTINGS_DEC_MIN_FONT_SIZE 29 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_INC_MIN_FONT_SIZE 30 /* BOXCHAR in tree SETTINGS */
-#define SETTINGS_EDIT_MIN_GIF_DELAY 35 /* FTEXT in tree SETTINGS */
-#define SETTINGS_INC_GIF_DELAY 36 /* BOXCHAR in tree SETTINGS */
-#define SETTINGS_DEC_GIF_DELAY 37 /* BOXCHAR in tree SETTINGS */
#define SETTINGS_CB_ENABLE_ANIMATION 40 /* BUTTON in tree SETTINGS */
#define SETTINGS_CB_BG_IMAGES 42 /* BUTTON in tree SETTINGS */
#define SETTINGS_CB_FG_IMAGES 44 /* BUTTON in tree SETTINGS */
diff --git a/frontends/atari/res/netsurf.rsm b/frontends/atari/res/netsurf.rsm
index 6c240d371..3122791f7 100755
--- a/frontends/atari/res/netsurf.rsm
+++ b/frontends/atari/res/netsurf.rsm
@@ -132,9 +132,6 @@ ResourceMaster v3.651
#O 28@29@EDIT_MIN_FONT_SIZE@@
#O 29@27@DEC_MIN_FONT_SIZE@@
#O 30@27@INC_MIN_FONT_SIZE@@
-#O 35@29@EDIT_MIN_GIF_DELAY@@
-#O 36@27@INC_GIF_DELAY@@
-#O 37@27@DEC_GIF_DELAY@@
#O 40@26@CB_ENABLE_ANIMATION@@
#O 42@26@CB_BG_IMAGES@@
#O 44@26@CB_FG_IMAGES@@
diff --git a/frontends/atari/rootwin.c b/frontends/atari/rootwin.c
index 6576eac77..8fb3ec0f7 100644
--- a/frontends/atari/rootwin.c
+++ b/frontends/atari/rootwin.c
@@ -288,8 +288,6 @@ int window_create(struct gui_window * gw,
assert(gw->browser);
gw->browser->bw = bw;
- gw->scale = browser_window_get_scale(bw);
-
/* create statusbar component: */
if(sb) {
diff --git a/frontends/atari/search.h b/frontends/atari/search.h
index 04dfed4eb..adac62652 100644
--- a/frontends/atari/search.h
+++ b/frontends/atari/search.h
@@ -43,7 +43,7 @@ typedef struct s_search_form_session * SEARCH_FORM_SESSION;
struct s_search_form_session * nsatari_search_session_create(OBJECT * obj,
struct gui_window *gw);
-struct gui_search_table *atari_search_table;
+extern struct gui_search_table *atari_search_table;
void nsatari_search_session_destroy(struct s_search_form_session *s);
void nsatari_search_perform(struct s_search_form_session *s, OBJECT *obj,
diff --git a/frontends/atari/settings.c b/frontends/atari/settings.c
index 7084bacf7..d76468c17 100644
--- a/frontends/atari/settings.c
+++ b/frontends/atari/settings.c
@@ -48,7 +48,6 @@
extern char options[PATH_MAX];
extern GRECT desk_area;
-static float tmp_option_minimum_gif_delay;
static unsigned tmp_option_memory_cache_size;
static unsigned int tmp_option_disc_cache_size;
static unsigned int tmp_option_expire_url;
@@ -308,10 +307,6 @@ static void display_settings(void)
INPUT_MIN_REFLOW_PERIOD_MAX_LEN );
- tmp_option_minimum_gif_delay = (float)nsoption_int(minimum_gif_delay) / (float)100;
- snprintf( spare, 255, "%01.1f", tmp_option_minimum_gif_delay );
- set_text( SETTINGS_EDIT_MIN_GIF_DELAY, spare, 3 );
-
/* "Network" tab: */
set_text( SETTINGS_EDIT_PROXY_HOST, nsoption_charp(http_proxy_host),
INPUT_PROXY_HOST_MAX_LEN );
@@ -464,11 +459,6 @@ static void form_event(int index, int external)
break;
case SETTINGS_CB_ENABLE_ANIMATION:
- if( checked ) {
- ENABLE_OBJ( SETTINGS_EDIT_MIN_GIF_DELAY );
- } else {
- DISABLE_OBJ( SETTINGS_EDIT_MIN_GIF_DELAY );
- }
break;
case SETTINGS_BT_SEL_FONT_RENDERER:
@@ -697,23 +687,6 @@ static void form_event(int index, int external)
OBJ_REDRAW(SETTINGS_EDIT_HISTORY_AGE);
break;
- case SETTINGS_INC_GIF_DELAY:
- case SETTINGS_DEC_GIF_DELAY:
- if( index == SETTINGS_INC_GIF_DELAY )
- tmp_option_minimum_gif_delay += 0.1;
- else
- tmp_option_minimum_gif_delay -= 0.1;
-
- if( tmp_option_minimum_gif_delay < 0.1 )
- tmp_option_minimum_gif_delay = 0.1;
- if( tmp_option_minimum_gif_delay > 9.0 )
- tmp_option_minimum_gif_delay = 9.0;
- snprintf( spare, 255, "%01.1f", tmp_option_minimum_gif_delay );
- set_text( SETTINGS_EDIT_MIN_GIF_DELAY, spare, 3 );
- is_button = true;
- OBJ_REDRAW(SETTINGS_EDIT_MIN_GIF_DELAY);
- break;
-
case SETTINGS_INC_MIN_FONT_SIZE:
case SETTINGS_DEC_MIN_FONT_SIZE:
if( index == SETTINGS_INC_MIN_FONT_SIZE )
@@ -817,8 +790,6 @@ static void apply_settings(void)
OBJ_SELECTED(SETTINGS_CB_TRANSPARENCY));
nsoption_set_bool(animate_images,
OBJ_SELECTED(SETTINGS_CB_ENABLE_ANIMATION));
- nsoption_set_int(minimum_gif_delay,
- (int)(tmp_option_minimum_gif_delay*100+0.5));
/* nsoption_set_bool(incremental_reflow,
OBJ_SELECTED(SETTINGS_CB_INCREMENTAL_REFLOW));*/
nsoption_set_int(min_reflow_period, tmp_option_min_reflow_period);
diff --git a/frontends/atari/toolbar.c b/frontends/atari/toolbar.c
index fdfedcbee..b8f42267f 100644
--- a/frontends/atari/toolbar.c
+++ b/frontends/atari/toolbar.c
@@ -94,7 +94,7 @@ static float toolbar_url_scale = 1.0;
static plot_font_style_t font_style_url = {
.family = PLOT_FONT_FAMILY_SANS_SERIF,
- .size = 14*FONT_SIZE_SCALE,
+ .size = 14*PLOT_STYLE_SCALE,
.weight = 400,
.flags = FONTF_NONE,
.background = 0xffffff,
@@ -302,7 +302,7 @@ struct s_toolbar *toolbar_create(struct s_gui_win_root *owner)
/* create the url widget: */
font_style_url.size =
- toolbar_styles[t->style].font_height_pt * FONT_SIZE_SCALE;
+ toolbar_styles[t->style].font_height_pt * PLOT_STYLE_SCALE;
textarea_flags ta_flags = TEXTAREA_INTERNAL_CARET;
textarea_setup ta_setup;
diff --git a/frontends/atari/treeview.c b/frontends/atari/treeview.c
index 23db41309..6ab09991a 100644
--- a/frontends/atari/treeview.c
+++ b/frontends/atari/treeview.c
@@ -426,7 +426,7 @@ atari_treeview_invalidate_area(struct core_window *cw,
* \param width the width in px, or negative if don't care
* \param height the height in px, or negative if don't care
*/
-static void
+static nserror
atari_treeview_update_size(struct core_window *cw, int width, int height)
{
GRECT area;
@@ -436,7 +436,7 @@ atari_treeview_update_size(struct core_window *cw, int width, int height)
if (tv != NULL) {
if (tv->disposing)
- return;
+ return NSERROR_INVALID;
/* Get acces to the gemtk window slider settings: */
slid = gemtk_wm_get_scroll_info(tv->window);
@@ -465,6 +465,8 @@ atari_treeview_update_size(struct core_window *cw, int width, int height)
*/
gemtk_wm_update_slider(tv->window, GEMTK_WM_VH_SLIDER);
}
+
+ return NSERROR_OK;
}
@@ -474,11 +476,18 @@ atari_treeview_update_size(struct core_window *cw, int width, int height)
* \param cw the core window object
* \param r rectangle to make visible
*/
-static void
-atari_treeview_scroll_visible(struct core_window *cw, const struct rect *r)
+static nserror
+atari_treeview_set_scroll(struct core_window *cw, int x, int y)
{
- /* atari frontend doesn't support dragging outside the treeview */
- /* so there is no need to implement this? */
+ /* TODO */
+ return NSERROR_OK;
+}
+
+static nserror
+atari_treeview_get_scroll(const struct core_window *cw, int *x, int *y)
+{
+ /* TODO */
+ return NSERROR_NOT_IMPLEMENTED;
}
@@ -489,8 +498,8 @@ atari_treeview_scroll_visible(struct core_window *cw, const struct rect *r)
* \param width to be set to viewport width in px, if non NULL
* \param height to be set to viewport height in px, if non NULL
*/
-static void
-atari_treeview_get_window_dimensions(struct core_window *cw,
+static nserror
+atari_treeview_get_window_dimensions(const struct core_window *cw,
int *width,
int *height)
{
@@ -501,6 +510,8 @@ atari_treeview_get_window_dimensions(struct core_window *cw,
*width = work.g_w;
*height = work.g_h;
}
+
+ return NSERROR_OK;
}
@@ -510,10 +521,10 @@ atari_treeview_get_window_dimensions(struct core_window *cw,
* \param cw the core window object
* \param ds the current drag status
*/
-static void
+static nserror
atari_treeview_drag_status(struct core_window *cw, core_window_drag_status ds)
{
-
+ return NSERROR_NOT_IMPLEMENTED;
}
@@ -523,7 +534,8 @@ atari_treeview_drag_status(struct core_window *cw, core_window_drag_status ds)
static struct core_window_callback_table cw_t = {
.invalidate = atari_treeview_invalidate_area,
.update_size = atari_treeview_update_size,
- .scroll_visible = atari_treeview_scroll_visible,
+ .set_scroll = atari_treeview_set_scroll,
+ .get_scroll = atari_treeview_get_scroll,
.get_window_dimensions = atari_treeview_get_window_dimensions,
.drag_status = atari_treeview_drag_status
};
diff --git a/frontends/atari/verify_ssl.c b/frontends/atari/verify_ssl.c
deleted file mode 100644
index b099fe488..000000000
--- a/frontends/atari/verify_ssl.c
+++ /dev/null
@@ -1,273 +0,0 @@
-/*
- * Copyright 2010 Ole Loots <ole@monochrom.net>
- *
- * This file is part of NetSurf, http://www.netsurf-browser.org/
- *
- * NetSurf is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * NetSurf is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-#include <stdbool.h>
-#include <windom.h>
-
-#include "utils/errors.h"
-#include "utils/utils.h"
-#include "utils/log.h"
-#include "utils/messages.h"
-
-#include "atari/res/netsurf.rsh"
-#include "atari/verify_ssl.h"
-
-/*
- todo: this file need to use the treeview api - complete rework,
- current implementation is not used in any way.
-*/
-
-extern void * h_gem_rsrc;
-extern short atari_plot_vdi_handle;
-
-
-#define CERT_INF_LINES 8
-
-static struct ssl_info_draw_param
-{
- struct ssl_cert_info * cert_infos_n;
- unsigned long num_certs;
- int current;
- int scrollx;
- int cols;
- int scrolly;
- int rows; /* assumed to be 8 */
- OBJECT * tree;
-} dp;
-
-
-static int cert_display_width( struct ssl_cert_info * cert_info )
-{
- int l1, l2;
- int add = 16; /* strlen("Issuer: "); */
-
- l1 = strlen(cert_info->issuer) + add;
- l2 = strlen(cert_info->subject) + add;
- return( MAX(l1, l2) );
-}
-
-
-static void __CDECL cert_info_draw( WINDOW * win, short buf[8], void * data)
-{
- struct ssl_info_draw_param * dp = (struct ssl_info_draw_param *)data;
- GRECT work;
- short pxy[4];
- int maxchars;
- short d, cbh, cbw;
- int i = 0;
- short x,y,w,h;
- int px_ypos;
- char * line = malloc(512);
- if( line == NULL )
- return;
-
- NSLOG(netsurf, INFO,
- "Cert info draw, win: %p, data: %p, scrollx: %d", win, data,
- dp->scrollx);
-
- WindGet( win, WF_WORKXYWH, &x, &y, &w, &h );
- /*using static values here, as RsrcUserDraw has mem leaks & a very small stack */
- pxy[0] = work.g_x = x + 8;
- pxy[1] = work.g_y = y + 80;
- pxy[2] = x + 8 + 272;
- pxy[3] = y + 80 + 176;
- work.g_w = 272;
- work.g_h = 176;
-
- maxchars = (work.g_w / 8)+1;
- vs_clip( atari_plot_vdi_handle, 1,(short*) &pxy );
- vswr_mode( atari_plot_vdi_handle, MD_REPLACE );
- vsf_interior( atari_plot_vdi_handle, 1 );
- vsf_color( atari_plot_vdi_handle, LWHITE );
- v_bar( atari_plot_vdi_handle, (short*)&pxy );
- vst_height( atari_plot_vdi_handle, 16, &d, &d, &cbw, &cbh );
- vst_alignment(atari_plot_vdi_handle, 0, 5, &d, &d );
- vst_color( atari_plot_vdi_handle, BLACK );
- vst_effects( atari_plot_vdi_handle, 0 );
- px_ypos = 0;
- for(i=0; i<CERT_INF_LINES; i++ ) {
- switch( i ) {
- case 0:
- sprintf(line, "Cert Version: %d", dp->cert_infos_n[dp->current].version );
- break;
-
- case 1:
- sprintf(line, "Invalid before: %s", &dp->cert_infos_n[dp->current].not_before );
- break;
-
- case 2:
- sprintf(line, "Invalid after: %s", &dp->cert_infos_n[dp->current].not_after );
- break;
-
- case 3:
- sprintf(line, "Signature type: %d", dp->cert_infos_n[dp->current].sig_type );
- break;
-
- case 4:
- sprintf(line, "Serial: %d", dp->cert_infos_n[dp->current].serial );
- break;
-
- case 5:
- sprintf(line, "Issuer: %s", &dp->cert_infos_n[dp->current].issuer );
- break;
-
- case 6:
- sprintf(line, "Subject: %s", &dp->cert_infos_n[dp->current].subject );
- break;
-
- case 7:
- sprintf(line, "Cert type: %d", dp->cert_infos_n[dp->current].cert_type );
- break;
-
- default:
- break;
- }
- if( (int)strlen(line) > dp->scrollx ) {
- if( dp->scrollx + maxchars < 511 && ( (signed int)strlen(line) - dp->scrollx) > maxchars )
- line[dp->scrollx + maxchars] = 0;
- v_gtext(atari_plot_vdi_handle, work.g_x + 1, work.g_y + px_ypos, &line[dp->scrollx]);
- }
- px_ypos += cbh;
- }
- vst_alignment(atari_plot_vdi_handle, 0, 0, &d, &d );
- vs_clip( atari_plot_vdi_handle, 0, (short*)&pxy );
- free( line );
-}
-
-
-static void do_popup( WINDOW *win, int index, int mode, void *data)
-{
- struct ssl_info_draw_param * dp = (struct ssl_info_draw_param *)data;
- char * items[dp->num_certs];
- short x, y;
- unsigned int i;
- NSLOG(netsurf, INFO, "do_popup: num certs: %d", dp->num_certs);
- for( i = 0; i<dp->num_certs; i++) {
- items[i] = malloc( 48 );
- strncpy(items[i], (char*)&dp->cert_infos_n[i].issuer, 46 );
- }
- objc_offset( FORM(win), index, &x, &y );
- dp->current = MenuPopUp( items, x, y,
- dp->num_certs, MIN( 3, dp->num_certs), 0,
- P_LIST + P_WNDW + P_CHCK );
- ObjcChange( OC_FORM, win, index, NORMAL, TRUE );
- dp->cols = cert_display_width( &dp->cert_infos_n[dp->current] );
- dp->rows = 8;
- dp->scrollx = 0;
- dp->scrolly = 0;
-
- /* Send (!) redraw ( OC_MSG ) */
- ObjcDrawParent( OC_FORM, FORM(win), VERIFY_BOX_DETAILS, 1, 7 | OC_MSG );
- for( i = 0; i<dp->num_certs; i++) {
- free( items[i] );
- }
-}
-
-
-
-bool
-verify_ssl_form_do(const char * url,
- const struct ssl_cert_info * cert_infos_n,
- unsigned long num_certs)
-{
- OBJECT *tree;
- WINDOW * form;
-
- bool bres = false;
- bool cont = true;
- int res = 0;
-
- RsrcGaddr (h_gem_rsrc , R_TREE, VERIFY, &tree);
- ObjcString( tree, VERIFY_LBL_HOST, (char*)url );
- ObjcChange( OC_OBJC, tree, VERIFY_BT_ACCEPT, 0, 0 );
- ObjcChange( OC_OBJC, tree, VERIFY_BT_REJECT, 0, 0 );
- form = FormWindBegin( tree, (char*)"SSL Verify failed" );
-
- dp.cert_infos_n = (struct ssl_cert_info *)cert_infos_n;
- dp.num_certs = num_certs;
- dp.scrollx = 0;
- dp.scrolly = 0;
- dp.current = 0;
- dp.cols = cert_display_width( &dp.cert_infos_n[dp.current] );
- dp.rows = 8;
- dp.tree = tree;
- EvntDataAdd( form, WM_REDRAW, cert_info_draw, (void*)&dp, EV_BOT );
- /* this results in some extended objects which can not be freed: :( */
- /* RsrcUserDraw( OC_FORM, tree, VERIFY_BOX_DETAILS, cert_info_draw,(void*)&dp ) ; */
- ObjcAttachFormFunc( form, VERIFY_BT_NEXT_CERT, do_popup, &dp );
- /*
- ObjcAttachFormFunc( form, VERIFY_BT_NEXT_CERT, do_popup, &dp );
- ObjcAttachFormFunc( form, VERIFY_BT_NEXT_CERT, do_popup, &dp );
- */
- while( cont ) {
- res = FormWindDo( MU_MESAG );
- cont = false;
- switch( res ){
- case VERIFY_BT_ACCEPT:
- bres = true;
- break;
-
- case VERIFY_BT_NEXT_CERT:
- /* select box clicked or dragged... */
- cont = true;
- break;
-
- case VERIFY_BT_REJECT:
- bres = false;
- break;
-
- case VERIFY_BT_SCROLL_D:
- cont = true;
- dp.scrolly += 1;
- ObjcDrawParent( OC_FORM, form, VERIFY_BOX_DETAILS, 1, 7 | OC_MSG );
- break;
-
- case VERIFY_BT_SCROLL_U:
- cont = true;
- dp.scrolly -= 1;
- ObjcDrawParent( OC_FORM, form, VERIFY_BOX_DETAILS, 1, 7 | OC_MSG );
- break;
-
- case VERIFY_BT_SCROLL_R:
- NSLOG(netsurf, INFO, "scroll r!");
- cont = true;
- dp.scrollx += 1;
- if( dp.scrollx > (dp.cols - (272 / 8 )) )
- dp.scrollx -= 1;
- ObjcDrawParent( OC_FORM, form, VERIFY_BOX_DETAILS, 1, 7 | OC_MSG);
- break;
-
- case VERIFY_BT_SCROLL_L:
- cont = true;
- dp.scrollx -= 1;
- if( dp.scrollx < 0 )
- dp.scrollx = 0;
- ObjcDrawParent( OC_FORM, form, VERIFY_BOX_DETAILS, 1, 7 | OC_MSG );
- break;
-
- default:
- break;
- }
- }
- FormWindEnd( );
- return( bres );
-}
diff --git a/frontends/beos/Makefile b/frontends/beos/Makefile
index 7693ac3f3..81c9326ee 100644
--- a/frontends/beos/Makefile
+++ b/frontends/beos/Makefile
@@ -33,6 +33,50 @@ VERSION_FULL := $(shell sed -n '/_version.*=.*"/{s/.*"\(.*\)".*/\1/;p;}' desktop
VERSION_MAJ := $(shell sed -n '/_major/{s/.* = \([0-9]*\).*/\1/;p;}' desktop/version.c)
VERSION_MIN := $(shell sed -n '/_minor/{s/.* = \([0-9]*\).*/\1/;p;}' desktop/version.c)
+
+HARCH := $(shell getarch)
+HPARCH := $(shell getarch -p)
+ifneq ($(HARCH),$(HPARCH))
+PKGSARCH := _$(HARCH)
+endif
+
+PKGNAME := netsurf$(PKGSARCH)-$(VERSION_MAJ).$(VERSION_MIN)-1-$(HPARCH).hpkg
+HAIKU_TARGET_DIR := netsurf_pkg
+
+# Identity of the packager
+PACKAGER := $(shell git config --get user.name) <$(shell git config --get user.email)>
+
+# package manifest file
+# TODO: remove requires hardcoding
+PKGINFO := \
+name netsurf$(PKGSARCH)\n\
+version $(VERSION_MAJ).$(VERSION_MIN)-1\n\
+architecture $(HPARCH)\n\
+summary "A multi-platform web browser"\n\
+description "Small as a mouse, fast as a cheetah and available for free. NetSurf is a multi-platform web browser for RISC OS, UNIX-like platforms (including Linux), Mac OS X, and more.Whether you want to check your webmail, read the news or post to discussion forums, NetSurf is your lightweight gateway to the world wide web. Actively developed, NetSurf is continually evolving and improving."\n\
+vendor "NetSurf"\n\
+packager "$(PACKAGER)"\n\
+copyrights {\n\t"2003-2018 The NetSurf Browser project"\n}\n\
+licenses {\n\t"GNU GPL v2"\n}\n\
+urls {\n\t"http://www.netsurf-browser.org/"\n}\n\
+source-urls {\n\t"http://download.netsurf-browser.org/netsurf/releases/source/netsurf-$(VERSION_MAJ).$(VERSION_MIN)-src.tar.gz"\n}\n\
+provides {\n\
+\tnetsurf$(PKGSARCH) = $(VERSION_MAJ).$(VERSION_MIN)\n\
+\tapp:netsurf = $(VERSION_MAJ).$(VERSION_MIN)\n\
+}\n\
+requires {\n\
+\thaiku_x86>=r1~alpha4_pm_hrev51655-1\n\
+\tlib:libcurl_x86>=4.4.0\n\
+\tlib:libexpat_x86>=1.6.7\n\
+\tlib:libiconv_x86>=2.5.0\n\
+\tlib:libpng16_x86>=16.34.0\n\
+\tlib:libjpeg_x86>=9.2.0\n\
+\tlib:libssl_x86>=1.0.0\n\
+\tlib:libutf8proc_x86>=1.3.1\n\
+\tlib:libz_x86>=1.2.11\n\
+}\n
+
+
# ----------------------------------------------------------------------------
# Source file setup
# ----------------------------------------------------------------------------
@@ -66,7 +110,7 @@ RDEF_IMP_BEOS := $(addprefix $(OBJROOT)/,$(subst /,_,$(RDEF_IMP_BEOS)))
RDEP_BEOS := \
adblock.css beosdefault.css default.css internal.css quirks.css \
netsurf.png favicon.png ca-bundle.txt \
- credits.html licence.html welcome.html maps.html SearchEngines
+ credits.html licence.html welcome.html SearchEngines
RDEP_BEOS := $(addprefix $(FRONTEND_RESOURCES_DIR)/,$(RDEP_BEOS)) \
$(wildcard $(FRONTEND_RESOURCES_DIR)/icons/*.png) \
@@ -104,4 +148,22 @@ install-beos:
# Package target
# ----------------------------------------------------------------------------
-package-beos:
+package-beos: $(PKGNAME)
+ $(VQ)echo Creating $(PKGNAME)
+
+$(PKGNAME): $(EXETARGET) $(POSTEXES)
+ $(Q)rm -rf $(HAIKU_TARGET_DIR)
+ $(Q)rm -rf $(PKGNAME)
+ $(Q)$(MKDIR) $(HAIKU_TARGET_DIR)
+ $(Q)echo -e '$(PKGINFO)' > $(HAIKU_TARGET_DIR)/.PackageInfo
+ $(Q)$(MKDIR) -p $(HAIKU_TARGET_DIR)/apps/netsurf/res
+ $(Q)$(MKDIR) -p $(HAIKU_TARGET_DIR)/data/deskbar/menu/Applications
+ $(Q)copyattr -d $(EXETARGET) $(HAIKU_TARGET_DIR)/apps/NetSurf
+ $(Q)cp -vRL $(FRONTEND_RESOURCES_DIR)/adblock.css $(HAIKU_TARGET_DIR)/apps/netsurf/res
+ $(Q)cp -vRL $(FRONTEND_RESOURCES_DIR)/ca-bundle.txt $(HAIKU_TARGET_DIR)/apps/netsurf/res
+ $(Q)cp -vRL $(FRONTEND_RESOURCES_DIR)/default.css $(HAIKU_TARGET_DIR)/apps/netsurf/res
+ $(Q)cp -vRL $(FRONTEND_RESOURCES_DIR)/beosdefault.css $(HAIKU_TARGET_DIR)/apps/netsurf/res
+ $(Q)cp -vRL $(FRONTEND_RESOURCES_DIR)/license $(HAIKU_TARGET_DIR)/apps/netsurf/res
+ $(Q)cp -vRL $(FRONTEND_RESOURCES_DIR)/SearchEngines $(HAIKU_TARGET_DIR)/apps/netsurf/res
+ $(Q)ln -s ../../../../apps/NetSurf $(HAIKU_TARGET_DIR)/data/deskbar/menu/Applications/
+ package create -v -C $(HAIKU_TARGET_DIR) $(PKGNAME)
diff --git a/frontends/beos/Makefile.tools b/frontends/beos/Makefile.tools
new file mode 100644
index 000000000..0324a2825
--- /dev/null
+++ b/frontends/beos/Makefile.tools
@@ -0,0 +1,14 @@
+# -*- mode: makefile-gmake -*-
+##
+## BeOS target tool setup
+##
+
+# Building for BeOS/Haiku
+#ifeq ($(HOST),beos)
+ # Build for BeOS on BeOS
+ GCCSDK_INSTALL_ENV := /boot/develop
+ CC := gcc
+ CXX := g++
+ EXEEXT :=
+ PKG_CONFIG := pkg-config
+#endif
diff --git a/frontends/beos/bitmap.cpp b/frontends/beos/bitmap.cpp
index c4b008755..f7e8fa032 100644
--- a/frontends/beos/bitmap.cpp
+++ b/frontends/beos/bitmap.cpp
@@ -114,28 +114,28 @@ static inline void nsbeos_rgba_to_bgra(void *src,
* Create a bitmap.
*
* \param width width of image in pixels
- * \param height width of image in pixels
- * \param state a flag word indicating the initial state
+ * \param height height of image in pixels
+ * \param bflags flags for bitmap creation
* \return an opaque struct bitmap, or NULL on memory exhaustion
*/
-static void *bitmap_create(int width, int height, unsigned int state)
+static void *bitmap_create(int width, int height, enum gui_bitmap_flags flags)
{
struct bitmap *bmp = (struct bitmap *)malloc(sizeof(struct bitmap));
if (bmp == NULL)
return NULL;
- int32 flags = 0;
- if (state & BITMAP_CLEAR_MEMORY)
- flags |= B_BITMAP_CLEAR_TO_WHITE;
+ int32 Bflags = 0;
+ if (flags & BITMAP_CLEAR)
+ Bflags |= B_BITMAP_CLEAR_TO_WHITE;
BRect frame(0, 0, width - 1, height - 1);
//XXX: bytes per row ?
- bmp->primary = new BBitmap(frame, flags, B_RGBA32);
- bmp->shadow = new BBitmap(frame, flags, B_RGBA32);
+ bmp->primary = new BBitmap(frame, Bflags, B_RGBA32);
+ bmp->shadow = new BBitmap(frame, Bflags, B_RGBA32);
bmp->pretile_x = bmp->pretile_y = bmp->pretile_xy = NULL;
- bmp->opaque = (state & BITMAP_OPAQUE) != 0;
+ bmp->opaque = (flags & BITMAP_OPAQUE) != 0;
return bmp;
}
@@ -156,21 +156,6 @@ static void bitmap_set_opaque(void *vbitmap, bool opaque)
/**
- * Tests whether a bitmap has an opaque alpha channel
- *
- * \param vbitmap a bitmap, as returned by bitmap_create()
- * \return whether the bitmap is opaque
- */
-static bool bitmap_test_opaque(void *vbitmap)
-{
- struct bitmap *bitmap = (struct bitmap *)vbitmap;
- assert(bitmap);
- /* todo: test if bitmap is opaque */
- return false;
-}
-
-
-/**
* Gets whether a bitmap should be plotted opaque
*
* \param vbitmap a bitmap, as returned by bitmap_create()
@@ -216,20 +201,6 @@ static size_t bitmap_get_rowstride(void *vbitmap)
/**
- * Find the bytes per pixels of a bitmap.
- *
- * \param vbitmap a bitmap, as returned by bitmap_create()
- * \return bytes per pixels of the bitmap
- */
-static size_t bitmap_get_bpp(void *vbitmap)
-{
- struct bitmap *bitmap = (struct bitmap *)vbitmap;
- assert(bitmap);
- return 4;
-}
-
-
-/**
* Free pretiles of a bitmap.
*
* \param bitmap The bitmap to free the pretiles of.
@@ -261,32 +232,6 @@ static void bitmap_destroy(void *vbitmap)
/**
- * Save a bitmap in the platform's native format.
- *
- * \param vbitmap a bitmap, as returned by bitmap_create()
- * \param path pathname for file
- * \param flags modify the behaviour of the save
- * \return true on success, false on error and error reported
- */
-static bool bitmap_save(void *vbitmap, const char *path, unsigned flags)
-{
- struct bitmap *bitmap = (struct bitmap *)vbitmap;
- BTranslatorRoster *roster = BTranslatorRoster::Default();
- BBitmapStream stream(bitmap->primary);
- BFile file(path, B_WRITE_ONLY | B_CREATE_FILE);
- uint32 type = B_PNG_FORMAT;
-
- if (file.InitCheck() < B_OK)
- return false;
-
- if (roster->Translate(&stream, NULL, NULL, &file, type) < B_OK)
- return false;
-
- return true;
-}
-
-
-/**
* The bitmap image has changed, so flush any persistant cache.
*
* \param vbitmap a bitmap, as returned by bitmap_create()
@@ -543,13 +488,10 @@ static struct gui_bitmap_table bitmap_table = {
/*.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,
};
diff --git a/frontends/beos/filetype.cpp b/frontends/beos/filetype.cpp
index 7a2ca97e5..bc988a8c7 100644
--- a/frontends/beos/filetype.cpp
+++ b/frontends/beos/filetype.cpp
@@ -18,6 +18,7 @@
#define __STDBOOL_H__ 1
#include <stdbool.h>
+#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
diff --git a/frontends/beos/font.cpp b/frontends/beos/font.cpp
index 81113032d..5e7e78228 100644
--- a/frontends/beos/font.cpp
+++ b/frontends/beos/font.cpp
@@ -130,7 +130,7 @@ void nsbeos_style_to_font(BFont &font, const struct plot_font_style *fstyle)
}
//fprintf(stderr, "nsbeos_style_to_font: value %f unit %d\n", style->font_size.value.length.value, style->font_size.value.length.unit);
- size = fstyle->size / FONT_SIZE_SCALE;
+ size = fstyle->size / PLOT_STYLE_SCALE;
//fprintf(stderr, "nsbeos_style_to_font: %f %d\n", size, style->font_size.value.length.unit);
diff --git a/frontends/beos/gui.cpp b/frontends/beos/gui.cpp
index 19f8eac49..cbfe352c8 100644
--- a/frontends/beos/gui.cpp
+++ b/frontends/beos/gui.cpp
@@ -42,6 +42,9 @@
#include <Roster.h>
#include <Screen.h>
#include <String.h>
+#ifdef __HAIKU__
+#include <LocaleRoster.h>
+#endif
extern "C" {
@@ -519,9 +522,18 @@ static BPath get_messages_path()
BPath p;
f.FindPath(B_FIND_PATH_APPS_DIRECTORY, "netsurf/res", p);
- // TODO: use Haiku's BLocale stuff
- BString lang(getenv("LC_MESSAGES"));
- lang.Truncate(2);
+ BString lang;
+#ifdef __HAIKU__
+ BMessage preferredLangs;
+ if (BLocaleRoster::Default()->GetPreferredLanguages(&preferredLangs) == B_OK) {
+ preferredLangs.FindString("language", 0, &lang);
+ lang.Truncate(2);
+ }
+#endif
+ if (lang.Length() < 1) {
+ lang.SetTo(getenv("LC_MESSAGES"));
+ lang.Truncate(2);
+ }
BDirectory d(p.Path());
if (!d.Contains(lang.String(), B_DIRECTORY_NODE))
lang = "en";
@@ -738,12 +750,12 @@ void nsbeos_gui_poll(void)
unsigned int fd_count = 0;
bigtime_t next_schedule = 0;
- /* get any active fetcher fd */
- fetch_fdset(&read_fd_set, &write_fd_set, &exc_fd_set, &max_fd);
-
/* run the scheduler */
schedule_run();
+ /* get any active fetcher fd */
+ fetch_fdset(&read_fd_set, &write_fd_set, &exc_fd_set, &max_fd);
+
// our own event pipe
FD_SET(sEventPipe[0], &read_fd_set);
@@ -778,7 +790,7 @@ void nsbeos_gui_poll(void)
if (len == sizeof(void *)) {
NSLOG(netsurf, DEEPDEBUG,
"gui_poll: BMessage.what %-4.4s\n",
- &(message->what));
+ (char *)&(message->what));
nsbeos_dispatch_event(message);
}
}
@@ -822,7 +834,9 @@ void nsbeos_gui_view_source(struct hlcache_handle *content)
BPath path;
status_t err;
size_t size;
- const char *source = content_get_source_data(content, &size);
+ const uint8_t *source;
+
+ source = content_get_source_data(content, &size);
if (!content || !source) {
beos_warn_user("MiscError", "No document source");
@@ -979,12 +993,11 @@ static struct gui_fetch_table beos_fetch_table = {
static struct gui_misc_table beos_misc_table = {
beos_schedule,
- beos_warn_user,
gui_quit,
gui_launch_url,
- NULL, //cert_verify
- gui_401login_open,
+ NULL, //401login
NULL, // pdf_password (if we have Haru support)
+ NULL, // present_cookies
};
@@ -1040,9 +1053,19 @@ int main(int argc, char** argv)
BResources resources;
resources.SetToImage((const void*)main);
size_t size = 0;
-
+
+ BString lang;
+#ifdef __HAIKU__
+ BMessage preferredLangs;
+ if (BLocaleRoster::Default()->GetPreferredLanguages(&preferredLangs) == B_OK) {
+ preferredLangs.FindString("language", 0, &lang);
+ }
+#endif
+ if (lang.Length() < 1)
+ lang.SetTo(getenv("LC_MESSAGES"));
+
char path[12];
- sprintf(path,"%.2s/Messages", getenv("LC_MESSAGES"));
+ sprintf(path,"%.2s/Messages", lang.String());
NSLOG(netsurf, INFO, "Loading messages from resource %s\n", path);
const uint8_t* res = (const uint8_t*)resources.LoadResource('data', path, &size);
diff --git a/frontends/beos/gui.h b/frontends/beos/gui.h
index debb5f339..f847a95fa 100644
--- a/frontends/beos/gui.h
+++ b/frontends/beos/gui.h
@@ -35,7 +35,12 @@ extern bool nsbeos_done;
extern bool replicated;
int gui_init_replicant(int argc, char** argv);
-extern "C" void gui_401login_open(struct nsurl *url, const char *realm, nserror (*cb)(bool proceed, void *pw), void *cbpw);
+extern "C" nserror gui_401login_open(struct nsurl *url, const char *realm,
+ const char *username, const char *password,
+ nserror (*cb)(const char *username,
+ const char *password,
+ void *pw),
+ void *cbpw);
extern "C" void nsbeos_gui_poll(void);
diff --git a/frontends/beos/login.cpp b/frontends/beos/login.cpp
index 85062987c..b7e20edf5 100644
--- a/frontends/beos/login.cpp
+++ b/frontends/beos/login.cpp
@@ -44,7 +44,9 @@ extern "C" {
class LoginAlert : public BAlert {
public:
- LoginAlert(nserror (*callback)(bool proceed, void *pw),
+ LoginAlert(nserror (*callback)(const char *username,
+ const char *password,
+ void *pw),
void *callbaclpw,
nsurl *url,
const char *host,
@@ -57,7 +59,9 @@ private:
nsurl* fUrl; /**< URL being fetched */
BString fHost; /**< Host for user display */
BString fRealm; /**< Authentication realm */
- nserror (*fCallback)(bool proceed, void *pw);
+ nserror (*fCallback)(const char *username,
+ const char *password,
+ void *pw);
void *fCallbackPw;
BTextControl *fUserControl;
@@ -66,13 +70,17 @@ private:
static void create_login_window(nsurl *host,
lwc_string *realm, const char *fetchurl,
- nserror (*cb)(bool proceed, void *pw), void *cbpw);
+ nserror (*cb)(const char *username,
+ const char *password,
+ void *pw), void *cbpw);
#define TC_H 25
#define TC_MARGIN 10
-LoginAlert::LoginAlert(nserror (*callback)(bool proceed, void *pw),
+LoginAlert::LoginAlert(nserror (*callback)(const char *username,
+ const char *password,
+ void *pw),
void *callbackpw,
nsurl *url,
const char *host,
@@ -164,8 +172,12 @@ LoginAlert::MessageReceived(BMessage *message)
}
-extern "C" void gui_401login_open(nsurl *url, const char *realm,
- nserror (*cb)(bool proceed, void *pw), void *cbpw)
+extern "C" nserror gui_401login_open(nsurl *url, const char *realm,
+ const char *username, const char *password,
+ nserror (*cb)(const char *username,
+ const char *password,
+ void *pw),
+ void *cbpw)
{
lwc_string *host;
@@ -174,12 +186,17 @@ extern "C" void gui_401login_open(nsurl *url, const char *realm,
create_login_window(url, host, realm, cb, cbpw);
free(host);
+
+ return NSERROR_OK;
}
//void create_login_window(struct browser_window *bw, const char *host,
// const char *realm, const char *fetchurl)
static void create_login_window(nsurl *url, lwc_string *host,
- const char *realm, nserror (*cb)(bool proceed, void *pw),
+ const char *realm, nserror (*cb)(
+ const char *username,
+ const char *password,
+ void *pw),
void *cbpw)
{
BString r("Secure Area");
diff --git a/frontends/beos/options.h b/frontends/beos/options.h
index 40d23a3bc..f959442f7 100644
--- a/frontends/beos/options.h
+++ b/frontends/beos/options.h
@@ -18,13 +18,12 @@
*/
-#ifndef _NETSURF_BEOS_OPTIONS_H_
-#define _NETSURF_BEOS_OPTIONS_H_
+#ifndef NETSURF_BEOS_OPTIONS_H_
+#define NETSURF_BEOS_OPTIONS_H_
/* currently nothing here */
#endif
-NSOPTION_BOOL(render_resample, false)
NSOPTION_STRING(url_file, NULL)
diff --git a/frontends/beos/plotters.cpp b/frontends/beos/plotters.cpp
index c4903e045..2c50f9497 100644
--- a/frontends/beos/plotters.cpp
+++ b/frontends/beos/plotters.cpp
@@ -370,7 +370,7 @@ nsbeos_plot_line(const struct redraw_context *ctx,
nsbeos_set_colour(style->stroke_colour);
float pensize = view->PenSize();
- view->SetPenSize(style->stroke_width);
+ view->SetPenSize(plot_style_fixed_to_float(style->stroke_width));
BPoint start(line->x0, line->y0);
BPoint end(line->x1, line->y1);
@@ -447,7 +447,7 @@ nsbeos_plot_rectangle(const struct redraw_context *ctx,
nsbeos_set_colour(style->stroke_colour);
float pensize = view->PenSize();
- view->SetPenSize(style->stroke_width);
+ view->SetPenSize(plot_style_fixed_to_float(style->stroke_width));
BRect rect(nsrect->x0, nsrect->y0, nsrect->x1, nsrect->y1);
view->StrokeRect(rect, pat);
@@ -518,7 +518,6 @@ nsbeos_plot_polygon(const struct redraw_context *ctx,
* \param pstyle Style controlling the path plot.
* \param p elements of path
* \param n nunber of elements on path
- * \param width The width of the path
* \param transform A transform to apply to the path.
* \return NSERROR_OK on success else error code.
*/
@@ -527,7 +526,6 @@ nsbeos_plot_path(const struct redraw_context *ctx,
const plot_style_t *pstyle,
const float *p,
unsigned int n,
- float width,
const float transform[6])
{
unsigned int i;
@@ -578,7 +576,7 @@ nsbeos_plot_path(const struct redraw_context *ctx,
rgb_color old_high = view->HighColor();
float old_pen = view->PenSize();
- view->SetPenSize(width);
+ view->SetPenSize(plot_style_fixed_to_float(pstyle->stroke_width));
view->MovePenTo(0, 0);
if (pstyle->fill_colour != NS_TRANSPARENT) {
view->SetHighColor(nsbeos_rgb_colour(pstyle->fill_colour));
diff --git a/frontends/beos/res/adblock.css b/frontends/beos/res/adblock.css
index ff2485622..0d12aaa7c 120000
--- a/frontends/beos/res/adblock.css
+++ b/frontends/beos/res/adblock.css
@@ -1 +1 @@
-../../../!NetSurf/Resources/AdBlock,f79 \ No newline at end of file
+../../../resources/adblock.css \ No newline at end of file
diff --git a/frontends/beos/res/ca-bundle.txt b/frontends/beos/res/ca-bundle.txt
index 0b0e416ad..1187fa51a 120000
--- a/frontends/beos/res/ca-bundle.txt
+++ b/frontends/beos/res/ca-bundle.txt
@@ -1 +1 @@
-../../../!NetSurf/Resources/ca-bundle \ No newline at end of file
+../../../resources/ca-bundle \ No newline at end of file
diff --git a/frontends/beos/res/de/welcome.html b/frontends/beos/res/de/welcome.html
index 98a53b215..b77e23743 120000
--- a/frontends/beos/res/de/welcome.html
+++ b/frontends/beos/res/de/welcome.html
@@ -1 +1 @@
-../../../../!NetSurf/Resources/de/welcome.html,faf \ No newline at end of file
+../../../../resources/de/welcome.html \ No newline at end of file
diff --git a/frontends/beos/res/default.css b/frontends/beos/res/default.css
index a8579eb7c..fa3ae6c26 120000
--- a/frontends/beos/res/default.css
+++ b/frontends/beos/res/default.css
@@ -1 +1 @@
-../../../!NetSurf/Resources/CSS,f79 \ No newline at end of file
+../../../resources/default.css \ No newline at end of file
diff --git a/frontends/beos/res/en/credits.html b/frontends/beos/res/en/credits.html
index 252516fd7..f73ecd4aa 120000
--- a/frontends/beos/res/en/credits.html
+++ b/frontends/beos/res/en/credits.html
@@ -1 +1 @@
-../../../../!NetSurf/Resources/en/credits.html,faf \ No newline at end of file
+../../../../resources/en/credits.html \ No newline at end of file
diff --git a/frontends/beos/res/en/licence.html b/frontends/beos/res/en/licence.html
index 79f73669b..0c3b430b7 120000
--- a/frontends/beos/res/en/licence.html
+++ b/frontends/beos/res/en/licence.html
@@ -1 +1 @@
-../../../../!NetSurf/Resources/en/licence.html,faf \ No newline at end of file
+../../../../resources/en/licence.html \ No newline at end of file
diff --git a/frontends/beos/res/en/maps.html b/frontends/beos/res/en/maps.html
deleted file mode 120000
index bb3ffcbe7..000000000
--- a/frontends/beos/res/en/maps.html
+++ /dev/null
@@ -1 +0,0 @@
-../../../../!NetSurf/Resources/en/maps.html,faf \ No newline at end of file
diff --git a/frontends/beos/res/en/welcome.html b/frontends/beos/res/en/welcome.html
index 601099223..543f31ddd 120000
--- a/frontends/beos/res/en/welcome.html
+++ b/frontends/beos/res/en/welcome.html
@@ -1 +1 @@
-../../../../!NetSurf/Resources/en/welcome.html,faf \ No newline at end of file
+../../../../resources/en/welcome.html \ No newline at end of file
diff --git a/frontends/beos/res/icons b/frontends/beos/res/icons
index c7f860352..94d2dc0df 120000
--- a/frontends/beos/res/icons
+++ b/frontends/beos/res/icons
@@ -1 +1 @@
-../../../!NetSurf/Resources/Icons \ No newline at end of file
+../../../resources/icons \ No newline at end of file
diff --git a/frontends/beos/res/internal.css b/frontends/beos/res/internal.css
index 17f9f1504..5583a9811 120000
--- a/frontends/beos/res/internal.css
+++ b/frontends/beos/res/internal.css
@@ -1 +1 @@
-../../../!NetSurf/Resources/internal.css,f79 \ No newline at end of file
+../../../resources/internal.css \ No newline at end of file
diff --git a/frontends/beos/res/it/credits.html b/frontends/beos/res/it/credits.html
index 64b78982e..2b7c99542 120000
--- a/frontends/beos/res/it/credits.html
+++ b/frontends/beos/res/it/credits.html
@@ -1 +1 @@
-../../../../!NetSurf/Resources/it/credits.html,faf \ No newline at end of file
+../../../../resources/it/credits.html \ No newline at end of file
diff --git a/frontends/beos/res/it/licence.html b/frontends/beos/res/it/licence.html
index 4abc825d3..92afce85b 120000
--- a/frontends/beos/res/it/licence.html
+++ b/frontends/beos/res/it/licence.html
@@ -1 +1 @@
-../../../../!NetSurf/Resources/it/licence.html,faf \ No newline at end of file
+../../../../resources/it/licence.html \ No newline at end of file
diff --git a/frontends/beos/res/it/welcome.html b/frontends/beos/res/it/welcome.html
index 59cef0551..2673ba948 120000
--- a/frontends/beos/res/it/welcome.html
+++ b/frontends/beos/res/it/welcome.html
@@ -1 +1 @@
-../../../../!NetSurf/Resources/it/welcome.html,faf \ No newline at end of file
+../../../../resources/it/welcome.html \ No newline at end of file
diff --git a/frontends/beos/res/ja/welcome.html b/frontends/beos/res/ja/welcome.html
index a2556ee4e..8b603f3df 120000
--- a/frontends/beos/res/ja/welcome.html
+++ b/frontends/beos/res/ja/welcome.html
@@ -1 +1 @@
-../../../../!NetSurf/Resources/ja/welcome.html,faf \ No newline at end of file
+../../../../resources/ja/welcome.html \ No newline at end of file
diff --git a/frontends/beos/res/maps.html b/frontends/beos/res/maps.html
deleted file mode 120000
index a32f725fb..000000000
--- a/frontends/beos/res/maps.html
+++ /dev/null
@@ -1 +0,0 @@
-en/maps.html \ No newline at end of file
diff --git a/frontends/beos/res/netsurf.png b/frontends/beos/res/netsurf.png
index 905512c25..d0ab72a5e 120000
--- a/frontends/beos/res/netsurf.png
+++ b/frontends/beos/res/netsurf.png
@@ -1 +1 @@
-../../../!NetSurf/Resources/netsurf.png,b60 \ No newline at end of file
+../../../resources/netsurf.png \ No newline at end of file
diff --git a/frontends/beos/res/quirks.css b/frontends/beos/res/quirks.css
index 88aabe48c..1e752cb9e 120000
--- a/frontends/beos/res/quirks.css
+++ b/frontends/beos/res/quirks.css
@@ -1 +1 @@
-../../../!NetSurf/Resources/Quirks,f79 \ No newline at end of file
+../../../resources/quirks.css \ No newline at end of file
diff --git a/frontends/beos/window.cpp b/frontends/beos/window.cpp
index f4229207b..b97be0f07 100644
--- a/frontends/beos/window.cpp
+++ b/frontends/beos/window.cpp
@@ -92,8 +92,6 @@ struct gui_window {
/* Keep gui_windows in a list for cleanup later */
struct gui_window *next, *prev;
-
- float scale;
};
@@ -336,11 +334,6 @@ struct browser_window *nsbeos_get_browser_for_gui(struct gui_window *g)
return g->bw;
}
-float nsbeos_get_scale_for_gui(struct gui_window *g)
-{
- return g->scale;
-}
-
/* Create a gui_window */
static struct gui_window *gui_window_create(struct browser_window *bw,
struct gui_window *existing,
@@ -360,7 +353,6 @@ static struct gui_window *gui_window_create(struct browser_window *bw,
g->bw = bw;
g->mouse.state = 0;
g->current_pointer = GUI_POINTER_DEFAULT;
- g->scale = browser_window_get_scale(bw);
g->careth = 0;
g->pending_resizes = 0;
@@ -518,9 +510,10 @@ void nsbeos_dispatch_event(BMessage *message)
if (gui->mouse.state & BROWSER_MOUSE_MOD_2 && !ctrl)
gui->mouse.state ^= BROWSER_MOUSE_MOD_2;
- browser_window_mouse_track(gui->bw, (browser_mouse_state)gui->mouse.state,
- (int)(where.x / gui->scale),
- (int)(where.y / gui->scale));
+ browser_window_mouse_track(gui->bw,
+ (browser_mouse_state)gui->mouse.state,
+ (int)(where.x),
+ (int)(where.y));
gui->last_x = (int)where.x;
gui->last_y = (int)where.y;
@@ -562,8 +555,8 @@ void nsbeos_dispatch_event(BMessage *message)
if (mods & B_CONTROL_KEY)
gui->mouse.state |= BROWSER_MOUSE_MOD_2;
- gui->mouse.pressed_x = where.x / gui->scale;
- gui->mouse.pressed_y = where.y / gui->scale;
+ gui->mouse.pressed_x = where.x;
+ gui->mouse.pressed_y = where.y;
// make sure the view is in focus
if (view && view->LockLooper()) {
@@ -624,8 +617,8 @@ void nsbeos_dispatch_event(BMessage *message)
if (gui->mouse.state & (BROWSER_MOUSE_CLICK_1|BROWSER_MOUSE_CLICK_2))
browser_window_mouse_click(gui->bw,
(browser_mouse_state)gui->mouse.state,
- where.x / gui->scale,
- where.y / gui->scale);
+ where.x,
+ where.y);
else
browser_window_mouse_track(gui->bw, (browser_mouse_state)0,
where.x, where.y);
@@ -655,23 +648,26 @@ void nsbeos_dispatch_event(BMessage *message)
{
nsurl* url;
BString realm;
- BString auth;
+ BString username;
+ BString password;
void* cbpw;
- nserror (*cb)(bool proceed, void* pw);
+ nserror (*cb)(const char *username,
+ const char *password,
+ void *pw);
if (message->FindPointer("URL", (void**)&url) < B_OK)
break;
if (message->FindString("Realm", &realm) < B_OK)
break;
- if (message->FindString("Auth", &auth) < B_OK)
+ if (message->FindString("User", &username) < B_OK)
+ break;
+ if (message->FindString("Pass", &password) < B_OK)
break;
if (message->FindPointer("callback", (void**)&cb) < B_OK)
break;
if (message->FindPointer("callback_pw", (void**)&cbpw) < B_OK)
break;
- //printf("login to '%s' with '%s'\n", url.String(), auth.String());
- urldb_set_auth_details(url, realm.String(), auth.String());
- cb(true, cbpw);
+ cb(username.String(), password.String(), cbpw);
break;
}
default:
@@ -683,7 +679,6 @@ void nsbeos_dispatch_event(BMessage *message)
void nsbeos_window_expose_event(BView *view, gui_window *g, BMessage *message)
{
BRect updateRect;
- //float scale = g->scale;
struct rect clip;
struct redraw_context ctx = { true, true, &nsbeos_plotters };
@@ -1113,93 +1108,79 @@ static void gui_window_update_extent(struct gui_window *g)
g->view->UnlockLooper();
}
-/* some cursors like those in Firefox */
-// XXX: move to separate file or resource ?
+static BCursorID gui_haiku_pointer(gui_pointer_shape shape)
+{
+ switch (shape) {
+ case GUI_POINTER_POINT: /* link */
+ return B_CURSOR_ID_FOLLOW_LINK;
-const uint8 kLinkCursorBits[] = {
- 16, /* cursor size */
- 1, /* bits per pixel */
- 2, /* vertical hot spot */
- 2, /* horizontal hot spot */
+ case GUI_POINTER_CARET: /* input */
+ return B_CURSOR_ID_I_BEAM;
- /* data */
- 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x24, 0x00, 0x24, 0x00, 0x13, 0xe0, 0x12, 0x5c, 0x09, 0x2a,
- 0x08, 0x01, 0x3c, 0x21, 0x4c, 0x71, 0x42, 0x71, 0x30, 0xf9, 0x0c, 0xf9, 0x02, 0x02, 0x01, 0x00,
+ case GUI_POINTER_MENU:
+ return B_CURSOR_ID_CONTEXT_MENU;
- /* mask */
- 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x3c, 0x00, 0x3c, 0x00, 0x1f, 0xe0, 0x1f, 0xfc, 0x0f, 0xfe,
- 0x0f, 0xff, 0x3f, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x3f, 0xff, 0x0f, 0xff, 0x03, 0xfc, 0x01, 0xe0
-};
+ case GUI_POINTER_UP:
+ return B_CURSOR_ID_RESIZE_NORTH;
-const uint8 kWatchCursorBits[] = {
- 16, /* cursor size */
- 1, /* bits per pixel */
- 0, /* vertical hot spot */
- 1, /* horizontal hot spot */
+ case GUI_POINTER_DOWN:
+ return B_CURSOR_ID_RESIZE_SOUTH;
- /* data */
- 0x70, 0x00, 0x48, 0x00, 0x48, 0x00, 0x27, 0xc0, 0x24, 0xb8, 0x12, 0x54, 0x10, 0x02, 0x78, 0x02,
- 0x98, 0x02, 0x84, 0x02, 0x60, 0x3a, 0x18, 0x46, 0x04, 0x8a, 0x02, 0x92, 0x01, 0x82, 0x00, 0x45,
+ case GUI_POINTER_LEFT:
+ return B_CURSOR_ID_RESIZE_WEST;
- /* mask */
- 0x70, 0x00, 0x78, 0x00, 0x78, 0x00, 0x3f, 0xc0, 0x3f, 0xf8, 0x1f, 0xfc, 0x1f, 0xfe, 0x7f, 0xfe,
- 0xff, 0xfe, 0xff, 0xfe, 0x7f, 0xfe, 0x1f, 0xfe, 0x07, 0xfe, 0x03, 0xfe, 0x01, 0xfe, 0x00, 0x7f
-};
+ case GUI_POINTER_RIGHT:
+ return B_CURSOR_ID_RESIZE_EAST;
-const uint8 kWatch2CursorBits[] = {
- 16, /* cursor size */
- 1, /* bits per pixel */
- 0, /* vertical hot spot */
- 1, /* horizontal hot spot */
+ case GUI_POINTER_RU:
+ return B_CURSOR_ID_RESIZE_NORTH_EAST;
- /* data */
- 0x70, 0x00, 0x48, 0x00, 0x48, 0x00, 0x27, 0xc0, 0x24, 0xb8, 0x12, 0x54, 0x10, 0x02, 0x78, 0x02,
- 0x98, 0x02, 0x84, 0x02, 0x60, 0x3a, 0x18, 0x46, 0x04, 0xa2, 0x02, 0x92, 0x01, 0xa2, 0x00, 0x45,
+ case GUI_POINTER_LD:
+ return B_CURSOR_ID_RESIZE_SOUTH_WEST;
- /* mask */
- 0x70, 0x00, 0x78, 0x00, 0x78, 0x00, 0x3f, 0xc0, 0x3f, 0xf8, 0x1f, 0xfc, 0x1f, 0xfe, 0x7f, 0xfe,
- 0xff, 0xfe, 0xff, 0xfe, 0x7f, 0xfe, 0x1f, 0xfe, 0x07, 0xfe, 0x03, 0xfe, 0x01, 0xfe, 0x00, 0x7f
-};
+ case GUI_POINTER_LU:
+ return B_CURSOR_ID_RESIZE_NORTH_WEST;
+
+ case GUI_POINTER_RD:
+ return B_CURSOR_ID_RESIZE_SOUTH_EAST;
+
+ case GUI_POINTER_CROSS:
+ return B_CURSOR_ID_CROSS_HAIR;
+
+ case GUI_POINTER_MOVE:
+ return B_CURSOR_ID_MOVE;
+
+ case GUI_POINTER_WAIT:
+ case GUI_POINTER_PROGRESS:
+ return B_CURSOR_ID_PROGRESS;
+
+ case GUI_POINTER_NO_DROP:
+ case GUI_POINTER_NOT_ALLOWED:
+ return B_CURSOR_ID_NOT_ALLOWED;
+ case GUI_POINTER_HELP:
+ return B_CURSOR_ID_HELP;
+
+ case GUI_POINTER_DEFAULT:
+ default:
+ break;
+ }
+ return B_CURSOR_ID_SYSTEM_DEFAULT;
+}
static void gui_window_set_pointer(struct gui_window *g, gui_pointer_shape shape)
{
- BCursor *cursor = NULL;
- bool allocated = false;
-
if (g->current_pointer == shape)
return;
g->current_pointer = shape;
- switch (shape) {
- case GUI_POINTER_POINT:
- cursor = new BCursor(kLinkCursorBits);
- allocated = true;
- break;
- case GUI_POINTER_CARET:
- cursor = (BCursor *)B_CURSOR_I_BEAM;
- break;
- case GUI_POINTER_WAIT:
- cursor = new BCursor(kWatchCursorBits);
- allocated = true;
- break;
- case GUI_POINTER_PROGRESS:
- cursor = new BCursor(kWatch2CursorBits);
- allocated = true;
- break;
- default:
- cursor = (BCursor *)B_CURSOR_SYSTEM_DEFAULT;
- allocated = false;
- }
+ BCursor cursor(gui_haiku_pointer(shape));
if (g->view && g->view->LockLooper()) {
- g->view->SetViewCursor(cursor);
+ g->view->SetViewCursor(&cursor);
g->view->UnlockLooper();
}
-
- if (allocated)
- delete cursor;
}
static void gui_window_place_caret(struct gui_window *g, int x, int y, int height,
@@ -1338,28 +1319,64 @@ struct gui_clipboard_table *beos_clipboard_table = &clipboard_table;
* \param g The gui window to measure content area of.
* \param width receives width of window
* \param height receives height of window
- * \param scaled whether to return scaled values
* \return NSERROR_OK on sucess and width and height updated
* else error code.
*/
static nserror
-gui_window_get_dimensions(struct gui_window *g, int *width, int *height,
- bool scaled)
+gui_window_get_dimensions(struct gui_window *g, int *width, int *height)
{
if (g->view &&
g->view->LockLooper()) {
*width = g->view->Bounds().Width() + 1;
*height = g->view->Bounds().Height() + 1;
g->view->UnlockLooper();
-
- if (scaled) {
- *width /= g->scale;
- *height /= g->scale;
- }
}
return NSERROR_OK;
}
+
+/**
+ * process miscellaneous window events
+ *
+ * \param gw The window receiving the event.
+ * \param event The event code.
+ * \return NSERROR_OK when processed ok
+ */
+static nserror
+gui_window_event(struct gui_window *gw, enum gui_window_event event)
+{
+ switch (event) {
+ case GW_EVENT_UPDATE_EXTENT:
+ gui_window_update_extent(gw);
+ break;
+
+ case GW_EVENT_REMOVE_CARET:
+ gui_window_remove_caret(gw);
+ break;
+
+ case GW_EVENT_NEW_CONTENT:
+ gui_window_new_content(gw);
+ break;
+
+ case GW_EVENT_START_SELECTION:
+ gui_start_selection(gw);
+ break;
+
+ case GW_EVENT_START_THROBBER:
+ gui_window_start_throbber(gw);
+ break;
+
+ case GW_EVENT_STOP_THROBBER:
+ gui_window_stop_throbber(gw);
+ break;
+
+ default:
+ break;
+ }
+ return NSERROR_OK;
+}
+
+
static struct gui_window_table window_table = {
gui_window_create,
gui_window_destroy,
@@ -1367,7 +1384,7 @@ static struct gui_window_table window_table = {
gui_window_get_scroll,
gui_window_set_scroll,
gui_window_get_dimensions,
- gui_window_update_extent,
+ gui_window_event,
/* from scaffold */
gui_window_set_title,
@@ -1376,18 +1393,13 @@ static struct gui_window_table window_table = {
gui_window_set_status,
gui_window_set_pointer,
gui_window_place_caret,
- gui_window_remove_caret,
- gui_window_start_throbber,
- gui_window_stop_throbber,
NULL, //drag_start
NULL, //save_link
- NULL, //scroll_start
- gui_window_new_content,
NULL, //create_form_select_menu
NULL, //file_gadget_open
NULL, //drag_save_object
NULL, //drag_save_selection
- gui_start_selection
+ NULL //console_log
};
struct gui_window_table *beos_window_table = &window_table;
diff --git a/frontends/beos/window.h b/frontends/beos/window.h
index 928acca22..f8726a887 100644
--- a/frontends/beos/window.h
+++ b/frontends/beos/window.h
@@ -72,8 +72,6 @@ struct beos_scaffolding *nsbeos_get_scaffold(struct gui_window *g);
struct browser_window *nsbeos_get_browser_for_gui(struct gui_window *g);
-float nsbeos_get_scale_for_gui(struct gui_window *g);
-
int nsbeos_gui_window_update_targets(struct gui_window *g);
void nsbeos_window_destroy_browser(struct gui_window *g);
diff --git a/frontends/framebuffer/Makefile b/frontends/framebuffer/Makefile
index 760e85b25..7408f0cbc 100644
--- a/frontends/framebuffer/Makefile
+++ b/frontends/framebuffer/Makefile
@@ -1,8 +1,14 @@
+#
+# Makefile for NetSurf Framebuffer frontend
+#
+# This file is part of NetSurf
+#
# ----------------------------------------------------------------------------
-# Framebuffer target setup
+# Framebuffer flag setup (using pkg-config)
# ----------------------------------------------------------------------------
-CFLAGS += -Dnsframebuffer
+CFLAGS += -std=c99 -g \
+ -Dnsframebuffer -Dsmall
#resource path
CFLAGS += '-DNETSURF_FB_RESPATH="$(NETSURF_FB_RESPATH)"'
@@ -20,26 +26,62 @@ CFLAGS += '-DNETSURF_FB_FONT_MONOSPACE_BOLD="$(NETSURF_FB_FONT_MONOSPACE_BOLD)"'
CFLAGS += '-DNETSURF_FB_FONT_CURSIVE="$(NETSURF_FB_FONT_CURSIVE)"'
CFLAGS += '-DNETSURF_FB_FONT_FANTASY="$(NETSURF_FB_FONT_FANTASY)"'
-CFLAGS += -std=c99 -g -Dsmall \
- -D_BSD_SOURCE \
- -D_DEFAULT_SOURCE \
- -D_XOPEN_SOURCE=600 \
- -D_POSIX_C_SOURCE=200809L
-
LDFLAGS += -lm
+# freetype is optional but older versions do not use pkg-config
+ifeq ($(NETSURF_FB_FONTLIB),freetype)
+ NETSURF_USE_FREETYPE2 := AUTO
+ NETSURF_FEATURE_FREETYPE2_CFLAGS := -DFB_USE_FREETYPE
+
+ $(eval $(call pkg_config_find_and_add_enabled,FREETYPE2,freetype2,freetype2))
+
+ # try and use non pkg-config method
+ ifeq ($(NETSURF_USE_FREETYPE2),NO)
+ FREETYPE_CONFIG_EXISTS := $(shell freetype-config --cflags >/dev/null && echo yes)
+ ifeq ($(FREETYPE_CONFIG_EXISTS),yes)
+ NETSURF_USE_FREETYPE2 := YES
+ CFLAGS += $(shell freetype-config --cflags) $(NETSURF_FEATURE_FREETYPE2_CFLAGS)
+ LDFLAGS += $(shell freetype-config --libs)
+ $(info FT2.CNFG: freetype2 (freetype2) enabled)
+ else
+ $(info FT2.CNFG: freetype2 (freetype2) failed)
+ $(error Unable to find library for: freetype2)
+ endif
+ endif
+endif
+
# non optional pkg-configed libs
LDFLAGS += -Wl,--whole-archive
$(eval $(call pkg_config_find_and_add,libnsfb,libnsfb))
LDFLAGS += -Wl,--no-whole-archive
-# freetype is optional but does not use pkg-config
-ifeq ($(NETSURF_FB_FONTLIB),freetype)
- CFLAGS += -DFB_USE_FREETYPE $(shell freetype-config --cflags)
- LDFLAGS += $(shell freetype-config --libs)
+# ---------------------------------------------------------------------------
+# Target setup
+# ---------------------------------------------------------------------------
+
+# The filter and target for split messages
+MESSAGES_FILTER=fb
+MESSAGES_TARGET=$(FRONTEND_RESOURCES_DIR)
+
+# ---------------------------------------------------------------------------
+# HOST specific feature flags
+# ---------------------------------------------------------------------------
+
+# enable POSIX and XSI feature flasg except:
+# - the default set on freebsd already has them enabled
+# - openbsd does not require the default source flags
+ifneq ($(HOST),FreeBSD)
+ ifneq ($(HOST),OpenBSD)
+ CFLAGS += -D_POSIX_C_SOURCE=200809L \
+ -D_XOPEN_SOURCE=700 \
+ -D_BSD_SOURCE \
+ -D_DEFAULT_SOURCE \
+ -D_NETBSD_SOURCE
+ else
+ CFLAGS += -D_POSIX_C_SOURCE=200809L
+ endif
endif
-
# ----------------------------------------------------------------------------
# built-in resource setup
# ----------------------------------------------------------------------------
@@ -80,22 +122,10 @@ FB_IMAGE_throbber6 := throbber/throbber6.png
FB_IMAGE_throbber7 := throbber/throbber7.png
FB_IMAGE_throbber8 := throbber/throbber8.png
-# local compiler flags
-ifeq ($(HOST),OpenBSD)
- HOST_CFLAGS += $(shell $(PKG_CONFIG) --cflags libpng)
- HOST_LDFLAGS += $(shell $(PKG_CONFIG) --libs libpng)
-else
- HOST_CFLAGS +=
- HOST_LDFLAGS += -lpng
-endif
-
-# Host tool to convert image bitmaps to source code.
-#
-# convert_image dependd on fb_bitmap.h so that if we change that
+# make convert_image depend on fbtk.h so that if we change that
# header, we get new images built.
-$(TOOLROOT)/convert_image: $(TOOLROOT)/created $(FRONTEND_SOURCE_DIR)/convert_image.c $(FRONTEND_SOURCE_DIR)/fbtk.h
- $(VQ)echo " HOST CC: $@"
- $(Q)$(HOST_CC) $(HOST_CFLAGS) -o $@ $(FRONTEND_SOURCE_DIR)/convert_image.c $(HOST_LDFLAGS)
+$(TOOLROOT)/convert_image: $(FRONTEND_SOURCE_DIR)/fbtk.h
+
# 1: input file
# 2: output file
@@ -117,11 +147,6 @@ $(eval $(foreach V,$(filter FB_IMAGE_%,$(.VARIABLES)),$(call convert_image,$(FRO
# Internal fonts to generate
FB_FONT_internal_ns-sans := fonts/glyph_data
-# Internal font conversion
-$(TOOLROOT)/convert_font: $(TOOLROOT)/created $(FRONTEND_SOURCE_DIR)/convert_font.c
- $(VQ)echo " HOST CC: $@"
- $(Q)$(HOST_CC) -o $@ $(FRONTEND_SOURCE_DIR)/convert_font.c
-
# 1: input file
# 2: output source code file
# 3: output header file
@@ -130,10 +155,12 @@ define convert_font
S_FONTS += $(2)
-$(2): $(1) $(TOOLROOT)/convert_font
+$(2) $(3): $(1) $(TOOLROOT)/convert_font
$(VQ)echo " FONT: $(1) ($(4))"
$(Q)$(TOOLROOT)/convert_font -H $(3) $(1) $(2)
+frontends/framebuffer/font_internal.c: $(2)
+
endef
S_FONTS :=
@@ -168,14 +195,15 @@ EXETARGET := nsfb
NETSURF_FRAMEBUFFER_RESOURCE_LIST := adblock.css credits.html \
default.css internal.css licence.html \
- netsurf.png quirks.css welcome.html maps.html Messages
+ netsurf.png quirks.css welcome.html
install-framebuffer:
- $(Q)$(MKDIR) -p $(DESTDIR)$(NETSURF_FRAMEBUFFER_BIN)
- $(Q)$(MKDIR) -p $(DESTDIR)$(NETSURF_FRAMEBUFFER_RESOURCES)
- $(Q)cp -v $(EXETARGET) $(DESTDIR)/$(NETSURF_FRAMEBUFFER_BIN)netsurf-fb
- $(Q)for F in $(NETSURF_FRAMEBUFFER_RESOURCE_LIST); do cp -vL $(FRONTEND_RESOURCES_DIR)/$$F $(DESTDIR)/$(NETSURF_FRAMEBUFFER_RESOURCES); done
- $(Q)$(SPLIT_MESSAGES) -l en -p fb -f messages resources/FatMessages | gzip -9n > $(DESTDIR)$(NETSURF_FRAMEBUFFER_RESOURCES)messages
+ $(VQ)echo " INSTALL: $(DESTDIR)/$(PREFIX)"
+ $(Q)$(INSTALL) -d $(DESTDIR)/$(NETSURF_FRAMEBUFFER_BIN)
+ $(Q)$(INSTALL) -T $(EXETARGET) $(DESTDIR)/$(NETSURF_FRAMEBUFFER_BIN)/netsurf-fb
+ $(Q)$(INSTALL) -d $(DESTDIR)/$(NETSURF_FRAMEBUFFER_RESOURCES)
+ $(Q)for F in $(NETSURF_FRAMEBUFFER_RESOURCE_LIST); do $(INSTALL) -m 644 $(FRONTEND_RESOURCES_DIR)/$$F $(DESTDIR)/$(NETSURF_FRAMEBUFFER_RESOURCES); done
+ $(Q)$(INSTALL) -m 644 -T $(MESSAGES_TARGET)/en/Messages $(DESTDIR)/$(NETSURF_FRAMEBUFFER_RESOURCES)/Messages
# ----------------------------------------------------------------------------
# Package target
diff --git a/frontends/framebuffer/Makefile.defaults b/frontends/framebuffer/Makefile.defaults
index cc712e992..8def7d92a 100644
--- a/frontends/framebuffer/Makefile.defaults
+++ b/frontends/framebuffer/Makefile.defaults
@@ -38,10 +38,10 @@ NETSURF_FB_FONT_CURSIVE := Comic_Sans_MS.ttf
NETSURF_FB_FONT_FANTASY := Impact.ttf
# Default binary install path
-NETSURF_FRAMEBUFFER_BIN := $(PREFIX)/bin/
+NETSURF_FRAMEBUFFER_BIN := $(PREFIX)/bin
# Default resource install path
-NETSURF_FRAMEBUFFER_RESOURCES := $(PREFIX)/share/netsurf/
+NETSURF_FRAMEBUFFER_RESOURCES := $(PREFIX)/share/netsurf
# Default framebuffer search path
NETSURF_FB_RESPATH := $${HOME}/.netsurf/:$${NETSURFRES}:$(NETSURF_FRAMEBUFFER_RESOURCES):./frontends/framebuffer/res
diff --git a/frontends/framebuffer/Makefile.tools b/frontends/framebuffer/Makefile.tools
new file mode 100644
index 000000000..80623b164
--- /dev/null
+++ b/frontends/framebuffer/Makefile.tools
@@ -0,0 +1,15 @@
+# -*- mode: makefile-gmake -*-
+##
+## tool setup for the framebuffer target
+##
+
+ifeq ($(origin GCCSDK_INSTALL_ENV),undefined)
+ PKG_CONFIG := pkg-config
+else
+ PKG_CONFIG := PKG_CONFIG_LIBDIR="$(GCCSDK_INSTALL_ENV)/lib/pkgconfig" pkg-config
+endif
+
+ifneq ($(origin GCCSDK_INSTALL_CROSSBIN),undefined)
+ CC := $(wildcard $(GCCSDK_INSTALL_CROSSBIN)/*gcc)
+ CXX := $(wildcard $(GCCSDK_INSTALL_CROSSBIN)/*g++)
+endif
diff --git a/frontends/framebuffer/bitmap.c b/frontends/framebuffer/bitmap.c
index 59f68bba5..c9b58541e 100644
--- a/frontends/framebuffer/bitmap.c
+++ b/frontends/framebuffer/bitmap.c
@@ -47,19 +47,16 @@
* \param state a flag word indicating the initial state
* \return an opaque struct bitmap, or NULL on memory exhaustion
*/
-static void *bitmap_create(int width, int height, unsigned int state)
+static void *bitmap_create(int width, int height, enum gui_bitmap_flags flags)
{
- nsfb_t *bm;
-
- NSLOG(netsurf, INFO, "width %d, height %d, state %u", width, height,
- state);
+ nsfb_t *bm;
bm = nsfb_new(NSFB_SURFACE_RAM);
if (bm == NULL) {
return NULL;
}
- if ((state & BITMAP_OPAQUE) == 0) {
+ if ((flags & BITMAP_OPAQUE) == 0) {
nsfb_set_geometry(bm, width, height, NSFB_FMT_ABGR8888);
} else {
nsfb_set_geometry(bm, width, height, NSFB_FMT_XBGR8888);
@@ -70,9 +67,7 @@ static void *bitmap_create(int width, int height, unsigned int state)
return NULL;
}
- NSLOG(netsurf, INFO, "bitmap %p", bm);
-
- return bm;
+ return bm;
}
@@ -133,20 +128,6 @@ static void bitmap_destroy(void *bitmap)
/**
- * Save a bitmap in the platform's native format.
- *
- * \param bitmap a bitmap, as returned by bitmap_create()
- * \param path pathname for file
- * \param flags flags controlling how the bitmap is saved.
- * \return true on success, false on error and error reported
- */
-static bool bitmap_save(void *bitmap, const char *path, unsigned flags)
-{
- return true;
-}
-
-
-/**
* The bitmap image has changed, so flush any persistant cache.
*
* \param bitmap a bitmap, as returned by bitmap_create()
@@ -175,39 +156,6 @@ static void bitmap_set_opaque(void *bitmap, bool opaque)
/**
- * Tests whether a bitmap has an opaque alpha channel
- *
- * \param bitmap a bitmap, as returned by bitmap_create()
- * \return whether the bitmap is opaque
- */
-static bool bitmap_test_opaque(void *bitmap)
-{
- int tst;
- nsfb_t *bm = bitmap;
- unsigned char *bmpptr;
- int width;
- int height;
-
- assert(bm != NULL);
-
- nsfb_get_buffer(bm, &bmpptr, NULL);
-
- nsfb_get_geometry(bm, &width, &height, NULL);
-
- tst = width * height;
-
- while (tst-- > 0) {
- if (bmpptr[(tst << 2) + 3] != 0xff) {
- NSLOG(netsurf, INFO, "bitmap %p has transparency", bm);
- return false;
- }
- }
- NSLOG(netsurf, INFO, "bitmap %p is opaque", bm);
- return true;
-}
-
-
-/**
* Gets weather a bitmap should be plotted opaque
*
* \param bitmap a bitmap, as returned by bitmap_create()
@@ -251,12 +199,6 @@ static int bitmap_get_height(void *bitmap)
return(height);
}
-/* get bytes per pixel */
-static size_t bitmap_get_bpp(void *bitmap)
-{
- return 4;
-}
-
/**
* Render content into a bitmap.
*
@@ -286,11 +228,11 @@ bitmap_render(struct bitmap *bitmap,
NSLOG(netsurf, INFO, "width %d, height %d", width, height);
/* Calculate size of buffer to render the content into */
- /* We get the width from the content width, unless it exceeds 1024,
- * in which case we use 1024. This means we never create excessively
- * large render buffers for huge contents, which would eat memory and
- * cripple performance. */
- cwidth = min(content_get_width(content), 1024);
+ /* We get the width from the largest of the bitmap width and the content
+ * width, unless it exceeds 1024, in which case we use 1024. This means
+ * we never create excessively large render buffers for huge contents,
+ * which would eat memory and cripple performance. */
+ cwidth = max(width, min(content_get_width(content), 1024));
/* The height is set in proportion with the width, according to the
* aspect ratio of the required thumbnail. */
cheight = ((cwidth * height) + (width / 2)) / width;
@@ -332,13 +274,10 @@ static struct gui_bitmap_table bitmap_table = {
.destroy = bitmap_destroy,
.set_opaque = bitmap_set_opaque,
.get_opaque = framebuffer_bitmap_get_opaque,
- .test_opaque = bitmap_test_opaque,
.get_buffer = bitmap_get_buffer,
.get_rowstride = bitmap_get_rowstride,
.get_width = bitmap_get_width,
.get_height = bitmap_get_height,
- .get_bpp = bitmap_get_bpp,
- .save = bitmap_save,
.modified = bitmap_modified,
.render = bitmap_render,
};
diff --git a/frontends/framebuffer/convert_font.c b/frontends/framebuffer/convert_font.c
deleted file mode 100644
index 010af857a..000000000
--- a/frontends/framebuffer/convert_font.c
+++ /dev/null
@@ -1,1215 +0,0 @@
-/*
- * Copyright 2014 Michael Drake <tlsa@netsurf-browser.org>
- * Copyright 2014 Vincent Sanders <vince@netsurf-browser.org>
- *
- * This file is part of the convert_font tool used to convert font
- * glyph data into a compilable representation.
- *
- * 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.
- */
-
-#include <stdbool.h>
-#include <stdint.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include <unistd.h>
-#include <getopt.h>
-
-#define GLYPH_LEN 16
-#define BUCKETS 512
-#define CHUNK_SIZE (64 * 1024)
-#define HEADER_MAX 2000
-
-#define SECTION_SIZE (sizeof(uint16_t) * 256)
-
-const char *labels[4] = {
- " Regular",
- " Italic",
- " Bold",
- "Bold & Italic"
-};
-
-const char *var_lables[4] = {
- "fb_regular",
- "fb_italic",
- "fb_bold",
- "fb_bold_italic"
-};
-
-const char *short_labels[4] = {
- " ",
- " i",
- "b ",
- "bi"
-};
-
-enum font_style {
- REGULAR = 0,
- ITALIC = (1 << 0),
- BOLD = (1 << 1),
- ITALIC_BOLD = (1 << 2)
-};
-
-enum log_level {
- LOG_DEBUG,
- LOG_INFO,
- LOG_RESULT,
- LOG_WARNING,
- LOG_ERROR
-};
-
-enum log_level level;
-
-typedef struct glyph_entry {
- union {
- uint32_t u32[GLYPH_LEN / 4];
- uint8_t u8[GLYPH_LEN];
- } data;
- uint32_t index;
- struct glyph_entry *next;
-} glyph_entry;
-
-/** Scratch glyph for generated code points */
-uint8_t code_point[GLYPH_LEN];
-
-/** Hash table */
-glyph_entry *ht[BUCKETS];
-
-#define LOG(lev, fmt, ...) \
- if (lev >= level) \
- printf(fmt, ##__VA_ARGS__);
-
-/**
- * Get hash for glyph data
- * \param g Glyph data (GLYPH_LEN bytes)
- * \return glyph's hash
- */
-static inline uint32_t glyph_hash(const uint8_t *g)
-{
- uint32_t hash = 0x811c9dc5;
- unsigned int len = GLYPH_LEN;
-
- while (len > 0) {
- hash *= 0x01000193;
- hash ^= *g++;
- len--;
- }
-
- return hash;
-}
-
-
-/**
- * Check whether glyphs are identical (compares glyph data)
- *
- * \param g1 First glyph's data (GLYPH_LEN bytes)
- * \param g2 Second glyph's data (GLYPH_LEN bytes)
- * \return true iff both glyphs are identical, else false
- */
-static inline bool glyphs_match(const uint8_t *g1, const uint8_t *g2)
-{
- return (memcmp(g1, g2, GLYPH_LEN) == 0);
-}
-
-
-/**
- * Add a glyph to a hash chain (or free, and return pointer to existing glyph)
- *
- * Note that if new glyph already exists in chain, it is freed and a pointer to
- * the existing glyph is returned. If the glyph does not exist in the chain
- * it is added and its pointer is returned.
- *
- * \param head Head of hash chain
- * \param new New glyph to add (may be freed)
- * \return pointer to glyph in hash chain
- */
-static glyph_entry * glyph_add_to_chain(glyph_entry **head, glyph_entry *new)
-{
- glyph_entry *e = *head;
-
- if (*head == NULL) {
- new->next = NULL;
- *head = new;
- return new;
- }
-
- do {
- if (glyphs_match(new->data.u8, e->data.u8)) {
- free(new);
- return e;
- }
- if (e->next == NULL)
- break;
- e = e->next;
- } while (1);
-
- new->next = e->next;
- e->next = new;
- return new;
-}
-
-
-/**
- * Free a glyph entry chain
- *
- * \param head Head of hash chain
- */
-static void free_chain(glyph_entry *head)
-{
- glyph_entry *e = head;
-
- if (head == NULL)
- return;
-
- while (e != NULL) {
- head = e->next;
- free(e);
- e = head;
- };
-}
-
-
-/**
- * Add new glyph to hash table (or free, and return pointer to existing glyph)
- *
- * Note that if new glyph already exists in table, it is freed and a pointer to
- * the existing glyph is returned. If the glyph does not exist in the table
- * it is added and its pointer is returned.
- *
- * \param new New glyph to add (may be freed)
- * \return pointer to glyph in hash table
- */
-static glyph_entry * glyph_add_to_table(glyph_entry *new)
-{
- uint32_t hash = glyph_hash(new->data.u8);
-
- return glyph_add_to_chain(&ht[hash % BUCKETS], new);
-}
-
-
-/**
- * Free glyph table.
- */
-static void free_table(void)
-{
- int i;
-
- for (i = 0; i < BUCKETS; i++) {
- free_chain(ht[i]);
- }
-}
-
-struct parse_context {
- enum {
- START,
- IN_HEADER,
- BEFORE_ID,
- GLYPH_ID,
- BEFORE_GLYPH_DATA,
- IN_GLYPH_DATA
- } state; /**< Current parser state */
-
- union {
- struct {
- bool new_line;
- } in_header;
- struct {
- bool new_line;
- bool u;
- } before_id;
- struct {
- int c;
- } g_id;
- struct {
- bool new_line;
- bool prev_h;
- bool prev_s;
- int c;
- } before_gd;
- struct {
- int line;
- int pos;
- int styles;
- int line_styles;
- glyph_entry *e[4];
- } in_gd;
- } data; /**< The state specific data */
-
- int id; /**< Current ID */
-
- int codepoints; /**< Glyphs containing codepoints */
- int count[4]; /**< Count of glyphs in file */
-};
-
-struct font_data {
- char header[HEADER_MAX];
- int header_len;
-
- uint8_t section_table[4][256];
- uint8_t sec_count[4];
- uint16_t *sections[4];
-
- glyph_entry *e[0xffff];
- int glyphs;
-};
-
-bool generate_font_header(const char *path, struct font_data *data)
-{
- FILE *fp;
- int s;
-
- fp = fopen(path, "wb");
- if (fp == NULL) {
- LOG(LOG_ERROR, "Couldn't open header file \"%s\"\n", path);
- return false;
- }
-
- fprintf(fp, "/*\n");
- fwrite(data->header, 1, data->header_len, fp);
- fprintf(fp, " */\n\n");
- fprintf(fp, "/* Don't edit this file, it was generated from the "
- "plain text source data. */\n\n");
-
-
- for (s = 0; s < 4; s++) {
- fprintf(fp, "const uint8_t *%s_section_table;\n",
- var_lables[s]);
- fprintf(fp, "const uint16_t *%s_sections;\n",
- var_lables[s]);
-
- }
-
- fprintf(fp, "const uint8_t *font_glyph_data;\n");
-
- fprintf(fp, "\n\n");
-
- fclose(fp);
-
- return true;
-
-}
-
-bool generate_font_source(const char *path, struct font_data *data)
-{
- int s, i, y;
- int limit;
- FILE *fp;
-
- fp = fopen(path, "wb");
- if (fp == NULL) {
- LOG(LOG_ERROR, "Couldn't open output file \"%s\"\n", path);
- return false;
- }
-
- fprintf(fp, "/*\n");
- fwrite(data->header, 1, data->header_len, fp);
- fprintf(fp, " */\n\n");
- fprintf(fp, "/* Don't edit this file, it was generated from the "
- "plain text source data. */\n\n");
-
- fprintf(fp, "#include <stdint.h>\n");
- fprintf(fp, "\n");
-
- for (s = 0; s < 4; s++) {
-
- fprintf(fp, "static const uint8_t %s_section_table_c[256] = {\n",
- var_lables[s]);
-
- for (i = 0; i < 256; i++) {
- if (i == 255)
- fprintf(fp, "0x%.2X\n",
- data->section_table[s][i]);
- else if (i % 8 == 7)
- fprintf(fp, "0x%.2X,\n",
- data->section_table[s][i]);
- else if (i % 8 == 0)
- fprintf(fp, "\t0x%.2X, ",
- data->section_table[s][i]);
- else
- fprintf(fp, "0x%.2X, ",
- data->section_table[s][i]);
- }
-
- fprintf(fp, "};\nconst uint8_t *%s_section_table = &%s_section_table_c[0];\n\n",
- var_lables[s], var_lables[s]);
- fprintf(fp, "static const uint16_t %s_sections_c[%i] = {\n",
- var_lables[s], data->sec_count[s] * 256);
-
- limit = data->sec_count[s] * 256;
- for (i = 0; i < limit; i++) {
- uint16_t offset = data->sections[s][i];
- if (i == limit - 1)
- fprintf(fp, "0x%.4X\n", offset);
- else if (i % 4 == 3)
- fprintf(fp, "0x%.4X,\n", offset);
- else if (i % 4 == 0)
- fprintf(fp, "\t0x%.4X, ", offset);
- else
- fprintf(fp, "0x%.4X, ", offset);
- }
-
- fprintf(fp, "};\nconst uint16_t *%s_sections = &%s_sections_c[0];\n\n", var_lables[s], var_lables[s]);
- }
-
- fprintf(fp, "static const uint8_t font_glyph_data_c[%i] = {\n",
- (data->glyphs + 1) * 16);
-
- fprintf(fp, "\t0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,\n"
- "\t0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,\n");
-
- limit = data->glyphs;
- for (i = 0; i < limit; i++) {
- glyph_entry *e = data->e[i];
-
- for (y = 0; y < 16; y++) {
- if (i == limit - 1 && y == 15)
- fprintf(fp, "0x%.2X\n", e->data.u8[y]);
- else if (y % 8 == 7)
- fprintf(fp, "0x%.2X,\n", e->data.u8[y]);
- else if (y % 8 == 0)
- fprintf(fp, "\t0x%.2X, ", e->data.u8[y]);
- else
- fprintf(fp, "0x%.2X, ", e->data.u8[y]);
- }
- }
-
- fprintf(fp, "};\n");
- fprintf(fp, "const uint8_t *font_glyph_data = &font_glyph_data_c[0];\n\n");
-
- fclose(fp);
-
- return true;
-}
-
-static bool add_glyph_to_data(glyph_entry *add, int id, int style,
- struct font_data *d)
-{
- glyph_entry *e;
- int offset;
- int s;
-
- /* Find out if 'add' is unique, and get its unique table entry */
- e = glyph_add_to_table(add);
- if (e == add) {
- /* Unique glyph */
- d->e[d->glyphs++] = e;
- e->index = d->glyphs;
- if (d->glyphs >= 0xfffd) {
- LOG(LOG_ERROR, " Too many glyphs for internal data "
- "representation\n");
- return false;
- }
- } else {
- /* Duplicate glyph */
- LOG(LOG_DEBUG, " U+%.4X (%s) is duplicate\n",
- id, short_labels[style]);
- }
-
- /* Find glyph's section */
- s = id / 256;
-
- /* Allocate section if needed */
- if ((s == 0 && d->sections[style] == NULL) ||
- (s != 0 && d->section_table[style][s] == 0)) {
- size_t size = (d->sec_count[style] + 1) * SECTION_SIZE;
- uint16_t *temp = realloc(d->sections[style], size);
- if (temp == NULL) {
- LOG(LOG_ERROR, " Couldn't increase sections "
- "allocation\n");
- return false;
- }
- memset(temp + d->sec_count[style] * 256, 0,
- SECTION_SIZE);
- d->section_table[style][s] = d->sec_count[style];
- d->sections[style] = temp;
- d->sec_count[style]++;
- }
-
- offset = d->section_table[style][s] * 256 + (id & 0xff);
- d->sections[style][offset] = e->index;
-
- return true;
-}
-
-
-static bool check_glyph_data_valid(int pos, char c)
-{
- int offset = pos % 11;
-
- if (pos == 44) {
- if (c != '\n') {
- LOG(LOG_ERROR, " Invalid glyph data: "
- "expecting '\\n', got '%c' (%i)\n",
- c, c);
- return false;
- } else {
- return true;
- }
- } else if (pos < 3) {
- if (c != ' ') {
- LOG(LOG_ERROR, " Invalid glyph data: "
- "expecting ' ', got '%c' (%i)\n",
- c, c);
- return false;
- } else {
- return true;
- }
- } else if (offset == 0) {
- if (c != '\n' && c != ' ') {
- LOG(LOG_ERROR, " Invalid glyph data: "
- "expecting '\\n' or ' ', "
- "got '%c' (%i)\n",
- c, c);
- return false;
- } else {
- return true;
- }
- } else if (offset < 3) {
- if (c != ' ') {
- LOG(LOG_ERROR, " Invalid glyph data: "
- "expecting ' ', got '%c' (%i)\n",
- c, c);
- return false;
- } else {
- return true;
- }
- } else if (offset >= 3 && pos < 11) {
- if (c != '.' && c != '#') {
- LOG(LOG_ERROR, " Invalid glyph data: "
- "expecting '.' or '#', "
- "got '%c' (%i)\n",
- c, c);
- return false;
- } else {
- return true;
- }
- }
-
- /* offset must be >=3 */
- if (c != '.' && c != '#' && c != ' ') {
- LOG(LOG_ERROR, " Invalid glyph data: "
- "expecting '.', '#', or ' ', "
- "got '%c' (%i)\n",
- c, c);
- return false;
- }
-
- return true;
-}
-
-#define SEVEN_SET ((1 << 0) | (1 << 1) | (1 << 2) | (1 << 3) | \
- (1 << 4) | (1 << 5) | (1 << 6))
-
-#define THREE_SSS ((1 << 0) | (1 << 1) | (1 << 2))
-#define THREE_S_S ((1 << 0) | (1 << 2))
-#define THREE__SS ((1 << 0) | (1 << 1) )
-#define THREE_SS_ ( (1 << 1) | (1 << 2))
-#define THREE_S__ (1 << 2)
-#define THREE__S_ (1 << 1)
-#define THREE___S (1 << 0)
-
-uint8_t frag[16][5] = {
- { THREE_SSS,
- THREE_S_S,
- THREE_S_S,
- THREE_S_S,
- THREE_SSS },
-
- { THREE__S_,
- THREE_SS_,
- THREE__S_,
- THREE__S_,
- THREE_SSS },
-
- { THREE_SS_,
- THREE___S,
- THREE__S_,
- THREE_S__,
- THREE_SSS },
-
- { THREE_SS_,
- THREE___S,
- THREE_SS_,
- THREE___S,
- THREE_SS_ },
-
- { THREE_S_S,
- THREE_S_S,
- THREE_SSS,
- THREE___S,
- THREE___S },
-
- { THREE_SSS,
- THREE_S__,
- THREE_SSS,
- THREE___S,
- THREE_SSS },
-
- { THREE__SS,
- THREE_S__,
- THREE_SSS,
- THREE_S_S,
- THREE_SSS },
-
- { THREE_SSS,
- THREE___S,
- THREE__S_,
- THREE__S_,
- THREE__S_ },
-
- { THREE_SSS,
- THREE_S_S,
- THREE_SSS,
- THREE_S_S,
- THREE_SSS },
-
- { THREE_SSS,
- THREE_S_S,
- THREE_SSS,
- THREE___S,
- THREE___S },
-
- { THREE__S_,
- THREE_S_S,
- THREE_SSS,
- THREE_S_S,
- THREE_S_S },
-
- { THREE_SS_,
- THREE_S_S,
- THREE_SS_,
- THREE_S_S,
- THREE_SS_ },
-
- { THREE__S_,
- THREE_S_S,
- THREE_S__,
- THREE_S_S,
- THREE__S_ },
-
- { THREE_SS_,
- THREE_S_S,
- THREE_S_S,
- THREE_S_S,
- THREE_SS_ },
-
- { THREE_SSS,
- THREE_S__,
- THREE_SS_,
- THREE_S__,
- THREE_SSS },
-
- { THREE_SSS,
- THREE_S__,
- THREE_SS_,
- THREE_S__,
- THREE_S__ }
-};
-
-void build_codepoint(int id, bool italic, uint8_t *code_point)
-{
- int shift = 0;
- int l;
- int r;
-
- if (!italic)
- shift = 1;
-
- l = (id >> 12);
- r = 0xf & (id >> 8);
-
- code_point[ 0] = 0;
- code_point[ 1] = SEVEN_SET << shift;
- code_point[ 2] = 0;
-
- code_point[ 3] = (frag[l][0] << (4 + shift)) | (frag[r][0] << shift);
- code_point[ 4] = (frag[l][1] << (4 + shift)) | (frag[r][1] << shift);
- code_point[ 5] = (frag[l][2] << (4 + shift)) | (frag[r][2] << shift);
- code_point[ 6] = (frag[l][3] << (4 + shift)) | (frag[r][3] << shift);
- code_point[ 7] = (frag[l][4] << (4 + shift)) | (frag[r][4] << shift);
-
- code_point[ 8] = 0;
-
- shift = 1;
-
- l = 0xf & (id >> 4);
- r = 0xf & id ;
-
- code_point[ 9] = (frag[l][0] << (4 + shift)) | (frag[r][0] << shift);
- code_point[10] = (frag[l][1] << (4 + shift)) | (frag[r][1] << shift);
- code_point[11] = (frag[l][2] << (4 + shift)) | (frag[r][2] << shift);
- code_point[12] = (frag[l][3] << (4 + shift)) | (frag[r][3] << shift);
- code_point[13] = (frag[l][4] << (4 + shift)) | (frag[r][4] << shift);
-
- code_point[14] = 0;
- code_point[15] = SEVEN_SET << shift;
-}
-
-#undef SEVEN_SET
-#undef THREE_SSS
-#undef THREE_S_S
-#undef THREE__SS
-#undef THREE_SS_
-#undef THREE_S__
-#undef THREE__S_
-#undef THREE___S
-
-static bool glyph_is_codepoint(const glyph_entry *e, int id, int style)
-{
- bool italic = false;
-
- if (style == 1 || style == 3) {
- italic = true;
- }
-
- build_codepoint(id, italic, code_point);
-
- return glyphs_match(code_point, e->data.u8);
-}
-
-
-static bool parse_glyph_data(struct parse_context *ctx, char c,
- struct font_data *d)
-{
- int glyph = ctx->data.in_gd.pos / 11;
- int g_pos = ctx->data.in_gd.pos % 11 - 3;
- uint8_t *row;
- bool ok;
- int i;
-
- /* Check that character is valid */
- if (check_glyph_data_valid(ctx->data.in_gd.pos, c) == false) {
- LOG(LOG_ERROR, " Error in U+%.4X data: "
- "glyph line: %i, pos: %i\n",
- ctx->id,
- ctx->data.in_gd.line,
- ctx->data.in_gd.pos);
- goto error;
- }
-
- /* Allocate glyph data if needed */
- if (ctx->data.in_gd.line == 0 &&
- (c == '.' || c == '#')) {
- if (ctx->data.in_gd.e[glyph] == NULL) {
- ctx->data.in_gd.e[glyph] =
- calloc(sizeof(struct glyph_entry), 1);
- if (ctx->data.in_gd.e[glyph] == NULL) {
- LOG(LOG_ERROR, " Couldn't allocate memory for "
- "glyph entry\n");
- goto error;
- }
-
- ctx->data.in_gd.styles |= 1 << glyph;
- }
- }
-
- /* Build glyph data */
- if (c == '#') {
- row = &ctx->data.in_gd.e[glyph]->data.u8[ctx->data.in_gd.line];
- *row += 1 << (7 - g_pos);
-
- ctx->data.in_gd.line_styles |= 1 << glyph;
- } else if (c == '.') {
- ctx->data.in_gd.line_styles |= 1 << glyph;
- }
-
- /* Deal with current position */
- if (c == '\n') {
- if (ctx->data.in_gd.line == 0) {
- if (ctx->data.in_gd.e[0] == NULL) {
- LOG(LOG_ERROR, " Error in U+%.4X data: "
- "\"Regular\" glyph style must "
- "be present\n", ctx->id);
- goto error;
- }
- } else if (ctx->data.in_gd.styles !=
- ctx->data.in_gd.line_styles) {
- LOG(LOG_ERROR, " Error in U+%.4X data: "
- "glyph line: %i "
- "styles don't match first line\n",
- ctx->id,
- ctx->data.in_gd.line);
- goto error;
- }
-
- ctx->data.in_gd.pos = 0;
- ctx->data.in_gd.line++;
- ctx->data.in_gd.line_styles = 0;
- } else {
- ctx->data.in_gd.pos++;
- }
-
- /* If we've got all the glyph data, tidy up and advance state */
- if (ctx->data.in_gd.line == 16) {
- for (i = 0; i < 4; i++) {
- if (ctx->data.in_gd.e[i] != NULL) {
- ctx->count[i] += 1;
- if (glyph_is_codepoint(ctx->data.in_gd.e[i],
- ctx->id, i)) {
- LOG(LOG_DEBUG, " U+%.4X (%s) is "
- "codepoint\n",
- ctx->id,
- short_labels[i]);
- ctx->codepoints += 1;
- free(ctx->data.in_gd.e[i]);
- ctx->data.in_gd.e[i] = NULL;
- continue;
- }
-
- ok = add_glyph_to_data(ctx->data.in_gd.e[i],
- ctx->id, i, d);
- if (!ok) {
- goto error;
- }
- }
- }
-
- ctx->data.before_id.new_line = false;
- ctx->data.before_id.u = false;
- ctx->state = BEFORE_ID;
- }
-
- return true;
-
-error:
-
- for (i = 0; i < 4; i++) {
- free(ctx->data.in_gd.e[i]);
- }
-
- return false;
-}
-
-static void parse_init(struct parse_context *ctx)
-{
- memset(ctx, 0, sizeof(struct parse_context));
-}
-
-static bool get_hex_digit_value(char c, int *v)
-{
- if (c >= '0' && c <= '9')
- *v = (c - '0');
- else if (c >= 'A' && c <= 'F')
- *v = (10 + c - 'A');
- else {
- LOG(LOG_ERROR, "Invalid hex digit '%c' (%i)\n", c, c);
- return false;
- }
-
- return true;
-}
-
-static bool assemble_codepoint(const char* c, int n, int *id)
-{
- bool ok;
- int v;
-
- ok = get_hex_digit_value(*c, &v);
- if (!ok) {
- return false;
- }
-
- *id += v << (4 * (3 - n));
-
- return true;
-}
-
-static bool parse_chunk(struct parse_context *ctx, const char *buf, size_t len,
- struct font_data *d)
-{
- int i;
- bool ok;
- int count[4];
- const char *pos = buf;
- const char *end = buf + len;
-
- for (i = 0; i < 4; i++) {
- count[i] = ctx->count[i];
- }
-
- while (pos < end) {
- if (*pos == '\r') {
- LOG(LOG_ERROR, "Detected \'\\r\': Bad line ending\n");
- return false;
- }
-
- switch (ctx->state) {
- case START:
- if (*pos != '*') {
- LOG(LOG_ERROR, "First character must be '*'\n");
- printf("Got: %c (%i)\n", *pos, *pos);
- return false;
- }
- d->header_len = 0;
- ctx->data.in_header.new_line = true;
- ctx->state = IN_HEADER;
-
- /* Fall through */
- case IN_HEADER:
- if (ctx->data.in_header.new_line == true) {
- if (*pos != '*') {
- LOG(LOG_INFO, " Got header "
- "(%i bytes)\n",
- d->header_len);
- LOG(LOG_DEBUG, " Header:\n\n%.*s\n",
- d->header_len,
- d->header);
- ctx->data.before_id.new_line = false;
- ctx->data.before_id.u = false;
- ctx->state = BEFORE_ID;
- continue;
- } else if (*pos == '*') {
- d->header[d->header_len++] = ' ';
- }
- ctx->data.in_header.new_line = false;
-
- } else if (*pos == '\n') {
- ctx->data.in_header.new_line = true;
- }
-
- if (d->header_len == HEADER_MAX) {
- LOG(LOG_ERROR, " Header too long "
- "(>%i bytes)\n",
- d->header_len);
- return false;
- }
-
- d->header[d->header_len++] = *pos;
- break;
-
- case BEFORE_ID:
- if (*pos == '+' &&
- ctx->data.before_id.new_line == true &&
- ctx->data.before_id.u == true) {
- ctx->data.g_id.c = 0;
- ctx->id = 0;
- ctx->state = GLYPH_ID;
- break;
-
- } else if (*pos == 'U' &&
- ctx->data.before_id.new_line == true) {
- ctx->data.before_id.u = true;
-
- } else if (*pos == '\n') {
- ctx->data.before_id.new_line = true;
- ctx->data.before_id.u = false;
-
- } else {
- ctx->data.before_id.new_line = false;
- ctx->data.before_id.u = false;
- }
- break;
-
- case GLYPH_ID:
- ok = assemble_codepoint(pos, ctx->data.g_id.c++,
- &ctx->id);
- if (!ok) {
- LOG(LOG_ERROR, " Invalid glyph ID\n");
- return false;
- }
-
- if (ctx->data.g_id.c == 4) {
- ctx->data.before_gd.new_line = false;
- ctx->data.before_gd.prev_h = false;
- ctx->data.before_gd.prev_s = false;
- ctx->data.before_gd.c = 0;
- ctx->state = BEFORE_GLYPH_DATA;
- break;
- }
- break;
-
- case BEFORE_GLYPH_DATA:
- /* Skip until end of dashed line */
- if (*pos == '\n' && ctx->data.before_gd.c == 53) {
- ctx->state = IN_GLYPH_DATA;
- ctx->data.in_gd.e[0] = NULL;
- ctx->data.in_gd.e[1] = NULL;
- ctx->data.in_gd.e[2] = NULL;
- ctx->data.in_gd.e[3] = NULL;
- ctx->data.in_gd.line = 0;
- ctx->data.in_gd.pos = 0;
- ctx->data.in_gd.line_styles = 0;
- ctx->data.in_gd.styles = 0;
- break;
-
- } else if (*pos == '\n') {
- ctx->data.before_gd.new_line = true;
- ctx->data.before_gd.prev_h = false;
- ctx->data.before_gd.prev_s = false;
- ctx->data.before_gd.c = 0;
- } else if (*pos == '-' &&
- ctx->data.before_gd.new_line == true) {
- assert(ctx->data.before_gd.c == 0);
- ctx->data.before_gd.new_line = false;
- ctx->data.before_gd.c++;
- ctx->data.before_gd.prev_h = true;
- } else if (*pos == ' ' &&
- ctx->data.before_gd.prev_h == true) {
- assert(ctx->data.before_gd.prev_s == false);
- ctx->data.before_gd.c++;
- ctx->data.before_gd.prev_h = false;
- ctx->data.before_gd.prev_s = true;
- } else if (*pos == '-' &&
- ctx->data.before_gd.prev_s == true) {
- assert(ctx->data.before_gd.prev_h == false);
- ctx->data.before_gd.c++;
- ctx->data.before_gd.prev_h = true;
- ctx->data.before_gd.prev_s = false;
- } else {
- ctx->data.before_gd.new_line = false;
- ctx->data.before_gd.prev_h = false;
- ctx->data.before_gd.prev_s = false;
- ctx->data.before_gd.c = 0;
- }
- break;
-
- case IN_GLYPH_DATA:
- ok = parse_glyph_data(ctx, *pos, d);
- if (!ok) {
- return false;
- }
-
- break;
- }
-
- pos++;
- }
-
- for (i = 0; i < 4; i++) {
- LOG(LOG_DEBUG, " %s: %i gylphs\n", labels[i],
- ctx->count[i] - count[i]);
- }
-
- return true;
-}
-
-
-bool load_font(const char *path, struct font_data **data)
-{
- struct parse_context ctx;
- struct font_data *d;
- size_t file_len;
- size_t done;
- size_t len;
- int count;
- char *buf;
- FILE *fp;
- bool ok;
- int i;
-
- *data = NULL;
-
- fp = fopen(path, "rb");
- if (fp == NULL) {
- LOG(LOG_ERROR, "Couldn't open font data file\n");
- return false;
- }
-
- d = calloc(sizeof(struct font_data), 1);
- if (d == NULL) {
- LOG(LOG_ERROR, "Couldn't allocate memory for font data\n");
- fclose(fp);
- return false;
- }
-
- /* Find filesize */
- fseek(fp, 0L, SEEK_END);
- file_len = ftell(fp);
- if (file_len == -1) {
- LOG(LOG_ERROR, "Could not size input file\n");
- free(d);
- fclose(fp);
- return false;
- }
- fseek(fp, 0L, SEEK_SET);
- LOG(LOG_DEBUG, "Input size: %zu bytes\n", file_len);
-
- /* Allocate buffer for data chunks */
- buf = malloc(CHUNK_SIZE);
- if (buf == NULL) {
- LOG(LOG_ERROR, "Couldn't allocate memory for input buffer\n");
- free(d);
- fclose(fp);
- return false;
- }
-
- /* Initialise parser */
- parse_init(&ctx);
-
- LOG(LOG_DEBUG, "Using chunk size of %i bytes\n", CHUNK_SIZE);
-
- /* Parse the input file in chunks */
- for (done = 0; done < file_len; done += CHUNK_SIZE) {
- LOG(LOG_INFO, "Parsing input chunk %zu\n", done / CHUNK_SIZE);
-
- /* Read chunk */
- len = fread(buf, 1, CHUNK_SIZE, fp);
- if (file_len - done < CHUNK_SIZE &&
- len != file_len - done) {
- LOG(LOG_WARNING, "Last chunk has suspicious size\n");
- } else if (file_len - done >= CHUNK_SIZE &&
- len != CHUNK_SIZE) {
- LOG(LOG_ERROR, "Problem reading file\n");
- free(buf);
- free(d);
- fclose(fp);
- return false;
- }
-
- /* Parse chunk */
- ok = parse_chunk(&ctx, buf, len, d);
- if (!ok) {
- free(buf);
- free(d);
- fclose(fp);
- return false;
- }
- LOG(LOG_DEBUG, "Parsed %zu bytes\n", done + len);
- }
-
- fclose(fp);
-
- if (ctx.state != BEFORE_ID) {
- LOG(LOG_ERROR, "Unexpected end of file\n");
- free(buf);
- free(d);
- return false;
- }
-
- LOG(LOG_INFO, "Parsing complete:\n");
- count = 0;
- for (i = 0; i < 4; i++) {
- LOG(LOG_INFO, " %s: %i gylphs\n", labels[i], ctx.count[i]);
- count += ctx.count[i];
- }
-
- LOG(LOG_RESULT, " Total %i gylphs "
- "(of which %i unique, %i codepoints, %i duplicates)\n",
- count, d->glyphs, ctx.codepoints,
- count - d->glyphs - ctx.codepoints);
-
- free(buf);
-
- *data = d;
- return true;
-}
-
-static void log_usage(const char *argv0)
-{
- level = LOG_INFO;
- LOG(LOG_INFO,
- "Usage:\n"
- "\t%s [options] <in_file> <out_file>\n"
- "\n"
- "Options:\n"
- "\t--help -h Display this text\n"
- "\t--quiet -q Don't show warnings\n"
- "\t--verbose -v Verbose output\n"
- "\t--debug -d Full debug output\n",
- argv0);
-}
-
-int main(int argc, char** argv)
-{
- const char *in_path = NULL;
- const char *out_path = NULL;
- char *header_path = NULL;
- struct font_data *data;
- bool ok;
- int i;
- int opt;
-
- level = LOG_RESULT;
-
- /* Handle program arguments */
- struct option long_options[] = {
- { "help", no_argument, NULL, 'h' },
- { "quiet", no_argument, NULL, 'q' },
- { "verbose", no_argument, NULL, 'v' },
- { "debug", no_argument, NULL, 'd' },
- { "header", required_argument, NULL, 'H' },
- };
-
- while ((opt = getopt_long(argc, argv, "hqvdH:", long_options, NULL)) != -1) {
- switch (opt) {
- case 'q':
- level = LOG_WARNING;
- break;
-
- case 'v':
- level = LOG_INFO;
- break;
-
- case 'd':
- level = LOG_DEBUG;
- break;
-
- case 'H':
- header_path = strdup(optarg);
- break;
-
- case 'h':
- log_usage(argv[0]);
- free(header_path);
- return EXIT_SUCCESS;
-
- default:
- log_usage(argv[0]);
- free(header_path);
- return EXIT_FAILURE;
- }
- }
-
- if ((argc - optind) < 2) {
- log_usage(argv[0]);
- free(header_path);
- return EXIT_FAILURE;
- }
-
- in_path = argv[optind];
- out_path = argv[optind + 1];
-
- LOG(LOG_DEBUG, "Using input path: \"%s\"\n", in_path);
- LOG(LOG_DEBUG, "Using output path: \"%s\"\n", out_path);
-
- ok = load_font(in_path, &data);
- if (!ok) {
- free_table();
- free(header_path);
- return EXIT_FAILURE;
- }
-
- ok = generate_font_source(out_path, data);
- if (ok && (header_path != NULL)) {
- ok = generate_font_header(header_path, data);
- }
- free(header_path);
- free_table();
- for (i = 0; i < 4; i++) {
- free(data->sections[i]);
- }
- free(data);
- if (!ok) {
- return EXIT_FAILURE;
- }
-
- return EXIT_SUCCESS;
-}
diff --git a/frontends/framebuffer/convert_image.c b/frontends/framebuffer/convert_image.c
deleted file mode 100644
index de772fc29..000000000
--- a/frontends/framebuffer/convert_image.c
+++ /dev/null
@@ -1,304 +0,0 @@
-/*
- * Copyright 2009 Daniel Silverstone <dsilvers@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/>.
- */
-
-#include <stdbool.h>
-#include <errno.h>
-#include <stdio.h>
-#include <png.h>
-#include <stdlib.h>
-#include <string.h>
-
-#if PNG_LIBPNG_VER < 10209
-#define png_set_expand_gray_1_2_4_to_8(png) png_set_gray_1_2_4_to_8(png)
-#endif
-
-static png_structp png;
-static png_infop info;
-static int interlace;
-static size_t rowbytes;
-static int raw_width, raw_height;
-static int rowstride;
-static unsigned char *bitmap_data;
-static bool is_cursor = true;
-static int raw_hot_x, raw_hot_y;
-
-#define WIDTH (is_cursor?raw_width-1:raw_width)
-#define HEIGHT (is_cursor?raw_height-1:raw_height)
-
-#define HOT_X (is_cursor?raw_hot_x-1:0)
-#define HOT_Y (is_cursor?raw_hot_y-1:0)
-
-#define REAL(v) (is_cursor?v+1:v)
-
-#define PPIX_AT(x,y) ((bitmap_data + (rowstride * y)) + (x * 4))
-
-#define R_OFF 2
-#define G_OFF 1
-#define B_OFF 0
-#define A_OFF 3
-
-#define R_AT(x,y) *(PPIX_AT(x,y) + R_OFF)
-#define G_AT(x,y) *(PPIX_AT(x,y) + G_OFF)
-#define B_AT(x,y) *(PPIX_AT(x,y) + B_OFF)
-#define A_AT(x,y) *(PPIX_AT(x,y) + A_OFF)
-
-
-static void
-usage(void)
-{
- fprintf(stderr, "usage: fb_convert_image input.png output.inc varname\n");
-}
-
-
-static void
-detect_hotspot(void)
-{
- int i;
- int greenpixels = 0;
-
- for (i = 0; i < raw_width; ++i) {
- if (A_AT(i, 0) == 255) {
- if (G_AT(i, 0) == 255) {
- greenpixels++;
- raw_hot_x = i;
- }
- if ((B_AT(i, 0) != 0) || (R_AT(i, 0) != 0)) {
- is_cursor = false;
- return;
- }
- } else if (A_AT(i, 0) != 0) {
- is_cursor = false;
- return;
- }
- }
- if (greenpixels != 1) {
- is_cursor = false;
- return;
- }
-
- for (i = 0; i < raw_height; ++i) {
- if (A_AT(0, i) == 255) {
- if (G_AT(0, i) == 255) {
- greenpixels++;
- raw_hot_y = i;
- }
- if ((B_AT(0, i) != 0) || (R_AT(0, i) != 0)) {
- is_cursor = false;
- return;
- }
- } else if (A_AT(0, i) != 0) {
- is_cursor = false;
- return;
- }
- }
- if (greenpixels != 2) {
- is_cursor = false;
- return;
- }
- printf(" Pointer detected. Adjusted hotspot at %d, %d (0-based)\n",
- raw_hot_x - 1, raw_hot_y - 1);
-}
-
-
-static void
-info_callback(png_structp png, png_infop info)
-{
- int bit_depth, color_type, interlace, intent;
- double gamma;
- png_uint_32 width, height;
-
- /* Read the PNG details */
- png_get_IHDR(png, info, &width, &height, &bit_depth,
- &color_type, &interlace, 0, 0);
-
- /* Set up our transformations */
- if (color_type == PNG_COLOR_TYPE_PALETTE)
- png_set_palette_to_rgb(png);
- if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8)
- png_set_expand_gray_1_2_4_to_8(png);
- if (png_get_valid(png, info, PNG_INFO_tRNS))
- png_set_tRNS_to_alpha(png);
- if (bit_depth == 16)
- png_set_strip_16(png);
- if (color_type == PNG_COLOR_TYPE_GRAY ||
- color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
- png_set_gray_to_rgb(png);
- if (!(color_type & PNG_COLOR_MASK_ALPHA))
- png_set_filler(png, 0xff, PNG_FILLER_AFTER);
- /* gamma correction - we use 2.2 as our screen gamma
- * this appears to be correct (at least in respect to !Browse)
- * see http://www.w3.org/Graphics/PNG/all_seven.html for a test case
- */
- if (png_get_sRGB(png, info, &intent))
- png_set_gamma(png, 2.2, 0.45455);
- else {
- if (png_get_gAMA(png, info, &gamma))
- png_set_gamma(png, 2.2, gamma);
- else
- png_set_gamma(png, 2.2, 0.45455);
- }
-
-
- png_read_update_info(png, info);
-
- rowbytes = png_get_rowbytes(png, info);
- interlace = (interlace == PNG_INTERLACE_ADAM7);
- raw_width = width;
- raw_height = height;
-
- rowstride = raw_width * 4;
- bitmap_data = malloc(rowstride * raw_height);
-}
-
-static unsigned int interlace_start[8] = {0, 16, 0, 8, 0, 4, 0};
-static unsigned int interlace_step[8] = {28, 28, 12, 12, 4, 4, 0};
-static unsigned int interlace_row_start[8] = {0, 0, 4, 0, 2, 0, 1};
-static unsigned int interlace_row_step[8] = {8, 8, 8, 4, 4, 2, 2};
-
-static void
-row_callback(png_structp png, png_bytep new_row,
- png_uint_32 row_num, int pass)
-{
- unsigned long i, j;
- unsigned int start, step;
- unsigned char *row = bitmap_data + (rowstride * row_num);
-
- if (new_row == 0)
- return;
-
- if (interlace) {
- start = interlace_start[pass];
- step = interlace_step[pass];
- row_num = interlace_row_start[pass] +
- interlace_row_step[pass] * row_num;
-
- /* Copy the data to our current row taking interlacing
- * into consideration */
- row = bitmap_data + (rowstride * row_num);
- for (j = 0, i = start; i < rowbytes; i += step) {
- row[i++] = new_row[j++];
- row[i++] = new_row[j++];
- row[i++] = new_row[j++];
- row[i++] = new_row[j++];
- }
- } else {
- memcpy(row, new_row, rowbytes);
- }
-}
-
-static void
-end_callback(png_structp png, png_infop info)
-{
-}
-
-
-int
-main(int argc, char **argv)
-{
- FILE *f;
- unsigned char buffer[1024];
- int br;
- int x, y, c;
-
- if (argc != 4) {
- usage();
- return 1;
- }
-
- printf(" CONVERT: %s (%s)\n", argv[1], argv[3]);
-
- png = png_create_read_struct(PNG_LIBPNG_VER_STRING, 0, 0, 0);
- info = png_create_info_struct(png);
-
- png_set_progressive_read_fn(png, NULL, info_callback, row_callback, end_callback);
-
- f = fopen(argv[1], "rb");
- if (f == NULL) {
- printf(" Unable to open %s\n", argv[1]);
- return 1;
- }
-
- do {
- br = fread(buffer, 1, 1024, f);
- if (br > 0) {
- png_process_data(png, info, buffer, br);
- }
- } while (br > 0);
-
- if (br < 0) {
- printf("Error reading input: %s\n", strerror(errno));
- fclose(f);
- return 1;
- }
-
- fclose(f);
-
- detect_hotspot();
-
- f = fopen(argv[2], "w");
- if (f == NULL) {
- printf(" Unable to open %s\n", argv[2]);
- return 2;
- }
-
- fprintf(f, "/* This file is auto-generated from %s\n", argv[1]);
- fprintf(f, " *\n * Do not edit this file directly.\n */\n\n");
- fprintf(f, "#include <sys/types.h>\n\n");
- fprintf(f, "#include <stdint.h>\n\n");
- fprintf(f, "#include <stdbool.h>\n\n");
- fprintf(f, "#include <libnsfb.h>\n\n");
- fprintf(f, "#include \"netsurf/plot_style.h\"\n");
- fprintf(f, "#include \"framebuffer/gui.h\"\n");
- fprintf(f, "#include \"framebuffer/fbtk.h\"\n\n");
-
- fprintf(f, "static uint8_t %s_pixdata[] = {\n", argv[3]);
- for (y = 0; y < HEIGHT; ++y) {
- unsigned char *rowptr = bitmap_data + (rowstride * y);
- if (is_cursor) {
- /* If it's a cursor, skip one row and one column */
- rowptr += rowstride + 4;
- }
- fprintf(f, "\t");
- for (x = 0; x < WIDTH; ++x) {
- for (c = 0; c < 4; ++c) {
- unsigned char b = *rowptr++;
- fprintf(f, "0x%02x, ", b);
- }
- }
- fprintf(f, "\n");
- }
- fprintf(f, "};\n\n");
-
- fprintf(f, "struct fbtk_bitmap %s = {\n", argv[3]);
- fprintf(f, "\t.width\t\t= %d,\n", WIDTH);
- fprintf(f, "\t.height\t\t= %d,\n", HEIGHT);
- fprintf(f, "\t.hot_x\t\t= %d,\n", HOT_X);
- fprintf(f, "\t.hot_y\t\t= %d,\n", HOT_Y);
- fprintf(f, "\t.pixdata\t= %s_pixdata,\n", argv[3]);
-
- fprintf(f, "};\n\n");
- fclose(f);
-
- return 0;
-}
-
-/*
- * Local Variables:
- * c-basic-offset:8
- * End:
- */
diff --git a/frontends/framebuffer/corewindow.c b/frontends/framebuffer/corewindow.c
index 93f88ff61..dbd8d013b 100644
--- a/frontends/framebuffer/corewindow.c
+++ b/frontends/framebuffer/corewindow.c
@@ -136,7 +136,7 @@ fb_cw_invalidate(struct core_window *cw, const struct rect *r)
}
-static void
+static nserror
fb_cw_update_size(struct core_window *cw, int width, int height)
{
/* struct fb_corewindow *fb_cw = (struct fb_corewindow *)cw;
@@ -144,41 +144,59 @@ fb_cw_update_size(struct core_window *cw, int width, int height)
toolkit_widget_set_size_request(FB_WIDGET(fb_cw->drawing_area),
width, height);
*/
+ return NSERROR_OK;
+}
+
+
+static nserror
+fb_cw_set_scroll(struct core_window *cw, int x, int y)
+{
+/* struct fb_corewindow *fb_cw = (struct fb_corewindow *)cw;
+
+ toolkit_scroll_widget(fb_cw->widget, r);
+*/
+ return NSERROR_OK;
}
-static void
-fb_cw_scroll_visible(struct core_window *cw, const struct rect *r)
+static nserror
+fb_cw_get_scroll(const struct core_window *cw, int *x, int *y)
{
/* struct fb_corewindow *fb_cw = (struct fb_corewindow *)cw;
toolkit_scroll_widget(fb_cw->widget, r);
*/
+ return NSERROR_NOT_IMPLEMENTED;
}
-static void
-fb_cw_get_window_dimensions(struct core_window *cw, int *width, int *height)
+static nserror
+fb_cw_get_window_dimensions(const 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);
+ return NSERROR_OK;
}
-static void
+static nserror
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;
+
+ return NSERROR_OK;
}
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,
+ .set_scroll = fb_cw_set_scroll,
+ .get_scroll = fb_cw_get_scroll,
.get_window_dimensions = fb_cw_get_window_dimensions,
.drag_status = fb_cw_drag_status
};
diff --git a/frontends/framebuffer/fbtk/event.c b/frontends/framebuffer/fbtk/event.c
index 84c6c3791..7a580911b 100644
--- a/frontends/framebuffer/fbtk/event.c
+++ b/frontends/framebuffer/fbtk/event.c
@@ -84,7 +84,7 @@ fbtk_click(fbtk_widget_t *widget, nsfb_event_t *event)
x = fbtk_get_absx(clicked);
y = fbtk_get_absy(clicked);
- NSLOG(netsurf, INFO, "clicked %p at %d,%d", clicked, x, y);
+ NSLOG(netsurf, DEEPDEBUG, "clicked %p at %d,%d", clicked, x, y);
/* post the click */
fbtk_post_callback(clicked, FBTK_CBT_CLICK, event, cloc.x0 - x, cloc.y0 - y);
diff --git a/frontends/framebuffer/fbtk/text.c b/frontends/framebuffer/fbtk/text.c
index 31417c2e0..9c96dcef4 100644
--- a/frontends/framebuffer/fbtk/text.c
+++ b/frontends/framebuffer/fbtk/text.c
@@ -71,7 +71,7 @@ fb_text_font_style(fbtk_widget_t *widget, int *font_height, int *padding,
#endif
font_style->family = PLOT_FONT_FAMILY_SANS_SERIF;
- font_style->size = px_to_pt(*font_height * FONT_SIZE_SCALE);
+ font_style->size = px_to_pt(*font_height * PLOT_STYLE_SCALE);
font_style->weight = 400;
font_style->flags = FONTF_NONE;
font_style->background = widget->bg;
@@ -388,6 +388,22 @@ text_input(fbtk_widget_t *widget, fbtk_callback_info *cbi)
}
break;
+ case NSFB_KEY_HOME:
+ if (widget->u.text.idx > 0) {
+ widget->u.text.idx = 0;
+
+ caret_moved = true;
+ }
+ break;
+
+ case NSFB_KEY_END:
+ if (widget->u.text.idx < widget->u.text.len) {
+ widget->u.text.idx = widget->u.text.len;
+
+ caret_moved = true;
+ }
+ break;
+
case NSFB_KEY_PAGEUP:
case NSFB_KEY_PAGEDOWN:
case NSFB_KEY_UP:
diff --git a/frontends/framebuffer/fetch.h b/frontends/framebuffer/fetch.h
index 718b08300..d00f3aa21 100644
--- a/frontends/framebuffer/fetch.h
+++ b/frontends/framebuffer/fetch.h
@@ -20,6 +20,6 @@
#ifndef NETSURF_FB_FETCH_H
#define NETSURF_FB_FETCH_H
-struct gui_fetch_table *framebuffer_fetch_table;
+extern struct gui_fetch_table *framebuffer_fetch_table;
#endif
diff --git a/frontends/framebuffer/findfile.c b/frontends/framebuffer/findfile.c
index 67312f452..fffff4687 100644
--- a/frontends/framebuffer/findfile.c
+++ b/frontends/framebuffer/findfile.c
@@ -17,29 +17,130 @@
*/
#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
#include "utils/filepath.h"
+#include "utils/log.h"
#include "framebuffer/findfile.h"
char **respaths; /** resource search path vector */
-/** Create an array of valid paths to search for resources.
+#define MAX_LANGV_SIZE 32
+
+/**
+ * goes through the environment in appropriate order to find configured language
+ *
+ * \return language to use or "C" if nothing appropriate is set
+ */
+static const char *get_language_env(void)
+{
+ const char *envstr;
+
+ envstr = getenv("LANGUAGE");
+ if ((envstr != NULL) && (envstr[0] != 0)) {
+ return envstr;
+ }
+
+ envstr = getenv("LC_ALL");
+ if ((envstr != NULL) && (envstr[0] != 0)) {
+ return envstr;
+ }
+
+ envstr = getenv("LC_MESSAGES");
+ if ((envstr != NULL) && (envstr[0] != 0)) {
+ return envstr;
+ }
+
+ envstr = getenv("LANG");
+ if ((envstr != NULL) && (envstr[0] != 0)) {
+ return envstr;
+ }
+
+ return "C";
+}
+
+/**
+ * build a string vector of language names
+ */
+static char **get_language_names(void)
+{
+ char **langv; /* output string vector of languages */
+ int langc; /* count of languages in vector */
+ const char *envlang; /* colon separated list of languages from environment */
+ int lstart = 0; /* offset to start of current language */
+ int lunder = 0; /* offset to underscore in current language */
+ int lend = 0; /* offset to end of current language */
+ char *nlang;
+
+ langv = calloc(MAX_LANGV_SIZE + 2, sizeof(char *));
+ if (langv == NULL) {
+ return NULL;
+ }
+
+ envlang = get_language_env();
+
+ for (langc = 0; langc < MAX_LANGV_SIZE; langc++) {
+ /* work through envlang splitting on : */
+ while ((envlang[lend] != 0) &&
+ (envlang[lend] != ':') &&
+ (envlang[lend] != '.')) {
+ if (envlang[lend] == '_') {
+ lunder = lend;
+ }
+ lend++;
+ }
+ /* place language in string vector */
+ nlang = malloc(lend - lstart + 1);
+ memcpy(nlang, envlang + lstart, lend - lstart);
+ nlang[lend - lstart] = 0;
+ langv[langc] = nlang;
+
+ /* add language without specialisation to vector */
+ if (lunder != lstart) {
+ nlang = malloc(lunder - lstart + 1);
+ memcpy(nlang, envlang + lstart, lunder - lstart);
+ nlang[lunder - lstart] = 0;
+ langv[++langc] = nlang;
+ }
+
+ /* if we stopped at the dot, move to the colon delimiter */
+ while ((envlang[lend] != 0) &&
+ (envlang[lend] != ':')) {
+ lend++;
+ }
+ if (envlang[lend] == 0) {
+ /* reached end of environment language list */
+ break;
+ }
+ lend++;
+ lstart = lunder = lend;
+ }
+ return langv;
+}
+
+/**
+ * Create an array of valid paths to search for resources.
*
* The idea is that all the complex path computation to find resources
* is performed here, once, rather than every time a resource is
* searched for.
*/
char **
-fb_init_resource(const char *resource_path)
+fb_init_resource_path(const char *resource_path)
{
char **pathv; /* resource path string vector */
char **respath; /* resource paths vector */
- const char *lang = NULL;
+ char **langv;
pathv = filepath_path_to_strvec(resource_path);
- respath = filepath_generate(pathv, &lang);
+ langv = get_language_names();
+
+ respath = filepath_generate(pathv, (const char * const *)langv);
+
+ filepath_free_strvec(langv);
filepath_free_strvec(pathv);
diff --git a/frontends/framebuffer/findfile.h b/frontends/framebuffer/findfile.h
index 1f3db6eb1..5e9e3186b 100644
--- a/frontends/framebuffer/findfile.h
+++ b/frontends/framebuffer/findfile.h
@@ -27,6 +27,6 @@ extern char **respaths;
* is performed here, once, rather than every time a resource is
* searched for.
*/
-char **fb_init_resource(const char *resource_path);
+char **fb_init_resource_path(const char *resource_path);
#endif /* NETSURF_FB_FINDFILE_H */
diff --git a/frontends/framebuffer/font_freetype.c b/frontends/framebuffer/font_freetype.c
index 9e47e4b99..3912821f7 100644
--- a/frontends/framebuffer/font_freetype.c
+++ b/frontends/framebuffer/font_freetype.c
@@ -29,7 +29,7 @@
#include "utils/nsoption.h"
#include "netsurf/utf8.h"
#include "netsurf/layout.h"
-#include "netsurf/browser_window.h"
+#include "netsurf/browser.h"
#include "netsurf/plot_style.h"
#include "framebuffer/gui.h"
@@ -392,7 +392,7 @@ static void fb_fill_scalar(const plot_font_style_t *fstyle, FTC_Scaler srec)
srec->face_id = (FTC_FaceID)fb_faces[selected_face];
- srec->width = srec->height = (fstyle->size * 64) / FONT_SIZE_SCALE;
+ srec->width = srec->height = (fstyle->size * 64) / PLOT_STYLE_SCALE;
srec->pixel = 0;
srec->x_res = srec->y_res = browser_get_dpi();
diff --git a/frontends/framebuffer/font_internal.c b/frontends/framebuffer/font_internal.c
index 3b8a1c43f..4d28c61ad 100644
--- a/frontends/framebuffer/font_internal.c
+++ b/frontends/framebuffer/font_internal.c
@@ -23,6 +23,7 @@
#include <stdlib.h>
#include "utils/nsoption.h"
+#include "utils/utils.h"
#include "utils/utf8.h"
#include "netsurf/utf8.h"
#include "netsurf/layout.h"
@@ -212,7 +213,7 @@ fb_get_font_size(const plot_font_style_t *fstyle)
{
int size = fstyle->size * 10 /
(((nsoption_int(font_min_size) * 3 +
- nsoption_int(font_size)) / 4) * FONT_SIZE_SCALE);
+ nsoption_int(font_size)) / 4) * PLOT_STYLE_SCALE);
if (size > 2)
size = 2;
else if (size <= 0)
@@ -270,6 +271,8 @@ fb_get_glyph(uint32_t ucs4, enum fb_font_style style, int scale)
break;
}
}
+ fallthrough;
+
case FB_BOLD:
section = fb_bold_section_table[ucs4 / 256];
if (section != 0 || ucs4 / 256 == 0) {
@@ -280,6 +283,8 @@ fb_get_glyph(uint32_t ucs4, enum fb_font_style style, int scale)
break;
}
}
+ fallthrough;
+
case FB_ITALIC:
section = fb_italic_section_table[ucs4 / 256];
if (section != 0 || ucs4 / 256 == 0) {
@@ -290,6 +295,8 @@ fb_get_glyph(uint32_t ucs4, enum fb_font_style style, int scale)
break;
}
}
+ fallthrough;
+
case FB_REGULAR:
section = fb_regular_section_table[ucs4 / 256];
if (section != 0 || ucs4 / 256 == 0) {
@@ -300,6 +307,8 @@ fb_get_glyph(uint32_t ucs4, enum fb_font_style style, int scale)
break;
}
}
+ fallthrough;
+
default:
glyph_data = get_codepoint(ucs4, style & FB_ITALIC);
break;
diff --git a/frontends/framebuffer/framebuffer.c b/frontends/framebuffer/framebuffer.c
index 2ccc75062..52afdbf5d 100644
--- a/frontends/framebuffer/framebuffer.c
+++ b/frontends/framebuffer/framebuffer.c
@@ -168,7 +168,7 @@ framebuffer_plot_line(const struct redraw_context *ctx,
}
pen.stroke_colour = style->stroke_colour;
- pen.stroke_width = style->stroke_width;
+ pen.stroke_width = plot_style_fixed_to_int(style->stroke_width);
nsfb_plot_line(nsfb, &rect, &pen);
}
@@ -216,7 +216,9 @@ framebuffer_plot_rectangle(const struct redraw_context *ctx,
dashed = true;
}
- nsfb_plot_rectangle(nsfb, &rect, style->stroke_width, style->stroke_colour, dotted, dashed);
+ nsfb_plot_rectangle(nsfb, &rect,
+ plot_style_fixed_to_int(style->stroke_width),
+ style->stroke_colour, dotted, dashed);
}
return NSERROR_OK;
}
@@ -259,7 +261,6 @@ framebuffer_plot_polygon(const struct redraw_context *ctx,
* \param pstyle Style controlling the path plot.
* \param p elements of path
* \param n nunber of elements on path
- * \param width The width of the path
* \param transform A transform to apply to the path.
* \return NSERROR_OK on success else error code.
*/
@@ -268,7 +269,6 @@ framebuffer_plot_path(const struct redraw_context *ctx,
const plot_style_t *pstyle,
const float *p,
unsigned int n,
- float width,
const float transform[6])
{
NSLOG(netsurf, INFO, "path unimplemented");
diff --git a/frontends/framebuffer/gui.c b/frontends/framebuffer/gui.c
index e252f25f3..689b63dc1 100644
--- a/frontends/framebuffer/gui.c
+++ b/frontends/framebuffer/gui.c
@@ -153,7 +153,7 @@ widget_scroll_y(struct gui_window *gw, int y, bool abs)
int content_width, content_height;
int height;
- NSLOG(netsurf, INFO, "window scroll");
+ NSLOG(netsurf, DEEPDEBUG, "window scroll");
if (abs) {
bwidget->pany = y - bwidget->scrolly;
} else {
@@ -237,7 +237,8 @@ fb_pan(fbtk_widget_t *widget,
height = fbtk_get_height(widget);
width = fbtk_get_width(widget);
- NSLOG(netsurf, INFO, "panning %d, %d", bwidget->panx, bwidget->pany);
+ NSLOG(netsurf, DEEPDEBUG, "panning %d, %d",
+ bwidget->panx, bwidget->pany);
x = fbtk_get_absx(widget);
y = fbtk_get_absy(widget);
@@ -357,7 +358,6 @@ fb_redraw(fbtk_widget_t *widget,
.plot = &fb_plotters
};
nsfb_t *nsfb = fbtk_get_nsfb(widget);
- float scale = browser_window_get_scale(bw);
x = fbtk_get_absx(widget);
y = fbtk_get_absy(widget);
@@ -377,8 +377,8 @@ fb_redraw(fbtk_widget_t *widget,
clip.y1 = bwidget->redraw_box.y1;
browser_window_redraw(bw,
- (x - bwidget->scrollx) / scale,
- (y - bwidget->scrolly) / scale,
+ x - bwidget->scrollx,
+ y - bwidget->scrolly,
&clip, &ctx);
if (fbtk_get_caret(widget, &caret_x, &caret_y, &caret_h)) {
@@ -450,13 +450,29 @@ static int fb_browser_window_destroy(fbtk_widget_t *widget,
return 0;
}
+static void
+framebuffer_surface_iterator(void *ctx, const char *name, enum nsfb_type_e type)
+{
+ const char *arg0 = ctx;
+ fprintf(stderr, "%s: %s\n", arg0, name);
+}
+
+static enum nsfb_type_e fetype = NSFB_SURFACE_COUNT;
static const char *fename;
static int febpp;
static int fewidth;
static int feheight;
static const char *feurl;
+static void
+framebuffer_pick_default_fename(void *ctx, const char *name, enum nsfb_type_e type)
+{
+ if (type < fetype) {
+ fename = name;
+ }
+}
+
static bool
process_cmdline(int argc, char** argv)
{
@@ -468,7 +484,8 @@ process_cmdline(int argc, char** argv)
NSLOG(netsurf, INFO, "argc %d, argv %p", argc, argv);
- fename = "sdl";
+ nsfb_enumerate_surface_types(framebuffer_pick_default_fename, NULL);
+
febpp = 32;
fewidth = nsoption_int(window_width);
@@ -508,7 +525,7 @@ process_cmdline(int argc, char** argv)
default:
fprintf(stderr,
- "Usage: %s [-f frontend] [-b bpp] url\n",
+ "Usage: %s [-f frontend] [-b bpp] [-w width] [-h height] <url>\n",
argv[0]);
return false;
}
@@ -518,6 +535,16 @@ process_cmdline(int argc, char** argv)
feurl = argv[optind];
}
+ if (nsfb_type_from_name(fename) == NSFB_SURFACE_NONE) {
+ if (strcmp(fename, "?") != 0) {
+ fprintf(stderr,
+ "%s: Unknown surface `%s`\n", argv[0], fename);
+ }
+ fprintf(stderr, "%s: Valid surface names are:\n", argv[0]);
+ nsfb_enumerate_surface_types(framebuffer_surface_iterator, argv[0]);
+ return false;
+ }
+
return true;
}
@@ -627,9 +654,8 @@ fb_browser_window_click(fbtk_widget_t *widget, fbtk_callback_info *cbi)
struct gui_window *gw = cbi->context;
struct browser_widget_s *bwidget = fbtk_get_userpw(widget);
browser_mouse_state mouse;
- float scale = browser_window_get_scale(gw->bw);
- int x = (cbi->x + bwidget->scrollx) / scale;
- int y = (cbi->y + bwidget->scrolly) / scale;
+ int x = cbi->x + bwidget->scrollx;
+ int y = cbi->y + bwidget->scrolly;
uint64_t time_now;
static struct {
enum { CLICK_SINGLE, CLICK_DOUBLE, CLICK_TRIPLE } type;
@@ -640,8 +666,8 @@ fb_browser_window_click(fbtk_widget_t *widget, fbtk_callback_info *cbi)
cbi->event->type != NSFB_EVENT_KEY_UP)
return 0;
- NSLOG(netsurf, INFO, "browser window clicked at %d,%d", cbi->x,
- cbi->y);
+ NSLOG(netsurf, DEEPDEBUG, "browser window clicked at %d,%d",
+ cbi->x, cbi->y);
switch (cbi->event->type) {
case NSFB_EVENT_KEY_DOWN:
@@ -666,15 +692,17 @@ fb_browser_window_click(fbtk_widget_t *widget, fbtk_callback_info *cbi)
case NSFB_KEY_MOUSE_4:
/* scroll up */
- if (browser_window_scroll_at_point(gw->bw, x, y,
- 0, -100) == false)
+ if (browser_window_scroll_at_point(gw->bw,
+ x, y,
+ 0, -100) == false)
widget_scroll_y(gw, -100, false);
break;
case NSFB_KEY_MOUSE_5:
/* scroll down */
- if (browser_window_scroll_at_point(gw->bw, x, y,
- 0, 100) == false)
+ if (browser_window_scroll_at_point(gw->bw,
+ x, y,
+ 0, 100) == false)
widget_scroll_y(gw, 100, false);
break;
@@ -782,9 +810,8 @@ fb_browser_window_move(fbtk_widget_t *widget, fbtk_callback_info *cbi)
browser_mouse_state mouse = 0;
struct gui_window *gw = cbi->context;
struct browser_widget_s *bwidget = fbtk_get_userpw(widget);
- float scale = browser_window_get_scale(gw->bw);
- int x = (cbi->x + bwidget->scrollx) / scale;
- int y = (cbi->y + bwidget->scrolly) / scale;
+ int x = cbi->x + bwidget->scrollx;
+ int y = cbi->y + bwidget->scrolly;
if (gui_drag.state == GUI_DRAG_PRESSED &&
(abs(x - gui_drag.x) > 5 ||
@@ -910,6 +937,27 @@ fb_browser_window_input(fbtk_widget_t *widget, fbtk_callback_info *cbi)
widget_scroll_y(gw, 100, false);
break;
+ case NSFB_KEY_MINUS:
+ if (modifier & FBTK_MOD_RCTRL ||
+ modifier & FBTK_MOD_LCTRL) {
+ browser_window_set_scale(gw->bw, -0.1, false);
+ }
+ break;
+
+ case NSFB_KEY_EQUALS: /* PLUS */
+ if (modifier & FBTK_MOD_RCTRL ||
+ modifier & FBTK_MOD_LCTRL) {
+ browser_window_set_scale(gw->bw, 0.1, false);
+ }
+ break;
+
+ case NSFB_KEY_0:
+ if (modifier & FBTK_MOD_RCTRL ||
+ modifier & FBTK_MOD_LCTRL) {
+ browser_window_set_scale(gw->bw, 1.0, true);
+ }
+ break;
+
case NSFB_KEY_RSHIFT:
modifier |= FBTK_MOD_RSHIFT;
break;
@@ -951,8 +999,8 @@ fb_browser_window_input(fbtk_widget_t *widget, fbtk_callback_info *cbi)
browser_window_key_press(gw->bw, NS_KEY_REDO);
break;
}
- /* Z or Y pressed but not undo or redo;
- * Fall through to default handling */
+ /* Z or Y pressed but not undo or redo; */
+ fallthrough;
default:
ucs4 = fbtk_keycode_to_ucs4(cbi->event->value.keycode,
@@ -1121,7 +1169,7 @@ fb_url_enter(void *pw, char *text)
error = nsurl_create(text, &url);
if (error != NSERROR_OK) {
- fb_warn_user(messages_get_errorcode(error), 0);
+ fb_warn_user("Errorcode:", messages_get_errorcode(error));
} else {
browser_window_navigate(bw, url, NULL, BW_NAVIGATE_HISTORY,
NULL, NULL, NULL);
@@ -1841,10 +1889,9 @@ static bool
gui_window_get_scroll(struct gui_window *g, int *sx, int *sy)
{
struct browser_widget_s *bwidget = fbtk_get_userpw(g->browser);
- float scale = browser_window_get_scale(g->bw);
- *sx = bwidget->scrollx / scale;
- *sy = bwidget->scrolly / scale;
+ *sx = bwidget->scrollx;
+ *sy = bwidget->scrolly;
return true;
}
@@ -1864,12 +1911,11 @@ static nserror
gui_window_set_scroll(struct gui_window *gw, const struct rect *rect)
{
struct browser_widget_s *bwidget = fbtk_get_userpw(gw->browser);
- float scale = browser_window_get_scale(gw->bw);
assert(bwidget);
- widget_scroll_x(gw, rect->x0 * scale, true);
- widget_scroll_y(gw, rect->y0 * scale, true);
+ widget_scroll_x(gw, rect->x0, true);
+ widget_scroll_y(gw, rect->y0, true);
return NSERROR_OK;
}
@@ -1881,23 +1927,14 @@ gui_window_set_scroll(struct gui_window *gw, const struct rect *rect)
* \param gw The gui window to measure content area of.
* \param width receives width of window
* \param height receives height of window
- * \param scaled whether to return scaled values
* \return NSERROR_OK on sucess and width and height updated.
*/
static nserror
-gui_window_get_dimensions(struct gui_window *gw,
- int *width,
- int *height,
- bool scaled)
+gui_window_get_dimensions(struct gui_window *gw, int *width, int *height)
{
*width = fbtk_get_width(gw->browser);
*height = fbtk_get_height(gw->browser);
- if (scaled) {
- float scale = browser_window_get_scale(gw->bw);
- *width /= scale;
- *height /= scale;
- }
return NSERROR_OK;
}
@@ -2077,6 +2114,38 @@ gui_window_remove_caret(struct gui_window *g)
}
}
+/**
+ * process miscellaneous window events
+ *
+ * \param gw The window receiving the event.
+ * \param event The event code.
+ * \return NSERROR_OK when processed ok
+ */
+static nserror
+gui_window_event(struct gui_window *gw, enum gui_window_event event)
+{
+ switch (event) {
+ case GW_EVENT_UPDATE_EXTENT:
+ gui_window_update_extent(gw);
+ break;
+
+ case GW_EVENT_REMOVE_CARET:
+ gui_window_remove_caret(gw);
+ break;
+
+ case GW_EVENT_START_THROBBER:
+ gui_window_start_throbber(gw);
+ break;
+
+ case GW_EVENT_STOP_THROBBER:
+ gui_window_stop_throbber(gw);
+ break;
+
+ default:
+ break;
+ }
+ return NSERROR_OK;
+}
static struct gui_window_table framebuffer_window_table = {
.create = gui_window_create,
@@ -2085,26 +2154,23 @@ static struct gui_window_table framebuffer_window_table = {
.get_scroll = gui_window_get_scroll,
.set_scroll = gui_window_set_scroll,
.get_dimensions = gui_window_get_dimensions,
- .update_extent = gui_window_update_extent,
+ .event = gui_window_event,
.set_url = gui_window_set_url,
.set_status = gui_window_set_status,
.set_pointer = gui_window_set_pointer,
.place_caret = gui_window_place_caret,
- .remove_caret = gui_window_remove_caret,
- .start_throbber = gui_window_start_throbber,
- .stop_throbber = gui_window_stop_throbber,
};
static struct gui_misc_table framebuffer_misc_table = {
.schedule = framebuffer_schedule,
- .warning = fb_warn_user,
.quit = gui_quit,
};
-/** Entry point from OS.
+/**
+ * Entry point from OS.
*
* /param argc The number of arguments in the string vector.
* /param argv The argument string vector.
@@ -2134,7 +2200,7 @@ main(int argc, char** argv)
die("NetSurf operation table failed registration");
}
- respaths = fb_init_resource(NETSURF_FB_RESPATH":"NETSURF_FB_FONTPATH);
+ respaths = fb_init_resource_path(NETSURF_FB_RESPATH":"NETSURF_FB_FONTPATH);
/* initialise logging. Not fatal if it fails but not much we
* can do about it either.
@@ -2200,7 +2266,7 @@ main(int argc, char** argv)
nsurl_unref(url);
}
if (ret != NSERROR_OK) {
- fb_warn_user(messages_get_errorcode(ret), 0);
+ fb_warn_user("Errorcode:", messages_get_errorcode(ret));
} else {
framebuffer_run();
diff --git a/frontends/framebuffer/local_history.c b/frontends/framebuffer/local_history.c
index cc45b1f29..c1963e2b1 100644
--- a/frontends/framebuffer/local_history.c
+++ b/frontends/framebuffer/local_history.c
@@ -205,6 +205,7 @@ nserror fb_local_history_present(fbtk_widget_t *parent,
fbtk_set_zorder(local_history_window->core.wnd, INT_MIN);
fbtk_set_mapping(local_history_window->core.wnd, true);
+ local_history_scroll_to_cursor(local_history_window->session);
}
return res;
diff --git a/frontends/framebuffer/res/Messages b/frontends/framebuffer/res/Messages
index 72c9eff90..75bfdf53d 120000
--- a/frontends/framebuffer/res/Messages
+++ b/frontends/framebuffer/res/Messages
@@ -1 +1 @@
-../../../!NetSurf/Resources/en/Messages \ No newline at end of file
+en/Messages \ No newline at end of file
diff --git a/frontends/framebuffer/res/adblock.css b/frontends/framebuffer/res/adblock.css
index ff2485622..0d12aaa7c 120000
--- a/frontends/framebuffer/res/adblock.css
+++ b/frontends/framebuffer/res/adblock.css
@@ -1 +1 @@
-../../../!NetSurf/Resources/AdBlock,f79 \ No newline at end of file
+../../../resources/adblock.css \ No newline at end of file
diff --git a/frontends/framebuffer/res/credits.html b/frontends/framebuffer/res/credits.html
index 1ba17392b..b43a1a06c 120000
--- a/frontends/framebuffer/res/credits.html
+++ b/frontends/framebuffer/res/credits.html
@@ -1 +1 @@
-../../../!NetSurf/Resources/en/credits.html,faf \ No newline at end of file
+../../../resources/en/credits.html \ No newline at end of file
diff --git a/frontends/framebuffer/res/de/welcome.html b/frontends/framebuffer/res/de/welcome.html
new file mode 120000
index 000000000..b77e23743
--- /dev/null
+++ b/frontends/framebuffer/res/de/welcome.html
@@ -0,0 +1 @@
+../../../../resources/de/welcome.html \ No newline at end of file
diff --git a/frontends/framebuffer/res/default.css b/frontends/framebuffer/res/default.css
index a8579eb7c..fa3ae6c26 120000
--- a/frontends/framebuffer/res/default.css
+++ b/frontends/framebuffer/res/default.css
@@ -1 +1 @@
-../../../!NetSurf/Resources/CSS,f79 \ No newline at end of file
+../../../resources/default.css \ No newline at end of file
diff --git a/frontends/framebuffer/res/en/credits.html b/frontends/framebuffer/res/en/credits.html
new file mode 120000
index 000000000..f73ecd4aa
--- /dev/null
+++ b/frontends/framebuffer/res/en/credits.html
@@ -0,0 +1 @@
+../../../../resources/en/credits.html \ No newline at end of file
diff --git a/frontends/framebuffer/res/en/licence.html b/frontends/framebuffer/res/en/licence.html
new file mode 120000
index 000000000..0c3b430b7
--- /dev/null
+++ b/frontends/framebuffer/res/en/licence.html
@@ -0,0 +1 @@
+../../../../resources/en/licence.html \ No newline at end of file
diff --git a/frontends/framebuffer/res/en/welcome.html b/frontends/framebuffer/res/en/welcome.html
new file mode 120000
index 000000000..543f31ddd
--- /dev/null
+++ b/frontends/framebuffer/res/en/welcome.html
@@ -0,0 +1 @@
+../../../../resources/en/welcome.html \ No newline at end of file
diff --git a/frontends/framebuffer/res/fonts/glyph_data b/frontends/framebuffer/res/fonts/glyph_data
index e02756646..3658021b5 100644
--- a/frontends/framebuffer/res/fonts/glyph_data
+++ b/frontends/framebuffer/res/fonts/glyph_data
@@ -5022,6 +5022,25 @@ U+2014 - EM DASH
........ ........ ........ ........
........ ........ ........ ........
-----------------------------------------------------
+U+2015 - HORIZONTAL BAR
+- - - - - - - - - - - - - - - - - - - - - - - - - - -
+ ........ ........ ........ ........
+ ........ ........ ........ ........
+ ........ ........ ........ ........
+ ........ ........ ........ ........
+ ........ ........ ........ ........
+ ........ ........ ........ ........
+ ######## ######## ........ ........
+ ######## ######## ######## ########
+ ........ ........ ######## ########
+ ........ ........ ........ ........
+ ........ ........ ........ ........
+ ........ ........ ........ ........
+ ........ ........ ........ ........
+ ........ ........ ........ ........
+ ........ ........ ........ ........
+ ........ ........ ........ ........
+-----------------------------------------------------
U+2018 - LEFT SINGLE QUOTATION MARK
- - - - - - - - - - - - - - - - - - - - - - - - - - -
........ ........ ........ ........
@@ -5421,6 +5440,82 @@ U+2193 - DOWNWARDS ARROW
........ ........ ........ ........
........ ........ ........ ........
-----------------------------------------------------
+U+2196 - NORTH WEST ARROW
+- - - - - - - - - - - - - - - - - - - - - - - - - - -
+ ........ ........ ........ ........
+ ........ ........ ........ ........
+ ........ ........ ........ ........
+ #######. .####### ........ ........
+ ######.. .######. #######. #######.
+ ####.... #####... ######.. #######.
+ ##.##... ##.##... #####... #####...
+ #..##... #..##... ##.###.. #####...
+ ...##... ....##.. ##.###.. ##.###..
+ ....##.. ....##.. ...###.. ...###..
+ .....##. .....##. ....###. ....###.
+ .....##. .....##. ....###. ....###.
+ ........ ........ ........ ........
+ ........ ........ ........ ........
+ ........ ........ ........ ........
+ ........ ........ ........ ........
+-----------------------------------------------------
+U+2197 - NORTH EAST ARROW
+- - - - - - - - - - - - - - - - - - - - - - - - - - -
+ ........ ........ ........ ........
+ ........ ........ ........ ........
+ ........ ........ ........ ........
+ ........ ........ ........ ........
+ ........ ........ ........ ........
+ .######. ..###### ........ ........
+ ..#####. ...##### .######. ..######
+ ...####. ....#### ..#####. ....####
+ ..##.##. ...##.## ..#####. ..######
+ ..##..#. ..##...# .###.##. ..###.##
+ ..##.... ..##.... .###.... .###....
+ .##..... .##..... .###.... .###....
+ ##...... ##...... ###..... ###.....
+ ##...... ##...... ###..... ###.....
+ ........ ........ ........ ........
+ ........ ........ ........ ........
+-----------------------------------------------------
+U+2198 - SOUTH EAST ARROW
+- - - - - - - - - - - - - - - - - - - - - - - - - - -
+ ........ ........ ........ ........
+ ........ ........ ........ ........
+ ........ ........ ........ ........
+ ........ ........ ........ ........
+ ##...... .##..... ###..... .###....
+ ##...... .##..... ###..... .###....
+ .##..... .##..... .###.... .###....
+ ..##.... .##..... .###.... .###....
+ ..##..#. ..##...# .###.##. ..###.##
+ ..##.##. ..##..## ..#####. ...#####
+ ...####. ...####. ..#####. ...####.
+ ..#####. ..#####. .######. .######.
+ .######. .######. ........ ........
+ ........ ........ ........ ........
+ ........ ........ ........ ........
+ ........ ........ ........ ........
+-----------------------------------------------------
+U+2199 - SOUTH WEST ARROW
+- - - - - - - - - - - - - - - - - - - - - - - - - - -
+ ........ ........ ........ ........
+ ........ ........ ........ ........
+ ........ ........ ........ ........
+ ........ ........ ........ ........
+ .....##. .....##. ....###. .....###
+ .....##. .....##. ....###. .....###
+ ....##.. ....##.. ...###.. ....###.
+ ...##... ....##.. ##.###.. ##.###..
+ #..##... #..##... ##.###.. ##.###..
+ ##.##... ##.##... #####... #####...
+ ####.... #####... ######.. ######..
+ ######.. .######. #######. #######.
+ #######. .####### ........ ........
+ ........ ........ ........ ........
+ ........ ........ ........ ........
+ ........ ........ ........ ........
+-----------------------------------------------------
U+21E6 - LEFTWARDS WHITE ARROW
- - - - - - - - - - - - - - - - - - - - - - - - - - -
........ ........ ........ ........
diff --git a/frontends/framebuffer/res/internal.css b/frontends/framebuffer/res/internal.css
index 17f9f1504..5583a9811 120000
--- a/frontends/framebuffer/res/internal.css
+++ b/frontends/framebuffer/res/internal.css
@@ -1 +1 @@
-../../../!NetSurf/Resources/internal.css,f79 \ No newline at end of file
+../../../resources/internal.css \ No newline at end of file
diff --git a/frontends/framebuffer/res/it/credits.html b/frontends/framebuffer/res/it/credits.html
new file mode 120000
index 000000000..2b7c99542
--- /dev/null
+++ b/frontends/framebuffer/res/it/credits.html
@@ -0,0 +1 @@
+../../../../resources/it/credits.html \ No newline at end of file
diff --git a/frontends/framebuffer/res/it/licence.html b/frontends/framebuffer/res/it/licence.html
new file mode 120000
index 000000000..92afce85b
--- /dev/null
+++ b/frontends/framebuffer/res/it/licence.html
@@ -0,0 +1 @@
+../../../../resources/it/licence.html \ No newline at end of file
diff --git a/frontends/framebuffer/res/ja/welcome.html b/frontends/framebuffer/res/ja/welcome.html
new file mode 120000
index 000000000..8b603f3df
--- /dev/null
+++ b/frontends/framebuffer/res/ja/welcome.html
@@ -0,0 +1 @@
+../../../../resources/ja/welcome.html \ No newline at end of file
diff --git a/frontends/framebuffer/res/licence.html b/frontends/framebuffer/res/licence.html
index 147dd6db2..c0c1e6630 120000
--- a/frontends/framebuffer/res/licence.html
+++ b/frontends/framebuffer/res/licence.html
@@ -1 +1 @@
-../../../!NetSurf/Resources/en/licence.html,faf \ No newline at end of file
+../../../resources/en/licence.html \ No newline at end of file
diff --git a/frontends/framebuffer/res/maps.html b/frontends/framebuffer/res/maps.html
deleted file mode 120000
index 28362130a..000000000
--- a/frontends/framebuffer/res/maps.html
+++ /dev/null
@@ -1 +0,0 @@
-../../../!NetSurf/Resources/en/welcome.html,faf \ No newline at end of file
diff --git a/frontends/framebuffer/res/netsurf.png b/frontends/framebuffer/res/netsurf.png
index 905512c25..d0ab72a5e 120000
--- a/frontends/framebuffer/res/netsurf.png
+++ b/frontends/framebuffer/res/netsurf.png
@@ -1 +1 @@
-../../../!NetSurf/Resources/netsurf.png,b60 \ No newline at end of file
+../../../resources/netsurf.png \ No newline at end of file
diff --git a/frontends/framebuffer/res/nl/credits.html b/frontends/framebuffer/res/nl/credits.html
new file mode 120000
index 000000000..71b27e40a
--- /dev/null
+++ b/frontends/framebuffer/res/nl/credits.html
@@ -0,0 +1 @@
+../../../../resources/nl/credits.html \ No newline at end of file
diff --git a/frontends/framebuffer/res/nl/licence.html b/frontends/framebuffer/res/nl/licence.html
new file mode 120000
index 000000000..5aaf1cb44
--- /dev/null
+++ b/frontends/framebuffer/res/nl/licence.html
@@ -0,0 +1 @@
+../../../../resources/nl/licence.html \ No newline at end of file
diff --git a/frontends/framebuffer/res/nl/welcome.html b/frontends/framebuffer/res/nl/welcome.html
new file mode 120000
index 000000000..ef7a97cc9
--- /dev/null
+++ b/frontends/framebuffer/res/nl/welcome.html
@@ -0,0 +1 @@
+../../../../resources/nl/welcome.html \ No newline at end of file
diff --git a/frontends/framebuffer/res/quirks.css b/frontends/framebuffer/res/quirks.css
index 88aabe48c..1e752cb9e 120000
--- a/frontends/framebuffer/res/quirks.css
+++ b/frontends/framebuffer/res/quirks.css
@@ -1 +1 @@
-../../../!NetSurf/Resources/Quirks,f79 \ No newline at end of file
+../../../resources/quirks.css \ No newline at end of file
diff --git a/frontends/framebuffer/res/welcome.html b/frontends/framebuffer/res/welcome.html
index 28362130a..d5220f90a 120000
--- a/frontends/framebuffer/res/welcome.html
+++ b/frontends/framebuffer/res/welcome.html
@@ -1 +1 @@
-../../../!NetSurf/Resources/en/welcome.html,faf \ No newline at end of file
+../../../resources/en/welcome.html \ No newline at end of file
diff --git a/frontends/gtk/Makefile b/frontends/gtk/Makefile
index 6c2f06f06..64a0872ba 100644
--- a/frontends/gtk/Makefile
+++ b/frontends/gtk/Makefile
@@ -11,6 +11,8 @@
NETSURF_FEATURE_RSVG_CFLAGS := -DWITH_RSVG
NETSURF_FEATURE_VIDEO_CFLAGS := -DWITH_VIDEO
+# determine if the rsvg library API version
+RSVG_API := $(shell $(PKG_CONFIG) --atleast-version=2.46 librsvg-2.0 && echo 246)
$(eval $(call pkg_config_find_and_add_enabled,RSVG,librsvg-2.0,SVG))
$(eval $(call pkg_config_find_and_add_enabled,VIDEO,gstreamer-0.10,Video))
@@ -32,13 +34,19 @@ ifeq ($(NETSURF_GTK_MAJOR),2)
GTKDEPFLAGS += -DGTK_DISABLE_DEPRECATED
endif
+# C library API control
+ifeq ($(HOST),FreeBSD)
+CAPIFLAGS :=
+else
+CAPIFLAGS := -D_XOPEN_SOURCE=700 \
+ -D_POSIX_C_SOURCE=200809L
+endif
GTKCFLAGS := -std=c99 -Dgtk -Dnsgtk -g \
$(GTKDEPFLAGS) \
+ $(CAPIFLAGS) \
-D_BSD_SOURCE \
-D_DEFAULT_SOURCE \
- -D_XOPEN_SOURCE=600 \
- -D_POSIX_C_SOURCE=200809L \
-D_NETBSD_SOURCE \
-DGTK_RESPATH=\"$(NETSURF_GTK_RES_PATH)\"
@@ -59,13 +67,7 @@ LDFLAGS += -lm
NSGTK_RESOURCES_DIR := $(FRONTEND_RESOURCES_DIR)
# The gtk binary target.
-ifeq ($(NETSURF_GTK_MAJOR),2)
- # gtk2 builds have no major suffix
- EXETARGET := nsgtk
-else
- # gtk3 and later builds use the major version suffix
- EXETARGET := nsgtk$(NETSURF_GTK_MAJOR)
-endif
+EXETARGET := nsgtk$(NETSURF_GTK_MAJOR)
# The filter and target for split messages
MESSAGES_FILTER=gtk
@@ -109,6 +111,7 @@ GLIB_COMPILE_RESOURCES := glib-compile-resources
CFLAGS += -DWITH_GRESOURCE
NETSURF_GRESOURCE_XML := $(NSGTK_RESOURCES_DIR)/netsurf.gresource.xml
+UI_GRESOURCE_XML := $(NSGTK_RESOURCES_DIR)/ui.gresource.xml
MESSAGES_GRESOURCE_XML := $(NSGTK_RESOURCES_DIR)/messages.gresource.xml
# generate the netsurf gresource source files
@@ -118,6 +121,13 @@ $(OBJROOT)/netsurf_gresource.c: $(NETSURF_GRESOURCE_XML) $(shell $(GLIB_COMPILE_
S_RESOURCE += $(OBJROOT)/netsurf_gresource.c
+# generate the ui gresource source files
+$(OBJROOT)/ui_gresource.c: $(UI_GRESOURCE_XML) $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir $(NSGTK_RESOURCES_DIR)/gtk$(NETSURF_GTK_MAJOR) --generate-dependencies $(UI_GRESOURCE_XML))
+ $(VQ)echo "GRESORCE: $<"
+ $(Q)$(GLIB_COMPILE_RESOURCES) --generate-source --sourcedir $(NSGTK_RESOURCES_DIR)/gtk$(NETSURF_GTK_MAJOR) --target=$@ $<
+
+S_RESOURCE += $(OBJROOT)/ui_gresource.c
+
# generate the messages gresource source file
$(OBJROOT)/messages_gresource.c: $(MESSAGES_GRESOURCE_XML) $(addsuffix /Messages,$(addprefix $(MESSAGES_TARGET)/,$(MESSAGES_LANGUAGES)))
$(VQ)echo "GRESORCE: $<"
@@ -164,12 +174,12 @@ endif
# ----------------------------------------------------------------------------
# S_FRONTEND are sources purely for the GTK frontend
-S_FRONTEND := gui.c schedule.c layout_pango.c bitmap.c plotters.c \
- scaffolding.c gdk.c completion.c login.c throbber.c \
- selection.c window.c fetch.c download.c menu.c print.c \
- search.c tabs.c toolbar.c gettext.c compat.c viewdata.c \
- viewsource.c preferences.c about.c resources.c corewindow.c \
- local_history.c global_history.c cookies.c hotlist.c ssl_cert.c
+S_FRONTEND := gui.c misc.c schedule.c layout_pango.c bitmap.c plotters.c \
+ scaffolding.c gdk.c completion.c throbber.c accelerator.c \
+ selection.c window.c fetch.c download.c menu.c print.c \
+ search.c tabs.c toolbar.c gettext.c compat.c viewdata.c \
+ viewsource.c preferences.c about.c resources.c corewindow.c \
+ local_history.c global_history.c cookies.c hotlist.c page_info.c
# This is the final source build list
# Note this is deliberately *not* expanded here as common and image
@@ -183,16 +193,15 @@ SOURCES = $(S_COMMON) $(S_IMAGE) $(S_BROWSER) $(S_RESOURCE) $(S_FRONTEND)
GTK_RESOURCES_LIST := \
languages SearchEngines ca-bundle.txt \
default.css adblock.css quirks.css internal.css \
- credits.html licence.html welcome.html maps.html Messages \
- default.ico favicon.png netsurf.png netsurf.xpm netsurf-16x16.xpm \
- arrow_down_8x32.png
+ credits.html licence.html welcome.html Messages \
+ default.ico favicon.png netsurf.png netsurf.xpm netsurf-16x16.xpm
GTK_RESOURCES_LIST := \
$(addprefix $(NSGTK_RESOURCES_DIR)/, $(GTK_RESOURCES_LIST)) \
- $(wildcard $(NSGTK_RESOURCES_DIR)/*.gtk$(NETSURF_GTK_MAJOR).ui)
+ $(wildcard $(NSGTK_RESOURCES_DIR)/gtk$(NETSURF_GTK_MAJOR)/*.ui)
# translations with more than just Messages files
-GTK_TRANSLATIONS_HTML := de en fr it ja nl
+GTK_TRANSLATIONS_HTML := de en fr it ja nl zh_CN
# destination for installed resources is the first entry in the gtk resource path
NSGTK_RESOURCES_DESTDIR := $(DESTDIR)$(word 1,$(subst :, ,$(NETSURF_GTK_RES_PATH)))
diff --git a/frontends/gtk/Makefile.tools b/frontends/gtk/Makefile.tools
new file mode 100644
index 000000000..5331dcc71
--- /dev/null
+++ b/frontends/gtk/Makefile.tools
@@ -0,0 +1,16 @@
+# -*- mode: makefile-gmake -*-
+##
+## tool setup for the gtk target
+##
+
+# use native package config
+PKG_CONFIG := pkg-config
+
+# gtk target processing
+ifeq ($(SUBTARGET),3)
+ override NETSURF_GTK_MAJOR := 3
+endif
+
+ifeq ($(SUBTARGET),2)
+ override NETSURF_GTK_MAJOR := 2
+endif
diff --git a/frontends/gtk/accelerator.c b/frontends/gtk/accelerator.c
new file mode 100644
index 000000000..11b7fb1d0
--- /dev/null
+++ b/frontends/gtk/accelerator.c
@@ -0,0 +1,79 @@
+/*
+ * Copyright 2018 Vincent Sanders <vince@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
+ * GTK accelerator support
+ *
+ */
+
+#include <stdint.h>
+#include <gtk/gtk.h>
+
+#include "utils/log.h"
+#include "utils/errors.h"
+#include "utils/hashtable.h"
+
+#include "gtk/resources.h"
+#include "gtk/accelerator.h"
+
+/** acclelerators are stored in a fixed-size hash table. */
+#define HASH_SIZE 53
+
+/** The hash table used to store the accelerators */
+static struct hash_table *accelerators_hash = NULL;
+
+nserror nsgtk_accelerator_init(char **respaths)
+{
+ nserror res;
+ const uint8_t *data;
+ size_t data_size;
+
+ if (accelerators_hash == NULL) {
+ accelerators_hash = hash_create(HASH_SIZE);
+ }
+ if (accelerators_hash == NULL) {
+ NSLOG(netsurf, INFO, "Unable to create hash table");
+ return NSERROR_NOMEM;
+ }
+
+ res = nsgtk_data_from_resname("accelerators", &data, &data_size);
+ if (res == NSERROR_OK) {
+ res = hash_add_inline(accelerators_hash, data, data_size);
+ } else {
+ const char *accelerators_path;
+ /* Obtain path to accelerators */
+ res = nsgtk_path_from_resname("accelerators",
+ &accelerators_path);
+ if (res == NSERROR_OK) {
+ res = hash_add_file(accelerators_hash,
+ accelerators_path);
+ }
+ }
+
+ return res;
+}
+
+const char *nsgtk_accelerator_get_desc(const char *key)
+{
+ if ((key == NULL) ||
+ (accelerators_hash == NULL)) {
+ return NULL;
+ }
+ return hash_get(accelerators_hash, key);
+}
diff --git a/frontends/gtk/accelerator.h b/frontends/gtk/accelerator.h
new file mode 100644
index 000000000..09c253eb9
--- /dev/null
+++ b/frontends/gtk/accelerator.h
@@ -0,0 +1,2 @@
+nserror nsgtk_accelerator_init(char **respaths);
+const char *nsgtk_accelerator_get_desc(const char *key);
diff --git a/frontends/gtk/bitmap.c b/frontends/gtk/bitmap.c
index 36b614cf9..a995a9e28 100644
--- a/frontends/gtk/bitmap.c
+++ b/frontends/gtk/bitmap.c
@@ -45,22 +45,25 @@
* Create a bitmap.
*
* \param width width of image in pixels
- * \param height width of image in pixels
- * \param state a flag word indicating the initial state
+ * \param height height of image in pixels
+ * \param flags flags for bitmap creation
* \return an opaque struct bitmap, or NULL on memory exhaustion
*/
-static void *bitmap_create(int width, int height, unsigned int state)
+static void *bitmap_create(int width, int height, enum gui_bitmap_flags flags)
{
struct bitmap *gbitmap;
+ if (width == 0 || height == 0) {
+ return NULL;
+ }
+
gbitmap = calloc(1, sizeof(struct bitmap));
if (gbitmap != NULL) {
- if ((state & BITMAP_OPAQUE) != 0) {
- gbitmap->surface = cairo_image_surface_create(CAIRO_FORMAT_RGB24, width, height);
- } else {
- gbitmap->surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, width, height);
+ if (flags & BITMAP_OPAQUE) {
+ gbitmap->opaque = true;
}
+ gbitmap->surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, width, height);
if (cairo_surface_status(gbitmap->surface) != CAIRO_STATUS_SUCCESS) {
cairo_surface_destroy(gbitmap->surface);
free(gbitmap);
@@ -81,76 +84,8 @@ static void *bitmap_create(int width, int height, unsigned int state)
static void bitmap_set_opaque(void *vbitmap, bool opaque)
{
struct bitmap *gbitmap = (struct bitmap *)vbitmap;
- cairo_format_t fmt;
- cairo_surface_t *nsurface = NULL;
-
- assert(gbitmap);
-
- fmt = cairo_image_surface_get_format(gbitmap->surface);
- if (fmt == CAIRO_FORMAT_RGB24) {
- if (opaque == false) {
- /* opaque to transparent */
- nsurface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32,
- cairo_image_surface_get_width(gbitmap->surface),
- cairo_image_surface_get_height(gbitmap->surface));
-
- }
-
- } else {
- if (opaque == true) {
- /* transparent to opaque */
- nsurface = cairo_image_surface_create(CAIRO_FORMAT_RGB24,
- cairo_image_surface_get_width(gbitmap->surface),
- cairo_image_surface_get_height(gbitmap->surface));
-
- }
- }
-
- if (nsurface != NULL) {
- if (cairo_surface_status(nsurface) != CAIRO_STATUS_SUCCESS) {
- cairo_surface_destroy(nsurface);
- } else {
- memcpy(cairo_image_surface_get_data(nsurface),
- cairo_image_surface_get_data(gbitmap->surface),
- cairo_image_surface_get_stride(gbitmap->surface) * cairo_image_surface_get_height(gbitmap->surface));
- cairo_surface_destroy(gbitmap->surface);
- gbitmap->surface = nsurface;
-
- cairo_surface_mark_dirty(gbitmap->surface);
-
- }
-
- }
-}
-
-
-/**
- * Tests whether a bitmap has an opaque alpha channel
- *
- * \param vbitmap a bitmap, as returned by bitmap_create()
- * \return whether the bitmap is opaque
- */
-static bool bitmap_test_opaque(void *vbitmap)
-{
- struct bitmap *gbitmap = (struct bitmap *)vbitmap;
- unsigned char *pixels;
- int pcount;
- int ploop;
-
- assert(gbitmap);
-
- pixels = cairo_image_surface_get_data(gbitmap->surface);
-
- pcount = cairo_image_surface_get_stride(gbitmap->surface) *
- cairo_image_surface_get_height(gbitmap->surface);
-
- for (ploop = 3; ploop < pcount; ploop += 4) {
- if (pixels[ploop] != 0xff) {
- return false;
- }
- }
- return true;
+ gbitmap->opaque = opaque;
}
@@ -162,16 +97,8 @@ static bool bitmap_test_opaque(void *vbitmap)
static bool bitmap_get_opaque(void *vbitmap)
{
struct bitmap *gbitmap = (struct bitmap *)vbitmap;
- cairo_format_t fmt;
- assert(gbitmap);
-
- fmt = cairo_image_surface_get_format(gbitmap->surface);
- if (fmt == CAIRO_FORMAT_RGB24) {
- return true;
- }
-
- return false;
+ return gbitmap->opaque;
}
@@ -187,83 +114,13 @@ static bool bitmap_get_opaque(void *vbitmap)
static unsigned char *bitmap_get_buffer(void *vbitmap)
{
struct bitmap *gbitmap = (struct bitmap *)vbitmap;
- int pixel_loop;
- int pixel_count;
uint8_t *pixels;
- uint32_t t, r, g, b;
- cairo_format_t fmt;
assert(gbitmap);
cairo_surface_flush(gbitmap->surface);
pixels = cairo_image_surface_get_data(gbitmap->surface);
- if (!gbitmap->converted)
- return pixels;
-
- fmt = cairo_image_surface_get_format(gbitmap->surface);
- pixel_count = cairo_image_surface_get_width(gbitmap->surface) *
- cairo_image_surface_get_height(gbitmap->surface);
-
- if (fmt == CAIRO_FORMAT_RGB24) {
- /* Opaque image */
- for (pixel_loop=0; pixel_loop < pixel_count; pixel_loop++) {
- /* Cairo surface is ARGB, written in native endian */
-#if G_BYTE_ORDER == G_LITTLE_ENDIAN
- b = pixels[4 * pixel_loop + 0];
- g = pixels[4 * pixel_loop + 1];
- r = pixels[4 * pixel_loop + 2];
- t = pixels[4 * pixel_loop + 3];
-#else
- t = pixels[4 * pixel_loop + 0];
- r = pixels[4 * pixel_loop + 1];
- g = pixels[4 * pixel_loop + 2];
- b = pixels[4 * pixel_loop + 3];
-#endif
-
- /* Core bitmaps always have a component order of rgba,
- * regardless of system endianness */
- pixels[4 * pixel_loop + 0] = r;
- pixels[4 * pixel_loop + 1] = g;
- pixels[4 * pixel_loop + 2] = b;
- pixels[4 * pixel_loop + 3] = t;
- }
- } else {
- /* Alpha image: de-multiply alpha */
- for (pixel_loop=0; pixel_loop < pixel_count; pixel_loop++) {
-#if G_BYTE_ORDER == G_LITTLE_ENDIAN
- b = pixels[4 * pixel_loop + 0];
- g = pixels[4 * pixel_loop + 1];
- r = pixels[4 * pixel_loop + 2];
- t = pixels[4 * pixel_loop + 3];
-#else
- t = pixels[4 * pixel_loop + 0];
- r = pixels[4 * pixel_loop + 1];
- g = pixels[4 * pixel_loop + 2];
- b = pixels[4 * pixel_loop + 3];
-#endif
-
- if (t != 0) {
- r = (r << 8) / t;
- g = (g << 8) / t;
- b = (b << 8) / t;
-
- r = (r > 255) ? 255 : r;
- g = (g > 255) ? 255 : g;
- b = (b > 255) ? 255 : b;
- } else {
- r = g = b = 0;
- }
-
- pixels[4 * pixel_loop + 0] = r;
- pixels[4 * pixel_loop + 1] = g;
- pixels[4 * pixel_loop + 2] = b;
- pixels[4 * pixel_loop + 3] = t;
- }
- }
-
- gbitmap->converted = false;
-
return (unsigned char *) pixels;
}
@@ -284,22 +141,6 @@ static size_t bitmap_get_rowstride(void *vbitmap)
/**
- * Find the bytes per pixel of a bitmap
- *
- * \param vbitmap a bitmap, as returned by bitmap_create()
- * \return bytes per pixel
- */
-static size_t bitmap_get_bpp(void *vbitmap)
-{
- struct bitmap *gbitmap = (struct bitmap *)vbitmap;
- assert(gbitmap);
-
- return 4;
-}
-
-
-
-/**
* Free a bitmap.
*
* \param vbitmap a bitmap, as returned by bitmap_create()
@@ -320,23 +161,6 @@ static void bitmap_destroy(void *vbitmap)
/**
- * Save a bitmap in the platform's native format.
- *
- * \param vbitmap a bitmap, as returned by bitmap_create()
- * \param path pathname for file
- * \param flags modify the behaviour of the save
- * \return true on success, false on error and error reported
- */
-static bool bitmap_save(void *vbitmap, const char *path, unsigned flags)
-{
- struct bitmap *gbitmap = (struct bitmap *)vbitmap;
- assert(gbitmap);
-
- return false;
-}
-
-
-/**
* The bitmap image has changed, so flush any persistant cache.
*
* \param vbitmap a bitmap, as returned by bitmap_create()
@@ -344,81 +168,10 @@ static bool bitmap_save(void *vbitmap, const char *path, unsigned flags)
static void bitmap_modified(void *vbitmap)
{
struct bitmap *gbitmap = (struct bitmap *)vbitmap;
- int pixel_loop;
- int pixel_count;
- uint8_t *pixels;
- uint32_t t, r, g, b;
- cairo_format_t fmt;
assert(gbitmap);
- fmt = cairo_image_surface_get_format(gbitmap->surface);
-
- pixel_count = cairo_image_surface_get_width(gbitmap->surface) *
- cairo_image_surface_get_height(gbitmap->surface);
- pixels = cairo_image_surface_get_data(gbitmap->surface);
-
- if (gbitmap->converted) {
- cairo_surface_mark_dirty(gbitmap->surface);
- return;
- }
-
- if (fmt == CAIRO_FORMAT_RGB24) {
- /* Opaque image */
- for (pixel_loop=0; pixel_loop < pixel_count; pixel_loop++) {
- /* Core bitmaps always have a component order of rgba,
- * regardless of system endianness */
- r = pixels[4 * pixel_loop + 0];
- g = pixels[4 * pixel_loop + 1];
- b = pixels[4 * pixel_loop + 2];
- t = pixels[4 * pixel_loop + 3];
-
- /* Cairo surface is ARGB, written in native endian */
-#if G_BYTE_ORDER == G_LITTLE_ENDIAN
- pixels[4 * pixel_loop + 0] = b;
- pixels[4 * pixel_loop + 1] = g;
- pixels[4 * pixel_loop + 2] = r;
- pixels[4 * pixel_loop + 3] = t;
-#else
- pixels[4 * pixel_loop + 0] = t;
- pixels[4 * pixel_loop + 1] = r;
- pixels[4 * pixel_loop + 2] = g;
- pixels[4 * pixel_loop + 3] = b;
-#endif
- }
- } else {
- /* Alpha image: pre-multiply alpha */
- for (pixel_loop=0; pixel_loop < pixel_count; pixel_loop++) {
- r = pixels[4 * pixel_loop + 0];
- g = pixels[4 * pixel_loop + 1];
- b = pixels[4 * pixel_loop + 2];
- t = pixels[4 * pixel_loop + 3];
-
- if (t != 0) {
- r = ((r * (t + 1)) >> 8) & 0xff;
- g = ((g * (t + 1)) >> 8) & 0xff;
- b = ((b * (t + 1)) >> 8) & 0xff;
- } else {
- r = g = b = 0;
- }
-
-#if G_BYTE_ORDER == G_LITTLE_ENDIAN
- pixels[4 * pixel_loop + 0] = b;
- pixels[4 * pixel_loop + 1] = g;
- pixels[4 * pixel_loop + 2] = r;
- pixels[4 * pixel_loop + 3] = t;
-#else
- pixels[4 * pixel_loop + 0] = t;
- pixels[4 * pixel_loop + 1] = r;
- pixels[4 * pixel_loop + 2] = g;
- pixels[4 * pixel_loop + 3] = b;
-#endif
- }
- }
-
cairo_surface_mark_dirty(gbitmap->surface);
-
- gbitmap->converted = true;
}
/* exported interface documented in gtk/bitmap.h */
@@ -478,6 +231,10 @@ bitmap_render(struct bitmap *bitmap, struct hlcache_handle *content)
* aspect ratio of the required thumbnail. */
cheight = ((cwidth * dheight) + (dwidth / 2)) / dwidth;
+ /* At this point, we MUST have decided to render something non-zero sized */
+ assert(cwidth > 0);
+ assert(cheight > 0);
+
/* Create surface to render into */
surface = cairo_surface_create_similar(dsurface, CAIRO_CONTENT_COLOR_ALPHA, cwidth, cheight);
@@ -526,13 +283,10 @@ static struct gui_bitmap_table bitmap_table = {
.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 = nsgtk_bitmap_get_width,
.get_height = nsgtk_bitmap_get_height,
- .get_bpp = bitmap_get_bpp,
- .save = bitmap_save,
.modified = bitmap_modified,
.render = bitmap_render,
};
diff --git a/frontends/gtk/bitmap.h b/frontends/gtk/bitmap.h
index 0f46d19a8..80a0e7a3a 100644
--- a/frontends/gtk/bitmap.h
+++ b/frontends/gtk/bitmap.h
@@ -26,7 +26,7 @@ extern struct gui_bitmap_table *nsgtk_bitmap_table;
struct bitmap {
cairo_surface_t *surface; /* original cairo surface */
cairo_surface_t *scsurface; /* scaled surface */
- bool converted; /** set if the surface data has been converted */
+ bool opaque;
};
int nsgtk_bitmap_get_width(void *vbitmap);
diff --git a/frontends/gtk/compat.c b/frontends/gtk/compat.c
index 4c5524b0e..bd3f46ee5 100644
--- a/frontends/gtk/compat.c
+++ b/frontends/gtk/compat.c
@@ -170,18 +170,18 @@ void nsgtk_entry_set_icon_from_pixbuf(GtkWidget *entry,
/* exported interface documented in gtk/compat.h */
-void nsgtk_entry_set_icon_from_stock(GtkWidget *entry,
- GtkEntryIconPosition icon_pos,
- const gchar *id)
+void nsgtk_entry_set_icon_from_icon_name(GtkWidget *entry,
+ GtkEntryIconPosition icon_pos,
+ const gchar *id)
{
#ifdef NSGTK_USE_ICON_NAME
gtk_entry_set_icon_from_icon_name(GTK_ENTRY(entry), icon_pos, id);
#else
#if GTK_CHECK_VERSION(2,16,0)
- gtk_entry_set_icon_from_stock(GTK_ENTRY(entry), icon_pos, id);
+ gtk_entry_set_icon_from_icon_name(GTK_ENTRY(entry), icon_pos, id);
#else
- GtkImage *image = GTK_IMAGE(gtk_image_new_from_stock(id,
- GTK_ICON_SIZE_LARGE_TOOLBAR));
+ GtkImage *image;
+ image = GTK_IMAGE(gtk_image_new_from_stock(id, GTK_ICON_SIZE_LARGE_TOOLBAR));
if (image != NULL) {
sexy_icon_entry_set_icon(SEXY_ICON_ENTRY(entry),
@@ -216,6 +216,17 @@ GtkWidget *nsgtk_button_new_from_stock(const gchar *stock_id)
}
/* exported interface documented in gtk/compat.h */
+void nsgtk_button_set_focus_on_click(GtkButton *button, gboolean focus_on_click)
+{
+#if GTK_CHECK_VERSION(3,20,0)
+ gtk_widget_set_focus_on_click(GTK_WIDGET(button), focus_on_click);
+#else
+ gtk_button_set_focus_on_click(button, focus_on_click);
+#endif
+}
+
+
+/* exported interface documented in gtk/compat.h */
gboolean nsgtk_stock_lookup(const gchar *stock_id, GtkStockItem *item)
{
#ifdef NSGTK_USE_ICON_NAME
@@ -234,12 +245,17 @@ void nsgtk_widget_override_background_color(GtkWidget *widget,
uint16_t b)
{
#if GTK_CHECK_VERSION(3,0,0)
+#if GTK_CHECK_VERSION(3,16,0)
+ /* do nothing - deprecated - must use css styling */
+ return;
+#else
GdkRGBA colour;
colour.alpha = (double)a / 0xffff;
colour.red = (double)r / 0xffff;
colour.green = (double)g / 0xffff;
colour.blue = (double)b / 0xffff;
gtk_widget_override_background_color(widget, state, &colour);
+#endif
#else
GdkColor colour;
colour.pixel = a;
@@ -403,15 +419,25 @@ GtkWidget *nsgtk_dialog_get_content_area(GtkDialog *dialog)
#endif
}
+#if GTK_CHECK_VERSION(3,22,0)
+#include "gtk/scaffolding.h"
+#endif
+
gboolean nsgtk_show_uri(GdkScreen *screen,
const gchar *uri,
guint32 timestamp,
GError **error)
{
#if GTK_CHECK_VERSION(2,14,0)
+#if GTK_CHECK_VERSION(3,22,0)
+ GtkWindow *parent;
+ parent = nsgtk_scaffolding_window(nsgtk_current_scaffolding());
+ return gtk_show_uri_on_window(parent, uri, timestamp,error);
+#else
return gtk_show_uri(screen, uri, timestamp, error);
+#endif
#else
- return FALSE; /* FIXME */
+ return FALSE; /** \todo add uri opening for before gtk 2.14 */
#endif
}
@@ -532,6 +558,17 @@ void nsgtk_image_menu_item_set_image(GtkWidget *image_menu_item, GtkWidget *imag
}
/* exported interface documented in gtk/compat.h */
+void nsgtk_menu_popup_at_pointer(GtkMenu *menu, const GdkEvent *trigger_event)
+{
+#if GTK_CHECK_VERSION(3,22,0)
+ gtk_menu_popup_at_pointer(menu, trigger_event);
+#else
+ gtk_menu_popup(menu, NULL, NULL, NULL, NULL, 0,
+ gtk_get_current_event_time());
+#endif
+}
+
+/* exported interface documented in gtk/compat.h */
gboolean nsgtk_icon_size_lookup_for_settings(GtkSettings *settings,
GtkIconSize size,
gint *width,
@@ -598,7 +635,9 @@ void nsgtk_widget_set_margins(GtkWidget *widget, gint hmargin, gint vmargin)
gtk_widget_set_margin_top(widget, vmargin);
gtk_widget_set_margin_bottom(widget, vmargin);
#else
- gtk_misc_set_padding(GTK_MISC(widget), hmargin, vmargin);
+ if (GTK_IS_MISC(widget)) {
+ gtk_misc_set_padding(GTK_MISC(widget), hmargin, vmargin);
+ }
#endif
}
diff --git a/frontends/gtk/compat.h b/frontends/gtk/compat.h
index 9554b0cba..3b2f55094 100644
--- a/frontends/gtk/compat.h
+++ b/frontends/gtk/compat.h
@@ -16,7 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/** \file
+/**
+ * \file
* Compatibility functions for older GTK versions (interface)
*/
@@ -40,9 +41,6 @@
#define NSGTK_STOCK_CANCEL "_Cancel"
#define NSGTK_STOCK_CLEAR "edit-clear"
#define NSGTK_STOCK_CLOSE "window-close"
-#define NSGTK_STOCK_FIND "edit-find"
-#define NSGTK_STOCK_GO_BACK "go-previous"
-#define NSGTK_STOCK_GO_FORWARD "go-next"
#define NSGTK_STOCK_HOME "go-home"
#define NSGTK_STOCK_INFO "dialog-information"
#define NSGTK_STOCK_REFRESH "view-refresh"
@@ -51,14 +49,12 @@
#define NSGTK_STOCK_STOP "process-stop"
#define NSGTK_STOCK_OK "_OK"
#define NSGTK_STOCK_OPEN "_Open"
+#define NSGTK_STOCK_OPEN_MENU "open-menu"
#else
#define NSGTK_STOCK_ADD GTK_STOCK_ADD
#define NSGTK_STOCK_CANCEL GTK_STOCK_CANCEL
#define NSGTK_STOCK_CLEAR GTK_STOCK_CLEAR
#define NSGTK_STOCK_CLOSE GTK_STOCK_CLOSE
-#define NSGTK_STOCK_FIND GTK_STOCK_FIND
-#define NSGTK_STOCK_GO_BACK GTK_STOCK_GO_BACK
-#define NSGTK_STOCK_GO_FORWARD GTK_STOCK_GO_FORWARD
#define NSGTK_STOCK_HOME GTK_STOCK_HOME
#define NSGTK_STOCK_INFO GTK_STOCK_INFO
#define NSGTK_STOCK_REFRESH GTK_STOCK_REFRESH
@@ -67,6 +63,7 @@
#define NSGTK_STOCK_STOP GTK_STOCK_STOP
#define NSGTK_STOCK_OK GTK_STOCK_OK
#define NSGTK_STOCK_OPEN GTK_STOCK_OPEN
+#define NSGTK_STOCK_OPEN_MENU GTK_STOCK_JUSTIFY_FILL
#endif
/* widget alignment only available since 3.0 */
@@ -80,6 +77,12 @@ typedef enum {
} GtkAlign;
#endif
+/* value init since gtk 2.30 */
+#ifndef G_VALUE_INIT
+#define G_VALUE_INIT { 0, { { 0 } } }
+#endif
+
+
/**
* Set the alignment of a widget.
*
@@ -153,6 +156,9 @@ GtkStateType nsgtk_widget_get_state(GtkWidget *widget);
typedef GtkStateType GtkStateFlags;
typedef GtkStyle GtkStyleContext;
+/* gtk 3 changed the enum name for the state flags */
+#define GTK_STATE_FLAG_NORMAL GTK_STATE_NORMAL
+
#if GTK_CHECK_VERSION(2,22,0)
enum {
GTK_IN_DESTRUCTION = 1 << 0,
@@ -167,16 +173,16 @@ enum {
/**
- * Sets the icon shown in the entry at the specified position from a
- * stock image.
+ * Sets the icon shown in the entry at the specified position from an
+ * icon name.
*
- * Compatability interface for original deprecated in GTK 3.10
+ * Compatability interface for original introduced in 2.16
*
* \param entry The entry widget to set the icon on.
* \param icon_pos The position of the icon.
* \param stock_id the name of the stock item.
*/
-void nsgtk_entry_set_icon_from_stock(GtkWidget *entry, GtkEntryIconPosition icon_pos, const gchar *stock_id);
+void nsgtk_entry_set_icon_from_icon_name(GtkWidget *entry, GtkEntryIconPosition icon_pos, const gchar *stock_id);
/**
* Creates a GtkImage displaying a stock icon.
@@ -209,6 +215,16 @@ GtkWidget *nsgtk_button_new_from_stock(const gchar *stock_id);
*/
gboolean nsgtk_stock_lookup(const gchar *stock_id, GtkStockItem *item);
+/**
+ * Sets whether the button will grab focus when it is clicked with the mouse.
+ *
+ * Compatability interface for original deprecated in GTK 3.20
+ *
+ * \param button The button alter
+ * \param focus_on_click whether the button grabs focus when clicked with the mouse
+ */
+void nsgtk_button_set_focus_on_click(GtkButton *button, gboolean focus_on_click);
+
void nsgtk_window_set_opacity(GtkWindow *window, gdouble opacity);
void nsgtk_scrolled_window_add_with_viewport(GtkScrolledWindow *window, GtkWidget *child);
@@ -268,6 +284,15 @@ GtkWidget *nsgtk_image_menu_item_new_with_mnemonic(const gchar *label);
*/
void nsgtk_image_menu_item_set_image(GtkWidget *image_menu_item, GtkWidget *image);
+/**
+ * Displays menu and makes it available for selection
+ *
+ * Compatability interface for gtk_menu_popup deprecated in GTK 3.22.
+ *
+ * \param image_menu_item The image menu entry item.
+ * \param trigger_event the GdkEvent that initiated this request or NULL if it's the current event.
+ */
+void nsgtk_menu_popup_at_pointer(GtkMenu *menu, const GdkEvent *trigger_event);
/**
* Parses a resource file containing a GtkBuilder UI definition and
diff --git a/frontends/gtk/completion.c b/frontends/gtk/completion.c
index eea0a789f..585a9e511 100644
--- a/frontends/gtk/completion.c
+++ b/frontends/gtk/completion.c
@@ -21,7 +21,7 @@
* Implementation of url entry completion.
*/
-#include <gtk/gtk.h>
+#include <stdlib.h>
#include "utils/log.h"
#include "utils/messages.h"
@@ -31,13 +31,27 @@
#include "netsurf/browser_window.h"
#include "desktop/searchweb.h"
+#include "gtk/compat.h"
#include "gtk/warn.h"
#include "gtk/scaffolding.h"
+#include "gtk/toolbar_items.h"
#include "gtk/window.h"
#include "gtk/completion.h"
GtkListStore *nsgtk_completion_list;
+struct nsgtk_completion_ctx {
+ /**
+ * callback to obtain a browser window for navigation
+ */
+ struct browser_window *(*get_bw)(void *ctx);
+
+ /**
+ * context passed to get_bw function
+ */
+ void *get_bw_ctx;
+};
+
/**
* completion row matcher
*/
@@ -51,7 +65,6 @@ static gboolean nsgtk_completion_match(GtkEntryCompletion *completion,
* are in the list should be shown.
*/
return TRUE;
-
}
@@ -78,14 +91,17 @@ static gboolean
nsgtk_completion_match_select(GtkEntryCompletion *widget,
GtkTreeModel *model,
GtkTreeIter *iter,
- gpointer user_data)
+ gpointer data)
{
- GValue value = {0, };
- struct nsgtk_scaffolding *g = user_data;
- struct browser_window *bw = nsgtk_get_browser_window(nsgtk_scaffolding_top_level(g));
+ struct nsgtk_completion_ctx *cb_ctx;
+ GValue value = G_VALUE_INIT;
+ struct browser_window *bw;
nserror ret;
nsurl *url;
+ cb_ctx = data;
+ bw = cb_ctx->get_bw(cb_ctx->get_bw_ctx);
+
gtk_tree_model_get_value(model, iter, 0, &value);
ret = search_web_omni(g_value_get_string(&value),
@@ -128,11 +144,20 @@ gboolean nsgtk_completion_update(GtkEntry *entry)
}
/* exported interface documented in completion.h */
-GtkEntryCompletion *nsgtk_url_entry_completion_new(struct nsgtk_scaffolding *gs)
+nserror
+nsgtk_completion_connect_signals(GtkEntry *entry,
+ struct browser_window *(*get_bw)(void *ctx),
+ void *get_bw_ctx)
{
GtkEntryCompletion *completion;
+ struct nsgtk_completion_ctx *cb_ctx;
+
+ cb_ctx = calloc(1, sizeof(struct nsgtk_completion_ctx));
+ cb_ctx->get_bw = get_bw;
+ cb_ctx->get_bw_ctx = get_bw_ctx;
+
+ completion = gtk_entry_get_completion(entry);
- completion = gtk_entry_completion_new();
gtk_entry_completion_set_match_func(completion,
nsgtk_completion_match, NULL, NULL);
@@ -147,13 +172,15 @@ GtkEntryCompletion *nsgtk_url_entry_completion_new(struct nsgtk_scaffolding *gs)
gtk_entry_completion_set_popup_completion(completion, TRUE);
/* when selected callback */
- g_signal_connect(G_OBJECT(completion), "match-selected",
- G_CALLBACK(nsgtk_completion_match_select), gs);
+ g_signal_connect(G_OBJECT(completion),
+ "match-selected",
+ G_CALLBACK(nsgtk_completion_match_select),
+ cb_ctx);
g_object_set(G_OBJECT(completion),
- "popup-set-width", TRUE,
- "popup-single-match", TRUE,
- NULL);
+ "popup-set-width", TRUE,
+ "popup-single-match", TRUE,
+ NULL);
- return completion;
+ return NSERROR_OK;
}
diff --git a/frontends/gtk/completion.h b/frontends/gtk/completion.h
index 9a1db293d..a81f1301a 100644
--- a/frontends/gtk/completion.h
+++ b/frontends/gtk/completion.h
@@ -37,10 +37,11 @@ void nsgtk_completion_init(void);
gboolean nsgtk_completion_update(GtkEntry *entry);
/**
- * create a new entry completion on a scaffold.
- *
- * \param gs The scaffoliding which the url entry is in.
+ * connect signals on entry completion
*/
-GtkEntryCompletion *nsgtk_url_entry_completion_new(struct nsgtk_scaffolding *gs);
+nserror
+nsgtk_completion_connect_signals(GtkEntry *entry,
+ struct browser_window *(*get_bw)(void *ctx),
+ void *get_bw_ctx);
#endif
diff --git a/frontends/gtk/cookies.c b/frontends/gtk/cookies.c
index 1f7833cca..0df9719cb 100644
--- a/frontends/gtk/cookies.c
+++ b/frontends/gtk/cookies.c
@@ -98,6 +98,8 @@ MENUHANDLER(delete_selected)
MENUHANDLER(delete_all)
{
+ cookie_manager_keypress(NS_KEY_ESCAPE);
+ cookie_manager_keypress(NS_KEY_ESCAPE);
cookie_manager_keypress(NS_KEY_SELECT_ALL);
cookie_manager_keypress(NS_KEY_DELETE_LEFT);
return TRUE;
@@ -105,6 +107,8 @@ MENUHANDLER(delete_all)
MENUHANDLER(select_all)
{
+ cookie_manager_keypress(NS_KEY_ESCAPE);
+ cookie_manager_keypress(NS_KEY_ESCAPE);
cookie_manager_keypress(NS_KEY_SELECT_ALL);
return TRUE;
}
@@ -305,13 +309,14 @@ static nserror nsgtk_cookies_init(void)
/* exported function documented gtk/cookies.h */
-nserror nsgtk_cookies_present(void)
+nserror nsgtk_cookies_present(const char *search_term)
{
nserror res;
res = nsgtk_cookies_init();
if (res == NSERROR_OK) {
gtk_window_present(cookie_window->wnd);
+ res = cookie_manager_set_search_string(search_term);
}
return res;
}
diff --git a/frontends/gtk/cookies.h b/frontends/gtk/cookies.h
index c1a68b7f9..b8fc9aba2 100644
--- a/frontends/gtk/cookies.h
+++ b/frontends/gtk/cookies.h
@@ -28,7 +28,7 @@
*
* \return NSERROR_OK on success else appropriate error code on faliure.
*/
-nserror nsgtk_cookies_present(void);
+nserror nsgtk_cookies_present(const char *search_term);
/**
* Free any resources allocated for the cookie window.
diff --git a/frontends/gtk/corewindow.c b/frontends/gtk/corewindow.c
index 6ca5d228f..baa4cf155 100644
--- a/frontends/gtk/corewindow.c
+++ b/frontends/gtk/corewindow.c
@@ -87,6 +87,7 @@ static browser_mouse_state nsgtk_cw_gdkbutton_to_nsstate(GdkEventButton *event)
}
if (event->state & GDK_MOD1_MASK) {
+ /* usually alt */
ms |= BROWSER_MOUSE_MOD_3;
}
@@ -224,6 +225,10 @@ nsgtk_cw_motion_notify_event(GtkWidget *widget,
struct nsgtk_corewindow_mouse *mouse = &nsgtk_cw->mouse_state;
if (mouse->pressed == false) {
+ nsgtk_cw->mouse(nsgtk_cw,
+ BROWSER_MOUSE_HOVER,
+ event->x,
+ event->y);
return TRUE;
}
@@ -304,7 +309,7 @@ nsgtk_cw_motion_notify_event(GtkWidget *widget,
*/
static nserror nsgtk_cw_key(struct nsgtk_corewindow *nsgtk_cw, uint32_t nskey)
{
- double value;
+ double value = 0;
GtkAdjustment *vscroll;
GtkAdjustment *hscroll;
GtkAdjustment *scroll = NULL;
@@ -588,13 +593,15 @@ nsgtk_cw_invalidate_area(struct core_window *cw, const struct rect *rect)
* \param width New widget width.
* \param height New widget height.
*/
-static void
+static nserror
nsgtk_cw_update_size(struct core_window *cw, int width, int height)
{
struct nsgtk_corewindow *nsgtk_cw = (struct nsgtk_corewindow *)cw;
gtk_widget_set_size_request(GTK_WIDGET(nsgtk_cw->drawing_area),
width, height);
+
+ return NSERROR_OK;
}
@@ -604,30 +611,56 @@ nsgtk_cw_update_size(struct core_window *cw, int width, int height)
* \param cw core window handle.
* \param r rectangle that needs scrolling.
*/
-static void
-nsgtk_cw_scroll_visible(struct core_window *cw, const struct rect *r)
+static nserror
+nsgtk_cw_set_scroll(struct core_window *cw, int x, int y)
{
struct nsgtk_corewindow *nsgtk_cw = (struct nsgtk_corewindow *)cw;
- int y = 0, height = 0, y0, y1;
- gdouble page;
- GtkAdjustment *vadj;
- vadj = gtk_scrolled_window_get_vadjustment(nsgtk_cw->scrolled);
+ if (nsgtk_cw->scrolled != NULL) {
+ GtkAdjustment *vadj;
+ GtkAdjustment *hadj;
+
+ vadj = gtk_scrolled_window_get_vadjustment(nsgtk_cw->scrolled);
+ hadj = gtk_scrolled_window_get_hadjustment(nsgtk_cw->scrolled);
+
+ assert(vadj != NULL);
+ assert(hadj != NULL);
+
+ gtk_adjustment_set_value(vadj, y);
+ gtk_adjustment_set_value(hadj, x);
+ }
+ return NSERROR_OK;
+}
+
+
+/**
+ * scroll window core window callback
+ *
+ * \param cw core window handle.
+ * \param r rectangle that needs scrolling.
+ */
+static nserror
+nsgtk_cw_get_scroll(const struct core_window *cw, int *x, int *y)
+{
+ struct nsgtk_corewindow *nsgtk_cw = (struct nsgtk_corewindow *)cw;
- assert(vadj);
+ if (nsgtk_cw->scrolled != NULL) {
+ GtkAdjustment *vadj;
+ GtkAdjustment *hadj;
- g_object_get(vadj, "page-size", &page, NULL);
+ vadj = gtk_scrolled_window_get_vadjustment(nsgtk_cw->scrolled);
+ hadj = gtk_scrolled_window_get_hadjustment(nsgtk_cw->scrolled);
- y0 = (int)(gtk_adjustment_get_value(vadj));
- y1 = y0 + page;
+ assert(vadj != NULL);
+ assert(hadj != NULL);
- if ((y >= y0) && (y + height <= y1))
- return;
- if (y + height > y1)
- y0 = y0 + (y + height - y1);
- if (y < y0)
- y0 = y;
- gtk_adjustment_set_value(vadj, y0);
+ *y = (int)(gtk_adjustment_get_value(vadj));
+ *x = (int)(gtk_adjustment_get_value(hadj));
+ } else {
+ *x = 0;
+ *y = 0;
+ }
+ return NSERROR_OK;
}
@@ -638,21 +671,31 @@ nsgtk_cw_scroll_visible(struct core_window *cw, const struct rect *r)
* \param[out] width to be set to viewport width in px
* \param[out] height to be set to viewport height in px
*/
-static void
-nsgtk_cw_get_window_dimensions(struct core_window *cw, int *width, int *height)
+static nserror
+nsgtk_cw_get_window_dimensions(const struct core_window *cw,
+ int *width, int *height)
{
struct nsgtk_corewindow *nsgtk_cw = (struct nsgtk_corewindow *)cw;
- GtkAdjustment *vadj;
- GtkAdjustment *hadj;
- gdouble page;
-
- hadj = gtk_scrolled_window_get_hadjustment(nsgtk_cw->scrolled);
- g_object_get(hadj, "page-size", &page, NULL);
- *width = page;
-
- vadj = gtk_scrolled_window_get_vadjustment(nsgtk_cw->scrolled);
- g_object_get(vadj, "page-size", &page, NULL);
- *height = page;
+ if (nsgtk_cw->scrolled != NULL) {
+ GtkAdjustment *vadj;
+ GtkAdjustment *hadj;
+ gdouble page;
+
+ hadj = gtk_scrolled_window_get_hadjustment(nsgtk_cw->scrolled);
+ g_object_get(hadj, "page-size", &page, NULL);
+ *width = page;
+
+ vadj = gtk_scrolled_window_get_vadjustment(nsgtk_cw->scrolled);
+ g_object_get(vadj, "page-size", &page, NULL);
+ *height = page;
+ } else {
+ GtkAllocation allocation;
+ gtk_widget_get_allocation(GTK_WIDGET(nsgtk_cw->drawing_area),
+ &allocation);
+ *width = allocation.width;
+ *height = allocation.height;
+ }
+ return NSERROR_OK;
}
@@ -662,11 +705,13 @@ nsgtk_cw_get_window_dimensions(struct core_window *cw, int *width, int *height)
* \param cw core window handle.
* \param ds The new drag status.
*/
-static void
+static nserror
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_status = ds;
+
+ return NSERROR_OK;
}
@@ -676,7 +721,8 @@ nsgtk_cw_drag_status(struct core_window *cw, core_window_drag_status ds)
static struct core_window_callback_table nsgtk_cw_cb_table = {
.invalidate = nsgtk_cw_invalidate_area,
.update_size = nsgtk_cw_update_size,
- .scroll_visible = nsgtk_cw_scroll_visible,
+ .set_scroll = nsgtk_cw_set_scroll,
+ .get_scroll = nsgtk_cw_get_scroll,
.get_window_dimensions = nsgtk_cw_get_window_dimensions,
.drag_status = nsgtk_cw_drag_status
};
@@ -730,7 +776,7 @@ nserror nsgtk_corewindow_init(struct nsgtk_corewindow *nsgtk_cw)
nsgtk_widget_override_background_color(
GTK_WIDGET(nsgtk_cw->drawing_area),
- GTK_STATE_NORMAL,
+ GTK_STATE_FLAG_NORMAL,
0, 0xffff, 0xffff, 0xffff);
return NSERROR_OK;
diff --git a/frontends/gtk/download.c b/frontends/gtk/download.c
index 576960271..d1231634d 100644
--- a/frontends/gtk/download.c
+++ b/frontends/gtk/download.c
@@ -34,6 +34,7 @@
#include "gtk/warn.h"
#include "gtk/scaffolding.h"
+#include "gtk/toolbar_items.h"
#include "gtk/window.h"
#include "gtk/compat.h"
#include "gtk/resources.h"
@@ -64,12 +65,23 @@ typedef enum {
} nsgtk_download_status;
typedef enum {
- NSGTK_DOWNLOAD_PAUSE = 1 << 0,
+ NSGTK_DOWNLOAD_PAUSE = 1 << 0,
NSGTK_DOWNLOAD_RESUME = 1 << 1,
- NSGTK_DOWNLOAD_CANCEL = 1 << 2,
- NSGTK_DOWNLOAD_CLEAR = 1 << 3
+ NSGTK_DOWNLOAD_CANCEL = 1 << 2,
+ NSGTK_DOWNLOAD_CLEAR = 1 << 3
} nsgtk_download_actions;
+static const gchar* status_messages[] = {
+ NULL,
+ "gtkWorking",
+ "gtkError",
+ "gtkComplete",
+ "gtkCanceled"
+};
+
+/**
+ * context for each download.
+ */
struct gui_download_window {
struct download_context *ctx;
nsgtk_download_actions sensitivity;
@@ -77,8 +89,8 @@ struct gui_download_window {
GString *name;
GString *time_left;
- gint size_total;
- gint size_downloaded;
+ unsigned long long int size_total;
+ unsigned long long int size_downloaded;
gint progress;
gfloat time_remaining;
gfloat start_time;
@@ -89,26 +101,37 @@ struct gui_download_window {
GError *error;
};
-typedef void (*nsgtk_download_selection_action)(struct gui_download_window *dl);
+typedef void (*nsgtk_download_selection_action)(struct gui_download_window *dl,
+ void *user_data);
-static GtkWindow *nsgtk_download_window, *nsgtk_download_parent;
-static GtkProgressBar *nsgtk_download_progress_bar;
+/**
+ * context for a nsgtk download window.
+ */
+struct download_window_ctx {
+ GtkWindow *window;
+ GtkWindow *parent;
+
+ GtkProgressBar *progress;
+
+ GtkTreeView *tree;
+ GtkListStore *store;
+ GtkTreeSelection *selection;
+ GtkTreeIter iter;
-static GtkTreeView *nsgtk_download_tree;
-static GtkListStore *nsgtk_download_store;
-static GtkTreeSelection *nsgtk_download_selection;
-static GtkTreeIter nsgtk_download_iter;
+ GTimer *timer;
+ GList *list;
+ GtkButton *pause;
+ GtkButton *clear;
+ GtkButton *cancel;
+ GtkButton *resume;
-static GTimer *nsgtk_downloads_timer;
-static GList *nsgtk_downloads_list;
-static GtkButton *nsgtk_download_button_pause;
-static GtkButton *nsgtk_download_button_clear;
-static GtkButton *nsgtk_download_button_cancel;
-static GtkButton *nsgtk_download_button_resume;
-static gint nsgtk_downloads_num_active;
-static const gchar* status_messages[] = { NULL, "gtkWorking", "gtkError",
- "gtkComplete", "gtkCanceled" };
+ gint num_active;
+};
+/**
+ * global instance of the download window
+ */
+static struct download_window_ctx dl_ctx;
static GtkTreeView* nsgtk_download_tree_view_new(GtkBuilder *gladeFile)
@@ -116,40 +139,66 @@ static GtkTreeView* nsgtk_download_tree_view_new(GtkBuilder *gladeFile)
GtkTreeView *treeview;
GtkCellRenderer *renderer;
- treeview = GTK_TREE_VIEW(gtk_builder_get_object(gladeFile, "treeDownloads"));
+ treeview = GTK_TREE_VIEW(gtk_builder_get_object(gladeFile,
+ "treeDownloads"));
/* Progress column */
renderer = gtk_cell_renderer_progress_new();
- gtk_tree_view_insert_column_with_attributes (treeview, -1,
- messages_get("gtkProgress"), renderer, "value",
- NSGTK_DOWNLOAD_PROGRESS, "pulse", NSGTK_DOWNLOAD_PULSE,
- "text", NSGTK_DOWNLOAD_STATUS, NULL);
+ gtk_tree_view_insert_column_with_attributes(treeview,
+ -1,
+ messages_get("gtkProgress"),
+ renderer,
+ "value",
+ NSGTK_DOWNLOAD_PROGRESS,
+ "pulse",
+ NSGTK_DOWNLOAD_PULSE,
+ "text",
+ NSGTK_DOWNLOAD_STATUS,
+ NULL);
/* Information column */
renderer = gtk_cell_renderer_text_new();
- g_object_set(G_OBJECT(renderer), "wrap-mode", PANGO_WRAP_WORD_CHAR,
- "wrap-width", 300, NULL);
- gtk_tree_view_insert_column_with_attributes (treeview, -1,
- messages_get("gtkDetails"), renderer, "text",
- NSGTK_DOWNLOAD_INFO, NULL);
- gtk_tree_view_column_set_expand(gtk_tree_view_get_column(treeview,
- NSGTK_DOWNLOAD_INFO), TRUE);
+ g_object_set(G_OBJECT(renderer),
+ "wrap-mode",
+ PANGO_WRAP_WORD_CHAR,
+ "wrap-width",
+ 300,
+ NULL);
+ gtk_tree_view_insert_column_with_attributes(treeview,
+ -1,
+ messages_get("gtkDetails"),
+ renderer,
+ "text",
+ NSGTK_DOWNLOAD_INFO,
+ NULL);
+ gtk_tree_view_column_set_expand(
+ gtk_tree_view_get_column(treeview,
+ NSGTK_DOWNLOAD_INFO), TRUE);
/* Time remaining column */
renderer = gtk_cell_renderer_text_new();
- gtk_tree_view_insert_column_with_attributes (treeview, -1,
- messages_get("gtkRemaining"), renderer, "text",
- NSGTK_DOWNLOAD_REMAINING, NULL);
+ gtk_tree_view_insert_column_with_attributes(treeview,
+ -1,
+ messages_get("gtkRemaining"),
+ renderer,
+ "text",
+ NSGTK_DOWNLOAD_REMAINING,
+ NULL);
/* Speed column */
renderer = gtk_cell_renderer_text_new();
- gtk_tree_view_insert_column_with_attributes (treeview, -1,
- messages_get("gtkSpeed"), renderer, "text",
- NSGTK_DOWNLOAD_SPEED, NULL);
+ gtk_tree_view_insert_column_with_attributes(treeview,
+ -1,
+ messages_get("gtkSpeed"),
+ renderer,
+ "text",
+ NSGTK_DOWNLOAD_SPEED,
+ NULL);
return treeview;
}
+
static gint
nsgtk_download_sort(GtkTreeModel *model,
GtkTreeIter *a,
@@ -164,43 +213,52 @@ nsgtk_download_sort(GtkTreeModel *model,
return dl1->status - dl2->status;
}
+
static void
nsgtk_download_sensitivity_update_buttons(nsgtk_download_actions sensitivity)
{
/* Glade seems to pack the buttons in an arbitrary order */
enum { PAUSE_BUTTON, CLEAR_BUTTON, CANCEL_BUTTON, RESUME_BUTTON };
- gtk_widget_set_sensitive(GTK_WIDGET(nsgtk_download_button_pause),
+ gtk_widget_set_sensitive(GTK_WIDGET(dl_ctx.pause),
sensitivity & NSGTK_DOWNLOAD_PAUSE);
- gtk_widget_set_sensitive(GTK_WIDGET(nsgtk_download_button_clear),
+ gtk_widget_set_sensitive(GTK_WIDGET(dl_ctx.clear),
sensitivity & NSGTK_DOWNLOAD_CLEAR);
- gtk_widget_set_sensitive(GTK_WIDGET(nsgtk_download_button_cancel),
+ gtk_widget_set_sensitive(GTK_WIDGET(dl_ctx.cancel),
sensitivity & NSGTK_DOWNLOAD_CANCEL);
- gtk_widget_set_sensitive(GTK_WIDGET(nsgtk_download_button_resume),
+ gtk_widget_set_sensitive(GTK_WIDGET(dl_ctx.resume),
sensitivity & NSGTK_DOWNLOAD_RESUME);
}
+
static void nsgtk_download_sensitivity_evaluate(GtkTreeSelection *selection)
{
GtkTreeIter iter;
GList *rows;
- gboolean selected = gtk_tree_selection_count_selected_rows(selection);
- GtkTreeModel *model = GTK_TREE_MODEL(nsgtk_download_store);
+ gboolean selected;
+ GtkTreeModel *model;
nsgtk_download_actions sensitivity = 0;
struct gui_download_window *dl;
+ model = GTK_TREE_MODEL(dl_ctx.store);
+
+ selected = gtk_tree_selection_count_selected_rows(selection);
if (selected) {
rows = gtk_tree_selection_get_selected_rows(selection, &model);
while (rows != NULL) {
- gtk_tree_model_get_iter(model, &iter,
+ gtk_tree_model_get_iter(model,
+ &iter,
(GtkTreePath*)rows->data);
- gtk_tree_model_get(model, &iter, NSGTK_DOWNLOAD,
- &dl, -1);
+ gtk_tree_model_get(model,
+ &iter,
+ NSGTK_DOWNLOAD,
+ &dl,
+ -1);
sensitivity |= dl->sensitivity;
rows = rows->next;
}
} else {
- rows = nsgtk_downloads_list;
+ rows = dl_ctx.list;
while (rows != NULL) {
dl = rows->data;
sensitivity |= (dl->sensitivity & NSGTK_DOWNLOAD_CLEAR);
@@ -208,83 +266,121 @@ static void nsgtk_download_sensitivity_evaluate(GtkTreeSelection *selection)
}
}
-
nsgtk_download_sensitivity_update_buttons(sensitivity);
}
+
+/**
+ * Wrapper to GFunc-ify gtk_tree_path_free for g_list_foreach.
+ */
+static void
+nsgtk_download_gfunc__gtk_tree_path_free(gpointer data, gpointer user_data)
+{
+ gtk_tree_path_free(data);
+}
+
+
+/**
+ * Wrapper to GFunc-ify g_free for g_list_foreach.
+ */
+static void
+nsgtk_download_gfunc__g_free(gpointer data, gpointer user_data)
+{
+ g_free(data);
+}
+
+
static void nsgtk_download_do(nsgtk_download_selection_action action)
{
GList *rows, *dls = NULL;
- GtkTreeModel *model = GTK_TREE_MODEL(nsgtk_download_store);
- gboolean selection_exists = gtk_tree_selection_count_selected_rows(
- nsgtk_download_selection);
+ GtkTreeModel *model;
+
+ if (gtk_tree_selection_count_selected_rows(dl_ctx.selection)) {
+ model = GTK_TREE_MODEL(dl_ctx.store);
- if (selection_exists) {
- rows = gtk_tree_selection_get_selected_rows(
- nsgtk_download_selection, &model);
+ rows = gtk_tree_selection_get_selected_rows(dl_ctx.selection,
+ &model);
while (rows != NULL) {
struct gui_download_window *dl;
- gtk_tree_model_get_iter(GTK_TREE_MODEL(
- nsgtk_download_store),
- &nsgtk_download_iter,
+
+ gtk_tree_model_get_iter(GTK_TREE_MODEL(dl_ctx.store),
+ &dl_ctx.iter,
(GtkTreePath*)rows->data);
- gtk_tree_model_get(GTK_TREE_MODEL(nsgtk_download_store),
- &nsgtk_download_iter, NSGTK_DOWNLOAD,
- &dl, -1);
+
+ gtk_tree_model_get(GTK_TREE_MODEL(dl_ctx.store),
+ &dl_ctx.iter,
+ NSGTK_DOWNLOAD,
+ &dl,
+ -1);
+
dls = g_list_prepend(dls, dl);
rows = rows->next;
}
- g_list_foreach(rows, (GFunc)gtk_tree_path_free, NULL);
- g_list_foreach(rows, (GFunc)g_free, NULL);
+ g_list_foreach(rows,
+ nsgtk_download_gfunc__gtk_tree_path_free,
+ NULL);
+ g_list_foreach(rows,
+ nsgtk_download_gfunc__g_free,
+ NULL);
g_list_free(rows);
- } else
- dls = g_list_copy(nsgtk_downloads_list);
+ } else {
+ dls = g_list_copy(dl_ctx.list);
+ }
g_list_foreach(dls, (GFunc)action, NULL);
g_list_free(dls);
}
+
static gchar* nsgtk_download_info_to_string(struct gui_download_window *dl)
{
- gchar *size_info = g_strdup_printf(messages_get("gtkSizeInfo"),
- human_friendly_bytesize(dl->size_downloaded),
- dl->size_total == 0 ? messages_get("gtkUnknownSize") :
- human_friendly_bytesize(dl->size_total));
-
+ gchar *size_info;
gchar *r;
- if (dl->status != NSGTK_DOWNLOAD_ERROR)
+ size_info = g_strdup_printf(messages_get("gtkSizeInfo"),
+ human_friendly_bytesize(dl->size_downloaded),
+ dl->size_total == 0 ?
+ messages_get("gtkUnknownSize") :
+ human_friendly_bytesize(dl->size_total));
+
+ if (dl->status != NSGTK_DOWNLOAD_ERROR) {
r = g_strdup_printf("%s\n%s", dl->name->str, size_info);
- else
- r = g_strdup_printf("%s\n%s", dl->name->str,
- dl->error->message);
+ } else {
+ r = g_strdup_printf("%s\n%s", dl->name->str, dl->error->message);
+ }
g_free(size_info);
return r;
}
+
static gchar* nsgtk_download_time_to_string(gint seconds)
{
gint hours, minutes;
- if (seconds < 0)
+ if (seconds < 0) {
return g_strdup("-");
+ }
hours = seconds / 3600;
seconds -= hours * 3600;
minutes = seconds / 60;
seconds -= minutes * 60;
- if (hours > 0)
- return g_strdup_printf("%u:%02u:%02u", hours, minutes,
+ if (hours > 0) {
+ return g_strdup_printf("%u:%02u:%02u",
+ hours,
+ minutes,
seconds);
- else
+ } else {
return g_strdup_printf("%u:%02u", minutes, seconds);
+ }
}
-static void nsgtk_download_store_update_item (struct gui_download_window *dl)
+
+static void nsgtk_download_store_update_item(struct gui_download_window *dl)
{
gchar *info = nsgtk_download_info_to_string(dl);
char *human = human_friendly_bytesize(dl->speed);
@@ -294,11 +390,11 @@ static void nsgtk_download_store_update_item (struct gui_download_window *dl)
gboolean pulse = dl->status == NSGTK_DOWNLOAD_WORKING;
/* Updates iter (which is needed to set and get data) with the dl row */
- gtk_tree_model_get_iter(GTK_TREE_MODEL(nsgtk_download_store),
- &nsgtk_download_iter,
+ gtk_tree_model_get_iter(GTK_TREE_MODEL(dl_ctx.store),
+ &dl_ctx.iter,
gtk_tree_row_reference_get_path(dl->row));
- gtk_list_store_set(nsgtk_download_store, &nsgtk_download_iter,
+ gtk_list_store_set(dl_ctx.store, &dl_ctx.iter,
NSGTK_DOWNLOAD_PULSE, pulse ? dl->progress : -1,
NSGTK_DOWNLOAD_PROGRESS, pulse ? 0 : dl->progress,
NSGTK_DOWNLOAD_INFO, info,
@@ -311,26 +407,32 @@ static void nsgtk_download_store_update_item (struct gui_download_window *dl)
g_free(time);
}
+
static gboolean nsgtk_download_update(gboolean force_update)
{
/* Be sure we need to update */
- if (!nsgtk_widget_get_visible(GTK_WIDGET(nsgtk_download_window)))
+ if (!nsgtk_widget_get_visible(GTK_WIDGET(dl_ctx.window))) {
return TRUE;
+ }
GList *list;
gchar *text;
gboolean update, pulse_mode = FALSE;
- gint downloaded = 0, total = 0, dls = 0;
- gfloat percent, elapsed = g_timer_elapsed(nsgtk_downloads_timer, NULL);
- nsgtk_downloads_num_active = 0;
+ unsigned long long int downloaded = 0;
+ unsigned long long int total = 0;
+ gint dls = 0;
+ gfloat percent, elapsed = g_timer_elapsed(dl_ctx.timer, NULL);
- for (list = nsgtk_downloads_list; list != NULL; list = list->next) {
+ dl_ctx.num_active = 0;
+
+ for (list = dl_ctx.list; list != NULL; list = list->next) {
struct gui_download_window *dl = list->data;
update = force_update;
switch (dl->status) {
case NSGTK_DOWNLOAD_WORKING:
pulse_mode = TRUE;
+ fallthrough;
case NSGTK_DOWNLOAD_NONE:
dl->speed = dl->size_downloaded /
@@ -339,76 +441,86 @@ static gboolean nsgtk_download_update(gboolean force_update)
dl->time_remaining = (dl->size_total -
dl->size_downloaded)/
dl->speed;
- dl->progress = (gfloat)
- dl->size_downloaded /
- dl->size_total * 100;
- } else
+ dl->progress = (double)dl->size_downloaded /
+ (double)dl->size_total * 100;
+ } else {
dl->progress++;
+ }
- nsgtk_downloads_num_active++;
+ dl_ctx.num_active++;
update = TRUE;
+ fallthrough;
case NSGTK_DOWNLOAD_COMPLETE:
downloaded += dl->size_downloaded;
total += dl->size_total;
dls++;
+ fallthrough;
default:
;//Do nothing
}
- if (update)
+ if (update) {
nsgtk_download_store_update_item(dl);
+ }
}
if (pulse_mode) {
text = g_strdup_printf(
- messages_get(nsgtk_downloads_num_active > 1 ?
+ messages_get(dl_ctx.num_active > 1 ?
"gtkProgressBarPulse" :
"gtkProgressBarPulseSingle"),
- nsgtk_downloads_num_active);
- gtk_progress_bar_pulse(nsgtk_download_progress_bar);
- gtk_progress_bar_set_text(nsgtk_download_progress_bar, text);
+ dl_ctx.num_active);
+ gtk_progress_bar_pulse(dl_ctx.progress);
+ gtk_progress_bar_set_text(dl_ctx.progress, text);
} else {
- percent = total != 0 ? (gfloat)downloaded / total : 0;
+ percent = total != 0 ? (double)downloaded / (double)total : 0;
text = g_strdup_printf(messages_get("gtkProgressBar"),
- floor(percent*100), dls);
- gtk_progress_bar_set_fraction(nsgtk_download_progress_bar,
+ floor(percent * 100), dls);
+ gtk_progress_bar_set_fraction(dl_ctx.progress,
percent);
- gtk_progress_bar_set_text(nsgtk_download_progress_bar, text);
+ gtk_progress_bar_set_text(dl_ctx.progress, text);
}
g_free(text);
- if (nsgtk_downloads_num_active == 0)
+ if (dl_ctx.num_active == 0) {
return FALSE; /* Returning FALSE here cancels the g_timeout */
- else
+ } else {
return TRUE;
+ }
}
-static void nsgtk_download_store_clear_item(struct gui_download_window *dl)
+
+static void
+nsgtk_download_store_clear_item(struct gui_download_window *dl, void *user_data)
{
if (dl->sensitivity & NSGTK_DOWNLOAD_CLEAR) {
- nsgtk_downloads_list = g_list_remove(nsgtk_downloads_list, dl);
+ dl_ctx.list = g_list_remove(dl_ctx.list, dl);
- gtk_tree_model_get_iter(GTK_TREE_MODEL(nsgtk_download_store),
- &nsgtk_download_iter,
+ gtk_tree_model_get_iter(GTK_TREE_MODEL(dl_ctx.store),
+ &dl_ctx.iter,
gtk_tree_row_reference_get_path(dl->row));
- gtk_list_store_remove(nsgtk_download_store,
- &nsgtk_download_iter);
+ gtk_list_store_remove(dl_ctx.store,
+ &dl_ctx.iter);
download_context_destroy(dl->ctx);
g_string_free(dl->name, TRUE);
g_string_free(dl->time_left, TRUE);
g_free(dl);
- nsgtk_download_sensitivity_evaluate(nsgtk_download_selection);
+ nsgtk_download_sensitivity_evaluate(dl_ctx.selection);
nsgtk_download_update(FALSE);
}
}
-static void nsgtk_download_tree_view_row_activated(GtkTreeView *tree,
- GtkTreePath *path, GtkTreeViewColumn *column, gpointer data)
+
+static void
+nsgtk_download_tree_view_row_activated(GtkTreeView *tree,
+ GtkTreePath *path,
+ GtkTreeViewColumn *column,
+ gpointer data)
{
GtkTreeModel *model;
GtkTreeIter iter;
@@ -421,29 +533,36 @@ static void nsgtk_download_tree_view_row_activated(GtkTreeView *tree,
}
}
-static void nsgtk_download_change_sensitivity(struct gui_download_window *dl,
- nsgtk_download_actions sensitivity)
+
+static void
+nsgtk_download_change_sensitivity(struct gui_download_window *dl,
+ nsgtk_download_actions sensitivity)
{
dl->sensitivity = sensitivity;
- nsgtk_download_sensitivity_evaluate(nsgtk_download_selection);
+ nsgtk_download_sensitivity_evaluate(dl_ctx.selection);
}
-static void nsgtk_download_change_status (
- struct gui_download_window *dl, nsgtk_download_status status)
+
+static void
+nsgtk_download_change_status(struct gui_download_window *dl,
+ nsgtk_download_status status)
{
dl->status = status;
if (status != NSGTK_DOWNLOAD_NONE) {
- gtk_tree_model_get_iter(GTK_TREE_MODEL(nsgtk_download_store),
- &nsgtk_download_iter,
+ gtk_tree_model_get_iter(GTK_TREE_MODEL(dl_ctx.store),
+ &dl_ctx.iter,
gtk_tree_row_reference_get_path(dl->row));
- gtk_list_store_set(nsgtk_download_store, &nsgtk_download_iter,
+ gtk_list_store_set(dl_ctx.store, &dl_ctx.iter,
NSGTK_DOWNLOAD_STATUS,
messages_get(status_messages[status]), -1);
}
}
-static void nsgtk_download_store_cancel_item (struct gui_download_window *dl)
+
+static void
+nsgtk_download_store_cancel_item(struct gui_download_window *dl,
+ void *user_data)
{
if (dl->sensitivity & NSGTK_DOWNLOAD_CANCEL) {
dl->speed = 0;
@@ -461,148 +580,49 @@ static void nsgtk_download_store_cancel_item (struct gui_download_window *dl)
}
}
+
static gboolean nsgtk_download_hide(GtkWidget *window)
{
gtk_widget_hide(window);
return TRUE;
}
-/* exported interface documented in gtk/download.h */
-nserror nsgtk_download_init(void)
-{
- GtkBuilder* builder;
- nserror res;
-
- res = nsgtk_builder_new_from_resname("downloads", &builder);
- if (res != NSERROR_OK) {
- NSLOG(netsurf, INFO, "Download UI builder init failed");
- return res;
- }
-
- gtk_builder_connect_signals(builder, NULL);
-
- nsgtk_download_button_pause = GTK_BUTTON(gtk_builder_get_object(builder, "buttonPause"));
- nsgtk_download_button_clear = GTK_BUTTON(gtk_builder_get_object(builder, "buttonClear"));
- nsgtk_download_button_cancel = GTK_BUTTON(gtk_builder_get_object(builder, "buttonCancel"));
- nsgtk_download_button_resume = GTK_BUTTON(gtk_builder_get_object(builder, "buttonPlay"));
-
- nsgtk_download_progress_bar = GTK_PROGRESS_BAR(gtk_builder_get_object(builder, "progressBar"));
- nsgtk_download_window = GTK_WINDOW(gtk_builder_get_object(builder, "wndDownloads"));
- nsgtk_download_parent = NULL;
-
- gtk_window_set_transient_for(GTK_WINDOW(nsgtk_download_window),
- nsgtk_download_parent);
- gtk_window_set_destroy_with_parent(GTK_WINDOW(nsgtk_download_window),
- FALSE);
-
- nsgtk_downloads_timer = g_timer_new();
-
- nsgtk_download_tree = nsgtk_download_tree_view_new(builder);
-
- nsgtk_download_store = gtk_list_store_new(NSGTK_DOWNLOAD_N_COLUMNS,
- G_TYPE_INT, /* % complete */
- G_TYPE_STRING, /* Description */
- G_TYPE_STRING, /* Time remaining */
- G_TYPE_STRING, /* Speed */
- G_TYPE_INT, /* Pulse */
- G_TYPE_STRING, /* Status */
- G_TYPE_POINTER /* Download structure */
- );
-
-
- gtk_tree_view_set_model(nsgtk_download_tree,
- GTK_TREE_MODEL(nsgtk_download_store));
-
- gtk_tree_sortable_set_sort_func(GTK_TREE_SORTABLE(nsgtk_download_store),
- NSGTK_DOWNLOAD_STATUS,
- (GtkTreeIterCompareFunc) nsgtk_download_sort, NULL, NULL);
- gtk_tree_sortable_set_sort_column_id(
- GTK_TREE_SORTABLE(nsgtk_download_store),
- NSGTK_DOWNLOAD_STATUS, GTK_SORT_ASCENDING);
-
- g_object_unref(nsgtk_download_store);
-
- nsgtk_download_selection =
- gtk_tree_view_get_selection(nsgtk_download_tree);
- gtk_tree_selection_set_mode(nsgtk_download_selection,
- GTK_SELECTION_MULTIPLE);
-
- g_signal_connect(G_OBJECT(nsgtk_download_selection), "changed",
- G_CALLBACK(nsgtk_download_sensitivity_evaluate), NULL);
- g_signal_connect(nsgtk_download_tree, "row-activated",
- G_CALLBACK(nsgtk_download_tree_view_row_activated),
- NULL);
- g_signal_connect_swapped(gtk_builder_get_object(builder, "buttonClear"),
- "clicked",
- G_CALLBACK(nsgtk_download_do),
- nsgtk_download_store_clear_item);
- g_signal_connect_swapped(gtk_builder_get_object(builder, "buttonCancel"),
- "clicked",
- G_CALLBACK(nsgtk_download_do),
- nsgtk_download_store_cancel_item);
- g_signal_connect(G_OBJECT(nsgtk_download_window), "delete-event",
- G_CALLBACK(nsgtk_download_hide), NULL);
-
- return NSERROR_OK;
-}
-
-void nsgtk_download_destroy ()
-{
- nsgtk_download_do(nsgtk_download_store_cancel_item);
-}
-
-bool nsgtk_check_for_downloads (GtkWindow *parent)
-{
- if (nsgtk_downloads_num_active != 0) {
- GtkWidget *dialog;
- dialog = gtk_message_dialog_new_with_markup(parent,
- GTK_DIALOG_MODAL, GTK_MESSAGE_WARNING,
- GTK_BUTTONS_NONE,
- "<big><b>%s</b></big>\n\n"
- "<small>%s</small>", messages_get("gtkQuit"),
- messages_get("gtkDownloadsRunning"));
- gtk_dialog_add_buttons(GTK_DIALOG(dialog), "gtk-cancel",
- GTK_RESPONSE_CANCEL, "gtk-quit",
- GTK_RESPONSE_CLOSE, NULL);
-
- gint response = gtk_dialog_run(GTK_DIALOG(dialog));
- gtk_widget_destroy(dialog);
-
- if (response == GTK_RESPONSE_CANCEL)
- return true;
- }
-
- return false;
-}
-
-void nsgtk_download_show(GtkWindow *parent)
-{
- gtk_window_set_transient_for(nsgtk_download_window,
- nsgtk_download_parent);
- gtk_window_present(nsgtk_download_window);
-}
-static gchar* nsgtk_download_dialog_show (const gchar *filename, const gchar *domain,
- const gchar *size)
+/**
+ * Prompt user for downloaded file name
+ *
+ * \param filename The original name of the file
+ * \param domain the domain the file is being downloaded from
+ * \param size The size of the file being downloaded
+ */
+static gchar*
+nsgtk_download_dialog_show(const gchar *filename,
+ const gchar *domain,
+ const gchar *size)
{
enum { GTK_RESPONSE_DOWNLOAD, GTK_RESPONSE_SAVE_AS };
GtkWidget *dialog;
char *destination = NULL;
- gchar *message = g_strdup(messages_get("gtkStartDownload"));
- gchar *info = g_strdup_printf(messages_get("gtkInfo"), filename,
- domain, size);
-
- dialog = gtk_message_dialog_new_with_markup(nsgtk_download_parent,
- GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_QUESTION, GTK_BUTTONS_NONE,
- "<span size=\"x-large\" weight=\"ultrabold\">%s</span>"
- "\n\n<small>%s</small>",
- message, info);
-
- gtk_dialog_add_buttons(GTK_DIALOG(dialog), NSGTK_STOCK_SAVE,
- GTK_RESPONSE_DOWNLOAD, NSGTK_STOCK_CANCEL,
- GTK_RESPONSE_CANCEL, NSGTK_STOCK_SAVE_AS,
- GTK_RESPONSE_SAVE_AS, NULL);
+ gchar *message;
+ gchar *info;
+
+ message = g_strdup(messages_get("gtkStartDownload"));
+ info = g_strdup_printf(messages_get("gtkInfo"), filename, domain, size);
+
+ dialog = gtk_message_dialog_new_with_markup(
+ dl_ctx.parent,
+ GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_MESSAGE_QUESTION, GTK_BUTTONS_NONE,
+ "<span size=\"x-large\" weight=\"ultrabold\">%s</span>"
+ "\n\n<small>%s</small>",
+ message,
+ info);
+
+ gtk_dialog_add_buttons(GTK_DIALOG(dialog),
+ NSGTK_STOCK_SAVE, GTK_RESPONSE_DOWNLOAD,
+ NSGTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+ NSGTK_STOCK_SAVE_AS, GTK_RESPONSE_SAVE_AS,
+ NULL);
gint result = gtk_dialog_run(GTK_DIALOG(dialog));
gtk_widget_destroy(dialog);
@@ -611,13 +631,13 @@ static gchar* nsgtk_download_dialog_show (const gchar *filename, const gchar *do
switch (result) {
case GTK_RESPONSE_SAVE_AS: {
- dialog = gtk_file_chooser_dialog_new
- (messages_get("gtkSave"),
- nsgtk_download_parent,
- GTK_FILE_CHOOSER_ACTION_SAVE,
- NSGTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- NSGTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT,
- NULL);
+ dialog = gtk_file_chooser_dialog_new(
+ messages_get("gtkSave"),
+ dl_ctx.parent,
+ GTK_FILE_CHOOSER_ACTION_SAVE,
+ NSGTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+ NSGTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT,
+ NULL);
gtk_file_chooser_set_current_name
(GTK_FILE_CHOOSER(dialog), filename);
gtk_file_chooser_set_current_folder
@@ -647,30 +667,32 @@ static gchar* nsgtk_download_dialog_show (const gchar *filename, const gchar *do
* confirmation if needed */
if (g_file_test(destination, G_FILE_TEST_EXISTS) &&
nsoption_bool(request_overwrite)) {
- message = g_strdup_printf(messages_get(
- "gtkOverwrite"), filename);
- info = g_strdup_printf(messages_get(
- "gtkOverwriteInfo"),
+ GtkWidget *button;
+
+ message = g_strdup_printf(messages_get("gtkOverwrite"),
+ filename);
+ info = g_strdup_printf(messages_get("gtkOverwriteInfo"),
nsoption_charp(downloads_directory));
dialog = gtk_message_dialog_new_with_markup(
- nsgtk_download_parent,
- GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_QUESTION,
- GTK_BUTTONS_CANCEL,
- "<b>%s</b>",message);
+ dl_ctx.parent,
+ GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_MESSAGE_QUESTION,
+ GTK_BUTTONS_CANCEL,
+ "<b>%s</b>",
+ message);
gtk_message_dialog_format_secondary_markup(
- GTK_MESSAGE_DIALOG(dialog),
- "%s", info);
+ GTK_MESSAGE_DIALOG(dialog),
+ "%s",
+ info);
- GtkWidget *button = gtk_dialog_add_button(
- GTK_DIALOG(dialog),
- "_Replace",
- GTK_RESPONSE_DOWNLOAD);
+ button = gtk_dialog_add_button(GTK_DIALOG(dialog),
+ "_Replace",
+ GTK_RESPONSE_DOWNLOAD);
gtk_button_set_image(GTK_BUTTON(button),
nsgtk_image_new_from_stock(
- NSGTK_STOCK_SAVE,
- GTK_ICON_SIZE_BUTTON));
+ NSGTK_STOCK_SAVE,
+ GTK_ICON_SIZE_BUTTON));
gint result = gtk_dialog_run(GTK_DIALOG(dialog));
if (result == GTK_RESPONSE_CANCEL)
@@ -687,20 +709,24 @@ static gchar* nsgtk_download_dialog_show (const gchar *filename, const gchar *do
}
-static gboolean nsgtk_download_handle_error (GError *error)
+static gboolean nsgtk_download_handle_error(GError *error)
{
+ GtkWidget*dialog;
+ gchar *message;
+
if (error != NULL) {
- GtkWidget*dialog;
- gchar *message = g_strdup_printf(messages_get("gtkFileError"),
- error->message);
-
- dialog = gtk_message_dialog_new_with_markup
- (nsgtk_download_parent,
- GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR,
- GTK_BUTTONS_OK,
- "<big><b>%s</b></big>\n\n"
- "<small>%s</small>", messages_get("gtkFailed"),
- message);
+ message = g_strdup_printf(messages_get("gtkFileError"),
+ error->message);
+
+ dialog = gtk_message_dialog_new_with_markup(
+ dl_ctx.parent,
+ GTK_DIALOG_MODAL,
+ GTK_MESSAGE_ERROR,
+ GTK_BUTTONS_OK,
+ "<big><b>%s</b></big>\n\n"
+ "<small>%s</small>",
+ messages_get("gtkFailed"),
+ message);
gtk_dialog_run(GTK_DIALOG(dialog));
gtk_widget_destroy(dialog);
@@ -709,30 +735,53 @@ static gboolean nsgtk_download_handle_error (GError *error)
return FALSE;
}
-static void nsgtk_download_store_create_item (struct gui_download_window *dl)
+
+static void nsgtk_download_store_create_item(struct gui_download_window *dl)
{
nsgtk_download_store_update_item(dl);
/* The iter has already been updated to this row */
- gtk_list_store_set(nsgtk_download_store, &nsgtk_download_iter,
- NSGTK_DOWNLOAD, dl, -1);
+ gtk_list_store_set(dl_ctx.store,
+ &dl_ctx.iter,
+ NSGTK_DOWNLOAD,
+ dl,
+ -1);
}
+
+/**
+ * Wrapper to GSourceFunc-ify nsgtk_download_update.
+ */
+static gboolean
+nsgtk_download_gsourcefunc__nsgtk_download_update(gpointer user_data)
+{
+ return nsgtk_download_update(FALSE);
+}
+
+
+/**
+ * core callback on creating a new download
+ */
static struct gui_download_window *
gui_download_window_create(download_context *ctx, struct gui_window *gui)
{
- nsurl *url = download_context_get_url(ctx);
- unsigned long total_size = download_context_get_total_length(ctx);
+ nsurl *url;
+ unsigned long long int total_size;
gchar *domain;
gchar *destination;
- gboolean unknown_size = total_size == 0;
- const char *size = (total_size == 0 ?
- messages_get("gtkUnknownSize") :
- human_friendly_bytesize(total_size));
+ gboolean unknown_size;
+ struct gui_download_window *download;
+ const char *size;
+
+ url = download_context_get_url(ctx);
+ total_size = download_context_get_total_length(ctx);
+ unknown_size = total_size == 0;
+ size = (total_size == 0 ?
+ messages_get("gtkUnknownSize") :
+ human_friendly_bytesize(total_size));
- nsgtk_download_parent =
- nsgtk_scaffolding_window(nsgtk_get_scaffold(gui));
+ dl_ctx.parent = nsgtk_scaffolding_window(nsgtk_get_scaffold(gui));
- struct gui_download_window *download = malloc(sizeof *download);
+ download = malloc(sizeof *download);
if (download == NULL) {
return NULL;
}
@@ -759,12 +808,12 @@ gui_download_window_create(download_context *ctx, struct gui_window *gui)
/* Add the new row and store the reference to it (which keeps track of
* the tree changes) */
- gtk_list_store_prepend(nsgtk_download_store, &nsgtk_download_iter);
+ gtk_list_store_prepend(dl_ctx.store, &dl_ctx.iter);
download->row = gtk_tree_row_reference_new(
- GTK_TREE_MODEL(nsgtk_download_store),
- gtk_tree_model_get_path(
- GTK_TREE_MODEL(nsgtk_download_store),
- &nsgtk_download_iter));
+ GTK_TREE_MODEL(dl_ctx.store),
+ gtk_tree_model_get_path(
+ GTK_TREE_MODEL(dl_ctx.store),
+ &dl_ctx.iter));
download->ctx = ctx;
download->name = g_string_new(download_context_get_filename(ctx));
@@ -772,13 +821,14 @@ gui_download_window_create(download_context *ctx, struct gui_window *gui)
download->size_total = total_size;
download->size_downloaded = 0;
download->speed = 0;
- download->start_time = g_timer_elapsed(nsgtk_downloads_timer, NULL);
+ download->start_time = g_timer_elapsed(dl_ctx.timer, NULL);
download->time_remaining = -1;
download->status = NSGTK_DOWNLOAD_NONE;
download->progress = 0;
download->error = NULL;
- download->write =
- g_io_channel_new_file(destination, "w", &download->error);
+ download->write = g_io_channel_new_file(destination,
+ "w",
+ &download->error);
if (nsgtk_download_handle_error(download->error)) {
g_string_free(download->name, TRUE);
@@ -791,24 +841,32 @@ gui_download_window_create(download_context *ctx, struct gui_window *gui)
nsgtk_download_change_sensitivity(download, NSGTK_DOWNLOAD_CANCEL);
nsgtk_download_store_create_item(download);
- nsgtk_download_show(nsgtk_download_parent);
+ nsgtk_download_show(dl_ctx.parent);
- if (unknown_size)
+ if (unknown_size) {
nsgtk_download_change_status(download, NSGTK_DOWNLOAD_WORKING);
+ }
- if (nsgtk_downloads_num_active == 0) {
- g_timeout_add(UPDATE_RATE,
- (GSourceFunc) nsgtk_download_update, FALSE);
+ if (dl_ctx.num_active == 0) {
+ g_timeout_add(
+ UPDATE_RATE,
+ nsgtk_download_gsourcefunc__nsgtk_download_update,
+ NULL);
}
- nsgtk_downloads_list = g_list_prepend(nsgtk_downloads_list, download);
+ dl_ctx.list = g_list_prepend(dl_ctx.list, download);
return download;
}
-static nserror gui_download_window_data(struct gui_download_window *dw,
- const char *data, unsigned int size)
+/**
+ * core callback on receipt of data
+ */
+static nserror
+gui_download_window_data(struct gui_download_window *dw,
+ const char *data,
+ unsigned int size)
{
g_io_channel_write_chars(dw->write, data, size, NULL, &dw->error);
if (dw->error != NULL) {
@@ -820,7 +878,7 @@ static nserror gui_download_window_data(struct gui_download_window *dw,
nsgtk_download_update(TRUE);
- gtk_window_present(nsgtk_download_window);
+ gtk_window_present(dl_ctx.window);
return NSERROR_SAVE_FAILED;
}
@@ -830,12 +888,18 @@ static nserror gui_download_window_data(struct gui_download_window *dw,
}
-static void gui_download_window_error(struct gui_download_window *dw,
- const char *error_msg)
+/**
+ * core callback on error
+ */
+static void
+gui_download_window_error(struct gui_download_window *dw, const char *error_msg)
{
}
+/**
+ * core callback when core download is complete
+ */
static void gui_download_window_done(struct gui_download_window *dw)
{
g_io_channel_shutdown(dw->write, TRUE, &dw->error);
@@ -848,10 +912,11 @@ static void gui_download_window_done(struct gui_download_window *dw)
nsgtk_download_change_sensitivity(dw, NSGTK_DOWNLOAD_CLEAR);
nsgtk_download_change_status(dw, NSGTK_DOWNLOAD_COMPLETE);
- if (nsoption_bool(downloads_clear))
- nsgtk_download_store_clear_item(dw);
- else
+ if (nsoption_bool(downloads_clear)) {
+ nsgtk_download_store_clear_item(dw, NULL);
+ } else {
nsgtk_download_update(TRUE);
+ }
}
@@ -863,3 +928,146 @@ static struct gui_download_table download_table = {
};
struct gui_download_table *nsgtk_download_table = &download_table;
+
+
+/* exported interface documented in gtk/download.h */
+nserror nsgtk_download_init(void)
+{
+ GtkBuilder* builder;
+ nserror res;
+
+ res = nsgtk_builder_new_from_resname("downloads", &builder);
+ if (res != NSERROR_OK) {
+ NSLOG(netsurf, INFO, "Download UI builder init failed");
+ return res;
+ }
+
+ gtk_builder_connect_signals(builder, NULL);
+
+ dl_ctx.pause = GTK_BUTTON(gtk_builder_get_object(builder,
+ "buttonPause"));
+ dl_ctx.clear = GTK_BUTTON(gtk_builder_get_object(builder,
+ "buttonClear"));
+ dl_ctx.cancel = GTK_BUTTON(gtk_builder_get_object(builder,
+ "buttonCancel"));
+ dl_ctx.resume = GTK_BUTTON(gtk_builder_get_object(builder,
+ "buttonPlay"));
+
+ dl_ctx.progress = GTK_PROGRESS_BAR(gtk_builder_get_object(builder,
+ "progressBar"));
+ dl_ctx.window = GTK_WINDOW(gtk_builder_get_object(builder,
+ "wndDownloads"));
+ dl_ctx.parent = NULL;
+
+ gtk_window_set_transient_for(GTK_WINDOW(dl_ctx.window),
+ dl_ctx.parent);
+ gtk_window_set_destroy_with_parent(GTK_WINDOW(dl_ctx.window),
+ FALSE);
+
+ dl_ctx.timer = g_timer_new();
+
+ dl_ctx.tree = nsgtk_download_tree_view_new(builder);
+
+ dl_ctx.store = gtk_list_store_new(NSGTK_DOWNLOAD_N_COLUMNS,
+ G_TYPE_INT, /* % complete */
+ G_TYPE_STRING, /* Description */
+ G_TYPE_STRING, /* Time remaining */
+ G_TYPE_STRING, /* Speed */
+ G_TYPE_INT, /* Pulse */
+ G_TYPE_STRING, /* Status */
+ G_TYPE_POINTER /* Download structure */
+ );
+
+
+ gtk_tree_view_set_model(dl_ctx.tree, GTK_TREE_MODEL(dl_ctx.store));
+
+ gtk_tree_sortable_set_sort_func(GTK_TREE_SORTABLE(dl_ctx.store),
+ NSGTK_DOWNLOAD_STATUS,
+ (GtkTreeIterCompareFunc)nsgtk_download_sort, NULL, NULL);
+ gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(dl_ctx.store),
+ NSGTK_DOWNLOAD_STATUS,
+ GTK_SORT_ASCENDING);
+
+ g_object_unref(dl_ctx.store);
+
+ dl_ctx.selection = gtk_tree_view_get_selection(dl_ctx.tree);
+ gtk_tree_selection_set_mode(dl_ctx.selection, GTK_SELECTION_MULTIPLE);
+
+ g_signal_connect(G_OBJECT(dl_ctx.selection),
+ "changed",
+ G_CALLBACK(nsgtk_download_sensitivity_evaluate),
+ NULL);
+
+ g_signal_connect(dl_ctx.tree,
+ "row-activated",
+ G_CALLBACK(nsgtk_download_tree_view_row_activated),
+ NULL);
+
+ g_signal_connect_swapped(gtk_builder_get_object(builder, "buttonClear"),
+ "clicked",
+ G_CALLBACK(nsgtk_download_do),
+ nsgtk_download_store_clear_item);
+
+ g_signal_connect_swapped(gtk_builder_get_object(builder, "buttonCancel"),
+ "clicked",
+ G_CALLBACK(nsgtk_download_do),
+ nsgtk_download_store_cancel_item);
+
+ g_signal_connect(G_OBJECT(dl_ctx.window),
+ "delete-event",
+ G_CALLBACK(nsgtk_download_hide),
+ NULL);
+
+ return NSERROR_OK;
+}
+
+
+/* exported interface documented in gtk/download.h */
+void nsgtk_download_destroy(void)
+{
+ nsgtk_download_do(nsgtk_download_store_cancel_item);
+}
+
+
+/* exported interface documented in gtk/download.h */
+bool nsgtk_check_for_downloads(GtkWindow *parent)
+{
+ GtkWidget *dialog;
+ gint response;
+
+ if (dl_ctx.num_active == 0) {
+ return false;
+ }
+
+ dialog = gtk_message_dialog_new_with_markup(
+ parent,
+ GTK_DIALOG_MODAL,
+ GTK_MESSAGE_WARNING,
+ GTK_BUTTONS_NONE,
+ "<big><b>%s</b></big>\n\n"
+ "<small>%s</small>",
+ messages_get("gtkQuit"),
+ messages_get("gtkDownloadsRunning"));
+
+ gtk_dialog_add_buttons(GTK_DIALOG(dialog),
+ "gtk-cancel", GTK_RESPONSE_CANCEL,
+ "gtk-quit", GTK_RESPONSE_CLOSE,
+ NULL);
+
+ response = gtk_dialog_run(GTK_DIALOG(dialog));
+ gtk_widget_destroy(dialog);
+
+ if (response == GTK_RESPONSE_CANCEL) {
+ return true;
+ }
+
+ return false;
+}
+
+
+/* exported interface documented in gtk/download.h */
+void nsgtk_download_show(GtkWindow *parent)
+{
+ gtk_window_set_transient_for(dl_ctx.window, dl_ctx.parent);
+ gtk_window_present(dl_ctx.window);
+}
diff --git a/frontends/gtk/download.h b/frontends/gtk/download.h
index 0b1097655..c6dc187e7 100644
--- a/frontends/gtk/download.h
+++ b/frontends/gtk/download.h
@@ -19,12 +19,11 @@
#ifndef GTK_DOWNLOAD_H
#define GTK_DOWNLOAD_H
-#include <gtk/gtk.h>
-
/**
* download operation table for gtk
*/
-struct gui_download_table *nsgtk_download_table;
+extern struct gui_download_table *nsgtk_download_table;
+
/**
* Initialise download window ready for use.
@@ -33,9 +32,27 @@ struct gui_download_table *nsgtk_download_table;
*/
nserror nsgtk_download_init(void);
-void nsgtk_download_destroy (void);
+
+/**
+ * Destroy download window
+ */
+void nsgtk_download_destroy(void);
+
+
+/**
+ * Check with user if download is in progress they want to complete
+ *
+ * \param parent The parent window for the prompt dialog.
+ * \return true if the user wants to continue else false.
+ */
bool nsgtk_check_for_downloads(GtkWindow *parent);
+
+
+/**
+ * Show the download window
+ *
+ * \param parent The parent window to use for the shown window
+ */
void nsgtk_download_show(GtkWindow *parent);
-void nsgtk_download_add(gchar *url, gchar *destination);
#endif
diff --git a/frontends/gtk/fetch.c b/frontends/gtk/fetch.c
index 7286aec34..d77073a63 100644
--- a/frontends/gtk/fetch.c
+++ b/frontends/gtk/fetch.c
@@ -30,6 +30,7 @@
* ASCII hence not using locale dependant ctype functions for parsing.
*/
+#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
@@ -39,8 +40,8 @@
#include <strings.h>
#include <gtk/gtk.h>
-#include "utils/hashtable.h"
#include "utils/log.h"
+#include "utils/hashtable.h"
#include "utils/filepath.h"
#include "utils/file.h"
#include "utils/nsurl.h"
@@ -74,6 +75,7 @@ void gtk_fetch_filetype_init(const char *mimefile)
hash_add(mime_hash, "html", "text/html");
hash_add(mime_hash, "jpg", "image/jpeg");
hash_add(mime_hash, "jpeg", "image/jpeg");
+ hash_add(mime_hash, "jxl", "image/jxl");
hash_add(mime_hash, "gif", "image/gif");
hash_add(mime_hash, "png", "image/png");
hash_add(mime_hash, "jng", "image/jng");
@@ -116,11 +118,9 @@ void gtk_fetch_filetype_init(const char *mimefile)
type = ptr;
- /* search for the first non-whitespace char or NUL or
+ /* search for the first whitespace char or NUL or
* NL */
- while (*ptr &&
- (!ascii_is_space(*ptr)) &&
- *ptr != '\n') {
+ while (*ptr && (!ascii_is_space(*ptr))) {
ptr++;
}
@@ -145,9 +145,7 @@ void gtk_fetch_filetype_init(const char *mimefile)
/* search for the first whitespace char or
* NUL or NL which is the end of the ext.
*/
- while (*ptr &&
- (!ascii_is_space(*ptr)) &&
- *ptr != '\n') {
+ while (*ptr && (!ascii_is_space(*ptr))) {
ptr++;
}
diff --git a/frontends/gtk/fetch.h b/frontends/gtk/fetch.h
index a095adbf9..9175ccdf2 100644
--- a/frontends/gtk/fetch.h
+++ b/frontends/gtk/fetch.h
@@ -19,7 +19,7 @@
#ifndef NETSURF_GTK_FETCH_H
#define NETSURF_GTK_FETCH_H
-struct gui_fetch_table *nsgtk_fetch_table;
+extern struct gui_fetch_table *nsgtk_fetch_table;
void gtk_fetch_filetype_init(const char *mimefile);
void gtk_fetch_filetype_fin(void);
diff --git a/frontends/gtk/gdk.c b/frontends/gtk/gdk.c
index fd82af5b2..fe9a0791c 100644
--- a/frontends/gtk/gdk.c
+++ b/frontends/gtk/gdk.c
@@ -33,7 +33,8 @@ convert_alpha(guchar *dest_data,
int x, y;
for (y = 0; y < height; y++) {
- guint32 *src = (guint32 *) src_data;
+ /* this cast is safe, the buffer is appropriately aligned */
+ guint32 *src = (void *) src_data;
for (x = 0; x < width; x++) {
guint alpha = src[x] >> 24;
@@ -72,7 +73,7 @@ nsgdk_pixbuf_get_from_surface(cairo_surface_t *surface, int scwidth, int scheigh
memset(gdk_pixbuf_get_pixels(pixbuf),
0xff,
- gdk_pixbuf_get_rowstride(pixbuf) * scheight);
+ gdk_pixbuf_get_rowstride(pixbuf) * (size_t)scheight);
/* scale cairo surface into new surface the target size */
cairo_surface_flush(surface); /* ensure source surface is ready */
diff --git a/frontends/gtk/global_history.c b/frontends/gtk/global_history.c
index f204168d0..33032e567 100644
--- a/frontends/gtk/global_history.c
+++ b/frontends/gtk/global_history.c
@@ -107,6 +107,8 @@ MENUHANDLER(delete_selected)
MENUHANDLER(delete_all)
{
+ global_history_keypress(NS_KEY_ESCAPE);
+ global_history_keypress(NS_KEY_ESCAPE);
global_history_keypress(NS_KEY_SELECT_ALL);
global_history_keypress(NS_KEY_DELETE_LEFT);
return TRUE;
@@ -114,12 +116,16 @@ MENUHANDLER(delete_all)
MENUHANDLER(select_all)
{
+ global_history_keypress(NS_KEY_ESCAPE);
+ global_history_keypress(NS_KEY_ESCAPE);
global_history_keypress(NS_KEY_SELECT_ALL);
return TRUE;
}
MENUHANDLER(clear_selection)
{
+ global_history_keypress(NS_KEY_ESCAPE);
+ global_history_keypress(NS_KEY_ESCAPE);
global_history_keypress(NS_KEY_CLEAR_SELECTION);
return TRUE;
}
diff --git a/frontends/gtk/gui.c b/frontends/gtk/gui.c
index 0f79a1b8e..661176ded 100644
--- a/frontends/gtk/gui.c
+++ b/frontends/gtk/gui.c
@@ -41,13 +41,13 @@
#include "netsurf/keypress.h"
#include "netsurf/url_db.h"
#include "netsurf/cookie_db.h"
+#include "netsurf/browser.h"
#include "netsurf/browser_window.h"
-#include "netsurf/misc.h"
#include "netsurf/netsurf.h"
+#include "netsurf/bitmap.h"
#include "content/fetch.h"
#include "content/backing_store.h"
#include "desktop/save_complete.h"
-#include "desktop/save_pdf.h"
#include "desktop/searchweb.h"
#include "desktop/hotlist.h"
@@ -62,432 +62,34 @@
#include "gtk/global_history.h"
#include "gtk/hotlist.h"
#include "gtk/throbber.h"
+#include "gtk/toolbar_items.h"
#include "gtk/scaffolding.h"
#include "gtk/window.h"
#include "gtk/schedule.h"
#include "gtk/selection.h"
#include "gtk/search.h"
-#include "gtk/ssl_cert.h"
#include "gtk/bitmap.h"
+#include "gtk/misc.h"
#include "gtk/resources.h"
-#include "gtk/login.h"
#include "gtk/layout_pango.h"
+#include "gtk/accelerator.h"
bool nsgtk_complete = false;
-char *nsgtk_config_home; /* exported global defined in gtk/gui.h */
+/* exported global defined in gtk/gui.h */
+char *nsgtk_config_home;
-GdkPixbuf *favicon_pixbuf; /** favicon default pixbuf */
-GdkPixbuf *win_default_icon_pixbuf; /** default window icon pixbuf */
-GdkPixbuf *arrow_down_pixbuf; /** arrow down pixbuf */
+/** favicon default pixbuf */
+GdkPixbuf *favicon_pixbuf;
-GtkBuilder *warning_builder;
-
-char **respaths; /** resource search path vector */
-
-/**
- * Cause an abnormal program termination.
- *
- * \note This never returns and is intended to terminate without any cleanup.
- *
- * \param error The message to display to the user.
- */
-static void die(const char * const error)
-{
- fprintf(stderr, "%s", error);
- exit(EXIT_FAILURE);
-}
-
-/**
- * Create an array of valid paths to search for resources.
- *
- * The idea is that all the complex path computation to find resources
- * is performed here, once, rather than every time a resource is
- * searched for.
- */
-static char **
-nsgtk_init_resource_path(const char *config_home)
-{
- char *resource_path;
- int resource_path_len;
- const gchar * const *langv;
- char **pathv; /* resource path string vector */
- char **respath; /* resource paths vector */
-
- if (config_home != NULL) {
- resource_path_len = snprintf(NULL, 0,
- "%s:${NETSURFRES}:%s",
- config_home,
- GTK_RESPATH);
- resource_path = malloc(resource_path_len + 1);
- if (resource_path == NULL) {
- return NULL;
- }
- snprintf(resource_path, resource_path_len + 1,
- "%s:${NETSURFRES}:%s",
- config_home,
- GTK_RESPATH);
- } else {
- resource_path_len = snprintf(NULL, 0,
- "${NETSURFRES}:%s",
- GTK_RESPATH);
- resource_path = malloc(resource_path_len + 1);
- if (resource_path == NULL) {
- return NULL;
- }
- snprintf(resource_path,
- resource_path_len + 1,
- "${NETSURFRES}:%s",
- GTK_RESPATH);
- }
-
- pathv = filepath_path_to_strvec(resource_path);
-
- langv = g_get_language_names();
-
- respath = filepath_generate(pathv, langv);
-
- filepath_free_strvec(pathv);
-
- free(resource_path);
-
- return respath;
-}
-
-
-/**
- * Set option defaults for gtk frontend.
- *
- * @param defaults The option table to update.
- * @return error status.
- */
-static nserror set_defaults(struct nsoption_s *defaults)
-{
- char *fname;
-
- /* cookie file default */
- fname = NULL;
- netsurf_mkpath(&fname, NULL, 2, nsgtk_config_home, "Cookies");
- if (fname != NULL) {
- nsoption_setnull_charp(cookie_file, fname);
- }
-
- /* cookie jar default */
- fname = NULL;
- netsurf_mkpath(&fname, NULL, 2, nsgtk_config_home, "Cookies");
- if (fname != NULL) {
- nsoption_setnull_charp(cookie_jar, fname);
- }
-
- /* url database default */
- fname = NULL;
- netsurf_mkpath(&fname, NULL, 2, nsgtk_config_home, "URLs");
- if (fname != NULL) {
- nsoption_setnull_charp(url_file, fname);
- }
-
- /* bookmark database default */
- fname = NULL;
- netsurf_mkpath(&fname, NULL, 2, nsgtk_config_home, "Hotlist");
- if (fname != NULL) {
- nsoption_setnull_charp(hotlist_path, fname);
- }
-
- /* download directory default */
- fname = getenv("HOME");
- if (fname != NULL) {
- nsoption_setnull_charp(downloads_directory, strdup(fname));
- }
-
- /* default path to certificates */
- nsoption_setnull_charp(ca_path, strdup("/etc/ssl/certs"));
-
- if ((nsoption_charp(cookie_file) == NULL) ||
- (nsoption_charp(cookie_jar) == NULL) ||
- (nsoption_charp(url_file) == NULL) ||
- (nsoption_charp(hotlist_path) == NULL) ||
- (nsoption_charp(downloads_directory) == NULL) ||
- (nsoption_charp(ca_path) == NULL)) {
- NSLOG(netsurf, INFO,
- "Failed initialising default resource paths");
- return NSERROR_BAD_PARAMETER;
- }
-
- /* set default font names */
- nsoption_set_charp(font_sans, strdup("Sans"));
- nsoption_set_charp(font_serif, strdup("Serif"));
- nsoption_set_charp(font_mono, strdup("Monospace"));
- nsoption_set_charp(font_cursive, strdup("Serif"));
- nsoption_set_charp(font_fantasy, strdup("Serif"));
-
- return NSERROR_OK;
-}
-
-
-
-
-/**
- * Initialize GTK interface.
- */
-static nserror nsgtk_init(int argc, char** argv, char **respath)
-{
- char buf[PATH_MAX];
- char *resource_filename;
- char *addr = NULL;
- nsurl *url;
- nserror error;
-
- error = nsgtk_builder_new_from_resname("warning", &warning_builder);
- if (error != NSERROR_OK) {
- NSLOG(netsurf, INFO, "Unable to initialise warning dialog");
- return error;
- }
-
- gtk_builder_connect_signals(warning_builder, NULL);
-
- /* set default icon if its available */
- error = nsgdk_pixbuf_new_from_resname("netsurf.xpm",
- &win_default_icon_pixbuf);
- if (error == NSERROR_OK) {
- NSLOG(netsurf, INFO, "Seting default window icon");
- gtk_window_set_default_icon(win_default_icon_pixbuf);
- }
-
- /* Search engine sources */
- resource_filename = filepath_find(respath, "SearchEngines");
- search_web_init(resource_filename);
- if (resource_filename != NULL) {
- NSLOG(netsurf, INFO, "Using '%s' as Search Engines file",
- resource_filename);
- free(resource_filename);
- }
-
- /* Default favicon */
- error = nsgdk_pixbuf_new_from_resname("favicon.png", &favicon_pixbuf);
- if (error != NSERROR_OK) {
- favicon_pixbuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB,
- false, 8, 16, 16);
- }
-
- /* arrow down icon */
- error = nsgdk_pixbuf_new_from_resname("arrow_down_8x32.png",
- &arrow_down_pixbuf);
- if (error != NSERROR_OK) {
- arrow_down_pixbuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB,
- false, 8, 8, 32);
- }
-
- /* initialise throbber */
- error = nsgtk_throbber_init();
- if (error != NSERROR_OK) {
- NSLOG(netsurf, INFO, "Unable to initialise throbber.");
- return error;
- }
-
- /* Initialise completions - cannot fail */
- nsgtk_completion_init();
-
- /* The tree view system needs to know the screen's DPI, so we
- * find that out here, rather than when we create a first browser
- * window.
- */
- browser_set_dpi(gdk_screen_get_resolution(gdk_screen_get_default()));
- NSLOG(netsurf, INFO, "Set CSS DPI to %d", browser_get_dpi());
-
- filepath_sfinddef(respath, buf, "mime.types", "/etc/");
- gtk_fetch_filetype_init(buf);
-
- save_complete_init();
-
- urldb_load(nsoption_charp(url_file));
- urldb_load_cookies(nsoption_charp(cookie_file));
- hotlist_init(nsoption_charp(hotlist_path),
- nsoption_charp(hotlist_path));
-
- /* Initialise top level UI elements */
- error = nsgtk_download_init();
- if (error != NSERROR_OK) {
- NSLOG(netsurf, INFO, "Unable to initialise download window.");
- return error;
- }
-
- /* If there is a url specified on the command line use it */
- if (argc > 1) {
- struct stat fs;
- if (stat(argv[1], &fs) == 0) {
- size_t addrlen;
- char *rp = realpath(argv[1], NULL);
- assert(rp != NULL);
-
- /* calculate file url length including terminator */
- addrlen = SLEN("file://") + strlen(rp) + 1;
- addr = malloc(addrlen);
- assert(addr != NULL);
- snprintf(addr, addrlen, "file://%s", rp);
- free(rp);
- } else {
- addr = strdup(argv[1]);
- }
- }
- if (addr != NULL) {
- /* managed to set up based on local launch */
- } else if (nsoption_charp(homepage_url) != NULL) {
- addr = strdup(nsoption_charp(homepage_url));
- } else {
- addr = strdup(NETSURF_HOMEPAGE);
- }
-
- /* create an initial browser window */
- error = nsurl_create(addr, &url);
- if (error == NSERROR_OK) {
- error = browser_window_create(BW_CREATE_HISTORY,
- url,
- NULL,
- NULL,
- NULL);
- nsurl_unref(url);
- }
-
- free(addr);
-
- return error;
-}
-
-
-
-/**
- * Ensures output logging stream is correctly configured
- */
-static bool nslog_stream_configure(FILE *fptr)
-{
- /* set log stream to be non-buffering */
- setbuf(fptr, NULL);
-
- return true;
-}
-
-
-/**
- * Run the gtk event loop.
- *
- * The same as the standard gtk_main loop except this ensures active
- * FD are added to the gtk poll event set.
- */
-static void nsgtk_main(void)
-{
- fd_set read_fd_set, write_fd_set, exc_fd_set;
- int max_fd;
- GPollFD *fd_list[1000];
- unsigned int fd_count;
+/** default window icon pixbuf */
+GdkPixbuf *win_default_icon_pixbuf;
- while (!nsgtk_complete) {
- max_fd = -1;
- fd_count = 0;
- FD_ZERO(&read_fd_set);
- FD_ZERO(&write_fd_set);
- FD_ZERO(&exc_fd_set);
-
- fetch_fdset(&read_fd_set, &write_fd_set, &exc_fd_set, &max_fd);
- for (int i = 0; i <= max_fd; i++) {
- if (FD_ISSET(i, &read_fd_set)) {
- GPollFD *fd = malloc(sizeof *fd);
- fd->fd = i;
- fd->events = G_IO_IN | G_IO_HUP | G_IO_ERR;
- g_main_context_add_poll(0, fd, 0);
- fd_list[fd_count++] = fd;
- }
- if (FD_ISSET(i, &write_fd_set)) {
- GPollFD *fd = malloc(sizeof *fd);
- fd->fd = i;
- fd->events = G_IO_OUT | G_IO_ERR;
- g_main_context_add_poll(0, fd, 0);
- fd_list[fd_count++] = fd;
- }
- if (FD_ISSET(i, &exc_fd_set)) {
- GPollFD *fd = malloc(sizeof *fd);
- fd->fd = i;
- fd->events = G_IO_ERR;
- g_main_context_add_poll(0, fd, 0);
- fd_list[fd_count++] = fd;
- }
- }
-
- schedule_run();
-
- gtk_main_iteration();
-
- for (unsigned int i = 0; i != fd_count; i++) {
- g_main_context_remove_poll(0, fd_list[i]);
- free(fd_list[i]);
- }
- }
-}
-
-
-static void gui_quit(void)
-{
- nserror res;
-
- NSLOG(netsurf, INFO, "Quitting GUI");
-
- /* Ensure all scaffoldings are destroyed before we go into exit */
- nsgtk_download_destroy();
- urldb_save_cookies(nsoption_charp(cookie_jar));
- urldb_save(nsoption_charp(url_file));
-
- res = nsgtk_cookies_destroy();
- if (res != NSERROR_OK) {
- NSLOG(netsurf, INFO, "Error finalising cookie viewer: %s",
- messages_get_errorcode(res));
- }
-
- res = nsgtk_local_history_destroy();
- if (res != NSERROR_OK) {
- NSLOG(netsurf, INFO,
- "Error finalising local history viewer: %s",
- messages_get_errorcode(res));
- }
-
- res = nsgtk_global_history_destroy();
- if (res != NSERROR_OK) {
- NSLOG(netsurf, INFO,
- "Error finalising global history viewer: %s",
- messages_get_errorcode(res));
- }
-
- res = nsgtk_hotlist_destroy();
- if (res != NSERROR_OK) {
- NSLOG(netsurf, INFO, "Error finalising hotlist viewer: %s",
- messages_get_errorcode(res));
- }
-
- res = hotlist_fini();
- if (res != NSERROR_OK) {
- NSLOG(netsurf, INFO, "Error finalising hotlist: %s",
- messages_get_errorcode(res));
- }
-
- free(nsgtk_config_home);
-
- gtk_fetch_filetype_fin();
-}
-
-static nserror gui_launch_url(struct nsurl *url)
-{
- gboolean ok;
- GError *error = NULL;
+GtkBuilder *warning_builder;
- ok = nsgtk_show_uri(NULL, nsurl_access(url), GDK_CURRENT_TIME, &error);
- if (ok == TRUE) {
- return NSERROR_OK;
- }
+/** resource search path vector */
+char **respaths;
- if (error) {
- nsgtk_warning(messages_get("URIOpenError"), error->message);
- g_error_free(error);
- }
- return NSERROR_NO_FETCH_HANDLER;
-}
/* exported function documented in gtk/warn.h */
nserror nsgtk_warning(const char *warning, const char *detail)
@@ -504,7 +106,7 @@ nserror nsgtk_warning(const char *warning, const char *detail)
"labelWarning"));
snprintf(buf, sizeof(buf), "%s %s", messages_get(warning),
- detail ? detail : "");
+ detail ? detail : "");
buf[sizeof(buf) - 1] = 0;
gtk_label_set_text(WarningLabel, buf);
@@ -515,129 +117,7 @@ nserror nsgtk_warning(const char *warning, const char *detail)
}
-static void nsgtk_PDF_set_pass(GtkButton *w, gpointer data)
-{
- char **owner_pass = ((void **)data)[0];
- char **user_pass = ((void **)data)[1];
- GtkWindow *wnd = ((void **)data)[2];
- GtkBuilder *password_builder = ((void **)data)[3];
- char *path = ((void **)data)[4];
-
- char *op, *op1;
- char *up, *up1;
-
- op = strdup(gtk_entry_get_text(
- GTK_ENTRY(gtk_builder_get_object(password_builder,
- "entryPDFOwnerPassword"))));
- op1 = strdup(gtk_entry_get_text(
- GTK_ENTRY(gtk_builder_get_object(password_builder,
- "entryPDFOwnerPassword1"))));
- up = strdup(gtk_entry_get_text(
- GTK_ENTRY(gtk_builder_get_object(password_builder,
- "entryPDFUserPassword"))));
- up1 = strdup(gtk_entry_get_text(
- GTK_ENTRY(gtk_builder_get_object(password_builder,
- "entryPDFUserPassword1"))));
-
-
- if (op[0] == '\0') {
- gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(password_builder,
- "labelInfo")),
- "Owner password must be at least 1 character long:");
- free(op);
- free(up);
- } else if (!strcmp(op, up)) {
- gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(password_builder,
- "labelInfo")),
- "User and owner passwords must be different:");
- free(op);
- free(up);
- } else if (!strcmp(op, op1) && !strcmp(up, up1)) {
-
- *owner_pass = op;
- if (up[0] == '\0')
- free(up);
- else
- *user_pass = up;
-
- free(data);
- gtk_widget_destroy(GTK_WIDGET(wnd));
- g_object_unref(G_OBJECT(password_builder));
-
- save_pdf(path);
-
- free(path);
- } else {
- gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(password_builder,
- "labelInfo")), "Passwords not confirmed:");
- free(op);
- free(up);
- }
-
- free(op1);
- free(up1);
-}
-
-static void nsgtk_PDF_no_pass(GtkButton *w, gpointer data)
-{
- GtkWindow *wnd = ((void **)data)[2];
- GtkBuilder *password_builder = ((void **)data)[3];
- char *path = ((void **)data)[4];
-
- free(data);
-
- gtk_widget_destroy(GTK_WIDGET(wnd));
- g_object_unref(G_OBJECT(password_builder));
-
- save_pdf(path);
-
- free(path);
-}
-
-static void nsgtk_pdf_password(char **owner_pass, char **user_pass, char *path)
-{
- GtkButton *ok, *no;
- GtkWindow *wnd;
- void **data;
- GtkBuilder *password_builder;
- nserror res;
-
- res = nsgtk_builder_new_from_resname("password", &password_builder);
- if (res != NSERROR_OK) {
- NSLOG(netsurf, INFO, "Password UI builder init failed");
- return;
- }
-
- gtk_builder_connect_signals(password_builder, NULL);
-
- wnd = GTK_WINDOW(gtk_builder_get_object(password_builder,
- "wndPDFPassword"));
-
- data = malloc(5 * sizeof(void *));
-
- *owner_pass = NULL;
- *user_pass = NULL;
-
- data[0] = owner_pass;
- data[1] = user_pass;
- data[2] = wnd;
- data[3] = password_builder;
- data[4] = path;
-
- ok = GTK_BUTTON(gtk_builder_get_object(password_builder,
- "buttonPDFSetPassword"));
- no = GTK_BUTTON(gtk_builder_get_object(password_builder,
- "buttonPDFNoPassword"));
-
- g_signal_connect(G_OBJECT(ok), "clicked",
- G_CALLBACK(nsgtk_PDF_set_pass), (gpointer)data);
- g_signal_connect(G_OBJECT(no), "clicked",
- G_CALLBACK(nsgtk_PDF_no_pass), (gpointer)data);
-
- gtk_widget_show(GTK_WIDGET(wnd));
-}
-
-
+/* exported interface documented in gtk/gui.h */
uint32_t gtk_gui_gdkkey_to_nskey(GdkEventKey *key)
{
/* this function will need to become much more complex to support
@@ -652,12 +132,16 @@ uint32_t gtk_gui_gdkkey_to_nskey(GdkEventKey *key)
case GDK_KEY(BackSpace):
if (key->state & GDK_SHIFT_MASK)
return NS_KEY_DELETE_LINE_START;
+ else if (key->state & GDK_CONTROL_MASK)
+ return NS_KEY_DELETE_WORD_LEFT;
else
return NS_KEY_DELETE_LEFT;
case GDK_KEY(Delete):
if (key->state & GDK_SHIFT_MASK)
return NS_KEY_DELETE_LINE_END;
+ else if (key->state & GDK_CONTROL_MASK)
+ return NS_KEY_DELETE_WORD_RIGHT;
else
return NS_KEY_DELETE_RIGHT;
@@ -669,10 +153,14 @@ uint32_t gtk_gui_gdkkey_to_nskey(GdkEventKey *key)
case GDK_KEY(Left):
case GDK_KEY(KP_Left):
+ if (key->state & GDK_CONTROL_MASK)
+ return NS_KEY_WORD_LEFT;
return NS_KEY_LEFT;
case GDK_KEY(Right):
case GDK_KEY(KP_Right):
+ if (key->state & GDK_CONTROL_MASK)
+ return NS_KEY_WORD_RIGHT;
return NS_KEY_RIGHT;
case GDK_KEY(Up):
@@ -767,6 +255,63 @@ uint32_t gtk_gui_gdkkey_to_nskey(GdkEventKey *key)
/**
+ * Create an array of valid paths to search for resources.
+ *
+ * The idea is that all the complex path computation to find resources
+ * is performed here, once, rather than every time a resource is
+ * searched for.
+ */
+static char **
+nsgtk_init_resource_path(const char *config_home)
+{
+ char *resource_path;
+ int resource_path_len;
+ const gchar * const *langv;
+ char **pathv; /* resource path string vector */
+ char **respath; /* resource paths vector */
+
+ if (config_home != NULL) {
+ resource_path_len = snprintf(NULL, 0,
+ "%s:${NETSURFRES}:%s",
+ config_home,
+ GTK_RESPATH);
+ resource_path = malloc(resource_path_len + 1);
+ if (resource_path == NULL) {
+ return NULL;
+ }
+ snprintf(resource_path, resource_path_len + 1,
+ "%s:${NETSURFRES}:%s",
+ config_home,
+ GTK_RESPATH);
+ } else {
+ resource_path_len = snprintf(NULL, 0,
+ "${NETSURFRES}:%s",
+ GTK_RESPATH);
+ resource_path = malloc(resource_path_len + 1);
+ if (resource_path == NULL) {
+ return NULL;
+ }
+ snprintf(resource_path,
+ resource_path_len + 1,
+ "${NETSURFRES}:%s",
+ GTK_RESPATH);
+ }
+
+ pathv = filepath_path_to_strvec(resource_path);
+
+ langv = g_get_language_names();
+
+ respath = filepath_generate(pathv, langv);
+
+ filepath_free_strvec(pathv);
+
+ free(resource_path);
+
+ return respath;
+}
+
+
+/**
* create directory name and check it is acessible and a directory.
*/
static nserror
@@ -804,6 +349,7 @@ check_dirname(const char *path, const char *leaf, char **dirname_out)
return ret;
}
+
/**
* Get the path to the config directory.
*
@@ -871,6 +417,7 @@ static nserror get_config_home(char **config_home_out)
return NSERROR_OK;
}
+
static nserror create_config_home(char **config_home_out)
{
char *config_home = NULL;
@@ -921,6 +468,192 @@ static nserror create_config_home(char **config_home_out)
return NSERROR_OK;
}
+
+/**
+ * Ensures output logging stream is correctly configured
+ */
+static bool nslog_stream_configure(FILE *fptr)
+{
+ /* set log stream to be non-buffering */
+ setbuf(fptr, NULL);
+
+ return true;
+}
+
+
+/**
+ * Set option defaults for gtk frontend.
+ *
+ * \param defaults The option table to update.
+ * \return error status.
+ */
+static nserror set_defaults(struct nsoption_s *defaults)
+{
+ char *fname;
+ GtkSettings *settings;
+ GtkIconSize tooliconsize;
+ GtkToolbarStyle toolbarstyle;
+
+ /* cookie file default */
+ fname = NULL;
+ netsurf_mkpath(&fname, NULL, 2, nsgtk_config_home, "Cookies");
+ if (fname != NULL) {
+ nsoption_setnull_charp(cookie_file, fname);
+ }
+
+ /* cookie jar default */
+ fname = NULL;
+ netsurf_mkpath(&fname, NULL, 2, nsgtk_config_home, "Cookies");
+ if (fname != NULL) {
+ nsoption_setnull_charp(cookie_jar, fname);
+ }
+
+ /* url database default */
+ fname = NULL;
+ netsurf_mkpath(&fname, NULL, 2, nsgtk_config_home, "URLs");
+ if (fname != NULL) {
+ nsoption_setnull_charp(url_file, fname);
+ }
+
+ /* bookmark database default */
+ fname = NULL;
+ netsurf_mkpath(&fname, NULL, 2, nsgtk_config_home, "Hotlist");
+ if (fname != NULL) {
+ nsoption_setnull_charp(hotlist_path, fname);
+ }
+
+ /* download directory default */
+ fname = getenv("HOME");
+ if (fname != NULL) {
+ nsoption_setnull_charp(downloads_directory, strdup(fname));
+ }
+
+ if ((nsoption_charp(cookie_file) == NULL) ||
+ (nsoption_charp(cookie_jar) == NULL) ||
+ (nsoption_charp(url_file) == NULL) ||
+ (nsoption_charp(hotlist_path) == NULL) ||
+ (nsoption_charp(downloads_directory) == NULL)) {
+ NSLOG(netsurf, INFO,
+ "Failed initialising default resource paths");
+ return NSERROR_BAD_PARAMETER;
+ }
+
+ /* set default font names */
+ nsoption_set_charp(font_sans, strdup("Sans"));
+ nsoption_set_charp(font_serif, strdup("Serif"));
+ nsoption_set_charp(font_mono, strdup("Monospace"));
+ nsoption_set_charp(font_cursive, strdup("Serif"));
+ nsoption_set_charp(font_fantasy, strdup("Serif"));
+
+ /* Default toolbar button type to system defaults */
+
+ settings = gtk_settings_get_default();
+ g_object_get(settings,
+ "gtk-toolbar-icon-size", &tooliconsize,
+ "gtk-toolbar-style", &toolbarstyle, NULL);
+
+ switch (toolbarstyle) {
+ case GTK_TOOLBAR_ICONS:
+ if (tooliconsize == GTK_ICON_SIZE_SMALL_TOOLBAR) {
+ nsoption_set_int(button_type, 1);
+ } else {
+ nsoption_set_int(button_type, 2);
+ }
+ break;
+
+ case GTK_TOOLBAR_TEXT:
+ nsoption_set_int(button_type, 4);
+ break;
+
+ case GTK_TOOLBAR_BOTH:
+ case GTK_TOOLBAR_BOTH_HORIZ:
+ /* no labels in default configuration */
+ default:
+ /* No system default, so use large icons */
+ nsoption_set_int(button_type, 2);
+ break;
+ }
+
+ /* set default items in toolbar */
+ nsoption_set_charp(toolbar_items,
+ strdup("back/history/forward/reloadstop/url_bar/websearch/openmenu"));
+
+ /* set default for menu and tool bar visibility */
+ nsoption_set_charp(bar_show, strdup("tool"));
+
+ return NSERROR_OK;
+}
+
+
+/**
+ * Initialise user options
+ *
+ * Initialise the browser configuration options. These are set by:
+ * - set generic defaults suitable for the gtk frontend
+ * - user choices loaded from Choices file
+ * - command line parameters
+ */
+static nserror nsgtk_option_init(int *pargc, char** argv)
+{
+ nserror ret;
+ char *choices = NULL;
+
+ /* user options setup */
+ ret = nsoption_init(set_defaults, &nsoptions, &nsoptions_default);
+ if (ret != NSERROR_OK) {
+ return ret;
+ }
+
+ /* Attempt to load the user choices */
+ ret = netsurf_mkpath(&choices, NULL, 2, nsgtk_config_home, "Choices");
+ if (ret == NSERROR_OK) {
+ nsoption_read(choices, nsoptions);
+ free(choices);
+ }
+
+ /* overide loaded options with those from commandline */
+ nsoption_commandline(pargc, argv, nsoptions);
+
+ /* ensure all options fall within sensible bounds */
+
+ /* Attempt to handle nonsense status bar widths. These may exist
+ * in people's Choices as the GTK front end used to abuse the
+ * status bar width option by using it for an absolute value in px.
+ * The GTK front end now correctly uses it as a proportion of window
+ * width. Here we assume that a value of less than 15% is wrong
+ * and set to the default two thirds. */
+ if (nsoption_int(toolbar_status_size) < 1500) {
+ nsoption_set_int(toolbar_status_size, 6667);
+ }
+
+ return NSERROR_OK;
+}
+
+
+/**
+ * initialise message translation
+ */
+static nserror nsgtk_messages_init(char **respaths)
+{
+ const char *messages;
+ nserror ret;
+ const uint8_t *data;
+ size_t data_size;
+
+ ret = nsgtk_data_from_resname("Messages", &data, &data_size);
+ if (ret == NSERROR_OK) {
+ ret = messages_add_from_inline(data, data_size);
+ } else {
+ /* Obtain path to messages */
+ ret = nsgtk_path_from_resname("Messages", &messages);
+ if (ret == NSERROR_OK) {
+ ret = messages_add_from_file(messages);
+ }
+ }
+ return ret;
+}
+
+
/**
* Get the path to the cache directory.
*
@@ -969,6 +702,10 @@ static nserror get_cache_home(char **cache_home_out)
return NSERROR_OK;
}
+
+/**
+ * create a cache directory
+ */
static nserror create_cache_home(char **cache_home_out)
{
char *cache_home = NULL;
@@ -976,7 +713,7 @@ static nserror create_cache_home(char **cache_home_out)
char *xdg_cache_dir;
nserror ret;
- NSLOG(netsurf, INFO, "Attempting to create configuration directory");
+ NSLOG(netsurf, INFO, "Attempting to create cache directory");
/* $XDG_CACHE_HOME defines the base directory
* relative to which user specific cache files
@@ -1019,98 +756,13 @@ static nserror create_cache_home(char **cache_home_out)
return NSERROR_OK;
}
-static nserror nsgtk_option_init(int *pargc, char** argv)
-{
- nserror ret;
- char *choices = NULL;
-
- /* user options setup */
- ret = nsoption_init(set_defaults, &nsoptions, &nsoptions_default);
- if (ret != NSERROR_OK) {
- return ret;
- }
-
- /* Attempt to load the user choices */
- ret = netsurf_mkpath(&choices, NULL, 2, nsgtk_config_home, "Choices");
- if (ret == NSERROR_OK) {
- nsoption_read(choices, nsoptions);
- free(choices);
- }
-
- /* overide loaded options with those from commandline */
- nsoption_commandline(pargc, argv, nsoptions);
-
- /* ensure all options fall within sensible bounds */
-
- /* Attempt to handle nonsense status bar widths. These may exist
- * in people's Choices as the GTK front end used to abuse the
- * status bar width option by using it for an absolute value in px.
- * The GTK front end now correctly uses it as a proportion of window
- * width. Here we assume that a value of less than 15% is wrong
- * and set to the default two thirds. */
- if (nsoption_int(toolbar_status_size) < 1500) {
- nsoption_set_int(toolbar_status_size, 6667);
- }
-
- return NSERROR_OK;
-}
-
-static struct gui_misc_table nsgtk_misc_table = {
- .schedule = nsgtk_schedule,
- .warning = nsgtk_warning,
-
- .quit = gui_quit,
- .launch_url = gui_launch_url,
- .cert_verify = gtk_cert_verify,
- .login = gui_401login_open,
- .pdf_password = nsgtk_pdf_password,
-};
-
-
-static nserror nsgtk_messages_init(char **respaths)
-{
- const char *messages;
- nserror ret;
- const uint8_t *data;
- size_t data_size;
-
- ret = nsgtk_data_from_resname("Messages", &data, &data_size);
- if (ret == NSERROR_OK) {
- ret = messages_add_from_inline(data, data_size);
- } else {
- /* Obtain path to messages */
- ret = nsgtk_path_from_resname("Messages", &messages);
- if (ret == NSERROR_OK) {
- ret = messages_add_from_file(messages);
- }
- }
- return ret;
-}
/**
- * Main entry point from OS.
+ * GTK specific initialisation
*/
-int main(int argc, char** argv)
+static nserror nsgtk_init(int *pargc, char ***pargv, char **cache_home)
{
- char *cache_home = NULL;
nserror ret;
- struct netsurf_table nsgtk_table = {
- .misc = &nsgtk_misc_table,
- .window = nsgtk_window_table,
- .clipboard = nsgtk_clipboard_table,
- .download = nsgtk_download_table,
- .fetch = nsgtk_fetch_table,
- .llcache = filesystem_llcache_table,
- .search = nsgtk_search_table,
- .search_web = nsgtk_search_web_table,
- .bitmap = nsgtk_bitmap_table,
- .layout = nsgtk_layout_table,
- };
-
- ret = netsurf_register(&nsgtk_table);
- if (ret != NSERROR_OK) {
- die("NetSurf operation table failed registration\n");
- }
/* Locate the correct user configuration directory path */
ret = get_config_home(&nsgtk_config_home);
@@ -1125,12 +777,12 @@ int main(int argc, char** argv)
}
/* Initialise gtk */
- gtk_init(&argc, &argv);
+ gtk_init(pargc, pargv);
/* initialise logging. Not fatal if it fails but not much we
* can do about it either.
*/
- nslog_init(nslog_stream_configure, &argc, argv);
+ nslog_init(nslog_stream_configure, pargc, *pargv);
/* build the common resource path list */
respaths = nsgtk_init_resource_path(nsgtk_config_home);
@@ -1144,15 +796,15 @@ int main(int argc, char** argv)
if (ret != NSERROR_OK) {
fprintf(stderr, "GTK resources failed to initialise (%s)\n",
messages_get_errorcode(ret));
- return 1;
+ return ret;
}
/* Initialise user options */
- ret = nsgtk_option_init(&argc, argv);
+ ret = nsgtk_option_init(pargc, *pargv);
if (ret != NSERROR_OK) {
fprintf(stderr, "Options failed to initialise (%s)\n",
messages_get_errorcode(ret));
- return 1;
+ return ret;
}
/* Initialise translated messages */
@@ -1165,33 +817,351 @@ int main(int argc, char** argv)
}
/* Locate the correct user cache directory path */
- ret = get_cache_home(&cache_home);
+ ret = get_cache_home(cache_home);
if (ret == NSERROR_NOT_FOUND) {
/* no cache directory exists yet so try to create one */
- ret = create_cache_home(&cache_home);
+ ret = create_cache_home(cache_home);
}
if (ret != NSERROR_OK) {
NSLOG(netsurf, INFO, "Unable to locate a cache directory.");
}
- /* core initialisation */
- ret = netsurf_init(cache_home);
- free(cache_home);
- if (ret != NSERROR_OK) {
- fprintf(stderr, "NetSurf core failed to initialise (%s)\n",
- messages_get_errorcode(ret));
- return 1;
+
+ return NSERROR_OK;
+}
+
+
+#if GTK_CHECK_VERSION(3,14,0)
+
+/**
+ * adds named icons into gtk theme
+ */
+static nserror nsgtk_add_named_icons_to_theme(void)
+{
+ gtk_icon_theme_add_resource_path(gtk_icon_theme_get_default(),
+ "/org/netsurf/icons");
+ return NSERROR_OK;
+}
+
+#else
+
+static nserror
+add_builtin_icon(const char *prefix, const char *name, int x, int y)
+{
+ GdkPixbuf *pixbuf;
+ nserror res;
+ char *resname;
+ int resnamelen;
+
+ /* resource name string length allowing for / .png and termination */
+ resnamelen = strlen(prefix) + strlen(name) + 5 + 1 + 4 + 1;
+ resname = malloc(resnamelen);
+ if (resname == NULL) {
+ return NSERROR_NOMEM;
}
+ snprintf(resname, resnamelen, "icons%s/%s.png", prefix, name);
- /* run the browser */
- ret = nsgtk_init(argc, argv, respaths);
- if (ret != NSERROR_OK) {
- fprintf(stderr, "NetSurf gtk initialise failed (%s)\n",
- messages_get_errorcode(ret));
+ res = nsgdk_pixbuf_new_from_resname(resname, &pixbuf);
+ NSLOG(netsurf, DEEPDEBUG, "%d %s", res, resname);
+ free(resname);
+ if (res != NSERROR_OK) {
+ pixbuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB, false, 8, x, y);
+ }
+ gtk_icon_theme_add_builtin_icon(name, y, pixbuf);
+
+ return NSERROR_OK;
+}
+
+
+/**
+ * adds named icons into gtk theme
+ */
+static nserror nsgtk_add_named_icons_to_theme(void)
+{
+ /* these must also be in gtk/resources.c pixbuf_resource *and*
+ * gtk/res/netsurf.gresource.xml
+ */
+ add_builtin_icon("", "local-history", 8, 32);
+ add_builtin_icon("", "show-cookie", 24, 24);
+ add_builtin_icon("/24x24/actions", "page-info-insecure", 24, 24);
+ add_builtin_icon("/24x24/actions", "page-info-internal", 24, 24);
+ add_builtin_icon("/24x24/actions", "page-info-local", 24, 24);
+ add_builtin_icon("/24x24/actions", "page-info-secure", 24, 24);
+ add_builtin_icon("/24x24/actions", "page-info-warning", 24, 24);
+ add_builtin_icon("/48x48/actions", "page-info-insecure", 48, 48);
+ add_builtin_icon("/48x48/actions", "page-info-internal", 48, 48);
+ add_builtin_icon("/48x48/actions", "page-info-local", 48, 48);
+ add_builtin_icon("/48x48/actions", "page-info-secure", 48, 48);
+ add_builtin_icon("/48x48/actions", "page-info-warning", 48, 48);
+
+ return NSERROR_OK;
+}
+
+#endif
+
+
+/**
+ * setup GTK specific parts of the browser.
+ *
+ * \param argc The number of arguments on the command line
+ * \param argv A string vector of command line arguments.
+ * \respath A string vector of the path elements of resources
+ */
+static nserror nsgtk_setup(int argc, char** argv, char **respath)
+{
+ char buf[PATH_MAX];
+ char *resource_filename;
+ char *addr = NULL;
+ nsurl *url;
+ nserror res;
+
+ /* Initialise gtk accelerator table */
+ res = nsgtk_accelerator_init(respaths);
+ if (res != NSERROR_OK) {
+ NSLOG(netsurf, INFO,
+ "Unable to load gtk accelerator configuration");
+ /* not fatal if this does not load */
+ }
+
+ /* initialise warning dialog */
+ res = nsgtk_builder_new_from_resname("warning", &warning_builder);
+ if (res != NSERROR_OK) {
+ NSLOG(netsurf, INFO, "Unable to initialise warning dialog");
+ return res;
+ }
+
+ gtk_builder_connect_signals(warning_builder, NULL);
+
+ /* set default icon if its available */
+ res = nsgdk_pixbuf_new_from_resname("netsurf.xpm",
+ &win_default_icon_pixbuf);
+ if (res == NSERROR_OK) {
+ NSLOG(netsurf, INFO, "Seting default window icon");
+ gtk_window_set_default_icon(win_default_icon_pixbuf);
+ }
+
+ /* Search engine sources */
+ resource_filename = filepath_find(respath, "SearchEngines");
+ search_web_init(resource_filename);
+ if (resource_filename != NULL) {
+ NSLOG(netsurf, INFO, "Using '%s' as Search Engines file",
+ resource_filename);
+ free(resource_filename);
+ }
+ search_web_select_provider(nsoption_int(search_provider));
+
+ /* Default favicon */
+ res = nsgdk_pixbuf_new_from_resname("favicon.png", &favicon_pixbuf);
+ if (res != NSERROR_OK) {
+ favicon_pixbuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB,
+ false, 8, 16, 16);
+ }
+
+ /* add named icons to gtk theme */
+ res = nsgtk_add_named_icons_to_theme();
+ if (res != NSERROR_OK) {
+ NSLOG(netsurf, INFO, "Unable to add named icons to GTK theme.");
+ return res;
+ }
+
+ /* initialise throbber */
+ res = nsgtk_throbber_init();
+ if (res != NSERROR_OK) {
+ NSLOG(netsurf, INFO, "Unable to initialise throbber.");
+ return res;
+ }
+
+ /* Initialise completions - cannot fail */
+ nsgtk_completion_init();
+
+ /* The tree view system needs to know the screen's DPI, so we
+ * find that out here, rather than when we create a first browser
+ * window.
+ */
+ browser_set_dpi(gdk_screen_get_resolution(gdk_screen_get_default()));
+ NSLOG(netsurf, INFO, "Set CSS DPI to %d", browser_get_dpi());
+
+ bitmap_set_format(&(bitmap_fmt_t) {
+ .layout = BITMAP_LAYOUT_ARGB8888,
+ .pma = true,
+ });
+
+ filepath_sfinddef(respath, buf, "mime.types", "/etc/");
+ gtk_fetch_filetype_init(buf);
+
+ save_complete_init();
+
+ urldb_load(nsoption_charp(url_file));
+ urldb_load_cookies(nsoption_charp(cookie_file));
+ hotlist_init(nsoption_charp(hotlist_path),
+ nsoption_charp(hotlist_path));
+
+ /* Initialise top level UI elements */
+ res = nsgtk_download_init();
+ if (res != NSERROR_OK) {
+ NSLOG(netsurf, INFO, "Unable to initialise download window.");
+ return res;
+ }
+
+ /* If there is a url specified on the command line use it */
+ if (argc > 1) {
+ struct stat fs;
+ if (stat(argv[1], &fs) == 0) {
+ size_t addrlen;
+ char *rp = realpath(argv[1], NULL);
+ assert(rp != NULL);
+
+ /* calculate file url length including terminator */
+ addrlen = SLEN("file://") + strlen(rp) + 1;
+ addr = malloc(addrlen);
+ assert(addr != NULL);
+ snprintf(addr, addrlen, "file://%s", rp);
+ free(rp);
+ } else {
+ addr = strdup(argv[1]);
+ }
+ }
+ if (addr != NULL) {
+ /* managed to set up based on local launch */
+ } else if (nsoption_charp(homepage_url) != NULL) {
+ addr = strdup(nsoption_charp(homepage_url));
} else {
- nsgtk_main();
+ addr = strdup(NETSURF_HOMEPAGE);
+ }
+
+ /* create an initial browser window */
+ res = nsurl_create(addr, &url);
+ if (res == NSERROR_OK) {
+ res = browser_window_create(BW_CREATE_HISTORY,
+ url,
+ NULL,
+ NULL,
+ NULL);
+ nsurl_unref(url);
+ }
+
+ free(addr);
+
+ return res;
+}
+
+
+/**
+ * Run the gtk event loop.
+ *
+ * The same as the standard gtk_main loop except this ensures active
+ * FD are added to the gtk poll event set.
+ */
+static void nsgtk_main(void)
+{
+ fd_set read_fd_set, write_fd_set, exc_fd_set;
+ int max_fd;
+ GPollFD *fd_list[1000];
+ unsigned int fd_count;
+
+ while (!nsgtk_complete) {
+ max_fd = -1;
+ fd_count = 0;
+ FD_ZERO(&read_fd_set);
+ FD_ZERO(&write_fd_set);
+ FD_ZERO(&exc_fd_set);
+
+ while (gtk_events_pending())
+ gtk_main_iteration_do(TRUE);
+
+ schedule_run();
+
+ fetch_fdset(&read_fd_set, &write_fd_set, &exc_fd_set, &max_fd);
+ for (int i = 0; i <= max_fd; i++) {
+ if (FD_ISSET(i, &read_fd_set)) {
+ GPollFD *fd = malloc(sizeof *fd);
+ fd->fd = i;
+ fd->events = G_IO_IN | G_IO_HUP | G_IO_ERR;
+ g_main_context_add_poll(0, fd, 0);
+ fd_list[fd_count++] = fd;
+ }
+ if (FD_ISSET(i, &write_fd_set)) {
+ GPollFD *fd = malloc(sizeof *fd);
+ fd->fd = i;
+ fd->events = G_IO_OUT | G_IO_ERR;
+ g_main_context_add_poll(0, fd, 0);
+ fd_list[fd_count++] = fd;
+ }
+ if (FD_ISSET(i, &exc_fd_set)) {
+ GPollFD *fd = malloc(sizeof *fd);
+ fd->fd = i;
+ fd->events = G_IO_ERR;
+ g_main_context_add_poll(0, fd, 0);
+ fd_list[fd_count++] = fd;
+ }
+ }
+
+ gtk_main_iteration();
+
+ for (unsigned int i = 0; i != fd_count; i++) {
+ g_main_context_remove_poll(0, fd_list[i]);
+ free(fd_list[i]);
+ }
+ }
+}
+
+
+/**
+ * finalise the browser
+ */
+static void nsgtk_finalise(void)
+{
+ nserror res;
+
+ NSLOG(netsurf, INFO, "Quitting GUI");
+
+ /* Ensure all scaffoldings are destroyed before we go into exit */
+ nsgtk_download_destroy();
+ urldb_save_cookies(nsoption_charp(cookie_jar));
+ urldb_save(nsoption_charp(url_file));
+
+ res = nsgtk_cookies_destroy();
+ if (res != NSERROR_OK) {
+ NSLOG(netsurf, INFO, "Error finalising cookie viewer: %s",
+ messages_get_errorcode(res));
+ }
+
+ res = nsgtk_local_history_destroy();
+ if (res != NSERROR_OK) {
+ NSLOG(netsurf, INFO,
+ "Error finalising local history viewer: %s",
+ messages_get_errorcode(res));
+ }
+
+ res = nsgtk_global_history_destroy();
+ if (res != NSERROR_OK) {
+ NSLOG(netsurf, INFO,
+ "Error finalising global history viewer: %s",
+ messages_get_errorcode(res));
}
+ res = nsgtk_hotlist_destroy();
+ if (res != NSERROR_OK) {
+ NSLOG(netsurf, INFO, "Error finalising hotlist viewer: %s",
+ messages_get_errorcode(res));
+ }
+
+ res = hotlist_fini();
+ if (res != NSERROR_OK) {
+ NSLOG(netsurf, INFO, "Error finalising hotlist: %s",
+ messages_get_errorcode(res));
+ }
+
+ res = save_complete_finalise();
+ if (res != NSERROR_OK) {
+ NSLOG(netsurf, INFO, "Error finalising save complete: %s",
+ messages_get_errorcode(res));
+ }
+
+ free(nsgtk_config_home);
+
+ gtk_fetch_filetype_fin();
+
/* common finalisation */
netsurf_exit();
@@ -1201,5 +1171,66 @@ int main(int argc, char** argv)
/* finalise logging */
nslog_finalise();
+}
+
+
+/**
+ * Main entry point from OS.
+ */
+int main(int argc, char** argv)
+{
+ nserror res;
+ char *cache_home = NULL;
+ struct netsurf_table nsgtk_table = {
+ .misc = nsgtk_misc_table,
+ .window = nsgtk_window_table,
+ .clipboard = nsgtk_clipboard_table,
+ .download = nsgtk_download_table,
+ .fetch = nsgtk_fetch_table,
+ .llcache = filesystem_llcache_table,
+ .search = nsgtk_search_table,
+ .search_web = nsgtk_search_web_table,
+ .bitmap = nsgtk_bitmap_table,
+ .layout = nsgtk_layout_table,
+ };
+
+ res = netsurf_register(&nsgtk_table);
+ if (res != NSERROR_OK) {
+ fprintf(stderr,
+ "NetSurf operation table failed registration (%s)\n",
+ messages_get_errorcode(res));
+ return 1;
+ }
+
+ /* gtk specific initialisation */
+ res = nsgtk_init(&argc, &argv, &cache_home);
+ if (res != NSERROR_OK) {
+ fprintf(stderr, "NetSurf gtk failed to initialise (%s)\n",
+ messages_get_errorcode(res));
+ return 2;
+ }
+
+ /* core initialisation */
+ res = netsurf_init(cache_home);
+ free(cache_home);
+ if (res != NSERROR_OK) {
+ fprintf(stderr, "NetSurf core failed to initialise (%s)\n",
+ messages_get_errorcode(res));
+ return 3;
+ }
+
+ /* gtk specific initalisation and main run loop */
+ res = nsgtk_setup(argc, argv, respaths);
+ if (res != NSERROR_OK) {
+ nsgtk_finalise();
+ fprintf(stderr, "NetSurf gtk setup failed (%s)\n",
+ messages_get_errorcode(res));
+ return 4;
+ }
+
+ nsgtk_main();
+
+ nsgtk_finalise();
+
return 0;
}
diff --git a/frontends/gtk/gui.h b/frontends/gtk/gui.h
index 53e732437..ee82e7a6f 100644
--- a/frontends/gtk/gui.h
+++ b/frontends/gtk/gui.h
@@ -27,9 +27,6 @@ extern char *nsgtk_config_home;
/** favicon default pixbuf */
extern GdkPixbuf *favicon_pixbuf;
-/** arrow down pixbuf */
-extern GdkPixbuf *arrow_down_pixbuf;
-
/** resource search path vector */
extern char **respaths;
diff --git a/frontends/gtk/hotlist.c b/frontends/gtk/hotlist.c
index 843e47736..b047dc65f 100644
--- a/frontends/gtk/hotlist.c
+++ b/frontends/gtk/hotlist.c
@@ -170,6 +170,8 @@ MENUHANDLER(delete_selected)
MENUHANDLER(select_all)
{
+ hotlist_keypress(NS_KEY_ESCAPE);
+ hotlist_keypress(NS_KEY_ESCAPE);
hotlist_keypress(NS_KEY_SELECT_ALL);
return TRUE;
}
diff --git a/frontends/gtk/layout_pango.c b/frontends/gtk/layout_pango.c
index a5964eb37..9e8e94d48 100644
--- a/frontends/gtk/layout_pango.c
+++ b/frontends/gtk/layout_pango.c
@@ -277,7 +277,7 @@ nsfont_style_to_description(const plot_font_style_t *fstyle)
break;
}
- size = (fstyle->size * PANGO_SCALE) / FONT_SIZE_SCALE;
+ size = (fstyle->size * PANGO_SCALE) / PLOT_STYLE_SCALE;
if (fstyle->flags & FONTF_ITALIC)
style = PANGO_STYLE_ITALIC;
diff --git a/frontends/gtk/local_history.c b/frontends/gtk/local_history.c
index 35b7a4ad6..0d59c468a 100644
--- a/frontends/gtk/local_history.c
+++ b/frontends/gtk/local_history.c
@@ -35,6 +35,7 @@
#include "gtk/resources.h"
#include "gtk/corewindow.h"
#include "gtk/local_history.h"
+#include "gtk/scaffolding.h"
struct nsgtk_local_history_window {
struct nsgtk_corewindow core;
@@ -158,6 +159,12 @@ nsgtk_local_history_init(struct browser_window *bw,
ncwin->wnd = GTK_WINDOW(gtk_builder_get_object(ncwin->builder,
"wndHistory"));
+ /* Configure for transient behaviour */
+ gtk_window_set_type_hint(GTK_WINDOW(ncwin->wnd),
+ GDK_WINDOW_TYPE_HINT_DROPDOWN_MENU);
+ gtk_window_set_modal(GTK_WINDOW(ncwin->wnd), TRUE);
+
+
ncwin->core.scrolled = GTK_SCROLLED_WINDOW(
gtk_builder_get_object(ncwin->builder,
"HistoryScrolled"));
@@ -171,6 +178,16 @@ nsgtk_local_history_init(struct browser_window *bw,
"delete_event",
G_CALLBACK(gtk_widget_hide_on_delete),
NULL);
+ /* Ditto if we lose the grab */
+ g_signal_connect(G_OBJECT(ncwin->wnd),
+ "grab-broken-event",
+ G_CALLBACK(gtk_widget_hide_on_delete),
+ ncwin);
+ /* Handle button press events */
+ g_signal_connect(G_OBJECT(ncwin->wnd),
+ "button-press-event",
+ G_CALLBACK(gtk_widget_hide_on_delete),
+ ncwin);
ncwin->core.draw = nsgtk_local_history_draw;
ncwin->core.key = nsgtk_local_history_key;
@@ -206,7 +223,11 @@ nserror nsgtk_local_history_present(GtkWindow *parent,
int width, height;
res = nsgtk_local_history_init(bw, &local_history_window);
if (res == NSERROR_OK) {
+ gtk_window_group_add_window(gtk_window_get_group(parent),
+ local_history_window->wnd);
gtk_window_set_transient_for(local_history_window->wnd, parent);
+ gtk_window_set_screen(local_history_window->wnd,
+ gtk_widget_get_screen(GTK_WIDGET(parent)));
gtk_window_get_size(parent, &prnt_width, &prnt_height);
@@ -224,7 +245,13 @@ nserror nsgtk_local_history_present(GtkWindow *parent,
}
gtk_window_resize(local_history_window->wnd, width, height);
- gtk_window_present(local_history_window->wnd);
+ /* Attempt to place the window in the right place */
+ nsgtk_scaffolding_position_local_history(nsgtk_current_scaffolding());
+
+ gtk_widget_show(GTK_WIDGET(local_history_window->wnd));
+ gtk_widget_grab_focus(GTK_WIDGET(local_history_window->wnd));
+
+ local_history_scroll_to_cursor(local_history_window->session);
}
return res;
@@ -267,3 +294,11 @@ nserror nsgtk_local_history_destroy(void)
return res;
}
+
+/* exported function documented gtk/history.h */
+void nsgtk_local_history_set_position(int x, int y)
+{
+ NSLOG(netsurf, INFO, "x=%d y=%d", x, y);
+
+ gtk_window_move(local_history_window->wnd, x, y);
+}
diff --git a/frontends/gtk/local_history.h b/frontends/gtk/local_history.h
index 605405ddf..c5b447194 100644
--- a/frontends/gtk/local_history.h
+++ b/frontends/gtk/local_history.h
@@ -34,6 +34,11 @@ struct browser_window;
nserror nsgtk_local_history_present(GtkWindow *parent, struct browser_window *bw);
/**
+ * set the local history window position.
+ */
+void nsgtk_local_history_set_position(int x, int y);
+
+/**
* hide the local history window from being visible.
*
* \return NSERROR_OK on success else appropriate error code on faliure.
diff --git a/frontends/gtk/login.c b/frontends/gtk/login.c
deleted file mode 100644
index 91d8b37f0..000000000
--- a/frontends/gtk/login.c
+++ /dev/null
@@ -1,232 +0,0 @@
-/*
- * Copyright 2006 Rob Kendrick <rjek@rjek.com>
- *
- * 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 <stdlib.h>
-#include <string.h>
-#include <gtk/gtk.h>
-
-#include "utils/log.h"
-#include "utils/nsurl.h"
-#include "netsurf/url_db.h"
-
-#include "gtk/resources.h"
-#include "gtk/login.h"
-
-/** login window session data */
-struct session_401 {
- nsurl *url; /**< URL being fetched */
- lwc_string *host; /**< Host for user display */
- char *realm; /**< Authentication realm */
- nserror (*cb)(bool proceed, void *pw); /**< Continuation callback */
- void *cbpw; /**< Continuation data */
- GtkBuilder *x; /**< Our builder windows */
- GtkWindow *wnd; /**< The login window itself */
- GtkEntry *user; /**< Widget with username */
- GtkEntry *pass; /**< Widget with password */
-};
-
-/**
- * Destroy login window and free all associated resources
- *
- * \param session The login window session to destroy.
- */
-static void destroy_login_window(struct session_401 *session)
-{
- nsurl_unref(session->url);
- lwc_string_unref(session->host);
- free(session->realm);
- gtk_widget_destroy(GTK_WIDGET(session->wnd));
- g_object_unref(G_OBJECT(session->x));
- free(session);
-}
-
-
-/**
- * process next signal in entry widgets.
- *
- * \param w current widget
- * \param data next widget
- */
-static void nsgtk_login_next(GtkWidget *w, gpointer data)
-{
- gtk_widget_grab_focus(GTK_WIDGET(data));
-}
-
-
-/**
- * handler called when navigation is continued
- *
- * \param w current widget
- * \param data login window session
- */
-static void nsgtk_login_ok_clicked(GtkButton *w, gpointer data)
-{
- /* close the window and destroy it, having continued the fetch
- * assoicated with it.
- */
-
- struct session_401 *session = (struct session_401 *)data;
- const gchar *user = gtk_entry_get_text(session->user);
- const gchar *pass = gtk_entry_get_text(session->pass);
- char *auth;
-
- auth = malloc(strlen(user) + strlen(pass) + 2);
- sprintf(auth, "%s:%s", user, pass);
- urldb_set_auth_details(session->url, session->realm, auth);
- free(auth);
-
- session->cb(true, session->cbpw);
-
- destroy_login_window(session);
-}
-
-
-/**
- * handler called when navigation is cancelled
- *
- * \param w widget
- * \param data login window session
- */
-static void nsgtk_login_cancel_clicked(GtkButton *w, gpointer data)
-{
- struct session_401 *session = (struct session_401 *) data;
-
- session->cb(false, session->cbpw);
-
- /* close and destroy the window */
- destroy_login_window(session);
-}
-
-
-/**
- * create a new instance of the login window
- *
- * creates login window and handles to all the widgets we're
- * interested in.
- *
- * \param url The url causing the login.
- * \param host the host being logged into
- * \param realm realmm the login relates to
- * \param cb callback when complete
- * \param cbpw data to pass to callback
- * \return NSERROR_OK on sucessful window creation or error code on faliure.
- */
-static nserror
-create_login_window(nsurl *url,
- lwc_string *host,
- const char *realm,
- nserror (*cb)(bool proceed, void *pw),
- void *cbpw)
-{
- struct session_401 *session;
- GtkWindow *wnd;
- GtkLabel *lhost, *lrealm;
- GtkEntry *euser, *epass;
- GtkButton *bok, *bcan;
- GtkBuilder* builder;
- nserror res;
-
- session = calloc(1, sizeof(struct session_401));
- if (session == NULL) {
- return NSERROR_NOMEM;
- }
-
- res = nsgtk_builder_new_from_resname("login", &builder);
- if (res != NSERROR_OK) {
- free(session);
- return res;
- }
-
- gtk_builder_connect_signals(builder, NULL);
-
- wnd = GTK_WINDOW(gtk_builder_get_object(builder, "wndLogin"));
- lhost = GTK_LABEL(gtk_builder_get_object(builder, "labelLoginHost"));
- lrealm = GTK_LABEL(gtk_builder_get_object(builder, "labelLoginRealm"));
- euser = GTK_ENTRY(gtk_builder_get_object(builder, "entryLoginUser"));
- epass = GTK_ENTRY(gtk_builder_get_object(builder, "entryLoginPass"));
- bok = GTK_BUTTON(gtk_builder_get_object(builder, "buttonLoginOK"));
- bcan = GTK_BUTTON(gtk_builder_get_object(builder, "buttonLoginCan"));
-
- /* create and fill in our session structure */
- session->url = nsurl_ref(url);
- session->host = lwc_string_ref(host);
- session->realm = strdup(realm ? realm : "Secure Area");
- session->cb = cb;
- session->cbpw = cbpw;
- session->x = builder;
- session->wnd = wnd;
- session->user = euser;
- session->pass = epass;
-
- /* fill in our new login window */
-
- gtk_label_set_text(GTK_LABEL(lhost), lwc_string_data(host));
- gtk_label_set_text(lrealm, realm);
- gtk_entry_set_text(euser, "");
- gtk_entry_set_text(epass, "");
-
- /* attach signal handlers to the Login and Cancel buttons in our new
- * window to call functions in this file to process the login
- */
- g_signal_connect(G_OBJECT(bok), "clicked",
- G_CALLBACK(nsgtk_login_ok_clicked), (gpointer)session);
- g_signal_connect(G_OBJECT(bcan), "clicked",
- G_CALLBACK(nsgtk_login_cancel_clicked),
- (gpointer)session);
-
- /* attach signal handlers to the entry boxes such that pressing
- * enter in one progresses the focus onto the next widget.
- */
-
- g_signal_connect(G_OBJECT(euser), "activate",
- G_CALLBACK(nsgtk_login_next), (gpointer)epass);
- g_signal_connect(G_OBJECT(epass), "activate",
- G_CALLBACK(nsgtk_login_next), (gpointer)bok);
-
- /* make sure the username entry box currently has the focus */
- gtk_widget_grab_focus(GTK_WIDGET(euser));
-
- /* finally, show the window */
- gtk_widget_show(GTK_WIDGET(wnd));
-
- return NSERROR_OK;
-}
-
-
-/* exported function documented in gtk/login.h */
-void gui_401login_open(nsurl *url,
- const char *realm,
- nserror (*cb)(bool proceed, void *pw),
- void *cbpw)
-{
- lwc_string *host;
- nserror res;
-
- host = nsurl_get_component(url, NSURL_HOST);
- assert(host != NULL);
-
- res = create_login_window(url, host, realm, cb, cbpw);
- if (res != NSERROR_OK) {
- NSLOG(netsurf, INFO, "Login init failed");
-
- /* creating login failed so cancel navigation */
- cb(false, cbpw);
- }
-
- lwc_string_unref(host);
-}
diff --git a/frontends/gtk/menu.c b/frontends/gtk/menu.c
index a93ef9385..03056d2a8 100644
--- a/frontends/gtk/menu.c
+++ b/frontends/gtk/menu.c
@@ -27,6 +27,7 @@
#include "gtk/compat.h"
#include "gtk/menu.h"
#include "gtk/warn.h"
+#include "gtk/accelerator.h"
/**
* Adds image menu item to a menu.
@@ -34,28 +35,37 @@
* \param menu the menu to add the item to
* \param item_out a pointer to the item's location in the menu struct
* \param message the menu item I18n lookup value
- * \param messageAccel the menu item accelerator I18n lookup value
* \param group the 'global' in a gtk sense accelerator group
* \return true if sucessful and \a item_out updated else false.
*/
-static bool nsgtk_menu_add_image_item(GtkMenu *menu,
- GtkWidget **item_out, const char *message,
- const char *messageAccel, GtkAccelGroup *group)
+static bool
+nsgtk_menu_add_image_item(GtkMenu *menu,
+ GtkWidget **item_out,
+ const char *message,
+ GtkAccelGroup *group)
{
unsigned int key;
GdkModifierType mod;
GtkWidget *item;
+ const char *accelerator_desc; /* accelerator key description */
item = nsgtk_image_menu_item_new_with_mnemonic(messages_get(message));
if (item == NULL) {
return false;
}
- gtk_accelerator_parse(messages_get(messageAccel), &key, &mod);
- if (key > 0) {
- gtk_widget_add_accelerator(item, "activate", group, key, mod,
- GTK_ACCEL_VISIBLE);
+ accelerator_desc = nsgtk_accelerator_get_desc(message);
+ if (accelerator_desc != NULL) {
+ gtk_accelerator_parse(accelerator_desc, &key, &mod);
+ if (key > 0) {
+ gtk_widget_add_accelerator(item,
+ "activate",
+ group,
+ key,
+ mod,
+ GTK_ACCEL_VISIBLE);
+ }
}
gtk_menu_shell_append(GTK_MENU_SHELL(menu), item);
gtk_widget_show(item);
@@ -73,18 +83,19 @@ static bool nsgtk_menu_add_image_item(GtkMenu *menu,
n->m##_menu = GTK_MENU(gtk_menu_new())
#define IMAGE_ITEM(p, q, r, s, t)\
- nsgtk_menu_add_image_item(s->p##_menu, &(s->q##_menuitem), #r,\
- #r "Accel", t)
+ nsgtk_menu_add_image_item(s->p##_menu, &(s->q##_menuitem), #r, t)
-#define CHECK_ITEM(p, q, r, s)\
- s->q##_menuitem = GTK_CHECK_MENU_ITEM(\
+#define CHECK_ITEM(p, q, r, s) \
+ do { \
+ s->q##_menuitem = GTK_CHECK_MENU_ITEM( \
gtk_check_menu_item_new_with_mnemonic(\
messages_get(#r)));\
- if ((s->q##_menuitem != NULL) && (s->p##_menu != NULL)) {\
- gtk_menu_shell_append(GTK_MENU_SHELL(s->p##_menu),\
- GTK_WIDGET(s->q##_menuitem));\
- gtk_widget_show(GTK_WIDGET(s->q##_menuitem));\
- }
+ if ((s->q##_menuitem != NULL) && (s->p##_menu != NULL)) { \
+ gtk_menu_shell_append(GTK_MENU_SHELL(s->p##_menu), \
+ GTK_WIDGET(s->q##_menuitem)); \
+ gtk_widget_show(GTK_WIDGET(s->q##_menuitem)); \
+ } \
+ } while(0)
#define SET_SUBMENU(q, r) \
do { \
@@ -130,24 +141,26 @@ static bool nsgtk_menu_add_image_item(GtkMenu *menu,
* creates an export submenu
* \param group the 'global' in a gtk sense accelerator reference
*/
-
-static struct nsgtk_export_submenu *nsgtk_menu_export_submenu(GtkAccelGroup *group)
+static struct nsgtk_export_submenu *
+nsgtk_menu_export_submenu(GtkAccelGroup *group)
{
- struct nsgtk_export_submenu *ret = malloc(sizeof(struct
- nsgtk_export_submenu));
+ struct nsgtk_export_submenu *ret;
+ ret = malloc(sizeof(struct nsgtk_export_submenu));
+
if (ret == NULL) {
nsgtk_warning(messages_get("NoMemory"), 0);
return NULL;
}
+
ret->export_menu = GTK_MENU(gtk_menu_new());
if (ret->export_menu == NULL) {
nsgtk_warning(messages_get("NoMemory"), 0);
free(ret);
return NULL;
}
+
+ IMAGE_ITEM(export, savepage, gtkSavePage, ret, group);
IMAGE_ITEM(export, plaintext, gtkPlainText, ret, group);
- IMAGE_ITEM(export, drawfile, gtkDrawFile, ret, group);
- IMAGE_ITEM(export, postscript, gtkPostScript, ret, group);
IMAGE_ITEM(export, pdf, gtkPDF, ret, group);
return ret;
}
@@ -157,8 +170,8 @@ static struct nsgtk_export_submenu *nsgtk_menu_export_submenu(GtkAccelGroup *gro
* \param group the 'global' in a gtk sense accelerator reference
*/
-static struct nsgtk_scaleview_submenu *nsgtk_menu_scaleview_submenu(
- GtkAccelGroup *group)
+static struct nsgtk_scaleview_submenu *
+nsgtk_menu_scaleview_submenu(GtkAccelGroup *group)
{
struct nsgtk_scaleview_submenu *ret =
malloc(sizeof(struct nsgtk_scaleview_submenu));
@@ -185,7 +198,8 @@ static struct nsgtk_scaleview_submenu *nsgtk_menu_scaleview_submenu(
static struct nsgtk_tabs_submenu *nsgtk_menu_tabs_submenu(GtkAccelGroup *group)
{
- struct nsgtk_tabs_submenu *ret = malloc(sizeof(struct nsgtk_tabs_submenu));
+ struct nsgtk_tabs_submenu *ret;
+ ret = malloc(sizeof(struct nsgtk_tabs_submenu));
if (ret == NULL) {
nsgtk_warning(messages_get("NoMemory"), 0);
return NULL;
@@ -203,57 +217,45 @@ static struct nsgtk_tabs_submenu *nsgtk_menu_tabs_submenu(GtkAccelGroup *group)
return ret;
}
-/**
-* creates an images submenu
-* \param group the 'global' in a gtk sense accelerator reference
-*/
-static struct nsgtk_images_submenu *nsgtk_menu_images_submenu(GtkAccelGroup *group)
+/**
+ * creates a toolbars submenu
+ *
+ * \param group the 'global' in a gtk sense accelerator reference
+ */
+static struct nsgtk_toolbars_submenu *
+nsgtk_menu_toolbars_submenu(GtkAccelGroup *group)
{
- struct nsgtk_images_submenu *ret =
- malloc(sizeof(struct nsgtk_images_submenu));
- if (ret == NULL) {
+ struct nsgtk_toolbars_submenu *tmenu;
+
+ tmenu = malloc(sizeof(struct nsgtk_toolbars_submenu));
+ if (tmenu == NULL) {
nsgtk_warning(messages_get("NoMemory"), 0);
return NULL;
}
- ret->images_menu = GTK_MENU(gtk_menu_new());
- if (ret->images_menu == NULL) {
+
+ tmenu->toolbars_menu = GTK_MENU(gtk_menu_new());
+ if (tmenu->toolbars_menu == NULL) {
nsgtk_warning(messages_get("NoMemory"), 0);
- free(ret);
+ free(tmenu);
return NULL;
}
- CHECK_ITEM(images, foregroundimages, gtkForegroundImages, ret)
- CHECK_ITEM(images, backgroundimages, gtkBackgroundImages, ret)
- return ret;
-}
-
-/**
-* creates a toolbars submenu
-* \param group the 'global' in a gtk sense accelerator reference
-*/
-static struct nsgtk_toolbars_submenu *nsgtk_menu_toolbars_submenu(
- GtkAccelGroup *group)
-{
- struct nsgtk_toolbars_submenu *ret =
- malloc(sizeof(struct nsgtk_toolbars_submenu));
- if (ret == NULL) {
- nsgtk_warning(messages_get("NoMemory"), 0);
- return NULL;
+ CHECK_ITEM(toolbars, menubar, gtkMenuBar, tmenu);
+ if (tmenu->menubar_menuitem != NULL) {
+ gtk_check_menu_item_set_active(tmenu->menubar_menuitem, TRUE);
}
- ret->toolbars_menu = GTK_MENU(gtk_menu_new());
- if (ret->toolbars_menu == NULL) {
- nsgtk_warning(messages_get("NoMemory"), 0);
- free(ret);
- return NULL;
+
+ CHECK_ITEM(toolbars, toolbar, gtkToolBar, tmenu);
+ if (tmenu->toolbar_menuitem != NULL) {
+ gtk_check_menu_item_set_active(tmenu->toolbar_menuitem, TRUE);
}
- CHECK_ITEM(toolbars, menubar, gtkMenuBar, ret)
- if (ret->menubar_menuitem != NULL)
- gtk_check_menu_item_set_active(ret->menubar_menuitem, TRUE);
- CHECK_ITEM(toolbars, toolbar, gtkToolBar, ret)
- if (ret->toolbar_menuitem != NULL)
- gtk_check_menu_item_set_active(ret->toolbar_menuitem, TRUE);
- return ret;
+
+ ADD_SEP(toolbars, tmenu);
+
+ IMAGE_ITEM(toolbars, customize, gtkCustomize, tmenu, group);
+
+ return tmenu;
}
/**
@@ -261,8 +263,8 @@ static struct nsgtk_toolbars_submenu *nsgtk_menu_toolbars_submenu(
* \param group the 'global' in a gtk sense accelerator reference
*/
-static struct nsgtk_developer_submenu *nsgtk_menu_developer_submenu(
- GtkAccelGroup *group)
+static struct nsgtk_developer_submenu *
+nsgtk_menu_developer_submenu(GtkAccelGroup *group)
{
struct nsgtk_developer_submenu *dmenu =
malloc(sizeof(struct nsgtk_developer_submenu));
@@ -313,7 +315,6 @@ static struct nsgtk_file_menu *nsgtk_menu_file_submenu(GtkAccelGroup *group)
IMAGE_ITEM(file, openfile, gtkOpenFile, fmenu, group);
IMAGE_ITEM(file, closewindow, gtkCloseWindow, fmenu, group);
ADD_SEP(file, fmenu);
- IMAGE_ITEM(file, savepage, gtkSavePage, fmenu, group);
IMAGE_ITEM(file, export, gtkExport, fmenu, group);
ADD_SEP(file, fmenu);
IMAGE_ITEM(file, printpreview, gtkPrintPreview, fmenu, group);
@@ -375,22 +376,16 @@ static struct nsgtk_view_menu *nsgtk_menu_view_submenu(GtkAccelGroup *group)
free(ret);
return NULL;
}
- IMAGE_ITEM(view, stop, gtkStop, ret, group);
- IMAGE_ITEM(view, reload, gtkReload, ret, group);
- ADD_SEP(view, ret);
IMAGE_ITEM(view, scaleview, gtkScaleView, ret, group);
+ SET_SUBMENU(scaleview, ret);
IMAGE_ITEM(view, fullscreen, gtkFullScreen, ret, group);
ADD_SEP(view, ret);
- IMAGE_ITEM(view, images, gtkImages, ret, group);
IMAGE_ITEM(view, toolbars, gtkToolbars, ret, group);
+ SET_SUBMENU(toolbars, ret);
IMAGE_ITEM(view, tabs, gtkTabs, ret, group);
+ SET_SUBMENU(tabs, ret);
ADD_SEP(view, ret);
IMAGE_ITEM(view, savewindowsize, gtkSaveWindowSize, ret, group);
- SET_SUBMENU(scaleview, ret);
- SET_SUBMENU(images, ret);
- SET_SUBMENU(toolbars, ret);
- SET_SUBMENU(tabs, ret);
-
return ret;
}
@@ -416,6 +411,8 @@ static struct nsgtk_nav_menu *nsgtk_menu_nav_submenu(GtkAccelGroup *group)
IMAGE_ITEM(nav, back, gtkBack, ret, group);
IMAGE_ITEM(nav, forward, gtkForward, ret, group);
+ IMAGE_ITEM(nav, stop, gtkStop, ret, group);
+ IMAGE_ITEM(nav, reload, gtkReload, ret, group);
IMAGE_ITEM(nav, home, gtkHome, ret, group);
ADD_SEP(nav, ret);
IMAGE_ITEM(nav, localhistory, gtkLocalHistory, ret, group);
@@ -426,7 +423,6 @@ static struct nsgtk_nav_menu *nsgtk_menu_nav_submenu(GtkAccelGroup *group)
ADD_SEP(nav, ret);
IMAGE_ITEM(nav, openlocation, gtkOpenLocation, ret, group);
-
return ret;
}
@@ -521,44 +517,61 @@ nsgtk_menu_bar_create(GtkMenuShell *menubar, GtkAccelGroup *group)
return nmenu;
}
+
/* exported function documented in gtk/menu.h */
-struct nsgtk_popup_menu *nsgtk_popup_menu_create(GtkAccelGroup *group)
+struct nsgtk_burger_menu *nsgtk_burger_menu_create(GtkAccelGroup *group)
{
- struct nsgtk_popup_menu *nmenu;
+ struct nsgtk_burger_menu *nmenu;
- NEW_MENU(nmenu, popup);
+ NEW_MENU(nmenu, burger);
- IMAGE_ITEM(popup, file, gtkFile, nmenu, group);
+ IMAGE_ITEM(burger, file, gtkFile, nmenu, group);
SET_SUBMENU(file, nmenu);
- IMAGE_ITEM(popup, edit, gtkEdit, nmenu, group);
+ IMAGE_ITEM(burger, edit, gtkEdit, nmenu, group);
SET_SUBMENU(edit, nmenu);
- IMAGE_ITEM(popup, view, gtkView, nmenu, group);
+ IMAGE_ITEM(burger, view, gtkView, nmenu, group);
SET_SUBMENU(view, nmenu);
- IMAGE_ITEM(popup, nav, gtkNavigate, nmenu, group);
+ IMAGE_ITEM(burger, nav, gtkNavigate, nmenu, group);
SET_SUBMENU(nav, nmenu);
- IMAGE_ITEM(popup, tools, gtkTools, nmenu, group);
+ IMAGE_ITEM(burger, tools, gtkTools, nmenu, group);
SET_SUBMENU(tools, nmenu);
- IMAGE_ITEM(popup, help, gtkHelp, nmenu, group);
+ IMAGE_ITEM(burger, help, gtkHelp, nmenu, group);
SET_SUBMENU(help, nmenu);
- ADD_NAMED_SEP(popup, first, nmenu);
+ return nmenu;
+}
- IMAGE_ITEM(popup, back, gtkBack, nmenu, group);
- IMAGE_ITEM(popup, forward, gtkForward, nmenu, group);
- ADD_NAMED_SEP(popup, third, nmenu);
+/* exported function documented in gtk/menu.h */
+struct nsgtk_popup_menu *nsgtk_popup_menu_create(GtkAccelGroup *group)
+{
+ struct nsgtk_popup_menu *nmenu;
+
+ NEW_MENU(nmenu, popup);
+ IMAGE_ITEM(popup, back, gtkBack, nmenu, group);
+ IMAGE_ITEM(popup, forward, gtkForward, nmenu, group);
IMAGE_ITEM(popup, stop, gtkStop, nmenu, group);
IMAGE_ITEM(popup, reload, gtkReload, nmenu, group);
+
+ ADD_NAMED_SEP(popup, first, nmenu);
+
IMAGE_ITEM(popup, cut, gtkCut, nmenu, group);
IMAGE_ITEM(popup, copy, gtkCopy, nmenu, group);
IMAGE_ITEM(popup, paste, gtkPaste, nmenu, group);
- IMAGE_ITEM(popup, customize, gtkCustomize, nmenu, group);
+
+ ADD_NAMED_SEP(popup, second, nmenu);
+
+ IMAGE_ITEM(popup, toolbars, gtkToolbars, nmenu, group);
+ SET_SUBMENU(toolbars, nmenu);
+
+ IMAGE_ITEM(popup, tools, gtkTools, nmenu, group);
+ SET_SUBMENU(tools, nmenu);
return nmenu;
}
@@ -583,3 +596,71 @@ nsgtk_link_menu_create(GtkAccelGroup *group)
return nmenu;
}
+
+
+/* exported function documented in gtk/menu.h */
+nserror nsgtk_menu_bar_destroy(struct nsgtk_bar_submenu *menu)
+{
+ gtk_widget_destroy(GTK_WIDGET(menu->bar_menu));
+
+ free(menu->file_submenu->export_submenu);
+ free(menu->file_submenu);
+ free(menu->edit_submenu);
+ free(menu->view_submenu->tabs_submenu);
+ free(menu->view_submenu->toolbars_submenu);
+ free(menu->view_submenu->scaleview_submenu);
+ free(menu->view_submenu);
+ free(menu->nav_submenu);
+ free(menu->tools_submenu->developer_submenu);
+ free(menu->tools_submenu);
+ free(menu->help_submenu);
+ free(menu);
+
+ return NSERROR_OK;
+}
+
+/* exported function documented in gtk/menu.h */
+nserror nsgtk_burger_menu_destroy(struct nsgtk_burger_menu *menu)
+{
+ gtk_widget_destroy(GTK_WIDGET(menu->burger_menu));
+
+ free(menu->file_submenu->export_submenu);
+ free(menu->file_submenu);
+ free(menu->edit_submenu);
+ free(menu->view_submenu->tabs_submenu);
+ free(menu->view_submenu->toolbars_submenu);
+ free(menu->view_submenu->scaleview_submenu);
+ free(menu->view_submenu);
+ free(menu->nav_submenu);
+ free(menu->tools_submenu->developer_submenu);
+ free(menu->tools_submenu);
+ free(menu->help_submenu);
+ free(menu);
+
+ return NSERROR_OK;
+}
+
+
+/* exported function documented in gtk/menu.h */
+nserror nsgtk_popup_menu_destroy(struct nsgtk_popup_menu *menu)
+{
+ gtk_widget_destroy(GTK_WIDGET(menu->popup_menu));
+
+ free(menu->toolbars_submenu);
+ free(menu->tools_submenu->developer_submenu);
+ free(menu->tools_submenu);
+ free(menu);
+
+ return NSERROR_OK;
+}
+
+
+/* exported function documented in gtk/menu.h */
+nserror nsgtk_link_menu_destroy(struct nsgtk_link_menu *menu)
+{
+ gtk_widget_destroy(GTK_WIDGET(menu->link_menu));
+
+ free(menu);
+
+ return NSERROR_OK;
+}
diff --git a/frontends/gtk/menu.h b/frontends/gtk/menu.h
index 5da5cb1b2..cf63b334a 100644
--- a/frontends/gtk/menu.h
+++ b/frontends/gtk/menu.h
@@ -15,66 +15,68 @@
* 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_GTK_MENU_H_
-#define _NETSURF_GTK_MENU_H_
+#ifndef NETSURF_GTK_MENU_H_
+#define NETSURF_GTK_MENU_H_
#include <gtk/gtk.h>
+/**
+ * File menu item on menubar
+ */
struct nsgtk_file_menu {
- GtkMenuItem *file; /* File menu item on menubar */
- GtkMenu *file_menu;
- GtkWidget *newwindow_menuitem;
- GtkWidget *newtab_menuitem;
- GtkWidget *openfile_menuitem;
- GtkWidget *closewindow_menuitem;
- GtkWidget *savepage_menuitem;
- GtkWidget *export_menuitem;
- struct nsgtk_export_submenu *export_submenu;
- GtkWidget *printpreview_menuitem;
- GtkWidget *print_menuitem;
- GtkWidget *quit_menuitem;
+ GtkMenuItem *file;
+ GtkMenu *file_menu;
+ GtkWidget *newwindow_menuitem;
+ GtkWidget *newtab_menuitem;
+ GtkWidget *openfile_menuitem;
+ GtkWidget *closewindow_menuitem;
+ GtkWidget *export_menuitem;
+ struct nsgtk_export_submenu *export_submenu;
+ GtkWidget *printpreview_menuitem;
+ GtkWidget *print_menuitem;
+ GtkWidget *quit_menuitem;
};
struct nsgtk_edit_menu {
- GtkMenuItem *edit; /* Edit menu item on menubar */
- GtkMenu *edit_menu;
- GtkWidget *cut_menuitem;
- GtkWidget *copy_menuitem;
- GtkWidget *paste_menuitem;
- GtkWidget *delete_menuitem;
- GtkWidget *selectall_menuitem;
- GtkWidget *find_menuitem;
- GtkWidget *preferences_menuitem;
+ GtkMenuItem *edit; /* Edit menu item on menubar */
+ GtkMenu *edit_menu;
+ GtkWidget *cut_menuitem;
+ GtkWidget *copy_menuitem;
+ GtkWidget *paste_menuitem;
+ GtkWidget *delete_menuitem;
+ GtkWidget *selectall_menuitem;
+ GtkWidget *find_menuitem;
+ GtkWidget *preferences_menuitem;
};
struct nsgtk_view_menu {
- GtkMenuItem *view; /* View menu item on menubar */
- GtkMenu *view_menu; /* gtk menu attached to menu item */
- GtkWidget *stop_menuitem;
- GtkWidget *reload_menuitem;
- GtkWidget *scaleview_menuitem;
+ GtkMenuItem *view; /* View menu item on menubar */
+ GtkMenu *view_menu; /* gtk menu attached to menu item */
+
+ GtkWidget *scaleview_menuitem;
struct nsgtk_scaleview_submenu *scaleview_submenu;
- GtkWidget *fullscreen_menuitem;
- GtkWidget *images_menuitem;
- struct nsgtk_images_submenu *images_submenu;
- GtkWidget *toolbars_menuitem;
- struct nsgtk_toolbars_submenu *toolbars_submenu;
- GtkWidget *tabs_menuitem;
- struct nsgtk_tabs_submenu *tabs_submenu;
- GtkWidget *savewindowsize_menuitem;
+ GtkWidget *fullscreen_menuitem;
+ GtkWidget *toolbars_menuitem;
+ struct nsgtk_toolbars_submenu *toolbars_submenu;
+ GtkWidget *tabs_menuitem;
+ struct nsgtk_tabs_submenu *tabs_submenu;
+ GtkWidget *savewindowsize_menuitem;
};
struct nsgtk_nav_menu {
- GtkMenuItem *nav; /* Nav menu item on menubar */
- GtkMenu *nav_menu;
- GtkWidget *back_menuitem;
- GtkWidget *forward_menuitem;
- GtkWidget *home_menuitem;
- GtkWidget *localhistory_menuitem;
- GtkWidget *globalhistory_menuitem;
- GtkWidget *addbookmarks_menuitem;
- GtkWidget *showbookmarks_menuitem;
- GtkWidget *openlocation_menuitem;
+ GtkMenuItem *nav; /* Nav menu item on menubar */
+ GtkMenu *nav_menu;
+
+ GtkWidget *back_menuitem;
+ GtkWidget *forward_menuitem;
+ GtkWidget *stop_menuitem;
+ GtkWidget *reload_menuitem;
+ GtkWidget *home_menuitem;
+ GtkWidget *localhistory_menuitem;
+ GtkWidget *globalhistory_menuitem;
+ GtkWidget *addbookmarks_menuitem;
+ GtkWidget *showbookmarks_menuitem;
+ GtkWidget *openlocation_menuitem;
};
struct nsgtk_tools_menu {
@@ -88,47 +90,41 @@ struct nsgtk_tools_menu {
};
struct nsgtk_help_menu {
- GtkMenuItem *help; /* Help menu item on menubar */
- GtkMenu *help_menu;
- GtkWidget *contents_menuitem;
- GtkWidget *guide_menuitem;
- GtkWidget *info_menuitem;
- GtkWidget *about_menuitem;
+ GtkMenuItem *help; /* Help menu item on menubar */
+ GtkMenu *help_menu;
+ GtkWidget *contents_menuitem;
+ GtkWidget *guide_menuitem;
+ GtkWidget *info_menuitem;
+ GtkWidget *about_menuitem;
};
struct nsgtk_export_submenu {
- GtkMenu *export_menu;
- GtkWidget *plaintext_menuitem;
- GtkWidget *drawfile_menuitem;
- GtkWidget *postscript_menuitem;
- GtkWidget *pdf_menuitem;
+ GtkMenu *export_menu;
+ GtkWidget *savepage_menuitem;
+ GtkWidget *plaintext_menuitem;
+ GtkWidget *pdf_menuitem;
};
struct nsgtk_scaleview_submenu {
- GtkMenu *scaleview_menu;
- GtkWidget *zoomplus_menuitem;
- GtkWidget *zoomminus_menuitem;
- GtkWidget *zoomnormal_menuitem;
+ GtkMenu *scaleview_menu;
+ GtkWidget *zoomplus_menuitem;
+ GtkWidget *zoomminus_menuitem;
+ GtkWidget *zoomnormal_menuitem;
};
struct nsgtk_tabs_submenu {
- GtkMenu *tabs_menu;
- GtkWidget *nexttab_menuitem;
- GtkWidget *prevtab_menuitem;
- GtkWidget *closetab_menuitem;
-};
-
-struct nsgtk_images_submenu {
- GtkMenu *images_menu;
- GtkCheckMenuItem *foregroundimages_menuitem;
- GtkCheckMenuItem *backgroundimages_menuitem;
+ GtkMenu *tabs_menu;
+ GtkWidget *nexttab_menuitem;
+ GtkWidget *prevtab_menuitem;
+ GtkWidget *closetab_menuitem;
};
struct nsgtk_toolbars_submenu {
- GtkMenu *toolbars_menu;
- GtkCheckMenuItem *menubar_menuitem;
- GtkCheckMenuItem *toolbar_menuitem;
+ GtkMenu *toolbars_menu;
+ GtkCheckMenuItem *menubar_menuitem;
+ GtkCheckMenuItem *toolbar_menuitem;
+ GtkWidget *customize_menuitem;
};
struct nsgtk_developer_submenu {
@@ -140,20 +136,21 @@ struct nsgtk_developer_submenu {
GtkWidget *debugdomtree_menuitem;
};
-
+/**
+ * main menubar
+ */
struct nsgtk_bar_submenu {
GtkMenuBar *bar_menu;
struct nsgtk_file_menu *file_submenu;
struct nsgtk_edit_menu *edit_submenu;
struct nsgtk_view_menu *view_submenu;
struct nsgtk_nav_menu *nav_submenu;
- struct nsgtk_tabs_submenu *tabs_submenu;
struct nsgtk_tools_menu *tools_submenu;
struct nsgtk_help_menu *help_submenu;
};
-struct nsgtk_popup_menu {
- GtkMenu *popup_menu;
+struct nsgtk_burger_menu {
+ GtkMenu *burger_menu;
GtkWidget *file_menuitem;
struct nsgtk_file_menu *file_submenu;
@@ -167,32 +164,35 @@ struct nsgtk_popup_menu {
GtkWidget *nav_menuitem;
struct nsgtk_nav_menu *nav_submenu;
- GtkWidget *tabs_menuitem;
- struct nsgtk_tabs_submenu *tabs_submenu;
-
GtkWidget *tools_menuitem;
struct nsgtk_tools_menu *tools_submenu;
GtkWidget *help_menuitem;
struct nsgtk_help_menu *help_submenu;
+};
- GtkWidget *first_separator;
+struct nsgtk_popup_menu {
+ GtkMenu *popup_menu;
/* navigation entries */
GtkWidget *back_menuitem;
GtkWidget *forward_menuitem;
-
- GtkWidget *third_separator;
-
- /* view entries */
GtkWidget *stop_menuitem;
GtkWidget *reload_menuitem;
+ GtkWidget *first_separator;
+
+ /* edit entries */
GtkWidget *cut_menuitem;
GtkWidget *copy_menuitem;
GtkWidget *paste_menuitem;
- GtkWidget *customize_menuitem;
+ GtkWidget *second_separator;
+
+ GtkWidget *toolbars_menuitem;
+ struct nsgtk_toolbars_submenu *toolbars_submenu;
+ GtkWidget *tools_menuitem;
+ struct nsgtk_tools_menu *tools_submenu;
};
struct nsgtk_link_menu {
@@ -206,22 +206,82 @@ struct nsgtk_link_menu {
GtkWidget *copy_menuitem;
};
+
/**
- * Create main menu bar.
+ * Create main menubar menu.
*/
struct nsgtk_bar_submenu *nsgtk_menu_bar_create(GtkMenuShell *menubar, GtkAccelGroup *group);
+
+/**
+ * Generate burger menu.
+ *
+ * \param accelerator group to use with menu
+ * \return new menu structure or NULL on error
+ */
+struct nsgtk_burger_menu *nsgtk_burger_menu_create(GtkAccelGroup *group);
+
+
/**
- * Generate right click menu menu.
+ * Generate right click popup menu.
*
+ * \param accelerator group to use with menu
+ * \return new menu structure or NULL on error
*/
struct nsgtk_popup_menu *nsgtk_popup_menu_create(GtkAccelGroup *group);
+
/**
- * Generate context sensitive popup menu for link.
+ * Generate context sensitive link popup menu.
*
+ * \param accelerator group to use with menu
+ * \return new menu structure or NULL on error
*/
struct nsgtk_link_menu *nsgtk_link_menu_create(GtkAccelGroup *group);
+/**
+ * destroy bar menu
+ *
+ * destroys the gtk widgets associated with menu and frees all storage.
+ *
+ * \param menu menu to destroy
+ * \return NSERROR_OK and menu destroyed on success else error code
+ */
+nserror nsgtk_menu_bar_destroy(struct nsgtk_bar_submenu *menu);
+
+
+/**
+ * destroy burger menu
+ *
+ * destroys the gtk widgets associated with menu and frees all storage.
+ *
+ * \param menu menu to destroy
+ * \return NSERROR_OK and menu destroyed on success else error code
+ */
+nserror nsgtk_burger_menu_destroy(struct nsgtk_burger_menu *menu);
+
+
+/**
+ * destroy popup menu
+ *
+ * destroys the gtk widgets associated with menu and frees all storage.
+ *
+ * \param menu menu to destroy
+ * \return NSERROR_OK and menu destroyed on success else error code
+ */
+nserror nsgtk_popup_menu_destroy(struct nsgtk_popup_menu *menu);
+
+
+/**
+ * destroy link menu
+ *
+ * destroys the gtk widgets associated with menu and frees all storage.
+ *
+ * \param menu menu to destroy
+ * \return NSERROR_OK and menu destroyed on success else error code
+ */
+nserror nsgtk_link_menu_destroy(struct nsgtk_link_menu *menu);
+
+
#endif
diff --git a/frontends/gtk/misc.c b/frontends/gtk/misc.c
new file mode 100644
index 000000000..8ab1d914c
--- /dev/null
+++ b/frontends/gtk/misc.c
@@ -0,0 +1,192 @@
+/*
+ * Copyright 2021 Vincemt Sanders <vince@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 netsurf miscellaneous operations table
+ */
+
+#include <string.h>
+#include <stdbool.h>
+#include <gtk/gtk.h>
+
+#include "utils/config.h"
+#include "utils/errors.h"
+#include "utils/log.h"
+#include "utils/messages.h"
+#include "utils/nsurl.h"
+#include "netsurf/misc.h"
+#include "desktop/save_pdf.h"
+
+#include "gtk/compat.h"
+#include "gtk/warn.h"
+#include "gtk/schedule.h"
+#include "gtk/resources.h"
+#include "gtk/cookies.h"
+#include "gtk/misc.h"
+
+
+static nserror gui_launch_url(struct nsurl *url)
+{
+ gboolean ok;
+ GError *error = NULL;
+
+ ok = nsgtk_show_uri(NULL, nsurl_access(url), GDK_CURRENT_TIME, &error);
+ if (ok == TRUE) {
+ return NSERROR_OK;
+ }
+
+ if (error) {
+ nsgtk_warning(messages_get("URIOpenError"), error->message);
+ g_error_free(error);
+ }
+ return NSERROR_NO_FETCH_HANDLER;
+}
+
+static void nsgtk_PDF_set_pass(GtkButton *w, gpointer data)
+{
+ char **owner_pass = ((void **)data)[0];
+ char **user_pass = ((void **)data)[1];
+ GtkWindow *wnd = ((void **)data)[2];
+ GtkBuilder *password_builder = ((void **)data)[3];
+ char *path = ((void **)data)[4];
+
+ char *op, *op1;
+ char *up, *up1;
+
+ op = strdup(gtk_entry_get_text(
+ GTK_ENTRY(gtk_builder_get_object(password_builder,
+ "entryPDFOwnerPassword"))));
+ op1 = strdup(gtk_entry_get_text(
+ GTK_ENTRY(gtk_builder_get_object(password_builder,
+ "entryPDFOwnerPassword1"))));
+ up = strdup(gtk_entry_get_text(
+ GTK_ENTRY(gtk_builder_get_object(password_builder,
+ "entryPDFUserPassword"))));
+ up1 = strdup(gtk_entry_get_text(
+ GTK_ENTRY(gtk_builder_get_object(password_builder,
+ "entryPDFUserPassword1"))));
+
+
+ if (op[0] == '\0') {
+ gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(password_builder,
+ "labelInfo")),
+ "Owner password must be at least 1 character long:");
+ free(op);
+ free(up);
+ } else if (!strcmp(op, up)) {
+ gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(password_builder,
+ "labelInfo")),
+ "User and owner passwords must be different:");
+ free(op);
+ free(up);
+ } else if (!strcmp(op, op1) && !strcmp(up, up1)) {
+
+ *owner_pass = op;
+ if (up[0] == '\0')
+ free(up);
+ else
+ *user_pass = up;
+
+ free(data);
+ gtk_widget_destroy(GTK_WIDGET(wnd));
+ g_object_unref(G_OBJECT(password_builder));
+
+ save_pdf(path);
+
+ free(path);
+ } else {
+ gtk_label_set_text(GTK_LABEL(gtk_builder_get_object(password_builder,
+ "labelInfo")), "Passwords not confirmed:");
+ free(op);
+ free(up);
+ }
+
+ free(op1);
+ free(up1);
+}
+
+static void nsgtk_PDF_no_pass(GtkButton *w, gpointer data)
+{
+ GtkWindow *wnd = ((void **)data)[2];
+ GtkBuilder *password_builder = ((void **)data)[3];
+ char *path = ((void **)data)[4];
+
+ free(data);
+
+ gtk_widget_destroy(GTK_WIDGET(wnd));
+ g_object_unref(G_OBJECT(password_builder));
+
+ save_pdf(path);
+
+ free(path);
+}
+
+static void nsgtk_pdf_password(char **owner_pass, char **user_pass, char *path)
+{
+ GtkButton *ok, *no;
+ GtkWindow *wnd;
+ void **data;
+ GtkBuilder *password_builder;
+ nserror res;
+
+ res = nsgtk_builder_new_from_resname("password", &password_builder);
+ if (res != NSERROR_OK) {
+ NSLOG(netsurf, INFO, "Password UI builder init failed");
+ return;
+ }
+
+ gtk_builder_connect_signals(password_builder, NULL);
+
+ wnd = GTK_WINDOW(gtk_builder_get_object(password_builder,
+ "wndPDFPassword"));
+
+ data = malloc(5 * sizeof(void *));
+
+ *owner_pass = NULL;
+ *user_pass = NULL;
+
+ data[0] = owner_pass;
+ data[1] = user_pass;
+ data[2] = wnd;
+ data[3] = password_builder;
+ data[4] = path;
+
+ ok = GTK_BUTTON(gtk_builder_get_object(password_builder,
+ "buttonPDFSetPassword"));
+ no = GTK_BUTTON(gtk_builder_get_object(password_builder,
+ "buttonPDFNoPassword"));
+
+ g_signal_connect(G_OBJECT(ok), "clicked",
+ G_CALLBACK(nsgtk_PDF_set_pass), (gpointer)data);
+ g_signal_connect(G_OBJECT(no), "clicked",
+ G_CALLBACK(nsgtk_PDF_no_pass), (gpointer)data);
+
+ gtk_widget_show(GTK_WIDGET(wnd));
+}
+
+
+static struct gui_misc_table misc_table = {
+ .schedule = nsgtk_schedule,
+
+ .launch_url = gui_launch_url,
+ .pdf_password = nsgtk_pdf_password,
+ .present_cookies = nsgtk_cookies_present,
+};
+
+struct gui_misc_table *nsgtk_misc_table = &misc_table;
diff --git a/frontends/windows/filetype.h b/frontends/gtk/misc.h
index f71a0b2da..3a02c2254 100644
--- a/frontends/windows/filetype.h
+++ b/frontends/gtk/misc.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2014 Vincent Sanders <vince@netsurf-browser.org>
+ * Copyright 2021 Vincemt Sanders <vince@netsurf-browser.org>
*
* This file is part of NetSurf, http://www.netsurf-browser.org/
*
@@ -16,9 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef _NETSURF_WINDOWS_FILETYPE_H_
-#define _NETSURF_WINDOWS_FILETYPE_H_
+#ifndef NETSURF_GTK_MISC_H
+#define NETSURF_GTK_MISC_H 1
-struct gui_fetch_table *win32_fetch_table;
+extern struct gui_misc_table *nsgtk_misc_table;
#endif
diff --git a/frontends/gtk/options.h b/frontends/gtk/options.h
index 018a448be..7fd79d7c5 100644
--- a/frontends/gtk/options.h
+++ b/frontends/gtk/options.h
@@ -16,16 +16,13 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef _NETSURF_GTK_OPTIONS_H_
-#define _NETSURF_GTK_OPTIONS_H_
+#ifndef NETSURF_GTK_OPTIONS_H_
+#define NETSURF_GTK_OPTIONS_H_
/* currently nothing here */
#endif
-/* High quality image scaling */
-NSOPTION_BOOL(render_resample, true)
-
/* clear downloads */
NSOPTION_BOOL(downloads_clear, false)
@@ -47,9 +44,6 @@ NSOPTION_INTEGER(button_type, 0)
/* disallow popup windows */
NSOPTION_BOOL(disable_popups, false)
-/* disable content plugins */
-NSOPTION_BOOL(disable_plugins, false)
-
/* number of days to keep history data */
NSOPTION_INTEGER(history_age, 0)
@@ -72,4 +66,7 @@ NSOPTION_INTEGER(developer_view, 0)
NSOPTION_INTEGER(position_tab, 0)
/* Toolbar customisation */
-NSOPTION_STRING(toolbar_order, NULL)
+NSOPTION_STRING(toolbar_items, NULL)
+
+/* The menu and tool bars that are shown */
+NSOPTION_STRING(bar_show, NULL)
diff --git a/frontends/gtk/page_info.c b/frontends/gtk/page_info.c
new file mode 100644
index 000000000..0d76a2f71
--- /dev/null
+++ b/frontends/gtk/page_info.c
@@ -0,0 +1,258 @@
+/*
+ * Copyright 2015 Vincent Sanders <vince@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 gtk certificate viewing using gtk core windows.
+ */
+
+#include <stdint.h>
+#include <stdlib.h>
+#include <gtk/gtk.h>
+
+#include "utils/log.h"
+#include "utils/messages.h"
+#include "netsurf/keypress.h"
+#include "netsurf/plotters.h"
+#include "netsurf/misc.h"
+#include "netsurf/browser_window.h"
+#include "desktop/page-info.h"
+#include "desktop/gui_internal.h"
+
+#include "gtk/plotters.h"
+#include "gtk/scaffolding.h"
+#include "gtk/resources.h"
+#include "gtk/page_info.h"
+#include "gtk/corewindow.h"
+
+
+/**
+ * GTK certificate viewing window context
+ */
+struct nsgtk_pi_window {
+ /** GTK core window context */
+ struct nsgtk_corewindow core;
+ /** GTK builder for window */
+ GtkBuilder *builder;
+ /** GTK window being shown */
+ GtkWindow *dlg;
+ /** Core page-info window */
+ struct page_info *pi;
+};
+
+
+/**
+ * destroy a previously created page information window
+ */
+static gboolean
+nsgtk_pi_delete_event(GtkWidget *w, GdkEvent *event, gpointer data)
+{
+ struct nsgtk_pi_window *pi_win;
+ pi_win = (struct nsgtk_pi_window *)data;
+
+ page_info_destroy(pi_win->pi);
+
+ nsgtk_corewindow_fini(&pi_win->core);
+ gtk_widget_destroy(GTK_WIDGET(pi_win->dlg));
+ g_object_unref(G_OBJECT(pi_win->builder));
+ free(pi_win);
+
+ return FALSE;
+}
+
+/**
+ * Called to cause the page-info window to close cleanly
+ */
+static void
+nsgtk_pi_close_callback(void *pw)
+{
+ nsgtk_pi_delete_event(NULL, NULL, pw);
+}
+
+/**
+ * callback for mouse action for certificate verify on core window
+ *
+ * \param nsgtk_cw The nsgtk 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 appropriate error code
+ */
+static nserror
+nsgtk_pi_mouse(struct nsgtk_corewindow *nsgtk_cw,
+ browser_mouse_state mouse_state,
+ int x, int y)
+{
+ struct nsgtk_pi_window *pi_win;
+ bool did_something = false;
+ /* technically degenerate container of */
+ pi_win = (struct nsgtk_pi_window *)nsgtk_cw;
+
+ if (page_info_mouse_action(pi_win->pi, mouse_state, x, y, &did_something) == NSERROR_OK) {
+ if (did_something == true) {
+ /* Something happened so we need to close ourselves */
+ guit->misc->schedule(0, nsgtk_pi_close_callback, pi_win);
+ }
+ }
+
+ return NSERROR_OK;
+}
+
+/**
+ * callback for keypress for certificate verify on core window
+ *
+ * \param nsgtk_cw The nsgtk core window structure.
+ * \param nskey The netsurf key code
+ * \return NSERROR_OK on success otherwise appropriate error code
+ */
+static nserror
+nsgtk_pi_key(struct nsgtk_corewindow *nsgtk_cw, uint32_t nskey)
+{
+ struct nsgtk_pi_window *pi_win;
+
+ /* technically degenerate container of */
+ pi_win = (struct nsgtk_pi_window *)nsgtk_cw;
+
+ if (page_info_keypress(pi_win->pi, nskey)) {
+ return NSERROR_OK;
+ }
+ return NSERROR_NOT_IMPLEMENTED;
+}
+
+/**
+ * callback on draw event for certificate verify on core window
+ *
+ * \param nsgtk_cw The nsgtk core window structure.
+ * \param r The rectangle of the window that needs updating.
+ * \return NSERROR_OK on success otherwise appropriate error code
+ */
+static nserror
+nsgtk_pi_draw(struct nsgtk_corewindow *nsgtk_cw, struct rect *r)
+{
+ struct redraw_context ctx = {
+ .interactive = true,
+ .background_images = true,
+ .plot = &nsgtk_plotters
+ };
+ struct nsgtk_pi_window *pi_win;
+
+ /* technically degenerate container of */
+ pi_win = (struct nsgtk_pi_window *)nsgtk_cw;
+
+ page_info_redraw(pi_win->pi, 0, 0, r, &ctx);
+
+ return NSERROR_OK;
+}
+
+/* exported interface documented in gtk/page_info.h */
+nserror nsgtk_page_info(struct browser_window *bw)
+{
+ struct nsgtk_pi_window *ncwin;
+ nserror res;
+ GtkWindow *scaffwin = nsgtk_scaffolding_window(nsgtk_current_scaffolding());
+
+ ncwin = calloc(1, sizeof(struct nsgtk_pi_window));
+ if (ncwin == NULL) {
+ return NSERROR_NOMEM;
+ }
+
+ res = nsgtk_builder_new_from_resname("pageinfo", &ncwin->builder);
+ if (res != NSERROR_OK) {
+ NSLOG(netsurf, CRITICAL, "Page Info UI builder init failed %s", messages_get_errorcode(res));
+ free(ncwin);
+ return res;
+ }
+
+ gtk_builder_connect_signals(ncwin->builder, NULL);
+
+ ncwin->dlg = GTK_WINDOW(gtk_builder_get_object(ncwin->builder,
+ "PGIWindow"));
+
+ /* Configure for transient behaviour */
+ gtk_window_set_type_hint(GTK_WINDOW(ncwin->dlg),
+ GDK_WINDOW_TYPE_HINT_DROPDOWN_MENU);
+
+ gtk_window_set_modal(GTK_WINDOW(ncwin->dlg), TRUE);
+
+ gtk_window_group_add_window(gtk_window_get_group(scaffwin),
+ GTK_WINDOW(ncwin->dlg));
+
+ gtk_window_set_transient_for(GTK_WINDOW(ncwin->dlg), scaffwin);
+
+ gtk_window_set_screen(GTK_WINDOW(ncwin->dlg),
+ gtk_widget_get_screen(GTK_WIDGET(scaffwin)));
+
+ /* Attempt to place the window in the right place */
+ nsgtk_scaffolding_position_page_info(nsgtk_current_scaffolding(),
+ ncwin);
+
+ ncwin->core.drawing_area = GTK_DRAWING_AREA(
+ gtk_builder_get_object(ncwin->builder, "PGIDrawingArea"));
+
+ /* make the delete event call our destructor */
+ g_signal_connect(G_OBJECT(ncwin->dlg),
+ "delete_event",
+ G_CALLBACK(nsgtk_pi_delete_event),
+ ncwin);
+ /* Ditto if we lose the grab */
+ g_signal_connect(G_OBJECT(ncwin->dlg),
+ "grab-broken-event",
+ G_CALLBACK(nsgtk_pi_delete_event),
+ ncwin);
+ /* Handle button press events */
+ g_signal_connect(G_OBJECT(ncwin->dlg),
+ "button-press-event",
+ G_CALLBACK(nsgtk_pi_delete_event),
+ ncwin);
+
+ /* initialise GTK core window */
+ ncwin->core.draw = nsgtk_pi_draw;
+ ncwin->core.key = nsgtk_pi_key;
+ ncwin->core.mouse = nsgtk_pi_mouse;
+
+ res = nsgtk_corewindow_init(&ncwin->core);
+ if (res != NSERROR_OK) {
+ g_object_unref(G_OBJECT(ncwin->dlg));
+ free(ncwin);
+ return res;
+ }
+
+ res = page_info_create(ncwin->core.cb_table,
+ (struct core_window *)ncwin,
+ bw, &ncwin->pi);
+ if (res != NSERROR_OK) {
+ g_object_unref(G_OBJECT(ncwin->dlg));
+ free(ncwin);
+ return res;
+ }
+
+ gtk_widget_show(GTK_WIDGET(ncwin->dlg));
+
+ gtk_widget_grab_focus(GTK_WIDGET(ncwin->dlg));
+
+ return NSERROR_OK;
+}
+
+/* exported interface documented in gtk/page_info.h */
+void
+nsgtk_page_info_set_position(struct nsgtk_pi_window *win, int x, int y)
+{
+ NSLOG(netsurf, INFO, "win=%p x=%d y=%d", win, x, y);
+
+ gtk_window_move(GTK_WINDOW(win->dlg), x, y);
+}
diff --git a/frontends/gtk/ssl_cert.h b/frontends/gtk/page_info.h
index 1712756e9..23e1e348c 100644
--- a/frontends/gtk/ssl_cert.h
+++ b/frontends/gtk/page_info.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 James Bursa <bursa@users.sourceforge.net>
+ * Copyright 2019 Vincent Sanders <vince@netsurf-browser.org>
*
* This file is part of NetSurf, http://www.netsurf-browser.org/
*
@@ -16,22 +16,25 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef NETSURF_GTK_SSL_CERT_H
-#define NETSURF_GTK_SSL_CERT_H 1
-
-struct nsurl;
-struct ssl_cert_info;
+#ifndef NETSURF_GTK_PAGE_INFO_H
+#define NETSURF_GTK_PAGE_INFO_H 1
/**
- * Prompt the user to verify a certificate with issuse.
+ * Page information window
*
- * \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
+ * \param bw the browser window to get page information for
* \return NSERROR_OK or error code if prompt creation failed.
*/
-nserror gtk_cert_verify(struct nsurl *url, const struct ssl_cert_info *certs, unsigned long num, nserror (*cb)(bool proceed, void *pw), void *cbpw);
+nserror nsgtk_page_info(struct browser_window *bw);
+
+/**
+ * Position the given page information window at the given
+ * coordinates.
+ *
+ * \param pi the page info window to position
+ * \param x the X coordinate for the top left of the window
+ * \param y the Y coordinate for the top left of the window
+ */
+void nsgtk_page_info_set_position(struct nsgtk_pi_window *pi, int x, int y);
#endif
diff --git a/frontends/gtk/plotters.c b/frontends/gtk/plotters.c
index 88e7760c6..110dcffc5 100644
--- a/frontends/gtk/plotters.c
+++ b/frontends/gtk/plotters.c
@@ -89,6 +89,20 @@ static inline void nsgtk_set_dashed(void)
/**
+ * Set cairo context line width.
+ */
+static inline void nsgtk_set_line_width(plot_style_fixed width)
+{
+ if (width == 0) {
+ cairo_set_line_width(current_cr, 1);
+ } else {
+ cairo_set_line_width(current_cr,
+ plot_style_fixed_to_double(width));
+ }
+}
+
+
+/**
* \brief Sets a clip rectangle for subsequent plot operations.
*
* \param ctx The current redraw context.
@@ -191,10 +205,7 @@ nsgtk_plot_disc(const struct redraw_context *ctx,
break;
}
- if (style->stroke_width == 0)
- cairo_set_line_width(current_cr, 1);
- else
- cairo_set_line_width(current_cr, style->stroke_width);
+ nsgtk_set_line_width(style->stroke_width);
cairo_arc(current_cr, x, y, radius, 0, M_PI * 2);
@@ -242,10 +253,7 @@ nsgtk_plot_line(const struct redraw_context *ctx,
nsgtk_set_colour(style->stroke_colour);
}
- if (style->stroke_width == 0)
- cairo_set_line_width(current_cr, 1);
- else
- cairo_set_line_width(current_cr, style->stroke_width);
+ nsgtk_set_line_width(style->stroke_width);
/* core expects horizontal and vertical lines to be on pixels, not
* between pixels
@@ -331,10 +339,7 @@ nsgtk_plot_rectangle(const struct redraw_context *ctx,
break;
}
- if (style->stroke_width == 0)
- cairo_set_line_width(current_cr, 1);
- else
- cairo_set_line_width(current_cr, style->stroke_width);
+ nsgtk_set_line_width(style->stroke_width);
cairo_rectangle(current_cr,
rect->x0 + 0.5,
@@ -394,7 +399,6 @@ nsgtk_plot_polygon(const struct redraw_context *ctx,
* \param pstyle Style controlling the path plot.
* \param p elements of path
* \param n nunber of elements on path
- * \param width The width of the path
* \param transform A transform to apply to the path.
* \return NSERROR_OK on success else error code.
*/
@@ -403,7 +407,6 @@ nsgtk_plot_path(const struct redraw_context *ctx,
const plot_style_t *pstyle,
const float *p,
unsigned int n,
- float width,
const float transform[6])
{
unsigned int i;
@@ -421,7 +424,7 @@ nsgtk_plot_path(const struct redraw_context *ctx,
cairo_get_matrix(current_cr, &old_ctm);
/* Set up line style and width */
- cairo_set_line_width(current_cr, 1);
+ nsgtk_set_line_width(pstyle->stroke_width);
nsgtk_set_solid();
/* Load new CTM */
@@ -429,8 +432,8 @@ nsgtk_plot_path(const struct redraw_context *ctx,
n_ctm.yx = transform[1];
n_ctm.xy = transform[2];
n_ctm.yy = transform[3];
- n_ctm.x0 = transform[4];
- n_ctm.y0 = transform[5];
+ n_ctm.x0 = transform[4] + old_ctm.x0;
+ n_ctm.y0 = transform[5] + old_ctm.y0;
cairo_set_matrix(current_cr, &n_ctm);
diff --git a/frontends/gtk/preferences.c b/frontends/gtk/preferences.c
index 65f41ed27..a44e7241e 100644
--- a/frontends/gtk/preferences.c
+++ b/frontends/gtk/preferences.c
@@ -30,6 +30,7 @@
#include "desktop/searchweb.h"
#include "gtk/compat.h"
+#include "gtk/toolbar_items.h"
#include "gtk/window.h"
#include "gtk/gui.h"
#include "gtk/scaffolding.h"
@@ -411,12 +412,6 @@ TOGGLEBUTTON_SIGNALS(checkHideAdverts, block_advertisements)
/* enable javascript */
TOGGLEBUTTON_SIGNALS(checkEnableJavascript, enable_javascript)
-/* disable plugins */
-TOGGLEBUTTON_SIGNALS(checkDisablePlugins, disable_plugins)
-
-/* high quality image scaling */
-TOGGLEBUTTON_SIGNALS(checkResampleImages, render_resample)
-
/* load and display of images */
G_MODULE_EXPORT void
nsgtk_preferences_comboboxLoadImages_changed(GtkComboBox *combo,
@@ -480,9 +475,6 @@ nsgtk_preferences_comboboxLoadImages_realize(GtkWidget *widget,
/* enable animation */
TOGGLEBUTTON_SIGNALS(checkEnableAnimations, animate_images)
-/* frame time */
-SPINBUTTON_SIGNALS(spinAnimationSpeed, minimum_gif_delay, 100.0)
-
/* Fonts */
/* default font */
@@ -511,7 +503,7 @@ SPINBUTTON_SIGNALS(spinDefaultSize, font_size, 10.0)
G_MODULE_EXPORT void
nsgtk_preferences_fontPreview_clicked(GtkButton *button, struct ppref *priv)
{
- nsgtk_reflow_all_windows();
+ nsgtk_window_update_all();
}
@@ -713,7 +705,7 @@ nsgtk_preferences_checkShowSingleTab_toggled(GtkToggleButton *togglebutton,
{
nsoption_set_bool(show_single_tab,
gtk_toggle_button_get_active(togglebutton));
- nsgtk_reflow_all_windows();
+ nsgtk_window_update_all();
}
G_MODULE_EXPORT void
@@ -735,20 +727,11 @@ G_MODULE_EXPORT void
nsgtk_preferences_comboTabPosition_changed(GtkComboBox *widget,
struct ppref *priv)
{
- struct nsgtk_scaffolding *current;
-
/* set the option */
nsoption_set_int(position_tab, gtk_combo_box_get_active(widget));
- /* update all notebooks in all scaffolds */
- current = nsgtk_scaffolding_iterate(NULL);
- while (current) {
- nsgtk_scaffolding_reset_offset(current);
-
- nsgtk_reflow_all_windows();
-
- current = nsgtk_scaffolding_iterate(current);
- }
+ /* update all windows */
+ nsgtk_window_update_all();
}
G_MODULE_EXPORT void
@@ -791,18 +774,10 @@ G_MODULE_EXPORT void
nsgtk_preferences_comboButtonType_changed(GtkComboBox *widget,
struct ppref *priv)
{
- struct nsgtk_scaffolding *current;
-
nsoption_set_int(button_type, gtk_combo_box_get_active(widget) + 1);
- current = nsgtk_scaffolding_iterate(NULL);
- while (current != NULL) {
- nsgtk_scaffolding_reset_offset(current);
-
- nsgtk_scaffolding_toolbars(current, nsoption_int(button_type));
-
- current = nsgtk_scaffolding_iterate(current);
- }
+ /* update all windows to adopt change */
+ nsgtk_window_update_all();
}
G_MODULE_EXPORT void
@@ -826,7 +801,7 @@ ENTRY_SIGNALS(entryHomePageURL, homepage_url)
G_MODULE_EXPORT void
nsgtk_preferences_setCurrentPage_clicked(GtkButton *button, struct ppref *priv)
{
- const gchar *url = nsurl_access(browser_window_get_url(priv->bw));
+ const gchar *url = nsurl_access(browser_window_access_url(priv->bw));
if (priv->entryHomePageURL != NULL) {
gtk_entry_set_text(GTK_ENTRY(priv->entryHomePageURL), url);
diff --git a/frontends/gtk/print.c b/frontends/gtk/print.c
index 8f71230a6..c4f1b0f7a 100644
--- a/frontends/gtk/print.c
+++ b/frontends/gtk/print.c
@@ -133,6 +133,17 @@ static inline void nsgtk_print_set_dashed(void)
cairo_set_dash(gtk_print_current_cr, cdashes, 1, 0);
}
+/** Set cairo context line width. */
+static inline void nsgtk_set_line_width(plot_style_fixed width)
+{
+ if (width == 0) {
+ cairo_set_line_width(gtk_print_current_cr, 1);
+ } else {
+ cairo_set_line_width(gtk_print_current_cr,
+ plot_style_fixed_to_double(width));
+ }
+}
+
/**
* \brief Sets a clip rectangle for subsequent plot operations.
@@ -248,10 +259,7 @@ nsgtk_print_plot_disc(const struct redraw_context *ctx,
break;
}
- if (style->stroke_width == 0)
- cairo_set_line_width(gtk_print_current_cr, 1);
- else
- cairo_set_line_width(gtk_print_current_cr, style->stroke_width);
+ nsgtk_set_line_width(style->stroke_width);
cairo_arc(gtk_print_current_cr, x, y, radius, 0, M_PI * 2);
@@ -294,10 +302,7 @@ nsgtk_print_plot_line(const struct redraw_context *ctx,
break;
}
- if (style->stroke_width == 0)
- cairo_set_line_width(gtk_print_current_cr, 1);
- else
- cairo_set_line_width(gtk_print_current_cr, style->stroke_width);
+ nsgtk_set_line_width(style->stroke_width);
cairo_move_to(gtk_print_current_cr, line->x0 + 0.5, line->y0 + 0.5);
cairo_line_to(gtk_print_current_cr, line->x1 + 0.5, line->y1 + 0.5);
@@ -350,13 +355,6 @@ nsgtk_print_plot_rectangle(const struct redraw_context *ctx,
}
if (style->stroke_type != PLOT_OP_TYPE_NONE) {
- int stroke_width;
-
- /* ensure minimum stroke width */
- stroke_width = style->stroke_width;
- if (stroke_width == 0) {
- stroke_width = 1;
- }
nsgtk_print_set_colour(style->stroke_colour);
@@ -375,7 +373,7 @@ nsgtk_print_plot_rectangle(const struct redraw_context *ctx,
break;
}
- cairo_set_line_width(gtk_print_current_cr, stroke_width);
+ nsgtk_set_line_width(style->stroke_width);
cairo_rectangle(gtk_print_current_cr,
rect->x0, rect->y0,
@@ -429,7 +427,6 @@ nsgtk_print_plot_polygon(const struct redraw_context *ctx,
* \param pstyle Style controlling the path plot.
* \param p elements of path
* \param n nunber of elements on path
- * \param width The width of the path
* \param transform A transform to apply to the path.
* \return NSERROR_OK on success else error code.
*/
@@ -438,7 +435,6 @@ nsgtk_print_plot_path(const struct redraw_context *ctx,
const plot_style_t *pstyle,
const float *p,
unsigned int n,
- float width,
const float transform[6])
{
/* Only the internal SVG renderer uses this plot call currently,
diff --git a/frontends/gtk/res/accelerators b/frontends/gtk/res/accelerators
new file mode 100644
index 000000000..2da229aff
--- /dev/null
+++ b/frontends/gtk/res/accelerators
@@ -0,0 +1,40 @@
+# GTK accelerator keys for menu entries
+# The keys must match those in the menus to be applied
+#
+# These are passed to gtk_accelerator_parse and must not be translated
+# The key names are the same as those in the gdk/gdkkeysyms.h header file
+# but without the leading “GDK_KEY_â€.
+
+gtkNextTab:<Control>Page_Down
+gtkPrevTab:<Control>Page_Up
+gtkCloseTab:<Control>w
+gtkNewTab:<Control>t
+gtkNewWindow:<Control>n
+gtkOpenFile:<Control>o
+gtkCloseWindow:<Control><shift>w
+gtkSavePage:<Control>s
+gtkPrintPreview:<Control><shift>p
+gtkPrint:<Control>p
+gtkQuitMenu:<Control>q
+gtkCut:<Control>x
+gtkCopy:<Control>c
+gtkPaste:<Control>v
+gtkSelectAll:<Control>a
+gtkFind:<Control>f
+gtkStop:Escape
+gtkReload:F5
+gtkZoomPlus:<Control>plus
+gtkZoomMinus:<Control>minus
+gtkZoomNormal:<Control>0
+gtkFullScreen:F11
+gtkPageSource:<Control>U
+gtkDownloads:<Control>j
+gtkBack:<alt>Left
+gtkForward:<alt>Right
+gtkHome:<alt>Down
+gtkLocalHistory:<Control>h
+gtkGlobalHistory:<Control><shift>h
+gtkAddBookMarks:<Control>d
+gtkShowBookMarks:F6
+gtkShowCookies:F9
+gtkOpenLocation:<Control>l
diff --git a/frontends/gtk/res/adblock.css b/frontends/gtk/res/adblock.css
index ff2485622..0d12aaa7c 120000
--- a/frontends/gtk/res/adblock.css
+++ b/frontends/gtk/res/adblock.css
@@ -1 +1 @@
-../../../!NetSurf/Resources/AdBlock,f79 \ No newline at end of file
+../../../resources/adblock.css \ No newline at end of file
diff --git a/frontends/gtk/res/arrow_down_8x32.png b/frontends/gtk/res/arrow_down_8x32.png
deleted file mode 100644
index 475b4ff61..000000000
--- a/frontends/gtk/res/arrow_down_8x32.png
+++ /dev/null
Binary files differ
diff --git a/frontends/gtk/res/ca-bundle.txt b/frontends/gtk/res/ca-bundle.txt
index 0b0e416ad..1187fa51a 120000
--- a/frontends/gtk/res/ca-bundle.txt
+++ b/frontends/gtk/res/ca-bundle.txt
@@ -1 +1 @@
-../../../!NetSurf/Resources/ca-bundle \ No newline at end of file
+../../../resources/ca-bundle \ No newline at end of file
diff --git a/frontends/gtk/res/de/welcome.html b/frontends/gtk/res/de/welcome.html
index 98a53b215..b77e23743 120000
--- a/frontends/gtk/res/de/welcome.html
+++ b/frontends/gtk/res/de/welcome.html
@@ -1 +1 @@
-../../../../!NetSurf/Resources/de/welcome.html,faf \ No newline at end of file
+../../../../resources/de/welcome.html \ No newline at end of file
diff --git a/frontends/gtk/res/default.css b/frontends/gtk/res/default.css
index a8579eb7c..fa3ae6c26 120000
--- a/frontends/gtk/res/default.css
+++ b/frontends/gtk/res/default.css
@@ -1 +1 @@
-../../../!NetSurf/Resources/CSS,f79 \ No newline at end of file
+../../../resources/default.css \ No newline at end of file
diff --git a/frontends/gtk/res/en/credits.html b/frontends/gtk/res/en/credits.html
index 252516fd7..f73ecd4aa 120000
--- a/frontends/gtk/res/en/credits.html
+++ b/frontends/gtk/res/en/credits.html
@@ -1 +1 @@
-../../../../!NetSurf/Resources/en/credits.html,faf \ No newline at end of file
+../../../../resources/en/credits.html \ No newline at end of file
diff --git a/frontends/gtk/res/en/licence.html b/frontends/gtk/res/en/licence.html
index 79f73669b..0c3b430b7 120000
--- a/frontends/gtk/res/en/licence.html
+++ b/frontends/gtk/res/en/licence.html
@@ -1 +1 @@
-../../../../!NetSurf/Resources/en/licence.html,faf \ No newline at end of file
+../../../../resources/en/licence.html \ No newline at end of file
diff --git a/frontends/gtk/res/en/maps.html b/frontends/gtk/res/en/maps.html
deleted file mode 120000
index bb3ffcbe7..000000000
--- a/frontends/gtk/res/en/maps.html
+++ /dev/null
@@ -1 +0,0 @@
-../../../../!NetSurf/Resources/en/maps.html,faf \ No newline at end of file
diff --git a/frontends/gtk/res/en/welcome.html b/frontends/gtk/res/en/welcome.html
index 601099223..543f31ddd 120000
--- a/frontends/gtk/res/en/welcome.html
+++ b/frontends/gtk/res/en/welcome.html
@@ -1 +1 @@
-../../../../!NetSurf/Resources/en/welcome.html,faf \ No newline at end of file
+../../../../resources/en/welcome.html \ No newline at end of file
diff --git a/frontends/gtk/res/fr/credits.html b/frontends/gtk/res/fr/credits.html
new file mode 120000
index 000000000..47da488e8
--- /dev/null
+++ b/frontends/gtk/res/fr/credits.html
@@ -0,0 +1 @@
+../../../../resources/fr/credits.html \ No newline at end of file
diff --git a/frontends/gtk/res/fr/licence.html b/frontends/gtk/res/fr/licence.html
new file mode 120000
index 000000000..2fd247ba8
--- /dev/null
+++ b/frontends/gtk/res/fr/licence.html
@@ -0,0 +1 @@
+../../../../resources/fr/licence.html \ No newline at end of file
diff --git a/frontends/gtk/res/fr/welcome.html b/frontends/gtk/res/fr/welcome.html
new file mode 120000
index 000000000..a7a2023ea
--- /dev/null
+++ b/frontends/gtk/res/fr/welcome.html
@@ -0,0 +1 @@
+../../../../resources/fr/welcome.html \ No newline at end of file
diff --git a/frontends/gtk/res/cookies.gtk2.ui b/frontends/gtk/res/gtk2/cookies.ui
index 86f15c765..86f15c765 100644
--- a/frontends/gtk/res/cookies.gtk2.ui
+++ b/frontends/gtk/res/gtk2/cookies.ui
diff --git a/frontends/gtk/res/downloads.gtk2.ui b/frontends/gtk/res/gtk2/downloads.ui
index 1e71328a4..1e71328a4 100644
--- a/frontends/gtk/res/downloads.gtk2.ui
+++ b/frontends/gtk/res/gtk2/downloads.ui
diff --git a/frontends/gtk/res/globalhistory.gtk2.ui b/frontends/gtk/res/gtk2/globalhistory.ui
index 2b89ecb4b..2b89ecb4b 100644
--- a/frontends/gtk/res/globalhistory.gtk2.ui
+++ b/frontends/gtk/res/gtk2/globalhistory.ui
diff --git a/frontends/gtk/res/hotlist.gtk2.ui b/frontends/gtk/res/gtk2/hotlist.ui
index af0fd5696..af0fd5696 100644
--- a/frontends/gtk/res/hotlist.gtk2.ui
+++ b/frontends/gtk/res/gtk2/hotlist.ui
diff --git a/frontends/gtk/res/localhistory.gtk2.ui b/frontends/gtk/res/gtk2/localhistory.ui
index 9512b6289..2003ed69a 100644
--- a/frontends/gtk/res/localhistory.gtk2.ui
+++ b/frontends/gtk/res/gtk2/localhistory.ui
@@ -2,6 +2,7 @@
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkWindow" id="wndHistory">
+ <property name="type">GTK_WINDOW_POPUP</property>
<property name="can_focus">False</property>
<property name="title" translatable="yes">NetSurf Local History</property>
<property name="window_position">center</property>
diff --git a/frontends/gtk/res/gtk2/netsurf.ui b/frontends/gtk/res/gtk2/netsurf.ui
new file mode 100644
index 000000000..adca54001
--- /dev/null
+++ b/frontends/gtk/res/gtk2/netsurf.ui
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 2.12 -->
+ <!-- interface-naming-policy toplevel-contextual -->
+ <object class="GtkAdjustment" id="adjustment1">
+ <property name="upper">100</property>
+ <property name="value">0.5357142857142857</property>
+ <property name="step_increment">26</property>
+ <property name="page_increment">10</property>
+ <property name="page_size">10</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment2">
+ <property name="upper">100</property>
+ <property name="step_increment">26</property>
+ <property name="page_increment">10</property>
+ <property name="page_size">10</property>
+ </object>
+ <object class="GtkWindow" id="wndBrowser">
+ <property name="can_focus">False</property>
+ <property name="title" translatable="yes">NetSurf</property>
+ <property name="window_position">center</property>
+ <child>
+ <object class="GtkVBox" id="vbox14">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkMenuBar" id="menubar">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkNotebook" id="notebook">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="show_tabs">False</property>
+ <property name="show_border">False</property>
+ <property name="scrollable">True</property>
+ <child>
+ <placeholder/>
+ </child>
+ <child type="tab">
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child type="tab">
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child type="tab">
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child type="tab">
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child type="tab">
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child type="tab">
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+</interface>
diff --git a/frontends/gtk/res/options.gtk2.ui b/frontends/gtk/res/gtk2/options.ui
index d5542ba5d..907d0b511 100644
--- a/frontends/gtk/res/options.gtk2.ui
+++ b/frontends/gtk/res/gtk2/options.ui
@@ -2,6 +2,297 @@
<interface>
<requires lib="gtk+" version="2.16"/>
<!-- interface-naming-policy project-wide -->
+ <object class="GtkAdjustment" id="adjustment_animation_time">
+ <property name="lower">0.10000000000000001</property>
+ <property name="upper">10</property>
+ <property name="value">0.10000000000000001</property>
+ <property name="step_increment">0.10000000000000001</property>
+ <property name="page_increment">1</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment_cache_disc_size">
+ <property name="upper">4096</property>
+ <property name="value">1024</property>
+ <property name="step_increment">32</property>
+ <property name="page_increment">256</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment_cache_memory_size">
+ <property name="upper">2048</property>
+ <property name="value">16</property>
+ <property name="step_increment">4</property>
+ <property name="page_increment">16</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment_disc_cache_age">
+ <property name="upper">999</property>
+ <property name="value">28</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment_fetching_cached">
+ <property name="upper">100</property>
+ <property name="value">1</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment_fetching_max">
+ <property name="lower">1</property>
+ <property name="upper">100</property>
+ <property name="value">10</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment_fetching_perhost">
+ <property name="lower">1</property>
+ <property name="upper">100</property>
+ <property name="value">1</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment_font_default_size">
+ <property name="lower">1</property>
+ <property name="upper">99.900000000000006</property>
+ <property name="value">16</property>
+ <property name="step_increment">0.10000000000000001</property>
+ <property name="page_increment">2</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment_history_age">
+ <property name="upper">999</property>
+ <property name="value">28</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">28</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment_pdf_lmargin">
+ <property name="upper">999</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment_pdf_scale">
+ <property name="lower">1</property>
+ <property name="upper">1000</property>
+ <property name="value">100</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment_proxy_port">
+ <property name="lower">1</property>
+ <property name="upper">65535</property>
+ <property name="value">3128</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkImage" id="image1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xpad">3</property>
+ <property name="stock">gtk-apply</property>
+ </object>
+ <object class="GtkListStore" id="liststore_content_language">
+ <columns>
+ <!-- column-name Code -->
+ <column type="gchararray"/>
+ <!-- column-name Description -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">en</col>
+ <col id="1" translatable="yes">English</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkListStore" id="liststore_defaultfont">
+ <columns>
+ <!-- column-name Type -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">preferencesFonttypeSans</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">preferencesFonttypeSerif</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">preferencesFonttypeMonospace</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">preferencesFonttypeCursive</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">preferencesFonttypeFantasy</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkListStore" id="liststore_developer_view">
+ <columns>
+ <!-- column-name Type -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">preferencesDeveloperViewWindow</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">preferencesDeveloperViewTab</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">preferencesDeveloperViewEditor</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkListStore" id="liststore_image_loading">
+ <columns>
+ <!-- column-name Type -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">preferencesImageLoadBoth</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">preferencesImageLoadFore</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">preferencesImageLoadBack</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">preferencesImageLoadNone</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkListStore" id="liststore_proxy_type">
+ <columns>
+ <!-- column-name Type -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">preferencesProxyTypeDirect</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">preferencesProxyTypeManual</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">preferencesProxyTypeBasic</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">preferencesProxyTypeNLTM</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">preferencesProxyTypeSystem</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkListStore" id="liststore_search_provider">
+ <columns>
+ <!-- column-name Provider -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0">Google</col>
+ </row>
+ <row>
+ <col id="0">Yahoo!</col>
+ </row>
+ <row>
+ <col id="0">Microsoft Live</col>
+ </row>
+ <row>
+ <col id="0">Buisiness.com</col>
+ </row>
+ <row>
+ <col id="0">Omgili</col>
+ </row>
+ <row>
+ <col id="0">BBC News</col>
+ </row>
+ <row>
+ <col id="0">Ubuntu Packages</col>
+ </row>
+ <row>
+ <col id="0">Creative Commons</col>
+ </row>
+ <row>
+ <col id="0">Ask</col>
+ </row>
+ <row>
+ <col id="0">Answers</col>
+ </row>
+ <row>
+ <col id="0">Dictionary.com</col>
+ </row>
+ <row>
+ <col id="0">YouTube</col>
+ </row>
+ <row>
+ <col id="0">AeroMP3</col>
+ </row>
+ <row>
+ <col id="0">AOL</col>
+ </row>
+ <row>
+ <col id="0">Baidu</col>
+ </row>
+ <row>
+ <col id="0">Amazon</col>
+ </row>
+ <row>
+ <col id="0">Ebay</col>
+ </row>
+ <row>
+ <col id="0">IMBD</col>
+ </row>
+ <row>
+ <col id="0">ESPN</col>
+ </row>
+ <row>
+ <col id="0">Wikipedia</col>
+ </row>
+ <row>
+ <col id="0">DuckDuckGo</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkListStore" id="liststore_tab_position">
+ <columns>
+ <!-- column-name Position -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">preferencesTabLocTop</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">preferencesTabLocLeft</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">preferencesTabLocRight</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">preferencesTabLocBottom</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkListStore" id="liststore_toolbar_buttontype">
+ <columns>
+ <!-- column-name Type -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">preferencesButtonTypeSmall</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">preferencesButtonTypeLarge</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">preferencesButtonTypeLargeText</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">preferencesButtonTypeText</col>
+ </row>
+ </data>
+ </object>
<object class="GtkDialog" id="dialogPreferences">
<property name="can_focus">False</property>
<property name="border_width">5</property>
@@ -852,38 +1143,6 @@
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="checkDisablePlugins">
- <property name="label" translatable="yes">preferencesControlDisable</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="draw_indicator">True</property>
- <signal name="toggled" handler="nsgtk_preferences_checkDisablePlugins_toggled" swapped="no"/>
- <signal name="realize" handler="nsgtk_preferences_checkDisablePlugins_realize" swapped="no"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">3</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="checkResampleImages">
- <property name="label" translatable="yes">preferencesControlHigh</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="draw_indicator">True</property>
- <signal name="toggled" handler="nsgtk_preferences_checkResampleImages_toggled" swapped="no"/>
- <signal name="realize" handler="nsgtk_preferences_checkResampleImages_realize" swapped="no"/>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">4</property>
- </packing>
- </child>
- <child>
<object class="GtkHBox" id="hbox8">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -924,7 +1183,7 @@
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
- <property name="position">5</property>
+ <property name="position">3</property>
</packing>
</child>
</object>
@@ -981,55 +1240,6 @@
<property name="position">0</property>
</packing>
</child>
- <child>
- <object class="GtkHBox" id="hbox9">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">12</property>
- <child>
- <object class="GtkLabel" id="label19">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">preferencesAnimationMinimum</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkSpinButton" id="spinAnimationSpeed">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="has_tooltip">True</property>
- <property name="tooltip_text" translatable="yes">preferencesAnimationMinimumTooltip</property>
- <property name="invisible_char">â—</property>
- <property name="primary_icon_activatable">False</property>
- <property name="secondary_icon_activatable">False</property>
- <property name="primary_icon_sensitive">True</property>
- <property name="secondary_icon_sensitive">True</property>
- <property name="adjustment">adjustment_animation_time</property>
- <property name="climb_rate">1</property>
- <property name="digits">1</property>
- <property name="numeric">True</property>
- <property name="update_policy">if-valid</property>
- <signal name="value-changed" handler="nsgtk_preferences_spinAnimationSpeed_valuechanged" swapped="no"/>
- <signal name="realize" handler="nsgtk_preferences_spinAnimationSpeed_realize" swapped="no"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
</object>
</child>
</object>
@@ -2178,7 +2388,6 @@
</child>
<child>
<object class="GtkVBox" id="vbox_pdfexport">
- <property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
@@ -2583,6 +2792,12 @@
<property name="x_options">GTK_EXPAND</property>
</packing>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
<packing>
<property name="expand">True</property>
@@ -2710,295 +2925,4 @@
<action-widget response="-7">close</action-widget>
</action-widgets>
</object>
- <object class="GtkListStore" id="liststore_search_provider">
- <columns>
- <!-- column-name Provider -->
- <column type="gchararray"/>
- </columns>
- <data>
- <row>
- <col id="0">Google</col>
- </row>
- <row>
- <col id="0">Yahoo!</col>
- </row>
- <row>
- <col id="0">Microsoft Live</col>
- </row>
- <row>
- <col id="0">Buisiness.com</col>
- </row>
- <row>
- <col id="0">Omgili</col>
- </row>
- <row>
- <col id="0">BBC News</col>
- </row>
- <row>
- <col id="0">Ubuntu Packages</col>
- </row>
- <row>
- <col id="0">Creative Commons</col>
- </row>
- <row>
- <col id="0">Ask</col>
- </row>
- <row>
- <col id="0">Answers</col>
- </row>
- <row>
- <col id="0">Dictionary.com</col>
- </row>
- <row>
- <col id="0">YouTube</col>
- </row>
- <row>
- <col id="0">AeroMP3</col>
- </row>
- <row>
- <col id="0">AOL</col>
- </row>
- <row>
- <col id="0">Baidu</col>
- </row>
- <row>
- <col id="0">Amazon</col>
- </row>
- <row>
- <col id="0">Ebay</col>
- </row>
- <row>
- <col id="0">IMBD</col>
- </row>
- <row>
- <col id="0">ESPN</col>
- </row>
- <row>
- <col id="0">Wikipedia</col>
- </row>
- <row>
- <col id="0">DuckDuckGo</col>
- </row>
- </data>
- </object>
- <object class="GtkListStore" id="liststore_tab_position">
- <columns>
- <!-- column-name Position -->
- <column type="gchararray"/>
- </columns>
- <data>
- <row>
- <col id="0" translatable="yes">preferencesTabLocTop</col>
- </row>
- <row>
- <col id="0" translatable="yes">preferencesTabLocLeft</col>
- </row>
- <row>
- <col id="0" translatable="yes">preferencesTabLocRight</col>
- </row>
- <row>
- <col id="0" translatable="yes">preferencesTabLocBottom</col>
- </row>
- </data>
- </object>
- <object class="GtkListStore" id="liststore_toolbar_buttontype">
- <columns>
- <!-- column-name Type -->
- <column type="gchararray"/>
- </columns>
- <data>
- <row>
- <col id="0" translatable="yes">preferencesButtonTypeSmall</col>
- </row>
- <row>
- <col id="0" translatable="yes">preferencesButtonTypeLarge</col>
- </row>
- <row>
- <col id="0" translatable="yes">preferencesButtonTypeLargeText</col>
- </row>
- <row>
- <col id="0" translatable="yes">preferencesButtonTypeText</col>
- </row>
- </data>
- </object>
- <object class="GtkListStore" id="liststore_image_loading">
- <columns>
- <!-- column-name Type -->
- <column type="gchararray"/>
- </columns>
- <data>
- <row>
- <col id="0" translatable="yes">preferencesImageLoadBoth</col>
- </row>
- <row>
- <col id="0" translatable="yes">preferencesImageLoadFore</col>
- </row>
- <row>
- <col id="0" translatable="yes">preferencesImageLoadBack</col>
- </row>
- <row>
- <col id="0" translatable="yes">preferencesImageLoadNone</col>
- </row>
- </data>
- </object>
- <object class="GtkListStore" id="liststore_defaultfont">
- <columns>
- <!-- column-name Type -->
- <column type="gchararray"/>
- </columns>
- <data>
- <row>
- <col id="0" translatable="yes">preferencesFonttypeSans</col>
- </row>
- <row>
- <col id="0" translatable="yes">preferencesFonttypeSerif</col>
- </row>
- <row>
- <col id="0" translatable="yes">preferencesFonttypeMonospace</col>
- </row>
- <row>
- <col id="0" translatable="yes">preferencesFonttypeCursive</col>
- </row>
- <row>
- <col id="0" translatable="yes">preferencesFonttypeFantasy</col>
- </row>
- </data>
- </object>
- <object class="GtkImage" id="image1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xpad">3</property>
- <property name="stock">gtk-apply</property>
- </object>
- <object class="GtkListStore" id="liststore_proxy_type">
- <columns>
- <!-- column-name Type -->
- <column type="gchararray"/>
- </columns>
- <data>
- <row>
- <col id="0" translatable="yes">preferencesProxyTypeDirect</col>
- </row>
- <row>
- <col id="0" translatable="yes">preferencesProxyTypeManual</col>
- </row>
- <row>
- <col id="0" translatable="yes">preferencesProxyTypeBasic</col>
- </row>
- <row>
- <col id="0" translatable="yes">preferencesProxyTypeNLTM</col>
- </row>
- <row>
- <col id="0" translatable="yes">preferencesProxyTypeSystem</col>
- </row>
- </data>
- </object>
- <object class="GtkAdjustment" id="adjustment_animation_time">
- <property name="value">0.10000000000000001</property>
- <property name="lower">0.10000000000000001</property>
- <property name="upper">10</property>
- <property name="step_increment">0.10000000000000001</property>
- <property name="page_increment">1</property>
- </object>
- <object class="GtkAdjustment" id="adjustment_font_default_size">
- <property name="value">16</property>
- <property name="lower">1</property>
- <property name="upper">99.900000000000006</property>
- <property name="step_increment">0.10000000000000001</property>
- <property name="page_increment">2</property>
- </object>
- <object class="GtkAdjustment" id="adjustment_history_age">
- <property name="value">28</property>
- <property name="upper">999</property>
- <property name="step_increment">1</property>
- <property name="page_increment">28</property>
- </object>
- <object class="GtkAdjustment" id="adjustment_cache_memory_size">
- <property name="value">16</property>
- <property name="upper">2048</property>
- <property name="step_increment">4</property>
- <property name="page_increment">16</property>
- </object>
- <object class="GtkAdjustment" id="adjustment_cache_disc_size">
- <property name="value">1024</property>
- <property name="upper">4096</property>
- <property name="step_increment">32</property>
- <property name="page_increment">256</property>
- </object>
- <object class="GtkAdjustment" id="adjustment_disc_cache_age">
- <property name="value">28</property>
- <property name="upper">999</property>
- <property name="step_increment">1</property>
- <property name="page_increment">10</property>
- </object>
- <object class="GtkAdjustment" id="adjustment_proxy_port">
- <property name="value">3128</property>
- <property name="lower">1</property>
- <property name="upper">65535</property>
- <property name="step_increment">1</property>
- <property name="page_increment">10</property>
- </object>
- <object class="GtkAdjustment" id="adjustment_fetching_max">
- <property name="value">10</property>
- <property name="lower">1</property>
- <property name="upper">100</property>
- <property name="step_increment">1</property>
- <property name="page_increment">10</property>
- </object>
- <object class="GtkAdjustment" id="adjustment_fetching_perhost">
- <property name="value">1</property>
- <property name="lower">1</property>
- <property name="upper">100</property>
- <property name="step_increment">1</property>
- <property name="page_increment">10</property>
- </object>
- <object class="GtkAdjustment" id="adjustment_fetching_cached">
- <property name="value">1</property>
- <property name="upper">100</property>
- <property name="step_increment">1</property>
- <property name="page_increment">10</property>
- </object>
- <object class="GtkAdjustment" id="adjustment_pdf_scale">
- <property name="value">100</property>
- <property name="lower">1</property>
- <property name="upper">1000</property>
- <property name="step_increment">1</property>
- <property name="page_increment">10</property>
- </object>
- <object class="GtkAdjustment" id="adjustment_pdf_lmargin">
- <property name="upper">999</property>
- <property name="step_increment">1</property>
- <property name="page_increment">10</property>
- </object>
- <object class="GtkListStore" id="liststore_content_language">
- <columns>
- <!-- column-name Code -->
- <column type="gchararray"/>
- <!-- column-name Description -->
- <column type="gchararray"/>
- </columns>
- <data>
- <row>
- <col id="0" translatable="yes">en</col>
- <col id="1" translatable="yes">English</col>
- </row>
- </data>
- </object>
- <object class="GtkListStore" id="liststore_developer_view">
- <columns>
- <!-- column-name Type -->
- <column type="gchararray"/>
- </columns>
- <data>
- <row>
- <col id="0" translatable="yes">preferencesDeveloperViewWindow</col>
- </row>
- <row>
- <col id="0" translatable="yes">preferencesDeveloperViewTab</col>
- </row>
- <row>
- <col id="0" translatable="yes">preferencesDeveloperViewEditor</col>
- </row>
- </data>
- </object>
</interface>
diff --git a/frontends/gtk/res/gtk2/pageinfo.ui b/frontends/gtk/res/gtk2/pageinfo.ui
new file mode 100644
index 000000000..3d541d653
--- /dev/null
+++ b/frontends/gtk/res/gtk2/pageinfo.ui
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <requires lib="gtk+" version="2.24"/>
+ <!-- interface-naming-policy project-wide -->
+ <object class="GtkWindow" id="PGIWindow">
+ <property name="type">GTK_WINDOW_POPUP</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkDrawingArea" id="PGIDrawingArea">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
+ </object>
+ </child>
+ </object>
+</interface>
diff --git a/frontends/gtk/res/password.gtk2.ui b/frontends/gtk/res/gtk2/password.ui
index eb51e4f8f..eb51e4f8f 100644
--- a/frontends/gtk/res/password.gtk2.ui
+++ b/frontends/gtk/res/gtk2/password.ui
diff --git a/frontends/gtk/res/gtk2/tabcontents.ui b/frontends/gtk/res/gtk2/tabcontents.ui
new file mode 100644
index 000000000..c47e6a2ef
--- /dev/null
+++ b/frontends/gtk/res/gtk2/tabcontents.ui
@@ -0,0 +1,229 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 2.12 -->
+ <!-- interface-naming-policy toplevel-contextual -->
+ <object class="GtkAdjustment" id="layouthadjustment">
+ <property name="upper">100</property>
+ <property name="step_increment">30</property>
+ <property name="page_increment">10</property>
+ <property name="page_size">10</property>
+ </object>
+ <object class="GtkAdjustment" id="layoutvadjustment">
+ <property name="upper">100</property>
+ <property name="step_increment">30</property>
+ <property name="page_increment">10</property>
+ <property name="page_size">10</property>
+ </object>
+ <object class="GtkVBox" id="tabBox">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkToolbar" id="toolbar">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="toolbar_style">both-horiz</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolbar" id="findbar">
+ <property name="can_focus">False</property>
+ <property name="toolbar_style">both</property>
+ <child>
+ <object class="GtkToolItem" id="toolitemFind">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkEntry" id="Find">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="primary_icon_activatable">False</property>
+ <property name="secondary_icon_activatable">False</property>
+ <property name="primary_icon_sensitive">True</property>
+ <property name="secondary_icon_sensitive">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolButton" id="FindBack">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">gtkFindBack</property>
+ <property name="use_underline">True</property>
+ <property name="icon_name">go-up</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolButton" id="FindForward">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">gtkFindForward</property>
+ <property name="use_underline">True</property>
+ <property name="icon_name">go-down</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolItem" id="toolitemFindHighlightAll">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkCheckButton" id="FindHighlightAll">
+ <property name="label" translatable="yes">gtkFindHighlightAll</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="tooltip_text" translatable="yes">show all matches</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolItem" id="toolitemFindMatchCase">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkCheckButton" id="FindMatchCase">
+ <property name="label" translatable="yes">gtkFindMatchCase</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="tooltip_text" translatable="yes">Match case when searching</property>
+ <property name="relief">none</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolButton" id="FindClose">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">gtkFindClose</property>
+ <property name="icon_name">window-close</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkTable" id="tabContents">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="n_rows">2</property>
+ <property name="n_columns">2</property>
+ <child>
+ <object class="GtkLayout" id="layout">
+ <property name="visible">True</property>
+ <property name="app_paintable">True</property>
+ <property name="can_focus">False</property>
+ <property name="events">GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_STRUCTURE_MASK | GDK_SCROLL_MASK</property>
+ <property name="hadjustment">layouthadjustment</property>
+ <property name="vadjustment">layoutvadjustment</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkStatusbar" id="resizer">
+ <property name="height_request">1</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">2</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHPaned" id="hpaned1">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <child>
+ <object class="GtkLabel" id="status_bar">
+ <property name="width_request">1</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="xpad">4</property>
+ <property name="label" translatable="yes">Status</property>
+ </object>
+ <packing>
+ <property name="resize">False</property>
+ <property name="shrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHScrollbar" id="hscrollbar">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="adjustment">layouthadjustment</property>
+ </object>
+ <packing>
+ <property name="resize">True</property>
+ <property name="shrink">True</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVScrollbar" id="vscrollbar">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="adjustment">layoutvadjustment</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="x_options"/>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </object>
+</interface>
diff --git a/frontends/gtk/res/gtk2/toolbar.ui b/frontends/gtk/res/gtk2/toolbar.ui
new file mode 100644
index 000000000..61723065b
--- /dev/null
+++ b/frontends/gtk/res/gtk2/toolbar.ui
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 2.12 -->
+ <!-- interface-naming-policy toplevel-contextual -->
+ <object class="GtkVBox" id="customisation">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkToolbar" id="toolbar">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="xpad">6</property>
+ <property name="label" translatable="yes">gtkCustomizeToolbarInstructions</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="padding">6</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkScrolledWindow" id="scrolledwindow1">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">automatic</property>
+ <property name="vscrollbar_policy">automatic</property>
+ <child>
+ <object class="GtkViewport" id="viewport1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkVBox" id="toolbox">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHButtonBox" id="hbuttonbox1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="reset">
+ <property name="label" translatable="yes">Reset to defaults</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="discard">
+ <property name="label">gtk-discard</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="apply">
+ <property name="label">gtk-apply</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="padding">6</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </object>
+</interface>
diff --git a/frontends/gtk/res/viewdata.gtk2.ui b/frontends/gtk/res/gtk2/viewdata.ui
index 7589022ca..7589022ca 100644
--- a/frontends/gtk/res/viewdata.gtk2.ui
+++ b/frontends/gtk/res/gtk2/viewdata.ui
diff --git a/frontends/gtk/res/warning.gtk2.ui b/frontends/gtk/res/gtk2/warning.ui
index e4fb4e662..e4fb4e662 100644
--- a/frontends/gtk/res/warning.gtk2.ui
+++ b/frontends/gtk/res/gtk2/warning.ui
diff --git a/frontends/gtk/res/cookies.gtk3.ui b/frontends/gtk/res/gtk3/cookies.ui
index 44dcb80b8..85f9aae76 100644
--- a/frontends/gtk/res/cookies.gtk3.ui
+++ b/frontends/gtk/res/gtk3/cookies.ui
@@ -187,7 +187,7 @@
<object class="GtkDrawingArea" id="cookiesDrawingArea">
<property name="visible">True</property>
<property name="app_paintable">True</property>
- <property name="can_focus">False</property>
+ <property name="can_focus">True</property>
<property name="events">GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_STRUCTURE_MASK</property>
</object>
</child>
diff --git a/frontends/gtk/res/downloads.gtk3.ui b/frontends/gtk/res/gtk3/downloads.ui
index 1e71328a4..1e71328a4 100644
--- a/frontends/gtk/res/downloads.gtk3.ui
+++ b/frontends/gtk/res/gtk3/downloads.ui
diff --git a/frontends/gtk/res/globalhistory.gtk3.ui b/frontends/gtk/res/gtk3/globalhistory.ui
index 7fa598f1e..c0496964f 100644
--- a/frontends/gtk/res/globalhistory.gtk3.ui
+++ b/frontends/gtk/res/gtk3/globalhistory.ui
@@ -219,7 +219,7 @@
<child>
<object class="GtkDrawingArea" id="globalHistoryDrawingArea">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can_focus">True</property>
<property name="events">GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_STRUCTURE_MASK</property>
</object>
</child>
diff --git a/frontends/gtk/res/hotlist.gtk3.ui b/frontends/gtk/res/gtk3/hotlist.ui
index b0e075c4b..ccd193637 100644
--- a/frontends/gtk/res/hotlist.gtk3.ui
+++ b/frontends/gtk/res/gtk3/hotlist.ui
@@ -236,7 +236,7 @@
<child>
<object class="GtkDrawingArea" id="hotlistDrawingArea">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can_focus">True</property>
<property name="events">GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_STRUCTURE_MASK</property>
</object>
</child>
diff --git a/frontends/gtk/res/localhistory.gtk3.ui b/frontends/gtk/res/gtk3/localhistory.ui
index 1a4b9004d..9a36a91a7 100644
--- a/frontends/gtk/res/localhistory.gtk3.ui
+++ b/frontends/gtk/res/gtk3/localhistory.ui
@@ -2,6 +2,7 @@
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkWindow" id="wndHistory">
+ <property name="type">GTK_WINDOW_POPUP</property>
<property name="can_focus">False</property>
<property name="title" translatable="yes">NetSurf Local History</property>
<property name="window_position">center</property>
@@ -26,7 +27,7 @@
<child>
<object class="GtkDrawingArea" id="HistoryDrawingArea">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can_focus">True</property>
<property name="events">GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_STRUCTURE_MASK</property>
</object>
</child>
diff --git a/frontends/gtk/res/gtk3/netsurf.ui b/frontends/gtk/res/gtk3/netsurf.ui
new file mode 100644
index 000000000..6ea8f07a7
--- /dev/null
+++ b/frontends/gtk/res/gtk3/netsurf.ui
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.22.1 -->
+<interface>
+ <requires lib="gtk+" version="3.0"/>
+ <object class="GtkWindow" id="wndBrowser">
+ <property name="can_focus">False</property>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <object class="GtkBox" id="box1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkMenuBar" id="menubar">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkNotebook" id="notebook">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="show_tabs">False</property>
+ <property name="show_border">False</property>
+ <property name="scrollable">True</property>
+ <child>
+ <placeholder/>
+ </child>
+ <child type="tab">
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child type="tab">
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child type="tab">
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+</interface>
diff --git a/frontends/gtk/res/options.gtk3.ui b/frontends/gtk/res/gtk3/options.ui
index 2a3516f09..82a3e175a 100644
--- a/frontends/gtk/res/options.gtk3.ui
+++ b/frontends/gtk/res/gtk3/options.ui
@@ -143,9 +143,10 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<child>
- <object class="GtkVBox" id="vbox_main">
+ <object class="GtkBox" id="vbox_main">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
<property name="valign">start</property>
<property name="spacing">6</property>
<child>
@@ -162,14 +163,16 @@
<property name="left_padding">12</property>
<property name="right_padding">12</property>
<child>
- <object class="GtkVBox" id="vbox2">
+ <object class="GtkBox" id="vbox2">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
- <object class="GtkHBox" id="hbox1">
+ <object class="GtkBox" id="hbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">horizontal</property>
<property name="spacing">12</property>
<child>
<object class="GtkLabel" id="label_startup_page">
@@ -207,9 +210,10 @@
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox2">
+ <object class="GtkBox" id="hbox2">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">horizontal</property>
<property name="spacing">6</property>
<child>
<placeholder/>
@@ -289,9 +293,10 @@
<property name="left_padding">12</property>
<property name="right_padding">12</property>
<child>
- <object class="GtkVBox" id="vbox3">
+ <object class="GtkBox" id="vbox3">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkCheckButton" id="checkUrlSearch">
@@ -314,9 +319,10 @@
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox3">
+ <object class="GtkBox" id="hbox3">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">horizontal</property>
<property name="spacing">12</property>
<child>
<object class="GtkLabel" id="label5">
@@ -393,9 +399,10 @@
<property name="left_padding">12</property>
<property name="right_padding">12</property>
<child>
- <object class="GtkVBox" id="vbox4">
+ <object class="GtkBox" id="vbox4">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkCheckButton" id="checkClearDownloads">
@@ -438,9 +445,10 @@
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox4">
+ <object class="GtkBox" id="hbox4">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">horizontal</property>
<property name="spacing">12</property>
<child>
<object class="GtkLabel" id="label8">
@@ -510,9 +518,10 @@
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox_appearance">
+ <object class="GtkBox" id="vbox_appearance">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
<property name="valign">start</property>
<property name="spacing">6</property>
<child>
@@ -529,9 +538,10 @@
<property name="left_padding">12</property>
<property name="right_padding">12</property>
<child>
- <object class="GtkVBox" id="vbox5">
+ <object class="GtkBox" id="vbox5">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkCheckButton" id="checkShowSingleTab">
@@ -594,9 +604,10 @@
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox5">
+ <object class="GtkBox" id="hbox5">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">horizontal</property>
<property name="spacing">12</property>
<child>
<object class="GtkLabel" id="label9">
@@ -672,14 +683,16 @@
<property name="left_padding">12</property>
<property name="right_padding">12</property>
<child>
- <object class="GtkVBox" id="vbox1">
+ <object class="GtkBox" id="vbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
- <object class="GtkHBox" id="hbox6">
+ <object class="GtkBox" id="hbox6">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">horizontal</property>
<property name="spacing">12</property>
<child>
<object class="GtkLabel" id="label13">
@@ -755,9 +768,10 @@
<property name="left_padding">12</property>
<property name="right_padding">12</property>
<child>
- <object class="GtkVBox" id="vbox7">
+ <object class="GtkBox" id="vbox7">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkCheckButton" id="checkDisplayRecentURLs">
@@ -813,14 +827,16 @@
<property name="left_padding">12</property>
<property name="right_padding">12</property>
<child>
- <object class="GtkVBox" id="vbox8">
+ <object class="GtkBox" id="vbox8">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
- <object class="GtkHBox" id="hbox7">
+ <object class="GtkBox" id="hbox7">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">horizontal</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="label16">
@@ -899,10 +915,11 @@
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox_content">
+ <object class="GtkBox" id="vbox_content">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">start</property>
+ <property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkFrame" id="frame_content_control">
@@ -918,9 +935,10 @@
<property name="left_padding">12</property>
<property name="right_padding">12</property>
<child>
- <object class="GtkVBox" id="vbox6">
+ <object class="GtkBox" id="vbox6">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkCheckButton" id="checkDisablePopups">
@@ -983,49 +1001,10 @@
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="checkDisablePlugins">
- <property name="label" translatable="yes">preferencesControlDisable</property>
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="halign">start</property>
- <property name="use_action_appearance">False</property>
- <property name="xalign">0.5</property>
- <property name="draw_indicator">True</property>
- <signal name="toggled" handler="nsgtk_preferences_checkDisablePlugins_toggled" swapped="no"/>
- <signal name="realize" handler="nsgtk_preferences_checkDisablePlugins_realize" swapped="no"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">3</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="checkResampleImages">
- <property name="label" translatable="yes">preferencesControlHigh</property>
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="halign">start</property>
- <property name="use_action_appearance">False</property>
- <property name="xalign">0.5</property>
- <property name="draw_indicator">True</property>
- <signal name="toggled" handler="nsgtk_preferences_checkResampleImages_toggled" swapped="no"/>
- <signal name="realize" handler="nsgtk_preferences_checkResampleImages_realize" swapped="no"/>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">4</property>
- </packing>
- </child>
- <child>
- <object class="GtkHBox" id="hbox8">
+ <object class="GtkBox" id="hbox8">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">horizontal</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="label17">
@@ -1064,7 +1043,7 @@
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
- <property name="position">5</property>
+ <property name="position">3</property>
</packing>
</child>
</object>
@@ -1101,9 +1080,10 @@
<property name="left_padding">12</property>
<property name="right_padding">12</property>
<child>
- <object class="GtkVBox" id="vbox9">
+ <object class="GtkBox" id="vbox9">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkCheckButton" id="checkEnableAnimations">
@@ -1125,51 +1105,6 @@
<property name="position">0</property>
</packing>
</child>
- <child>
- <object class="GtkHBox" id="hbox9">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">12</property>
- <child>
- <object class="GtkLabel" id="label19">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">preferencesAnimationMinimum</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkSpinButton" id="spinAnimationSpeed">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="has_tooltip">True</property>
- <property name="tooltip_text" translatable="yes">preferencesAnimationMinimumTooltip</property>
- <property name="invisible_char">â—</property>
- <property name="adjustment">adjustment_animation_time</property>
- <property name="climb_rate">1</property>
- <property name="digits">1</property>
- <property name="numeric">True</property>
- <property name="update_policy">if-valid</property>
- <signal name="value-changed" handler="nsgtk_preferences_spinAnimationSpeed_valuechanged" swapped="no"/>
- <signal name="realize" handler="nsgtk_preferences_spinAnimationSpeed_realize" swapped="no"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
</object>
</child>
</object>
@@ -1204,14 +1139,16 @@
<property name="left_padding">12</property>
<property name="right_padding">12</property>
<child>
- <object class="GtkHBox" id="hbox11">
+ <object class="GtkBox" id="hbox11">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">horizontal</property>
<property name="spacing">12</property>
<child>
- <object class="GtkHBox" id="hbox12">
+ <object class="GtkBox" id="hbox12">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">horizontal</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="label26">
@@ -1253,9 +1190,10 @@
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox13">
+ <object class="GtkBox" id="hbox13">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">horizontal</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="label27">
@@ -1349,14 +1287,16 @@
<property name="left_padding">12</property>
<property name="right_padding">12</property>
<child>
- <object class="GtkVBox" id="vbox10">
+ <object class="GtkBox" id="vbox10">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
- <object class="GtkHBox" id="hbox10">
+ <object class="GtkBox" id="hbox10">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">horizontal</property>
<property name="spacing">12</property>
<child>
<object class="GtkLabel" id="label21">
@@ -1446,10 +1386,11 @@
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox_privacy">
+ <object class="GtkBox" id="vbox_privacy">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">start</property>
+ <property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkFrame" id="frame_privacy_general">
@@ -1465,9 +1406,10 @@
<property name="left_padding">12</property>
<property name="right_padding">12</property>
<child>
- <object class="GtkVBox" id="vbox15">
+ <object class="GtkBox" id="vbox15">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkCheckButton" id="checkSendReferer">
@@ -1543,9 +1485,10 @@
<property name="left_padding">12</property>
<property name="right_padding">12</property>
<child>
- <object class="GtkVBox" id="vbox11">
+ <object class="GtkBox" id="vbox11">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkCheckButton" id="checkHoverURLs">
@@ -1568,9 +1511,10 @@
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox14">
+ <object class="GtkBox" id="hbox14">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">horizontal</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="label28">
@@ -1657,9 +1601,10 @@
<property name="left_padding">12</property>
<property name="right_padding">12</property>
<child>
- <object class="GtkVBox" id="vbox12">
+ <object class="GtkBox" id="vbox12">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkTable" id="table3">
@@ -1815,9 +1760,10 @@
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox17">
+ <object class="GtkBox" id="hbox17">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">horizontal</property>
<child>
<placeholder/>
</child>
@@ -1881,10 +1827,11 @@
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox_network">
+ <object class="GtkBox" id="vbox_network">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">start</property>
+ <property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkFrame" id="frame_network_proxy">
@@ -1979,9 +1926,10 @@
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox19">
+ <object class="GtkBox" id="hbox19">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">horizontal</property>
<property name="spacing">6</property>
<child>
<object class="GtkEntry" id="entryProxyHost">
@@ -2285,10 +2233,11 @@
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox_pdfexport">
+ <object class="GtkBox" id="vbox_pdfexport">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">start</property>
+ <property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkFrame" id="frame_pdfexport_appearance">
@@ -2304,9 +2253,10 @@
<property name="left_padding">12</property>
<property name="right_padding">12</property>
<child>
- <object class="GtkVBox" id="vbox13">
+ <object class="GtkBox" id="vbox13">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkCheckButton" id="checkSuppressImages">
@@ -2369,9 +2319,10 @@
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox15">
+ <object class="GtkBox" id="hbox15">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">horizontal</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="label59">
@@ -2458,14 +2409,16 @@
<property name="left_padding">12</property>
<property name="right_padding">12</property>
<child>
- <object class="GtkVBox" id="vbox16">
+ <object class="GtkBox" id="vbox16">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
- <object class="GtkHBox" id="hbox22">
+ <object class="GtkBox" id="hbox22">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">horizontal</property>
<child>
<object class="GtkLabel" id="label62">
<property name="visible">True</property>
@@ -2504,9 +2457,10 @@
<placeholder/>
</child>
<child>
- <object class="GtkHBox" id="hbox16">
+ <object class="GtkBox" id="hbox16">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">horizontal</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="label51">
@@ -2548,9 +2502,10 @@
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox18">
+ <object class="GtkBox" id="hbox18">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">horizontal</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="label52">
@@ -2593,9 +2548,10 @@
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox20">
+ <object class="GtkBox" id="hbox20">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">horizontal</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="label53">
@@ -2639,9 +2595,10 @@
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox21">
+ <object class="GtkBox" id="hbox21">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">horizontal</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="label54">
@@ -2746,9 +2703,10 @@
<property name="left_padding">12</property>
<property name="right_padding">12</property>
<child>
- <object class="GtkVBox" id="vbox14">
+ <object class="GtkBox" id="vbox14">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
<property name="spacing">7</property>
<child>
<object class="GtkCheckButton" id="checkCompressPDF">
diff --git a/frontends/gtk/res/gtk3/pageinfo.ui b/frontends/gtk/res/gtk3/pageinfo.ui
new file mode 100644
index 000000000..fdee5ac8d
--- /dev/null
+++ b/frontends/gtk/res/gtk3/pageinfo.ui
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.22.1 -->
+<interface>
+ <requires lib="gtk+" version="3.20"/>
+ <object class="GtkWindow" id="PGIWindow">
+ <property name="type">GTK_WINDOW_POPUP</property>
+ <property name="can_focus">False</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_BUTTON_MOTION_MASK | GDK_STRUCTURE_MASK</property>
+ <property name="resizable">False</property>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <object class="GtkDrawingArea" id="PGIDrawingArea">
+ <property name="name">PGIDrawingArea</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="events">GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK | GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
+ </object>
+ </child>
+ </object>
+</interface>
diff --git a/frontends/gtk/res/password.gtk3.ui b/frontends/gtk/res/gtk3/password.ui
index eb51e4f8f..eb51e4f8f 100644
--- a/frontends/gtk/res/password.gtk3.ui
+++ b/frontends/gtk/res/gtk3/password.ui
diff --git a/frontends/gtk/res/gtk3/tabcontents.ui b/frontends/gtk/res/gtk3/tabcontents.ui
new file mode 100644
index 000000000..b07cf92e0
--- /dev/null
+++ b/frontends/gtk/res/gtk3/tabcontents.ui
@@ -0,0 +1,229 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.22.1 -->
+<interface>
+ <requires lib="gtk+" version="3.0"/>
+ <object class="GtkAdjustment" id="layouthadjustment">
+ <property name="upper">100</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkAdjustment" id="layoutvadjustment">
+ <property name="upper">100</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkBox" id="tabBox">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkToolbar" id="toolbar">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="toolbar_style">both</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolbar" id="findbar">
+ <property name="can_focus">False</property>
+ <property name="toolbar_style">both</property>
+ <child>
+ <object class="GtkToolItem">
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkEntry" id="Find">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">â—</property>
+ <property name="placeholder_text" translatable="yes">gtkFindPlaceholder</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="homogeneous">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolButton" id="FindBack">
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="tooltip_text" translatable="yes">gtkFindBack</property>
+ <property name="label" translatable="yes">gtkFindBack</property>
+ <property name="use_underline">True</property>
+ <property name="stock_id">gtk-go-up</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolButton" id="FindForward">
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="tooltip_text" translatable="yes">gtkFindForward</property>
+ <property name="label" translatable="yes">gtkFindForward</property>
+ <property name="use_underline">True</property>
+ <property name="stock_id">gtk-go-down</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolItem">
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkCheckButton" id="FindHighlightAll">
+ <property name="label" translatable="yes">gtkFindHighlightAll</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolItem">
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkCheckButton" id="FindMatchCase">
+ <property name="label" translatable="yes">gtkFindMatchCase</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolButton" id="FindClose">
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="tooltip_text" translatable="yes">gtkFindClose</property>
+ <property name="label" translatable="yes">gtkFindClose</property>
+ <property name="stock_id">gtk-close</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkGrid" id="tabContents">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="row_spacing">2</property>
+ <property name="column_spacing">2</property>
+ <child>
+ <object class="GtkLayout" id="layout">
+ <property name="visible">True</property>
+ <property name="app_paintable">True</property>
+ <property name="can_focus">False</property>
+ <property name="events">GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_STRUCTURE_MASK | GDK_SCROLL_MASK</property>
+ <property name="hadjustment">layouthadjustment</property>
+ <property name="vadjustment">layoutvadjustment</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkScrollbar" id="vscrollbar">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="vexpand">True</property>
+ <property name="orientation">vertical</property>
+ <property name="adjustment">layoutvadjustment</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkPaned" id="hpaned1">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <child>
+ <object class="GtkLabel" id="status_bar">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xpad">4</property>
+ <property name="label" translatable="yes">Status</property>
+ <property name="single_line_mode">True</property>
+ <property name="xalign">0</property>
+ </object>
+ <packing>
+ <property name="resize">False</property>
+ <property name="shrink">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkScrollbar" id="hscrollbar">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="adjustment">layouthadjustment</property>
+ </object>
+ <packing>
+ <property name="resize">True</property>
+ <property name="shrink">True</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </object>
+</interface>
diff --git a/frontends/gtk/res/gtk3/toolbar.ui b/frontends/gtk/res/gtk3/toolbar.ui
new file mode 100644
index 000000000..60452f472
--- /dev/null
+++ b/frontends/gtk/res/gtk3/toolbar.ui
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.22.1 -->
+<!--*- mode: xml -*-->
+<interface>
+ <requires lib="gtk+" version="3.0"/>
+ <object class="GtkImage" id="image2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">gtk-refresh</property>
+ </object>
+ <object class="GtkBox" id="customisation">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkToolbar" id="toolbar">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xpad">6</property>
+ <property name="label" translatable="yes">gtkCustomizeToolbarInstructions</property>
+ <property name="wrap">True</property>
+ <property name="xalign">0</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="padding">6</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkScrolledWindow">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="shadow_type">in</property>
+ <child>
+ <object class="GtkViewport">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkBox" id="toolbox">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButtonBox">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="reset">
+ <property name="label" translatable="yes">Reset</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="image">image2</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="discard">
+ <property name="label">gtk-discard</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="apply">
+ <property name="label">gtk-apply</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="padding">6</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </object>
+</interface>
diff --git a/frontends/gtk/res/viewdata.gtk3.ui b/frontends/gtk/res/gtk3/viewdata.ui
index b742d5f6b..b742d5f6b 100644
--- a/frontends/gtk/res/viewdata.gtk3.ui
+++ b/frontends/gtk/res/gtk3/viewdata.ui
diff --git a/frontends/gtk/res/warning.gtk3.ui b/frontends/gtk/res/gtk3/warning.ui
index e4fb4e662..e4fb4e662 100644
--- a/frontends/gtk/res/warning.gtk3.ui
+++ b/frontends/gtk/res/gtk3/warning.ui
diff --git a/frontends/gtk/res/icons b/frontends/gtk/res/icons
index 187efd6f9..94d2dc0df 120000
--- a/frontends/gtk/res/icons
+++ b/frontends/gtk/res/icons
@@ -1 +1 @@
-../../../!NetSurf/Resources/Icons/ \ No newline at end of file
+../../../resources/icons \ No newline at end of file
diff --git a/frontends/gtk/res/internal.css b/frontends/gtk/res/internal.css
index 17f9f1504..5583a9811 120000
--- a/frontends/gtk/res/internal.css
+++ b/frontends/gtk/res/internal.css
@@ -1 +1 @@
-../../../!NetSurf/Resources/internal.css,f79 \ No newline at end of file
+../../../resources/internal.css \ No newline at end of file
diff --git a/frontends/gtk/res/it/credits.html b/frontends/gtk/res/it/credits.html
index 64b78982e..2b7c99542 120000
--- a/frontends/gtk/res/it/credits.html
+++ b/frontends/gtk/res/it/credits.html
@@ -1 +1 @@
-../../../../!NetSurf/Resources/it/credits.html,faf \ No newline at end of file
+../../../../resources/it/credits.html \ No newline at end of file
diff --git a/frontends/gtk/res/it/licence.html b/frontends/gtk/res/it/licence.html
index 4abc825d3..92afce85b 120000
--- a/frontends/gtk/res/it/licence.html
+++ b/frontends/gtk/res/it/licence.html
@@ -1 +1 @@
-../../../../!NetSurf/Resources/it/licence.html,faf \ No newline at end of file
+../../../../resources/it/licence.html \ No newline at end of file
diff --git a/frontends/gtk/res/it/welcome.html b/frontends/gtk/res/it/welcome.html
index 59cef0551..2673ba948 120000
--- a/frontends/gtk/res/it/welcome.html
+++ b/frontends/gtk/res/it/welcome.html
@@ -1 +1 @@
-../../../../!NetSurf/Resources/it/welcome.html,faf \ No newline at end of file
+../../../../resources/it/welcome.html \ No newline at end of file
diff --git a/frontends/gtk/res/ja/welcome.html b/frontends/gtk/res/ja/welcome.html
index a2556ee4e..8b603f3df 120000
--- a/frontends/gtk/res/ja/welcome.html
+++ b/frontends/gtk/res/ja/welcome.html
@@ -1 +1 @@
-../../../../!NetSurf/Resources/ja/welcome.html,faf \ No newline at end of file
+../../../../resources/ja/welcome.html \ No newline at end of file
diff --git a/frontends/gtk/res/login.gtk2.ui b/frontends/gtk/res/login.gtk2.ui
deleted file mode 100644
index 552b173ed..000000000
--- a/frontends/gtk/res/login.gtk2.ui
+++ /dev/null
@@ -1,223 +0,0 @@
-<?xml version="1.0"?>
-<!--*- mode: xml -*-->
-<interface>
- <object class="GtkDialog" id="wndLogin">
- <property name="title" translatable="yes">Site Authentication</property>
- <property name="window_position">GTK_WIN_POS_CENTER_ALWAYS</property>
- <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
- <child internal-child="vbox">
- <object class="GtkVBox" id="dialog-vbox2">
- <property name="visible">True</property>
- <child>
- <object class="GtkHBox" id="hbox12">
- <property name="visible">True</property>
- <property name="border_width">3</property>
- <child>
- <object class="GtkImage" id="image3">
- <property name="visible">True</property>
- <property name="yalign">0.10000000149011612</property>
- <property name="xpad">12</property>
- <property name="icon_size">6</property>
- <property name="icon_name">gtk-dialog-authentication</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkTable" id="table5">
- <property name="visible">True</property>
- <property name="border_width">1</property>
- <property name="n_rows">4</property>
- <property name="n_columns">2</property>
- <property name="column_spacing">11</property>
- <property name="row_spacing">10</property>
- <child>
- <object class="GtkLabel" id="labelLoginHost">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">moo.yoo.com</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="x_options"/>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label57">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Password</property>
- </object>
- <packing>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options"/>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label56">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Username</property>
- </object>
- <packing>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options"/>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label54">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Host</property>
- </object>
- <packing>
- <property name="x_options"/>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label55">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Realm</property>
- </object>
- <packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options"/>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="labelLoginRealm">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">my sekr3t area</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options"/>
- </packing>
- </child>
- <child>
- <object class="GtkEntry" id="entryLoginPass">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="visibility">False</property>
- <property name="activates_default">True</property>
- <property name="text" translatable="yes">opensesame</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="y_options"/>
- </packing>
- </child>
- <child>
- <object class="GtkEntry" id="entryLoginUser">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="has_focus">True</property>
- <property name="text" translatable="yes">sesame</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="y_options"/>
- </packing>
- </child>
- </object>
- <packing>
- <property name="padding">1</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">2</property>
- </packing>
- </child>
- <child internal-child="action_area">
- <object class="GtkHButtonBox" id="dialog-action_area2">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
- <child>
- <object class="GtkButton" id="buttonLoginCan">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-cancel</property>
- <property name="use_stock">True</property>
- </object>
- </child>
- <child>
- <object class="GtkButton" id="buttonLoginOK">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
- <child>
- <object class="GtkAlignment" id="alignment14">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
- <child>
- <object class="GtkHBox" id="hbox11">
- <property name="visible">True</property>
- <property name="spacing">2</property>
- <child>
- <object class="GtkImage" id="image2">
- <property name="visible">True</property>
- <property name="stock">gtk-ok</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label49">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Login</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
- </object>
- </child>
- <action-widgets>
- <action-widget response="-6">buttonLoginCan</action-widget>
- <action-widget response="-5">buttonLoginOK</action-widget>
- </action-widgets>
- </object>
-</interface>
diff --git a/frontends/gtk/res/login.gtk3.ui b/frontends/gtk/res/login.gtk3.ui
deleted file mode 100644
index 552b173ed..000000000
--- a/frontends/gtk/res/login.gtk3.ui
+++ /dev/null
@@ -1,223 +0,0 @@
-<?xml version="1.0"?>
-<!--*- mode: xml -*-->
-<interface>
- <object class="GtkDialog" id="wndLogin">
- <property name="title" translatable="yes">Site Authentication</property>
- <property name="window_position">GTK_WIN_POS_CENTER_ALWAYS</property>
- <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
- <child internal-child="vbox">
- <object class="GtkVBox" id="dialog-vbox2">
- <property name="visible">True</property>
- <child>
- <object class="GtkHBox" id="hbox12">
- <property name="visible">True</property>
- <property name="border_width">3</property>
- <child>
- <object class="GtkImage" id="image3">
- <property name="visible">True</property>
- <property name="yalign">0.10000000149011612</property>
- <property name="xpad">12</property>
- <property name="icon_size">6</property>
- <property name="icon_name">gtk-dialog-authentication</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkTable" id="table5">
- <property name="visible">True</property>
- <property name="border_width">1</property>
- <property name="n_rows">4</property>
- <property name="n_columns">2</property>
- <property name="column_spacing">11</property>
- <property name="row_spacing">10</property>
- <child>
- <object class="GtkLabel" id="labelLoginHost">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">moo.yoo.com</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="x_options"/>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label57">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Password</property>
- </object>
- <packing>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options"/>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label56">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Username</property>
- </object>
- <packing>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options"/>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label54">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Host</property>
- </object>
- <packing>
- <property name="x_options"/>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label55">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Realm</property>
- </object>
- <packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options"/>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="labelLoginRealm">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">my sekr3t area</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options"/>
- </packing>
- </child>
- <child>
- <object class="GtkEntry" id="entryLoginPass">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="visibility">False</property>
- <property name="activates_default">True</property>
- <property name="text" translatable="yes">opensesame</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="y_options"/>
- </packing>
- </child>
- <child>
- <object class="GtkEntry" id="entryLoginUser">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="has_focus">True</property>
- <property name="text" translatable="yes">sesame</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="y_options"/>
- </packing>
- </child>
- </object>
- <packing>
- <property name="padding">1</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">2</property>
- </packing>
- </child>
- <child internal-child="action_area">
- <object class="GtkHButtonBox" id="dialog-action_area2">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
- <child>
- <object class="GtkButton" id="buttonLoginCan">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-cancel</property>
- <property name="use_stock">True</property>
- </object>
- </child>
- <child>
- <object class="GtkButton" id="buttonLoginOK">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
- <child>
- <object class="GtkAlignment" id="alignment14">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
- <child>
- <object class="GtkHBox" id="hbox11">
- <property name="visible">True</property>
- <property name="spacing">2</property>
- <child>
- <object class="GtkImage" id="image2">
- <property name="visible">True</property>
- <property name="stock">gtk-ok</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label49">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Login</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
- </object>
- </child>
- <action-widgets>
- <action-widget response="-6">buttonLoginCan</action-widget>
- <action-widget response="-5">buttonLoginOK</action-widget>
- </action-widgets>
- </object>
-</interface>
diff --git a/frontends/gtk/res/maps.html b/frontends/gtk/res/maps.html
deleted file mode 120000
index a32f725fb..000000000
--- a/frontends/gtk/res/maps.html
+++ /dev/null
@@ -1 +0,0 @@
-en/maps.html \ No newline at end of file
diff --git a/frontends/gtk/res/messages.gresource.xml b/frontends/gtk/res/messages.gresource.xml
index 684a10862..6da406245 100644
--- a/frontends/gtk/res/messages.gresource.xml
+++ b/frontends/gtk/res/messages.gresource.xml
@@ -6,5 +6,6 @@
<file>de/Messages</file>
<file>fr/Messages</file>
<file>it/Messages</file>
+ <file>zh_CN/Messages</file>
</gresource>
</gresources>
diff --git a/frontends/gtk/res/netsurf.gresource.xml b/frontends/gtk/res/netsurf.gresource.xml
index 5bae777f3..21a2e7723 100644
--- a/frontends/gtk/res/netsurf.gresource.xml
+++ b/frontends/gtk/res/netsurf.gresource.xml
@@ -1,34 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/org/netsurf">
- <file>cookies.gtk2.ui</file>
- <file>globalhistory.gtk3.ui</file>
- <file>localhistory.gtk3.ui</file>
- <file>netsurf.gtk2.ui</file>
- <file>password.gtk3.ui</file>
- <file>toolbar.gtk2.ui</file>
- <file>warning.gtk3.ui</file>
- <file>cookies.gtk3.ui</file>
- <file>hotlist.gtk2.ui</file>
- <file>netsurf.gtk3.ui</file>
- <file>ssl.gtk2.ui</file>
- <file>toolbar.gtk3.ui</file>
- <file>downloads.gtk2.ui</file>
- <file>hotlist.gtk3.ui</file>
- <file>options.gtk2.ui</file>
- <file>ssl.gtk3.ui</file>
- <file>viewdata.gtk2.ui</file>
- <file>downloads.gtk3.ui</file>
- <file>login.gtk2.ui</file>
- <file>options.gtk3.ui</file>
- <file>tabcontents.gtk2.ui</file>
- <file>viewdata.gtk3.ui</file>
- <file>localhistory.gtk2.ui</file>
- <file>globalhistory.gtk2.ui</file>
- <file>login.gtk3.ui</file>
- <file>password.gtk2.ui</file>
- <file>tabcontents.gtk3.ui</file>
- <file>warning.gtk2.ui</file>
<file preprocess="to-pixdata">favicon.png</file>
<file preprocess="to-pixdata">netsurf.xpm</file>
<file preprocess="to-pixdata">menu_cursor.png</file>
@@ -42,24 +14,30 @@
<file preprocess="to-pixdata">throbber/throbber7.png</file>
<file preprocess="to-pixdata">throbber/throbber8.png</file>
<file>credits.html</file>
+ <file>fr/credits.html</file>
<file>it/credits.html</file>
<file>nl/credits.html</file>
+ <file>zh_CN/credits.html</file>
<file>licence.html</file>
+ <file>fr/licence.html</file>
<file>it/licence.html</file>
<file>nl/licence.html</file>
+ <file>zh_CN/licence.html</file>
<file>welcome.html</file>
<file>de/welcome.html</file>
+ <file>fr/welcome.html</file>
<file>it/welcome.html</file>
<file>ja/welcome.html</file>
<file>nl/welcome.html</file>
- <file>maps.html</file>
+ <file>zh_CN/welcome.html</file>
<file>adblock.css</file>
<file>default.css</file>
<file>internal.css</file>
<file>quirks.css</file>
<file>netsurf.png</file>
<file>default.ico</file>
- <file>arrow_down_8x32.png</file>
+ <file>icons/show-cookie.png</file>
+ <file>icons/local-history.png</file>
<file>icons/arrow-l.png</file>
<file>icons/content.png</file>
<file>icons/directory2.png</file>
@@ -67,6 +45,17 @@
<file>icons/hotlist-add.png</file>
<file>icons/hotlist-rmv.png</file>
<file>icons/search.png</file>
+ <file>icons/24x24/actions/page-info-insecure.png</file>
+ <file>icons/24x24/actions/page-info-internal.png</file>
+ <file>icons/24x24/actions/page-info-local.png</file>
+ <file>icons/24x24/actions/page-info-secure.png</file>
+ <file>icons/24x24/actions/page-info-warning.png</file>
+ <file>icons/48x48/actions/page-info-insecure.png</file>
+ <file>icons/48x48/actions/page-info-internal.png</file>
+ <file>icons/48x48/actions/page-info-local.png</file>
+ <file>icons/48x48/actions/page-info-secure.png</file>
+ <file>icons/48x48/actions/page-info-warning.png</file>
<file>languages</file>
+ <file>accelerators</file>
</gresource>
</gresources>
diff --git a/frontends/gtk/res/netsurf.gtk2.ui b/frontends/gtk/res/netsurf.gtk2.ui
deleted file mode 100644
index 68812b364..000000000
--- a/frontends/gtk/res/netsurf.gtk2.ui
+++ /dev/null
@@ -1,212 +0,0 @@
-<?xml version="1.0"?>
-<!--Generated with glade3 3.4.5 on Wed Apr 7 17:10:28 2010 -->
-<interface>
- <object class="GtkAdjustment" id="adjustment1">
- <property name="upper">100</property>
- <property name="lower">0</property>
- <property name="page_increment">10</property>
- <property name="step_increment">26</property>
- <property name="page_size">10</property>
- <property name="value">0.5357142857142857</property>
- </object>
- <object class="GtkAdjustment" id="adjustment2">
- <property name="upper">100</property>
- <property name="lower">0</property>
- <property name="page_increment">10</property>
- <property name="step_increment">26</property>
- <property name="page_size">10</property>
- <property name="value">0</property>
- </object>
- <object class="GtkUIManager" id="uimanager1">
- <ui>
- <menubar name="menubar"/>
- </ui>
- </object>
- <object class="GtkWindow" id="wndBrowser">
- <property name="title" translatable="yes">NetSurf</property>
- <property name="window_position">GTK_WIN_POS_CENTER</property>
- <child>
- <object class="GtkVBox" id="vbox14">
- <property name="visible">True</property>
- <child>
- <object class="GtkMenuBar" constructor="uimanager1" id="menubar">
- <property name="visible">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkToolbar" id="toolbar">
- <property name="visible">True</property>
- <property name="toolbar_style">GTK_TOOLBAR_BOTH_HORIZ</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkToolbar" id="searchbar">
- <property name="toolbar_style">GTK_TOOLBAR_BOTH</property>
- <child>
- <object class="GtkToolButton" id="closeSearchButton">
- <property name="visible">True</property>
- <property name="stock_id">gtk-close</property>
- </object>
- <packing>
- <property name="expand">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkToolItem" id="searchLabelItem">
- <property name="visible">True</property>
- <child>
- <object class="GtkLabel" id="searchlabel">
- <property name="visible">True</property>
- <property name="xpad">4</property>
- <property name="label" translatable="yes">Match</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="homogeneous">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkToolItem" id="toolSearch">
- <property name="visible">True</property>
- <child>
- <object class="GtkEntry" id="searchEntry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="homogeneous">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkToolButton" id="searchBackButton">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Search _Back</property>
- <property name="use_underline">True</property>
- <property name="stock_id">gtk-go-back</property>
- </object>
- <packing>
- <property name="expand">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkToolButton" id="searchForwardButton">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Search _Forward</property>
- <property name="use_underline">True</property>
- <property name="stock_id">gtk-go-forward</property>
- </object>
- <packing>
- <property name="expand">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkToolItem" id="checkAllSearchItem">
- <property name="visible">True</property>
- <child>
- <object class="GtkCheckButton" id="checkAllSearch">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="tooltip-text" translatable="yes">show all matches</property>
- <property name="label" translatable="yes">All </property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="homogeneous">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkToolItem" id="caseSensItem">
- <property name="visible">True</property>
- <child>
- <object class="GtkCheckButton" id="caseSensButton">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="tooltip-text" translatable="yes">Match case when searching</property>
- <property name="label" translatable="yes">Case</property>
- <property name="relief">GTK_RELIEF_NONE</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="homogeneous">False</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkNotebook" id="notebook">
- <property name="visible">True</property>
- <property name="show_tabs">False</property>
- <property name="show_border">False</property>
- <property name="scrollable">True</property>
- <child>
- <placeholder/>
- </child>
- <child type="tab">
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child type="tab">
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child type="tab">
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child type="tab">
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child type="tab">
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child type="tab">
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">3</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
-</interface>
diff --git a/frontends/gtk/res/netsurf.gtk3.ui b/frontends/gtk/res/netsurf.gtk3.ui
deleted file mode 100644
index ce47c6370..000000000
--- a/frontends/gtk/res/netsurf.gtk3.ui
+++ /dev/null
@@ -1,207 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<interface>
- <!-- interface-requires gtk+ 3.0 -->
- <object class="GtkWindow" id="wndBrowser">
- <property name="can_focus">False</property>
- <child>
- <object class="GtkBox" id="box1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkMenuBar" id="menubar">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkToolbar" id="toolbar">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="toolbar_style">both</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkToolbar" id="searchbar">
- <property name="can_focus">False</property>
- <property name="toolbar_style">both</property>
- <child>
- <object class="GtkToolButton" id="closeSearchButton">
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
- <property name="label" translatable="yes">gtk-close</property>
- <property name="stock_id">gtk-close</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="homogeneous">True</property>
- </packing>
- </child>
- <child>
- <object class="GtkToolItem" id="searchLabelItem">
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
- <child>
- <object class="GtkLabel" id="searchlabel">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xpad">4</property>
- <property name="label" translatable="yes">Match</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkToolItem" id="toolSearch">
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
- <child>
- <object class="GtkEntry" id="searchEntry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">â—</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkToolButton" id="searchBackButton">
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
- <property name="label" translatable="yes">Search _Back</property>
- <property name="use_underline">True</property>
- <property name="stock_id">gtk-go-back</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="homogeneous">True</property>
- </packing>
- </child>
- <child>
- <object class="GtkToolButton" id="searchForwardButton">
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
- <property name="label" translatable="yes">Search _Forward</property>
- <property name="use_underline">True</property>
- <property name="stock_id">gtk-go-forward</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="homogeneous">True</property>
- </packing>
- </child>
- <child>
- <object class="GtkToolItem" id="checkAllSearchItem">
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
- <child>
- <object class="GtkCheckButton" id="checkAllSearch">
- <property name="label" translatable="yes">All</property>
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="xalign">0</property>
- <property name="draw_indicator">True</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkToolItem" id="caseSensItem">
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
- <child>
- <object class="GtkCheckButton" id="caseSensButton">
- <property name="label" translatable="yes">Case</property>
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="xalign">0</property>
- <property name="draw_indicator">True</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkNotebook" id="notebook">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="show_tabs">False</property>
- <property name="show_border">False</property>
- <property name="scrollable">True</property>
- <child>
- <placeholder/>
- </child>
- <child type="tab">
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child type="tab">
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child type="tab">
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">3</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
-</interface>
diff --git a/frontends/gtk/res/netsurf.png b/frontends/gtk/res/netsurf.png
index 905512c25..d0ab72a5e 120000
--- a/frontends/gtk/res/netsurf.png
+++ b/frontends/gtk/res/netsurf.png
@@ -1 +1 @@
-../../../!NetSurf/Resources/netsurf.png,b60 \ No newline at end of file
+../../../resources/netsurf.png \ No newline at end of file
diff --git a/frontends/gtk/res/nl/credits.html b/frontends/gtk/res/nl/credits.html
index 9c983987a..71b27e40a 120000
--- a/frontends/gtk/res/nl/credits.html
+++ b/frontends/gtk/res/nl/credits.html
@@ -1 +1 @@
-../../../../!NetSurf/Resources/nl/credits.html,faf \ No newline at end of file
+../../../../resources/nl/credits.html \ No newline at end of file
diff --git a/frontends/gtk/res/nl/licence.html b/frontends/gtk/res/nl/licence.html
index 8a10d2073..5aaf1cb44 120000
--- a/frontends/gtk/res/nl/licence.html
+++ b/frontends/gtk/res/nl/licence.html
@@ -1 +1 @@
-../../../../!NetSurf/Resources/nl/licence.html,faf \ No newline at end of file
+../../../../resources/nl/licence.html \ No newline at end of file
diff --git a/frontends/gtk/res/nl/welcome.html b/frontends/gtk/res/nl/welcome.html
index 6b2ba7742..ef7a97cc9 120000
--- a/frontends/gtk/res/nl/welcome.html
+++ b/frontends/gtk/res/nl/welcome.html
@@ -1 +1 @@
-../../../../!NetSurf/Resources/nl/welcome.html,faf \ No newline at end of file
+../../../../resources/nl/welcome.html \ No newline at end of file
diff --git a/frontends/gtk/res/quirks.css b/frontends/gtk/res/quirks.css
index 88aabe48c..1e752cb9e 120000
--- a/frontends/gtk/res/quirks.css
+++ b/frontends/gtk/res/quirks.css
@@ -1 +1 @@
-../../../!NetSurf/Resources/Quirks,f79 \ No newline at end of file
+../../../resources/quirks.css \ No newline at end of file
diff --git a/frontends/gtk/res/ssl.gtk2.ui b/frontends/gtk/res/ssl.gtk2.ui
deleted file mode 100644
index 90f449ddd..000000000
--- a/frontends/gtk/res/ssl.gtk2.ui
+++ /dev/null
@@ -1,202 +0,0 @@
-<?xml version="1.0"?>
-<!--*- mode: xml -*-->
-<interface>
- <object class="GtkDialog" id="wndSSLProblem">
- <property name="border_width">1</property>
- <property name="title" translatable="yes">SSL certificate problem</property>
- <property name="modal">True</property>
- <property name="default_width">500</property>
- <property name="default_height">250</property>
- <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
- <child internal-child="vbox">
- <object class="GtkVBox" id="dialog-vbox3">
- <property name="visible">True</property>
- <child>
- <object class="GtkHBox" id="hbox15">
- <property name="visible">True</property>
- <child>
- <object class="GtkImage" id="image6">
- <property name="visible">True</property>
- <property name="yalign">0</property>
- <property name="icon_size">6</property>
- <property name="icon_name">gtk-dialog-warning</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkVBox" id="vbox13">
- <property name="visible">True</property>
- <child>
- <object class="GtkLabel" id="label62">
- <property name="visible">True</property>
- <property name="label" translatable="yes">NetSurf failed to verify the authenticity of an SSL certificate. Please verify the details presented below.</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkFrame" id="frame13">
- <property name="visible">True</property>
- <property name="border_width">5</property>
- <property name="label_xalign">0</property>
- <child>
- <object class="GtkAlignment" id="alignment17">
- <property name="visible">True</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkScrolledWindow" id="SSLScrolled">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
- <child>
- <object class="GtkViewport" id="SSLViewport">
- <property name="visible">True</property>
- <property name="resize_mode">GTK_RESIZE_QUEUE</property>
- <child>
- <object class="GtkDrawingArea" id="SSLDrawingArea">
- <property name="visible">True</property>
- <property name="app_paintable">True</property>
- <property name="can_focus">True</property>
- <property name="events">GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_STRUCTURE_MASK</property>
- </object>
- </child>
- </object>
- </child>
- </object>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label63">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Certificate chain&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">2</property>
- </packing>
- </child>
- <child internal-child="action_area">
- <object class="GtkHButtonBox" id="dialog-action_area3">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
- <child>
- <object class="GtkButton" id="sslreject">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <child>
- <object class="GtkAlignment" id="alignment16">
- <property name="visible">True</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
- <child>
- <object class="GtkHBox" id="hbox14">
- <property name="visible">True</property>
- <property name="spacing">2</property>
- <child>
- <object class="GtkImage" id="image5">
- <property name="visible">True</property>
- <property name="stock">gtk-cancel</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label61">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Reject</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- </child>
- </object>
- </child>
- <child>
- <object class="GtkButton" id="sslaccept">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <child>
- <object class="GtkAlignment" id="alignment15">
- <property name="visible">True</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
- <child>
- <object class="GtkHBox" id="hbox13">
- <property name="visible">True</property>
- <property name="spacing">2</property>
- <child>
- <object class="GtkImage" id="image4">
- <property name="visible">True</property>
- <property name="stock">gtk-apply</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label60">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Accept</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
- </object>
- </child>
- <action-widgets>
- <action-widget response="-6">sslreject</action-widget>
- <action-widget response="-5">sslaccept</action-widget>
- </action-widgets>
- </object>
-</interface>
diff --git a/frontends/gtk/res/ssl.gtk3.ui b/frontends/gtk/res/ssl.gtk3.ui
deleted file mode 100644
index dace2a49e..000000000
--- a/frontends/gtk/res/ssl.gtk3.ui
+++ /dev/null
@@ -1,181 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<interface>
- <!-- interface-requires gtk+ 3.0 -->
- <object class="GtkImage" id="image2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="stock">gtk-apply</property>
- </object>
- <object class="GtkImage" id="image3">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="stock">gtk-cancel</property>
- </object>
- <object class="GtkDialog" id="wndSSLProblem">
- <property name="can_focus">False</property>
- <property name="border_width">5</property>
- <property name="default_width">440</property>
- <property name="default_height">260</property>
- <property name="destroy_with_parent">True</property>
- <property name="type_hint">dialog</property>
- <child internal-child="vbox">
- <object class="GtkBox" id="dialog-vbox1">
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <property name="spacing">2</property>
- <child internal-child="action_area">
- <object class="GtkButtonBox" id="dialog-action_area1">
- <property name="can_focus">False</property>
- <property name="layout_style">end</property>
- <child>
- <object class="GtkButton" id="sslreject">
- <property name="label" translatable="yes">_Reject</property>
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
- <property name="image">image3</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="sslaccept">
- <property name="label" translatable="yes">_Accept</property>
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
- <property name="image">image2</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkBox" id="box1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkBox" id="box2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkImage" id="image1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="margin_right">8</property>
- <property name="stock">gtk-dialog-warning</property>
- <property name="icon-size">6</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">NetSurf failed to verify the authenticity of an SSL certificate. Please verify the details presented below.</property>
- <property name="wrap">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkFrame" id="frame1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child>
- <object class="GtkAlignment" id="alignment1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkScrolledWindow" id="SSLScrolled">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="shadow_type">in</property>
- <child>
- <object class="GtkViewport" id="SSLViewport">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkDrawingArea" id="SSLDrawingArea">
- <property name="visible">True</property>
- <property name="app_paintable">True</property>
- <property name="can_focus">True</property>
- <property name="events">GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_STRUCTURE_MASK</property>
- <property name="valign">start</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
- </object>
- </child>
- </object>
- </child>
- </object>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">&lt;b&gt;Certificate Chain&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- </child>
- <action-widgets>
- <action-widget response="-6">sslreject</action-widget>
- <action-widget response="-5">sslaccept</action-widget>
- </action-widgets>
- </object>
-</interface>
diff --git a/frontends/gtk/res/tabcontents.gtk2.ui b/frontends/gtk/res/tabcontents.gtk2.ui
deleted file mode 100644
index 63e290e8b..000000000
--- a/frontends/gtk/res/tabcontents.gtk2.ui
+++ /dev/null
@@ -1,92 +0,0 @@
-<?xml version="1.0"?>
-<interface>
- <!-- interface-requires gtk+ 2.12 -->
- <!-- interface-naming-policy toplevel-contextual -->
- <object class="GtkTable" id="tabContents">
- <property name="visible">True</property>
- <property name="n_rows">2</property>
- <property name="n_columns">2</property>
- <child>
- <object class="GtkLayout" id="layout">
- <property name="visible">True</property>
- <property name="app_paintable">True</property>
- <property name="events">GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_STRUCTURE_MASK | GDK_SCROLL_MASK</property>
- <property name="hadjustment">layouthadjustment</property>
- <property name="vadjustment">layoutvadjustment</property>
- </object>
- </child>
- <child>
- <object class="GtkStatusbar" id="resizer">
- <property name="height_request">1</property>
- <property name="visible">True</property>
- <property name="spacing">2</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <object class="GtkHPaned" id="hpaned1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <child>
- <object class="GtkLabel" id="status_bar">
- <property name="width_request">1</property>
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="xpad">4</property>
- <property name="label" translatable="yes">Status</property>
- </object>
- <packing>
- <property name="resize">False</property>
- <property name="shrink">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkHScrollbar" id="hscrollbar">
- <property name="visible">True</property>
- <property name="adjustment">layouthadjustment</property>
- </object>
- <packing>
- <property name="resize">True</property>
- <property name="shrink">True</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <object class="GtkVScrollbar" id="vscrollbar">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="adjustment">layoutvadjustment</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="x_options"></property>
- </packing>
- </child>
- </object>
- <object class="GtkAdjustment" id="layouthadjustment">
- <property name="upper">100</property>
- <property name="step_increment">30</property>
- <property name="page_increment">10</property>
- <property name="page_size">10</property>
- </object>
- <object class="GtkAdjustment" id="layoutvadjustment">
- <property name="upper">100</property>
- <property name="step_increment">30</property>
- <property name="page_increment">10</property>
- <property name="page_size">10</property>
- </object>
-</interface>
diff --git a/frontends/gtk/res/tabcontents.gtk3.ui b/frontends/gtk/res/tabcontents.gtk3.ui
deleted file mode 100644
index 23328b3b7..000000000
--- a/frontends/gtk/res/tabcontents.gtk3.ui
+++ /dev/null
@@ -1,92 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<interface>
- <!-- interface-requires gtk+ 3.0 -->
- <object class="GtkAdjustment" id="layouthadjustment">
- <property name="upper">100</property>
- <property name="step_increment">1</property>
- <property name="page_increment">10</property>
- </object>
- <object class="GtkAdjustment" id="layoutvadjustment">
- <property name="upper">100</property>
- <property name="step_increment">1</property>
- <property name="page_increment">10</property>
- </object>
- <object class="GtkGrid" id="tabContents">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="row_spacing">2</property>
- <property name="column_spacing">2</property>
- <child>
- <object class="GtkLayout" id="layout">
- <property name="visible">True</property>
- <property name="app_paintable">True</property>
- <property name="can_focus">False</property>
- <property name="events">GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_STRUCTURE_MASK | GDK_SCROLL_MASK</property>
- <property name="hadjustment">layouthadjustment</property>
- <property name="vadjustment">layoutvadjustment</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkScrollbar" id="vscrollbar">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="vexpand">True</property>
- <property name="orientation">vertical</property>
- <property name="adjustment">layoutvadjustment</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkPaned" id="hpaned1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hexpand">True</property>
- <child>
- <object class="GtkLabel" id="status_bar">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="xpad">4</property>
- <property name="label" translatable="yes">Status</property>
- <property name="single_line_mode">True</property>
- </object>
- <packing>
- <property name="resize">False</property>
- <property name="shrink">True</property>
- </packing>
- </child>
- <child>
- <object class="GtkScrollbar" id="hscrollbar">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="adjustment">layouthadjustment</property>
- </object>
- <packing>
- <property name="resize">True</property>
- <property name="shrink">True</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <placeholder/>
- </child>
- </object>
-</interface>
diff --git a/frontends/gtk/res/toolbar.gtk2.ui b/frontends/gtk/res/toolbar.gtk2.ui
deleted file mode 100644
index d84db5c8c..000000000
--- a/frontends/gtk/res/toolbar.gtk2.ui
+++ /dev/null
@@ -1,189 +0,0 @@
-<?xml version="1.0"?>
-<!--*- mode: xml -*-->
-<interface>
- <object class="GtkWindow" id="toolbarwindow">
- <property name="width_request">700</property>
- <property name="height_request">450</property>
- <property name="title" translatable="yes"/>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
- <property name="decorated">True</property>
- <property name="skip_taskbar_hint">False</property>
- <property name="skip_pager_hint">False</property>
- <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
- <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
- <property name="focus_on_map">True</property>
- <property name="urgency_hint">False</property>
- <child>
- <object class="GtkVBox" id="windowvbox">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
- <child>
- <object class="GtkLabel" id="toolbarlabel">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Move items from store to toolbar Rearrange items in toolbar Move items from toolbar to store</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
- <child>
- <object class="GtkScrolledWindow" id="scrolledwindow1">
- <property name="visible">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_NONE</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
- <child>
- <object class="GtkViewport" id="viewport1">
- <property name="visible">True</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
- <child>
- <object class="GtkVBox" id="widgetvbox">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
- <child>
- <placeholder/>
- </child>
- </object>
- </child>
- </object>
- </child>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- <child>
- <object class="GtkHBox" id="buttonhbox">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
- <child>
- <object class="GtkButton" id="resetbutton">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <child>
- <object class="GtkHBox" id="button1hbox">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
- <child>
- <object class="GtkImage" id="image1">
- <property name="visible">True</property>
- <property name="stock">gtk-refresh</property>
- <property name="icon_size">4</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="refreshbuttonlabel">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Reset to defaults</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- <packing>
- <property name="padding">10</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <object class="GtkButton" id="okbutton">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="has_focus">True</property>
- <property name="label">gtk-apply</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- </object>
- <packing>
- <property name="padding">10</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="cancelbutton">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-cancel</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
-</interface>
diff --git a/frontends/gtk/res/toolbar.gtk3.ui b/frontends/gtk/res/toolbar.gtk3.ui
deleted file mode 100644
index d84db5c8c..000000000
--- a/frontends/gtk/res/toolbar.gtk3.ui
+++ /dev/null
@@ -1,189 +0,0 @@
-<?xml version="1.0"?>
-<!--*- mode: xml -*-->
-<interface>
- <object class="GtkWindow" id="toolbarwindow">
- <property name="width_request">700</property>
- <property name="height_request">450</property>
- <property name="title" translatable="yes"/>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
- <property name="decorated">True</property>
- <property name="skip_taskbar_hint">False</property>
- <property name="skip_pager_hint">False</property>
- <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
- <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
- <property name="focus_on_map">True</property>
- <property name="urgency_hint">False</property>
- <child>
- <object class="GtkVBox" id="windowvbox">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
- <child>
- <object class="GtkLabel" id="toolbarlabel">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Move items from store to toolbar Rearrange items in toolbar Move items from toolbar to store</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
- <child>
- <object class="GtkScrolledWindow" id="scrolledwindow1">
- <property name="visible">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_NONE</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
- <child>
- <object class="GtkViewport" id="viewport1">
- <property name="visible">True</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
- <child>
- <object class="GtkVBox" id="widgetvbox">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
- <child>
- <placeholder/>
- </child>
- </object>
- </child>
- </object>
- </child>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- <child>
- <object class="GtkHBox" id="buttonhbox">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
- <child>
- <object class="GtkButton" id="resetbutton">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <child>
- <object class="GtkHBox" id="button1hbox">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
- <child>
- <object class="GtkImage" id="image1">
- <property name="visible">True</property>
- <property name="stock">gtk-refresh</property>
- <property name="icon_size">4</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="refreshbuttonlabel">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Reset to defaults</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- <packing>
- <property name="padding">10</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <object class="GtkButton" id="okbutton">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="has_focus">True</property>
- <property name="label">gtk-apply</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- </object>
- <packing>
- <property name="padding">10</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="cancelbutton">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-cancel</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
-</interface>
diff --git a/frontends/gtk/res/ui.gresource.xml b/frontends/gtk/res/ui.gresource.xml
new file mode 100644
index 000000000..dd43ddf59
--- /dev/null
+++ b/frontends/gtk/res/ui.gresource.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/org/netsurf">
+ <file>cookies.ui</file>
+ <file>downloads.ui</file>
+ <file>globalhistory.ui</file>
+ <file>hotlist.ui</file>
+ <file>localhistory.ui</file>
+ <file>netsurf.ui</file>
+ <file>options.ui</file>
+ <file>pageinfo.ui</file>
+ <file>password.ui</file>
+ <file>tabcontents.ui</file>
+ <file>toolbar.ui</file>
+ <file>viewdata.ui</file>
+ <file>warning.ui</file>
+ </gresource>
+</gresources>
diff --git a/frontends/gtk/res/zh_CN/credits.html b/frontends/gtk/res/zh_CN/credits.html
new file mode 120000
index 000000000..6fd96ea63
--- /dev/null
+++ b/frontends/gtk/res/zh_CN/credits.html
@@ -0,0 +1 @@
+../../../../resources/zh_CN/credits.html \ No newline at end of file
diff --git a/frontends/gtk/res/zh_CN/licence.html b/frontends/gtk/res/zh_CN/licence.html
new file mode 120000
index 000000000..d757031d5
--- /dev/null
+++ b/frontends/gtk/res/zh_CN/licence.html
@@ -0,0 +1 @@
+../../../../resources/zh_CN/licence.html \ No newline at end of file
diff --git a/frontends/gtk/res/zh_CN/welcome.html b/frontends/gtk/res/zh_CN/welcome.html
new file mode 120000
index 000000000..fa10c2a20
--- /dev/null
+++ b/frontends/gtk/res/zh_CN/welcome.html
@@ -0,0 +1 @@
+../../../../resources/zh_CN/welcome.html \ No newline at end of file
diff --git a/frontends/gtk/resources.c b/frontends/gtk/resources.c
index ef92fefc8..fc17f7418 100644
--- a/frontends/gtk/resources.c
+++ b/frontends/gtk/resources.c
@@ -77,8 +77,6 @@ static struct nsgtk_resource_s ui_resource[] = {
RES_ENTRY("netsurf"),
RES_ENTRY("tabcontents"),
RES_ENTRY("password"),
- RES_ENTRY("login"),
- RES_ENTRY("ssl"),
RES_ENTRY("toolbar"),
RES_ENTRY("downloads"),
RES_ENTRY("globalhistory"),
@@ -88,6 +86,7 @@ static struct nsgtk_resource_s ui_resource[] = {
RES_ENTRY("cookies"),
RES_ENTRY("viewdata"),
RES_ENTRY("warning"),
+ RES_ENTRY("pageinfo"),
{ NULL, 0, NSGTK_RESOURCE_FILE, NULL },
};
@@ -96,7 +95,18 @@ static struct nsgtk_resource_s pixbuf_resource[] = {
RES_ENTRY("favicon.png"),
RES_ENTRY("netsurf.xpm"),
RES_ENTRY("menu_cursor.png"),
- RES_ENTRY("arrow_down_8x32.png"),
+ RES_ENTRY("icons/local-history.png"),
+ RES_ENTRY("icons/show-cookie.png"),
+ RES_ENTRY("icons/24x24/actions/page-info-insecure.png"),
+ RES_ENTRY("icons/24x24/actions/page-info-internal.png"),
+ RES_ENTRY("icons/24x24/actions/page-info-local.png"),
+ RES_ENTRY("icons/24x24/actions/page-info-secure.png"),
+ RES_ENTRY("icons/24x24/actions/page-info-warning.png"),
+ RES_ENTRY("icons/48x48/actions/page-info-insecure.png"),
+ RES_ENTRY("icons/48x48/actions/page-info-internal.png"),
+ RES_ENTRY("icons/48x48/actions/page-info-local.png"),
+ RES_ENTRY("icons/48x48/actions/page-info-secure.png"),
+ RES_ENTRY("icons/48x48/actions/page-info-warning.png"),
RES_ENTRY("throbber/throbber0.png"),
RES_ENTRY("throbber/throbber1.png"),
RES_ENTRY("throbber/throbber2.png"),
@@ -114,7 +124,6 @@ static struct nsgtk_resource_s direct_resource[] = {
RES_ENTRY("welcome.html"),
RES_ENTRY("credits.html"),
RES_ENTRY("licence.html"),
- RES_ENTRY("maps.html"),
RES_ENTRY("default.css"),
RES_ENTRY("adblock.css"),
RES_ENTRY("internal.css"),
@@ -129,6 +138,7 @@ static struct nsgtk_resource_s direct_resource[] = {
RES_ENTRY("icons/hotlist-rmv.png"),
RES_ENTRY("icons/search.png"),
RES_ENTRY("languages"),
+ RES_ENTRY("accelerators"),
RES_ENTRY("Messages"),
{ NULL, 0, NSGTK_RESOURCE_FILE, NULL },
};
@@ -178,11 +188,12 @@ init_resource(char **respath, struct nsgtk_resource_s *resource)
langv = g_get_language_names();
+ /* look for resource under per language paths */
while (langv[langc] != NULL) {
+ /* allocate and fill a full resource name path buffer */
resnamelen = snprintf(NULL, 0,
"/org/netsurf/%s/%s",
langv[langc], resource->name);
-
resname = malloc(resnamelen + 1);
if (resname == NULL) {
return NSERROR_NOMEM;
@@ -191,6 +202,7 @@ init_resource(char **respath, struct nsgtk_resource_s *resource)
"/org/netsurf/%s/%s",
langv[langc], resource->name);
+ /* check if resource is present */
present = g_resources_get_info(resname,
G_RESOURCE_LOOKUP_FLAGS_NONE,
NULL, NULL, NULL);
@@ -208,8 +220,9 @@ init_resource(char **respath, struct nsgtk_resource_s *resource)
langc++;
}
- resnamelen = snprintf(NULL, 0, "/org/netsurf/%s", resource->name);
+ /* allocate and fill a full resource name path buffer with no language*/
+ resnamelen = snprintf(NULL, 0, "/org/netsurf/%s", resource->name);
resname = malloc(resnamelen + 1);
if (resname == NULL) {
return NSERROR_NOMEM;
@@ -232,20 +245,22 @@ init_resource(char **respath, struct nsgtk_resource_s *resource)
#endif
+ /* look for file on disc */
resname = filepath_find(respath, resource->name);
- if (resname == NULL) {
+ if (resname != NULL) {
+ /* found an entry on the path */
+ resource->path = resname;
+ resource->type = NSGTK_RESOURCE_FILE;
+
NSLOG(netsurf, INFO,
- "Unable to find resource %s on resource path",
- resource->name);
- return NSERROR_NOT_FOUND;
+ "Found file resource path %s", resource->path);
+ return NSERROR_OK;
}
- /* found an entry on the path */
- resource->path = resname;
- resource->type = NSGTK_RESOURCE_FILE;
+ NSLOG(netsurf, INFO, "Unable to find resource %s on resource path",
+ resource->name);
- NSLOG(netsurf, INFO, "Found file resource path %s", resource->path);
- return NSERROR_OK;
+ return NSERROR_NOT_FOUND;
}
/**
@@ -330,11 +345,6 @@ init_pixbuf_resource(char **respath, struct nsgtk_resource_s *resource)
*/
static nserror init_ui_resource(char **respath, struct nsgtk_resource_s *ui_res)
{
-#if GTK_CHECK_VERSION(3,0,0)
- int gtkv = 3;
-#else
- int gtkv = 2;
-#endif
int resnamelen;
char *resname;
struct nsgtk_resource_s resource;
@@ -346,7 +356,7 @@ static nserror init_ui_resource(char **respath, struct nsgtk_resource_s *ui_res)
if (resname == NULL) {
return NSERROR_NOMEM;
}
- snprintf(resname, resnamelen, "%s.gtk%d.ui", ui_res->name, gtkv);
+ snprintf(resname, resnamelen, "%s.ui", ui_res->name);
resource.name = resname;
resource.len = ui_res->len;
resource.path = NULL;
@@ -381,7 +391,7 @@ find_resource_from_name(const char *resname, struct nsgtk_resource_s *resource)
#ifdef SHOW_GRESOURCE
/**
- * Debug dump of all resources compile din via GResource.
+ * Debug dump of all resources compiled in via GResource.
*/
static void list_gresource(void)
{
diff --git a/frontends/gtk/scaffolding.c b/frontends/gtk/scaffolding.c
index cbc46cbc5..f9d4f6d67 100644
--- a/frontends/gtk/scaffolding.c
+++ b/frontends/gtk/scaffolding.c
@@ -1,6 +1,5 @@
/*
- * Copyright 2006 Rob Kendrick <rjek@rjek.com>
- * Copyright 2009 Mark Benjamin <netsurf-browser.org.MarkBenjamin@dfgh.net>
+ * Copyright 2019 Vincent Sanders <vince@netsurf-browser.org>
*
* This file is part of NetSurf, http://www.netsurf-browser.org/
*
@@ -17,92 +16,51 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <assert.h>
+#include <gtk/gtk.h>
#include <stdbool.h>
-#include <stdio.h>
-#include <errno.h>
#include <stdlib.h>
-#include <unistd.h>
#include <string.h>
-#include <gtk/gtk.h>
-#include <gdk-pixbuf/gdk-pixbuf.h>
#include "utils/utils.h"
-#include "utils/dirent.h"
-#include "utils/messages.h"
-#include "utils/corestrings.h"
#include "utils/log.h"
-#include "utils/nsoption.h"
-#include "utils/file.h"
+#include "utils/messages.h"
#include "utils/nsurl.h"
-#include "netsurf/content.h"
-#include "netsurf/keypress.h"
+#include "utils/nsoption.h"
#include "netsurf/browser_window.h"
-#include "netsurf/plotters.h"
#include "desktop/browser_history.h"
#include "desktop/hotlist.h"
-#include "desktop/print.h"
-#include "desktop/save_complete.h"
-#ifdef WITH_PDF_EXPORT
-#include "desktop/font_haru.h"
-#include "desktop/save_pdf.h"
-#endif
-#include "desktop/save_text.h"
-#include "desktop/searchweb.h"
-#include "desktop/search.h"
#include "gtk/compat.h"
-#include "gtk/warn.h"
-#include "gtk/cookies.h"
-#include "gtk/completion.h"
-#include "gtk/preferences.h"
-#include "gtk/about.h"
-#include "gtk/viewsource.h"
-#include "gtk/bitmap.h"
-#include "gtk/gui.h"
-#include "gtk/global_history.h"
+#include "gtk/toolbar_items.h"
+#include "gtk/menu.h"
#include "gtk/local_history.h"
-#include "gtk/hotlist.h"
+#include "gtk/gui.h"
#include "gtk/download.h"
-#include "gtk/menu.h"
-#include "gtk/plotters.h"
-#include "gtk/print.h"
-#include "gtk/search.h"
-#include "gtk/throbber.h"
-#include "gtk/toolbar.h"
#include "gtk/window.h"
-#include "gtk/gdk.h"
-#include "gtk/scaffolding.h"
+#include "gtk/warn.h"
#include "gtk/tabs.h"
-#include "gtk/schedule.h"
-#include "gtk/viewdata.h"
#include "gtk/resources.h"
-#include "gtk/layout_pango.h"
-
-/** Macro to define a handler for menu, button and activate events. */
-#define MULTIHANDLER(q)\
-static gboolean nsgtk_on_##q##_activate(struct nsgtk_scaffolding *g);\
-static gboolean nsgtk_on_##q##_activate_menu(GtkMenuItem *widget, gpointer data)\
-{\
- struct nsgtk_scaffolding *g = (struct nsgtk_scaffolding *)data;\
- return nsgtk_on_##q##_activate(g);\
-}\
-static gboolean nsgtk_on_##q##_activate_button(GtkButton *widget, gpointer data)\
-{\
- struct nsgtk_scaffolding *g = (struct nsgtk_scaffolding *)data;\
- return nsgtk_on_##q##_activate(g);\
-}\
-static gboolean nsgtk_on_##q##_activate(struct nsgtk_scaffolding *g)
-
-/** Macro to define a handler for menu events. */
-#define MENUHANDLER(q)\
-static gboolean nsgtk_on_##q##_activate_menu(GtkMenuItem *widget, gpointer data)
-
-/** Macro to define a handler for button events. */
-#define BUTTONHANDLER(q)\
-static gboolean nsgtk_on_##q##_activate(GtkButton *widget, gpointer data)
-
-/** Core scaffolding structure. */
+#include "gtk/scaffolding.h"
+
+
+/**
+ * menu entry context
+ */
+struct nsgtk_menu {
+ GtkWidget *main; /* main menu entry */
+ GtkWidget *burger; /* right click menu */
+ GtkWidget *popup; /* popup menu entry */
+ /**
+ * menu item handler
+ */
+ gboolean (*mhandler)(GtkMenuItem *widget, gpointer data);
+ const char *iconname; /* name of the icon to use */
+ bool sensitivity; /* menu item is sensitive */
+};
+
+/**
+ * Core scaffolding structure.
+ */
struct nsgtk_scaffolding {
/** global linked list of scaffolding for gui interface adjustments */
struct nsgtk_scaffolding *next, *prev;
@@ -115,45 +73,37 @@ struct nsgtk_scaffolding {
/** scaffold container window */
GtkWindow *window;
- bool fullscreen; /**< flag for the scaffold window fullscreen status */
/** tab widget holding displayed pages */
GtkNotebook *notebook;
- /** entry widget holding the url of the current displayed page */
- GtkWidget *url_bar;
- GtkEntryCompletion *url_bar_completion; /**< Completions for url_bar */
-
- /** Activity throbber */
- GtkImage *throbber;
- int throb_frame; /**< Current frame of throbber animation */
-
- struct gtk_search *search;
- /** Web search widget */
- GtkWidget *webSearchEntry;
-
- /** controls toolbar */
- GtkToolbar *tool_bar;
- struct nsgtk_button_connect *buttons[PLACEHOLDER_BUTTON];
- int offset;
- int toolbarmem;
- int toolbarbase;
- int historybase;
+ /** handler id for tabs remove callback */
+ gulong tabs_remove_handler_id;
/** menu bar hierarchy */
struct nsgtk_bar_submenu *menu_bar;
+ /** burger menu hierarchy */
+ struct nsgtk_burger_menu *burger_menu;
+
/** right click popup menu hierarchy */
- struct nsgtk_popup_menu *menu_popup;
+ struct nsgtk_popup_menu *popup_menu;
/** link popup menu */
struct nsgtk_link_menu *link_menu;
+
+ /** menu entries widgets for sensitivity adjustment */
+ struct nsgtk_menu menus[PLACEHOLDER_BUTTON];
};
-/** current scaffold for model dialogue use */
+/**
+ * current scaffold for model dialogue use
+ */
static struct nsgtk_scaffolding *scaf_current;
-/** global list for interface changes */
+/**
+ * global list for interface changes
+ */
static struct nsgtk_scaffolding *scaf_list = NULL;
/**
@@ -167,45 +117,31 @@ static struct browser_window_features current_menu_features;
* Helper to hide popup menu entries by grouping.
*
* \param menu The popup menu to modify.
- * \param submenu flag to indicate if submenus should be hidden.
* \param nav flag to indicate if navigation entries should be hidden.
* \param cnp flag to indicate if cut and paste entries should be hidden.
* \param custom flag to indicate if menu customisation is hidden.
*/
static void
-popup_menu_hide(struct nsgtk_popup_menu *menu,
- bool submenu,
- bool nav,
- bool cnp,
- bool custom)
+popup_menu_hide(struct nsgtk_popup_menu *menu, bool nav, bool cnp)
{
- if (submenu) {
- gtk_widget_hide(GTK_WIDGET(menu->file_menuitem));
- gtk_widget_hide(GTK_WIDGET(menu->edit_menuitem));
- gtk_widget_hide(GTK_WIDGET(menu->view_menuitem));
- gtk_widget_hide(GTK_WIDGET(menu->nav_menuitem));
- gtk_widget_hide(GTK_WIDGET(menu->help_menuitem));
-
- gtk_widget_hide(menu->first_separator);
- }
-
if (nav) {
gtk_widget_hide(GTK_WIDGET(menu->back_menuitem));
gtk_widget_hide(GTK_WIDGET(menu->forward_menuitem));
gtk_widget_hide(GTK_WIDGET(menu->stop_menuitem));
gtk_widget_hide(GTK_WIDGET(menu->reload_menuitem));
+
+ gtk_widget_hide(menu->first_separator);
}
if (cnp) {
gtk_widget_hide(GTK_WIDGET(menu->cut_menuitem));
gtk_widget_hide(GTK_WIDGET(menu->copy_menuitem));
gtk_widget_hide(GTK_WIDGET(menu->paste_menuitem));
- }
- if (custom) {
- gtk_widget_hide(GTK_WIDGET(menu->customize_menuitem));
+ gtk_widget_hide(menu->second_separator);
}
+
}
@@ -213,48 +149,32 @@ popup_menu_hide(struct nsgtk_popup_menu *menu,
* Helper to show popup menu entries by grouping.
*
* \param menu The popup menu to modify.
- * \param submenu flag to indicate if submenus should be visible.
* \param nav flag to indicate if navigation entries should be visible.
* \param cnp flag to indicate if cut and paste entries should be visible.
* \param custom flag to indicate if menu customisation is visible.
*/
static void
-popup_menu_show(struct nsgtk_popup_menu *menu,
- bool submenu,
- bool nav,
- bool cnp,
- bool custom)
+popup_menu_show(struct nsgtk_popup_menu *menu, bool nav, bool cnp)
{
- if (submenu) {
- gtk_widget_show(GTK_WIDGET(menu->file_menuitem));
- gtk_widget_show(GTK_WIDGET(menu->edit_menuitem));
- gtk_widget_show(GTK_WIDGET(menu->view_menuitem));
- gtk_widget_show(GTK_WIDGET(menu->nav_menuitem));
- gtk_widget_show(GTK_WIDGET(menu->help_menuitem));
-
- gtk_widget_show(menu->first_separator);
- }
-
if (nav) {
gtk_widget_show(GTK_WIDGET(menu->back_menuitem));
gtk_widget_show(GTK_WIDGET(menu->forward_menuitem));
gtk_widget_show(GTK_WIDGET(menu->stop_menuitem));
gtk_widget_show(GTK_WIDGET(menu->reload_menuitem));
+
+ gtk_widget_show(menu->first_separator);
}
if (cnp) {
gtk_widget_show(GTK_WIDGET(menu->cut_menuitem));
gtk_widget_show(GTK_WIDGET(menu->copy_menuitem));
gtk_widget_show(GTK_WIDGET(menu->paste_menuitem));
- }
- if (custom) {
- gtk_widget_show(GTK_WIDGET(menu->customize_menuitem));
+ gtk_widget_show(menu->second_separator);
}
-}
+}
-/* event handlers and support functions for them */
/**
* resource cleanup function for window destruction.
@@ -273,6 +193,18 @@ static void scaffolding_window_destroy(GtkWidget *widget, gpointer data)
nsgtk_local_history_hide();
+ /* ensure scaffolding being destroyed is not current */
+ if (scaf_current == gs) {
+ scaf_current = NULL;
+ /* attempt to select nearest scaffold instead of just selecting the first */
+ if (gs->prev != NULL) {
+ scaf_current = gs->prev;
+ } else if (gs->next != NULL) {
+ scaf_current = gs->next;
+ }
+ }
+
+ /* remove scaffolding from list */
if (gs->prev != NULL) {
gs->prev->next = gs->next;
} else {
@@ -284,6 +216,16 @@ static void scaffolding_window_destroy(GtkWidget *widget, gpointer data)
NSLOG(netsurf, INFO, "scaffold list head: %p", scaf_list);
+ /* ensure menu resources are freed */
+ nsgtk_menu_bar_destroy(gs->menu_bar);
+ nsgtk_burger_menu_destroy(gs->burger_menu);
+ nsgtk_popup_menu_destroy(gs->popup_menu);
+ nsgtk_link_menu_destroy(gs->link_menu);
+
+ g_signal_handler_disconnect(gs->notebook, gs->tabs_remove_handler_id);
+
+ free(gs);
+
if (scaf_list == NULL) {
/* no more open windows - stop the browser */
nsgtk_complete = true;
@@ -326,100 +268,74 @@ static void scaffolding_update_context(struct nsgtk_scaffolding *g)
{
struct browser_window *bw = nsgtk_get_browser_window(g->top_level);
- g->buttons[BACK_BUTTON]->sensitivity =
- browser_window_history_back_available(bw);
- g->buttons[FORWARD_BUTTON]->sensitivity =
- browser_window_history_forward_available(bw);
+ g->menus[BACK_BUTTON].sensitivity =
+ browser_window_history_back_available(bw);
+ g->menus[FORWARD_BUTTON].sensitivity =
+ browser_window_history_forward_available(bw);
nsgtk_scaffolding_set_sensitivity(g);
- /* update the url bar, particularly necessary when tabbing */
- browser_window_refresh_url_bar(bw);
-
nsgtk_local_history_hide();
}
/**
- * Make the throbber run.
- *
- * scheduled callback to update the throbber
- *
- * \param p The context passed when scheduled.
- */
-static void nsgtk_throb(void *p)
-{
- struct nsgtk_scaffolding *g = p;
-
- if (g->throb_frame >= (nsgtk_throbber->nframes - 1)) {
- g->throb_frame = 1;
- } else {
- g->throb_frame++;
- }
-
- gtk_image_set_from_pixbuf(g->throbber,
- nsgtk_throbber->framedata[g->throb_frame]);
-
- nsgtk_schedule(100, nsgtk_throb, p);
-}
-
-
-/**
* edit the sensitivity of focused widget
*
+ * \todo this needs to update toolbar sensitivity
+ *
* \param g The scaffolding context.
*/
static guint
-nsgtk_scaffolding_update_edit_actions_sensitivity(
- struct nsgtk_scaffolding *g)
+nsgtk_scaffolding_update_edit_actions_sensitivity(struct nsgtk_scaffolding *g)
{
GtkWidget *widget = gtk_window_get_focus(g->window);
- gboolean has_selection;
if (GTK_IS_EDITABLE(widget)) {
+ gboolean has_selection;
has_selection = gtk_editable_get_selection_bounds(
- GTK_EDITABLE (widget), NULL, NULL);
-
- g->buttons[COPY_BUTTON]->sensitivity = has_selection;
- g->buttons[CUT_BUTTON]->sensitivity = has_selection;
- g->buttons[PASTE_BUTTON]->sensitivity = true;
+ GTK_EDITABLE(widget), NULL, NULL);
+ g->menus[COPY_BUTTON].sensitivity = has_selection;
+ g->menus[CUT_BUTTON].sensitivity = has_selection;
+ g->menus[PASTE_BUTTON].sensitivity = true;
} else {
struct browser_window *bw =
- nsgtk_get_browser_window(g->top_level);
+ nsgtk_get_browser_window(g->top_level);
browser_editor_flags edit_f =
- browser_window_get_editor_flags(bw);
-
- g->buttons[COPY_BUTTON]->sensitivity =
- edit_f & BW_EDITOR_CAN_COPY;
- g->buttons[CUT_BUTTON]->sensitivity =
- edit_f & BW_EDITOR_CAN_CUT;
- g->buttons[PASTE_BUTTON]->sensitivity =
- edit_f & BW_EDITOR_CAN_PASTE;
+ browser_window_get_editor_flags(bw);
+
+ g->menus[COPY_BUTTON].sensitivity =
+ edit_f & BW_EDITOR_CAN_COPY;
+ g->menus[CUT_BUTTON].sensitivity =
+ edit_f & BW_EDITOR_CAN_CUT;
+ g->menus[PASTE_BUTTON].sensitivity =
+ edit_f & BW_EDITOR_CAN_PASTE;
}
nsgtk_scaffolding_set_sensitivity(g);
- return ((g->buttons[COPY_BUTTON]->sensitivity) |
- (g->buttons[CUT_BUTTON]->sensitivity) |
- (g->buttons[PASTE_BUTTON]->sensitivity));
+
+ return ((g->menus[COPY_BUTTON].sensitivity) |
+ (g->menus[CUT_BUTTON].sensitivity) |
+ (g->menus[PASTE_BUTTON].sensitivity));
}
/**
* make edit actions sensitive
*
+ * \todo toolbar sensitivity
+ *
* \param g The scaffolding context.
*/
static void
-nsgtk_scaffolding_enable_edit_actions_sensitivity(
- struct nsgtk_scaffolding *g)
+nsgtk_scaffolding_enable_edit_actions_sensitivity(struct nsgtk_scaffolding *g)
{
-
- g->buttons[PASTE_BUTTON]->sensitivity = true;
- g->buttons[COPY_BUTTON]->sensitivity = true;
- g->buttons[CUT_BUTTON]->sensitivity = true;
+ g->menus[PASTE_BUTTON].sensitivity = true;
+ g->menus[COPY_BUTTON].sensitivity = true;
+ g->menus[CUT_BUTTON].sensitivity = true;
nsgtk_scaffolding_set_sensitivity(g);
- popup_menu_show(g->menu_popup, false, false, true, false);
+ popup_menu_show(g->popup_menu, false, true);
}
/* signal handling functions for the toolbar, URL bar, and menu bar */
@@ -456,6 +372,7 @@ nsgtk_window_edit_menu_hidden(GtkWidget *widget,
return TRUE;
}
+
/**
* gtk event handler for popup menu being hidden.
*
@@ -463,80 +380,10 @@ nsgtk_window_edit_menu_hidden(GtkWidget *widget,
* \param g scaffolding handle
* \return TRUE to indicate event handled
*/
-static gboolean nsgtk_window_popup_menu_hidden(GtkWidget *widget,
- struct nsgtk_scaffolding *g)
-{
- nsgtk_scaffolding_enable_edit_actions_sensitivity(g);
- return TRUE;
-}
-
-/* exported interface documented in gtk/scaffolding.h */
-gboolean nsgtk_window_url_activate_event(GtkWidget *widget, gpointer data)
-{
- struct nsgtk_scaffolding *g = data;
- nserror ret;
- nsurl *url;
-
- ret = search_web_omni(gtk_entry_get_text(GTK_ENTRY(g->url_bar)),
- SEARCH_WEB_OMNI_NONE,
- &url);
- if (ret == NSERROR_OK) {
- ret = browser_window_navigate(nsgtk_get_browser_window(g->top_level),
- url, NULL, BW_NAVIGATE_HISTORY,
- NULL, NULL, NULL);
- nsurl_unref(url);
- }
- if (ret != NSERROR_OK) {
- nsgtk_warning(messages_get_errorcode(ret), 0);
- }
-
- return TRUE;
-}
-
-
-/**
- * update handler for URL entry widget
- *
- * \param widget The widget receiving the delete event
- * \param event The event
- * \param data The context pointer passed when the connection was made.
- * \return TRUE to indicate signal handled.
- */
-gboolean
-nsgtk_window_url_changed(GtkWidget *widget,
- GdkEventKey *event,
- gpointer data)
-{
- return nsgtk_completion_update(GTK_ENTRY(widget));
-}
-
-
-/**
- * Event handler for popup menu on toolbar.
- *
- * \param toolbar The toolbar being clicked
- * \param x The x coordinate where the click happened
- * \param y The x coordinate where the click happened
- * \param button the buttons being pressed
- * \param data The context pointer passed when the connection was made.
- * \return TRUE to indicate event handled.
- */
static gboolean
-nsgtk_window_tool_bar_clicked(GtkToolbar *toolbar,
- gint x,
- gint y,
- gint button,
- gpointer data)
+nsgtk_window_popup_menu_hidden(GtkWidget *widget, struct nsgtk_scaffolding *g)
{
- struct nsgtk_scaffolding *g = (struct nsgtk_scaffolding *)data;
-
- /* set visibility for right-click popup menu */
- popup_menu_hide(g->menu_popup, true, false, true, false);
- popup_menu_show(g->menu_popup, false, false, false, true);
-
- gtk_menu_popup(g->menu_popup->popup_menu, NULL, NULL, NULL, NULL, 0,
- gtk_get_current_event_time());
-
+ nsgtk_scaffolding_enable_edit_actions_sensitivity(g);
return TRUE;
}
@@ -544,6 +391,9 @@ nsgtk_window_tool_bar_clicked(GtkToolbar *toolbar,
/**
* Update the menus when the number of tabs changes.
*
+ * \todo toolbar sensitivity
+ * \todo next/previous tab ought to only be visible if there is such a tab
+ *
* \param notebook The notebook all the tabs are in
* \param page The newly added page container widget
* \param page_num The index of the newly added page
@@ -557,12 +407,18 @@ nsgtk_window_tabs_add(GtkNotebook *notebook,
{
gboolean visible = gtk_notebook_get_show_tabs(g->notebook);
g_object_set(g->menu_bar->view_submenu->tabs_menuitem,
- "visible", visible, NULL);
- g_object_set(g->menu_popup->view_submenu->tabs_menuitem,
- "visible", visible, NULL);
- g->buttons[NEXTTAB_BUTTON]->sensitivity = visible;
- g->buttons[PREVTAB_BUTTON]->sensitivity = visible;
- g->buttons[CLOSETAB_BUTTON]->sensitivity = visible;
+ "visible",
+ visible,
+ NULL);
+ g_object_set(g->burger_menu->view_submenu->tabs_menuitem,
+ "visible",
+ visible,
+ NULL);
+
+ g->menus[NEXTTAB_BUTTON].sensitivity = visible;
+ g->menus[PREVTAB_BUTTON].sensitivity = visible;
+ g->menus[CLOSETAB_BUTTON].sensitivity = visible;
+
nsgtk_scaffolding_set_sensitivity(g);
}
@@ -570,6 +426,8 @@ nsgtk_window_tabs_add(GtkNotebook *notebook,
/**
* Update the menus when the number of tabs changes.
*
+ * \todo toolbar sensitivity
+ *
* \param notebook The notebook all the tabs are in
* \param page The page container widget being removed
* \param page_num The index of the removed page
@@ -581,6 +439,8 @@ nsgtk_window_tabs_remove(GtkNotebook *notebook,
guint page_num,
struct nsgtk_scaffolding *gs)
{
+ gboolean visible;
+
/* if the scaffold is being destroyed it is not useful to
* update the state, further many of the widgets may have
* already been destroyed.
@@ -595,472 +455,46 @@ nsgtk_window_tabs_remove(GtkNotebook *notebook,
return;
}
- gboolean visible = gtk_notebook_get_show_tabs(gs->notebook);
- g_object_set(gs->menu_bar->view_submenu->tabs_menuitem, "visible", visible, NULL);
- g_object_set(gs->menu_popup->view_submenu->tabs_menuitem, "visible", visible, NULL);
- gs->buttons[NEXTTAB_BUTTON]->sensitivity = visible;
- gs->buttons[PREVTAB_BUTTON]->sensitivity = visible;
- gs->buttons[CLOSETAB_BUTTON]->sensitivity = visible;
- nsgtk_scaffolding_set_sensitivity(gs);
-}
-
-/**
- * Handle opening a file path.
- *
- * \param filename The filename to open.
- */
-static void nsgtk_openfile_open(const char *filename)
-{
- struct browser_window *bw;
- char *urltxt;
- nsurl *url;
- nserror error;
-
- bw = nsgtk_get_browser_window(scaf_current->top_level);
-
- urltxt = malloc(strlen(filename) + FILE_SCHEME_PREFIX_LEN + 1);
-
- if (urltxt != NULL) {
- sprintf(urltxt, FILE_SCHEME_PREFIX"%s", filename);
-
- error = nsurl_create(urltxt, &url);
- if (error != NSERROR_OK) {
- nsgtk_warning(messages_get_errorcode(error), 0);
- } else {
- browser_window_navigate(bw,
- url,
- NULL,
- BW_NAVIGATE_HISTORY,
- NULL,
- NULL,
- NULL);
- nsurl_unref(url);
- }
- free(urltxt);
- }
-}
-
-/* signal handlers for menu entries */
-
-MULTIHANDLER(newwindow)
-{
- struct browser_window *bw = nsgtk_get_browser_window(g->top_level);
- const char *addr;
- nsurl *url;
- nserror error;
-
- if (nsoption_charp(homepage_url) != NULL) {
- addr = nsoption_charp(homepage_url);
- } else {
- addr = NETSURF_HOMEPAGE;
- }
-
- error = nsurl_create(addr, &url);
- if (error == NSERROR_OK) {
- error = browser_window_create(BW_CREATE_HISTORY,
- url,
- NULL,
- bw,
- NULL);
- nsurl_unref(url);
- }
- if (error != NSERROR_OK) {
- nsgtk_warning(messages_get_errorcode(error), 0);
- }
-
- return TRUE;
-}
-
-/* exported interface documented in gtk/scaffolding.h */
-nserror nsgtk_scaffolding_new_tab(struct gui_window *gw)
-{
- struct browser_window *bw = nsgtk_get_browser_window(gw);
- nsurl *url = NULL;
- nserror error;
-
- if (!nsoption_bool(new_blank)) {
- const char *addr;
- if (nsoption_charp(homepage_url) != NULL) {
- addr = nsoption_charp(homepage_url);
- } else {
- addr = NETSURF_HOMEPAGE;
- }
- error = nsurl_create(addr, &url);
- if (error != NSERROR_OK) {
- nsgtk_warning(messages_get_errorcode(error), 0);
- }
- }
-
- error = browser_window_create(BW_CREATE_HISTORY |
- BW_CREATE_TAB,
- url,
- NULL,
- bw,
- NULL);
- if (url != NULL) {
- nsurl_unref(url);
- }
- return error;
-}
+ visible = gtk_notebook_get_show_tabs(gs->notebook);
+ g_object_set(gs->menu_bar->view_submenu->tabs_menuitem,
+ "visible", visible, NULL);
+ g_object_set(gs->burger_menu->view_submenu->tabs_menuitem,
+ "visible", visible, NULL);
-MULTIHANDLER(newtab)
-{
- nserror error;
+ gs->menus[NEXTTAB_BUTTON].sensitivity = visible;
+ gs->menus[PREVTAB_BUTTON].sensitivity = visible;
+ gs->menus[CLOSETAB_BUTTON].sensitivity = visible;
- error = nsgtk_scaffolding_new_tab(g->top_level);
- if (error != NSERROR_OK) {
- nsgtk_warning(messages_get_errorcode(error), 0);
- }
- return TRUE;
+ nsgtk_scaffolding_set_sensitivity(gs);
}
-MULTIHANDLER(openfile)
-{
- GtkWidget *dlgOpen;
- gint response;
-
- scaf_current = g;
- dlgOpen = gtk_file_chooser_dialog_new("Open File",
- scaf_current->window,
- GTK_FILE_CHOOSER_ACTION_OPEN,
- NSGTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- NSGTK_STOCK_OPEN, GTK_RESPONSE_OK,
- NULL, NULL);
-
- response = gtk_dialog_run(GTK_DIALOG(dlgOpen));
- if (response == GTK_RESPONSE_OK) {
- gchar *filename;
- filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dlgOpen));
-
- nsgtk_openfile_open((const char *)filename);
-
- g_free(filename);
- }
- gtk_widget_destroy(dlgOpen);
- return TRUE;
-}
+/* signal handlers for menu entries */
/**
- * callback to determine if a path is a directory.
- *
- * \param info The path information
- * \param data context pointer set to NULL
- * \return TRUE if path is a directory else false
+ * handle menu activate signals by calling toolbar item activation
*/
-static gboolean
-nsgtk_filter_directory(const GtkFileFilterInfo *info,
- gpointer data)
-{
- DIR *d = opendir(info->filename);
- if (d == NULL)
- return FALSE;
- closedir(d);
- return TRUE;
-}
-
-MULTIHANDLER(savepage)
-{
- if (!browser_window_has_content(nsgtk_get_browser_window(g->top_level)))
- return FALSE;
-
- GtkWidget *fc = gtk_file_chooser_dialog_new(
- messages_get("gtkcompleteSave"), g->window,
- GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER,
- NSGTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- NSGTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT,
- NULL);
- DIR *d;
- char *path;
- nserror res;
- GtkFileFilter *filter = gtk_file_filter_new();
- gtk_file_filter_set_name(filter, "Directories");
- gtk_file_filter_add_custom(filter, GTK_FILE_FILTER_FILENAME,
- nsgtk_filter_directory, NULL, NULL);
- gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(fc), filter);
- gtk_file_chooser_set_filter(GTK_FILE_CHOOSER(fc), filter);
-
- res = nsurl_nice(browser_window_get_url(
- nsgtk_get_browser_window(g->top_level)), &path, false);
- if (res != NSERROR_OK) {
- path = strdup(messages_get("SaveText"));
- if (path == NULL) {
- nsgtk_warning("NoMemory", 0);
- return FALSE;
- }
- }
-
- if (access(path, F_OK) != 0)
- gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(fc), path);
- free(path);
-
- gtk_file_chooser_set_do_overwrite_confirmation(GTK_FILE_CHOOSER(fc),
- TRUE);
-
- if (gtk_dialog_run(GTK_DIALOG(fc)) != GTK_RESPONSE_ACCEPT) {
- gtk_widget_destroy(fc);
- return TRUE;
- }
-
- path = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(fc));
- d = opendir(path);
- if (d == NULL) {
- NSLOG(netsurf, INFO,
- "Unable to open directory %s for complete save: %s",
- path,
- strerror(errno));
- if (errno == ENOTDIR)
- nsgtk_warning("NoDirError", path);
- else
- nsgtk_warning("gtkFileError", path);
- gtk_widget_destroy(fc);
- g_free(path);
- return TRUE;
- }
- closedir(d);
- save_complete(browser_window_get_content(nsgtk_get_browser_window(
- g->top_level)), path, NULL);
- g_free(path);
-
- gtk_widget_destroy(fc);
-
- return TRUE;
-}
-
-
-MULTIHANDLER(pdf)
-{
-#ifdef WITH_PDF_EXPORT
-
- GtkWidget *save_dialog;
- struct browser_window *bw = nsgtk_get_browser_window(g->top_level);
- struct print_settings *settings;
- char filename[PATH_MAX];
- char dirname[PATH_MAX];
- char *url_name;
- nserror res;
-
- NSLOG(netsurf, INFO, "Print preview (generating PDF) started.");
-
- res = nsurl_nice(browser_window_get_url(bw), &url_name, true);
- if (res != NSERROR_OK) {
- nsgtk_warning(messages_get_errorcode(res), 0);
- return TRUE;
- }
-
- strncpy(filename, url_name, PATH_MAX);
- strncat(filename, ".pdf", PATH_MAX - strlen(filename));
- filename[PATH_MAX - 1] = '\0';
-
- free(url_name);
-
- strncpy(dirname, option_downloads_directory, PATH_MAX);
- strncat(dirname, "/", PATH_MAX - strlen(dirname));
- dirname[PATH_MAX - 1] = '\0';
-
- /* this way the scale used by PDF functions is synchronised with that
- * used by the all-purpose print interface
- */
- haru_nsfont_set_scale((float)option_export_scale / 100);
-
- save_dialog = gtk_file_chooser_dialog_new("Export to PDF", g->window,
- GTK_FILE_CHOOSER_ACTION_SAVE,
- NSGTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- NSGTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT,
- NULL);
-
- gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(save_dialog),
- dirname);
-
- gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(save_dialog),
- filename);
-
- if (gtk_dialog_run(GTK_DIALOG(save_dialog)) == GTK_RESPONSE_ACCEPT) {
- gchar *filename = gtk_file_chooser_get_filename(
- GTK_FILE_CHOOSER(save_dialog));
-
- settings = print_make_settings(PRINT_OPTIONS,
- (const char *) filename, &haru_nsfont);
- g_free(filename);
-
- if (settings == NULL) {
- nsgtk_warning(messages_get("NoMemory"), 0);
- gtk_widget_destroy(save_dialog);
- return TRUE;
- }
-
- /* This will clean up the print_settings object for us */
- print_basic_run(browser_window_get_content(bw),
- &pdf_printer, settings);
- }
-
- gtk_widget_destroy(save_dialog);
-
-#endif /* WITH_PDF_EXPORT */
-
- return TRUE;
-}
-
-MULTIHANDLER(plaintext)
-{
- if (!browser_window_has_content(nsgtk_get_browser_window(g->top_level)))
- return FALSE;
-
- GtkWidget *fc = gtk_file_chooser_dialog_new(
- messages_get("gtkplainSave"), g->window,
- GTK_FILE_CHOOSER_ACTION_SAVE,
- NSGTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- NSGTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT,
- NULL);
- char *filename;
- nserror res;
-
- res = nsurl_nice(browser_window_get_url(
- nsgtk_get_browser_window(g->top_level)),
- &filename, false);
- if (res != NSERROR_OK) {
- filename = strdup(messages_get("SaveText"));
- if (filename == NULL) {
- nsgtk_warning("NoMemory", 0);
- return FALSE;
- }
- }
+#define TOOLBAR_ITEM_p(identifier, name) \
+ static gboolean \
+nsgtk_on_##name##_activate_menu(GtkMenuItem *widget, gpointer data) \
+{ \
+ struct nsgtk_scaffolding *gs = (struct nsgtk_scaffolding *)data;\
+ nsgtk_window_item_activate(gs->top_level, identifier); \
+ return TRUE; \
+}
+#define TOOLBAR_ITEM_y(identifier, name)
+#define TOOLBAR_ITEM_n(identifier, name)
+#define TOOLBAR_ITEM(identifier, name, sensitivity, clicked, activate, label, iconame) \
+ TOOLBAR_ITEM_ ## activate(identifier, name)
+#include "gtk/toolbar_items.h"
+#undef TOOLBAR_ITEM_y
+#undef TOOLBAR_ITEM_n
+#undef TOOLBAR_ITEM_p
+#undef TOOLBAR_ITEM
- gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(fc), filename);
- gtk_file_chooser_set_do_overwrite_confirmation(GTK_FILE_CHOOSER(fc),
- TRUE);
- free(filename);
-
- if (gtk_dialog_run(GTK_DIALOG(fc)) == GTK_RESPONSE_ACCEPT) {
- filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(fc));
- save_as_text(browser_window_get_content(
- nsgtk_get_browser_window(
- g->top_level)), filename);
- g_free(filename);
- }
-
- gtk_widget_destroy(fc);
- return TRUE;
-}
-
-MULTIHANDLER(drawfile)
-{
- return TRUE;
-}
-
-MULTIHANDLER(postscript)
-{
- return TRUE;
-}
-
-MULTIHANDLER(printpreview)
-{
- return TRUE;
-}
-
-
-MULTIHANDLER(print)
-{
- struct browser_window *bw = nsgtk_get_browser_window(g->top_level);
-
- GtkPrintOperation *print_op;
- GtkPageSetup *page_setup;
- GtkPrintSettings *print_settings;
- GtkPrintOperationResult res = GTK_PRINT_OPERATION_RESULT_ERROR;
- struct print_settings *nssettings;
- char *settings_fname = NULL;
-
- print_op = gtk_print_operation_new();
- if (print_op == NULL) {
- nsgtk_warning(messages_get("NoMemory"), 0);
- return TRUE;
- }
-
- /* use previously saved settings if any */
- netsurf_mkpath(&settings_fname, NULL, 2, nsgtk_config_home, "Print");
- if (settings_fname != NULL) {
- print_settings = gtk_print_settings_new_from_file(settings_fname, NULL);
- if (print_settings != NULL) {
- gtk_print_operation_set_print_settings(print_op,
- print_settings);
-
- /* We're not interested in the settings any more */
- g_object_unref(print_settings);
- }
- }
-
- content_to_print = browser_window_get_content(bw);
-
- page_setup = gtk_print_run_page_setup_dialog(g->window, NULL, NULL);
- if (page_setup == NULL) {
- nsgtk_warning(messages_get("NoMemory"), 0);
- free(settings_fname);
- g_object_unref(print_op);
- return TRUE;
- }
- gtk_print_operation_set_default_page_setup(print_op, page_setup);
-
- nssettings = print_make_settings(PRINT_DEFAULT, NULL, nsgtk_layout_table);
-
- g_signal_connect(print_op, "begin_print",
- G_CALLBACK(gtk_print_signal_begin_print), nssettings);
- g_signal_connect(print_op, "draw_page",
- G_CALLBACK(gtk_print_signal_draw_page), NULL);
- g_signal_connect(print_op, "end_print",
- G_CALLBACK(gtk_print_signal_end_print), nssettings);
-
- if (content_get_type(browser_window_get_content(bw)) !=
- CONTENT_TEXTPLAIN) {
- res = gtk_print_operation_run(print_op,
- GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG,
- g->window,
- NULL);
- }
-
- /* if the settings were used save them for future use */
- if (settings_fname != NULL) {
- if (res == GTK_PRINT_OPERATION_RESULT_APPLY) {
- /* Do not increment the settings reference */
- print_settings =
- gtk_print_operation_get_print_settings(print_op);
-
- gtk_print_settings_to_file(print_settings,
- settings_fname,
- NULL);
- }
- free(settings_fname);
- }
-
- /* Our print_settings object is destroyed by the end print handler */
- g_object_unref(page_setup);
- g_object_unref(print_op);
-
- return TRUE;
-}
-
-MULTIHANDLER(closewindow)
-{
- gtk_widget_destroy(GTK_WIDGET(g->window));
- return TRUE;
-}
-
-MULTIHANDLER(quit)
-{
- struct nsgtk_scaffolding *gs;
-
- if (nsgtk_check_for_downloads(g->window) == false) {
- gs = scaf_list;
- while (gs != NULL) {
- gtk_widget_destroy(GTK_WIDGET(gs->window));
- gs = gs->next;
- }
- }
-
- return TRUE;
-}
-
-MENUHANDLER(savelink)
+static gboolean
+nsgtk_on_savelink_activate_menu(GtkMenuItem *widget, gpointer data)
{
struct nsgtk_scaffolding *g = (struct nsgtk_scaffolding *) data;
struct gui_window *gui = g->top_level;
@@ -1084,10 +518,12 @@ MENUHANDLER(savelink)
return TRUE;
}
+
/**
* Handler for opening new window from a link. attached to the popup menu.
*/
-MENUHANDLER(link_openwin)
+static gboolean
+nsgtk_on_link_openwin_activate_menu(GtkMenuItem *widget, gpointer data)
{
struct nsgtk_scaffolding *g = (struct nsgtk_scaffolding *) data;
struct gui_window *gui = g->top_level;
@@ -1106,10 +542,12 @@ MENUHANDLER(link_openwin)
return TRUE;
}
+
/**
* Handler for opening new tab from a link. attached to the popup menu.
*/
-MENUHANDLER(link_opentab)
+static gboolean
+nsgtk_on_link_opentab_activate_menu(GtkMenuItem *widget, gpointer data)
{
struct nsgtk_scaffolding *g = (struct nsgtk_scaffolding *) data;
struct gui_window *gui = g->top_level;
@@ -1119,8 +557,6 @@ MENUHANDLER(link_opentab)
if (current_menu_features.link == NULL)
return FALSE;
- temp_open_background = 1;
-
err = browser_window_create(BW_CREATE_CLONE |
BW_CREATE_HISTORY |
BW_CREATE_TAB,
@@ -1129,15 +565,15 @@ MENUHANDLER(link_opentab)
nsgtk_warning(messages_get_errorcode(err), 0);
}
- temp_open_background = -1;
-
return TRUE;
}
+
/**
* Handler for bookmarking a link. attached to the popup menu.
*/
-MENUHANDLER(link_bookmark)
+static gboolean
+nsgtk_on_link_bookmark_activate_menu(GtkMenuItem *widget, gpointer data)
{
if (current_menu_features.link == NULL)
return FALSE;
@@ -1147,10 +583,12 @@ MENUHANDLER(link_bookmark)
return TRUE;
}
+
/**
* Handler for copying a link. attached to the popup menu.
*/
-MENUHANDLER(link_copy)
+static gboolean
+nsgtk_on_link_copy_activate_menu(GtkMenuItem *widget, gpointer data)
{
GtkClipboard *clipboard;
@@ -1165,624 +603,346 @@ MENUHANDLER(link_copy)
}
-MULTIHANDLER(cut)
-{
- struct browser_window *bw = nsgtk_get_browser_window(g->top_level);
- GtkWidget *focused = gtk_window_get_focus(g->window);
-
- /* If the url bar has focus, let gtk handle it */
- if (GTK_IS_EDITABLE (focused))
- gtk_editable_cut_clipboard (GTK_EDITABLE(g->url_bar));
- else
- browser_window_key_press(bw, NS_KEY_CUT_SELECTION);
-
- return TRUE;
-}
-
-MULTIHANDLER(copy)
-{
- struct browser_window *bw = nsgtk_get_browser_window(g->top_level);
- GtkWidget *focused = gtk_window_get_focus(g->window);
-
- /* If the url bar has focus, let gtk handle it */
- if (GTK_IS_EDITABLE (focused))
- gtk_editable_copy_clipboard(GTK_EDITABLE(g->url_bar));
- else
- browser_window_key_press(bw, NS_KEY_COPY_SELECTION);
-
- return TRUE;
-}
-
-MULTIHANDLER(paste)
-{
- struct browser_window *bw = nsgtk_get_browser_window(g->top_level);
- GtkWidget *focused = gtk_window_get_focus(g->window);
-
- /* If the url bar has focus, let gtk handle it */
- if (GTK_IS_EDITABLE (focused))
- gtk_editable_paste_clipboard (GTK_EDITABLE (focused));
- else
- browser_window_key_press(bw, NS_KEY_PASTE);
-
- return TRUE;
-}
-
-MULTIHANDLER(delete)
-{
- return TRUE;
-}
-
-MENUHANDLER(customize)
+static gboolean nsgtk_on_find_activate_menu(GtkMenuItem *widget, gpointer data)
{
struct nsgtk_scaffolding *g = (struct nsgtk_scaffolding *)data;
- nsgtk_toolbar_customization_init(g);
- return TRUE;
-}
-MULTIHANDLER(selectall)
-{
- struct browser_window *bw = nsgtk_get_browser_window(g->top_level);
-
- if (nsgtk_widget_has_focus(GTK_WIDGET(g->url_bar))) {
- NSLOG(netsurf, INFO, "Selecting all URL bar text");
- gtk_editable_select_region(GTK_EDITABLE(g->url_bar), 0, -1);
- } else {
- NSLOG(netsurf, INFO, "Selecting all document text");
- browser_window_key_press(bw, NS_KEY_SELECT_ALL);
- }
+ nsgtk_window_search_toggle(g->top_level);
return TRUE;
}
-MULTIHANDLER(find)
+static nserror get_bar_show(bool *menu, bool *tool)
{
- nsgtk_scaffolding_toggle_search_bar_visibility(g);
- return TRUE;
-}
+ const char *cur_bar_show;
-MULTIHANDLER(preferences)
-{
- struct browser_window *bw = nsgtk_get_browser_window(g->top_level);
- GtkWidget* wndpreferences;
+ *menu = false;
+ *tool = false;
- wndpreferences = nsgtk_preferences(bw, g->window);
- if (wndpreferences != NULL) {
- gtk_widget_show(GTK_WIDGET(wndpreferences));
+ cur_bar_show = nsoption_charp(bar_show);
+ if (cur_bar_show != NULL) {
+ if (strcmp(cur_bar_show, "menu/tool") == 0) {
+ *menu = true;
+ *tool = true;
+ } else if (strcmp(cur_bar_show, "menu") == 0) {
+ *menu = true;
+ } else if (strcmp(cur_bar_show, "tool") == 0) {
+ *tool = true;
+ }
}
- return TRUE;
-}
-
-MULTIHANDLER(zoomplus)
-{
- struct browser_window *bw = nsgtk_get_browser_window(g->top_level);
- float old_scale = nsgtk_get_scale_for_gui(g->top_level);
-
- browser_window_set_scale(bw, old_scale + 0.05, true);
-
- return TRUE;
-}
-
-MULTIHANDLER(zoomnormal)
-{
- struct browser_window *bw = nsgtk_get_browser_window(g->top_level);
-
- browser_window_set_scale(bw, 1.0, true);
-
- return TRUE;
+ return NSERROR_OK;
}
-MULTIHANDLER(zoomminus)
+static nserror set_bar_show(const char *bar, bool show)
{
- struct browser_window *bw = nsgtk_get_browser_window(g->top_level);
- float old_scale = nsgtk_get_scale_for_gui(g->top_level);
+ bool menu;
+ bool tool;
+ const char *new_bar_show;
- browser_window_set_scale(bw, old_scale - 0.05, true);
+ get_bar_show(&menu, &tool);
- return TRUE;
-}
+ if (strcmp(bar, "menu") == 0) {
+ menu = show;
+ } else if (strcmp(bar, "tool") == 0) {
+ tool = show;
+ }
-MULTIHANDLER(fullscreen)
-{
- if (g->fullscreen) {
- gtk_window_unfullscreen(g->window);
+ if ((menu == true) && (tool == true)) {
+ new_bar_show = "menu/tool";
+ } else if (menu == true) {
+ new_bar_show = "menu";
+ } else if (tool == true) {
+ new_bar_show = "tool";
} else {
- gtk_window_fullscreen(g->window);
+ new_bar_show = "none";
}
+ nsoption_set_charp(bar_show, strdup(new_bar_show));
- g->fullscreen = !g->fullscreen;
-
- return TRUE;
+ return NSERROR_OK;
}
-MULTIHANDLER(viewsource)
+static gboolean
+nsgtk_on_menubar_activate_menu(GtkMenuItem *widget, gpointer data)
{
- nserror ret;
-
- ret = nsgtk_viewsource(g->window, nsgtk_get_browser_window(g->top_level));
- if (ret != NSERROR_OK) {
- nsgtk_warning(messages_get_errorcode(ret), 0);
- }
-
- return TRUE;
-}
+ struct nsgtk_scaffolding *gs = (struct nsgtk_scaffolding *)data;
+ GtkCheckMenuItem *bmcmi; /* burger menu check */
+ GtkCheckMenuItem *mbcmi; /* menu bar check */
+ GtkCheckMenuItem *tbcmi; /* popup menu check */
-MENUHANDLER(menubar)
-{
- GtkWidget *w;
- struct nsgtk_scaffolding *g = (struct nsgtk_scaffolding *)data;
+ bmcmi = GTK_CHECK_MENU_ITEM(gs->burger_menu->view_submenu->toolbars_submenu->menubar_menuitem);
+ mbcmi = GTK_CHECK_MENU_ITEM(gs->menu_bar->view_submenu->toolbars_submenu->menubar_menuitem);
+ tbcmi = GTK_CHECK_MENU_ITEM(gs->popup_menu->toolbars_submenu->menubar_menuitem);
- /* if the menubar is not being shown the popup menu shows the
- * menubar entries instead.
- */
+ /* ensure menubar and burger menu checkboxes are both updated */
if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget))) {
- /* need to synchronise menus as gtk grumbles when one menu
- * is attached to both headers */
- w = GTK_WIDGET(g->menu_popup->view_submenu->toolbars_submenu->menubar_menuitem);
- if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(w))
- == FALSE)
- gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(w),
- TRUE);
-
- w = GTK_WIDGET(g->menu_bar->view_submenu->toolbars_submenu->menubar_menuitem);
- if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(w))
- == FALSE)
- gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(w),
- TRUE);
-
- gtk_widget_show(GTK_WIDGET(g->menu_bar->bar_menu));
-
- popup_menu_show(g->menu_popup, false, true, true, true);
- popup_menu_hide(g->menu_popup, true, false, false, false);
- } else {
- w = GTK_WIDGET(g->menu_popup->view_submenu->toolbars_submenu->menubar_menuitem);
- if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(w)))
- gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(w),
- FALSE);
-
- w = GTK_WIDGET(g->menu_bar->view_submenu->toolbars_submenu->menubar_menuitem);
- if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(w)))
- gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(w),
- FALSE);
-
- gtk_widget_hide(GTK_WIDGET(g->menu_bar->bar_menu));
-
- popup_menu_show(g->menu_popup, true, true, true, true);
+ if (gtk_check_menu_item_get_active(bmcmi) == FALSE) {
+ gtk_check_menu_item_set_active(bmcmi, TRUE);
+ }
- }
- return TRUE;
-}
+ if (gtk_check_menu_item_get_active(mbcmi) == FALSE) {
+ gtk_check_menu_item_set_active(mbcmi, TRUE);
+ }
-MENUHANDLER(toolbar)
-{
- GtkWidget *w;
- struct nsgtk_scaffolding *g = (struct nsgtk_scaffolding *)data;
+ if (gtk_check_menu_item_get_active(tbcmi) == FALSE) {
+ gtk_check_menu_item_set_active(tbcmi, TRUE);
+ }
- if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget))) {
- w = GTK_WIDGET(g->menu_popup->view_submenu->toolbars_submenu->toolbar_menuitem);
- if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(w))
- == FALSE)
- gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(w),
- TRUE);
-
- w = GTK_WIDGET(g->menu_bar->view_submenu->toolbars_submenu->toolbar_menuitem);
- if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(w))
- == FALSE)
- gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(w),
- TRUE);
- gtk_widget_show(GTK_WIDGET(g->tool_bar));
+ gtk_widget_show(GTK_WIDGET(gs->menu_bar->bar_menu));
+ set_bar_show("menu", true);
} else {
- w = GTK_WIDGET(g->menu_popup->view_submenu->toolbars_submenu->toolbar_menuitem);
- if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(w)))
- gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(w),
- FALSE);
- w = GTK_WIDGET(g->menu_bar->view_submenu->toolbars_submenu->toolbar_menuitem);
- if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(w)))
- gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(w),
- FALSE);
- gtk_widget_hide(GTK_WIDGET(g->tool_bar));
- }
-
- return TRUE;
-}
-
-MULTIHANDLER(downloads)
-{
- nsgtk_download_show(g->window);
-
- return TRUE;
-}
-
-MULTIHANDLER(savewindowsize)
-{
- int x,y,w,h;
- char *choices = NULL;
+ if (gtk_check_menu_item_get_active(bmcmi) == TRUE) {
+ gtk_check_menu_item_set_active(bmcmi, FALSE);
+ }
- gtk_window_get_position(g->window, &x, &y);
- gtk_window_get_size(g->window, &w, &h);
+ if (gtk_check_menu_item_get_active(mbcmi) == TRUE) {
+ gtk_check_menu_item_set_active(mbcmi, FALSE);
+ }
- nsoption_set_int(window_width, w);
- nsoption_set_int(window_height, h);
- nsoption_set_int(window_x, x);
- nsoption_set_int(window_y, y);
+ if (gtk_check_menu_item_get_active(tbcmi) == TRUE) {
+ gtk_check_menu_item_set_active(tbcmi, FALSE);
+ }
- netsurf_mkpath(&choices, NULL, 2, nsgtk_config_home, "Choices");
- if (choices != NULL) {
- nsoption_write(choices, NULL, NULL);
- free(choices);
+ gtk_widget_hide(GTK_WIDGET(gs->menu_bar->bar_menu));
+ set_bar_show("menu", false);
}
-
return TRUE;
}
-MULTIHANDLER(toggledebugging)
-{
- struct browser_window *bw;
-
- bw = nsgtk_get_browser_window(g->top_level);
-
- browser_window_debug(bw, CONTENT_DEBUG_REDRAW);
-
- nsgtk_reflow_all_windows();
- return TRUE;
-}
-
-MULTIHANDLER(debugboxtree)
+static gboolean
+nsgtk_on_toolbar_activate_menu(GtkMenuItem *widget, gpointer data)
{
- gchar *fname;
- gint handle;
- FILE *f;
- struct browser_window *bw;
+ struct nsgtk_scaffolding *gs = (struct nsgtk_scaffolding *)data;
+ GtkCheckMenuItem *bmcmi; /* burger menu check */
+ GtkCheckMenuItem *mbcmi; /* menu bar check */
+ GtkCheckMenuItem *tbcmi; /* popup menu check */
- handle = g_file_open_tmp("nsgtkboxtreeXXXXXX", &fname, NULL);
- if ((handle == -1) || (fname == NULL)) {
- return TRUE;
- }
- close(handle); /* in case it was binary mode */
-
- /* save data to temporary file */
- f = fopen(fname, "w");
- if (f == NULL) {
- nsgtk_warning("Error saving box tree dump.",
- "Unable to open file for writing.");
- unlink(fname);
- return TRUE;
- }
+ bmcmi = GTK_CHECK_MENU_ITEM(gs->burger_menu->view_submenu->toolbars_submenu->toolbar_menuitem);
+ mbcmi = GTK_CHECK_MENU_ITEM(gs->menu_bar->view_submenu->toolbars_submenu->toolbar_menuitem);
+ tbcmi = GTK_CHECK_MENU_ITEM(gs->popup_menu->toolbars_submenu->toolbar_menuitem);
- bw = nsgtk_get_browser_window(g->top_level);
-
- browser_window_debug_dump(bw, f, CONTENT_DEBUG_RENDER);
+ /* ensure menubar and burger menu checkboxes are both updated */
+ if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget))) {
+ if (gtk_check_menu_item_get_active(bmcmi) == FALSE) {
+ gtk_check_menu_item_set_active(bmcmi, TRUE);
+ }
- fclose(f);
+ if (gtk_check_menu_item_get_active(mbcmi) == FALSE) {
+ gtk_check_menu_item_set_active(mbcmi, TRUE);
+ }
- nsgtk_viewfile("Box Tree Debug", "boxtree", fname);
+ if (gtk_check_menu_item_get_active(tbcmi) == FALSE) {
+ gtk_check_menu_item_set_active(tbcmi, TRUE);
+ }
- g_free(fname);
+ nsgtk_window_toolbar_show(gs, true);
+ set_bar_show("tool", true);
+ } else {
+ if (gtk_check_menu_item_get_active(bmcmi) == TRUE) {
+ gtk_check_menu_item_set_active(bmcmi, FALSE);
+ }
- return TRUE;
-}
+ if (gtk_check_menu_item_get_active(mbcmi) == TRUE) {
+ gtk_check_menu_item_set_active(mbcmi, FALSE);
+ }
-MULTIHANDLER(debugdomtree)
-{
- gchar *fname;
- gint handle;
- FILE *f;
- struct browser_window *bw;
+ if (gtk_check_menu_item_get_active(tbcmi) == TRUE) {
+ gtk_check_menu_item_set_active(tbcmi, FALSE);
+ }
- handle = g_file_open_tmp("nsgtkdomtreeXXXXXX", &fname, NULL);
- if ((handle == -1) || (fname == NULL)) {
- return TRUE;
- }
- close(handle); /* in case it was binary mode */
-
- /* save data to temporary file */
- f = fopen(fname, "w");
- if (f == NULL) {
- nsgtk_warning("Error saving box tree dump.",
- "Unable to open file for writing.");
- unlink(fname);
- return TRUE;
+ nsgtk_window_toolbar_show(gs, false);
+ set_bar_show("tool", false);
}
-
- bw = nsgtk_get_browser_window(g->top_level);
-
- browser_window_debug_dump(bw, f, CONTENT_DEBUG_DOM);
-
- fclose(f);
-
- nsgtk_viewfile("DOM Tree Debug", "domtree", fname);
-
- g_free(fname);
-
return TRUE;
}
-MULTIHANDLER(stop)
+static gboolean
+nsgtk_on_nexttab_activate_menu(GtkMenuItem *widget, gpointer data)
{
- struct browser_window *bw =
- nsgtk_get_browser_window(g->top_level);
+ struct nsgtk_scaffolding *g = (struct nsgtk_scaffolding *)data;
- browser_window_stop(bw);
+ nsgtk_tab_next(g->notebook);
return TRUE;
}
-MULTIHANDLER(reload)
-{
- struct browser_window *bw =
- nsgtk_get_browser_window(g->top_level);
- if (bw == NULL)
- return TRUE;
-
- /* clear potential search effects */
- browser_window_search_clear(bw);
- browser_window_reload(bw, true);
-
- return TRUE;
-}
-
-MULTIHANDLER(back)
+static gboolean
+nsgtk_on_prevtab_activate_menu(GtkMenuItem *widget, gpointer data)
{
- struct browser_window *bw =
- nsgtk_get_browser_window(g->top_level);
-
- if ((bw == NULL) || (!browser_window_history_back_available(bw)))
- return TRUE;
-
- /* clear potential search effects */
- browser_window_search_clear(bw);
+ struct nsgtk_scaffolding *g = (struct nsgtk_scaffolding *)data;
- browser_window_history_back(bw, false);
- scaffolding_update_context(g);
+ nsgtk_tab_prev(g->notebook);
return TRUE;
}
-MULTIHANDLER(forward)
-{
- struct browser_window *bw =
- nsgtk_get_browser_window(g->top_level);
-
- if ((bw == NULL) || (!browser_window_history_forward_available(bw)))
- return TRUE;
-
- /* clear potential search effects */
- browser_window_search_clear(bw);
-
- browser_window_history_forward(bw, false);
- scaffolding_update_context(g);
- return TRUE;
-}
-
-MULTIHANDLER(home)
+/**
+ * menu signal handler for activation on close tab item
+ */
+static gboolean
+nsgtk_on_closetab_activate_menu(GtkMenuItem *widget, gpointer data)
{
- static const char *addr = NETSURF_HOMEPAGE;
- struct browser_window *bw = nsgtk_get_browser_window(g->top_level);
- nsurl *url;
- nserror error;
-
- if (nsoption_charp(homepage_url) != NULL) {
- addr = nsoption_charp(homepage_url);
- }
+ struct nsgtk_scaffolding *g = (struct nsgtk_scaffolding *)data;
- error = nsurl_create(addr, &url);
- if (error != NSERROR_OK) {
- nsgtk_warning(messages_get_errorcode(error), 0);
- } else {
- browser_window_navigate(bw,
- url,
- NULL,
- BW_NAVIGATE_HISTORY,
- NULL,
- NULL,
- NULL);
- nsurl_unref(url);
- }
+ nsgtk_tab_close_current(g->notebook);
return TRUE;
}
-MULTIHANDLER(localhistory)
-{
- struct browser_window *bw = nsgtk_get_browser_window(g->top_level);
- nserror res;
+/* end of menu callback handlers */
- res = nsgtk_local_history_present(g->window, bw);
- if (res != NSERROR_OK) {
- NSLOG(netsurf, INFO,
- "Unable to initialise local history window.");
+/**
+ * attach gtk signal handlers for menus
+ */
+static void nsgtk_menu_connect_signals(struct nsgtk_scaffolding *g)
+{
+ int idx; /* item index */
+ for (idx = BACK_BUTTON; idx < PLACEHOLDER_BUTTON; idx++) {
+ if (g->menus[idx].main != NULL) {
+ g_signal_connect(g->menus[idx].main,
+ "activate",
+ G_CALLBACK(g->menus[idx].mhandler),
+ g);
+ }
+ if (g->menus[idx].burger != NULL) {
+ g_signal_connect(g->menus[idx].burger,
+ "activate",
+ G_CALLBACK(g->menus[idx].mhandler),
+ g);
+ }
+ if (g->menus[idx].popup != NULL) {
+ g_signal_connect(g->menus[idx].popup,
+ "activate",
+ G_CALLBACK(g->menus[idx].mhandler),
+ g);
+ }
}
- return TRUE;
}
-MULTIHANDLER(globalhistory)
-{
- nserror res;
- res = nsgtk_global_history_present();
- if (res != NSERROR_OK) {
- NSLOG(netsurf, INFO,
- "Unable to initialise global history window.");
- }
- return TRUE;
-}
-MULTIHANDLER(addbookmarks)
+/**
+ * Create and connect handlers to bar menu.
+ *
+ * \param gs scaffolding to attach popup menu to.
+ * \param group The accelerator group to use for the popup.
+ * \param showmenu if the bar menu should be shown
+ * \param showtool if the toolabar should be shown
+ * \return menu structure on success or NULL on error.
+ */
+static struct nsgtk_bar_submenu *
+create_scaffolding_bar_menu(struct nsgtk_scaffolding *gs,
+ GtkAccelGroup *group,
+ bool showmenu,
+ bool showtool)
{
- struct browser_window *bw = nsgtk_get_browser_window(g->top_level);
+ GtkMenuShell *menushell;
+ struct nsgtk_bar_submenu *nmenu;
- if (bw == NULL || !browser_window_has_content(bw))
- return TRUE;
- hotlist_add_url(browser_window_get_url(bw));
- return TRUE;
-}
+ menushell = GTK_MENU_SHELL(gtk_builder_get_object(gs->builder,
+ "menubar"));
-MULTIHANDLER(showbookmarks)
-{
- nserror res;
- res = nsgtk_hotlist_present();
- if (res != NSERROR_OK) {
- NSLOG(netsurf, INFO, "Unable to initialise bookmark window.");
+ nmenu = nsgtk_menu_bar_create(menushell, group);
+ if (nmenu == NULL) {
+ return NULL;
}
- return TRUE;
-}
-MULTIHANDLER(showcookies)
-{
- nserror res;
- res = nsgtk_cookies_present();
- if (res != NSERROR_OK) {
- NSLOG(netsurf, INFO, "Unable to initialise cookies window.");
+ /* set menu bar visibility */
+ if (showmenu) {
+ gtk_widget_show(GTK_WIDGET(nmenu->bar_menu));
+ } else {
+ gtk_widget_hide(GTK_WIDGET(nmenu->bar_menu));
}
- return TRUE;
-}
-MULTIHANDLER(openlocation)
-{
- gtk_widget_grab_focus(GTK_WIDGET(g->url_bar));
- return TRUE;
-}
+ /* set checks correct way on toolbar submenu */
+ gtk_check_menu_item_set_active(nmenu->view_submenu->toolbars_submenu->menubar_menuitem, showmenu);
+ gtk_check_menu_item_set_active(nmenu->view_submenu->toolbars_submenu->toolbar_menuitem, showtool);
-MULTIHANDLER(nexttab)
-{
- nsgtk_tab_next(g->notebook);
+ /* bar menu signal handlers for edit controls */
+ g_signal_connect(nmenu->edit_submenu->edit,
+ "show",
+ G_CALLBACK(nsgtk_window_edit_menu_shown),
+ gs);
- return TRUE;
-}
-
-MULTIHANDLER(prevtab)
-{
+ g_signal_connect(nmenu->edit_submenu->edit,
+ "hide",
+ G_CALLBACK(nsgtk_window_edit_menu_hidden),
+ gs);
- nsgtk_tab_prev(g->notebook);
+ /*
+ * attach signal handlers for menubar and toolbar visibility toggling
+ */
+ g_signal_connect(nmenu->view_submenu->toolbars_submenu->menubar_menuitem,
+ "toggled",
+ G_CALLBACK(nsgtk_on_menubar_activate_menu),
+ gs);
- return TRUE;
-}
+ g_signal_connect(nmenu->view_submenu->toolbars_submenu->toolbar_menuitem,
+ "toggled",
+ G_CALLBACK(nsgtk_on_toolbar_activate_menu),
+ gs);
-MULTIHANDLER(closetab)
-{
- nsgtk_tab_close_current(g->notebook);
- return TRUE;
+ return nmenu;
}
-MULTIHANDLER(contents)
-{
- struct browser_window *bw = nsgtk_get_browser_window(g->top_level);
- nsurl *url;
- nserror error;
- error = nsurl_create("http://www.netsurf-browser.org/documentation/", &url);
- if (error != NSERROR_OK) {
- nsgtk_warning(messages_get_errorcode(error), 0);
- } else {
- browser_window_navigate(bw,
- url,
- NULL,
- BW_NAVIGATE_HISTORY,
- NULL,
- NULL,
- NULL);
- nsurl_unref(url);
- }
-
- return TRUE;
-}
-
-MULTIHANDLER(guide)
+/**
+ * Create and connect handlers to burger menu.
+ *
+ * \param g scaffolding to attach popup menu to.
+ * \param group The accelerator group to use for the popup.
+ * \param showbar if the bar menu should be shown
+ * \param showtool if the toolabar should be shown
+ * \return menu structure on success or NULL on error.
+ */
+static struct nsgtk_burger_menu *
+create_scaffolding_burger_menu(struct nsgtk_scaffolding *gs,
+ GtkAccelGroup *group,
+ bool showbar,
+ bool showtool)
{
- struct browser_window *bw = nsgtk_get_browser_window(g->top_level);
- nsurl *url;
+ struct nsgtk_burger_menu *nmenu;
- if (nsurl_create("http://www.netsurf-browser.org/documentation/guide", &url) != NSERROR_OK) {
- nsgtk_warning("NoMemory", 0);
- } else {
- browser_window_navigate(bw,
- url,
- NULL,
- BW_NAVIGATE_HISTORY,
- NULL,
- NULL,
- NULL);
- nsurl_unref(url);
- }
+ nmenu = nsgtk_burger_menu_create(group);
- return TRUE;
-}
-
-MULTIHANDLER(info)
-{
- struct browser_window *bw = nsgtk_get_browser_window(g->top_level);
- nsurl *url;
-
- if (nsurl_create("http://www.netsurf-browser.org/documentation/info", &url) != NSERROR_OK) {
- nsgtk_warning("NoMemory", 0);
- } else {
- browser_window_navigate(bw,
- url,
- NULL,
- BW_NAVIGATE_HISTORY,
- NULL,
- NULL,
- NULL);
- nsurl_unref(url);
+ if (nmenu == NULL) {
+ return NULL;
}
- return TRUE;
-}
-
-MULTIHANDLER(about)
-{
- nsgtk_about_dialog_init(g->window);
- return TRUE;
-}
+ /* set checks correct way on toolbar submenu */
+ gtk_check_menu_item_set_active(nmenu->view_submenu->toolbars_submenu->menubar_menuitem, showbar);
+ gtk_check_menu_item_set_active(nmenu->view_submenu->toolbars_submenu->toolbar_menuitem, showtool);
-BUTTONHANDLER(history)
-{
- struct nsgtk_scaffolding *g = (struct nsgtk_scaffolding *)data;
- return nsgtk_on_localhistory_activate(g);
+ g_signal_connect(nmenu->view_submenu->toolbars_submenu->menubar_menuitem,
+ "toggled",
+ G_CALLBACK(nsgtk_on_menubar_activate_menu),
+ gs);
+ g_signal_connect(nmenu->view_submenu->toolbars_submenu->toolbar_menuitem,
+ "toggled",
+ G_CALLBACK(nsgtk_on_toolbar_activate_menu),
+ gs);
+ return nmenu;
}
-#undef MULTIHANDLER
-#undef CHECKHANDLER
-#undef BUTTONHANDLER
-
-static void nsgtk_attach_menu_handlers(struct nsgtk_scaffolding *g)
-{
- for (int i = BACK_BUTTON; i < PLACEHOLDER_BUTTON; i++) {
- if (g->buttons[i]->main != NULL) {
- g_signal_connect(g->buttons[i]->main, "activate",
- G_CALLBACK(g->buttons[i]->mhandler), g);
- }
- if (g->buttons[i]->rclick != NULL) {
- g_signal_connect(g->buttons[i]->rclick, "activate",
- G_CALLBACK(g->buttons[i]->mhandler), g);
- }
- if (g->buttons[i]->popup != NULL) {
- g_signal_connect(g->buttons[i]->popup, "activate",
- G_CALLBACK(g->buttons[i]->mhandler), g);
- }
- }
-#define CONNECT_CHECK(q)\
- g_signal_connect(g->menu_bar->view_submenu->toolbars_submenu->q##_menuitem, "toggled", G_CALLBACK(nsgtk_on_##q##_activate_menu), g);\
- g_signal_connect(g->menu_popup->view_submenu->toolbars_submenu->q##_menuitem, "toggled", G_CALLBACK(nsgtk_on_##q##_activate_menu), g)
- CONNECT_CHECK(menubar);
- CONNECT_CHECK(toolbar);
-#undef CONNECT_CHECK
-
-}
/**
* Create and connect handlers to popup menu.
*
- * \param g scaffolding to attach popup menu to.
+ * \param gs scaffolding to attach popup menu to.
* \param group The accelerator group to use for the popup.
+ * \param showbar if the bar menu should be shown
+ * \param showtool if the toolabar should be shown
* \return menu structure on success or NULL on error.
*/
static struct nsgtk_popup_menu *
-nsgtk_new_scaffolding_popup(struct nsgtk_scaffolding *g, GtkAccelGroup *group)
+create_scaffolding_popup_menu(struct nsgtk_scaffolding *gs,
+ GtkAccelGroup *group,
+ bool showbar,
+ bool showtool)
{
struct nsgtk_popup_menu *nmenu;
@@ -1791,28 +951,31 @@ nsgtk_new_scaffolding_popup(struct nsgtk_scaffolding *g, GtkAccelGroup *group)
if (nmenu == NULL) {
return NULL;
}
+ /* set checks correct way on toolbar submenu */
+ gtk_check_menu_item_set_active(nmenu->toolbars_submenu->menubar_menuitem, showbar);
+ gtk_check_menu_item_set_active(nmenu->toolbars_submenu->toolbar_menuitem, showtool);
- g_signal_connect(nmenu->popup_menu, "hide",
- G_CALLBACK(nsgtk_window_popup_menu_hidden), g);
-
- g_signal_connect(nmenu->cut_menuitem, "activate",
- G_CALLBACK(nsgtk_on_cut_activate_menu), g);
-
- g_signal_connect(nmenu->copy_menuitem, "activate",
- G_CALLBACK(nsgtk_on_copy_activate_menu), g);
+ g_signal_connect(nmenu->popup_menu,
+ "hide",
+ G_CALLBACK(nsgtk_window_popup_menu_hidden),
+ gs);
- g_signal_connect(nmenu->paste_menuitem, "activate",
- G_CALLBACK(nsgtk_on_paste_activate_menu), g);
-
- g_signal_connect(nmenu->customize_menuitem, "activate",
- G_CALLBACK(nsgtk_on_customize_activate_menu), g);
+ g_signal_connect(nmenu->toolbars_submenu->menubar_menuitem,
+ "toggled",
+ G_CALLBACK(nsgtk_on_menubar_activate_menu),
+ gs);
+ g_signal_connect(nmenu->toolbars_submenu->toolbar_menuitem,
+ "toggled",
+ G_CALLBACK(nsgtk_on_toolbar_activate_menu),
+ gs);
/* set initial popup menu visibility */
- popup_menu_hide(nmenu, true, false, false, true);
+ popup_menu_hide(nmenu, false, false);
return nmenu;
}
+
/**
* Create and connect handlers to link popup menu.
*
@@ -1821,7 +984,7 @@ nsgtk_new_scaffolding_popup(struct nsgtk_scaffolding *g, GtkAccelGroup *group)
* \return true on success or false on error.
*/
static struct nsgtk_link_menu *
-nsgtk_new_scaffolding_link_popup(struct nsgtk_scaffolding *g, GtkAccelGroup *group)
+create_scaffolding_link_menu(struct nsgtk_scaffolding *g, GtkAccelGroup *group)
{
struct nsgtk_link_menu *nmenu;
@@ -1831,482 +994,261 @@ nsgtk_new_scaffolding_link_popup(struct nsgtk_scaffolding *g, GtkAccelGroup *gro
return NULL;
}
- g_signal_connect(nmenu->save_menuitem, "activate",
- G_CALLBACK(nsgtk_on_savelink_activate_menu), g);
+ g_signal_connect(nmenu->save_menuitem,
+ "activate",
+ G_CALLBACK(nsgtk_on_savelink_activate_menu),
+ g);
- g_signal_connect(nmenu->opentab_menuitem, "activate",
- G_CALLBACK(nsgtk_on_link_opentab_activate_menu), g);
+ g_signal_connect(nmenu->opentab_menuitem,
+ "activate",
+ G_CALLBACK(nsgtk_on_link_opentab_activate_menu),
+ g);
- g_signal_connect(nmenu->openwin_menuitem, "activate",
- G_CALLBACK(nsgtk_on_link_openwin_activate_menu), g);
+ g_signal_connect(nmenu->openwin_menuitem,
+ "activate",
+ G_CALLBACK(nsgtk_on_link_openwin_activate_menu),
+ g);
- g_signal_connect(nmenu->bookmark_menuitem, "activate",
- G_CALLBACK(nsgtk_on_link_bookmark_activate_menu), g);
+ g_signal_connect(nmenu->bookmark_menuitem,
+ "activate",
+ G_CALLBACK(nsgtk_on_link_bookmark_activate_menu),
+ g);
- g_signal_connect(nmenu->copy_menuitem, "activate",
- G_CALLBACK(nsgtk_on_link_copy_activate_menu), g);
+ g_signal_connect(nmenu->copy_menuitem,
+ "activate",
+ G_CALLBACK(nsgtk_on_link_copy_activate_menu),
+ g);
return nmenu;
}
-/* exported interface documented in gtk/scaffolding.h */
-struct nsgtk_scaffolding *nsgtk_current_scaffolding(void)
-{
- if (scaf_current == NULL) {
- scaf_current = scaf_list;
- }
- return scaf_current;
-}
/**
- * init the array g->buttons[]
+ * initialiase the menu signal handlers ready for connection
*/
-static void nsgtk_scaffolding_toolbar_init(struct nsgtk_scaffolding *g)
-{
-#define ITEM_MAIN(p, q, r)\
- g->buttons[p##_BUTTON]->main = g->menu_bar->q->r##_menuitem;\
- g->buttons[p##_BUTTON]->rclick = g->menu_popup->q->r##_menuitem;\
- g->buttons[p##_BUTTON]->mhandler = nsgtk_on_##r##_activate_menu;\
- g->buttons[p##_BUTTON]->bhandler = nsgtk_on_##r##_activate_button;\
- g->buttons[p##_BUTTON]->dataplus = nsgtk_toolbar_##r##_button_data;\
- g->buttons[p##_BUTTON]->dataminus = nsgtk_toolbar_##r##_toolbar_button_data
-
-#define ITEM_SUB(p, q, r, s)\
- g->buttons[p##_BUTTON]->main =\
- g->menu_bar->q->r##_submenu->s##_menuitem;\
- g->buttons[p##_BUTTON]->rclick =\
- g->menu_popup->q->r##_submenu->s##_menuitem;\
- g->buttons[p##_BUTTON]->mhandler =\
- nsgtk_on_##s##_activate_menu;\
- g->buttons[p##_BUTTON]->bhandler =\
- nsgtk_on_##s##_activate_button;\
- g->buttons[p##_BUTTON]->dataplus =\
- nsgtk_toolbar_##s##_button_data;\
- g->buttons[p##_BUTTON]->dataminus =\
- nsgtk_toolbar_##s##_toolbar_button_data
-
-#define ITEM_BUTTON(p, q)\
- g->buttons[p##_BUTTON]->bhandler =\
- nsgtk_on_##q##_activate;\
- g->buttons[p##_BUTTON]->dataplus =\
- nsgtk_toolbar_##q##_button_data;\
- g->buttons[p##_BUTTON]->dataminus =\
- nsgtk_toolbar_##q##_toolbar_button_data
-
-#define ITEM_POP(p, q) \
- g->buttons[p##_BUTTON]->popup = g->menu_popup->q##_menuitem
-
-#define SENSITIVITY(q) \
- g->buttons[q##_BUTTON]->sensitivity = false
-
-#define ITEM_ITEM(p, q)\
- g->buttons[p##_ITEM]->dataplus =\
- nsgtk_toolbar_##q##_button_data;\
- g->buttons[p##_ITEM]->dataminus =\
- nsgtk_toolbar_##q##_toolbar_button_data
-
- ITEM_ITEM(WEBSEARCH, websearch);
- ITEM_ITEM(THROBBER, throbber);
- ITEM_MAIN(NEWWINDOW, file_submenu, newwindow);
- ITEM_MAIN(NEWTAB, file_submenu, newtab);
- ITEM_MAIN(OPENFILE, file_submenu, openfile);
- ITEM_MAIN(PRINT, file_submenu, print);
- ITEM_MAIN(CLOSEWINDOW, file_submenu, closewindow);
- ITEM_MAIN(SAVEPAGE, file_submenu, savepage);
- ITEM_MAIN(PRINTPREVIEW, file_submenu, printpreview);
- ITEM_MAIN(PRINT, file_submenu, print);
- ITEM_MAIN(QUIT, file_submenu, quit);
- ITEM_MAIN(CUT, edit_submenu, cut);
- ITEM_MAIN(COPY, edit_submenu, copy);
- ITEM_MAIN(PASTE, edit_submenu, paste);
- ITEM_MAIN(DELETE, edit_submenu, delete);
- ITEM_MAIN(SELECTALL, edit_submenu, selectall);
- ITEM_MAIN(FIND, edit_submenu, find);
- ITEM_MAIN(PREFERENCES, edit_submenu, preferences);
- ITEM_MAIN(STOP, view_submenu, stop);
- ITEM_POP(STOP, stop);
- ITEM_MAIN(RELOAD, view_submenu, reload);
- ITEM_POP(RELOAD, reload);
- ITEM_MAIN(FULLSCREEN, view_submenu, fullscreen);
- ITEM_MAIN(DOWNLOADS, tools_submenu, downloads);
- ITEM_MAIN(SAVEWINDOWSIZE, view_submenu, savewindowsize);
- ITEM_MAIN(BACK, nav_submenu, back);
- ITEM_POP(BACK, back);
- ITEM_MAIN(FORWARD, nav_submenu, forward);
- ITEM_POP(FORWARD, forward);
- ITEM_MAIN(HOME, nav_submenu, home);
- ITEM_MAIN(LOCALHISTORY, nav_submenu, localhistory);
- ITEM_MAIN(GLOBALHISTORY, nav_submenu, globalhistory);
- ITEM_MAIN(ADDBOOKMARKS, nav_submenu, addbookmarks);
- ITEM_MAIN(SHOWBOOKMARKS, nav_submenu, showbookmarks);
- ITEM_MAIN(SHOWCOOKIES, tools_submenu, showcookies);
- ITEM_MAIN(OPENLOCATION, nav_submenu, openlocation);
- ITEM_MAIN(CONTENTS, help_submenu, contents);
- ITEM_MAIN(INFO, help_submenu, info);
- ITEM_MAIN(GUIDE, help_submenu, guide);
- ITEM_MAIN(ABOUT, help_submenu, about);
- ITEM_SUB(PLAINTEXT, file_submenu, export, plaintext);
- ITEM_SUB(PDF, file_submenu, export, pdf);
- ITEM_SUB(DRAWFILE, file_submenu, export, drawfile);
- ITEM_SUB(POSTSCRIPT, file_submenu, export, postscript);
- ITEM_SUB(ZOOMPLUS, view_submenu, scaleview, zoomplus);
- ITEM_SUB(ZOOMMINUS, view_submenu, scaleview, zoomminus);
- ITEM_SUB(ZOOMNORMAL, view_submenu, scaleview, zoomnormal);
- ITEM_SUB(NEXTTAB, view_submenu, tabs, nexttab);
- ITEM_SUB(PREVTAB, view_submenu, tabs, prevtab);
- ITEM_SUB(CLOSETAB, view_submenu, tabs, closetab);
-
- /* development submenu */
- ITEM_SUB(VIEWSOURCE, tools_submenu, developer, viewsource);
- ITEM_SUB(TOGGLEDEBUGGING, tools_submenu, developer, toggledebugging);
- ITEM_SUB(SAVEBOXTREE, tools_submenu, developer, debugboxtree);
- ITEM_SUB(SAVEDOMTREE, tools_submenu, developer, debugdomtree);
- ITEM_BUTTON(HISTORY, history);
-
- /* disable items that make no sense initially, as well as
- * as-yet-unimplemented items */
- SENSITIVITY(BACK);
- SENSITIVITY(FORWARD);
- SENSITIVITY(STOP);
- SENSITIVITY(PRINTPREVIEW);
- SENSITIVITY(DELETE);
- SENSITIVITY(DRAWFILE);
- SENSITIVITY(POSTSCRIPT);
- SENSITIVITY(NEXTTAB);
- SENSITIVITY(PREVTAB);
- SENSITIVITY(CLOSETAB);
-#ifndef WITH_PDF_EXPORT
- SENSITIVITY(PDF);
-#endif
-
-#undef ITEM_MAIN
-#undef ITEM_SUB
-#undef ITEM_BUTTON
-#undef ITEM_POP
-#undef SENSITIVITY
+static nserror nsgtk_menu_initialise(struct nsgtk_scaffolding *g)
+{
+#define TOOLBAR_ITEM_p(identifier, name, iconame) \
+ g->menus[identifier].mhandler = nsgtk_on_##name##_activate_menu; \
+ g->menus[identifier].iconname = iconame;
+#define TOOLBAR_ITEM_y(identifier, name, iconame) \
+ g->menus[identifier].mhandler = nsgtk_on_##name##_activate_menu; \
+ g->menus[identifier].iconname = iconame;
+#define TOOLBAR_ITEM_n(identifier, name, iconame) \
+ g->menus[identifier].mhandler = NULL; \
+ g->menus[identifier].iconname = iconame;
+#define TOOLBAR_ITEM(identifier, name, snstvty, clicked, activate, label, iconame) \
+ g->menus[identifier].sensitivity = snstvty; \
+ TOOLBAR_ITEM_ ## activate(identifier, name, iconame)
+#include "gtk/toolbar_items.h"
+#undef TOOLBAR_ITEM_y
+#undef TOOLBAR_ITEM_n
+#undef TOOLBAR_ITEM
+
+ /* items on menubar, burger */
+#define ITEM_MB(p, q, r) \
+ g->menus[p##_BUTTON].main = g->menu_bar->r##_submenu->q##_menuitem; \
+ g->menus[p##_BUTTON].burger = g->burger_menu->r##_submenu->q##_menuitem
+
+ /* items on menubar, burger and context popup submenu */
+#define ITEM_MBP(p, q, r) \
+ g->menus[p##_BUTTON].main = g->menu_bar->r##_submenu->q##_menuitem; \
+ g->menus[p##_BUTTON].burger = g->burger_menu->r##_submenu->q##_menuitem; \
+ g->menus[p##_BUTTON].popup = g->popup_menu->r##_submenu->q##_menuitem
+
+ /* items on menubar, burger and context popup */
+#define ITEM_MBp(p, q, r) \
+ g->menus[p##_BUTTON].main = g->menu_bar->r##_submenu->q##_menuitem; \
+ g->menus[p##_BUTTON].burger = g->burger_menu->r##_submenu->q##_menuitem; \
+ g->menus[p##_BUTTON].popup = g->popup_menu->q##_menuitem
+
+
+ /* file menu */
+ ITEM_MB(NEWWINDOW, newwindow, file);
+ ITEM_MB(NEWTAB, newtab, file);
+ ITEM_MB(OPENFILE, openfile, file);
+ ITEM_MB(CLOSEWINDOW, closewindow, file);
+ ITEM_MB(PRINTPREVIEW, printpreview, file);
+ ITEM_MB(PRINT, print, file);
+ ITEM_MB(QUIT, quit, file);
+ /* file - export submenu */
+ ITEM_MB(SAVEPAGE, savepage, file_submenu->export);
+ ITEM_MB(PLAINTEXT, plaintext, file_submenu->export);
+ ITEM_MB(PDF, pdf, file_submenu->export);
+
+ /* edit menu */
+ ITEM_MBp(CUT, cut, edit);
+ ITEM_MBp(COPY, copy, edit);
+ ITEM_MBp(PASTE, paste, edit);
+ ITEM_MB(DELETE, delete, edit);
+ ITEM_MB(SELECTALL, selectall, edit);
+ ITEM_MB(FIND, find, edit);
+ ITEM_MB(PREFERENCES, preferences, edit);
+
+ /* view menu */
+ ITEM_MB(FULLSCREEN, fullscreen, view);
+ ITEM_MB(SAVEWINDOWSIZE, savewindowsize, view);
+ /* view - scale submenu */
+ ITEM_MB(ZOOMPLUS, zoomplus, view_submenu->scaleview);
+ ITEM_MB(ZOOMMINUS, zoomminus, view_submenu->scaleview);
+ ITEM_MB(ZOOMNORMAL, zoomnormal, view_submenu->scaleview);
+ /* view - tabs submenu */
+ ITEM_MB(NEXTTAB, nexttab, view_submenu->tabs);
+ ITEM_MB(PREVTAB, prevtab, view_submenu->tabs);
+ ITEM_MB(CLOSETAB, closetab, view_submenu->tabs);
+ /* view - toolbars submenu */
+ ITEM_MB(CUSTOMIZE, customize, view_submenu->toolbars);
+ g->menus[CUSTOMIZE_BUTTON].popup = g->popup_menu->toolbars_submenu->customize_menuitem;
+
+ /* navigation menu */
+ ITEM_MBp(BACK, back, nav);
+ ITEM_MBp(FORWARD, forward, nav);
+ ITEM_MBp(STOP, stop, nav);
+ ITEM_MBp(RELOAD, reload, nav);
+ ITEM_MB(HOME, home, nav);
+ ITEM_MB(LOCALHISTORY, localhistory, nav);
+ ITEM_MB(GLOBALHISTORY, globalhistory, nav);
+ ITEM_MB(ADDBOOKMARKS, addbookmarks, nav);
+ ITEM_MB(SHOWBOOKMARKS, showbookmarks, nav);
+ ITEM_MB(OPENLOCATION, openlocation, nav);
+
+ /* tools menu */
+ ITEM_MBP(DOWNLOADS, downloads, tools);
+ ITEM_MBP(SHOWCOOKIES, showcookies, tools);
+ /* tools > developer submenu */
+ ITEM_MBP(VIEWSOURCE, viewsource, tools_submenu->developer);
+ ITEM_MBP(TOGGLEDEBUGGING, toggledebugging, tools_submenu->developer);
+ ITEM_MBP(SAVEBOXTREE, debugboxtree, tools_submenu->developer);
+ ITEM_MBP(SAVEDOMTREE, debugdomtree, tools_submenu->developer);
+
+ /* help menu */
+ ITEM_MB(CONTENTS, contents, help);
+ ITEM_MB(GUIDE, guide, help);
+ ITEM_MB(INFO, info, help);
+ ITEM_MB(ABOUT, about, help);
+
+
+#undef ITEM_MB
+#undef ITEM_MBp
+#undef ITEM_MBP
+ return NSERROR_OK;
}
-static void nsgtk_scaffolding_initial_sensitivity(struct nsgtk_scaffolding *g)
+
+static void nsgtk_menu_set_sensitivity(struct nsgtk_scaffolding *g)
{
+
for (int i = BACK_BUTTON; i < PLACEHOLDER_BUTTON; i++) {
- if (g->buttons[i]->main != NULL)
- gtk_widget_set_sensitive(GTK_WIDGET(
- g->buttons[i]->main),
- g->buttons[i]->sensitivity);
- if (g->buttons[i]->rclick != NULL)
+ if (g->menus[i].main != NULL) {
gtk_widget_set_sensitive(GTK_WIDGET(
- g->buttons[i]->rclick),
- g->buttons[i]->sensitivity);
- if ((g->buttons[i]->location != -1) &&
- (g->buttons[i]->button != NULL))
+ g->menus[i].main),
+ g->menus[i].sensitivity);
+ }
+ if (g->menus[i].burger != NULL) {
gtk_widget_set_sensitive(GTK_WIDGET(
- g->buttons[i]->button),
- g->buttons[i]->sensitivity);
- if (g->buttons[i]->popup != NULL)
+ g->menus[i].burger),
+ g->menus[i].sensitivity);
+ }
+ if (g->menus[i].popup != NULL) {
gtk_widget_set_sensitive(GTK_WIDGET(
- g->buttons[i]->popup),
- g->buttons[i]->sensitivity);
+ g->menus[i].popup),
+ g->menus[i].sensitivity);
+ }
}
- gtk_widget_set_sensitive(GTK_WIDGET(g->menu_bar->view_submenu->images_menuitem), FALSE);
}
-void nsgtk_scaffolding_toolbars(struct nsgtk_scaffolding *g, int tbi)
-{
- switch (tbi) {
- /* case 0 is 'unset' [from fresh install / clearing options]
- * see above */
-
- case 1: /* Small icons */
- /* main toolbar */
- gtk_toolbar_set_style(GTK_TOOLBAR(g->tool_bar),
- GTK_TOOLBAR_ICONS);
- gtk_toolbar_set_icon_size(GTK_TOOLBAR(g->tool_bar),
- GTK_ICON_SIZE_SMALL_TOOLBAR);
- /* search toolbar */
- gtk_toolbar_set_style(GTK_TOOLBAR(g->search->bar),
- GTK_TOOLBAR_ICONS);
- gtk_toolbar_set_icon_size(GTK_TOOLBAR(g->search->bar),
- GTK_ICON_SIZE_SMALL_TOOLBAR);
- break;
-
- case 2: /* Large icons */
- gtk_toolbar_set_style(GTK_TOOLBAR(g->tool_bar),
- GTK_TOOLBAR_ICONS);
- gtk_toolbar_set_icon_size(GTK_TOOLBAR(g->tool_bar),
- GTK_ICON_SIZE_LARGE_TOOLBAR);
- /* search toolbar */
- gtk_toolbar_set_style(GTK_TOOLBAR(g->search->bar),
- GTK_TOOLBAR_ICONS);
- gtk_toolbar_set_icon_size(GTK_TOOLBAR(g->search->bar),
- GTK_ICON_SIZE_LARGE_TOOLBAR);
- break;
-
- case 3: /* Large icons with text */
- gtk_toolbar_set_style(GTK_TOOLBAR(g->tool_bar),
- GTK_TOOLBAR_BOTH);
- gtk_toolbar_set_icon_size(GTK_TOOLBAR(g->tool_bar),
- GTK_ICON_SIZE_LARGE_TOOLBAR);
- /* search toolbar */
- gtk_toolbar_set_style(GTK_TOOLBAR(g->search->bar),
- GTK_TOOLBAR_BOTH);
- gtk_toolbar_set_icon_size(GTK_TOOLBAR(g->search->bar),
- GTK_ICON_SIZE_LARGE_TOOLBAR);
- break;
-
- case 4: /* Text icons only */
- gtk_toolbar_set_style(GTK_TOOLBAR(g->tool_bar),
- GTK_TOOLBAR_TEXT);
- /* search toolbar */
- gtk_toolbar_set_style(GTK_TOOLBAR(g->search->bar),
- GTK_TOOLBAR_TEXT);
- default:
- break;
- }
-}
-
-/* exported interface documented in gtk/scaffolding.h */
-struct nsgtk_scaffolding *nsgtk_new_scaffolding(struct gui_window *toplevel)
+/* set menu items to have icons */
+static void nsgtk_menu_set_icons(struct nsgtk_scaffolding *g)
{
- struct nsgtk_scaffolding *gs;
- int i;
- GtkAccelGroup *group;
-
- gs = malloc(sizeof(*gs));
- if (gs == NULL) {
- return NULL;
- }
-
- NSLOG(netsurf, INFO,
- "Constructing a scaffold of %p for gui_window %p", gs, toplevel);
-
- gs->top_level = toplevel;
-
- /* Construct UI widgets */
- if (nsgtk_builder_new_from_resname("netsurf", &gs->builder) != NSERROR_OK) {
- free(gs);
- return NULL;
- }
-
- gtk_builder_connect_signals(gs->builder, NULL);
-
-/** Obtain a GTK widget handle from UI builder object */
-#define GET_WIDGET(x) GTK_WIDGET (gtk_builder_get_object(gs->builder, (x)))
-
- gs->window = GTK_WINDOW(GET_WIDGET("wndBrowser"));
- gs->notebook = GTK_NOTEBOOK(GET_WIDGET("notebook"));
- gs->tool_bar = GTK_TOOLBAR(GET_WIDGET("toolbar"));
-
- gs->search = malloc(sizeof(struct gtk_search));
- if (gs->search == NULL) {
- free(gs);
- return NULL;
- }
-
- gs->search->bar = GTK_TOOLBAR(GET_WIDGET("searchbar"));
- gs->search->entry = GTK_ENTRY(GET_WIDGET("searchEntry"));
-
- gs->search->buttons[0] = GTK_TOOL_BUTTON(GET_WIDGET("searchBackButton"));
- gs->search->buttons[1] = GTK_TOOL_BUTTON(GET_WIDGET("searchForwardButton"));
- gs->search->buttons[2] = GTK_TOOL_BUTTON(GET_WIDGET("closeSearchButton"));
- gs->search->checkAll = GTK_CHECK_BUTTON(GET_WIDGET("checkAllSearch"));
- gs->search->caseSens = GTK_CHECK_BUTTON(GET_WIDGET("caseSensButton"));
-
-#undef GET_WIDGET
-
- /* allocate buttons */
- for (i = BACK_BUTTON; i < PLACEHOLDER_BUTTON; i++) {
- gs->buttons[i] = calloc(1, sizeof(struct nsgtk_button_connect));
- if (gs->buttons[i] == NULL) {
- for (i-- ; i >= BACK_BUTTON; i--) {
- free(gs->buttons[i]);
- }
- free(gs);
- return NULL;
+ GtkWidget *img;
+ for (int i = BACK_BUTTON; i < PLACEHOLDER_BUTTON; i++) {
+ /* ensure there is an icon name */
+ if (g->menus[i].iconname == NULL) {
+ continue;
}
- gs->buttons[i]->location = -1;
- gs->buttons[i]->sensitivity = true;
- }
-
- /* here custom toolbutton adding code */
- gs->offset = 0;
- gs->toolbarmem = 0;
- gs->toolbarbase = 0;
- gs->historybase = 0;
- nsgtk_toolbar_customization_load(gs);
- nsgtk_toolbar_set_physical(gs);
-
- group = gtk_accel_group_new();
- gtk_window_add_accel_group(gs->window, group);
-
- gs->menu_bar = nsgtk_menu_bar_create(GTK_MENU_SHELL(gtk_builder_get_object(gs->builder, "menubar")), group);
-
-
- /* set this window's size and position to what's in the options, or
- * or some sensible default if they're not set yet.
- */
- if (nsoption_int(window_width) > 0) {
- gtk_window_move(gs->window,
- nsoption_int(window_x),
- nsoption_int(window_y));
- gtk_window_resize(gs->window,
- nsoption_int(window_width),
- nsoption_int(window_height));
- } else {
- /* Set to 1000x700, so we're very likely to fit even on
- * 1024x768 displays, not being able to take into account
- * window furniture or panels.
- */
- gtk_window_set_default_size(gs->window, 1000, 700);
- }
- /* Default toolbar button type uses system defaults */
- if (nsoption_int(button_type) == 0) {
- GtkSettings *settings = gtk_settings_get_default();
- GtkIconSize tooliconsize;
- GtkToolbarStyle toolbarstyle;
-
- g_object_get(settings,
- "gtk-toolbar-icon-size", &tooliconsize,
- "gtk-toolbar-style", &toolbarstyle, NULL);
-
- switch (toolbarstyle) {
- case GTK_TOOLBAR_ICONS:
- if (tooliconsize == GTK_ICON_SIZE_SMALL_TOOLBAR) {
- nsoption_set_int(button_type, 1);
- } else {
- nsoption_set_int(button_type, 2);
- }
- break;
-
- case GTK_TOOLBAR_TEXT:
- nsoption_set_int(button_type, 4);
- break;
-
- case GTK_TOOLBAR_BOTH:
- case GTK_TOOLBAR_BOTH_HORIZ:
- /* no labels in default configuration */
- default:
- /* No system default, so use large icons */
- nsoption_set_int(button_type, 2);
- break;
+ if (g->menus[i].main != NULL) {
+ img = gtk_image_new_from_icon_name(g->menus[i].iconname,
+ GTK_ICON_SIZE_MENU);
+ nsgtk_image_menu_item_set_image(GTK_WIDGET(g->menus[i].main), img);
+ }
+ if (g->menus[i].burger != NULL) {
+ img = gtk_image_new_from_icon_name(g->menus[i].iconname,
+ GTK_ICON_SIZE_MENU);
+ nsgtk_image_menu_item_set_image(GTK_WIDGET(g->menus[i].burger), img);
+ }
+ if (g->menus[i].popup != NULL) {
+ img = gtk_image_new_from_icon_name(g->menus[i].iconname,
+ GTK_ICON_SIZE_MENU);
+ nsgtk_image_menu_item_set_image(GTK_WIDGET(g->menus[i].popup), img);
}
}
+}
- nsgtk_scaffolding_toolbars(gs, nsoption_int(button_type));
-
- gtk_toolbar_set_show_arrow(gs->tool_bar, TRUE);
- gtk_widget_show_all(GTK_WIDGET(gs->tool_bar));
- nsgtk_tab_init(gs);
-
- gtk_widget_set_size_request(GTK_WIDGET(
- gs->buttons[HISTORY_BUTTON]->button), 20, -1);
-
-
- /* set up URL bar completion */
- gs->url_bar_completion = nsgtk_url_entry_completion_new(gs);
-
- /* set up the throbber. */
- gs->throb_frame = 0;
-
-
-#define CONNECT(obj, sig, callback, ptr) \
- g_signal_connect(G_OBJECT(obj), (sig), G_CALLBACK(callback), (ptr))
-
- g_signal_connect_after(gs->notebook, "page-added",
- G_CALLBACK(nsgtk_window_tabs_add), gs);
- g_signal_connect_after(gs->notebook, "page-removed",
- G_CALLBACK(nsgtk_window_tabs_remove), gs);
-
- /* connect main window signals to their handlers. */
- CONNECT(gs->window, "delete-event",
- scaffolding_window_delete_event, gs);
-
- CONNECT(gs->window, "destroy", scaffolding_window_destroy, gs);
-
- /* toolbar URL bar menu bar search bar signal handlers */
- CONNECT(gs->menu_bar->edit_submenu->edit, "show",
- nsgtk_window_edit_menu_shown, gs);
- CONNECT(gs->menu_bar->edit_submenu->edit, "hide",
- nsgtk_window_edit_menu_hidden, gs);
-
- CONNECT(gs->search->buttons[1], "clicked",
- nsgtk_search_forward_button_clicked, gs);
-
- CONNECT(gs->search->buttons[0], "clicked",
- nsgtk_search_back_button_clicked, gs);
-
- CONNECT(gs->search->entry, "changed", nsgtk_search_entry_changed, gs);
-
- CONNECT(gs->search->entry, "activate", nsgtk_search_entry_activate, gs);
-
- CONNECT(gs->search->entry, "key-press-event",
- nsgtk_search_entry_key, gs);
- CONNECT(gs->search->buttons[2], "clicked",
- nsgtk_search_close_button_clicked, gs);
+/**
+ * create and initialise menus
+ *
+ * There are four menus held by the scaffolding:
+ *
+ * 1. Main menubar menu.
+ * This can be hidden which causes the right click popup context menu
+ * to use the burger menu.
+ * 2. Burger menu.
+ * This can be opened from a burger icon on the toolbar.
+ * 3. popup context menu.
+ * This is opened by right mouse clicking on the toolbar or browser area
+ * 4. link context menu
+ * Opened like the other popup menu when the mouse is over a link in the
+ * browser area
+ *
+ * The cut, copy, paste, delete and back, forwards, stop, reload groups of
+ * menu entries are context sensitive and must be updated as appropriate
+ * when a menu is opened which contains those groups.
+ */
+static nserror nsgtk_menus_create(struct nsgtk_scaffolding *gs)
+{
+ GtkAccelGroup *group;
+ bool showmenu; /* show menubar */
+ bool showtool; /* show toolbar */
- CONNECT(gs->search->caseSens, "toggled",
- nsgtk_search_entry_changed, gs);
+ get_bar_show(&showmenu, &showtool);
- CONNECT(gs->tool_bar, "popup-context-menu",
- nsgtk_window_tool_bar_clicked, gs);
+ group = gtk_accel_group_new();
- /* create popup menu */
- gs->menu_popup = nsgtk_new_scaffolding_popup(gs, group);
+ gtk_window_add_accel_group(gs->window, group);
- gs->link_menu = nsgtk_new_scaffolding_link_popup(gs, group);
+ gs->menu_bar = create_scaffolding_bar_menu(gs, group, showmenu, showtool);
+ gs->burger_menu = create_scaffolding_burger_menu(gs, group, showmenu, showtool);
+ gs->popup_menu = create_scaffolding_popup_menu(gs, group, showmenu, showtool);
+ gs->link_menu = create_scaffolding_link_menu(gs, group);
/* set up the menu signal handlers */
- nsgtk_scaffolding_toolbar_init(gs);
- nsgtk_toolbar_connect_all(gs);
- nsgtk_attach_menu_handlers(gs);
-
- nsgtk_scaffolding_initial_sensitivity(gs);
-
- gs->fullscreen = false;
-
- /* attach to the list */
- if (scaf_list) {
- scaf_list->prev = gs;
- }
- gs->next = scaf_list;
- gs->prev = NULL;
- scaf_list = gs;
-
- /* set icon images */
- nsgtk_theme_implement(gs);
+ nsgtk_menu_initialise(gs);
+ nsgtk_menu_set_icons(gs);
+ nsgtk_menu_connect_signals(gs);
+ nsgtk_menu_set_sensitivity(gs);
- /* set web search provider */
- search_web_select_provider(nsoption_int(search_provider));
-
- /* finally, show the window. */
- gtk_widget_show(GTK_WIDGET(gs->window));
-
- NSLOG(netsurf, INFO, "creation complete");
-
- return gs;
+ return NSERROR_OK;
}
+
/* exported function documented in gtk/scaffolding.h */
-void nsgtk_window_set_title(struct gui_window *gw, const char *title)
+void nsgtk_scaffolding_set_title(struct gui_window *gw, const char *title)
{
struct nsgtk_scaffolding *gs = nsgtk_get_scaffold(gw);
int title_len;
char *newtitle;
- if ((title == NULL) || (title[0] == '\0')) {
- if (gs->top_level != gw) {
- gtk_window_set_title(gs->window, "NetSurf");
- }
+ /* only set window title if top level window */
+ if (gs->top_level != gw) {
return;
}
- nsgtk_tab_set_title(gw, title);
-
- if (gs->top_level != gw) {
- /* not top level window so do not set window title */
+ if (title == NULL || title[0] == '\0') {
+ gtk_window_set_title(gs->window, "NetSurf");
return;
}
@@ -2321,209 +1263,48 @@ void nsgtk_window_set_title(struct gui_window *gw, const char *title)
gtk_window_set_title(gs->window, newtitle);
free(newtitle);
-}
-
-nserror gui_window_set_url(struct gui_window *gw, nsurl *url)
-{
- struct nsgtk_scaffolding *g;
- size_t idn_url_l;
- char *idn_url_s = NULL;
-
- g = nsgtk_get_scaffold(gw);
- if (g->top_level == gw) {
- if (nsoption_bool(display_decoded_idn) == true) {
- if (nsurl_get_utf8(url, &idn_url_s, &idn_url_l) != NSERROR_OK)
- idn_url_s = NULL;
- }
-
- gtk_entry_set_text(GTK_ENTRY(g->url_bar), idn_url_s ? idn_url_s : nsurl_access(url));
-
- if(idn_url_s)
- free(idn_url_s);
-
- gtk_editable_set_position(GTK_EDITABLE(g->url_bar), -1);
- }
- return NSERROR_OK;
-}
-
-void gui_window_start_throbber(struct gui_window* _g)
-{
- struct nsgtk_scaffolding *g = nsgtk_get_scaffold(_g);
- g->buttons[STOP_BUTTON]->sensitivity = true;
- g->buttons[RELOAD_BUTTON]->sensitivity = false;
- nsgtk_scaffolding_set_sensitivity(g);
-
- scaffolding_update_context(g);
-
- nsgtk_schedule(100, nsgtk_throb, g);
-}
-
-void gui_window_stop_throbber(struct gui_window* _g)
-{
- struct nsgtk_scaffolding *g = nsgtk_get_scaffold(_g);
- if (g == NULL)
- return;
- scaffolding_update_context(g);
- nsgtk_schedule(-1, nsgtk_throb, g);
- if (g->buttons[STOP_BUTTON] != NULL)
- g->buttons[STOP_BUTTON]->sensitivity = false;
- if (g->buttons[RELOAD_BUTTON] != NULL)
- g->buttons[RELOAD_BUTTON]->sensitivity = true;
-
- nsgtk_scaffolding_set_sensitivity(g);
-
- if ((g->throbber == NULL) || (nsgtk_throbber == NULL) ||
- (nsgtk_throbber->framedata == NULL) ||
- (nsgtk_throbber->framedata[0] == NULL))
- return;
- gtk_image_set_from_pixbuf(g->throbber, nsgtk_throbber->framedata[0]);
}
-/**
- * set favicon
- */
-void
-nsgtk_scaffolding_set_icon(struct gui_window *gw)
+/* exported interface documented in scaffolding.h */
+nserror nsgtk_scaffolding_throbber(struct gui_window* gw, bool active)
{
- struct nsgtk_scaffolding *sc = nsgtk_get_scaffold(gw);
- GdkPixbuf *icon_pixbuf = nsgtk_get_icon(gw);
-
- /* check icon needs to be shown */
- if ((icon_pixbuf == NULL) ||
- (sc->top_level != gw)) {
- return;
+ struct nsgtk_scaffolding *gs = nsgtk_get_scaffold(gw);
+ if (active) {
+ gs->menus[STOP_BUTTON].sensitivity = true;
+ gs->menus[RELOAD_BUTTON].sensitivity = false;
+ } else {
+ gs->menus[STOP_BUTTON].sensitivity = false;
+ gs->menus[RELOAD_BUTTON].sensitivity = true;
}
+ scaffolding_update_context(gs);
- nsgtk_entry_set_icon_from_pixbuf(sc->url_bar,
- GTK_ENTRY_ICON_PRIMARY,
- icon_pixbuf);
-
- gtk_widget_show_all(GTK_WIDGET(sc->buttons[URL_BAR_ITEM]->button));
+ return NSERROR_OK;
}
-static void
-nsgtk_scaffolding_set_websearch(struct nsgtk_scaffolding *g, const char *content)
-{
- /** \todo this code appears technically correct, though
- * currently has no effect at all.
- */
- PangoLayout *lo = gtk_entry_get_layout(GTK_ENTRY(g->webSearchEntry));
- if (lo != NULL) {
- pango_layout_set_font_description(lo, NULL);
- PangoFontDescription *desc = pango_font_description_new();
- if (desc != NULL) {
- pango_font_description_set_style(desc,
- PANGO_STYLE_ITALIC);
- pango_font_description_set_family(desc, "Arial");
- pango_font_description_set_weight(desc,
- PANGO_WEIGHT_ULTRALIGHT);
- pango_font_description_set_size(desc,
- 10 * PANGO_SCALE);
- pango_layout_set_font_description(lo, desc);
- }
- PangoAttrList *list = pango_attr_list_new();
- if (list != NULL) {
- PangoAttribute *italic = pango_attr_style_new(
- PANGO_STYLE_ITALIC);
- if (italic != NULL) {
- italic->start_index = 0;
- italic->end_index = strlen(content);
- }
- PangoAttribute *grey = pango_attr_foreground_new(
- 0x7777, 0x7777, 0x7777);
- if (grey != NULL) {
- grey->start_index = 0;
- grey->end_index = strlen(content);
- }
- pango_attr_list_insert(list, italic);
- pango_attr_list_insert(list, grey);
- pango_layout_set_attributes(lo, list);
- pango_attr_list_unref(list);
- }
- pango_layout_set_text(lo, content, -1);
- }
-/* an alternative method */
-/* char *parse = malloc(strlen(content) + 1);
- PangoAttrList *list = pango_layout_get_attributes(lo);
- char *markup = g_strconcat("<span foreground='#777777'><i>", content,
- "</i></span>", NULL);
- pango_parse_markup(markup, -1, 0, &list, &parse, NULL, NULL);
- gtk_widget_show_all(g->webSearchEntry);
-*/
- gtk_entry_set_visibility(GTK_ENTRY(g->webSearchEntry), TRUE);
- gtk_entry_set_text(GTK_ENTRY(g->webSearchEntry), content);
-}
-
-/**
- * GTK UI callback when search provider details are updated.
- *
- * \param provider_name The providers name.
- * \param provider_bitmap The bitmap representing the provider.
- * \return NSERROR_OK on success else error code.
- */
-static nserror
-gui_search_web_provider_update(const char *provider_name,
- struct bitmap *provider_bitmap)
+/* exported interface documented in gtk/scaffolding.h */
+nserror nsgtk_scaffolding_destroy_all(void)
{
- struct nsgtk_scaffolding *current;
- GdkPixbuf *srch_pixbuf = NULL;
- char *searchcontent;
-
- NSLOG(netsurf, INFO, "name:%s bitmap %p", provider_name,
- provider_bitmap);
-
- if (provider_bitmap != NULL) {
- srch_pixbuf = nsgdk_pixbuf_get_from_surface(provider_bitmap->surface, 16, 16);
-
- if (srch_pixbuf == NULL) {
- return NSERROR_NOMEM;
- }
- }
-
- /* setup the search content name */
- searchcontent = malloc(strlen(provider_name) + SLEN("Search ") + 1);
- if (searchcontent != NULL) {
- sprintf(searchcontent, "Search %s", provider_name);
- }
+ struct nsgtk_scaffolding *gs;
- /* set the search provider parameters up in each scaffold */
- for (current = scaf_list; current != NULL; current = current->next) {
- /* add ico to each window's toolbar */
- if (srch_pixbuf != NULL) {
- nsgtk_entry_set_icon_from_pixbuf(current->webSearchEntry,
- GTK_ENTRY_ICON_PRIMARY,
- srch_pixbuf);
- } else {
- nsgtk_entry_set_icon_from_stock(current->webSearchEntry,
- GTK_ENTRY_ICON_PRIMARY,
- NSGTK_STOCK_FIND);
- }
+ gs = scaf_list;
+ assert(gs != NULL);
- /* set search entry text */
- if (searchcontent != NULL) {
- nsgtk_scaffolding_set_websearch(current, searchcontent);
- } else {
- nsgtk_scaffolding_set_websearch(current, provider_name);
- }
+ if (nsgtk_check_for_downloads(gs->window) == true) {
+ return NSERROR_INVALID;
}
- free(searchcontent);
-
- if (srch_pixbuf != NULL) {
- g_object_unref(srch_pixbuf);
+ /* iterate all scaffolding windows and destroy them */
+ while (gs != NULL) {
+ struct nsgtk_scaffolding *next = gs->next;
+ gtk_widget_destroy(GTK_WIDGET(gs->window));
+ gs = next;
}
-
return NSERROR_OK;
}
-static struct gui_search_web_table search_web_table = {
- .provider_update = gui_search_web_provider_update,
-};
-
-struct gui_search_web_table *nsgtk_search_web_table = &search_web_table;
/* exported interface documented in gtk/scaffolding.h */
GtkWindow* nsgtk_scaffolding_window(struct nsgtk_scaffolding *g)
@@ -2537,41 +1318,14 @@ GtkNotebook* nsgtk_scaffolding_notebook(struct nsgtk_scaffolding *g)
return g->notebook;
}
-/* exported interface documented in gtk/scaffolding.h */
-GtkWidget *nsgtk_scaffolding_urlbar(struct nsgtk_scaffolding *g)
-{
- return g->url_bar;
-}
/* exported interface documented in gtk/scaffolding.h */
-GtkWidget *nsgtk_scaffolding_websearch(struct nsgtk_scaffolding *g)
+GtkMenuBar *nsgtk_scaffolding_menu_bar(struct nsgtk_scaffolding *gs)
{
- return g->webSearchEntry;
-}
-
-/* exported interface documented in gtk/scaffolding.h */
-GtkToolbar *nsgtk_scaffolding_toolbar(struct nsgtk_scaffolding *g)
-{
- return g->tool_bar;
-}
-
-/* exported interface documented in gtk/scaffolding.h */
-struct nsgtk_button_connect *
-nsgtk_scaffolding_button(struct nsgtk_scaffolding *g, int i)
-{
- return g->buttons[i];
-}
-
-/* exported interface documented in gtk/scaffolding.h */
-struct gtk_search *nsgtk_scaffolding_search(struct nsgtk_scaffolding *g)
-{
- return g->search;
-}
-
-/* exported interface documented in gtk/scaffolding.h */
-GtkMenuBar *nsgtk_scaffolding_menu_bar(struct nsgtk_scaffolding *g)
-{
- return g->menu_bar->bar_menu;
+ if (gs == NULL) {
+ return NULL;
+ }
+ return gs->menu_bar->bar_menu;
}
/* exported interface documented in gtk/scaffolding.h */
@@ -2583,54 +1337,6 @@ struct nsgtk_scaffolding *nsgtk_scaffolding_iterate(struct nsgtk_scaffolding *g)
return g->next;
}
-/* exported interface documented in gtk/scaffolding.h */
-void nsgtk_scaffolding_reset_offset(struct nsgtk_scaffolding *g)
-{
- g->offset = 0;
-}
-
-/* exported interface documented in gtk/scaffolding.h */
-void nsgtk_scaffolding_update_url_bar_ref(struct nsgtk_scaffolding *g)
-{
- g->url_bar = GTK_WIDGET(gtk_bin_get_child(GTK_BIN(
- nsgtk_scaffolding_button(g, URL_BAR_ITEM)->button)));
-
- gtk_entry_set_completion(GTK_ENTRY(g->url_bar),
- g->url_bar_completion);
-}
-
-/* exported interface documented in gtk/scaffolding.h */
-void nsgtk_scaffolding_update_throbber_ref(struct nsgtk_scaffolding *g)
-{
- g->throbber = GTK_IMAGE(gtk_bin_get_child(
- GTK_BIN(g->buttons[THROBBER_ITEM]->button)));
-}
-
-/* exported interface documented in gtk/scaffolding.h */
-void nsgtk_scaffolding_update_websearch_ref(struct nsgtk_scaffolding *g)
-{
- g->webSearchEntry = gtk_bin_get_child(GTK_BIN(
- g->buttons[WEBSEARCH_ITEM]->button));
-}
-
-/* exported interface documented in gtk/scaffolding.h */
-void nsgtk_scaffolding_toggle_search_bar_visibility(struct nsgtk_scaffolding *g)
-{
- gboolean vis;
- struct browser_window *bw = nsgtk_get_browser_window(g->top_level);
-
- g_object_get(G_OBJECT(g->search->bar), "visible", &vis, NULL);
- if (vis) {
- if (bw != NULL) {
- browser_window_search_clear(bw);
- }
-
- gtk_widget_hide(GTK_WIDGET(g->search->bar));
- } else {
- gtk_widget_show(GTK_WIDGET(g->search->bar));
- gtk_widget_grab_focus(GTK_WIDGET(g->search->entry));
- }
-}
/* exported interface documented in gtk/scaffolding.h */
struct gui_window *nsgtk_scaffolding_top_level(struct nsgtk_scaffolding *g)
@@ -2638,6 +1344,7 @@ struct gui_window *nsgtk_scaffolding_top_level(struct nsgtk_scaffolding *g)
return g->top_level;
}
+
/* exported interface documented in gtk/scaffolding.h */
void nsgtk_scaffolding_set_top_level(struct gui_window *gw)
{
@@ -2653,44 +1360,33 @@ void nsgtk_scaffolding_set_top_level(struct gui_window *gw)
sc = nsgtk_get_scaffold(gw);
assert(sc != NULL);
+ scaf_current = sc;
+
sc->top_level = gw;
- /* Synchronise the history (will also update the URL bar) */
+ /* Synchronise the history */
scaffolding_update_context(sc);
- /* clear effects of potential searches */
- browser_window_search_clear(bw);
-
- nsgtk_scaffolding_set_icon(gw);
-
/* Ensure the window's title bar is updated */
- nsgtk_window_set_title(gw, browser_window_get_title(bw));
-
+ nsgtk_scaffolding_set_title(gw, browser_window_get_title(bw));
}
+
/* exported interface documented in scaffolding.h */
void nsgtk_scaffolding_set_sensitivity(struct nsgtk_scaffolding *g)
{
int i;
-#define SENSITIVITY(q)\
- i = q##_BUTTON;\
- if (g->buttons[i]->main != NULL)\
- gtk_widget_set_sensitive(GTK_WIDGET(\
- g->buttons[i]->main),\
- g->buttons[i]->sensitivity);\
- if (g->buttons[i]->rclick != NULL)\
- gtk_widget_set_sensitive(GTK_WIDGET(\
- g->buttons[i]->rclick),\
- g->buttons[i]->sensitivity);\
- if ((g->buttons[i]->location != -1) && \
- (g->buttons[i]->button != NULL))\
- gtk_widget_set_sensitive(GTK_WIDGET(\
- g->buttons[i]->button),\
- g->buttons[i]->sensitivity);\
- if (g->buttons[i]->popup != NULL)\
- gtk_widget_set_sensitive(GTK_WIDGET(\
- g->buttons[i]->popup),\
- g->buttons[i]->sensitivity);
+#define SENSITIVITY(q) \
+ i = q##_BUTTON; \
+ if (g->menus[i].main != NULL) \
+ gtk_widget_set_sensitive(GTK_WIDGET(g->menus[i].main), \
+ g->menus[i].sensitivity); \
+ if (g->menus[i].burger != NULL) \
+ gtk_widget_set_sensitive(GTK_WIDGET(g->menus[i].burger), \
+ g->menus[i].sensitivity); \
+ if (g->menus[i].popup != NULL) \
+ gtk_widget_set_sensitive(GTK_WIDGET(g->menus[i].popup), \
+ g->menus[i].sensitivity);
SENSITIVITY(STOP)
SENSITIVITY(RELOAD)
@@ -2703,86 +1399,205 @@ void nsgtk_scaffolding_set_sensitivity(struct nsgtk_scaffolding *g)
SENSITIVITY(PREVTAB)
SENSITIVITY(CLOSETAB)
#undef SENSITIVITY
+
+}
+
+
+/* exported interface documented in gtk/scaffolding.h */
+nserror nsgtk_scaffolding_toolbar_context_menu(struct nsgtk_scaffolding *gs)
+{
+ /* set visibility for right-click popup menu */
+ popup_menu_hide(gs->popup_menu, false, true);
+
+ nsgtk_menu_popup_at_pointer(gs->popup_menu->popup_menu, NULL);
+
+ return NSERROR_OK;
+}
+
+
+/* exported interface documented in gtk/scaffolding.h */
+nserror nsgtk_scaffolding_burger_menu(struct nsgtk_scaffolding *gs)
+{
+ nsgtk_menu_popup_at_pointer(gs->burger_menu->burger_menu, NULL);
+
+ return NSERROR_OK;
}
/* exported interface documented in gtk/scaffolding.h */
-void nsgtk_scaffolding_context_menu(struct nsgtk_scaffolding *g,
- gdouble x,
- gdouble y)
+void
+nsgtk_scaffolding_context_menu(struct nsgtk_scaffolding *g,
+ gdouble x,
+ gdouble y)
{
GtkMenu *gtkmenu;
+ struct browser_window *bw;
+
+ bw = nsgtk_get_browser_window(g->top_level);
/* update the global context menu features */
- browser_window_get_features(nsgtk_get_browser_window(g->top_level),
- x, y, &current_menu_features);
+ browser_window_get_features(bw, x, y, &current_menu_features);
if (current_menu_features.link != NULL) {
/* menu is opening over a link */
gtkmenu = g->link_menu->link_menu;
} else {
- gtkmenu = g->menu_popup->popup_menu;
+ gtkmenu = g->popup_menu->popup_menu;
nsgtk_scaffolding_update_edit_actions_sensitivity(g);
- if (!(g->buttons[COPY_BUTTON]->sensitivity)) {
- gtk_widget_hide(GTK_WIDGET(g->menu_popup->copy_menuitem));
+ if (!(g->menus[COPY_BUTTON].sensitivity)) {
+ gtk_widget_hide(GTK_WIDGET(g->popup_menu->copy_menuitem));
} else {
- gtk_widget_show(GTK_WIDGET(g->menu_popup->copy_menuitem));
+ gtk_widget_show(GTK_WIDGET(g->popup_menu->copy_menuitem));
}
- if (!(g->buttons[CUT_BUTTON]->sensitivity)) {
- gtk_widget_hide(GTK_WIDGET(g->menu_popup->cut_menuitem));
+ if (!(g->menus[CUT_BUTTON].sensitivity)) {
+ gtk_widget_hide(GTK_WIDGET(g->popup_menu->cut_menuitem));
} else {
- gtk_widget_show(GTK_WIDGET(g->menu_popup->cut_menuitem));
+ gtk_widget_show(GTK_WIDGET(g->popup_menu->cut_menuitem));
}
- if (!(g->buttons[PASTE_BUTTON]->sensitivity)) {
- gtk_widget_hide(GTK_WIDGET(g->menu_popup->paste_menuitem));
+ if (!(g->menus[PASTE_BUTTON].sensitivity)) {
+ gtk_widget_hide(GTK_WIDGET(g->popup_menu->paste_menuitem));
} else {
- gtk_widget_show(GTK_WIDGET(g->menu_popup->paste_menuitem));
+ gtk_widget_show(GTK_WIDGET(g->popup_menu->paste_menuitem));
}
- /* hide customise */
- popup_menu_hide(g->menu_popup, false, false, false, true);
}
- gtk_menu_popup(gtkmenu, NULL, NULL, NULL, NULL, 0,
- gtk_get_current_event_time());
+ nsgtk_menu_popup_at_pointer(gtkmenu, NULL);
}
-/**
- * reallocate width for history button, reallocate buttons right of history;
- * memorise base of history button / toolbar
- */
-void nsgtk_scaffolding_toolbar_size_allocate(GtkWidget *widget,
- GtkAllocation *alloc, gpointer data)
+/* exported interface documented in gtk/scaffolding.h */
+struct nsgtk_scaffolding *nsgtk_current_scaffolding(void)
{
- struct nsgtk_scaffolding *g = (struct nsgtk_scaffolding *)data;
- int i = nsgtk_toolbar_get_id_from_widget(widget, g);
- if (i == -1)
- return;
- if ((g->toolbarmem == alloc->x) ||
- (g->buttons[i]->location <
- g->buttons[HISTORY_BUTTON]->location))
- /* no reallocation after first adjustment, no reallocation for buttons
- * left of history button */
- return;
- if (widget == GTK_WIDGET(g->buttons[HISTORY_BUTTON]->button)) {
- if (alloc->width == 20)
- return;
-
- g->toolbarbase = alloc->y + alloc->height;
- g->historybase = alloc->x + 20;
- if (g->offset == 0)
- g->offset = alloc->width - 20;
- alloc->width = 20;
- } else if (g->buttons[i]->location <=
- g->buttons[URL_BAR_ITEM]->location) {
- alloc->x -= g->offset;
- if (i == URL_BAR_ITEM)
- alloc->width += g->offset;
+ if (scaf_current == NULL) {
+ scaf_current = scaf_list;
}
- g->toolbarmem = alloc->x;
- gtk_widget_size_allocate(widget, alloc);
+ return scaf_current;
+}
+
+/* exported interface documented in gtk/scaffolding.h */
+struct nsgtk_scaffolding *nsgtk_scaffolding_from_notebook(GtkNotebook *notebook)
+{
+ struct nsgtk_scaffolding *gs;
+ gs = scaf_list;
+ while (gs != NULL) {
+ if (gs->notebook == notebook) {
+ break;
+ }
+ gs = gs->next;
+ }
+ return gs;
+}
+
+/* exported interface documented in gtk/scaffolding.h */
+struct nsgtk_scaffolding *nsgtk_new_scaffolding(struct gui_window *toplevel)
+{
+ nserror res;
+ struct nsgtk_scaffolding *gs;
+
+ gs = calloc(1, sizeof(*gs));
+ if (gs == NULL) {
+ return NULL;
+ }
+
+ NSLOG(netsurf, INFO,
+ "Constructing a scaffold of %p for gui_window %p", gs, toplevel);
+
+ gs->top_level = toplevel;
+
+ /* Construct UI widgets */
+ if (nsgtk_builder_new_from_resname("netsurf", &gs->builder) != NSERROR_OK) {
+ free(gs);
+ return NULL;
+ }
+
+ gtk_builder_connect_signals(gs->builder, NULL);
+
+ /* containing window setup */
+ gs->window = GTK_WINDOW(gtk_builder_get_object(gs->builder,
+ "wndBrowser"));
+
+ /**
+ * set this window's size and position to what's in the options, or
+ * some sensible default if they are not set yet.
+ */
+ if (nsoption_int(window_width) > 0) {
+ gtk_window_move(gs->window,
+ nsoption_int(window_x),
+ nsoption_int(window_y));
+ gtk_window_resize(gs->window,
+ nsoption_int(window_width),
+ nsoption_int(window_height));
+ } else {
+ /* Set to 1000x700, so we're very likely to fit even on
+ * 1024x768 displays, not being able to take into account
+ * window furniture or panels.
+ */
+ gtk_window_set_default_size(gs->window, 1000, 700);
+ }
+
+ g_signal_connect(gs->window,
+ "delete-event",
+ G_CALLBACK(scaffolding_window_delete_event),
+ gs);
+
+ g_signal_connect(gs->window,
+ "destroy",
+ G_CALLBACK(scaffolding_window_destroy),
+ gs);
+
+
+ /* notebook */
+ res = nsgtk_notebook_create(gs->builder, &gs->notebook);
+ if (res != NSERROR_OK) {
+ free(gs);
+ return NULL;
+ }
+
+ g_signal_connect_after(gs->notebook,
+ "page-added",
+ G_CALLBACK(nsgtk_window_tabs_add),
+ gs);
+ gs->tabs_remove_handler_id = g_signal_connect_after(gs->notebook,
+ "page-removed",
+ G_CALLBACK(nsgtk_window_tabs_remove),
+ gs);
+
+
+ res = nsgtk_menus_create(gs);
+ if (res != NSERROR_OK) {
+ free(gs);
+ return NULL;
+ }
+
+ /* attach to the list */
+ if (scaf_list) {
+ scaf_list->prev = gs;
+ }
+ gs->next = scaf_list;
+ gs->prev = NULL;
+ scaf_list = gs;
+
+ /* finally, show the window. */
+ gtk_widget_show(GTK_WIDGET(gs->window));
+
+ NSLOG(netsurf, INFO, "creation complete");
+
+ return gs;
+}
+
+/* exported interface documented in gtk/scaffolding.h */
+nserror nsgtk_scaffolding_position_page_info(struct nsgtk_scaffolding *gs,
+ struct nsgtk_pi_window *win)
+{
+ return nsgtk_window_position_page_info(gs->top_level, win);
+}
+
+/* exported interface documented in gtk/scaffolding.h */
+nserror nsgtk_scaffolding_position_local_history(struct nsgtk_scaffolding *gs)
+{
+ return nsgtk_window_position_local_history(gs->top_level);
}
diff --git a/frontends/gtk/scaffolding.h b/frontends/gtk/scaffolding.h
index e1fd9bf2a..87d4f3bd6 100644
--- a/frontends/gtk/scaffolding.h
+++ b/frontends/gtk/scaffolding.h
@@ -27,91 +27,8 @@ struct hlcache_handle;
struct gui_window;
struct gui_search_web_table;
struct nsurl;
+struct nsgtk_pi_window;
-extern struct gui_search_web_table *nsgtk_search_web_table;
-
-typedef enum {
- BACK_BUTTON = 0,
- HISTORY_BUTTON,
- FORWARD_BUTTON,
- STOP_BUTTON,
- RELOAD_BUTTON,
- HOME_BUTTON,
- URL_BAR_ITEM,
- WEBSEARCH_ITEM,
- THROBBER_ITEM,
- NEWWINDOW_BUTTON,
- NEWTAB_BUTTON,
- OPENFILE_BUTTON,
- CLOSETAB_BUTTON,
- CLOSEWINDOW_BUTTON,
- SAVEPAGE_BUTTON,
- PDF_BUTTON,
- PLAINTEXT_BUTTON,
- DRAWFILE_BUTTON,
- POSTSCRIPT_BUTTON,
- PRINTPREVIEW_BUTTON,
- PRINT_BUTTON,
- QUIT_BUTTON,
- CUT_BUTTON,
- COPY_BUTTON,
- PASTE_BUTTON,
- DELETE_BUTTON,
- SELECTALL_BUTTON,
- FIND_BUTTON,
- PREFERENCES_BUTTON,
- ZOOMPLUS_BUTTON,
- ZOOMMINUS_BUTTON,
- ZOOMNORMAL_BUTTON,
- FULLSCREEN_BUTTON,
- VIEWSOURCE_BUTTON,
- DOWNLOADS_BUTTON,
- SAVEWINDOWSIZE_BUTTON,
- TOGGLEDEBUGGING_BUTTON,
- SAVEBOXTREE_BUTTON,
- SAVEDOMTREE_BUTTON,
- LOCALHISTORY_BUTTON,
- GLOBALHISTORY_BUTTON,
- ADDBOOKMARKS_BUTTON,
- SHOWBOOKMARKS_BUTTON,
- SHOWCOOKIES_BUTTON,
- OPENLOCATION_BUTTON,
- NEXTTAB_BUTTON,
- PREVTAB_BUTTON,
- CONTENTS_BUTTON,
- GUIDE_BUTTON,
- INFO_BUTTON,
- ABOUT_BUTTON,
- PLACEHOLDER_BUTTON /* size indicator; array maximum indices */
-} nsgtk_toolbar_button; /* PLACEHOLDER_BUTTON - 1 */
-
-struct gtk_history_window {
- struct nsgtk_scaffolding *g;
- GtkWindow *window;
- GtkScrolledWindow *scrolled;
- GtkDrawingArea *drawing_area;
-};
-
-struct gtk_search {
- GtkToolbar *bar;
- GtkEntry *entry;
- GtkToolButton *buttons[3]; /* back, forward, */
- GtkCheckButton *checkAll; /* close */
- GtkCheckButton *caseSens;
-};
-
-struct nsgtk_button_connect {
- GtkToolItem *button;
- int location; /* in toolbar */
- bool sensitivity;
- GtkWidget *main; /* left click menu entry */
- GtkWidget *rclick; /* right click menu */
- GtkWidget *popup; /* popup menu entry */
- void *mhandler; /* menu item clicked */
- void *bhandler; /* button clicked */
- void *dataplus; /* customization -> toolbar */
- void *dataminus; /* customization -> store */
-};
/**
* create a new scaffolding for a window.
@@ -122,69 +39,75 @@ struct nsgtk_button_connect {
struct nsgtk_scaffolding *nsgtk_new_scaffolding(struct gui_window *gw);
/**
- * Obtain the most recently used scaffolding element.
+ * causes all scaffolding windows to be destroyed.
*
- * This allows tabs to be opened in the most recently used window
+ * \return NSERROR_OK and all scaffolding windows destroyed else
+ * NSERROR_INVALID if download in progress and user continued.
*/
-struct nsgtk_scaffolding *nsgtk_current_scaffolding(void);
+nserror nsgtk_scaffolding_destroy_all(void);
-/* acessors for gtk elements within a scaffold */
+/**
+ * Update scaffolding window when throbber state changes
+ */
+nserror nsgtk_scaffolding_throbber(struct gui_window* gw, bool active);
/**
- * Get the gtk window for a scaffolding.
+ * open the toolbar context menu
*/
-GtkWindow *nsgtk_scaffolding_window(struct nsgtk_scaffolding *g);
+nserror nsgtk_scaffolding_toolbar_context_menu(struct nsgtk_scaffolding *gs);
/**
- * Get the gtk notebook from a scaffold.
+ * Position the page-info popup in the right place
+ *
+ * \param gs The scaffolding to position relative to
+ * \param win The page-info window to position
*/
-GtkNotebook *nsgtk_scaffolding_notebook(struct nsgtk_scaffolding *g);
+nserror nsgtk_scaffolding_position_page_info(struct nsgtk_scaffolding *gs,
+ struct nsgtk_pi_window *win);
/**
- * Get the gtk url bar from a scaffold.
+ * Position the local-history popup in the right place
+ *
+ * \param gs The scaffolding to position relative to
*/
-GtkWidget *nsgtk_scaffolding_urlbar(struct nsgtk_scaffolding *g);
+nserror nsgtk_scaffolding_position_local_history(struct nsgtk_scaffolding *gs);
/**
- * Get the gtk web search entry from a scaffold.
+ * open the burger menu
*/
-GtkWidget *nsgtk_scaffolding_websearch(struct nsgtk_scaffolding *g);
+nserror nsgtk_scaffolding_burger_menu(struct nsgtk_scaffolding *gs);
/**
- * Get the gtk toolbar from a scaffold.
+ * Obtain the most recently used scaffolding element.
+ *
+ * This allows tabs to be opened in the most recently used window
*/
-GtkToolbar *nsgtk_scaffolding_toolbar(struct nsgtk_scaffolding *g);
+struct nsgtk_scaffolding *nsgtk_current_scaffolding(void);
+/* acessors for gtk elements within a scaffold */
-struct nsgtk_button_connect *nsgtk_scaffolding_button(struct nsgtk_scaffolding *g, int i);
+/**
+ * Get the gtk window for a scaffolding.
+ */
+GtkWindow *nsgtk_scaffolding_window(struct nsgtk_scaffolding *g);
+
+/**
+ * Get the gtk notebook from a scaffold.
+ */
+GtkNotebook *nsgtk_scaffolding_notebook(struct nsgtk_scaffolding *g);
struct gtk_search *nsgtk_scaffolding_search(struct nsgtk_scaffolding *g);
GtkMenuBar *nsgtk_scaffolding_menu_bar(struct nsgtk_scaffolding *g);
-struct gtk_history_window *nsgtk_scaffolding_history_window(struct nsgtk_scaffolding *g);
-
struct gui_window *nsgtk_scaffolding_top_level(struct nsgtk_scaffolding *g);
-/**
- * reset the scaffold offset value to 0.
- *
- * \todo The value is only ever altered in
- * nsgtk_scaffolding_toolbar_size_allocate and is something to do with
- * the history button either clarify or remove!
- */
-void nsgtk_scaffolding_reset_offset(struct nsgtk_scaffolding *g);
/**
* Iterate through available scaffolding.
*/
struct nsgtk_scaffolding *nsgtk_scaffolding_iterate(struct nsgtk_scaffolding *g);
-void nsgtk_scaffolding_update_url_bar_ref(struct nsgtk_scaffolding *g);
-
-void nsgtk_scaffolding_update_throbber_ref(struct nsgtk_scaffolding *g);
-
-void nsgtk_scaffolding_update_websearch_ref(struct nsgtk_scaffolding *g);
void nsgtk_scaffolding_toggle_search_bar_visibility(struct nsgtk_scaffolding *g);
@@ -224,29 +147,20 @@ void nsgtk_scaffolding_set_sensitivity(struct nsgtk_scaffolding *g);
*/
void nsgtk_scaffolding_context_menu(struct nsgtk_scaffolding *g, gdouble x, gdouble y);
-void nsgtk_scaffolding_toolbar_size_allocate(GtkWidget *widget, GtkAllocation *alloc, gpointer data);
-
-void nsgtk_scaffolding_set_icon(struct gui_window *gw);
-
-gboolean nsgtk_window_url_activate_event(GtkWidget *, gpointer);
-
-gboolean nsgtk_window_url_changed(GtkWidget *, GdkEventKey *, gpointer);
-
-nserror nsgtk_scaffolding_new_tab(struct gui_window *gw);
-
-/* core acessors */
/**
* set the title in the window
*
* \param gw The gui window to set title on
* \param title The title to set which may be NULL
*/
-void nsgtk_window_set_title(struct gui_window *gw, const char *title);
-
-nserror gui_window_set_url(struct gui_window *g, struct nsurl *url);
-void gui_window_start_throbber(struct gui_window *g);
-void gui_window_stop_throbber(struct gui_window *g);
+void nsgtk_scaffolding_set_title(struct gui_window *gw, const char *title);
-void nsgtk_scaffolding_toolbars(struct nsgtk_scaffolding *g, int tbi);
+/**
+ * find which scaffolding contains a gtk notebook
+ *
+ * \param notebook The notebook to search for.
+ * \return The scaffolding containing the notebook or NULL if not found
+ */
+struct nsgtk_scaffolding *nsgtk_scaffolding_from_notebook(GtkNotebook *notebook);
#endif /* NETSURF_GTK_SCAFFOLDING_H */
diff --git a/frontends/gtk/schedule.c b/frontends/gtk/schedule.c
index d5b45674b..69678924d 100644
--- a/frontends/gtk/schedule.c
+++ b/frontends/gtk/schedule.c
@@ -28,9 +28,9 @@
/** Killable callback closure embodiment. */
typedef struct {
- void (*callback)(void *); /**< The callback function. */
- void *context; /**< The context for the callback. */
- bool callback_killed; /**< Whether or not this was killed. */
+ void (*callback)(void *); /**< The callback function. */
+ void *context; /**< The context for the callback. */
+ bool callback_killed; /**< Whether or not this was killed. */
} _nsgtk_callback_t;
/** List of callbacks which have occurred and are pending running. */
@@ -61,20 +61,29 @@ nsgtk_schedule_kill_callback(void *_target, void *_match)
if ((target->callback == match->callback) &&
(target->context == match->context)) {
NSLOG(schedule, DEBUG,
- "Found match for %p(%p), killing.",
+ "Found match for %p(%p), killing.",
target->callback, target->context);
target->callback = NULL;
target->context = NULL;
target->callback_killed = true;
+ match->callback_killed = true;
}
}
-static void
-schedule_remove(void (*callback)(void *p), void *p)
+/**
+ * remove a matching callback and context tuple from all lists
+ *
+ * \param callback The callback to match
+ * \param cbctx The callback context to match
+ * \return NSERROR_OK if the tuple was removed from at least one list else NSERROR_NOT_FOUND
+ */
+static nserror
+schedule_remove(void (*callback)(void *p), void *cbctx)
{
_nsgtk_callback_t cb_match = {
.callback = callback,
- .context = p,
+ .context = cbctx,
+ .callback_killed = false,
};
g_list_foreach(queued_callbacks,
@@ -83,29 +92,36 @@ schedule_remove(void (*callback)(void *p), void *p)
nsgtk_schedule_kill_callback, &cb_match);
g_list_foreach(this_run,
nsgtk_schedule_kill_callback, &cb_match);
+
+ if (cb_match.callback_killed == false) {
+ return NSERROR_NOT_FOUND;
+ }
+ return NSERROR_OK;
}
/* exported interface documented in gtk/schedule.h */
-nserror nsgtk_schedule(int t, void (*callback)(void *p), void *p)
+nserror nsgtk_schedule(int t, void (*callback)(void *p), void *cbctx)
{
- _nsgtk_callback_t *cb;
+ _nsgtk_callback_t *cb;
+ nserror res;
/* Kill any pending schedule of this kind. */
- schedule_remove(callback, p);
+ res = schedule_remove(callback, cbctx);
- if (t < 0) {
- return NSERROR_OK;
- }
+ /* only removal */
+ if (t < 0) {
+ return res;
+ }
- cb = malloc(sizeof(_nsgtk_callback_t));
+ cb = malloc(sizeof(_nsgtk_callback_t));
cb->callback = callback;
- cb->context = p;
+ cb->context = cbctx;
cb->callback_killed = false;
/* Prepend is faster right now. */
queued_callbacks = g_list_prepend(queued_callbacks, cb);
g_timeout_add(t, nsgtk_schedule_generic_callback, cb);
- return NSERROR_OK;
+ return NSERROR_OK;
}
bool
@@ -121,7 +137,7 @@ schedule_run(void)
pending_callbacks = NULL;
NSLOG(schedule, DEBUG,
- "Captured a run of %d callbacks to fire.",
+ "Captured a run of %d callbacks to fire.",
g_list_length(this_run));
/* Run all the callbacks which made it this far. */
@@ -132,5 +148,5 @@ schedule_run(void)
cb->callback(cb->context);
free(cb);
}
- return true;
+ return true;
}
diff --git a/frontends/gtk/search.c b/frontends/gtk/search.c
index 298309679..f9a509f6e 100644
--- a/frontends/gtk/search.c
+++ b/frontends/gtk/search.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2009 Mark Benjamin <netsurf-browser.org.MarkBenjamin@dfgh.net>
+ * Copyright 2019 Vincent Sanders <vince@netsurf-browser.org>
*
* This file is part of NetSurf, http://www.netsurf-browser.org/
*
@@ -17,228 +17,340 @@
*/
- /** \file
- * Free text search (front component)
+/**
+ * \file
+ * find in page gtk frontend implementation
+ *
+ * \todo this whole thing should be named find rather than search as
+ * that generally means web search and is confusing.
*/
-#include <stdint.h>
-#include <ctype.h>
-#include <string.h>
-#include <gdk/gdkkeysyms.h>
-
-#include "utils/config.h"
-#include "utils/log.h"
-#include "utils/messages.h"
-#include "utils/nsurl.h"
+
+#include <stdlib.h>
+#include <stdbool.h>
+#include <gtk/gtk.h>
+
+#include "utils/nsoption.h"
#include "netsurf/search.h"
-#include "netsurf/browser_window.h"
#include "desktop/search.h"
-#include "desktop/searchweb.h"
-#include "gtk/warn.h"
#include "gtk/compat.h"
-#include "gtk/search.h"
-#include "gtk/scaffolding.h"
+#include "gtk/toolbar_items.h"
#include "gtk/window.h"
+#include "gtk/search.h"
+
+
+struct gtk_search {
+ GtkToolbar *bar;
+ GtkEntry *entry;
+ GtkToolButton *back;
+ GtkToolButton *forward;
+ GtkToolButton *close;
+ GtkCheckButton *checkAll;
+ GtkCheckButton *caseSens;
+
+ struct browser_window *bw;
+};
/**
* activate search forwards button in gui.
*
* \param active activate/inactivate
- * \param gw The gui window in which to activite the search button in.
+ * \param search the gtk search context
*/
-static void nsgtk_search_set_forward_state(bool active, struct gui_window *gw)
+static void nsgtk_search_set_forward_state(bool active, struct gtk_search *search)
{
- if (gw != NULL && nsgtk_get_browser_window(gw) != NULL) {
- struct nsgtk_scaffolding *g = nsgtk_get_scaffold(gw);
- gtk_widget_set_sensitive(
- GTK_WIDGET(nsgtk_scaffolding_search(g)->buttons[1]),
- active);
- }
+ gtk_widget_set_sensitive(GTK_WIDGET(search->forward), active);
}
+
/**
* activate search back button in gui.
*
* \param active activate/inactivate
- * \param gw The gui window in which to activite the search button in.
+ * \param search the gtk search context
*/
-static void nsgtk_search_set_back_state(bool active, struct gui_window *gw)
+static void nsgtk_search_set_back_state(bool active, struct gtk_search *search)
{
- if (gw != NULL && nsgtk_get_browser_window(gw) != NULL) {
- struct nsgtk_scaffolding *g = nsgtk_get_scaffold(gw);
- gtk_widget_set_sensitive(GTK_WIDGET(nsgtk_scaffolding_search(
- g)->buttons[0]), active);
- }
+ gtk_widget_set_sensitive(GTK_WIDGET(search->back), active);
}
-/** connected to the search forward button */
-gboolean nsgtk_search_forward_button_clicked(GtkWidget *widget, gpointer data)
+/**
+ * connected to the search forward button
+ */
+static gboolean
+nsgtk_search_forward_button_clicked(GtkWidget *widget, gpointer data)
{
- struct nsgtk_scaffolding *g = (struct nsgtk_scaffolding *)data;
- struct gui_window *gw = nsgtk_scaffolding_top_level(g);
- struct browser_window *bw = nsgtk_get_browser_window(gw);
-
- assert(bw);
-
- search_flags_t flags = SEARCH_FLAG_FORWARDS |
- (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(
- nsgtk_scaffolding_search(g)->caseSens)) ?
- SEARCH_FLAG_CASE_SENSITIVE : 0) |
- (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(
- nsgtk_scaffolding_search(g)->checkAll)) ?
- SEARCH_FLAG_SHOWALL : 0);
-
- browser_window_search(bw, gw, flags,
- gtk_entry_get_text(nsgtk_scaffolding_search(g)->entry));
+ struct gtk_search *search;
+ search_flags_t flags;
+
+ search = (struct gtk_search *)data;
+
+ flags = SEARCH_FLAG_FORWARDS;
+
+ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(search->caseSens))) {
+ flags |= SEARCH_FLAG_CASE_SENSITIVE;
+ }
+
+ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(search->checkAll))) {
+ flags |= SEARCH_FLAG_SHOWALL;
+ }
+
+ browser_window_search(search->bw, search, flags,
+ gtk_entry_get_text(search->entry));
+
return TRUE;
}
-/** connected to the search back button */
-
-gboolean nsgtk_search_back_button_clicked(GtkWidget *widget, gpointer data)
+/**
+ * connected to the search back button
+ */
+static gboolean
+nsgtk_search_back_button_clicked(GtkWidget *widget, gpointer data)
{
- struct nsgtk_scaffolding *g = (struct nsgtk_scaffolding *)data;
- struct gui_window *gw = nsgtk_scaffolding_top_level(g);
- struct browser_window *bw = nsgtk_get_browser_window(gw);
-
- assert(bw);
-
- search_flags_t flags = 0 |(gtk_toggle_button_get_active(
- GTK_TOGGLE_BUTTON(
- nsgtk_scaffolding_search(g)->caseSens)) ?
- SEARCH_FLAG_CASE_SENSITIVE : 0) |
- (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(
- nsgtk_scaffolding_search(g)->checkAll)) ?
- SEARCH_FLAG_SHOWALL : 0);
-
- browser_window_search(bw, gw, flags,
- gtk_entry_get_text(nsgtk_scaffolding_search(g)->entry));
+ struct gtk_search *search;
+ search_flags_t flags;
+
+ search = (struct gtk_search *)data;
+
+ flags = 0;
+
+ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(search->caseSens))) {
+ flags |= SEARCH_FLAG_CASE_SENSITIVE;
+ }
+
+ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(search->checkAll))) {
+ flags |= SEARCH_FLAG_SHOWALL;
+ }
+
+ browser_window_search(search->bw, search, flags,
+ gtk_entry_get_text(search->entry));
+
return TRUE;
}
-/** connected to the search close button */
-
-gboolean nsgtk_search_close_button_clicked(GtkWidget *widget, gpointer data)
+/**
+ * connected to the search close button
+ */
+static gboolean
+nsgtk_search_close_button_clicked(GtkWidget *widget, gpointer data)
{
- struct nsgtk_scaffolding *g = (struct nsgtk_scaffolding *)data;
- nsgtk_scaffolding_toggle_search_bar_visibility(g);
- return TRUE;
+ struct gtk_search *search;
+
+ search = (struct gtk_search *)data;
+
+ nsgtk_search_toggle_visibility(search);
+
+ return TRUE;
}
-/** connected to the search entry [typing] */
-gboolean nsgtk_search_entry_changed(GtkWidget *widget, gpointer data)
+/**
+ * connected to the search entry [typing]
+ */
+static gboolean nsgtk_search_entry_changed(GtkWidget *widget, gpointer data)
{
- struct nsgtk_scaffolding *g = (struct nsgtk_scaffolding *)data;
- struct gui_window *gw = nsgtk_scaffolding_top_level(g);
- struct browser_window *bw = nsgtk_get_browser_window(gw);
+ struct gtk_search *search;
search_flags_t flags;
- assert(bw != NULL);
+ search = (struct gtk_search *)data;
+
+ flags = 0;
- nsgtk_search_set_forward_state(true, gw);
- nsgtk_search_set_back_state(true, gw);
+ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(search->caseSens))) {
+ flags |= SEARCH_FLAG_CASE_SENSITIVE;
+ }
+
+ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(search->checkAll))) {
+ flags |= SEARCH_FLAG_SHOWALL;
+ }
- flags = SEARCH_FLAG_FORWARDS |
- (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(
- nsgtk_scaffolding_search(g)->caseSens)) ?
- SEARCH_FLAG_CASE_SENSITIVE : 0) |
- (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(
- nsgtk_scaffolding_search(g)->checkAll)) ?
- SEARCH_FLAG_SHOWALL : 0);
+ browser_window_search(search->bw, search, flags,
+ gtk_entry_get_text(search->entry));
- browser_window_search(bw, gw, flags,
- gtk_entry_get_text(nsgtk_scaffolding_search(g)->entry));
return TRUE;
}
-/** connected to the search entry [return key] */
-
-gboolean nsgtk_search_entry_activate(GtkWidget *widget, gpointer data)
+/**
+ * connected to the search entry [return key]
+ */
+static gboolean nsgtk_search_entry_activate(GtkWidget *widget, gpointer data)
{
- struct nsgtk_scaffolding *g = (struct nsgtk_scaffolding *)data;
- struct gui_window *gw = nsgtk_scaffolding_top_level(g);
- struct browser_window *bw = nsgtk_get_browser_window(gw);
+ struct gtk_search *search;
search_flags_t flags;
- assert(bw);
+ search = (struct gtk_search *)data;
- flags = SEARCH_FLAG_FORWARDS |
- (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(
- nsgtk_scaffolding_search(g)->caseSens)) ?
- SEARCH_FLAG_CASE_SENSITIVE : 0) |
- (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(
- nsgtk_scaffolding_search(g)->checkAll)) ?
- SEARCH_FLAG_SHOWALL : 0);
+ flags = SEARCH_FLAG_FORWARDS;
+
+ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(search->caseSens))) {
+ flags |= SEARCH_FLAG_CASE_SENSITIVE;
+ }
+
+ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(search->checkAll))) {
+ flags |= SEARCH_FLAG_SHOWALL;
+ }
+
+ browser_window_search(search->bw, search, flags,
+ gtk_entry_get_text(search->entry));
- browser_window_search(bw, gw, flags,
- gtk_entry_get_text(nsgtk_scaffolding_search(g)->entry));
return FALSE;
}
-/** allows escape key to close search bar too */
-
-gboolean
+/**
+ * allows escape key to close search bar too
+ */
+static gboolean
nsgtk_search_entry_key(GtkWidget *widget, GdkEventKey *event, gpointer data)
{
if (event->keyval == GDK_KEY(Escape)) {
- struct nsgtk_scaffolding *g = (struct nsgtk_scaffolding *)data;
- nsgtk_scaffolding_toggle_search_bar_visibility(g);
+ struct gtk_search *search;
+ search = (struct gtk_search *)data;
+
+ nsgtk_search_toggle_visibility(search);
}
return FALSE;
}
-/** connected to the websearch entry [return key] */
-gboolean nsgtk_websearch_activate(GtkWidget *widget, gpointer data)
+static struct gui_search_table search_table = {
+ .forward_state = (void *)nsgtk_search_set_forward_state,
+ .back_state = (void *)nsgtk_search_set_back_state,
+};
+
+struct gui_search_table *nsgtk_search_table = &search_table;
+
+
+/* exported interface documented in gtk/scaffolding.h */
+nserror nsgtk_search_toggle_visibility(struct gtk_search *search)
{
- struct nsgtk_scaffolding *g = data;
- nserror ret;
- nsurl *url;
-
- ret = search_web_omni(
- gtk_entry_get_text(GTK_ENTRY(nsgtk_scaffolding_websearch(g))),
- SEARCH_WEB_OMNI_SEARCHONLY,
- &url);
- if (ret == NSERROR_OK) {
- temp_open_background = 0;
- ret = browser_window_create(
- BW_CREATE_HISTORY | BW_CREATE_TAB,
- url,
- NULL,
- nsgtk_get_browser_window(nsgtk_scaffolding_top_level(g)),
- NULL);
- temp_open_background = -1;
- nsurl_unref(url);
- }
- if (ret != NSERROR_OK) {
- nsgtk_warning(messages_get_errorcode(ret), 0);
+ gboolean vis;
+
+ browser_window_search_clear(search->bw);
+
+ g_object_get(G_OBJECT(search->bar), "visible", &vis, NULL);
+ if (vis) {
+ gtk_widget_hide(GTK_WIDGET(search->bar));
+ } else {
+ gtk_widget_show(GTK_WIDGET(search->bar));
+ gtk_widget_grab_focus(GTK_WIDGET(search->entry));
+ nsgtk_search_entry_changed(GTK_WIDGET(search->entry), search);
}
- return TRUE;
+ return NSERROR_OK;
}
-/**
- * allows a click in the websearch entry field to clear the name of the
- * provider
- */
-gboolean nsgtk_websearch_clear(GtkWidget *widget, GdkEventFocus *f,
- gpointer data)
+/* exported interface documented in gtk/search.h */
+nserror nsgtk_search_restyle(struct gtk_search *search)
{
- struct nsgtk_scaffolding *g = (struct nsgtk_scaffolding *)data;
- gtk_editable_select_region(GTK_EDITABLE(
- nsgtk_scaffolding_websearch(g)), 0, -1);
- gtk_widget_grab_focus(GTK_WIDGET(nsgtk_scaffolding_websearch(g)));
- return TRUE;
+ switch (nsoption_int(button_type)) {
+
+ case 1: /* Small icons */
+ gtk_toolbar_set_style(GTK_TOOLBAR(search->bar),
+ GTK_TOOLBAR_ICONS);
+ gtk_toolbar_set_icon_size(GTK_TOOLBAR(search->bar),
+ GTK_ICON_SIZE_SMALL_TOOLBAR);
+ break;
+
+ case 2: /* Large icons */
+ gtk_toolbar_set_style(GTK_TOOLBAR(search->bar),
+ GTK_TOOLBAR_ICONS);
+ gtk_toolbar_set_icon_size(GTK_TOOLBAR(search->bar),
+ GTK_ICON_SIZE_LARGE_TOOLBAR);
+ break;
+
+ case 3: /* Large icons with text */
+ gtk_toolbar_set_style(GTK_TOOLBAR(search->bar),
+ GTK_TOOLBAR_BOTH);
+ gtk_toolbar_set_icon_size(GTK_TOOLBAR(search->bar),
+ GTK_ICON_SIZE_LARGE_TOOLBAR);
+ break;
+
+ case 4: /* Text icons only */
+ gtk_toolbar_set_style(GTK_TOOLBAR(search->bar),
+ GTK_TOOLBAR_TEXT);
+ break;
+
+ default:
+ break;
+ }
+ return NSERROR_OK;
}
+/* exported interface documented in gtk/search.h */
+nserror
+nsgtk_search_create(GtkBuilder *builder,
+ struct browser_window *bw,
+ struct gtk_search **search_out)
+{
+ struct gtk_search *search;
-static struct gui_search_table search_table = {
- .forward_state = (void *)nsgtk_search_set_forward_state,
- .back_state = (void *)nsgtk_search_set_back_state,
-};
+ search = malloc(sizeof(struct gtk_search));
+ if (search == NULL) {
+ return NSERROR_NOMEM;
+ }
-struct gui_search_table *nsgtk_search_table = &search_table;
+ search->bw = bw;
+
+ search->bar = GTK_TOOLBAR(gtk_builder_get_object(builder, "findbar"));
+ search->entry = GTK_ENTRY(gtk_builder_get_object(builder, "Find"));
+ search->back = GTK_TOOL_BUTTON(gtk_builder_get_object(builder,
+ "FindBack"));
+ search->forward = GTK_TOOL_BUTTON(gtk_builder_get_object(builder,
+ "FindForward"));
+ search->close = GTK_TOOL_BUTTON(gtk_builder_get_object(builder,
+ "FindClose"));
+ search->checkAll = GTK_CHECK_BUTTON(gtk_builder_get_object(builder,
+ "FindHighlightAll"));
+ search->caseSens = GTK_CHECK_BUTTON(gtk_builder_get_object(builder,
+ "FindMatchCase"));
+
+ g_signal_connect(search->forward,
+ "clicked",
+ G_CALLBACK(nsgtk_search_forward_button_clicked),
+ search);
+
+ g_signal_connect(search->back,
+ "clicked",
+ G_CALLBACK(nsgtk_search_back_button_clicked),
+ search);
+
+ g_signal_connect(search->entry,
+ "changed",
+ G_CALLBACK(nsgtk_search_entry_changed),
+ search);
+
+ g_signal_connect(search->entry,
+ "activate",
+ G_CALLBACK(nsgtk_search_entry_activate),
+ search);
+
+ g_signal_connect(search->entry,
+ "key-press-event",
+ G_CALLBACK(nsgtk_search_entry_key),
+ search);
+
+ g_signal_connect(search->close,
+ "clicked",
+ G_CALLBACK(nsgtk_search_close_button_clicked),
+ search);
+
+ g_signal_connect(search->caseSens,
+ "toggled",
+ G_CALLBACK(nsgtk_search_entry_changed),
+ search);
+
+ g_signal_connect(search->checkAll,
+ "toggled",
+ G_CALLBACK(nsgtk_search_entry_changed),
+ search);
+
+ nsgtk_search_restyle(search);
+
+
+ *search_out = search;
+
+ return NSERROR_OK;
+}
diff --git a/frontends/gtk/search.h b/frontends/gtk/search.h
index dd8c60d0f..5eb0b35cc 100644
--- a/frontends/gtk/search.h
+++ b/frontends/gtk/search.h
@@ -16,21 +16,36 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef _NETSURF_GTK_SEARCH_H_
-#define _NETSURF_GTK_SEARCH_H_
-
-struct gui_search_table *nsgtk_search_table;
-
-struct nsgtk_scaffolding;
-
-void nsgtk_search_bar_toggle_visibility(struct nsgtk_scaffolding * g);
-gboolean nsgtk_search_entry_changed(GtkWidget *widget, gpointer data);
-gboolean nsgtk_search_entry_activate(GtkWidget *widget, gpointer data);
-gboolean nsgtk_search_entry_key(GtkWidget *widget, GdkEventKey *event, gpointer data);
-gboolean nsgtk_search_forward_button_clicked(GtkWidget *widget, gpointer data);
-gboolean nsgtk_search_back_button_clicked(GtkWidget *widget, gpointer data);
-gboolean nsgtk_search_close_button_clicked(GtkWidget *widget, gpointer data);
-gboolean nsgtk_websearch_activate(GtkWidget *widget, gpointer data);
-gboolean nsgtk_websearch_clear(GtkWidget *widget, GdkEventFocus *f, gpointer data);
-
+/**
+ * \file
+ * free text page search for gtk interface
+ */
+
+#ifndef NETSURF_GTK_SEARCH_H_
+#define NETSURF_GTK_SEARCH_H_
+
+extern struct gui_search_table *nsgtk_search_table;
+
+struct gtk_search;
+
+/**
+ * create text search context
+ *
+ * \param builder the gtk builder containing the search toolbar
+ * \param bw The browsing context to run the find operations against
+ * \param search search context result
+ * \return NSERROR_OK and search_out updated
+ */
+nserror nsgtk_search_create(GtkBuilder *builder, struct browser_window *bw, struct gtk_search **search);
+
+/**
+ * update search toolbar size and style
+ */
+nserror nsgtk_search_restyle(struct gtk_search *search);
+
+/**
+ * toggle search bar visibility
+ */
+nserror nsgtk_search_toggle_visibility(struct gtk_search *search);
+
#endif
diff --git a/frontends/gtk/selection.c b/frontends/gtk/selection.c
index 228d65dbe..871526047 100644
--- a/frontends/gtk/selection.c
+++ b/frontends/gtk/selection.c
@@ -24,6 +24,7 @@
#include "netsurf/browser_window.h"
#include "netsurf/clipboard.h"
+#include "gtk/toolbar_items.h"
#include "gtk/window.h"
static GString *current_selection = NULL;
diff --git a/frontends/gtk/selection.h b/frontends/gtk/selection.h
index 6463692cf..07716a0d9 100644
--- a/frontends/gtk/selection.h
+++ b/frontends/gtk/selection.h
@@ -19,6 +19,6 @@
#ifndef GTK_SELECTION_H
#define GTK_SELECTION_H
-struct gui_clipboard_table *nsgtk_clipboard_table;
+extern struct gui_clipboard_table *nsgtk_clipboard_table;
#endif
diff --git a/frontends/gtk/ssl_cert.c b/frontends/gtk/ssl_cert.c
deleted file mode 100644
index 9d98db1f6..000000000
--- a/frontends/gtk/ssl_cert.c
+++ /dev/null
@@ -1,259 +0,0 @@
-/*
- * Copyright 2015 Vincent Sanders <vince@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 gtk certificate viewing using gtk core windows.
- */
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <gtk/gtk.h>
-
-#include "utils/log.h"
-#include "netsurf/keypress.h"
-#include "netsurf/plotters.h"
-#include "desktop/sslcert_viewer.h"
-
-#include "gtk/plotters.h"
-#include "gtk/scaffolding.h"
-#include "gtk/resources.h"
-#include "gtk/ssl_cert.h"
-#include "gtk/corewindow.h"
-
-
-/**
- * GTK certificate viewing window context
- */
-struct nsgtk_crtvrfy_window {
- /** GTK core window context */
- struct nsgtk_corewindow core;
- /** GTK builder for window */
- GtkBuilder *builder;
- /** GTK dialog window being shown */
- GtkDialog *dlg;
- /** SSL certificate viewer context data */
- struct sslcert_session_data *ssl_data;
-};
-
-/**
- * destroy a previously created certificate view
- */
-static nserror nsgtk_crtvrfy_destroy(struct nsgtk_crtvrfy_window *crtvrfy_win)
-{
- nserror res;
-
- res = sslcert_viewer_fini(crtvrfy_win->ssl_data);
- if (res == NSERROR_OK) {
- res = nsgtk_corewindow_fini(&crtvrfy_win->core);
- gtk_widget_destroy(GTK_WIDGET(crtvrfy_win->dlg));
- g_object_unref(G_OBJECT(crtvrfy_win->builder));
- free(crtvrfy_win);
- }
- return res;
-}
-
-static void
-nsgtk_crtvrfy_accept(GtkButton *w, gpointer data)
-{
- struct nsgtk_crtvrfy_window *crtvrfy_win;
- crtvrfy_win = (struct nsgtk_crtvrfy_window *)data;
-
- sslcert_viewer_accept(crtvrfy_win->ssl_data);
-
- nsgtk_crtvrfy_destroy(crtvrfy_win);
-}
-
-static void
-nsgtk_crtvrfy_reject(GtkWidget *w, gpointer data)
-{
- struct nsgtk_crtvrfy_window *crtvrfy_win;
- crtvrfy_win = (struct nsgtk_crtvrfy_window *)data;
-
- sslcert_viewer_reject(crtvrfy_win->ssl_data);
-
- nsgtk_crtvrfy_destroy(crtvrfy_win);
-}
-
-static gboolean
-nsgtk_crtvrfy_delete_event(GtkWidget *w, GdkEvent *event, gpointer data)
-{
- nsgtk_crtvrfy_reject(w, data);
- return FALSE;
-}
-
-/**
- * callback for mouse action for certificate verify on core window
- *
- * \param nsgtk_cw The nsgtk 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 appropriate error code
- */
-static nserror
-nsgtk_crtvrfy_mouse(struct nsgtk_corewindow *nsgtk_cw,
- browser_mouse_state mouse_state,
- int x, int y)
-{
- struct nsgtk_crtvrfy_window *crtvrfy_win;
- /* technically degenerate container of */
- crtvrfy_win = (struct nsgtk_crtvrfy_window *)nsgtk_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 nsgtk_cw The nsgtk core window structure.
- * \param nskey The netsurf key code
- * \return NSERROR_OK on success otherwise appropriate error code
- */
-static nserror
-nsgtk_crtvrfy_key(struct nsgtk_corewindow *nsgtk_cw, uint32_t nskey)
-{
- struct nsgtk_crtvrfy_window *crtvrfy_win;
-
- /* technically degenerate container of */
- crtvrfy_win = (struct nsgtk_crtvrfy_window *)nsgtk_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 nsgtk_cw The nsgtk core window structure.
- * \param r The rectangle of the window that needs updating.
- * \return NSERROR_OK on success otherwise appropriate error code
- */
-static nserror
-nsgtk_crtvrfy_draw(struct nsgtk_corewindow *nsgtk_cw, struct rect *r)
-{
- struct redraw_context ctx = {
- .interactive = true,
- .background_images = true,
- .plot = &nsgtk_plotters
- };
- struct nsgtk_crtvrfy_window *crtvrfy_win;
-
- /* technically degenerate container of */
- crtvrfy_win = (struct nsgtk_crtvrfy_window *)nsgtk_cw;
-
- sslcert_viewer_redraw(crtvrfy_win->ssl_data, 0, 0, r, &ctx);
-
- return NSERROR_OK;
-}
-
-/* exported interface documented in gtk/ssl_cert.h */
-nserror gtk_cert_verify(struct nsurl *url,
- const struct ssl_cert_info *certs,
- unsigned long num,
- nserror (*cb)(bool proceed, void *pw),
- void *cbpw)
-{
- struct nsgtk_crtvrfy_window *ncwin;
- nserror res;
-
- ncwin = malloc(sizeof(struct nsgtk_crtvrfy_window));
- if (ncwin == NULL) {
- return NSERROR_NOMEM;
- }
-
- res = nsgtk_builder_new_from_resname("ssl", &ncwin->builder);
- if (res != NSERROR_OK) {
- NSLOG(netsurf, INFO, "SSL UI builder init failed");
- free(ncwin);
- return res;
- }
-
- gtk_builder_connect_signals(ncwin->builder, NULL);
-
- ncwin->dlg = GTK_DIALOG(gtk_builder_get_object(ncwin->builder,
- "wndSSLProblem"));
-
- /* set parent for transient dialog */
- gtk_window_set_transient_for(GTK_WINDOW(ncwin->dlg),
- nsgtk_scaffolding_window(nsgtk_current_scaffolding()));
-
- ncwin->core.scrolled = GTK_SCROLLED_WINDOW(
- gtk_builder_get_object(ncwin->builder, "SSLScrolled"));
-
- ncwin->core.drawing_area = GTK_DRAWING_AREA(
- gtk_builder_get_object(ncwin->builder, "SSLDrawingArea"));
-
- /* make the delete event call our destructor */
- g_signal_connect(G_OBJECT(ncwin->dlg),
- "delete_event",
- G_CALLBACK(nsgtk_crtvrfy_delete_event),
- ncwin);
-
- /* accept button */
- g_signal_connect(G_OBJECT(gtk_builder_get_object(ncwin->builder,
- "sslaccept")),
- "clicked",
- G_CALLBACK(nsgtk_crtvrfy_accept),
- ncwin);
-
- /* reject button */
- g_signal_connect(G_OBJECT(gtk_builder_get_object(ncwin->builder,
- "sslreject")),
- "clicked",
- G_CALLBACK(nsgtk_crtvrfy_reject),
- ncwin);
-
- /* initialise GTK core window */
- ncwin->core.draw = nsgtk_crtvrfy_draw;
- ncwin->core.key = nsgtk_crtvrfy_key;
- ncwin->core.mouse = nsgtk_crtvrfy_mouse;
-
- res = nsgtk_corewindow_init(&ncwin->core);
- if (res != NSERROR_OK) {
- g_object_unref(G_OBJECT(ncwin->dlg));
- 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) {
- g_object_unref(G_OBJECT(ncwin->dlg));
- free(ncwin);
- return res;
- }
-
- res = sslcert_viewer_init(ncwin->core.cb_table,
- (struct core_window *)ncwin,
- ncwin->ssl_data);
- if (res != NSERROR_OK) {
- g_object_unref(G_OBJECT(ncwin->dlg));
- free(ncwin);
- return res;
- }
-
- gtk_widget_show(GTK_WIDGET(ncwin->dlg));
-
- return NSERROR_OK;
-}
diff --git a/frontends/gtk/tabs.c b/frontends/gtk/tabs.c
index dbe9d405b..4fa109b70 100644
--- a/frontends/gtk/tabs.c
+++ b/frontends/gtk/tabs.c
@@ -20,11 +20,12 @@
#include <string.h>
#include "utils/nsoption.h"
-#include "utils/messages.h"
+#include "utils/log.h"
#include "netsurf/browser_window.h"
#include "desktop/search.h"
#include "gtk/compat.h"
+#include "gtk/toolbar_items.h"
#include "gtk/scaffolding.h"
#include "gtk/window.h"
#include "gtk/search.h"
@@ -32,9 +33,15 @@
#define TAB_WIDTH_N_CHARS 15
-/** callback to update sizes when style-set gtk signal */
-static void nsgtk_tab_update_size(GtkWidget *hbox, GtkStyle *previous_style,
- GtkWidget *close_button)
+static gint srcpagenum;
+
+/**
+ * callback to update sizes when style-set gtk signal
+ */
+static void
+nsgtk_tab_update_size(GtkWidget *hbox,
+ GtkStyle *previous_style,
+ GtkWidget *close_button)
{
PangoFontMetrics *metrics;
PangoContext *context;
@@ -63,63 +70,114 @@ static void nsgtk_tab_update_size(GtkWidget *hbox, GtkStyle *previous_style,
gtk_widget_set_size_request(close_button, w + 4, h + 4);
}
-/** Create a notebook tab label */
-static GtkWidget *nsgtk_tab_label_setup(struct gui_window *window)
+
+/**
+ * gtk event handler for button release on tab hbox
+ */
+static gboolean
+nsgtk_tab_button_release(GtkWidget *widget,
+ GdkEventButton *event,
+ gpointer user_data)
+{
+ GtkWidget *page;
+
+ if ((event->type == GDK_BUTTON_RELEASE) && (event->button == 2)) {
+ page = (GtkWidget *)user_data;
+ gtk_widget_destroy(page);
+ return TRUE;
+ }
+ return FALSE;
+}
+
+
+/**
+ * Create a notebook tab label
+ *
+ * \param page The page content widget
+ * \param title The title of the page
+ * \param icon_pixbuf The icon of the page
+ */
+static GtkWidget *
+nsgtk_tab_label_setup(GtkWidget *page,
+ const char *title,
+ GdkPixbuf *icon_pixbuf)
{
- GtkWidget *hbox, *label, *button, *close;
+ GtkWidget *ebox, *hbox, *favicon, *label, *button, *close;
+
+ /* horizontal box */
+ hbox = nsgtk_hbox_new(FALSE, 3);
- hbox = nsgtk_hbox_new(FALSE, 2);
+ /* event box */
+ ebox = gtk_event_box_new();
+ gtk_widget_set_events(ebox, GDK_BUTTON_PRESS_MASK);
+ gtk_container_add(GTK_CONTAINER(ebox), hbox);
- label = gtk_label_new(messages_get("NewTab"));
+ /* construct a favicon */
+ favicon = gtk_image_new();
+ if (icon_pixbuf != NULL) {
+ gtk_image_set_from_pixbuf(GTK_IMAGE(favicon), icon_pixbuf);
+ }
+
+ /* construct a label */
+ label = gtk_label_new(title);
gtk_label_set_ellipsize(GTK_LABEL(label), PANGO_ELLIPSIZE_END);
gtk_label_set_single_line_mode(GTK_LABEL(label), TRUE);
nsgtk_widget_set_alignment(label, GTK_ALIGN_START, GTK_ALIGN_CENTER);
nsgtk_widget_set_margins(label, 0, 0);
gtk_widget_show(label);
+ /* construct a close button */
button = gtk_button_new();
close = nsgtk_image_new_from_stock(NSGTK_STOCK_CLOSE,
- GTK_ICON_SIZE_MENU);
+ GTK_ICON_SIZE_LARGE_TOOLBAR);
gtk_container_add(GTK_CONTAINER(button), close);
- gtk_button_set_focus_on_click(GTK_BUTTON(button), FALSE);
+ nsgtk_button_set_focus_on_click(GTK_BUTTON(button), FALSE);
gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE);
gtk_widget_set_tooltip_text(button, "Close this tab.");
-#ifdef FIXME
- GtkRcStyle *rcstyle;
- rcstyle = gtk_rc_style_new();
- rcstyle->xthickness = rcstyle->ythickness = 0;
- gtk_widget_modify_style(button, rcstyle);
- g_object_unref(rcstyle);
-#endif
-
- g_signal_connect_swapped(button, "clicked",
- G_CALLBACK(nsgtk_window_destroy_browser), window);
- g_signal_connect(hbox, "style-set",
- G_CALLBACK(nsgtk_tab_update_size), button);
-
+ /* pack the widgets into the label box */
+ gtk_box_pack_start(GTK_BOX(hbox), favicon, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(hbox), label, TRUE, TRUE, 0);
gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0);
- g_object_set_data(G_OBJECT(hbox), "label", label);
- g_object_set_data(G_OBJECT(hbox), "close-button", button);
+ /* make the icon and label widgets findable by name */
+ g_object_set_data(G_OBJECT(ebox), "favicon", favicon);
+ g_object_set_data(G_OBJECT(ebox), "label", label);
+ /* attach signal handlers */
+ g_signal_connect_swapped(button,
+ "clicked",
+ G_CALLBACK(gtk_widget_destroy), page);
- gtk_widget_show_all(hbox);
- return hbox;
-}
-#include "utils/log.h"
+ g_signal_connect(hbox,
+ "style-set",
+ G_CALLBACK(nsgtk_tab_update_size),
+ button);
-/** callback when page is switched */
+ g_signal_connect(ebox,
+ "button-release-event",
+ G_CALLBACK(nsgtk_tab_button_release),
+ page);
-static gint srcpagenum;
-/** The switch-page signal handler
+ gtk_widget_show_all(ebox);
+
+ return ebox;
+}
+
+
+/**
+ * The before switch-page gtk signal handler
*
* This signal is handled both before and after delivery to work round
* issue that setting the selected tab during the switch-page signal
* fails
+ *
+ * \param notebook The notebook being changed
+ * \param page The notebook page being switched to
+ * \param selpagenum The currently selected page number
+ * \param user_data Unused
*/
static void
nsgtk_tab_switch_page(GtkNotebook *notebook,
@@ -130,6 +188,15 @@ nsgtk_tab_switch_page(GtkNotebook *notebook,
srcpagenum = gtk_notebook_get_current_page(notebook);
}
+
+/**
+ * The after switch-page gtk signal handler
+ *
+ * \param notebook The notebook being changed
+ * \param selpage The notebook page selected
+ * \param selpagenum The currently selected page number
+ * \param user_data Unused
+ */
static void
nsgtk_tab_switch_page_after(GtkNotebook *notebook,
GtkWidget *selpage,
@@ -138,41 +205,62 @@ nsgtk_tab_switch_page_after(GtkNotebook *notebook,
{
GtkWidget *srcpage;
GtkWidget *addpage;
- struct gui_window *gw;
- nserror error;
+ GtkMenuBar *menubar;
+ struct gui_window *gw = NULL;
+ nserror res = NSERROR_INVALID;
addpage = g_object_get_data(G_OBJECT(notebook), "addtab");
- if (selpage == addpage) {
- if ((srcpagenum != -1) &&
- (srcpagenum != (gint)selpagenum)) {
- /* ensure the add tab is not actually selected */
- NSLOG(netsurf, INFO, "src %d sel %d", srcpagenum,
- selpagenum);
- srcpage = gtk_notebook_get_nth_page(notebook, srcpagenum);
- gw = g_object_get_data(G_OBJECT(srcpage), "gui_window");
- if ((gw != NULL) && (nsgtk_get_scaffold(gw) != NULL)) {
- error = nsgtk_scaffolding_new_tab(gw);
- if (error != NSERROR_OK) {
- NSLOG(netsurf, INFO,
- "Failed to open new tab.");
- }
- }
- }
- } else {
+ /* check if trying to select the "add page" tab */
+ if (selpage != addpage) {
NSLOG(netsurf, INFO, "sel %d", selpagenum);
- /* tab with page in it */
+ menubar = nsgtk_scaffolding_menu_bar(nsgtk_scaffolding_from_notebook(notebook));
gw = g_object_get_data(G_OBJECT(selpage), "gui_window");
if (gw != NULL) {
+ /* tab with web page in it */
nsgtk_scaffolding_set_top_level(gw);
+ gtk_widget_show(GTK_WIDGET(addpage));
+ gtk_widget_set_sensitive(GTK_WIDGET(menubar), true);
+ } else {
+ /* tab with non browser content (e.g. tb customize) */
+ gtk_widget_hide(GTK_WIDGET(addpage));
+ gtk_widget_set_sensitive(GTK_WIDGET(menubar), false);
}
+ return;
+ }
+
+ NSLOG(netsurf, INFO, "src %d sel %d", srcpagenum, selpagenum);
+
+ /* ensure the add tab is not already selected */
+ if ((srcpagenum == -1) || (srcpagenum == (gint)selpagenum)) {
+ return;
+ }
+
+ srcpage = gtk_notebook_get_nth_page(notebook, srcpagenum);
+
+ gw = g_object_get_data(G_OBJECT(srcpage), "gui_window");
+
+ if (gw != NULL) {
+ res = nsgtk_window_item_activate(gw, NEWTAB_BUTTON);
+ }
+ if (res != NSERROR_OK) {
+ NSLOG(netsurf, INFO, "Failed to open new tab.");
}
}
-static void nsgtk_tab_page_reordered(GtkNotebook *notebook,
- GtkWidget *child,
- guint page_num,
- gpointer user_data)
+
+/**
+ * The tab reordered gtk signal handler
+ *
+ * \param notebook The notebook being changed
+ * \param page_num The currently selected page number
+ * \param user_data Unused
+ */
+static void
+nsgtk_tab_page_reordered(GtkNotebook *notebook,
+ GtkWidget *child,
+ guint page_num,
+ gpointer user_data)
{
gint pages;
GtkWidget *addpage;
@@ -187,6 +275,13 @@ static void nsgtk_tab_page_reordered(GtkNotebook *notebook,
}
}
+/**
+ * The tab orientation signal handler
+ *
+ * \param notebook The notebook being changed
+ * \param page_num The currently selected page number
+ * \param user_data Unused
+ */
static void
nsgtk_tab_orientation(GtkNotebook *notebook)
{
@@ -210,7 +305,9 @@ nsgtk_tab_orientation(GtkNotebook *notebook)
}
}
-/** adds a "new tab" tab */
+/**
+ * adds a "new tab" tab
+ */
static GtkWidget *
nsgtk_tab_add_newtab(GtkNotebook *notebook)
{
@@ -221,7 +318,9 @@ nsgtk_tab_add_newtab(GtkNotebook *notebook)
tablabel = nsgtk_hbox_new(FALSE, 1);
tabcontents = nsgtk_hbox_new(FALSE, 1);
- add = nsgtk_image_new_from_stock(NSGTK_STOCK_ADD, GTK_ICON_SIZE_MENU);
+ add = gtk_image_new_from_icon_name(NSGTK_STOCK_ADD,
+ GTK_ICON_SIZE_LARGE_TOOLBAR);
+ gtk_widget_set_tooltip_text(add, "New Tab");
gtk_box_pack_start(GTK_BOX(tablabel), add, FALSE, FALSE, 0);
@@ -238,18 +337,26 @@ nsgtk_tab_add_newtab(GtkNotebook *notebook)
return tablabel;
}
-/** callback to alter tab visibility when pages are added or removed */
+
+/**
+ * callback to alter tab visibility when pages are added or removed
+ */
static void
nsgtk_tab_visibility_update(GtkNotebook *notebook, GtkWidget *child, guint page)
{
- gint pagec = gtk_notebook_get_n_pages(notebook);
- GtkWidget *addpage = g_object_get_data(G_OBJECT(notebook), "addtab");
-
- if (addpage != NULL) {
- pagec--; /* skip the add tab */
- if ((gint)page == pagec) {
- /* ensure the add new tab cannot be current */
- gtk_notebook_set_current_page(notebook, page - 1);
+ gint pagec;
+ GtkWidget *addpage;
+
+ pagec = gtk_notebook_get_n_pages(notebook);
+ if (pagec > 1) {
+ addpage = g_object_get_data(G_OBJECT(notebook), "addtab");
+ if (addpage != NULL) {
+ pagec--; /* skip the add tab */
+ if ((gint)page == pagec) {
+ /* ensure the add new tab cannot be current */
+ gtk_notebook_set_current_page(notebook,
+ page - 1);
+ }
}
}
@@ -260,6 +367,7 @@ nsgtk_tab_visibility_update(GtkNotebook *notebook, GtkWidget *child, guint page)
}
}
+
/* exported interface documented in gtk/tabs.h */
void nsgtk_tab_options_changed(GtkNotebook *notebook)
{
@@ -269,48 +377,56 @@ void nsgtk_tab_options_changed(GtkNotebook *notebook)
/* exported interface documented in gtk/tabs.h */
-void nsgtk_tab_init(struct nsgtk_scaffolding *gs)
+nserror nsgtk_notebook_create(GtkBuilder *builder, GtkNotebook **notebook_out)
{
GtkNotebook *notebook;
- notebook = nsgtk_scaffolding_notebook(gs);
+ notebook = GTK_NOTEBOOK(gtk_builder_get_object(builder, "notebook"));
nsgtk_tab_add_newtab(notebook);
- g_signal_connect(notebook, "switch-page",
- G_CALLBACK(nsgtk_tab_switch_page), NULL);
- g_signal_connect_after(notebook, "switch-page",
- G_CALLBACK(nsgtk_tab_switch_page_after), NULL);
+ g_signal_connect(notebook,
+ "switch-page",
+ G_CALLBACK(nsgtk_tab_switch_page),
+ NULL);
+ g_signal_connect_after(notebook,
+ "switch-page",
+ G_CALLBACK(nsgtk_tab_switch_page_after),
+ NULL);
+ g_signal_connect(notebook,
+ "page-removed",
+ G_CALLBACK(nsgtk_tab_visibility_update),
+ NULL);
+ g_signal_connect(notebook,
+ "page-added",
+ G_CALLBACK(nsgtk_tab_visibility_update),
+ NULL);
+ g_signal_connect(notebook,
+ "page-reordered",
+ G_CALLBACK(nsgtk_tab_page_reordered),
+ NULL);
- g_signal_connect(notebook, "page-removed",
- G_CALLBACK(nsgtk_tab_visibility_update), NULL);
- g_signal_connect(notebook, "page-added",
- G_CALLBACK(nsgtk_tab_visibility_update), NULL);
- g_signal_connect(notebook, "page-reordered",
- G_CALLBACK(nsgtk_tab_page_reordered), NULL);
+ nsgtk_tab_options_changed(notebook);
+ *notebook_out = notebook;
- nsgtk_tab_options_changed(notebook);
+ return NSERROR_OK;
}
/* exported interface documented in gtk/tabs.h */
-void nsgtk_tab_add(struct gui_window *gw,
+nserror
+nsgtk_tab_add_page(GtkNotebook *notebook,
GtkWidget *tab_contents,
- bool background)
+ bool background,
+ const char *title,
+ GdkPixbuf *icon_pixbuf)
{
- GtkNotebook *notebook;
GtkWidget *tabBox;
gint remember;
gint pages;
gint newpage;
- g_object_set_data(G_OBJECT(tab_contents), "gui_window", gw);
-
- notebook = nsgtk_scaffolding_notebook(nsgtk_get_scaffold(gw));
-
- tabBox = nsgtk_tab_label_setup(gw);
-
- nsgtk_window_set_tab(gw, tabBox);
+ tabBox = nsgtk_tab_label_setup(tab_contents, title, icon_pixbuf);
remember = gtk_notebook_get_current_page(notebook);
@@ -328,24 +444,83 @@ void nsgtk_tab_add(struct gui_window *gw,
gtk_notebook_set_current_page(notebook, newpage);
}
- gtk_widget_grab_focus(GTK_WIDGET(nsgtk_scaffolding_urlbar(
- nsgtk_get_scaffold(gw))));
+ return NSERROR_OK;
}
+
/* exported interface documented in gtk/tabs.h */
-void nsgtk_tab_set_title(struct gui_window *g, const char *title)
+void nsgtk_tab_add(struct gui_window *gw,
+ GtkWidget *tab_contents,
+ bool background,
+ const char *title,
+ GdkPixbuf *icon_pixbuf)
{
- GtkWidget *label;
- GtkWidget *tab;
+ GtkNotebook *notebook;
- tab = nsgtk_window_get_tab(g);
- if (tab == NULL) {
- return;
+ g_object_set_data(G_OBJECT(tab_contents), "gui_window", gw);
+
+ notebook = nsgtk_scaffolding_notebook(nsgtk_get_scaffold(gw));
+
+ nsgtk_tab_add_page(notebook, tab_contents, background, title, icon_pixbuf);
+
+}
+
+
+/* exported interface documented in gtk/tabs.h */
+nserror nsgtk_tab_set_icon(GtkWidget *page, GdkPixbuf *pixbuf)
+{
+ GtkImage *favicon;
+ GtkWidget *tab_label;
+ GtkNotebook *notebook;
+
+ if (pixbuf == NULL) {
+ return NSERROR_INVALID;
+ }
+ notebook = GTK_NOTEBOOK(gtk_widget_get_ancestor(page, GTK_TYPE_NOTEBOOK));
+ if (notebook == NULL) {
+ return NSERROR_BAD_PARAMETER;
+ }
+
+ tab_label = gtk_notebook_get_tab_label(notebook, page);
+ if (tab_label == NULL) {
+ return NSERROR_INVALID;
}
- label = g_object_get_data(G_OBJECT(tab), "label");
- gtk_label_set_text(GTK_LABEL(label), title);
- gtk_widget_set_tooltip_text(tab, title);
+ favicon = GTK_IMAGE(g_object_get_data(G_OBJECT(tab_label), "favicon"));
+
+ gtk_image_set_from_pixbuf(favicon, pixbuf);
+
+ return NSERROR_OK;
+}
+
+
+/* exported interface documented in gtk/tabs.h */
+nserror nsgtk_tab_set_title(GtkWidget *page, const char *title)
+{
+ GtkLabel *label;
+ GtkWidget *tab_label;
+ GtkNotebook *notebook;
+
+ if (title == NULL) {
+ return NSERROR_INVALID;
+ }
+
+ notebook = GTK_NOTEBOOK(gtk_widget_get_ancestor(page, GTK_TYPE_NOTEBOOK));
+ if (notebook == NULL) {
+ return NSERROR_BAD_PARAMETER;
+ }
+
+ tab_label = gtk_notebook_get_tab_label(notebook, page);
+ if (tab_label == NULL) {
+ return NSERROR_INVALID;
+ }
+
+ label = GTK_LABEL(g_object_get_data(G_OBJECT(tab_label), "label"));
+
+ gtk_label_set_text(label, title);
+ gtk_widget_set_tooltip_text(tab_label, title);
+
+ return NSERROR_OK;
}
/* exported interface documented in gtk/tabs.h */
diff --git a/frontends/gtk/tabs.h b/frontends/gtk/tabs.h
index 440d61336..63edae3cc 100644
--- a/frontends/gtk/tabs.h
+++ b/frontends/gtk/tabs.h
@@ -16,24 +16,58 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef _NETSURF_GTK_TABS_H_
-#define _NETSURF_GTK_TABS_H_
+#ifndef NETSURF_GTK_TABS_H_
+#define NETSURF_GTK_TABS_H_
struct gui_window;
-void nsgtk_tab_init(struct nsgtk_scaffolding *gs);
-void nsgtk_tab_add(struct gui_window *window, GtkWidget *tab_contents, bool background);
+/**
+ * create notebook
+ *
+ * creates a notebook for use inside a window, creates the special add
+ * page(tab) and attaches all signals.
+ *
+ * \param builder the gtk builder object to create notbook from
+ * \param notebook_out reciveds the created notebook
+ * \return NSERROR_OK and notebook_out updated else error code
+ */
+nserror nsgtk_notebook_create(GtkBuilder *builder, GtkNotebook **notebook_out);
+
+/**
+ * Add new gui window page to notebook.
+ */
+void nsgtk_tab_add(struct gui_window *window, GtkWidget *tab_contents, bool background, const char *title, GdkPixbuf *icon_pixbuf);
+
+/**
+ * Add new page to a notebook
+ */
+nserror nsgtk_tab_add_page(GtkNotebook *notebook, GtkWidget *tab_contents, bool background, const char *title, GdkPixbuf *icon_pixbuf);
-/** set the tab title
+
+/**
+ * set the tab title
*
* The tab title will be set to the parameter
*
* \note currently only called from nsgtk_window_set_title()
*
- * \param g the gui window to set tab title for.
+ * \param page The page widget that was added to the notebook
* \param title The title text which may not be NULL.
+ * \return NSERROR_OK on sucess else appropriate code.
+ */
+nserror nsgtk_tab_set_title(GtkWidget *page, const char *title);
+
+/**
+ * set the tab icon
+ *
+ * The tab icon will be set to the \a pixbuf parameter
+ *
+ * \param page The page widget that was added to the notebook
+ * \param pixbuf The pixbuf to set the icon to.
+ * \return NSERROR_OK on sucess else appropriate code.
*/
-void nsgtk_tab_set_title(struct gui_window *g, const char *title);
+nserror nsgtk_tab_set_icon(GtkWidget *page, GdkPixbuf *pixbuf);
+
void nsgtk_tab_options_changed(GtkNotebook *notebook);
nserror nsgtk_tab_close_current(GtkNotebook *notebook);
nserror nsgtk_tab_prev(GtkNotebook *notebook);
diff --git a/frontends/gtk/throbber.c b/frontends/gtk/throbber.c
index b8efceca1..f94893bef 100644
--- a/frontends/gtk/throbber.c
+++ b/frontends/gtk/throbber.c
@@ -28,7 +28,16 @@
#include "gtk/resources.h"
#include "gtk/throbber.h"
-struct nsgtk_throbber *nsgtk_throbber = NULL;
+/**
+ * Throbber images context
+ */
+struct nsgtk_throbber
+{
+ int nframes; /**< Number of frames in the throbber */
+ GdkPixbuf **framedata; /* pixbuf data for the frames */
+};
+
+static struct nsgtk_throbber *nsgtk_throbber = NULL;
#define THROBBER_FRAMES 9
#define THROBBER_FMT "throbber/throbber%d.png"
@@ -36,10 +45,10 @@ struct nsgtk_throbber *nsgtk_throbber = NULL;
/* exported interface documented in gtk/throbber.h */
nserror nsgtk_throbber_init(void)
{
- struct nsgtk_throbber *throb; /**< structure we generate */
+ nserror res = NSERROR_OK;
+ struct nsgtk_throbber *throb;
int frame;
char resname[] = THROBBER_FMT;
- nserror res = NSERROR_OK;
throb = malloc(sizeof(*throb));
if (throb == NULL) {
@@ -49,7 +58,7 @@ nserror nsgtk_throbber_init(void)
throb->framedata = malloc(sizeof(GdkPixbuf *) * THROBBER_FRAMES);
if (throb->framedata == NULL) {
free(throb);
- return false;
+ return NSERROR_NOMEM;
}
for (frame = 0; frame < THROBBER_FRAMES; frame++) {
@@ -73,11 +82,9 @@ nserror nsgtk_throbber_init(void)
throb->nframes = frame;
nsgtk_throbber = throb;
return res;
-
-
}
-
+/* exported interface documented in gtk/throbber.h */
void nsgtk_throbber_finalise(void)
{
int i;
@@ -91,3 +98,30 @@ void nsgtk_throbber_finalise(void)
nsgtk_throbber = NULL;
}
+
+/* exported interface documented in gtk/throbber.h */
+nserror nsgtk_throbber_get_frame(int frame, GdkPixbuf **pixbuf)
+{
+ nserror res = NSERROR_OK;
+
+ /* ensure initialisation */
+ if (nsgtk_throbber == NULL) {
+ res = nsgtk_throbber_init();
+ }
+ if (res != NSERROR_OK) {
+ return res;
+ }
+
+ /* ensure frame in range */
+ if ((frame < 0) || (frame >= nsgtk_throbber->nframes)) {
+ return NSERROR_BAD_SIZE;
+ }
+
+ /* ensure there is frame data */
+ if (nsgtk_throbber->framedata[frame] == NULL) {
+ return NSERROR_INVALID;
+ }
+
+ *pixbuf = nsgtk_throbber->framedata[frame];
+ return NSERROR_OK;
+}
diff --git a/frontends/gtk/throbber.h b/frontends/gtk/throbber.h
index e0b47e15c..c8529d2e2 100644
--- a/frontends/gtk/throbber.h
+++ b/frontends/gtk/throbber.h
@@ -16,20 +16,27 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __GTK_THROBBER_H__
-#define __GTK_THROBBER_H__
-
-#include <gtk/gtk.h>
-
-struct nsgtk_throbber
-{
- int nframes; /**< Number of frames in the throbber */
- GdkPixbuf **framedata;
-};
-
-extern struct nsgtk_throbber *nsgtk_throbber;
+#ifndef NETSURF_GTK_THROBBER_H
+#define NETSURF_GTK_THROBBER_H
+/**
+ * Initialise global throbber context
+ */
nserror nsgtk_throbber_init(void);
+
+/**
+ * release global throbber context
+ */
void nsgtk_throbber_finalise(void);
-#endif /* __GTK_THROBBER_H__ */
+/**
+ * get the pixbuf of a given frame of the throbber
+ *
+ * \param frame The frame number starting at 0 for stopped frame
+ * \param pixbuf updated on success
+ * \return NSERROR_OK and pixbuf updated on success, NSERROR_BAD_SIZE if frame
+ * is out of range else error code.
+ */
+nserror nsgtk_throbber_get_frame(int frame, GdkPixbuf **pixbuf);
+
+#endif /* NETSURF_GTK_THROBBER_H */
diff --git a/frontends/gtk/toolbar.c b/frontends/gtk/toolbar.c
index 0ca26c92d..6ec41cc1d 100644
--- a/frontends/gtk/toolbar.c
+++ b/frontends/gtk/toolbar.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2009 Mark Benjamin <netsurf-browser.org.MarkBenjamin@dfgh.net>
+ * Copyright 2019 Vincent Sanders <vince@netsurf-browser.org>
*
* This file is part of NetSurf, http://www.netsurf-browser.org/
*
@@ -16,17 +16,36 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+/**
+ * \file
+ * implementation of toolbar to control browsing context
+ */
+
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include <errno.h>
#include <gtk/gtk.h>
-#include "netsurf/browser_window.h"
-#include "desktop/searchweb.h"
#include "utils/log.h"
#include "utils/messages.h"
#include "utils/nsoption.h"
+#include "utils/file.h"
+#include "utils/nsurl.h"
+#include "utils/corestrings.h"
+#include "desktop/browser_history.h"
+#include "desktop/searchweb.h"
+#include "desktop/search.h"
+#include "desktop/save_complete.h"
+#include "desktop/save_text.h"
+#include "desktop/print.h"
+#include "desktop/hotlist.h"
+#include "netsurf/content.h"
+#include "netsurf/browser_window.h"
+#include "netsurf/keypress.h"
+#include "gtk/toolbar_items.h"
+#include "gtk/completion.h"
#include "gtk/gui.h"
#include "gtk/warn.h"
#include "gtk/search.h"
@@ -35,63 +54,203 @@
#include "gtk/window.h"
#include "gtk/compat.h"
#include "gtk/resources.h"
+#include "gtk/schedule.h"
+#include "gtk/local_history.h"
+#include "gtk/global_history.h"
+#include "gtk/viewsource.h"
+#include "gtk/download.h"
+#include "gtk/viewdata.h"
+#include "gtk/tabs.h"
+#include "gtk/print.h"
+#include "gtk/layout_pango.h"
+#include "gtk/preferences.h"
+#include "gtk/hotlist.h"
+#include "gtk/cookies.h"
+#include "gtk/about.h"
+#include "gtk/gdk.h"
+#include "gtk/bitmap.h"
+#include "gtk/page_info.h"
#include "gtk/toolbar.h"
-static GtkTargetEntry entry = {(char *)"nsgtk_button_data",
- GTK_TARGET_SAME_APP, 0};
-
-static bool edit_mode = false;
-
-struct nsgtk_toolbar_custom_store {
- GtkWidget *window;
- GtkWidget *store_buttons[PLACEHOLDER_BUTTON];
- GtkWidget *widgetvbox;
- GtkWidget *currentbar;
- char numberh; /* current horizontal location while adding */
- GtkBuilder *builder; /* button widgets to store */
- int buttonlocations[PLACEHOLDER_BUTTON];
- int currentbutton;
- bool fromstore;
-};
-/* the number of buttons that fit in the width of the store window */
-#define NSGTK_STORE_WIDTH 6
+/**
+ * button location indicating button is not to be shown
+ */
+#define INACTIVE_LOCATION (-1)
-/* the 'standard' width of a button that makes sufficient of its label
-visible */
-#define NSGTK_BUTTON_WIDTH 111
+/**
+ * time (in ms) between throbber animation frame updates
+ */
+#define THROBBER_FRAME_TIME (100)
-/* the 'standard' height of a button that fits as many toolbars as
-possible into the store */
+/**
+ * the minimum number of columns in the tool store
+ */
+#define NSGTK_MIN_STORE_COLUMNS 4
+
+/**
+ * the 'standard' width of a button that makes sufficient of its label visible
+ */
+#define NSGTK_BUTTON_WIDTH 120
+
+/**
+ * the 'standard' height of a button that fits as many toolbars as
+ * possible into the store
+ */
#define NSGTK_BUTTON_HEIGHT 70
-/* the 'normal' width of the websearch bar */
+/**
+ * the 'normal' width of the websearch bar
+ */
#define NSGTK_WEBSEARCH_WIDTH 150
-static struct nsgtk_toolbar_custom_store store;
-static struct nsgtk_toolbar_custom_store *window = &store;
+/**
+ * toolbar item context
+ */
+struct nsgtk_toolbar_item {
+
+ /**
+ * GTK widget in the toolbar
+ */
+ GtkToolItem *button;
+
+ /**
+ * location index in toolbar
+ */
+ int location;
+
+ /**
+ * if the item is currently sensitive in the toolbar
+ */
+ bool sensitivity;
+
+ /**
+ * textural name used in serialising items
+ */
+ const char *name;
+
+ /**
+ * button clicked on toolbar handler
+ */
+ gboolean (*clicked)(GtkWidget *widget, gpointer data);
+
+ /**
+ * handler when dragging from customisation toolbox to toolbar
+ */
+ void *dataplus;
+
+ /**
+ * handler when dragging from toolbar to customisation toolbox
+ */
+ void *dataminus;
+};
+/**
+ * Location focus state machine
+ *
+ * 1. If we don't care, we're in LFS_IDLE
+ * 2. When we create a new toolbar, we can put it into
+ * LFS_WANT which means that we want the url bar to focus
+ * 3. When we start throbbing if we're in LFS_WANT we move to LFS_THROB
+ * 4. When we stop throbbing, if we're in LFS_THROB we move to LFS_LAST
+ *
+ * While not in LFS_IDLE, if the url bar is updated and we previously had it
+ * fully selected then we reselect it all. If we're in LFS_LAST we move to
+ * LFS_IDLE at that point.
+ */
+typedef enum {
+ LFS_IDLE, /**< Nothing to do */
+ LFS_WANT, /**< Want focus, will apply */
+ LFS_THROB, /**< Want focus, we have started throbbing */
+ LFS_LAST, /**< Last chance for a focus update */
+} nsgtk_toolbar_location_focus_state;
-enum image_sets {
- IMAGE_SET_MAIN_MENU = 0,
- IMAGE_SET_RCLICK_MENU,
- IMAGE_SET_POPUP_MENU,
- IMAGE_SET_BUTTONS,
- IMAGE_SET_COUNT
+/**
+ * control toolbar context
+ */
+struct nsgtk_toolbar {
+ /** gtk toolbar widget */
+ GtkToolbar *widget;
+
+ /* toolbar size allocation context */
+ int offset;
+ int toolbarmem;
+ int toolbarbase;
+ int historybase;
+
+ /**
+ * Toolbar item contexts
+ */
+ struct nsgtk_toolbar_item items[PLACEHOLDER_BUTTON];
+
+ /**
+ * Current frame of throbber animation
+ */
+ int throb_frame;
+
+ /**
+ * Web search widget
+ */
+ GtkWidget *webSearchEntry;
+
+ /**
+ * callback to obtain a browser window for navigation
+ */
+ struct browser_window *(*get_bw)(void *ctx);
+
+ /**
+ * context passed to get_bw function
+ */
+ void *get_ctx;
+
+ /**
+ * Location focus state machine, current state
+ */
+ nsgtk_toolbar_location_focus_state loc_focus;
};
-typedef enum search_buttons {
- SEARCH_BACK_BUTTON = 0,
- SEARCH_FORWARD_BUTTON,
- SEARCH_CLOSE_BUTTON,
- SEARCH_BUTTONS_COUNT
-} nsgtk_search_buttons;
-
-struct nsgtk_theme {
- GtkImage *image[PLACEHOLDER_BUTTON];
- GtkImage *searchimage[SEARCH_BUTTONS_COUNT];
- /* apng throbber element */
+
+/**
+ * toolbar cusomisation context
+ */
+struct nsgtk_toolbar_customisation {
+ /**
+ * first entry is a toolbar widget so a customisation widget
+ * can be cast to toolbar and back.
+ */
+ struct nsgtk_toolbar toolbar;
+
+ /**
+ * The top level container (tabBox)
+ */
+ GtkWidget *container;
+
+ /**
+ * The vertical box into which the available tools are shown
+ */
+ GtkBox *toolbox;
+
+ /**
+ * widget handles for items in the customisation toolbox area
+ */
+ GtkToolItem *items[PLACEHOLDER_BUTTON];
+
+ /**
+ * which item is being dragged
+ */
+ int dragitem; /* currentbutton */
+ /**
+ * true if item being dragged onto toolbar, false if from toolbar
+ */
+ bool dragfrom; /*fromstore */
+
};
+
+/* forward declaration */
+static nserror toolbar_item_create(nsgtk_toolbar_button id,
+ struct nsgtk_toolbar_item *item_out);
+
+
/**
* returns a string without its underscores
*
@@ -107,13 +266,13 @@ static char *remove_underscores(const char *s, bool replacespace)
ret = malloc(len + 1);
if (ret == NULL) {
return NULL;
- }
+ }
for (i = 0, ii = 0; i < len; i++) {
if (s[i] != '_') {
ret[ii++] = s[i];
- } else if (replacespace) {
+ } else if (replacespace) {
ret[ii++] = ' ';
- }
+ }
}
ret[ii] = '\0';
return ret;
@@ -121,1365 +280,3608 @@ static char *remove_underscores(const char *s, bool replacespace)
/**
- * get default image for buttons / menu items from gtk stock items.
- *
- * \param tbbutton button reference
- * \param iconsize The size of icons to select.
- * \param usedef Use the default image if not found.
- * \return default images.
- */
-static GtkImage *
-nsgtk_theme_image_default(nsgtk_toolbar_button tbbutton,
- GtkIconSize iconsize,
- bool usedef)
-{
- GtkImage *image; /* The GTK image to return */
-
- switch(tbbutton) {
-
-#define BUTTON_IMAGE(p, q) \
- case p##_BUTTON: \
- image = GTK_IMAGE(nsgtk_image_new_from_stock(q, iconsize)); \
- break
-
- BUTTON_IMAGE(BACK, NSGTK_STOCK_GO_BACK);
- BUTTON_IMAGE(FORWARD, NSGTK_STOCK_GO_FORWARD);
- BUTTON_IMAGE(STOP, NSGTK_STOCK_STOP);
- BUTTON_IMAGE(RELOAD, NSGTK_STOCK_REFRESH);
- BUTTON_IMAGE(HOME, NSGTK_STOCK_HOME);
- BUTTON_IMAGE(NEWWINDOW, "gtk-new");
- BUTTON_IMAGE(NEWTAB, "gtk-new");
- BUTTON_IMAGE(OPENFILE, NSGTK_STOCK_OPEN);
- BUTTON_IMAGE(CLOSETAB, NSGTK_STOCK_CLOSE);
- BUTTON_IMAGE(CLOSEWINDOW, NSGTK_STOCK_CLOSE);
- BUTTON_IMAGE(SAVEPAGE, NSGTK_STOCK_SAVE_AS);
- BUTTON_IMAGE(PRINTPREVIEW, "gtk-print-preview");
- BUTTON_IMAGE(PRINT, "gtk-print");
- BUTTON_IMAGE(QUIT, "gtk-quit");
- BUTTON_IMAGE(CUT, "gtk-cut");
- BUTTON_IMAGE(COPY, "gtk-copy");
- BUTTON_IMAGE(PASTE, "gtk-paste");
- BUTTON_IMAGE(DELETE, "gtk-delete");
- BUTTON_IMAGE(SELECTALL, "gtk-select-all");
- BUTTON_IMAGE(FIND, NSGTK_STOCK_FIND);
- BUTTON_IMAGE(PREFERENCES, "gtk-preferences");
- BUTTON_IMAGE(ZOOMPLUS, "gtk-zoom-in");
- BUTTON_IMAGE(ZOOMMINUS, "gtk-zoom-out");
- BUTTON_IMAGE(ZOOMNORMAL, "gtk-zoom-100");
- BUTTON_IMAGE(FULLSCREEN, "gtk-fullscreen");
- BUTTON_IMAGE(VIEWSOURCE, "gtk-index");
- BUTTON_IMAGE(CONTENTS, "gtk-help");
- BUTTON_IMAGE(ABOUT, "gtk-about");
-#undef BUTTON_IMAGE
+ * create throbber toolbar item widget
+ *
+ * create a gtk entry widget with a completion attached
+ */
+static GtkToolItem *
+make_toolbar_item_throbber(bool sensitivity, bool edit)
+{
+ nserror res;
+ GtkToolItem *item;
+ GdkPixbuf *pixbuf;
+ GtkWidget *image;
- case HISTORY_BUTTON:
- image = GTK_IMAGE(gtk_image_new_from_pixbuf(arrow_down_pixbuf));
- break;
+ res = nsgtk_throbber_get_frame(0, &pixbuf);
+ if (res != NSERROR_OK) {
+ return NULL;
+ }
+
+ if (edit) {
+ const char *msg;
+ msg = messages_get("ToolThrob");
+ item = gtk_tool_button_new(
+ GTK_WIDGET(gtk_image_new_from_pixbuf(pixbuf)),
+ msg);
+ } else {
+ item = gtk_tool_item_new();
+
+ image = gtk_image_new_from_pixbuf(pixbuf);
+ if (image != NULL) {
+ nsgtk_widget_set_alignment(image,
+ GTK_ALIGN_CENTER,
+ GTK_ALIGN_CENTER);
+ nsgtk_widget_set_margins(image, 3, 0);
+
+ gtk_container_add(GTK_CONTAINER(item), image);
+ }
+ }
+ gtk_widget_set_sensitive(GTK_WIDGET(item), sensitivity);
+
+ return item;
+}
- default:
- image = NULL;
- break;
+/**
+ * create url bar toolbar item widget
+ *
+ * create a gtk entry widget with a completion attached
+ *
+ * \param sensitivity if the entry should be created sensitive to input
+ * \param edit if the entry should be editable
+ */
+static GtkToolItem *
+make_toolbar_item_url_bar(bool sensitivity, bool edit)
+{
+ GtkToolItem *item;
+ GtkWidget *entry;
+ GtkEntryCompletion *completion;
+
+ entry = nsgtk_entry_new();
+
+ if (entry == NULL) {
+ return NULL;
}
+ nsgtk_entry_set_icon_from_icon_name(entry,
+ GTK_ENTRY_ICON_PRIMARY,
+ "page-info-internal");
+
+ if (edit) {
+ gtk_entry_set_width_chars(GTK_ENTRY(entry), 9);
+
+ item = gtk_tool_button_new(NULL, "URL");
+ gtk_tool_button_set_icon_widget(GTK_TOOL_BUTTON(item), entry);
+ } else {
+ completion = gtk_entry_completion_new();
+ if (completion != NULL) {
+ gtk_entry_set_completion(GTK_ENTRY(entry), completion);
+ }
+
+ item = gtk_tool_item_new();
+ if (item == NULL) {
+ return NULL;
+ }
+
+ gtk_container_add(GTK_CONTAINER(item), entry);
+ gtk_tool_item_set_expand(item, TRUE);
- if (usedef && (image == NULL)) {
- image = GTK_IMAGE(nsgtk_image_new_from_stock("gtk-missing-image", iconsize));
}
+ gtk_widget_set_sensitive(GTK_WIDGET(item), TRUE);
+ gtk_widget_set_sensitive(GTK_WIDGET(entry), sensitivity);
- return image;
+ return item;
}
+
/**
- * Get default image for search buttons / menu items from gtk stock items
+ * create web search toolbar item widget
+ */
+static GtkToolItem *
+make_toolbar_item_websearch(bool sensitivity, bool edit)
+{
+ GtkToolItem *item;
+ nserror res;
+ GtkWidget *entry;
+ struct bitmap *bitmap;
+ GdkPixbuf *pixbuf = NULL;
+
+ res = search_web_get_provider_bitmap(&bitmap);
+ if ((res == NSERROR_OK) && (bitmap != NULL)) {
+ pixbuf = nsgdk_pixbuf_get_from_surface(bitmap->surface, 32, 32);
+ }
+
+ entry = nsgtk_entry_new();
+
+ if (entry == NULL) {
+ return NULL;
+ }
+
+ if (pixbuf != NULL) {
+ nsgtk_entry_set_icon_from_pixbuf(entry,
+ GTK_ENTRY_ICON_PRIMARY,
+ pixbuf);
+ g_object_unref(pixbuf);
+ } else {
+ nsgtk_entry_set_icon_from_icon_name(entry,
+ GTK_ENTRY_ICON_PRIMARY,
+ NSGTK_STOCK_INFO);
+ }
+
+ if (edit) {
+ gtk_entry_set_width_chars(GTK_ENTRY(entry), 9);
+
+ item = gtk_tool_button_new(NULL, "Web Search");
+ gtk_tool_button_set_icon_widget(GTK_TOOL_BUTTON(item),
+ entry);
+ } else {
+ gtk_widget_set_size_request(entry, NSGTK_WEBSEARCH_WIDTH, -1);
+
+ item = gtk_tool_item_new();
+ if (item == NULL) {
+ return NULL;
+ }
+
+ gtk_container_add(GTK_CONTAINER(item), entry);
+ }
+ gtk_widget_set_sensitive(GTK_WIDGET(item), TRUE);
+ gtk_widget_set_sensitive(GTK_WIDGET(entry), sensitivity);
+
+ return item;
+}
+
+
+/**
+ * create local history toolbar item widget
+ */
+static GtkToolItem *
+make_toolbar_item_history(bool sensitivity, bool edit)
+{
+ GtkToolItem *item;
+ const char *msg = "H";
+ char *label = NULL;
+
+ if (edit) {
+ msg = messages_get("gtkLocalHistory");
+ }
+ label = remove_underscores(msg, false);
+ item = gtk_tool_button_new(NULL, label);
+ if (label != NULL) {
+ free(label);
+ }
+ gtk_tool_button_set_icon_name(GTK_TOOL_BUTTON(item), "local-history");
+
+ /* set history widget minimum width */
+ gtk_widget_set_size_request(GTK_WIDGET(item), 20, -1);
+ gtk_widget_set_sensitive(GTK_WIDGET(item), sensitivity);
+
+ return item;
+}
+
+
+/**
+ * create generic button toolbar item widget
+ */
+static GtkToolItem *
+make_toolbar_item_button(const char *labelmsg,
+ const char *iconname,
+ bool sensitivity,
+ bool edit)
+{
+ GtkToolItem *item;
+ char *label = NULL;
+
+ label = remove_underscores(messages_get(labelmsg), false);
+
+ item = gtk_tool_button_new(NULL, label);
+ if (label != NULL) {
+ free(label);
+ }
+
+ if (item != NULL) {
+ gtk_tool_button_set_icon_name(GTK_TOOL_BUTTON(item), iconname);
+
+ gtk_widget_set_sensitive(GTK_WIDGET(item), sensitivity);
+ if (edit) {
+ nsgtk_widget_set_margins(GTK_WIDGET(item), 0, 0);
+ }
+ }
+
+ return item;
+}
+
+
+/**
+ * widget factory for creation of toolbar item widgets
*
- * \param tbbutton search button reference
- * \param iconsize The size of icons to select.
- * \param usedef Use the default image if not found.
- * \return default search image.
+ * \param i the id of the widget
+ * \param theme the theme to make the widgets from
+ * \return gtk widget
*/
+static GtkToolItem *
+make_toolbar_item(nsgtk_toolbar_button itemid, bool sensitivity)
+{
+ GtkToolItem *toolitem = NULL;
+
+ switch(itemid) {
+#define TOOLBAR_ITEM_y(identifier, label, iconame)
+#define TOOLBAR_ITEM_n(identifier, label, iconame)
+#define TOOLBAR_ITEM_t(identifier, label, iconame) \
+ case identifier: \
+ toolitem = make_toolbar_item_button(#label, iconame, sensitivity, false); \
+ break;
+#define TOOLBAR_ITEM_b(identifier, label, iconame) \
+ case identifier: \
+ toolitem = make_toolbar_item_button(#label, iconame, sensitivity, false); \
+ break;
+#define TOOLBAR_ITEM(identifier, name, snstvty, clicked, activate, label, iconame) \
+ TOOLBAR_ITEM_ ## clicked(identifier, label, iconame)
+
+#include "gtk/toolbar_items.h"
+
+#undef TOOLBAR_ITEM_t
+#undef TOOLBAR_ITEM_b
+#undef TOOLBAR_ITEM_n
+#undef TOOLBAR_ITEM_y
+#undef TOOLBAR_ITEM
+
+ case HISTORY_BUTTON:
+ toolitem = make_toolbar_item_history(sensitivity, false);
+ break;
+
+ case URL_BAR_ITEM:
+ toolitem = make_toolbar_item_url_bar(sensitivity, false);
+ break;
+
+ case THROBBER_ITEM:
+ toolitem = make_toolbar_item_throbber(sensitivity, false);
+ break;
+
+ case WEBSEARCH_ITEM:
+ toolitem = make_toolbar_item_websearch(sensitivity, false);
+ break;
+
+ default:
+ break;
-static GtkImage *
-nsgtk_theme_searchimage_default(nsgtk_search_buttons tbbutton,
- GtkIconSize iconsize,
- bool usedef)
+ }
+ return toolitem;
+}
+
+
+/**
+ * widget factory for creation of toolbar item widgets for the toolbox
+ *
+ * \param itemid the id of the widget
+ * \return gtk tool item widget
+ */
+static GtkToolItem *
+make_toolbox_item(nsgtk_toolbar_button itemid, bool bar)
{
- GtkImage *image;
+ GtkToolItem *toolitem = NULL;
+
+ switch(itemid) {
+#define TOOLBAR_ITEM_y(identifier, label, iconame)
+#define TOOLBAR_ITEM_n(identifier, label, iconame)
+#define TOOLBAR_ITEM_t(identifier, label, iconame) \
+ case identifier: \
+ if (bar) { \
+ toolitem = make_toolbar_item_button(#label, iconame, true, true); \
+ } \
+ break;
+#define TOOLBAR_ITEM_b(identifier, label, iconame) \
+ case identifier: \
+ toolitem = make_toolbar_item_button(#label, iconame, true, true); \
+ break;
+#define TOOLBAR_ITEM(identifier, name, snstvty, clicked, activate, label, iconame) \
+ TOOLBAR_ITEM_ ## clicked(identifier, label, iconame)
+
+#include "gtk/toolbar_items.h"
- switch (tbbutton) {
+#undef TOOLBAR_ITEM_t
+#undef TOOLBAR_ITEM_b
+#undef TOOLBAR_ITEM_n
+#undef TOOLBAR_ITEM_y
+#undef TOOLBAR_ITEM
- case (SEARCH_BACK_BUTTON):
- image = GTK_IMAGE(nsgtk_image_new_from_stock(NSGTK_STOCK_GO_BACK,
- iconsize));
+ case HISTORY_BUTTON:
+ toolitem = make_toolbar_item_history(true, true);
+ break;
+
+ case URL_BAR_ITEM:
+ toolitem = make_toolbar_item_url_bar(false, true);
break;
- case (SEARCH_FORWARD_BUTTON):
- image = GTK_IMAGE(nsgtk_image_new_from_stock(NSGTK_STOCK_GO_FORWARD,
- iconsize));
+ case THROBBER_ITEM:
+ toolitem = make_toolbar_item_throbber(true, true);
break;
- case (SEARCH_CLOSE_BUTTON):
- image = GTK_IMAGE(nsgtk_image_new_from_stock(NSGTK_STOCK_CLOSE,
- iconsize));
+ case WEBSEARCH_ITEM:
+ toolitem = make_toolbar_item_websearch(false, true);
break;
default:
- image = NULL;
+ break;
+
+ }
+ return toolitem;
+}
+
+
+/**
+ * target entry for drag source
+ */
+static GtkTargetEntry target_entry = {
+ (char *)"nsgtk_button_data",
+ GTK_TARGET_SAME_APP,
+ 0
+};
+
+
+/**
+ * find the toolbar item with a given location.
+ *
+ * \param tb the toolbar instance
+ * \param locaction the location to search for
+ * \return the item id for a location
+ */
+static nsgtk_toolbar_button
+itemid_from_location(struct nsgtk_toolbar *tb, int location)
+{
+ int iidx;
+ for (iidx = BACK_BUTTON; iidx < PLACEHOLDER_BUTTON; iidx++) {
+ if (tb->items[iidx].location == location) {
+ break;
+ }
+ }
+ return iidx;
+}
+
+
+/**
+ * save toolbar settings to file
+ */
+static nserror
+nsgtk_toolbar_customisation_save(struct nsgtk_toolbar *tb)
+{
+ int iidx; /* item index */
+ char *order; /* item ordering */
+ char *start; /* start of next item name to be output */
+ int orderlen = 0; /* length of item ordering */
+ nsgtk_toolbar_button itemid;
+ int location;
+ char *choices = NULL;
+
+ for (iidx = BACK_BUTTON; iidx < PLACEHOLDER_BUTTON; iidx++) {
+ if (tb->items[iidx].location != INACTIVE_LOCATION) {
+ orderlen += strlen(tb->items[iidx].name);
+ orderlen++; /* allow for separator */
+ }
}
- if (usedef && (image == NULL)) {
- image = GTK_IMAGE(nsgtk_image_new_from_stock("gtk-missing-image", iconsize));
+ /* ensure there are some items to store */
+ if (orderlen == 0) {
+ return NSERROR_INVALID;
}
- return image;
+ order = malloc(orderlen);
+ if (order == NULL) {
+ return NSERROR_NOMEM;
+ }
+
+ start = order;
+
+ for (location = BACK_BUTTON;
+ location < PLACEHOLDER_BUTTON;
+ location++) {
+ int written;
+ itemid = itemid_from_location(tb, location);
+ if (itemid == PLACEHOLDER_BUTTON) {
+ /* no more filled locations */
+ break;
+ }
+ written = snprintf(start,
+ orderlen - (start - order),
+ "%s/",
+ tb->items[itemid].name);
+ if ((written < 0) ||
+ (written >= orderlen - (start - order))) {
+ free(order);
+ return NSERROR_UNKNOWN;
+ }
+ start += written;
+
+ if ((start - order) >= orderlen) {
+ break;
+ }
+ }
+
+ order[orderlen - 1] = 0;
+
+ nsoption_set_charp(toolbar_items, order);
+
+ /* ensure choices are saved */
+ netsurf_mkpath(&choices, NULL, 2, nsgtk_config_home, "Choices");
+ if (choices != NULL) {
+ nsoption_write(choices, NULL, NULL);
+ free(choices);
+ }
+
+ return NSERROR_OK;
}
+
/**
- * initialise a theme structure with gtk images
+ * connect signals to a toolbar item in a customisation toolbar
*
- * \param iconsize The size of icon to load
- * \param usedef use the default gtk icon if unset
+ * \param tb The toolbar
+ * \param itemid The item id within to toolbar to connect
+ * \param NSERROR_OK on success
*/
-static struct nsgtk_theme *nsgtk_theme_load(GtkIconSize iconsize, bool usedef)
+static nserror
+toolbar_item_connect_signals(struct nsgtk_toolbar *tb, int itemid)
{
- struct nsgtk_theme *theme;
- int btnloop;
+ /* set toolbar items to be a drag source */
+ gtk_tool_item_set_use_drag_window(tb->items[itemid].button, TRUE);
+ gtk_drag_source_set(GTK_WIDGET(tb->items[itemid].button),
+ GDK_BUTTON1_MASK,
+ &target_entry,
+ 1,
+ GDK_ACTION_COPY);
+ g_signal_connect(tb->items[itemid].button,
+ "drag-data-get",
+ G_CALLBACK(tb->items[itemid].dataminus),
+ tb);
+ return NSERROR_OK;
+}
- theme = malloc(sizeof(struct nsgtk_theme));
- if (theme == NULL) {
- return NULL;
+
+/**
+ * customisation container handler for drag drop signal
+ *
+ * called when a widget is dropped onto the store window
+ */
+static gboolean
+customisation_container_drag_drop_cb(GtkWidget *widget,
+ GdkDragContext *gdc,
+ gint x, gint y,
+ guint time,
+ gpointer data)
+{
+ struct nsgtk_toolbar_customisation *tbc;
+ tbc = (struct nsgtk_toolbar_customisation *)data;
+ int location;
+ int itemid;
+
+ if ((tbc->dragfrom) || (tbc->dragitem == -1)) {
+ tbc->dragitem = -1;
+ return FALSE;
}
- for (btnloop = BACK_BUTTON;
- btnloop < PLACEHOLDER_BUTTON ;
- btnloop++) {
- theme->image[btnloop] = nsgtk_theme_image_default(btnloop,
- iconsize,
- usedef);
+ if (tbc->toolbar.items[tbc->dragitem].location == INACTIVE_LOCATION) {
+ tbc->dragitem = -1;
+ gtk_drag_finish(gdc, TRUE, TRUE, time);
+ return FALSE;
}
- for (btnloop = SEARCH_BACK_BUTTON;
- btnloop < SEARCH_BUTTONS_COUNT;
- btnloop++) {
- theme->searchimage[btnloop] =
- nsgtk_theme_searchimage_default(btnloop,
- iconsize,
- usedef);
+ /* update the locations for all the subsequent toolbar items */
+ for (location = tbc->toolbar.items[tbc->dragitem].location;
+ location < PLACEHOLDER_BUTTON;
+ location++) {
+ itemid = itemid_from_location(&tbc->toolbar, location);
+ if (itemid == PLACEHOLDER_BUTTON) {
+ break;
+ }
+ tbc->toolbar.items[itemid].location--;
}
- return theme;
-}
+ /* remove existing item */
+ tbc->toolbar.items[tbc->dragitem].location = -1;
+ gtk_container_remove(GTK_CONTAINER(tbc->toolbar.widget),
+ GTK_WIDGET(tbc->toolbar.items[tbc->dragitem].button));
+
+ tbc->dragitem = -1;
+ gtk_drag_finish(gdc, TRUE, TRUE, time);
+ return FALSE;
+}
-/* exported function documented in gtk/toolbar.h */
-void nsgtk_theme_implement(struct nsgtk_scaffolding *g)
+/**
+ * customisation container handler for drag motion signal
+ *
+ * called when hovering above the store
+ */
+static gboolean
+customisation_container_drag_motion_cb(GtkWidget *widget,
+ GdkDragContext *gdc,
+ gint x, gint y,
+ guint time,
+ gpointer data)
{
- struct nsgtk_theme *theme[IMAGE_SET_COUNT];
- int i;
- struct nsgtk_button_connect *button;
- struct gtk_search *search;
+ return FALSE;
+}
- theme[IMAGE_SET_MAIN_MENU] = nsgtk_theme_load(GTK_ICON_SIZE_MENU, false);
- theme[IMAGE_SET_RCLICK_MENU] = nsgtk_theme_load(GTK_ICON_SIZE_MENU, false);
- theme[IMAGE_SET_POPUP_MENU] = nsgtk_theme_load(GTK_ICON_SIZE_MENU, false);
- theme[IMAGE_SET_BUTTONS] = nsgtk_theme_load(GTK_ICON_SIZE_LARGE_TOOLBAR, false);
- for (i = BACK_BUTTON; i < PLACEHOLDER_BUTTON; i++) {
- if ((i == URL_BAR_ITEM) || (i == THROBBER_ITEM) ||
- (i == WEBSEARCH_ITEM))
- continue;
+/**
+ * customisation toolbar handler for drag drop signal
+ *
+ * called when a widget is dropped onto the toolbar
+ */
+static gboolean
+customisation_toolbar_drag_drop_cb(GtkWidget *widget,
+ GdkDragContext *gdc,
+ gint x,
+ gint y,
+ guint time,
+ gpointer data)
+{
+ struct nsgtk_toolbar_customisation *tbc;
+ tbc = (struct nsgtk_toolbar_customisation *)data;
+ gint position; /* drop position in toolbar */
+ int location;
+ int itemid;
+ struct nsgtk_toolbar_item *dragitem; /* toolbar item being dragged */
+
+ position = gtk_toolbar_get_drop_index(tbc->toolbar.widget, x, y);
+ if (tbc->dragitem == -1) {
+ return TRUE;
+ }
- button = nsgtk_scaffolding_button(g, i);
- if (button == NULL)
- continue;
+ /* pure conveiance variable */
+ dragitem = &tbc->toolbar.items[tbc->dragitem];
- /* gtk_image_menu_item_set_image accepts NULL image */
- if ((button->main != NULL) &&
- (theme[IMAGE_SET_MAIN_MENU] != NULL)) {
- nsgtk_image_menu_item_set_image(
- GTK_WIDGET(button->main),
- GTK_WIDGET(theme[IMAGE_SET_MAIN_MENU]->image[i]));
- gtk_widget_show_all(GTK_WIDGET(button->main));
+ /* deal with replacing existing item in toolbar */
+ if (dragitem->location != INACTIVE_LOCATION) {
+ if (dragitem->location < position) {
+ position--;
}
- if ((button->rclick != NULL) &&
- (theme[IMAGE_SET_RCLICK_MENU] != NULL)) {
- nsgtk_image_menu_item_set_image(GTK_WIDGET(button->rclick),
- GTK_WIDGET(
- theme[IMAGE_SET_RCLICK_MENU]->
- image[i]));
- gtk_widget_show_all(GTK_WIDGET(button->rclick));
+
+ /* update the locations for all the subsequent toolbar items */
+ for (location = dragitem->location;
+ location < PLACEHOLDER_BUTTON;
+ location++) {
+ itemid = itemid_from_location(&tbc->toolbar, location);
+ if (itemid == PLACEHOLDER_BUTTON) {
+ break;
+ }
+ tbc->toolbar.items[itemid].location--;
}
- if ((button->popup != NULL) &&
- (theme[IMAGE_SET_POPUP_MENU] != NULL)) {
- nsgtk_image_menu_item_set_image(GTK_WIDGET(button->popup),
- GTK_WIDGET(
- theme[IMAGE_SET_POPUP_MENU]->
- image[i]));
- gtk_widget_show_all(GTK_WIDGET(button->popup));
+
+ /* remove existing item */
+ dragitem->location = INACTIVE_LOCATION;
+ gtk_container_remove(GTK_CONTAINER(tbc->toolbar.widget),
+ GTK_WIDGET(dragitem->button));
+ }
+
+
+ dragitem->button = make_toolbox_item(tbc->dragitem, true);
+
+ if (dragitem->button == NULL) {
+ nsgtk_warning("NoMemory", 0);
+ return TRUE;
+ }
+
+ /* update locations */
+ for (location = PLACEHOLDER_BUTTON; location >= position; location--) {
+ itemid = itemid_from_location(&tbc->toolbar, location);
+ if (itemid != PLACEHOLDER_BUTTON) {
+ tbc->toolbar.items[itemid].location++;
}
- if ((button->location != -1) && (button->button != NULL) &&
- (theme[IMAGE_SET_BUTTONS] != NULL)) {
- gtk_tool_button_set_icon_widget(
- GTK_TOOL_BUTTON(button->button),
- GTK_WIDGET(
- theme[IMAGE_SET_BUTTONS]->
- image[i]));
- gtk_widget_show_all(GTK_WIDGET(button->button));
+ }
+ dragitem->location = position;
+
+ gtk_toolbar_insert(tbc->toolbar.widget,
+ dragitem->button,
+ dragitem->location);
+
+ toolbar_item_connect_signals(&tbc->toolbar, tbc->dragitem);
+ gtk_widget_show_all(GTK_WIDGET(dragitem->button));
+ tbc->dragitem = -1;
+ return TRUE;
+}
+
+
+/**
+ * customisation toolbar handler for drag data received signal
+ *
+ * connected to toolbutton drop; perhaps one day it'll work properly
+ * so it may replace the global current_button
+ */
+static gboolean
+customisation_toolbar_drag_data_received_cb(GtkWidget *widget,
+ GdkDragContext *gdc,
+ gint x,
+ gint y,
+ GtkSelectionData *selection,
+ guint info,
+ guint time,
+ gpointer data)
+{
+ return FALSE;
+}
+
+
+/**
+ * customisation toolbar handler for drag motion signal
+ *
+ * called when hovering an item above the toolbar
+ */
+static gboolean
+customisation_toolbar_drag_motion_cb(GtkWidget *widget,
+ GdkDragContext *gdc,
+ gint x,
+ gint y,
+ guint time,
+ gpointer data)
+{
+ struct nsgtk_toolbar *tb = (struct nsgtk_toolbar *)data;
+ GtkToolItem *item;
+ gint position; /* position in toolbar */
+
+ item = gtk_tool_button_new(NULL, NULL);
+ position = gtk_toolbar_get_drop_index(tb->widget, x, y);
+
+ gtk_toolbar_set_drop_highlight_item(tb->widget, item, position);
+
+ return FALSE; /* drag not in drop zone */
+}
+
+
+/**
+ * customisation toolbar handler for drag leave signal
+ *
+ * called when hovering stops
+ */
+static void
+customisation_toolbar_drag_leave_cb(GtkWidget *widget,
+ GdkDragContext *gdc,
+ guint time,
+ gpointer data)
+{
+ gtk_toolbar_set_drop_highlight_item(GTK_TOOLBAR(widget), NULL, 0);
+}
+
+
+/**
+ * create a new browser window
+ *
+ * creates a browser window with default url depending on user choices.
+ *
+ * \param bw The browser window to pass for existing window/
+ * \param intab true if the new window should be in a tab else false
+ * for new window.
+ * \return NSERROR_OK on success else error code.
+ */
+static nserror
+nsgtk_browser_window_create(struct browser_window *bw, bool intab)
+{
+ nserror res = NSERROR_OK;
+ nsurl *url = NULL;
+ int flags = BW_CREATE_HISTORY | BW_CREATE_FOREGROUND | BW_CREATE_FOCUS_LOCATION;
+
+ if (intab) {
+ flags |= BW_CREATE_TAB;
+ }
+
+ if (!nsoption_bool(new_blank)) {
+ const char *addr;
+ if (nsoption_charp(homepage_url) != NULL) {
+ addr = nsoption_charp(homepage_url);
+ } else {
+ addr = NETSURF_HOMEPAGE;
}
+ res = nsurl_create(addr, &url);
}
- /* set search bar images */
- search = nsgtk_scaffolding_search(g);
- if ((search != NULL) && (theme[IMAGE_SET_MAIN_MENU] != NULL)) {
- /* gtk_tool_button_set_icon_widget accepts NULL image */
- if (search->buttons[SEARCH_BACK_BUTTON] != NULL) {
- gtk_tool_button_set_icon_widget(
- search->buttons[SEARCH_BACK_BUTTON],
- GTK_WIDGET(theme[IMAGE_SET_MAIN_MENU]->
- searchimage[SEARCH_BACK_BUTTON]));
- gtk_widget_show_all(GTK_WIDGET(
- search->buttons[SEARCH_BACK_BUTTON]));
+ if (res == NSERROR_OK) {
+ res = browser_window_create(flags, url, NULL, bw, NULL);
+ }
+
+ if (url != NULL) {
+ nsurl_unref(url);
+ }
+
+ return res;
+}
+
+
+/**
+ * Apply the user toolbar button settings from configuration
+ *
+ * GTK specific user option string is a set of fields arranged as
+ * [itemreference];[itemlocation]|[itemreference];[itemlocation]| etc
+ *
+ * \param tb The toolbar to apply customisation to
+ * \param NSERROR_OK on success else error code.
+ */
+static nserror
+apply_user_button_customisation(struct nsgtk_toolbar *tb)
+{
+ const char *tbitems; /* item order user config */
+ const char *start;
+ const char *end;
+ int iidx; /* item index */
+ int location = 0; /* location index */
+
+ /* set all button locations to inactive */
+ for (iidx = BACK_BUTTON; iidx < PLACEHOLDER_BUTTON; iidx++) {
+ tb->items[iidx].location = INACTIVE_LOCATION;
+ }
+
+ tbitems = nsoption_charp(toolbar_items);
+ if (tbitems == NULL) {
+ tbitems = "";
+ }
+
+ end = tbitems;
+ while (*end != 0) {
+ start = end;
+ while ((*end != 0) && (*end !='/')) {
+ end++;
}
- if (search->buttons[SEARCH_FORWARD_BUTTON] != NULL) {
- gtk_tool_button_set_icon_widget(
- search->buttons[SEARCH_FORWARD_BUTTON],
- GTK_WIDGET(theme[IMAGE_SET_MAIN_MENU]->
- searchimage[SEARCH_FORWARD_BUTTON]));
- gtk_widget_show_all(GTK_WIDGET(
- search->buttons[
- SEARCH_FORWARD_BUTTON]));
+
+ for (iidx = BACK_BUTTON; iidx < PLACEHOLDER_BUTTON; iidx++) {
+ if (((ssize_t)strlen(tb->items[iidx].name) == (end - start)) &&
+ (strncmp(tb->items[iidx].name, start, end - start) == 0)) {
+ tb->items[iidx].location = location++;
+ break;
+ }
}
- if (search->buttons[SEARCH_CLOSE_BUTTON] != NULL) {
- gtk_tool_button_set_icon_widget(
- search->buttons[SEARCH_CLOSE_BUTTON],
- GTK_WIDGET(theme[IMAGE_SET_MAIN_MENU]->
- searchimage[SEARCH_CLOSE_BUTTON]));
- gtk_widget_show_all(GTK_WIDGET(
- search->buttons[SEARCH_CLOSE_BUTTON]));
+
+ if (*end == '/') {
+ end++;
}
}
- for (i = 0; i < IMAGE_SET_COUNT; i++) {
- if (theme[i] != NULL) {
- free(theme[i]);
- }
+ if (location == 0) {
+ /* completely failed to create any buttons so use defaults */
+ tb->items[BACK_BUTTON].location = location++;
+ tb->items[HISTORY_BUTTON].location = location++;
+ tb->items[FORWARD_BUTTON].location = location++;
+ tb->items[RELOADSTOP_BUTTON].location = location++;
+ tb->items[URL_BAR_ITEM].location = location++;
+ tb->items[WEBSEARCH_ITEM].location = location++;
+ tb->items[OPENMENU_BUTTON].location = location++;
+ tb->items[THROBBER_ITEM].location = location++;
}
+
+
+ return NSERROR_OK;
}
/**
- * callback function to iterate toolbar's widgets
+ * callback function to remove a widget from a container
*/
-static void nsgtk_toolbar_clear_toolbar(GtkWidget *widget, gpointer data)
+static void container_remove_widget(GtkWidget *widget, gpointer data)
{
- struct nsgtk_scaffolding *g = (struct nsgtk_scaffolding *)data;
- gtk_container_remove(GTK_CONTAINER(nsgtk_scaffolding_toolbar(g)),
- widget);
+ GtkContainer *container = GTK_CONTAINER(data);
+ gtk_container_remove(container, widget);
}
+
/**
- * connect temporary handler for toolbar edit events
+ * populates a toolbar with widgets in correct order
*
- * \param g The scaffolding
- * \param bi The button index
+ * \param tb toolbar
+ * \return NSERROR_OK on success else error code.
*/
-static void nsgtk_toolbar_temp_connect(struct nsgtk_scaffolding *g,
- nsgtk_toolbar_button bi)
+static nserror populate_gtk_toolbar_widget(struct nsgtk_toolbar *tb)
{
- struct nsgtk_button_connect *bc;
+ int location; /* location index */
+ int itemid;
+
+ /* clear the toolbar container of all widgets */
+ gtk_container_foreach(GTK_CONTAINER(tb->widget),
+ container_remove_widget,
+ tb->widget);
+
+ /* add widgets to toolbar */
+ for (location = 0; location < PLACEHOLDER_BUTTON; location++) {
+ itemid = itemid_from_location(tb, location);
+ if (itemid == PLACEHOLDER_BUTTON) {
+ break;
+ }
+ tb->items[itemid].button =
+ make_toolbar_item(itemid,
+ tb->items[itemid].sensitivity);
+
+ gtk_toolbar_insert(tb->widget,
+ tb->items[itemid].button,
+ location);
+ }
+
+ gtk_widget_show_all(GTK_WIDGET(tb->widget));
+
+ return NSERROR_OK;
+}
- if (bi != URL_BAR_ITEM) {
- bc = nsgtk_scaffolding_button(g, bi);
- if ((bc->button != NULL) && (bc->dataminus != NULL)) {
- g_signal_connect(bc->button,
- "drag-data-get",
- G_CALLBACK(bc->dataminus),
- g);
+
+/**
+ * populates the customization toolbar with widgets in correct order
+ *
+ * \param tb toolbar
+ * \return NSERROR_OK on success else error code.
+ */
+static nserror customisation_toolbar_populate(struct nsgtk_toolbar *tb)
+{
+ int location; /* location index */
+ int itemid;
+
+ /* clear the toolbar container of all widgets */
+ gtk_container_foreach(GTK_CONTAINER(tb->widget),
+ container_remove_widget,
+ tb->widget);
+
+ /* add widgets to toolbar */
+ for (location = 0; location < PLACEHOLDER_BUTTON; location++) {
+ itemid = itemid_from_location(tb, location);
+ if (itemid == PLACEHOLDER_BUTTON) {
+ break;
}
+ tb->items[itemid].button = make_toolbox_item(itemid, true);
+
+ gtk_toolbar_insert(tb->widget,
+ tb->items[itemid].button,
+ location);
}
+
+ gtk_widget_show_all(GTK_WIDGET(tb->widget));
+
+ return NSERROR_OK;
}
+
/**
- * get scaffolding button index of button at location
+ * find the toolbar item with a given gtk widget.
*
- * \return toolbar item id from location when there is an item at that logical
- * location; else -1
+ * \param tb the toolbar instance
+ * \param toolitem the tool item widget to search for
+ * \return the item id matching the widget
*/
static nsgtk_toolbar_button
-nsgtk_toolbar_get_id_at_location(struct nsgtk_scaffolding *g, int i)
+itemid_from_gtktoolitem(struct nsgtk_toolbar *tb, GtkToolItem *toolitem)
{
- int q;
- for (q = BACK_BUTTON; q < PLACEHOLDER_BUTTON; q++) {
- if (nsgtk_scaffolding_button(g, q)->location == i) {
- return q;
+ int iidx;
+ for (iidx = BACK_BUTTON; iidx < PLACEHOLDER_BUTTON; iidx++) {
+ if ((tb->items[iidx].location != INACTIVE_LOCATION) &&
+ (tb->items[iidx].button == toolitem)) {
+ break;
}
}
- return -1;
+ return iidx;
}
+
/**
- * widget factory for creation of toolbar item widgets
- * \param g the reference scaffolding
- * \param i the id of the widget
- * \param theme the theme to make the widgets from
+ * set a toolbar items sensitivity
+ *
+ * note this does not set menu items sensitivity
*/
-static GtkWidget *
-nsgtk_toolbar_make_widget(struct nsgtk_scaffolding *g,
- nsgtk_toolbar_button i,
- struct nsgtk_theme *theme)
-{
- GtkWidget *w = NULL;
-
- switch(i) {
-
-/* gtk_tool_button_new() accepts NULL args */
-#define MAKE_STOCKBUTTON(p, q) \
- case p##_BUTTON: { \
- GtkStockItem item; \
- char *label = NULL; \
- if (nsgtk_stock_lookup(q, &item) && \
- (item.label != NULL) && \
- ((label = remove_underscores(item.label, false)) != NULL)) { \
- w = GTK_WIDGET(gtk_tool_button_new(GTK_WIDGET( \
- theme->image[p##_BUTTON]), label)); \
- free(label); \
- } else { \
- w = GTK_WIDGET(gtk_tool_button_new(GTK_WIDGET( \
- theme->image[p##_BUTTON]), q)); \
- } \
- break; \
+static nserror
+set_item_sensitivity(struct nsgtk_toolbar_item *item, bool sensitivity)
+{
+ if (item->sensitivity != sensitivity) {
+ /* item requires sensitivity changing */
+ item->sensitivity = sensitivity;
+
+ if ((item->location != -1) && (item->button != NULL)) {
+ gtk_widget_set_sensitive(GTK_WIDGET(item->button),
+ item->sensitivity);
+ }
}
- MAKE_STOCKBUTTON(HOME, NSGTK_STOCK_HOME)
- MAKE_STOCKBUTTON(BACK, NSGTK_STOCK_GO_BACK)
- MAKE_STOCKBUTTON(FORWARD, NSGTK_STOCK_GO_FORWARD)
- MAKE_STOCKBUTTON(STOP, NSGTK_STOCK_STOP)
- MAKE_STOCKBUTTON(RELOAD, NSGTK_STOCK_REFRESH)
-#undef MAKE_STOCKBUTTON
+ return NSERROR_OK;
+}
- case HISTORY_BUTTON:
- w = GTK_WIDGET(gtk_tool_button_new(GTK_WIDGET(
- theme->image[HISTORY_BUTTON]), "H"));
- break;
- case URL_BAR_ITEM: {
- GtkWidget *entry = nsgtk_entry_new();
- w = GTK_WIDGET(gtk_tool_item_new());
+/**
+ * set an item to its alternative action
+ *
+ * this is currently only used for the stop/reload button where we
+ * also reuse the item sensitivity for the state indicator.
+ *
+ * \param tb the toolbar instance
+ */
+static nserror set_item_action(struct nsgtk_toolbar *tb, int itemid, bool alt)
+{
+ const char *iconname;
+ char *label = NULL;
- if ((entry == NULL) || (w == NULL)) {
- nsgtk_warning(messages_get("NoMemory"), 0);
- return NULL;
- }
+ if (itemid != RELOADSTOP_BUTTON) {
+ return NSERROR_INVALID;
+ }
+ if (tb->items[itemid].location == -1) {
+ return NSERROR_OK;
+ }
+ tb->items[itemid].sensitivity = alt;
- nsgtk_entry_set_icon_from_pixbuf(entry,
- GTK_ENTRY_ICON_PRIMARY,
- favicon_pixbuf);
+ if (tb->items[itemid].button == NULL) {
+ return NSERROR_INVALID;
+ }
+
+ if (tb->items[itemid].sensitivity) {
+ iconname = NSGTK_STOCK_REFRESH;
+ label = remove_underscores(messages_get("Reload"), false);
+
+ } else {
+ iconname = NSGTK_STOCK_STOP;
+ label = remove_underscores(messages_get("gtkStop"), false);
- gtk_container_add(GTK_CONTAINER(w), entry);
- gtk_tool_item_set_expand(GTK_TOOL_ITEM(w), TRUE);
- break;
}
+ gtk_tool_button_set_label(GTK_TOOL_BUTTON(tb->items[itemid].button),
+ label);
- case THROBBER_ITEM: {
- if ((nsgtk_throbber == NULL) ||
- (nsgtk_throbber->framedata == NULL) ||
- (nsgtk_throbber->framedata[0] == NULL)) {
- return NULL;
+ gtk_tool_button_set_icon_name(GTK_TOOL_BUTTON(tb->items[itemid].button),
+ iconname);
+
+ gtk_widget_set_sensitive(GTK_WIDGET(tb->items[itemid].button), TRUE);
+
+ if (label != NULL) {
+ free(label);
+ }
+
+ return NSERROR_OK;
+}
+
+
+/**
+ * cause the toolbar browsing context to navigate to a new url.
+ *
+ * \param tb the toolbar context.
+ * \param urltxt The url string.
+ * \return NSERROR_OK on success else appropriate error code.
+ */
+static nserror
+toolbar_navigate_to_url(struct nsgtk_toolbar *tb, const char *urltxt)
+{
+ struct browser_window *bw;
+ nsurl *url;
+ nserror res;
+
+ res = nsurl_create(urltxt, &url);
+ if (res != NSERROR_OK) {
+ return res;
+ }
+
+ bw = tb->get_bw(tb->get_ctx);
+
+ res = browser_window_navigate(bw,
+ url,
+ NULL,
+ BW_NAVIGATE_HISTORY,
+ NULL,
+ NULL,
+ NULL);
+ nsurl_unref(url);
+
+ return res;
+}
+
+
+/**
+ * run a gtk file chooser as a save dialog to obtain a path
+ */
+static nserror
+nsgtk_saveas_dialog(struct browser_window *bw,
+ const char *title,
+ GtkWindow *parent,
+ bool folder,
+ gchar **path_out)
+{
+ nserror res;
+ GtkWidget *fc; /* file chooser widget */
+ GtkFileChooserAction action;
+ char *path; /* proposed path */
+
+ if (!browser_window_has_content(bw)) {
+ /* cannot save a page with no content */
+ return NSERROR_INVALID;
+ }
+
+ if (folder) {
+ action = GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER;
+ } else {
+ action = GTK_FILE_CHOOSER_ACTION_SAVE;
+ }
+
+ fc = gtk_file_chooser_dialog_new(title,
+ parent,
+ action,
+ NSGTK_STOCK_CANCEL,
+ GTK_RESPONSE_CANCEL,
+ NSGTK_STOCK_SAVE,
+ GTK_RESPONSE_ACCEPT,
+ NULL);
+
+ /* set a default file name */
+ res = nsurl_nice(browser_window_access_url(bw), &path, false);
+ if (res != NSERROR_OK) {
+ path = strdup(messages_get("SaveText"));
+ if (path == NULL) {
+ gtk_widget_destroy(fc);
+ return NSERROR_NOMEM;
}
+ }
- if (edit_mode) {
- w = GTK_WIDGET(gtk_tool_button_new(GTK_WIDGET(
- gtk_image_new_from_pixbuf(
- nsgtk_throbber->framedata[0])),
- "[throbber]"));
- } else {
- GtkWidget *image;
+ if ((!folder) || (access(path, F_OK) != 0)) {
+ gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(fc), path);
+ }
+ free(path);
- w = GTK_WIDGET(gtk_tool_item_new());
+ /* confirm overwriting */
+ gtk_file_chooser_set_do_overwrite_confirmation(GTK_FILE_CHOOSER(fc), TRUE);
- image = gtk_image_new_from_pixbuf(nsgtk_throbber->framedata[0]);
- if (image != NULL) {
- nsgtk_widget_set_alignment(image,
- GTK_ALIGN_CENTER,
- GTK_ALIGN_CENTER);
- nsgtk_widget_set_margins(image, 3, 0);
+ /* run the dialog to let user select path */
+ if (gtk_dialog_run(GTK_DIALOG(fc)) != GTK_RESPONSE_ACCEPT) {
+ gtk_widget_destroy(fc);
+ return NSERROR_NOT_FOUND;
+ }
- gtk_container_add(GTK_CONTAINER(w), image);
- }
+ *path_out = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(fc));
+
+ gtk_widget_destroy(fc);
+
+ return NSERROR_OK;
+}
+
+
+/**
+ * connect all signals to widgets in a customisation
+ */
+static nserror
+toolbar_customisation_connect_signals(struct nsgtk_toolbar *tb)
+{
+ int iidx;
+
+ for (iidx = BACK_BUTTON; iidx < PLACEHOLDER_BUTTON; iidx++) {
+ /* skip inactive items in toolbar */
+ if (tb->items[iidx].location != INACTIVE_LOCATION) {
+ toolbar_item_connect_signals(tb, iidx);
}
- break;
}
- case WEBSEARCH_ITEM: {
- if (edit_mode)
- return GTK_WIDGET(gtk_tool_button_new(GTK_WIDGET(
- nsgtk_image_new_from_stock(NSGTK_STOCK_FIND,
- GTK_ICON_SIZE_LARGE_TOOLBAR)),
- "[websearch]"));
+ /* add move button listeners */
+ g_signal_connect(tb->widget,
+ "drag-drop",
+ G_CALLBACK(customisation_toolbar_drag_drop_cb),
+ tb);
+ g_signal_connect(tb->widget,
+ "drag-data-received",
+ G_CALLBACK(customisation_toolbar_drag_data_received_cb),
+ tb);
+ g_signal_connect(tb->widget,
+ "drag-motion",
+ G_CALLBACK(customisation_toolbar_drag_motion_cb),
+ tb);
+ g_signal_connect(tb->widget,
+ "drag-leave",
+ G_CALLBACK(customisation_toolbar_drag_leave_cb),
+ tb);
+
+ /* set data types */
+ gtk_drag_dest_set(GTK_WIDGET(tb->widget),
+ GTK_DEST_DEFAULT_MOTION | GTK_DEST_DEFAULT_DROP,
+ &target_entry,
+ 1,
+ GDK_ACTION_COPY);
- GtkWidget *entry = nsgtk_entry_new();
+ return NSERROR_OK;
+}
- w = GTK_WIDGET(gtk_tool_item_new());
- if ((entry == NULL) || (w == NULL)) {
- nsgtk_warning(messages_get("NoMemory"), 0);
- return NULL;
+static void
+item_size_allocate_cb(GtkWidget *widget,
+ GdkRectangle *alloc,
+ gpointer user_data)
+{
+ if (alloc->width > NSGTK_BUTTON_WIDTH) {
+ alloc->width = NSGTK_BUTTON_WIDTH;
+ }
+ if (alloc->height > NSGTK_BUTTON_HEIGHT) {
+ alloc->height = NSGTK_BUTTON_HEIGHT;
+ }
+ gtk_widget_set_allocation(widget, alloc);
+}
+
+
+/**
+ * add a row to a toolbar customisation toolbox
+ *
+ * \param tbc The toolbar customisation context
+ * \param startitem The item index of the beginning of the row
+ * \param enditem The item index of the beginning of the next row
+ * \return NSERROR_OK on successs else error
+ */
+static nserror
+add_toolbox_row(struct nsgtk_toolbar_customisation *tbc,
+ int startitem,
+ int enditem)
+{
+ GtkToolbar *rowbar;
+ int iidx;
+
+ rowbar = GTK_TOOLBAR(gtk_toolbar_new());
+ if (rowbar == NULL) {
+ return NSERROR_NOMEM;
+ }
+
+ gtk_toolbar_set_style(rowbar, GTK_TOOLBAR_BOTH);
+ gtk_toolbar_set_icon_size(rowbar, GTK_ICON_SIZE_LARGE_TOOLBAR);
+ gtk_box_pack_start(tbc->toolbox, GTK_WIDGET(rowbar), FALSE, FALSE, 0);
+
+ for (iidx = startitem; iidx < enditem; iidx++) {
+ if (tbc->items[iidx] == NULL) {
+ /* skip any widgets that failed to initialise */
+ continue;
}
+ gtk_widget_set_size_request(GTK_WIDGET(tbc->items[iidx]),
+ NSGTK_BUTTON_WIDTH,
+ NSGTK_BUTTON_HEIGHT);
+ gtk_tool_item_set_use_drag_window(tbc->items[iidx], TRUE);
+ gtk_drag_source_set(GTK_WIDGET(tbc->items[iidx]),
+ GDK_BUTTON1_MASK,
+ &target_entry,
+ 1,
+ GDK_ACTION_COPY);
+ g_signal_connect(tbc->items[iidx],
+ "drag-data-get",
+ G_CALLBACK(tbc->toolbar.items[iidx].dataplus),
+ &tbc->toolbar);
+ g_signal_connect(tbc->items[iidx],
+ "size-allocate",
+ G_CALLBACK(item_size_allocate_cb),
+ NULL);
+ gtk_toolbar_insert(rowbar, tbc->items[iidx], -1);
+ }
+ return NSERROR_OK;
+}
- gtk_widget_set_size_request(entry, NSGTK_WEBSEARCH_WIDTH, -1);
- nsgtk_entry_set_icon_from_stock(entry, GTK_ENTRY_ICON_PRIMARY,
- NSGTK_STOCK_INFO);
+/**
+ * creates widgets in customisation toolbox
+ *
+ * \param tbc The toolbar customisation context
+ * \param width The width to layout the toolbox to
+ * \return NSERROR_OK on success else error code.
+ */
+static nserror
+toolbar_customisation_create_toolbox(struct nsgtk_toolbar_customisation *tbc,
+ int width)
+{
+ int columns; /* number of items in a single row */
+ int curcol; /* current column in creation */
+ int iidx; /* item index */
+ int startidx; /* index of item at start of row */
+
+ /* ensure there are a minimum number of items per row */
+ columns = width / NSGTK_BUTTON_WIDTH;
+ if (columns < NSGTK_MIN_STORE_COLUMNS) {
+ columns = NSGTK_MIN_STORE_COLUMNS;
+ }
- gtk_container_add(GTK_CONTAINER(w), entry);
- break;
+ curcol = 0;
+ for (iidx = startidx = BACK_BUTTON; iidx < PLACEHOLDER_BUTTON; iidx++) {
+ if (curcol >= columns) {
+ add_toolbox_row(tbc, startidx, iidx);
+ curcol = 0;
+ startidx = iidx;
+ }
+ tbc->items[iidx] = make_toolbox_item(iidx, false);
+ if (tbc->items[iidx] != NULL) {
+ curcol++;
+ }
+ }
+ if (curcol > 0) {
+ add_toolbox_row(tbc, startidx, iidx);
}
-/* gtk_tool_button_new accepts NULL args */
-#define MAKE_MENUBUTTON(p, q) \
- case p##_BUTTON: { \
- char *label = NULL; \
- label = remove_underscores(messages_get(#q), false); \
- w = GTK_WIDGET(gtk_tool_button_new(GTK_WIDGET( \
- theme->image[p##_BUTTON]), label)); \
- if (label != NULL) \
- free(label); \
- break; \
- }
-
- MAKE_MENUBUTTON(NEWWINDOW, gtkNewWindow)
- MAKE_MENUBUTTON(NEWTAB, gtkNewTab)
- MAKE_MENUBUTTON(OPENFILE, gtkOpenFile)
- MAKE_MENUBUTTON(CLOSETAB, gtkCloseTab)
- MAKE_MENUBUTTON(CLOSEWINDOW, gtkCloseWindow)
- MAKE_MENUBUTTON(SAVEPAGE, gtkSavePage)
- MAKE_MENUBUTTON(PRINTPREVIEW, gtkPrintPreview)
- MAKE_MENUBUTTON(PRINT, gtkPrint)
- MAKE_MENUBUTTON(QUIT, gtkQuitMenu)
- MAKE_MENUBUTTON(CUT, gtkCut)
- MAKE_MENUBUTTON(COPY, gtkCopy)
- MAKE_MENUBUTTON(PASTE, gtkPaste)
- MAKE_MENUBUTTON(DELETE, gtkDelete)
- MAKE_MENUBUTTON(SELECTALL, gtkSelectAll)
- MAKE_MENUBUTTON(PREFERENCES, gtkPreferences)
- MAKE_MENUBUTTON(ZOOMPLUS, gtkZoomPlus)
- MAKE_MENUBUTTON(ZOOMMINUS, gtkZoomMinus)
- MAKE_MENUBUTTON(ZOOMNORMAL, gtkZoomNormal)
- MAKE_MENUBUTTON(FULLSCREEN, gtkFullScreen)
- MAKE_MENUBUTTON(VIEWSOURCE, gtkViewSource)
- MAKE_MENUBUTTON(CONTENTS, gtkContents)
- MAKE_MENUBUTTON(ABOUT, gtkAbout)
- MAKE_MENUBUTTON(PDF, gtkPDF)
- MAKE_MENUBUTTON(PLAINTEXT, gtkPlainText)
- MAKE_MENUBUTTON(DRAWFILE, gtkDrawFile)
- MAKE_MENUBUTTON(POSTSCRIPT, gtkPostScript)
- MAKE_MENUBUTTON(FIND, gtkFind)
- MAKE_MENUBUTTON(DOWNLOADS, gtkDownloads)
- MAKE_MENUBUTTON(SAVEWINDOWSIZE, gtkSaveWindowSize)
- MAKE_MENUBUTTON(TOGGLEDEBUGGING, gtkToggleDebugging)
- MAKE_MENUBUTTON(SAVEBOXTREE, gtkDebugBoxTree)
- MAKE_MENUBUTTON(SAVEDOMTREE, gtkDebugDomTree)
- MAKE_MENUBUTTON(LOCALHISTORY, gtkLocalHistory)
- MAKE_MENUBUTTON(GLOBALHISTORY, gtkGlobalHistory)
- MAKE_MENUBUTTON(ADDBOOKMARKS, gtkAddBookMarks)
- MAKE_MENUBUTTON(SHOWBOOKMARKS, gtkShowBookMarks)
- MAKE_MENUBUTTON(SHOWCOOKIES, gtkShowCookies)
- MAKE_MENUBUTTON(OPENLOCATION, gtkOpenLocation)
- MAKE_MENUBUTTON(NEXTTAB, gtkNextTab)
- MAKE_MENUBUTTON(PREVTAB, gtkPrevTab)
- MAKE_MENUBUTTON(GUIDE, gtkGuide)
- MAKE_MENUBUTTON(INFO, gtkUserInformation)
-#undef MAKE_MENUBUTTON
+ return NSERROR_OK;
+}
- default:
- break;
+/**
+ * update toolbar in customisation to user settings
+ */
+static nserror
+customisation_toolbar_update(struct nsgtk_toolbar_customisation *tbc)
+{
+ nserror res;
+
+ res = apply_user_button_customisation(&tbc->toolbar);
+ if (res != NSERROR_OK) {
+ return res;
+ }
+
+ /* populate toolbar widget */
+ res = customisation_toolbar_populate(&tbc->toolbar);
+ if (res != NSERROR_OK) {
+ return res;
+ }
+
+ /* ensure icon sizes and text labels on toolbar are set */
+ res = nsgtk_toolbar_restyle(&tbc->toolbar);
+ if (res != NSERROR_OK) {
+ return res;
+ }
+
+ /* attach handlers to toolbar widgets */
+ res = toolbar_customisation_connect_signals(&tbc->toolbar);
+ if (res != NSERROR_OK) {
+ return res;
}
- return w;
+
+ return NSERROR_OK;
}
+
/**
- * called when a widget is dropped onto the toolbar
+ * customisation apply handler for clicked signal
+ *
+ * when 'save settings' button is clicked
+ */
+static gboolean
+customisation_apply_clicked_cb(GtkWidget *widget, gpointer data)
+{
+ struct nsgtk_toolbar_customisation *tbc;
+ tbc = (struct nsgtk_toolbar_customisation *)data;
+
+ /* save state to file, update toolbars for all windows */
+ nsgtk_toolbar_customisation_save(&tbc->toolbar);
+ nsgtk_window_toolbar_update();
+ gtk_widget_destroy(tbc->container);
+
+ return TRUE;
+}
+
+
+/**
+ * customisation reset handler for clicked signal
+ *
+ * when 'reload defaults' button is clicked
*/
static gboolean
-nsgtk_toolbar_data(GtkWidget *widget,
- GdkDragContext *gdc,
- gint x,
- gint y,
- guint time,
- gpointer data)
-{
- struct nsgtk_scaffolding *g = (struct nsgtk_scaffolding *)data;
- int ind = gtk_toolbar_get_drop_index(nsgtk_scaffolding_toolbar(g),
- x, y);
- int q, i;
- if (window->currentbutton == -1)
+customisation_reset_clicked_cb(GtkWidget *widget, gpointer data)
+{
+ struct nsgtk_toolbar_customisation *tbc;
+ tbc = (struct nsgtk_toolbar_customisation *)data;
+
+ customisation_toolbar_update(tbc);
+
+ return TRUE;
+}
+
+
+/**
+ * customisation container destroy handler
+ */
+static void customisation_container_destroy_cb(GtkWidget *widget, gpointer data)
+{
+ struct nsgtk_toolbar_customisation *tbc;
+ tbc = (struct nsgtk_toolbar_customisation *)data;
+
+ free(tbc);
+}
+
+/*
+ * Toolbar button clicked handlers
+ */
+
+/**
+ * create a toolbar customisation tab
+ *
+ * this is completely different approach to previous implementation. it
+ * is not modal and the toolbar configuration is performed completely
+ * within the tab. once the user is happy they can apply the change or
+ * cancel as they see fit while continuing to use the browser as usual.
+ */
+static gboolean cutomize_button_clicked_cb(GtkWidget *widget, gpointer data)
+{
+ struct nsgtk_toolbar_customisation *tbc;
+ nserror res;
+ GtkBuilder *builder;
+ GtkNotebook *notebook; /* notebook containing widget */
+ GtkAllocation notebook_alloc; /* notebook size allocation */
+ int iidx; /* item index */
+
+ /* obtain the notebook being added to */
+ notebook = GTK_NOTEBOOK(gtk_widget_get_ancestor(widget,
+ GTK_TYPE_NOTEBOOK));
+ if (notebook == NULL) {
return TRUE;
- struct nsgtk_theme *theme =
- nsgtk_theme_load(GTK_ICON_SIZE_LARGE_TOOLBAR, false);
- if (theme == NULL) {
- nsgtk_warning(messages_get("NoMemory"), 0);
+ }
+
+ /* create builder */
+ res = nsgtk_builder_new_from_resname("toolbar", &builder);
+ if (res != NSERROR_OK) {
+ NSLOG(netsurf, INFO, "Toolbar UI builder init failed");
return TRUE;
}
- if (nsgtk_scaffolding_button(g, window->currentbutton)->location
- != -1) {
- /* widget was already in the toolbar; so replace */
- if (nsgtk_scaffolding_button(g, window->currentbutton)->
- location < ind)
- ind--;
- gtk_container_remove(GTK_CONTAINER(
- nsgtk_scaffolding_toolbar(g)), GTK_WIDGET(
- nsgtk_scaffolding_button(g,
- window->currentbutton)->button));
- /* 'move' all widgets further right than the original location,
- * one place to the left in logical schema */
- for (i = nsgtk_scaffolding_button(g, window->currentbutton)->
- location + 1; i < PLACEHOLDER_BUTTON; i++) {
- q = nsgtk_toolbar_get_id_at_location(g, i);
- if (q == -1)
- continue;
- nsgtk_scaffolding_button(g, q)->location--;
- }
- nsgtk_scaffolding_button(g, window->currentbutton)->
- location = -1;
- }
- nsgtk_scaffolding_button(g, window->currentbutton)->button =
- GTK_TOOL_ITEM(nsgtk_toolbar_make_widget(g,
- window->currentbutton, theme));
- free(theme);
- if (nsgtk_scaffolding_button(g, window->currentbutton)->button
- == NULL) {
- nsgtk_warning("NoMemory", 0);
+ gtk_builder_connect_signals(builder, NULL);
+
+ /* create nsgtk_toolbar_customisation which has nsgtk_toolbar
+ * at the front so we can reuse functions that take
+ * nsgtk_toolbar
+ */
+ tbc = calloc(1, sizeof(struct nsgtk_toolbar_customisation));
+ if (tbc == NULL) {
+ g_object_unref(builder);
return TRUE;
}
- /* update logical schema */
- nsgtk_scaffolding_reset_offset(g);
- /* 'move' all widgets further right than the new location, one place to
- * the right in logical schema */
- for (i = PLACEHOLDER_BUTTON - 1; i >= ind; i--) {
- q = nsgtk_toolbar_get_id_at_location(g, i);
- if (q == -1)
- continue;
- nsgtk_scaffolding_button(g, q)->location++;
+
+ /* get container box widget which forms a page of the tabs */
+ tbc->container = GTK_WIDGET(gtk_builder_get_object(builder, "customisation"));
+ if (tbc->container == NULL) {
+ goto cutomize_button_clicked_cb_error;
+ }
+
+ /* vertical box for the toolbox to drag items into and out of */
+ tbc->toolbox = GTK_BOX(gtk_builder_get_object(builder, "toolbox"));
+ if (tbc->toolbox == NULL) {
+ goto cutomize_button_clicked_cb_error;
}
- nsgtk_scaffolding_button(g, window->currentbutton)->location = ind;
- /* complete action */
- GtkToolItem *current_button;
+ /* customisation toolbar container */
+ tbc->toolbar.widget = GTK_TOOLBAR(gtk_builder_get_object(builder, "toolbar"));
+ if (tbc->toolbar.widget == NULL) {
+ goto cutomize_button_clicked_cb_error;
+ }
- current_button = GTK_TOOL_ITEM(nsgtk_scaffolding_button(g, window->currentbutton)->button);
+ /* build customisation toolbar */
+ gtk_toolbar_set_show_arrow(tbc->toolbar.widget, TRUE);
- gtk_toolbar_insert(nsgtk_scaffolding_toolbar(g), current_button, ind);
+ for (iidx = BACK_BUTTON; iidx < PLACEHOLDER_BUTTON; iidx++) {
+ res = toolbar_item_create(iidx, &tbc->toolbar.items[iidx]);
+ if (res != NSERROR_OK) {
+ goto cutomize_button_clicked_cb_error;
+ }
+ }
+
+ res = customisation_toolbar_update(tbc);
+ if (res != NSERROR_OK) {
+ goto cutomize_button_clicked_cb_error;
+ }
+
+ /* use toolbox for widgets to drag to/from */
+ gtk_widget_get_allocation(GTK_WIDGET(notebook), &notebook_alloc);
+
+ res = toolbar_customisation_create_toolbox(tbc, notebook_alloc.width);
+ if (res != NSERROR_OK) {
+ goto cutomize_button_clicked_cb_error;
+ }
+
+ /* configure the container */
+ gtk_drag_dest_set(GTK_WIDGET(tbc->container),
+ GTK_DEST_DEFAULT_MOTION | GTK_DEST_DEFAULT_DROP,
+ &target_entry,
+ 1,
+ GDK_ACTION_COPY);
+
+ /* discard button calls destroy */
+ g_signal_connect_swapped(GTK_WIDGET(gtk_builder_get_object(builder,
+ "discard")),
+ "clicked",
+ G_CALLBACK(gtk_widget_destroy),
+ tbc->container);
+
+ /* save and update on apply button */
+ g_signal_connect(GTK_WIDGET(gtk_builder_get_object(builder, "apply")),
+ "clicked",
+ G_CALLBACK(customisation_apply_clicked_cb),
+ tbc);
+
+ g_signal_connect(GTK_WIDGET(gtk_builder_get_object(builder, "reset")),
+ "clicked",
+ G_CALLBACK(customisation_reset_clicked_cb),
+ tbc);
+
+ /* close and cleanup on delete signal */
+ g_signal_connect(tbc->container,
+ "destroy",
+ G_CALLBACK(customisation_container_destroy_cb),
+ tbc);
- gtk_tool_item_set_use_drag_window(current_button, TRUE);
- gtk_drag_source_set(GTK_WIDGET(current_button),
- GDK_BUTTON1_MASK, &entry, 1,
- GDK_ACTION_COPY);
- nsgtk_toolbar_temp_connect(g, window->currentbutton);
- gtk_widget_show_all(GTK_WIDGET(current_button));
+ g_signal_connect(tbc->container,
+ "drag-drop",
+ G_CALLBACK(customisation_container_drag_drop_cb),
+ tbc);
- window->currentbutton = -1;
+ g_signal_connect(tbc->container,
+ "drag-motion",
+ G_CALLBACK(customisation_container_drag_motion_cb),
+ tbc);
+
+ nsgtk_tab_add_page(notebook,
+ tbc->container,
+ false,
+ messages_get("gtkCustomizeToolbarTitle"),
+ favicon_pixbuf);
+
+
+ /* safe to drop the reference to the builder as the container is
+ * referenced by the notebook now.
+ */
+ g_object_unref(builder);
+
+ return TRUE;
+
+ cutomize_button_clicked_cb_error:
+ free(tbc);
+ g_object_unref(builder);
return TRUE;
+
}
+
/**
- * connected to toolbutton drop; perhaps one day it'll work properly so it may
- * replace the global current_button
+ * callback for all toolbar items widget size allocation
+ *
+ * handler connected to all toolbar items for the size-allocate signal
+ *
+ * \param widget The widget the signal is being delivered to.
+ * \param alloc The size allocation being set.
+ * \param data The toolbar context passed when the signal was connected
+ */
+static void
+toolbar_item_size_allocate_cb(GtkWidget *widget,
+ GtkAllocation *alloc,
+ gpointer data)
+{
+ struct nsgtk_toolbar *tb = (struct nsgtk_toolbar *)data;
+ nsgtk_toolbar_button itemid;
+
+ itemid = itemid_from_gtktoolitem(tb, GTK_TOOL_ITEM(widget));
+
+ if ((tb->toolbarmem == alloc->x) ||
+ (tb->items[itemid].location < tb->items[HISTORY_BUTTON].location)) {
+ /*
+ * no reallocation after first adjustment,
+ * no reallocation for buttons left of history button
+ */
+ return;
+ }
+
+ if (itemid == HISTORY_BUTTON) {
+ if (alloc->width == 20) {
+ return;
+ }
+
+ tb->toolbarbase = alloc->y + alloc->height;
+ tb->historybase = alloc->x + 20;
+ if (tb->offset == 0) {
+ tb->offset = alloc->width - 20;
+ }
+ alloc->width = 20;
+ } else if (tb->items[itemid].location <= tb->items[URL_BAR_ITEM].location) {
+ alloc->x -= tb->offset;
+ if (itemid == URL_BAR_ITEM) {
+ alloc->width += tb->offset;
+ }
+ }
+ tb->toolbarmem = alloc->x;
+
+ gtk_widget_size_allocate(widget, alloc);
+}
+
+
+/**
+ * handler for back tool bar item clicked signal
+ *
+ * \param widget The widget the signal is being delivered to.
+ * \param data The toolbar context passed when the signal was connected
+ * \return TRUE
*/
static gboolean
-nsgtk_toolbar_move_complete(GtkWidget *widget,
- GdkDragContext *gdc,
- gint x,
- gint y,
- GtkSelectionData *selection,
- guint info,
- guint time,
- gpointer data)
+back_button_clicked_cb(GtkWidget *widget, gpointer data)
{
- return FALSE;
+ struct nsgtk_toolbar *tb = (struct nsgtk_toolbar *)data;
+ struct browser_window *bw;
+
+ bw = tb->get_bw(tb->get_ctx);
+
+ if ((bw != NULL) && browser_window_history_back_available(bw)) {
+ /* clear potential search effects */
+ browser_window_search_clear(bw);
+
+ browser_window_history_back(bw, false);
+
+ set_item_sensitivity(&tb->items[BACK_BUTTON],
+ browser_window_history_back_available(bw));
+ set_item_sensitivity(&tb->items[FORWARD_BUTTON],
+ browser_window_history_forward_available(bw));
+
+ nsgtk_local_history_hide();
+ }
+ return TRUE;
}
+
/**
- * called when hovering an item above the toolbar
+ * handler for forward tool bar item clicked signal
+ *
+ * \param widget The widget the signal is being delivered to.
+ * \param data The toolbar context passed when the signal was connected
+ * \return TRUE
*/
static gboolean
-nsgtk_toolbar_action(GtkWidget *widget, GdkDragContext *gdc, gint x,
- gint y, guint time, gpointer data)
-{
- struct nsgtk_scaffolding *g = (struct nsgtk_scaffolding *)data;
- GtkToolItem *item = gtk_tool_button_new(NULL, NULL);
- if (item != NULL)
- gtk_toolbar_set_drop_highlight_item(
- nsgtk_scaffolding_toolbar(g),
- GTK_TOOL_ITEM(item),
- gtk_toolbar_get_drop_index(
- nsgtk_scaffolding_toolbar(g), x, y));
- return FALSE;
+forward_button_clicked_cb(GtkWidget *widget, gpointer data)
+{
+ struct nsgtk_toolbar *tb = (struct nsgtk_toolbar *)data;
+ struct browser_window *bw;
+
+ bw = tb->get_bw(tb->get_ctx);
+
+ if ((bw != NULL) && browser_window_history_forward_available(bw)) {
+ /* clear potential search effects */
+ browser_window_search_clear(bw);
+
+ browser_window_history_forward(bw, false);
+
+ set_item_sensitivity(&tb->items[BACK_BUTTON],
+ browser_window_history_back_available(bw));
+ set_item_sensitivity(&tb->items[FORWARD_BUTTON],
+ browser_window_history_forward_available(bw));
+ nsgtk_local_history_hide();
+ }
+ return TRUE;
}
+
/**
- * called when hovering stops
+ * handler for stop tool bar item clicked signal
+ *
+ * \param widget The widget the signal is being delivered to.
+ * \param data The toolbar context passed when the signal was connected
+ * \return TRUE
*/
-static void
-nsgtk_toolbar_clear(GtkWidget *widget, GdkDragContext *gdc, guint time,
- gpointer data)
+static gboolean
+stop_button_clicked_cb(GtkWidget *widget, gpointer data)
{
- gtk_toolbar_set_drop_highlight_item(GTK_TOOLBAR(widget), NULL, 0);
+ struct nsgtk_toolbar *tb = (struct nsgtk_toolbar *)data;
+
+ browser_window_stop(tb->get_bw(tb->get_ctx));
+
+ return TRUE;
}
+
/**
- * add item to toolbar.
+ * handler for reload tool bar item clicked signal
*
- * the function should be called, when multiple items are being added,
- * in ascending order.
+ * \param widget The widget the signal is being delivered to.
+ * \param data The toolbar context passed when the signal was connected
+ * \return TRUE
+ */
+static gboolean
+reload_button_clicked_cb(GtkWidget *widget, gpointer data)
+{
+ struct nsgtk_toolbar *tb = (struct nsgtk_toolbar *)data;
+ struct browser_window *bw;
+
+ bw = tb->get_bw(tb->get_ctx);
+
+ /* clear potential search effects */
+ browser_window_search_clear(bw);
+
+ browser_window_reload(bw, true);
+
+ return TRUE;
+}
+
+
+/**
+ * handler for reload/stop tool bar item clicked signal
+ *
+ * \param widget The widget the signal is being delivered to.
+ * \param data The toolbar context passed when the signal was connected
+ * \return TRUE
+ */
+static gboolean
+reloadstop_button_clicked_cb(GtkWidget *widget, gpointer data)
+{
+ struct nsgtk_toolbar *tb = (struct nsgtk_toolbar *)data;
+ struct browser_window *bw;
+
+ bw = tb->get_bw(tb->get_ctx);
+
+ /* clear potential search effects */
+ browser_window_search_clear(bw);
+
+ if (tb->items[RELOADSTOP_BUTTON].sensitivity) {
+ browser_window_reload(bw, true);
+ } else {
+ browser_window_stop(tb->get_bw(tb->get_ctx));
+ }
+
+ return TRUE;
+}
+
+
+/**
+ * handler for home tool bar item clicked signal
+ *
+ * \param widget The widget the signal is being delivered to.
+ * \param data The toolbar context passed when the signal was connected
+ * \return TRUE
+ */
+static gboolean
+home_button_clicked_cb(GtkWidget *widget, gpointer data)
+{
+ struct nsgtk_toolbar *tb = (struct nsgtk_toolbar *)data;
+ nserror res;
+ const char *addr;
+
+ if (nsoption_charp(homepage_url) != NULL) {
+ addr = nsoption_charp(homepage_url);
+ } else {
+ addr = NETSURF_HOMEPAGE;
+ }
+
+ res = toolbar_navigate_to_url(tb, addr);
+ if (res != NSERROR_OK) {
+ nsgtk_warning(messages_get_errorcode(res), 0);
+ }
+
+ return TRUE;
+}
+
+
+/**
+ * callback for url entry widget activation
+ *
+ * handler connected to url entry widget for the activate signal
+ *
+ * \param widget The widget the signal is being delivered to.
+ * \param data The toolbar context passed when the signal was connected
+ * \return TRUE to allow activation.
+ */
+static gboolean url_entry_activate_cb(GtkWidget *widget, gpointer data)
+{
+ nserror res;
+ struct nsgtk_toolbar *tb = (struct nsgtk_toolbar *)data;
+ struct browser_window *bw;
+ nsurl *url;
+
+ res = search_web_omni(gtk_entry_get_text(GTK_ENTRY(widget)),
+ SEARCH_WEB_OMNI_NONE,
+ &url);
+ if (res == NSERROR_OK) {
+ bw = tb->get_bw(tb->get_ctx);
+ res = browser_window_navigate(
+ bw, url, NULL, BW_NAVIGATE_HISTORY, NULL, NULL, NULL);
+ nsurl_unref(url);
+ }
+ if (res != NSERROR_OK) {
+ nsgtk_warning(messages_get_errorcode(res), 0);
+ }
+
+ return TRUE;
+}
+
+
+/**
+ * callback for url entry widget changing
*
- * \param g the scaffolding whose toolbar an item is added to.
- * \param i the location in the toolbar.
- * \param theme The theme in use.
+ * handler connected to url entry widget for the change signal
+ *
+ * \param widget The widget the signal is being delivered to.
+ * \param event The key change event that changed the entry.
+ * \param data The toolbar context passed when the signal was connected
+ * \return TRUE to allow activation.
+ */
+static gboolean
+url_entry_changed_cb(GtkWidget *widget, GdkEventKey *event, gpointer data)
+{
+ return nsgtk_completion_update(GTK_ENTRY(widget));
+}
+
+
+/**
+ * callback for url entry widget icon button release
+ *
+ * handler connected to url entry widget for the icon release signal
+ *
+ * \param widget The widget the signal is being delivered to.
+ * \param event The key change event that changed the entry.
+ * \param data The toolbar context passed when the signal was connected
+ * \return TRUE to allow activation.
*/
static void
-nsgtk_toolbar_add_item_to_toolbar(struct nsgtk_scaffolding *g, int i,
- struct nsgtk_theme *theme)
-{
- int q;
- for (q = BACK_BUTTON; q < PLACEHOLDER_BUTTON; q++)
- if (nsgtk_scaffolding_button(g, q)->location == i) {
- nsgtk_scaffolding_button(g, q)->button = GTK_TOOL_ITEM(
- nsgtk_toolbar_make_widget(g, q,
- theme));
- gtk_toolbar_insert(nsgtk_scaffolding_toolbar(g),
- nsgtk_scaffolding_button(g, q)->button,
- i);
- break;
- }
+url_entry_icon_release_cb(GtkEntry *entry,
+ GtkEntryIconPosition icon_pos,
+ GdkEvent *event,
+ gpointer data)
+{
+ struct nsgtk_toolbar *tb = (struct nsgtk_toolbar *)data;
+ struct browser_window *bw;
+
+ bw = tb->get_bw(tb->get_ctx);
+
+ nsgtk_page_info(bw);
}
+
/**
- * cleanup code physical update of all toolbars; resensitize
- * \param g the 'front' scaffolding that called customize
+ * handler for web search tool bar entry item activate signal
+ *
+ * handler connected to web search entry widget for the activate signal
+ *
+ * \todo make this user selectable to switch between opening in new
+ * and navigating current window. Possibly improve core search_web interfaces
+ *
+ * \param widget The widget the signal is being delivered to.
+ * \param data The toolbar context passed when the signal was connected
+ * \return TRUE
*/
-static void nsgtk_toolbar_close(struct nsgtk_scaffolding *g)
+static gboolean websearch_entry_activate_cb(GtkWidget *widget, gpointer data)
{
- int i;
+ nserror res;
+ struct nsgtk_toolbar *tb = (struct nsgtk_toolbar *)data;
+ struct browser_window *bw;
+ nsurl *url;
+
+ res = search_web_omni(gtk_entry_get_text(GTK_ENTRY(widget)),
+ SEARCH_WEB_OMNI_SEARCHONLY,
+ &url);
+ if (res == NSERROR_OK) {
+ bw = tb->get_bw(tb->get_ctx);
+
+ res = browser_window_create(
+ BW_CREATE_HISTORY | BW_CREATE_TAB | BW_CREATE_FOREGROUND,
+ url,
+ NULL,
+ bw,
+ NULL);
+ nsurl_unref(url);
+ }
+ if (res != NSERROR_OK) {
+ nsgtk_warning(messages_get_errorcode(res), 0);
+ }
- struct nsgtk_scaffolding *list;
- struct nsgtk_theme *theme;
+ return TRUE;
+}
- list = nsgtk_scaffolding_iterate(NULL);
- while (list) {
- theme = nsgtk_theme_load(GTK_ICON_SIZE_LARGE_TOOLBAR, false);
- if (theme == NULL) {
- nsgtk_warning(messages_get("NoMemory"), 0);
- continue;
- }
- /* clear toolbar */
- gtk_container_foreach(GTK_CONTAINER(nsgtk_scaffolding_toolbar(
- list)), nsgtk_toolbar_clear_toolbar, list);
- /* then add items */
- for (i = BACK_BUTTON; i < PLACEHOLDER_BUTTON; i++) {
- nsgtk_toolbar_add_item_to_toolbar(list, i, theme);
+/**
+ * handler for web search tool bar item button press signal
+ *
+ * allows a click in the websearch entry field to clear the name of the
+ * provider.
+ *
+ * \todo this does not work well, different behaviour wanted perhaps?
+ *
+ * \param widget The widget the signal is being delivered to.
+ * \param data The toolbar context passed when the signal was connected
+ * \return TRUE
+ */
+static gboolean
+websearch_entry_button_press_cb(GtkWidget *widget,
+ GdkEventFocus *f,
+ gpointer data)
+{
+ gtk_editable_select_region(GTK_EDITABLE(widget), 0, -1);
+ gtk_widget_grab_focus(GTK_WIDGET(widget));
+
+ return TRUE;
+}
+
+
+/**
+ * handler for new window tool bar item clicked signal
+ *
+ * \param widget The widget the signal is being delivered to.
+ * \param data The toolbar context passed when the signal was connected
+ * \return TRUE
+ */
+static gboolean
+newwindow_button_clicked_cb(GtkWidget *widget, gpointer data)
+{
+ nserror res;
+ struct nsgtk_toolbar *tb = (struct nsgtk_toolbar *)data;
+
+ res = nsgtk_browser_window_create(tb->get_bw(tb->get_ctx), false);
+ if (res != NSERROR_OK) {
+ nsgtk_warning(messages_get_errorcode(res), 0);
+ }
+
+ return TRUE;
+}
+
+
+/**
+ * handler for new tab tool bar item clicked signal
+ *
+ * \param widget The widget the signal is being delivered to.
+ * \param data The toolbar context passed when the signal was connected
+ * \return TRUE
+ */
+static gboolean
+newtab_button_clicked_cb(GtkWidget *widget, gpointer data)
+{
+ nserror res;
+ struct nsgtk_toolbar *tb = (struct nsgtk_toolbar *)data;
+
+ res = nsgtk_browser_window_create(tb->get_bw(tb->get_ctx), true);
+ if (res != NSERROR_OK) {
+ nsgtk_warning(messages_get_errorcode(res), 0);
+ }
+ return TRUE;
+}
+
+
+/**
+ * handler for open file tool bar item clicked signal
+ *
+ * \param widget The widget the signal is being delivered to.
+ * \param data The toolbar context passed when the signal was connected
+ * \return TRUE
+ */
+static gboolean
+openfile_button_clicked_cb(GtkWidget *widget, gpointer data)
+{
+ GtkWidget *dlgOpen;
+ gint response;
+ GtkWidget *toplevel;
+ struct nsgtk_toolbar *tb = (struct nsgtk_toolbar *)data;
+ struct browser_window *bw;
+
+ toplevel = gtk_widget_get_ancestor(widget, GTK_TYPE_WINDOW);
+
+ dlgOpen = gtk_file_chooser_dialog_new("Open File",
+ GTK_WINDOW(toplevel),
+ GTK_FILE_CHOOSER_ACTION_OPEN,
+ NSGTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+ NSGTK_STOCK_OPEN, GTK_RESPONSE_OK,
+ NULL, NULL);
+
+ response = gtk_dialog_run(GTK_DIALOG(dlgOpen));
+ if (response == GTK_RESPONSE_OK) {
+ char *urltxt;
+ gchar *filename;
+ nserror res;
+ nsurl *url;
+
+ filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dlgOpen));
+
+ urltxt = malloc(strlen(filename) + FILE_SCHEME_PREFIX_LEN + 1);
+ if (urltxt != NULL) {
+ sprintf(urltxt, FILE_SCHEME_PREFIX"%s", filename);
+
+ res = nsurl_create(urltxt, &url);
+ if (res == NSERROR_OK) {
+ bw = tb->get_bw(tb->get_ctx);
+ res = browser_window_navigate(bw,
+ url,
+ NULL,
+ BW_NAVIGATE_HISTORY,
+ NULL,
+ NULL,
+ NULL);
+ nsurl_unref(url);
+ }
+ if (res != NSERROR_OK) {
+ nsgtk_warning(messages_get_errorcode(res), 0);
+ }
+ free(urltxt);
}
- nsgtk_toolbar_connect_all(list);
- gtk_widget_show_all(GTK_WIDGET(nsgtk_scaffolding_toolbar(
- list)));
- nsgtk_scaffolding_set_sensitivity(list);
- nsgtk_widget_override_background_color(GTK_WIDGET(nsgtk_window_get_layout(nsgtk_scaffolding_top_level(list))), GTK_STATE_NORMAL, 0, 0xFFFF, 0xFFFF, 0xFFFF);
- g_signal_handler_unblock(GTK_WIDGET(
- nsgtk_window_get_layout(
- nsgtk_scaffolding_top_level(list))),
- nsgtk_window_get_signalhandler(
- nsgtk_scaffolding_top_level(list),
- NSGTK_WINDOW_SIGNAL_CLICK));
- g_signal_handler_unblock(GTK_WIDGET(
- nsgtk_window_get_layout(
- nsgtk_scaffolding_top_level(list))),
- nsgtk_window_get_signalhandler(
- nsgtk_scaffolding_top_level(list),
- NSGTK_WINDOW_SIGNAL_REDRAW));
- browser_window_refresh_url_bar(
- nsgtk_get_browser_window(
- nsgtk_scaffolding_top_level(list)));
-
- if (list != g)
- gtk_widget_set_sensitive(GTK_WIDGET(
- nsgtk_scaffolding_window(list)), TRUE);
- free(theme);
- list = nsgtk_scaffolding_iterate(list);
- }
- gtk_widget_set_sensitive(GTK_WIDGET(nsgtk_scaffolding_notebook(g)),
- TRUE);
- gtk_widget_set_sensitive(GTK_WIDGET(nsgtk_scaffolding_menu_bar(g)),
- TRUE);
- /* update favicon etc */
- nsgtk_scaffolding_set_top_level(nsgtk_scaffolding_top_level(g));
-
- search_web_select_provider(-1);
-}
-
-/**
- * when cancel button is clicked
- */
-static gboolean nsgtk_toolbar_cancel_clicked(GtkWidget *widget, gpointer data)
-{
- edit_mode = false;
- struct nsgtk_scaffolding *g = (struct nsgtk_scaffolding *)data;
- /* reset g->buttons->location */
- for (int i = BACK_BUTTON; i < PLACEHOLDER_BUTTON; i++) {
- nsgtk_scaffolding_button(g, i)->location =
- window->buttonlocations[i];
- }
- nsgtk_toolbar_set_physical(g);
- nsgtk_toolbar_connect_all(g);
- nsgtk_toolbar_close(g);
- nsgtk_scaffolding_set_sensitivity(g);
- gtk_widget_destroy(window->window);
+
+
+ g_free(filename);
+ }
+
+ gtk_widget_destroy(dlgOpen);
+
return TRUE;
}
+
/**
- * physically add widgets to store window
+ * handler for close window tool bar item clicked signal
+ *
+ * \param widget The widget the signal is being delivered to.
+ * \param data The toolbar context passed when the signal was connected
+ * \return TRUE
+ */
+static gboolean
+closewindow_button_clicked_cb(GtkWidget *widget, gpointer data)
+{
+ GtkWidget *toplevel;
+ toplevel = gtk_widget_get_ancestor(widget, GTK_TYPE_WINDOW);
+ gtk_widget_destroy(toplevel);
+ return TRUE;
+}
+
+
+/**
+ * handler for full save export tool bar item clicked signal
+ *
+ * \param widget The widget the signal is being delivered to.
+ * \param data The toolbar context passed when the signal was connected
+ * \return TRUE
*/
-static bool nsgtk_toolbar_add_store_widget(GtkWidget *widget)
+static gboolean
+savepage_button_clicked_cb(GtkWidget *widget, gpointer data)
{
- if (window->numberh >= NSGTK_STORE_WIDTH) {
- window->currentbar = gtk_toolbar_new();
- if (window->currentbar == NULL) {
- nsgtk_warning("NoMemory", 0);
- return false;
+ struct nsgtk_toolbar *tb = (struct nsgtk_toolbar *)data;
+ struct browser_window *bw;
+ DIR *d;
+ gchar *path;
+ nserror res;
+ GtkWidget *toplevel;
+
+ bw = tb->get_bw(tb->get_ctx);
+ toplevel = gtk_widget_get_ancestor(widget, GTK_TYPE_WINDOW);
+
+ res = nsgtk_saveas_dialog(bw,
+ messages_get("gtkcompleteSave"),
+ GTK_WINDOW(toplevel),
+ true,
+ &path);
+ if (res != NSERROR_OK) {
+ return FALSE;
+ }
+
+ d = opendir(path);
+ if (d == NULL) {
+ NSLOG(netsurf, INFO,
+ "Unable to open directory %s for complete save: %s",
+ path,
+ strerror(errno));
+ if (errno == ENOTDIR) {
+ nsgtk_warning("NoDirError", path);
+ } else {
+ nsgtk_warning("gtkFileError", path);
}
- gtk_toolbar_set_style(GTK_TOOLBAR(window->currentbar),
- GTK_TOOLBAR_BOTH);
- gtk_toolbar_set_icon_size(GTK_TOOLBAR(window->currentbar),
- GTK_ICON_SIZE_LARGE_TOOLBAR);
- gtk_box_pack_start(GTK_BOX(window->widgetvbox),
- window->currentbar, FALSE, FALSE, 0);
- window->numberh = 0;
+ g_free(path);
+ return TRUE;
}
- gtk_widget_set_size_request(widget, NSGTK_BUTTON_WIDTH,
- NSGTK_BUTTON_HEIGHT);
- gtk_toolbar_insert(GTK_TOOLBAR(window->currentbar), GTK_TOOL_ITEM(
- widget), window->numberh++);
- gtk_tool_item_set_use_drag_window(GTK_TOOL_ITEM(widget), TRUE);
- gtk_drag_source_set(widget, GDK_BUTTON1_MASK, &entry, 1,
- GDK_ACTION_COPY);
- gtk_widget_show_all(window->window);
- return true;
+ closedir(d);
+
+ save_complete(browser_window_get_content(bw), path, NULL);
+ g_free(path);
+
+ return TRUE;
}
/**
- * cast toolbar settings to all scaffoldings referenced from the global linked
- * list of gui_windows
+ * handler for pdf export tool bar item clicked signal
+ *
+ * \param widget The widget the signal is being delivered to.
+ * \param data The toolbar context passed when the signal was connected
+ * \return TRUE
*/
-static void nsgtk_toolbar_cast(struct nsgtk_scaffolding *g)
+static gboolean
+pdf_button_clicked_cb(GtkWidget *widget, gpointer data)
{
- int i;
- struct nsgtk_scaffolding *list;
+ struct nsgtk_toolbar *tb = (struct nsgtk_toolbar *)data;
+ struct browser_window *bw;
+ GtkWidget *toplevel;
+ gchar *filename;
+ nserror res;
+
+ bw = tb->get_bw(tb->get_ctx);
- for (i = BACK_BUTTON; i < PLACEHOLDER_BUTTON; i++) {
- window->buttonlocations[i] =
- ((nsgtk_scaffolding_button(g, i)->location
- >= -1) &&
- (nsgtk_scaffolding_button(g, i)->location
- < PLACEHOLDER_BUTTON)) ?
- nsgtk_scaffolding_button(g, i)->location : -1;
+ toplevel = gtk_widget_get_ancestor(widget, GTK_TYPE_WINDOW);
+
+ res = nsgtk_saveas_dialog(bw,
+ "Export to PDF",
+ GTK_WINDOW(toplevel),
+ false,
+ &filename);
+ if (res != NSERROR_OK) {
+ return FALSE;
}
- list = nsgtk_scaffolding_iterate(NULL);
- while (list) {
- if (list != g)
- for (i = BACK_BUTTON; i < PLACEHOLDER_BUTTON; i++)
- nsgtk_scaffolding_button(list, i)->location =
- window->buttonlocations[i];
- list = nsgtk_scaffolding_iterate(list);
+#ifdef WITH_PDF_EXPORT
+ struct print_settings *settings;
+
+ /* this way the scale used by PDF functions is synchronised with that
+ * used by the all-purpose print interface
+ */
+ haru_nsfont_set_scale((float)option_export_scale / 100);
+
+ settings = print_make_settings(PRINT_OPTIONS,
+ (const char *) filename,
+ &haru_nsfont);
+ g_free(filename);
+ if (settings == NULL) {
+ return TRUE;
}
+ /* This will clean up the print_settings object for us */
+ print_basic_run(browser_window_get_content(bw), &pdf_printer, settings);
+#endif
+ return TRUE;
+
}
/**
- * load toolbar settings from file; file is a set of fields arranged as
- * [itemreference];[itemlocation]|[itemreference];[itemlocation]| etc
+ * handler for plain text export tool bar item clicked signal
+ *
+ * \param widget The widget the signal is being delivered to.
+ * \param data The toolbar context passed when the signal was connected
+ * \return TRUE
*/
-void nsgtk_toolbar_customization_load(struct nsgtk_scaffolding *g)
+static gboolean
+plaintext_button_clicked_cb(GtkWidget *widget, gpointer data)
{
- int i, ii;
- char *buffer;
- char *buffer1, *subbuffer, *ptr = NULL, *pter = NULL;
+ struct nsgtk_toolbar *tb = (struct nsgtk_toolbar *)data;
+ struct browser_window *bw;
+ GtkWidget *toplevel;
+ gchar *filename;
+ nserror res;
+
+ bw = tb->get_bw(tb->get_ctx);
+
+ toplevel = gtk_widget_get_ancestor(widget, GTK_TYPE_WINDOW);
- /* default toolbar button order */
- for (i = BACK_BUTTON; i < PLACEHOLDER_BUTTON; i++) {
- nsgtk_scaffolding_button(g, i)->location =
- (i <= THROBBER_ITEM) ? i : -1;
+ res = nsgtk_saveas_dialog(bw,
+ messages_get("gtkplainSave"),
+ GTK_WINDOW(toplevel),
+ false,
+ &filename);
+ if (res != NSERROR_OK) {
+ return FALSE;
}
- /* ensure the option is actually set */
- if (nsoption_charp(toolbar_order) == NULL) {
- return;
+
+ save_as_text(browser_window_get_content(bw), filename);
+ g_free(filename);
+
+ return TRUE;
+}
+
+
+/**
+ * handler for print tool bar item clicked signal
+ *
+ * \param widget The widget the signal is being delivered to.
+ * \param data The toolbar context passed when the signal was connected
+ * \return TRUE
+ */
+static gboolean
+print_button_clicked_cb(GtkWidget *widget, gpointer data)
+{
+ struct nsgtk_toolbar *tb = (struct nsgtk_toolbar *)data;
+ struct browser_window *bw;
+ GtkPrintOperation *print_op;
+ GtkPageSetup *page_setup;
+ GtkPrintSettings *print_settings;
+ GtkPrintOperationResult res = GTK_PRINT_OPERATION_RESULT_ERROR;
+ struct print_settings *nssettings;
+ char *settings_fname = NULL;
+ GtkWidget *toplevel;
+
+ bw = tb->get_bw(tb->get_ctx);
+
+ toplevel = gtk_widget_get_ancestor(widget, GTK_TYPE_WINDOW);
+
+ print_op = gtk_print_operation_new();
+ if (print_op == NULL) {
+ nsgtk_warning(messages_get("NoMemory"), 0);
+ return TRUE;
}
- buffer = strdup(nsoption_charp(toolbar_order));
-
- i = BACK_BUTTON;
- ii = BACK_BUTTON;
- buffer1 = strtok_r(buffer, "|", &ptr);
- while (buffer1 != NULL) {
- subbuffer = strtok_r(buffer1, ";", &pter);
- if (subbuffer != NULL) {
- i = atoi(subbuffer);
- subbuffer = strtok_r(NULL, ";", &pter);
- if (subbuffer != NULL) {
- ii = atoi(subbuffer);
- if ((i >= BACK_BUTTON) &&
- (i < PLACEHOLDER_BUTTON) &&
- (ii >= -1) &&
- (ii < PLACEHOLDER_BUTTON)) {
- nsgtk_scaffolding_button(g, i)->location = ii;
- }
- }
+
+ /* use previously saved settings if any */
+ netsurf_mkpath(&settings_fname, NULL, 2, nsgtk_config_home, "Print");
+ if (settings_fname != NULL) {
+ print_settings = gtk_print_settings_new_from_file(settings_fname, NULL);
+ if (print_settings != NULL) {
+ gtk_print_operation_set_print_settings(print_op,
+ print_settings);
+
+ /* We're not interested in the settings any more */
+ g_object_unref(print_settings);
+ }
+ }
+
+ content_to_print = browser_window_get_content(bw);
+
+ page_setup = gtk_print_run_page_setup_dialog(GTK_WINDOW(toplevel),
+ NULL,
+ NULL);
+ if (page_setup == NULL) {
+ nsgtk_warning(messages_get("NoMemory"), 0);
+ free(settings_fname);
+ g_object_unref(print_op);
+ return TRUE;
+ }
+ gtk_print_operation_set_default_page_setup(print_op, page_setup);
+
+ nssettings = print_make_settings(PRINT_DEFAULT,
+ NULL,
+ nsgtk_layout_table);
+
+ g_signal_connect(print_op,
+ "begin_print",
+ G_CALLBACK(gtk_print_signal_begin_print),
+ nssettings);
+ g_signal_connect(print_op,
+ "draw_page",
+ G_CALLBACK(gtk_print_signal_draw_page),
+ NULL);
+ g_signal_connect(print_op,
+ "end_print",
+ G_CALLBACK(gtk_print_signal_end_print),
+ nssettings);
+
+ if (content_get_type(browser_window_get_content(bw)) != CONTENT_TEXTPLAIN) {
+ res = gtk_print_operation_run(print_op,
+ GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG,
+ GTK_WINDOW(toplevel),
+ NULL);
+ }
+
+ /* if the settings were used save them for future use */
+ if (settings_fname != NULL) {
+ if (res == GTK_PRINT_OPERATION_RESULT_APPLY) {
+ /* Do not increment the settings reference */
+ print_settings = gtk_print_operation_get_print_settings(print_op);
+
+ gtk_print_settings_to_file(print_settings,
+ settings_fname,
+ NULL);
}
- buffer1 = strtok_r(NULL, "|", &ptr);
+ free(settings_fname);
}
- free(buffer);
+ /* Our print_settings object is destroyed by the end print handler */
+ g_object_unref(page_setup);
+ g_object_unref(print_op);
+
+ return TRUE;
+}
+
+/**
+ * handler for quit tool bar item clicked signal
+ *
+ * \param widget The widget the signal is being delivered to.
+ * \param data The toolbar context passed when the signal was connected
+ * \return TRUE
+ */
+static gboolean
+quit_button_clicked_cb(GtkWidget *widget, gpointer data)
+{
+ nsgtk_scaffolding_destroy_all();
+ return TRUE;
}
/**
- * save toolbar settings to file
+ * handler for cut tool bar item clicked signal
+ *
+ * \param widget The widget the signal is being delivered to.
+ * \param data The toolbar context passed when the signal was connected
+ * \return TRUE
*/
-static nserror nsgtk_toolbar_customization_save(struct nsgtk_scaffolding *g)
+static gboolean
+cut_button_clicked_cb(GtkWidget *widget, gpointer data)
{
- char *order;
- int order_len = PLACEHOLDER_BUTTON * 12; /* length of order buffer */
- int tbidx;
- char *cur;
- int plen;
+ struct nsgtk_toolbar *tb = (struct nsgtk_toolbar *)data;
+ struct browser_window *bw;
+ GtkWidget *focused;
+ GtkWidget *toplevel;
- order = malloc(order_len);
+ toplevel = gtk_widget_get_ancestor(widget, GTK_TYPE_WINDOW);
- if (order == NULL) {
- return NSERROR_NOMEM;
+ focused = gtk_window_get_focus(GTK_WINDOW(toplevel));
+
+ /* let gtk handle it if focused widget is an editable */
+ if (GTK_IS_EDITABLE(focused)) {
+ gtk_editable_cut_clipboard(GTK_EDITABLE(focused));
+ } else {
+ bw = tb->get_bw(tb->get_ctx);
+ browser_window_key_press(bw, NS_KEY_CUT_SELECTION);
}
- cur = order;
- for (tbidx = BACK_BUTTON; tbidx < PLACEHOLDER_BUTTON; tbidx++) {
- plen = snprintf(cur,
- order_len,
- "%d;%d|",
- tbidx,
- nsgtk_scaffolding_button(g, tbidx)->location);
- if (plen == order_len) {
- /* ran out of space, bail early */
- NSLOG(netsurf, INFO,
- "toolbar ordering exceeded available space");
- break;
- }
- cur += plen;
- order_len -= plen;
+ return TRUE;
+}
+
+
+/**
+ * handler for copy tool bar item clicked signal
+ *
+ * \param widget The widget the signal is being delivered to.
+ * \param data The toolbar context passed when the signal was connected
+ * \return TRUE
+ */
+static gboolean
+copy_button_clicked_cb(GtkWidget *widget, gpointer data)
+{
+ struct nsgtk_toolbar *tb = (struct nsgtk_toolbar *)data;
+ struct browser_window *bw;
+ GtkWidget *focused;
+ GtkWidget *toplevel;
+
+ toplevel = gtk_widget_get_ancestor(widget, GTK_TYPE_WINDOW);
+
+ focused = gtk_window_get_focus(GTK_WINDOW(toplevel));
+
+ /* let gtk handle it if focused widget is an editable */
+ if (GTK_IS_EDITABLE(focused)) {
+ gtk_editable_copy_clipboard(GTK_EDITABLE(focused));
+ } else {
+ bw = tb->get_bw(tb->get_ctx);
+ browser_window_key_press(bw, NS_KEY_COPY_SELECTION);
}
- nsoption_set_charp(toolbar_order, order);
+ return TRUE;
+}
- return NSERROR_OK;
+
+/**
+ * handler for paste tool bar item clicked signal
+ *
+ * \param widget The widget the signal is being delivered to.
+ * \param data The toolbar context passed when the signal was connected
+ * \return TRUE
+ */
+static gboolean
+paste_button_clicked_cb(GtkWidget *widget, gpointer data)
+{
+ struct nsgtk_toolbar *tb = (struct nsgtk_toolbar *)data;
+ struct browser_window *bw;
+ GtkWidget *focused;
+ GtkWidget *toplevel;
+
+ toplevel = gtk_widget_get_ancestor(widget, GTK_TYPE_WINDOW);
+
+ focused = gtk_window_get_focus(GTK_WINDOW(toplevel));
+
+ /* let gtk handle it if focused widget is an editable */
+ if (GTK_IS_EDITABLE(focused)) {
+ gtk_editable_paste_clipboard(GTK_EDITABLE(focused));
+ } else {
+ bw = tb->get_bw(tb->get_ctx);
+ browser_window_key_press(bw, NS_KEY_PASTE);
+ }
+
+ return TRUE;
}
/**
- * when 'save settings' button is clicked
+ * handler for delete tool bar item clicked signal
+ *
+ * \param widget The widget the signal is being delivered to.
+ * \param data The toolbar context passed when the signal was connected
+ * \return TRUE
*/
-static gboolean nsgtk_toolbar_persist(GtkWidget *widget, gpointer data)
+static gboolean
+delete_button_clicked_cb(GtkWidget *widget, gpointer data)
{
- edit_mode = false;
- struct nsgtk_scaffolding *g = (struct nsgtk_scaffolding *)data;
- /* save state to file, update toolbars for all windows */
- nsgtk_toolbar_customization_save(g);
- nsgtk_toolbar_cast(g);
- nsgtk_toolbar_set_physical(g);
- nsgtk_toolbar_close(g);
- gtk_widget_destroy(window->window);
+ struct nsgtk_toolbar *tb = (struct nsgtk_toolbar *)data;
+ struct browser_window *bw;
+ GtkWidget *focused;
+ GtkWidget *toplevel;
+
+ toplevel = gtk_widget_get_ancestor(widget, GTK_TYPE_WINDOW);
+
+ focused = gtk_window_get_focus(GTK_WINDOW(toplevel));
+
+ /* let gtk handle it if focused widget is an editable */
+ if (GTK_IS_EDITABLE(focused)) {
+ gtk_editable_delete_selection(GTK_EDITABLE(focused));
+ } else {
+ bw = tb->get_bw(tb->get_ctx);
+ browser_window_key_press(bw, NS_KEY_CLEAR_SELECTION);
+ }
+
return TRUE;
}
+
/**
- * when 'reload defaults' button is clicked
+ * handler for select all tool bar item clicked signal
+ *
+ * \param widget The widget the signal is being delivered to.
+ * \param data The toolbar context passed when the signal was connected
+ * \return TRUE
*/
-static gboolean nsgtk_toolbar_reset(GtkWidget *widget, gpointer data)
+static gboolean
+selectall_button_clicked_cb(GtkWidget *widget, gpointer data)
{
- struct nsgtk_scaffolding *g = (struct nsgtk_scaffolding *)data;
- int i;
- for (i = BACK_BUTTON; i < PLACEHOLDER_BUTTON; i++)
- nsgtk_scaffolding_button(g, i)->location =
- (i <= THROBBER_ITEM) ? i : -1;
- nsgtk_toolbar_set_physical(g);
- for (i = BACK_BUTTON; i <= THROBBER_ITEM; i++) {
- if (i == URL_BAR_ITEM)
- continue;
- gtk_tool_item_set_use_drag_window(GTK_TOOL_ITEM(
- nsgtk_scaffolding_button(g, i)->button), TRUE);
- gtk_drag_source_set(GTK_WIDGET(
- nsgtk_scaffolding_button(g, i)->button),
- GDK_BUTTON1_MASK, &entry, 1, GDK_ACTION_COPY);
- nsgtk_toolbar_temp_connect(g, i);
+ struct nsgtk_toolbar *tb = (struct nsgtk_toolbar *)data;
+ struct browser_window *bw;
+ GtkWidget *focused;
+ GtkWidget *toplevel;
+
+ toplevel = gtk_widget_get_ancestor(widget, GTK_TYPE_WINDOW);
+
+ focused = gtk_window_get_focus(GTK_WINDOW(toplevel));
+
+ /* let gtk handle it if focused widget is an editable */
+ if (GTK_IS_EDITABLE(focused)) {
+ gtk_editable_select_region(GTK_EDITABLE(focused), 0, -1);
+ } else {
+ bw = tb->get_bw(tb->get_ctx);
+ browser_window_key_press(bw, NS_KEY_SELECT_ALL);
}
+
return TRUE;
}
+
/**
- * when titlebar / alt-F4 window close event happens
+ * handler for preferences tool bar item clicked signal
+ *
+ * \param widget The widget the signal is being delivered to.
+ * \param data The toolbar context passed when the signal was connected
+ * \return TRUE
*/
-static gboolean nsgtk_toolbar_delete(GtkWidget *widget, GdkEvent *event,
- gpointer data)
+static gboolean
+preferences_button_clicked_cb(GtkWidget *widget, gpointer data)
{
- edit_mode = false;
- struct nsgtk_scaffolding *g = (struct nsgtk_scaffolding *)data;
- /* reset g->buttons->location */
- for (int i = BACK_BUTTON; i < PLACEHOLDER_BUTTON; i++) {
- nsgtk_scaffolding_button(g, i)->location =
- window->buttonlocations[i];
+ struct nsgtk_toolbar *tb = (struct nsgtk_toolbar *)data;
+ struct browser_window *bw;
+ GtkWidget *toplevel;
+ GtkWidget *wndpreferences;
+
+ bw = tb->get_bw(tb->get_ctx);
+
+ toplevel = gtk_widget_get_ancestor(widget, GTK_TYPE_WINDOW);
+
+ wndpreferences = nsgtk_preferences(bw, GTK_WINDOW(toplevel));
+ if (wndpreferences != NULL) {
+ gtk_widget_show(wndpreferences);
}
- nsgtk_toolbar_set_physical(g);
- nsgtk_toolbar_connect_all(g);
- nsgtk_toolbar_close(g);
- nsgtk_scaffolding_set_sensitivity(g);
- gtk_widget_destroy(window->window);
+
return TRUE;
}
+
/**
- * called when a widget is dropped onto the store window
+ * handler for zoom plus tool bar item clicked signal
+ *
+ * \param widget The widget the signal is being delivered to.
+ * \param data The toolbar context passed when the signal was connected
+ * \return TRUE
*/
static gboolean
-nsgtk_toolbar_store_return(GtkWidget *widget, GdkDragContext *gdc,
- gint x, gint y, guint time, gpointer data)
+zoomplus_button_clicked_cb(GtkWidget *widget, gpointer data)
{
- struct nsgtk_scaffolding *g = (struct nsgtk_scaffolding *)data;
- int q, i;
+ struct nsgtk_toolbar *tb = (struct nsgtk_toolbar *)data;
+ struct browser_window *bw;
- if ((window->fromstore) || (window->currentbutton == -1)) {
- window->currentbutton = -1;
- return FALSE;
+ bw = tb->get_bw(tb->get_ctx);
+
+ browser_window_set_scale(bw, 0.05, false);
+
+ return TRUE;
+}
+
+
+/**
+ * handler for zoom minus tool bar item clicked signal
+ *
+ * \param widget The widget the signal is being delivered to.
+ * \param data The toolbar context passed when the signal was connected
+ * \return TRUE
+ */
+static gboolean
+zoomminus_button_clicked_cb(GtkWidget *widget, gpointer data)
+{
+ struct nsgtk_toolbar *tb = (struct nsgtk_toolbar *)data;
+ struct browser_window *bw;
+
+ bw = tb->get_bw(tb->get_ctx);
+
+ browser_window_set_scale(bw, -0.05, false);
+
+ return TRUE;
+
+}
+
+
+/**
+ * handler for zoom normal tool bar item clicked signal
+ *
+ * \param widget The widget the signal is being delivered to.
+ * \param data The toolbar context passed when the signal was connected
+ * \return TRUE
+ */
+static gboolean
+zoomnormal_button_clicked_cb(GtkWidget *widget, gpointer data)
+{
+ struct nsgtk_toolbar *tb = (struct nsgtk_toolbar *)data;
+ struct browser_window *bw;
+
+ bw = tb->get_bw(tb->get_ctx);
+
+ browser_window_set_scale(bw, 1.0, true);
+
+ return TRUE;
+}
+
+
+/**
+ * handler for full screen tool bar item clicked signal
+ *
+ * \param widget The widget the signal is being delivered to.
+ * \param data The toolbar context passed when the signal was connected
+ * \return TRUE
+ */
+static gboolean
+fullscreen_button_clicked_cb(GtkWidget *widget, gpointer data)
+{
+ GtkWindow *gtkwindow; /* gtk window widget is in */
+ GdkWindow *gdkwindow;
+ GdkWindowState state;
+
+ gtkwindow = GTK_WINDOW(gtk_widget_get_ancestor(widget,GTK_TYPE_WINDOW));
+ gdkwindow = gtk_widget_get_window(GTK_WIDGET(gtkwindow));
+ state = gdk_window_get_state(gdkwindow);
+
+ if (state & GDK_WINDOW_STATE_FULLSCREEN) {
+ gtk_window_unfullscreen(gtkwindow);
+ } else {
+ gtk_window_fullscreen(gtkwindow);
+ }
+ return TRUE;
+}
+
+
+/**
+ * handler for view source tool bar item clicked signal
+ *
+ * \param widget The widget the signal is being delivered to.
+ * \param data The toolbar context passed when the signal was connected
+ * \return TRUE
+ */
+static gboolean
+viewsource_button_clicked_cb(GtkWidget *widget, gpointer data)
+{
+ nserror res;
+ struct nsgtk_toolbar *tb = (struct nsgtk_toolbar *)data;
+ struct browser_window *bw;
+ GtkWindow *gtkwindow; /* gtk window widget is in */
+
+ bw = tb->get_bw(tb->get_ctx);
+
+ gtkwindow = GTK_WINDOW(gtk_widget_get_ancestor(widget,GTK_TYPE_WINDOW));
+
+ res = nsgtk_viewsource(gtkwindow, bw);
+ if (res != NSERROR_OK) {
+ nsgtk_warning(messages_get_errorcode(res), 0);
+ }
+
+ return TRUE;
+}
+
+
+/**
+ * handler for show downloads tool bar item clicked signal
+ *
+ * \param widget The widget the signal is being delivered to.
+ * \param data The toolbar context passed when the signal was connected
+ * \return TRUE
+ */
+static gboolean
+downloads_button_clicked_cb(GtkWidget *widget, gpointer data)
+{
+ GtkWindow *gtkwindow; /* gtk window widget is in */
+ gtkwindow = GTK_WINDOW(gtk_widget_get_ancestor(widget,GTK_TYPE_WINDOW));
+ nsgtk_download_show(gtkwindow);
+ return TRUE;
+}
+
+
+/**
+ * handler for show downloads tool bar item clicked signal
+ *
+ * \param widget The widget the signal is being delivered to.
+ * \param data The toolbar context passed when the signal was connected
+ * \return TRUE
+ */
+static gboolean
+savewindowsize_button_clicked_cb(GtkWidget *widget, gpointer data)
+{
+ GtkWindow *gtkwindow; /* gtk window widget is in */
+ int x,y,w,h;
+ char *choices = NULL;
+
+ gtkwindow = GTK_WINDOW(gtk_widget_get_ancestor(widget,GTK_TYPE_WINDOW));
+
+ gtk_window_get_position(gtkwindow, &x, &y);
+ gtk_window_get_size(gtkwindow, &w, &h);
+
+ nsoption_set_int(window_width, w);
+ nsoption_set_int(window_height, h);
+ nsoption_set_int(window_x, x);
+ nsoption_set_int(window_y, y);
+
+ netsurf_mkpath(&choices, NULL, 2, nsgtk_config_home, "Choices");
+ if (choices != NULL) {
+ nsoption_write(choices, NULL, NULL);
+ free(choices);
}
- if (nsgtk_scaffolding_button(g, window->currentbutton)->location
- != -1) {
- /* 'move' all widgets further right, one place to the left
- * in logical schema */
- for (i = nsgtk_scaffolding_button(g, window->currentbutton)->
- location + 1; i < PLACEHOLDER_BUTTON; i++) {
- q = nsgtk_toolbar_get_id_at_location(g, i);
- if (q == -1)
- continue;
- nsgtk_scaffolding_button(g, q)->location--;
+
+ return TRUE;
+}
+
+
+/**
+ * handler for show downloads tool bar item clicked signal
+ *
+ * \param widget The widget the signal is being delivered to.
+ * \param data The toolbar context passed when the signal was connected
+ * \return TRUE
+ */
+static gboolean
+toggledebugging_button_clicked_cb(GtkWidget *widget, gpointer data)
+{
+ struct nsgtk_toolbar *tb = (struct nsgtk_toolbar *)data;
+ struct browser_window *bw;
+
+ bw = tb->get_bw(tb->get_ctx);
+
+ browser_window_debug(bw, CONTENT_DEBUG_REDRAW);
+
+ nsgtk_window_update_all();
+
+ return TRUE;
+}
+
+
+/**
+ * handler for debug box tree tool bar item clicked signal
+ *
+ * \param widget The widget the signal is being delivered to.
+ * \param data The toolbar context passed when the signal was connected
+ * \return TRUE
+ */
+static gboolean
+debugboxtree_button_clicked_cb(GtkWidget *widget, gpointer data)
+{
+ struct nsgtk_toolbar *tb = (struct nsgtk_toolbar *)data;
+ struct browser_window *bw;
+ gchar *fname;
+ gint handle;
+ FILE *f;
+
+ handle = g_file_open_tmp("nsgtkboxtreeXXXXXX", &fname, NULL);
+ if ((handle == -1) || (fname == NULL)) {
+ return TRUE;
+ }
+ close(handle); /* in case it was binary mode */
+
+ /* save data to temporary file */
+ f = fopen(fname, "w");
+ if (f == NULL) {
+ nsgtk_warning("Error saving box tree dump.",
+ "Unable to open file for writing.");
+ unlink(fname);
+ return TRUE;
+ }
+
+ bw = tb->get_bw(tb->get_ctx);
+
+ browser_window_debug_dump(bw, f, CONTENT_DEBUG_RENDER);
+
+ fclose(f);
+
+ nsgtk_viewfile("Box Tree Debug", "boxtree", fname);
+
+ g_free(fname);
+
+ return TRUE;
+}
+
+
+/**
+ * handler for debug dom tree tool bar item clicked signal
+ *
+ * \param widget The widget the signal is being delivered to.
+ * \param data The toolbar context passed when the signal was connected
+ * \return TRUE
+ */
+static gboolean
+debugdomtree_button_clicked_cb(GtkWidget *widget, gpointer data)
+{
+ struct nsgtk_toolbar *tb = (struct nsgtk_toolbar *)data;
+ struct browser_window *bw;
+ gchar *fname;
+ gint handle;
+ FILE *f;
+
+ handle = g_file_open_tmp("nsgtkdomtreeXXXXXX", &fname, NULL);
+ if ((handle == -1) || (fname == NULL)) {
+ return TRUE;
+ }
+ close(handle); /* in case it was binary mode */
+
+ /* save data to temporary file */
+ f = fopen(fname, "w");
+ if (f == NULL) {
+ nsgtk_warning("Error saving box tree dump.",
+ "Unable to open file for writing.");
+ unlink(fname);
+ return TRUE;
+ }
+
+ bw = tb->get_bw(tb->get_ctx);
+
+ browser_window_debug_dump(bw, f, CONTENT_DEBUG_DOM);
+
+ fclose(f);
+
+ nsgtk_viewfile("DOM Tree Debug", "domtree", fname);
+
+ g_free(fname);
+
+ return TRUE;
+
+}
+
+
+/**
+ * handler for local history tool bar item clicked signal
+ *
+ * \param widget The widget the signal is being delivered to.
+ * \param data The toolbar context passed when the signal was connected
+ * \return TRUE
+ */
+static gboolean
+localhistory_button_clicked_cb(GtkWidget *widget, gpointer data)
+{
+ nserror res;
+ struct nsgtk_toolbar *tb = (struct nsgtk_toolbar *)data;
+ struct browser_window *bw;
+ GtkWidget *toplevel;
+
+ toplevel = gtk_widget_get_ancestor(widget, GTK_TYPE_WINDOW);
+ if (toplevel != NULL) {
+ bw = tb->get_bw(tb->get_ctx);
+
+ res = nsgtk_local_history_present(GTK_WINDOW(toplevel), bw);
+ if (res != NSERROR_OK) {
+ NSLOG(netsurf, INFO,
+ "Unable to present local history window.");
}
- gtk_container_remove(GTK_CONTAINER(
- nsgtk_scaffolding_toolbar(g)), GTK_WIDGET(
- nsgtk_scaffolding_button(g,
- window->currentbutton)->button));
- nsgtk_scaffolding_button(g, window->currentbutton)->location
- = -1;
- }
- window->currentbutton = -1;
- gtk_drag_finish(gdc, TRUE, TRUE, time);
- return FALSE;
+ }
+ return TRUE;
}
/**
- * called when hovering above the store
+ * handler for history tool bar item clicked signal
+ *
+ * \param widget The widget the signal is being delivered to.
+ * \param data The toolbar context passed when the signal was connected
+ * \return TRUE
*/
static gboolean
-nsgtk_toolbar_store_action(GtkWidget *widget, GdkDragContext *gdc,
- gint x, gint y, guint time, gpointer data)
+history_button_clicked_cb(GtkWidget *widget, gpointer data)
{
- return FALSE;
+ return localhistory_button_clicked_cb(widget, data);
}
+
/**
- * create store window
+ * handler for global history tool bar item clicked signal
+ *
+ * \param widget The widget the signal is being delivered to.
+ * \param data The toolbar context passed when the signal was connected
+ * \return TRUE
*/
-static void nsgtk_toolbar_window_open(struct nsgtk_scaffolding *g)
+static gboolean
+globalhistory_button_clicked_cb(GtkWidget *widget, gpointer data)
{
- int x = 0, y = 0;
- struct nsgtk_theme *theme;
nserror res;
+ res = nsgtk_global_history_present();
+ if (res != NSERROR_OK) {
+ NSLOG(netsurf, INFO,
+ "Unable to initialise global history window.");
+ }
+ return TRUE;
+}
- theme = nsgtk_theme_load(GTK_ICON_SIZE_LARGE_TOOLBAR, true);
- if (theme == NULL) {
- nsgtk_warning(messages_get("NoMemory"), 0);
- nsgtk_toolbar_cancel_clicked(NULL, g);
- return;
+
+/**
+ * handler for add bookmark tool bar item clicked signal
+ *
+ * \param widget The widget the signal is being delivered to.
+ * \param data The toolbar context passed when the signal was connected
+ * \return TRUE
+ */
+static gboolean
+addbookmarks_button_clicked_cb(GtkWidget *widget, gpointer data)
+{
+ struct nsgtk_toolbar *tb = (struct nsgtk_toolbar *)data;
+ struct browser_window *bw;
+
+ bw = tb->get_bw(tb->get_ctx);
+ if (browser_window_has_content(bw)) {
+ hotlist_add_url(browser_window_access_url(bw));
}
+ return TRUE;
+}
- res = nsgtk_builder_new_from_resname("toolbar", &window->builder);
+
+/**
+ * handler for show bookmark tool bar item clicked signal
+ *
+ * \param widget The widget the signal is being delivered to.
+ * \param data The toolbar context passed when the signal was connected
+ * \return TRUE
+ */
+static gboolean
+showbookmarks_button_clicked_cb(GtkWidget *widget, gpointer data)
+{
+ nserror res;
+ res = nsgtk_hotlist_present();
if (res != NSERROR_OK) {
- NSLOG(netsurf, INFO, "Toolbar UI builder init failed");
- nsgtk_warning(messages_get("NoMemory"), 0);
- nsgtk_toolbar_cancel_clicked(NULL, g);
- free(theme);
- return;
+ NSLOG(netsurf, INFO, "Unable to initialise bookmark window.");
}
+ return TRUE;
+}
- gtk_builder_connect_signals(window->builder, NULL);
- window->window = GTK_WIDGET(gtk_builder_get_object(window->builder,
- "toolbarwindow"));
- if (window->window == NULL) {
- nsgtk_warning(messages_get("NoMemory"), 0);
- nsgtk_toolbar_cancel_clicked(NULL, g);
- free(theme);
- return;
+/**
+ * handler for show cookies tool bar item clicked signal
+ *
+ * \param widget The widget the signal is being delivered to.
+ * \param data The toolbar context passed when the signal was connected
+ * \return TRUE
+ */
+static gboolean
+showcookies_button_clicked_cb(GtkWidget *widget, gpointer data)
+{
+ nserror res;
+ res = nsgtk_cookies_present(NULL);
+ if (res != NSERROR_OK) {
+ NSLOG(netsurf, INFO, "Unable to initialise cookies window.");
}
+ return TRUE;
+}
- window->widgetvbox = GTK_WIDGET(gtk_builder_get_object(window->builder,
- "widgetvbox"));
- if (window->widgetvbox == NULL) {
- nsgtk_warning(messages_get("NoMemory"), 0);
- nsgtk_toolbar_cancel_clicked(NULL, g);
- free(theme);
- return;
+
+/**
+ * handler for open location tool bar item clicked signal
+ *
+ * \param widget The widget the signal is being delivered to.
+ * \param data The toolbar context passed when the signal was connected
+ * \return TRUE
+ */
+static gboolean
+openlocation_button_clicked_cb(GtkWidget *widget, gpointer data)
+{
+ struct nsgtk_toolbar *tb = (struct nsgtk_toolbar *)data;
+ GtkToolItem *urltitem;
+
+ urltitem = tb->items[URL_BAR_ITEM].button;
+ if (urltitem != NULL) {
+ GtkEntry *entry;
+ entry = GTK_ENTRY(gtk_bin_get_child(GTK_BIN(urltitem)));
+ gtk_widget_grab_focus(GTK_WIDGET(entry));
}
+ return TRUE;
+}
- window->numberh = NSGTK_STORE_WIDTH; /* preset to width [in buttons] of */
- /* store to cause creation of a new toolbar */
- window->currentbutton = -1;
- /* load toolbuttons */
- /* add toolbuttons to window */
- /* set event handlers */
- for (int i = BACK_BUTTON; i < PLACEHOLDER_BUTTON; i++) {
- if (i == URL_BAR_ITEM)
- continue;
- window->store_buttons[i] =
- nsgtk_toolbar_make_widget(g, i, theme);
- if (window->store_buttons[i] == NULL) {
- nsgtk_warning(messages_get("NoMemory"), 0);
- continue;
- }
- nsgtk_toolbar_add_store_widget(window->store_buttons[i]);
- g_signal_connect(window->store_buttons[i], "drag-data-get",
- G_CALLBACK(
- nsgtk_scaffolding_button(g, i)->dataplus), g);
- }
- free(theme);
-
- gtk_window_set_transient_for(GTK_WINDOW(window->window),
- nsgtk_scaffolding_window(g));
- gtk_window_set_title(GTK_WINDOW(window->window), messages_get(
- "gtkToolBarTitle"));
- gtk_window_set_accept_focus(GTK_WINDOW(window->window), FALSE);
- gtk_drag_dest_set(GTK_WIDGET(window->window), GTK_DEST_DEFAULT_MOTION |
- GTK_DEST_DEFAULT_DROP, &entry, 1, GDK_ACTION_COPY);
- gtk_widget_show_all(window->window);
- gtk_window_set_position(GTK_WINDOW(window->window),
- GTK_WIN_POS_CENTER_ON_PARENT);
- gtk_window_get_position(nsgtk_scaffolding_window(g), &x, &y);
- gtk_window_move(GTK_WINDOW(window->window), x, y + 100);
-
- g_signal_connect(GTK_WIDGET(gtk_builder_get_object(window->builder,
- "cancelbutton")),
- "clicked",
- G_CALLBACK(nsgtk_toolbar_cancel_clicked),
- g);
- g_signal_connect(GTK_WIDGET(gtk_builder_get_object(window->builder,
- "okbutton")),
- "clicked",
- G_CALLBACK(nsgtk_toolbar_persist),
- g);
+/**
+ * handler for contents tool bar item clicked signal
+ *
+ * \param widget The widget the signal is being delivered to.
+ * \param data The toolbar context passed when the signal was connected
+ * \return TRUE
+ */
+static gboolean
+contents_button_clicked_cb(GtkWidget *widget, gpointer data)
+{
+ struct nsgtk_toolbar *tb = (struct nsgtk_toolbar *)data;
+ nserror res;
+
+ res = toolbar_navigate_to_url(tb, "https://www.netsurf-browser.org/documentation/");
+ if (res != NSERROR_OK) {
+ nsgtk_warning(messages_get_errorcode(res), 0);
+ }
+
+ return TRUE;
+}
+
+/**
+ * handler for contents tool bar item clicked signal
+ *
+ * \param widget The widget the signal is being delivered to.
+ * \param data The toolbar context passed when the signal was connected
+ * \return TRUE
+ */
+static gboolean
+guide_button_clicked_cb(GtkWidget *widget, gpointer data)
+{
+ struct nsgtk_toolbar *tb = (struct nsgtk_toolbar *)data;
+ nserror res;
+
+ res = toolbar_navigate_to_url(tb, "https://www.netsurf-browser.org/documentation/guide");
+ if (res != NSERROR_OK) {
+ nsgtk_warning(messages_get_errorcode(res), 0);
+ }
+
+ return TRUE;
+}
- g_signal_connect(GTK_WIDGET(gtk_builder_get_object(window->builder,
- "resetbutton")),
- "clicked",
- G_CALLBACK(nsgtk_toolbar_reset),
- g);
- g_signal_connect(window->window, "delete-event",
- G_CALLBACK(nsgtk_toolbar_delete), g);
+/**
+ * handler for contents tool bar item clicked signal
+ *
+ * \param widget The widget the signal is being delivered to.
+ * \param data The toolbar context passed when the signal was connected
+ * \return TRUE
+ */
+static gboolean
+info_button_clicked_cb(GtkWidget *widget, gpointer data)
+{
+ struct nsgtk_toolbar *tb = (struct nsgtk_toolbar *)data;
+ nserror res;
- g_signal_connect(window->window, "drag-drop",
- G_CALLBACK(nsgtk_toolbar_store_return), g);
+ res = toolbar_navigate_to_url(tb, "https://www.netsurf-browser.org/documentation/info");
+ if (res != NSERROR_OK) {
+ nsgtk_warning(messages_get_errorcode(res), 0);
+ }
- g_signal_connect(window->window, "drag-motion",
- G_CALLBACK(nsgtk_toolbar_store_action), g);
+ return TRUE;
}
+
/**
- * change behaviour of scaffoldings while editing toolbar
+ * handler for contents tool bar item clicked signal
*
- * All buttons as well as window clicks are desensitized; then buttons
- * in the front window are changed to movable buttons
+ * \param widget The widget the signal is being delivered to.
+ * \param data The toolbar context passed when the signal was connected
+ * \return TRUE
*/
-void nsgtk_toolbar_customization_init(struct nsgtk_scaffolding *g)
+static gboolean about_button_clicked_cb(GtkWidget *widget, gpointer data)
{
- int i;
- struct nsgtk_scaffolding *list;
- edit_mode = true;
+ GtkWindow *parent; /* gtk window widget is in */
- list = nsgtk_scaffolding_iterate(NULL);
- while (list) {
- g_signal_handler_block(GTK_WIDGET(
- nsgtk_window_get_layout(
- nsgtk_scaffolding_top_level(list))),
- nsgtk_window_get_signalhandler(
- nsgtk_scaffolding_top_level(list),
- NSGTK_WINDOW_SIGNAL_CLICK));
- g_signal_handler_block(GTK_WIDGET(
- nsgtk_window_get_layout(
- nsgtk_scaffolding_top_level(list))),
- nsgtk_window_get_signalhandler(
- nsgtk_scaffolding_top_level(list),
- NSGTK_WINDOW_SIGNAL_REDRAW));
- nsgtk_widget_override_background_color(
- GTK_WIDGET(nsgtk_window_get_layout(
- nsgtk_scaffolding_top_level(list))),
- GTK_STATE_NORMAL, 0, 0xEEEE, 0xEEEE, 0xEEEE);
+ parent = GTK_WINDOW(gtk_widget_get_ancestor(widget, GTK_TYPE_WINDOW));
- if (list == g) {
- list = nsgtk_scaffolding_iterate(list);
- continue;
- }
- /* set sensitive for all gui_windows save g */
- gtk_widget_set_sensitive(GTK_WIDGET(nsgtk_scaffolding_window(
- list)), FALSE);
- list = nsgtk_scaffolding_iterate(list);
- }
- /* set sensitive for all of g save toolbar */
- gtk_widget_set_sensitive(GTK_WIDGET(nsgtk_scaffolding_menu_bar(g)),
- FALSE);
- gtk_widget_set_sensitive(GTK_WIDGET(nsgtk_scaffolding_notebook(g)),
- FALSE);
-
- /* set editable aspect for toolbar */
- gtk_container_foreach(GTK_CONTAINER(nsgtk_scaffolding_toolbar(g)),
- nsgtk_toolbar_clear_toolbar, g);
- nsgtk_toolbar_set_physical(g);
- /* memorize button locations, set editable */
- for (i = BACK_BUTTON; i < PLACEHOLDER_BUTTON; i++) {
- window->buttonlocations[i] = nsgtk_scaffolding_button(g, i)
- ->location;
- if ((window->buttonlocations[i] == -1) || (i == URL_BAR_ITEM))
- continue;
- gtk_tool_item_set_use_drag_window(GTK_TOOL_ITEM(
- nsgtk_scaffolding_button(g, i)->button), TRUE);
- gtk_drag_source_set(GTK_WIDGET(nsgtk_scaffolding_button(
- g, i)->button), GDK_BUTTON1_MASK, &entry, 1,
- GDK_ACTION_COPY);
- nsgtk_toolbar_temp_connect(g, i);
+ nsgtk_about_dialog_init(parent);
+ return TRUE;
+}
+
+/**
+ * handler for openmenu tool bar item clicked signal
+ *
+ * \param widget The widget the signal is being delivered to.
+ * \param data The toolbar context passed when the signal was connected
+ * \return TRUE to indicate signal handled.
+ */
+static gboolean openmenu_button_clicked_cb(GtkWidget *widget, gpointer data)
+{
+ struct nsgtk_toolbar *tb = (struct nsgtk_toolbar *)data;
+ struct gui_window *gw;
+ struct nsgtk_scaffolding *gs;
+
+ gw = tb->get_ctx; /** \todo stop assuming the context is a gui window */
+
+ gs = nsgtk_get_scaffold(gw);
+
+ nsgtk_scaffolding_burger_menu(gs);
+
+ return TRUE;
+}
+
+
+/* define data plus and data minus handlers */
+#define TOOLBAR_ITEM(identifier, name, snstvty, clicked, activate, label, iconame) \
+static gboolean \
+nsgtk_toolbar_##name##_data_plus(GtkWidget *widget, \
+ GdkDragContext *cont, \
+ GtkSelectionData *selection, \
+ guint info, \
+ guint time, \
+ gpointer data) \
+{ \
+ struct nsgtk_toolbar_customisation *tbc; \
+ tbc = (struct nsgtk_toolbar_customisation *)data; \
+ tbc->dragitem = identifier; \
+ tbc->dragfrom = true; \
+ return TRUE; \
+} \
+static gboolean \
+nsgtk_toolbar_##name##_data_minus(GtkWidget *widget, \
+ GdkDragContext *cont, \
+ GtkSelectionData *selection, \
+ guint info, \
+ guint time, \
+ gpointer data) \
+{ \
+ struct nsgtk_toolbar_customisation *tbc; \
+ tbc = (struct nsgtk_toolbar_customisation *)data; \
+ tbc->dragitem = identifier; \
+ tbc->dragfrom = false; \
+ return TRUE; \
+}
+
+#include "gtk/toolbar_items.h"
+
+#undef TOOLBAR_ITEM
+
+
+/**
+ * create a toolbar item
+ *
+ * create a toolbar item and set up its default handlers
+ */
+static nserror
+toolbar_item_create(nsgtk_toolbar_button id, struct nsgtk_toolbar_item *item)
+{
+ item->location = INACTIVE_LOCATION;
+
+ /* set item defaults from macro */
+ switch (id) {
+#define TOOLBAR_ITEM_t(name) \
+ item->clicked = name##_button_clicked_cb;
+#define TOOLBAR_ITEM_b(name) \
+ item->clicked = name##_button_clicked_cb;
+#define TOOLBAR_ITEM_y(name) \
+ item->clicked = name##_button_clicked_cb;
+#define TOOLBAR_ITEM_n(name) \
+ item->clicked = NULL;
+#define TOOLBAR_ITEM(identifier, iname, snstvty, clicked, activate, label, iconame) \
+ case identifier: \
+ item->name = #iname; \
+ item->sensitivity = snstvty; \
+ item->dataplus = nsgtk_toolbar_##iname##_data_plus; \
+ item->dataminus = nsgtk_toolbar_##iname##_data_minus; \
+ TOOLBAR_ITEM_ ## clicked(iname) \
+ break;
+
+#include "gtk/toolbar_items.h"
+
+#undef TOOLBAR_ITEM_t
+#undef TOOLBAR_ITEM_y
+#undef TOOLBAR_ITEM_n
+#undef TOOLBAR_ITEM
+
+ case PLACEHOLDER_BUTTON:
+ return NSERROR_INVALID;
}
- /* add move button listeners */
- g_signal_connect(GTK_WIDGET(nsgtk_scaffolding_toolbar(g)),
- "drag-drop", G_CALLBACK(nsgtk_toolbar_data), g);
- g_signal_connect(GTK_WIDGET(nsgtk_scaffolding_toolbar(g)),
- "drag-data-received", G_CALLBACK(
- nsgtk_toolbar_move_complete), g);
- g_signal_connect(GTK_WIDGET(nsgtk_scaffolding_toolbar(g)),
- "drag-motion", G_CALLBACK(nsgtk_toolbar_action), g);
- g_signal_connect(GTK_WIDGET(nsgtk_scaffolding_toolbar(g)),
- "drag-leave", G_CALLBACK(
- nsgtk_toolbar_clear), g);
+ return NSERROR_OK;
+}
- /* set data types */
- gtk_drag_dest_set(GTK_WIDGET(nsgtk_scaffolding_toolbar(g)),
- GTK_DEST_DEFAULT_MOTION | GTK_DEST_DEFAULT_DROP,
- &entry, 1, GDK_ACTION_COPY);
- /* open toolbar window */
- nsgtk_toolbar_window_open(g);
+/**
+ * set a toolbar item to a throbber frame number
+ *
+ * \param toolbar_item The toolbar item to update
+ * \param frame The animation frame number to update to
+ * \return NSERROR_OK on success,
+ * NSERROR_INVALID if the toolbar item does not contain an image,
+ * NSERROR_BAD_SIZE if the frame is out of range.
+ */
+static nserror set_throbber_frame(GtkToolItem *toolbar_item, int frame)
+{
+ nserror res;
+ GdkPixbuf *pixbuf;
+ GtkImage *throbber;
+
+ if (toolbar_item == NULL) {
+ /* no toolbar item */
+ return NSERROR_INVALID;
+ }
+
+ res = nsgtk_throbber_get_frame(frame, &pixbuf);
+ if (res != NSERROR_OK) {
+ return res;
+ }
+
+ throbber = GTK_IMAGE(gtk_bin_get_child(GTK_BIN(toolbar_item)));
+
+ gtk_image_set_from_pixbuf(throbber, pixbuf);
+
+ return NSERROR_OK;
}
+
/**
- * set toolbar logical -> physical; physically visible toolbar buttons are made
- * to correspond to the logically stored schema in terms of location
- * visibility etc
+ * Make the throbber run.
+ *
+ * scheduled callback to update the throbber
+ *
+ * \param p The context passed when scheduled.
*/
-void nsgtk_toolbar_set_physical(struct nsgtk_scaffolding *g)
+static void next_throbber_frame(void *p)
{
- int i;
- struct nsgtk_theme *theme;
+ struct nsgtk_toolbar *tb = p;
+ nserror res;
- theme = nsgtk_theme_load(GTK_ICON_SIZE_LARGE_TOOLBAR, false);
- if (theme == NULL) {
- nsgtk_warning(messages_get("NoMemory"), 0);
- return;
+ tb->throb_frame++; /* advance to next frame */
+
+ res = set_throbber_frame(tb->items[THROBBER_ITEM].button,
+ tb->throb_frame);
+ if (res == NSERROR_BAD_SIZE) {
+ tb->throb_frame = 1;
+ res = set_throbber_frame(tb->items[THROBBER_ITEM].button,
+ tb->throb_frame);
}
- /* simplest is to clear the toolbar then reload it from memory */
- gtk_container_foreach(GTK_CONTAINER(nsgtk_scaffolding_toolbar(g)),
- nsgtk_toolbar_clear_toolbar, g);
- for (i = BACK_BUTTON; i < PLACEHOLDER_BUTTON; i++) {
- nsgtk_toolbar_add_item_to_toolbar(g, i, theme);
+
+ /* only schedule next frame if there are no errors */
+ if (res == NSERROR_OK) {
+ nsgtk_schedule(THROBBER_FRAME_TIME, next_throbber_frame, p);
+ }
+}
+
+
+/**
+ * connect signal handlers to a gtk toolbar item
+ */
+static nserror
+toolbar_connect_signal(struct nsgtk_toolbar *tb, nsgtk_toolbar_button itemid)
+{
+ struct nsgtk_toolbar_item *item;
+ GtkEntry *entry;
+
+ item = &tb->items[itemid];
+
+ if (item->button != NULL) {
+ g_signal_connect(item->button,
+ "size-allocate",
+ G_CALLBACK(toolbar_item_size_allocate_cb),
+ tb);
+ }
+
+ switch (itemid) {
+ case URL_BAR_ITEM:
+ entry = GTK_ENTRY(gtk_bin_get_child(GTK_BIN(item->button)));
+
+ g_signal_connect(GTK_WIDGET(entry),
+ "activate",
+ G_CALLBACK(url_entry_activate_cb),
+ tb);
+ g_signal_connect(GTK_WIDGET(entry),
+ "changed",
+ G_CALLBACK(url_entry_changed_cb),
+ tb);
+ g_signal_connect(GTK_WIDGET(entry),
+ "icon-release",
+ G_CALLBACK(url_entry_icon_release_cb),
+ tb);
+
+ nsgtk_completion_connect_signals(entry,
+ tb->get_bw,
+ tb->get_ctx);
+ break;
+
+
+ case WEBSEARCH_ITEM:
+ entry = GTK_ENTRY(gtk_bin_get_child(GTK_BIN(item->button)));
+
+ g_signal_connect(GTK_WIDGET(entry),
+ "activate",
+ G_CALLBACK(websearch_entry_activate_cb),
+ tb);
+ g_signal_connect(GTK_WIDGET(entry),
+ "button-press-event",
+ G_CALLBACK(websearch_entry_button_press_cb),
+ tb);
+ break;
+
+ default:
+ if ((item->clicked != NULL) && (item->button != NULL)) {
+ g_signal_connect(item->button,
+ "clicked",
+ G_CALLBACK(item->clicked),
+ tb);
+ }
+ break;
+
}
- gtk_widget_show_all(GTK_WIDGET(nsgtk_scaffolding_toolbar(g)));
- free(theme);
+
+ return NSERROR_OK;
}
/**
- * \return toolbar item id when a widget is an element of the scaffolding
- * else -1
+ * connect all signals to widgets in a toolbar
*/
-int nsgtk_toolbar_get_id_from_widget(GtkWidget *widget,
- struct nsgtk_scaffolding *g)
+static nserror toolbar_connect_signals(struct nsgtk_toolbar *tb)
{
- int i;
- for (i = BACK_BUTTON; i < PLACEHOLDER_BUTTON; i++) {
- if ((nsgtk_scaffolding_button(g, i)->location != -1)
- && (widget == GTK_WIDGET(
- nsgtk_scaffolding_button(g, i)->button))) {
- return i;
+ int location; /* location index */
+ nsgtk_toolbar_button itemid; /* item id */
+
+ for (location = BACK_BUTTON; location < PLACEHOLDER_BUTTON; location++) {
+ itemid = itemid_from_location(tb, location);
+ if (itemid == PLACEHOLDER_BUTTON) {
+ /* no more filled locations */
+ break;
}
+ toolbar_connect_signal(tb, itemid);
}
- return -1;
+
+ return NSERROR_OK;
}
/**
- * add handlers to factory widgets
- * \param g the scaffolding to attach handlers to
- * \param i the toolbar item id
+ * signal handler for toolbar context menu
+ *
+ * \param toolbar The toolbar event is being delivered to
+ * \param x The x coordinate where the click happened
+ * \param y The x coordinate where the click happened
+ * \param button the buttons being pressed
+ * \param data The context pointer passed when the connection was made.
+ * \return TRUE to indicate signal handled.
*/
-static void
-nsgtk_toolbar_set_handler(struct nsgtk_scaffolding *g, nsgtk_toolbar_button i)
+static gboolean
+toolbar_popup_context_menu_cb(GtkToolbar *toolbar,
+ gint x,
+ gint y,
+ gint button,
+ gpointer data)
{
- switch(i){
- case URL_BAR_ITEM:
- nsgtk_scaffolding_update_url_bar_ref(g);
- g_signal_connect(GTK_WIDGET(nsgtk_scaffolding_urlbar(g)),
- "activate", G_CALLBACK(
- nsgtk_window_url_activate_event), g);
- g_signal_connect(GTK_WIDGET(nsgtk_scaffolding_urlbar(g)),
- "changed", G_CALLBACK(
- nsgtk_window_url_changed), g);
+ struct nsgtk_toolbar *tb = (struct nsgtk_toolbar *)data;
+ struct gui_window *gw;
+ struct nsgtk_scaffolding *gs;
+
+ gw = tb->get_ctx; /** \todo stop assuming the context is a gui window */
+
+ gs = nsgtk_get_scaffold(gw);
+
+ nsgtk_scaffolding_toolbar_context_menu(gs);
+
+ return TRUE;
+}
+
+
+/**
+ * toolbar delete signal handler
+ */
+static void toolbar_destroy_cb(GtkWidget *widget, gpointer data)
+{
+ struct nsgtk_toolbar *tb;
+ tb = (struct nsgtk_toolbar *)data;
+
+ /* ensure any throbber scheduled is stopped */
+ nsgtk_schedule(-1, next_throbber_frame, tb);
+
+ free(tb);
+}
+
+
+/* exported interface documented in toolbar.h */
+nserror
+nsgtk_toolbar_create(GtkBuilder *builder,
+ struct browser_window *(*get_bw)(void *ctx),
+ void *get_ctx,
+ bool want_location_focus,
+ struct nsgtk_toolbar **tb_out)
+{
+ nserror res;
+ struct nsgtk_toolbar *tb;
+ int bidx; /* button index */
+
+ tb = calloc(1, sizeof(struct nsgtk_toolbar));
+ if (tb == NULL) {
+ return NSERROR_NOMEM;
+ }
+
+ tb->get_bw = get_bw;
+ tb->get_ctx = get_ctx;
+ /* set the throbber start frame. */
+ tb->throb_frame = 0;
+ if (want_location_focus) {
+ tb->loc_focus = LFS_WANT;
+ } else {
+ tb->loc_focus = LFS_IDLE;
+ }
+
+ tb->widget = GTK_TOOLBAR(gtk_builder_get_object(builder, "toolbar"));
+ gtk_toolbar_set_show_arrow(tb->widget, TRUE);
+
+ g_signal_connect(tb->widget,
+ "popup-context-menu",
+ G_CALLBACK(toolbar_popup_context_menu_cb),
+ tb);
+
+ /* close and cleanup on delete signal */
+ g_signal_connect(tb->widget,
+ "destroy",
+ G_CALLBACK(toolbar_destroy_cb),
+ tb);
+
+ /* allocate button contexts */
+ for (bidx = BACK_BUTTON; bidx < PLACEHOLDER_BUTTON; bidx++) {
+ res = toolbar_item_create(bidx, &tb->items[bidx]);
+ if (res != NSERROR_OK) {
+ return res;
+ }
+ }
+
+ res = nsgtk_toolbar_update(tb);
+ if (res != NSERROR_OK) {
+ return res;
+ }
+
+ *tb_out = tb;
+ return NSERROR_OK;
+}
+
+
+/* exported interface documented in toolbar.h */
+nserror nsgtk_toolbar_restyle(struct nsgtk_toolbar *tb)
+{
+ /*
+ * reset toolbar size allocation so icon size change affects
+ * allocated widths.
+ */
+ tb->offset = 0;
+
+ switch (nsoption_int(button_type)) {
+
+ case 1: /* Small icons */
+ gtk_toolbar_set_style(GTK_TOOLBAR(tb->widget),
+ GTK_TOOLBAR_ICONS);
+ gtk_toolbar_set_icon_size(GTK_TOOLBAR(tb->widget),
+ GTK_ICON_SIZE_SMALL_TOOLBAR);
break;
- case THROBBER_ITEM:
- nsgtk_scaffolding_update_throbber_ref(g);
+
+ case 2: /* Large icons */
+ gtk_toolbar_set_style(GTK_TOOLBAR(tb->widget),
+ GTK_TOOLBAR_ICONS);
+ gtk_toolbar_set_icon_size(GTK_TOOLBAR(tb->widget),
+ GTK_ICON_SIZE_LARGE_TOOLBAR);
break;
- case WEBSEARCH_ITEM:
- nsgtk_scaffolding_update_websearch_ref(g);
- g_signal_connect(GTK_WIDGET(nsgtk_scaffolding_websearch(g)),
- "activate", G_CALLBACK(
- nsgtk_websearch_activate), g);
- g_signal_connect(GTK_WIDGET(nsgtk_scaffolding_websearch(g)),
- "button-press-event", G_CALLBACK(
- nsgtk_websearch_clear), g);
+
+ case 3: /* Large icons with text */
+ gtk_toolbar_set_style(GTK_TOOLBAR(tb->widget),
+ GTK_TOOLBAR_BOTH);
+ gtk_toolbar_set_icon_size(GTK_TOOLBAR(tb->widget),
+ GTK_ICON_SIZE_LARGE_TOOLBAR);
+ break;
+
+ case 4: /* Text icons only */
+ gtk_toolbar_set_style(GTK_TOOLBAR(tb->widget),
+ GTK_TOOLBAR_TEXT);
+ break;
+
+ default:
+ break;
+ }
+
+ return NSERROR_OK;
+}
+
+
+/* exported interface documented in toolbar.h */
+nserror nsgtk_toolbar_throbber(struct nsgtk_toolbar *tb, bool active)
+{
+ nserror res;
+ struct browser_window *bw;
+
+ /* Manage the location focus state */
+ switch (tb->loc_focus) {
+ case LFS_IDLE:
+ break;
+ case LFS_WANT:
+ if (active) {
+ tb->loc_focus = LFS_THROB;
+ }
+ break;
+ case LFS_THROB:
+ if (!active) {
+ tb->loc_focus = LFS_LAST;
+ }
+ break;
+ case LFS_LAST:
+ break;
+ }
+
+ /* when activating the throbber simply schedule the next frame update */
+ if (active) {
+ nsgtk_schedule(THROBBER_FRAME_TIME, next_throbber_frame, tb);
+
+ set_item_sensitivity(&tb->items[STOP_BUTTON], true);
+ set_item_sensitivity(&tb->items[RELOAD_BUTTON], false);
+ set_item_action(tb, RELOADSTOP_BUTTON, false);
+
+ return NSERROR_OK;
+ }
+
+ /* stopping the throbber */
+ nsgtk_schedule(-1, next_throbber_frame, tb);
+ tb->throb_frame = 0;
+ res = set_throbber_frame(tb->items[THROBBER_ITEM].button,
+ tb->throb_frame);
+
+ bw = tb->get_bw(tb->get_ctx);
+
+ /* adjust sensitivity of other items */
+ set_item_sensitivity(&tb->items[STOP_BUTTON], false);
+ set_item_sensitivity(&tb->items[RELOAD_BUTTON], true);
+ set_item_action(tb, RELOADSTOP_BUTTON, true);
+ set_item_sensitivity(&tb->items[BACK_BUTTON],
+ browser_window_history_back_available(bw));
+ set_item_sensitivity(&tb->items[FORWARD_BUTTON],
+ browser_window_history_forward_available(bw));
+ nsgtk_local_history_hide();
+
+ return res;
+}
+
+
+/* exported interface documented in toolbar.h */
+nserror nsgtk_toolbar_page_info_change(struct nsgtk_toolbar *tb)
+{
+ GtkEntry *url_entry;
+ browser_window_page_info_state pistate;
+ struct browser_window *bw;
+ const char *icon_name;
+
+ if (tb->items[URL_BAR_ITEM].button == NULL) {
+ /* no toolbar item */
+ return NSERROR_INVALID;
+ }
+ url_entry = GTK_ENTRY(gtk_bin_get_child(GTK_BIN(tb->items[URL_BAR_ITEM].button)));
+
+ bw = tb->get_bw(tb->get_ctx);
+
+ pistate = browser_window_get_page_info_state(bw);
+
+ switch (pistate) {
+ case PAGE_STATE_INTERNAL:
+ icon_name = "page-info-internal";
+ break;
+
+ case PAGE_STATE_LOCAL:
+ icon_name = "page-info-local";
+ break;
+
+ case PAGE_STATE_INSECURE:
+ icon_name = "page-info-insecure";
+ break;
+
+ case PAGE_STATE_SECURE_OVERRIDE:
+ icon_name = "page-info-warning";
break;
+
+ case PAGE_STATE_SECURE_ISSUES:
+ icon_name = "page-info-warning";
+ break;
+
+ case PAGE_STATE_SECURE:
+ icon_name = "page-info-secure";
+ break;
+
default:
- if ((nsgtk_scaffolding_button(g, i)->bhandler != NULL) &&
- (nsgtk_scaffolding_button(g, i)->button
- != NULL))
- g_signal_connect(nsgtk_scaffolding_button(g, i)->
- button, "clicked",
- G_CALLBACK(nsgtk_scaffolding_button(g,
- i)->bhandler), g);
- break;
+ icon_name = "page-info-internal";
+ break;
+ }
+
+ nsgtk_entry_set_icon_from_icon_name(GTK_WIDGET(url_entry),
+ GTK_ENTRY_ICON_PRIMARY,
+ icon_name);
+ return NSERROR_OK;
+}
+
+
+/* exported interface documented in toolbar.h */
+nserror nsgtk_toolbar_set_url(struct nsgtk_toolbar *tb, nsurl *url)
+{
+ size_t idn_url_l;
+ char *idn_url_s = NULL;
+ const char *url_text = NULL;
+ GtkEntry *url_entry;
+
+ if (tb->items[URL_BAR_ITEM].button == NULL) {
+ /* no toolbar item */
+ return NSERROR_INVALID;
+ }
+ url_entry = GTK_ENTRY(gtk_bin_get_child(GTK_BIN(tb->items[URL_BAR_ITEM].button)));
+
+ if (nsoption_bool(display_decoded_idn) == true) {
+ if (nsurl_get_utf8(url, &idn_url_s, &idn_url_l) != NSERROR_OK) {
+ idn_url_s = NULL;
+ }
+ url_text = idn_url_s;
+ }
+ if (url_text == NULL) {
+ url_text = nsurl_access(url);
+ }
+
+ if (strcmp(url_text, gtk_entry_get_text(url_entry)) != 0) {
+ /* The URL bar content has changed, we need to update it */
+ gint startpos, endpos;
+ bool was_selected;
+ gtk_editable_get_selection_bounds(GTK_EDITABLE(url_entry),
+ &startpos, &endpos);
+ was_selected = gtk_widget_is_focus(GTK_WIDGET(url_entry)) &&
+ startpos == 0 &&
+ endpos == gtk_entry_get_text_length(url_entry);
+ gtk_entry_set_text(url_entry, url_text);
+ if (was_selected && tb->loc_focus != LFS_IDLE) {
+ gtk_widget_grab_focus(GTK_WIDGET(url_entry));
+ if (tb->loc_focus == LFS_LAST) {
+ tb->loc_focus = LFS_IDLE;
+ }
+ }
+ }
+
+ if (idn_url_s != NULL) {
+ free(idn_url_s);
+ }
+
+ return NSERROR_OK;
+}
+
+
+/* exported interface documented in toolbar.h */
+nserror
+nsgtk_toolbar_set_websearch_image(struct nsgtk_toolbar *tb, GdkPixbuf *pixbuf)
+{
+ GtkWidget *entry;
+
+ if (tb->items[WEBSEARCH_ITEM].button == NULL) {
+ /* no toolbar item */
+ return NSERROR_INVALID;
+ }
+
+ entry = gtk_bin_get_child(GTK_BIN(tb->items[WEBSEARCH_ITEM].button));
+
+ if (pixbuf != NULL) {
+ nsgtk_entry_set_icon_from_pixbuf(entry,
+ GTK_ENTRY_ICON_PRIMARY,
+ pixbuf);
+ } else {
+ nsgtk_entry_set_icon_from_icon_name(entry,
+ GTK_ENTRY_ICON_PRIMARY,
+ NSGTK_STOCK_INFO);
+ }
+
+ return NSERROR_OK;
+}
+
+
+/* exported interface documented in toolbar.h */
+nserror
+nsgtk_toolbar_item_activate(struct nsgtk_toolbar *tb,
+ nsgtk_toolbar_button itemid)
+{
+ GtkWidget *widget;
+
+ /* ensure item id in range */
+ if ((itemid < BACK_BUTTON) || (itemid >= PLACEHOLDER_BUTTON)) {
+ return NSERROR_BAD_PARAMETER;
+ }
+
+ if (tb->items[itemid].clicked == NULL) {
+ return NSERROR_INVALID;
+ }
+
+ /*
+ * if item has a widget in the current toolbar use that as the
+ * signal source otherwise use the toolbar widget itself.
+ */
+ if (tb->items[itemid].button != NULL) {
+ widget = GTK_WIDGET(tb->items[itemid].button);
+ } else {
+ widget = GTK_WIDGET(tb->widget);
+ }
+
+ tb->items[itemid].clicked(widget, tb);
+
+ return NSERROR_OK;
+}
+
+
+/* exported interface documented in toolbar.h */
+nserror nsgtk_toolbar_show(struct nsgtk_toolbar *tb, bool show)
+{
+ if (show) {
+ gtk_widget_show(GTK_WIDGET(tb->widget));
+ } else {
+ gtk_widget_hide(GTK_WIDGET(tb->widget));
+ }
+ return NSERROR_OK;
+}
+
+
+/* exported interface documented in toolbar.h */
+nserror nsgtk_toolbar_update(struct nsgtk_toolbar *tb)
+{
+ nserror res;
+
+ /* setup item locations based on user config */
+ res = apply_user_button_customisation(tb);
+ if (res != NSERROR_OK) {
+ return res;
+ }
+
+ /* populate toolbar widget */
+ res = populate_gtk_toolbar_widget(tb);
+ if (res != NSERROR_OK) {
+ return res;
}
+
+ /* ensure icon sizes and text labels on toolbar are set */
+ res = nsgtk_toolbar_restyle(tb);
+ if (res != NSERROR_OK) {
+ return res;
+ }
+
+ res = toolbar_connect_signals(tb);
+
+ return res;
}
/**
- * connect 'normal' handlers to toolbar buttons
+ * Find the correct location for popping up a window for the chosen item.
+ *
+ * \param tb The toolbar to select from
+ * \param item_idx The toolbar item to select from
+ * \param out_x Filled with an appropriate X coordinate
+ * \param out_y Filled with an appropriate Y coordinate
*/
-void nsgtk_toolbar_connect_all(struct nsgtk_scaffolding *g)
+static nserror
+nsgtk_toolbar_get_icon_window_position(struct nsgtk_toolbar *tb,
+ int item_idx,
+ int *out_x,
+ int *out_y)
{
- int q, i;
- for (i = BACK_BUTTON; i < PLACEHOLDER_BUTTON; i++) {
- q = nsgtk_toolbar_get_id_at_location(g, i);
- if (q == -1)
- continue;
- if (nsgtk_scaffolding_button(g, q)->button != NULL)
- g_signal_connect(
- nsgtk_scaffolding_button(g, q)->button,
- "size-allocate", G_CALLBACK(
- nsgtk_scaffolding_toolbar_size_allocate
- ), g);
- nsgtk_toolbar_set_handler(g, q);
- }
-}
-
-
-#define DATAHANDLER(p, q, r)\
-gboolean nsgtk_toolbar_##p##_button_data(GtkWidget *widget, GdkDragContext\
- *cont, GtkSelectionData *selection, guint info, guint time,\
- gpointer data)\
-{\
- r->currentbutton = q##_BUTTON;\
- r->fromstore = true;\
- return TRUE;\
-}\
-gboolean nsgtk_toolbar_##p##_toolbar_button_data(GtkWidget *widget,\
- GdkDragContext *cont, GtkSelectionData *selection, guint info,\
- guint time, gpointer data)\
-{\
- r->currentbutton = q##_BUTTON;\
- r->fromstore = false;\
- return TRUE;\
-}
-
-DATAHANDLER(home, HOME, window)
-DATAHANDLER(forward, FORWARD, window)
-DATAHANDLER(back, BACK, window)
-DATAHANDLER(stop, STOP, window)
-DATAHANDLER(reload, RELOAD, window)
-DATAHANDLER(history, HISTORY, window)
-DATAHANDLER(newwindow, NEWWINDOW, window)
-DATAHANDLER(newtab, NEWTAB, window)
-DATAHANDLER(openfile, OPENFILE, window)
-DATAHANDLER(closetab, CLOSETAB, window)
-DATAHANDLER(closewindow, CLOSEWINDOW, window)
-DATAHANDLER(savepage, SAVEPAGE, window)
-DATAHANDLER(printpreview, PRINTPREVIEW, window)
-DATAHANDLER(print, PRINT, window)
-DATAHANDLER(quit, QUIT, window)
-DATAHANDLER(cut, CUT, window)
-DATAHANDLER(copy, COPY, window)
-DATAHANDLER(paste, PASTE, window)
-DATAHANDLER(delete, DELETE, window)
-DATAHANDLER(selectall, SELECTALL, window)
-DATAHANDLER(preferences, PREFERENCES, window)
-DATAHANDLER(zoomplus, ZOOMPLUS, window)
-DATAHANDLER(zoomminus, ZOOMMINUS, window)
-DATAHANDLER(zoomnormal, ZOOMNORMAL, window)
-DATAHANDLER(fullscreen, FULLSCREEN, window)
-DATAHANDLER(viewsource, VIEWSOURCE, window)
-DATAHANDLER(contents, CONTENTS, window)
-DATAHANDLER(about, ABOUT, window)
-DATAHANDLER(pdf, PDF, window)
-DATAHANDLER(plaintext, PLAINTEXT, window)
-DATAHANDLER(drawfile, DRAWFILE, window)
-DATAHANDLER(postscript, POSTSCRIPT, window)
-DATAHANDLER(find, FIND, window)
-DATAHANDLER(downloads, DOWNLOADS, window)
-DATAHANDLER(savewindowsize, SAVEWINDOWSIZE, window)
-DATAHANDLER(toggledebugging, TOGGLEDEBUGGING, window)
-DATAHANDLER(debugboxtree, SAVEBOXTREE, window)
-DATAHANDLER(debugdomtree, SAVEDOMTREE, window)
-DATAHANDLER(localhistory, LOCALHISTORY, window)
-DATAHANDLER(globalhistory, GLOBALHISTORY, window)
-DATAHANDLER(addbookmarks, ADDBOOKMARKS, window)
-DATAHANDLER(showbookmarks, SHOWBOOKMARKS, window)
-DATAHANDLER(showcookies, SHOWCOOKIES, window)
-DATAHANDLER(openlocation, OPENLOCATION, window)
-DATAHANDLER(nexttab, NEXTTAB, window)
-DATAHANDLER(prevtab, PREVTAB, window)
-DATAHANDLER(guide, GUIDE, window)
-DATAHANDLER(info, INFO, window)
-#undef DATAHANDLER
-#define DATAHANDLER(p, q, r)\
-gboolean nsgtk_toolbar_##p##_button_data(GtkWidget *widget, GdkDragContext\
- *cont, GtkSelectionData *selection, guint info, guint time,\
- gpointer data)\
-{\
- r->currentbutton = q##_ITEM;\
- r->fromstore = true;\
- return TRUE;\
-}\
-gboolean nsgtk_toolbar_##p##_toolbar_button_data(GtkWidget *widget,\
- GdkDragContext *cont, GtkSelectionData *selection, guint info,\
- guint time, gpointer data)\
-{\
- r->currentbutton = q##_ITEM;\
- r->fromstore = false;\
- return TRUE;\
-}
-
-DATAHANDLER(throbber, THROBBER, window)
-DATAHANDLER(websearch, WEBSEARCH, window)
-#undef DATAHANDLER
+ struct nsgtk_toolbar_item *item = &tb->items[item_idx];
+ GtkWidget *widget = GTK_WIDGET(item->button);
+ GtkAllocation alloc;
+ gint rootx, rooty, x, y;
+
+ switch (item_idx) {
+ case URL_BAR_ITEM:
+ widget = GTK_WIDGET(gtk_bin_get_child(GTK_BIN(item->button)));
+ break;
+ default:
+ /* Nothing to do here */
+ break;
+ }
+
+ nsgtk_widget_get_allocation(widget, &alloc);
+
+ if (gtk_widget_translate_coordinates(widget,
+ gtk_widget_get_toplevel(widget),
+ 0,
+ alloc.height - 1,
+ &x, &y) != TRUE) {
+ return NSERROR_UNKNOWN;
+ }
+
+ gtk_window_get_position(GTK_WINDOW(gtk_widget_get_toplevel(widget)),
+ &rootx, &rooty);
+ *out_x = rootx + x + 4;
+ *out_y = rooty + y + 4;
+ return NSERROR_OK;
+}
+
+nserror nsgtk_toolbar_position_page_info(struct nsgtk_toolbar *tb,
+ struct nsgtk_pi_window *win)
+{
+ nserror res;
+ int x, y;
+
+ res = nsgtk_toolbar_get_icon_window_position(tb, URL_BAR_ITEM, &x, &y);
+ if (res != NSERROR_OK) {
+ return res;
+ }
+
+ nsgtk_page_info_set_position(win, x, y);
+
+ return NSERROR_OK;
+}
+
+/* exported interface documented in toolbar.h */
+nserror nsgtk_toolbar_position_local_history(struct nsgtk_toolbar *tb)
+{
+ nserror res;
+ int x, y;
+
+ res = nsgtk_toolbar_get_icon_window_position(tb, HISTORY_BUTTON, &x, &y);
+ if (res != NSERROR_OK) {
+ return res;
+ }
+
+ nsgtk_local_history_set_position(x, y);
+
+ return NSERROR_OK;
+}
diff --git a/frontends/gtk/toolbar.h b/frontends/gtk/toolbar.h
index 4286fe3f0..4ecca9f02 100644
--- a/frontends/gtk/toolbar.h
+++ b/frontends/gtk/toolbar.h
@@ -16,77 +16,127 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef _NETSURF_GTK_TOOLBAR_H_
-#define _NETSURF_GTK_TOOLBAR_H_
+#ifndef NETSURF_GTK_TOOLBAR_H_
+#define NETSURF_GTK_TOOLBAR_H_
/**
- * sets up the images for scaffolding.
+ * control toolbar context
*/
-void nsgtk_theme_implement(struct nsgtk_scaffolding *g);
+struct nsgtk_toolbar;
+struct nsgtk_scaffolding;
+/**
+ * create a control toolbar
+ *
+ * \param[in] builder The gtk builder object the toolbar is being created from
+ * \param[out] toolbar a pointer to receive the result.
+ * \return NSERROR_OK and toolbar updated on success else error code
+ */
+nserror nsgtk_toolbar_create(GtkBuilder *builder,
+ struct browser_window *(*get_bw)(void *ctx),
+ void *get_bw_ctx,
+ bool want_location_focus,
+ struct nsgtk_toolbar **toolbar);
+
+
+/**
+ * Update the toolbar items being shown based on current settings
+ *
+ * \param toolbar A toolbar returned from a creation
+ * \return NSERROR_OK on success
+ */
+nserror nsgtk_toolbar_update(struct nsgtk_toolbar *tb);
+
+
+/**
+ * Update toolbar style and size based on current settings
+ *
+ * \param toolbar A toolbar returned from a creation
+ * \return NSERROR_OK on success
+ */
+nserror nsgtk_toolbar_restyle(struct nsgtk_toolbar *tb);
+
+
+/**
+ * Start or stop a throbber in a toolbar
+ *
+ * \param toolbar A toolbar returned from a creation
+ * \param active True if the throbber animation should play.
+ * \return NSERROR_OK on success
+ */
+nserror nsgtk_toolbar_throbber(struct nsgtk_toolbar *tb, bool active);
+
+
+/**
+ * Page info has changed state
+ *
+ * \param toolbar A toolbar returned from a creation
+ * \return NSERROR_OK on success
+ */
+nserror nsgtk_toolbar_page_info_change(struct nsgtk_toolbar *tb);
+
+
+/**
+ * Update the toolbar url entry
+ *
+ * \param toolbar A toolbar returned from a creation
+ * \param url The URL to set
+ * \return NSERROR_OK on success
+ */
+nserror nsgtk_toolbar_set_url(struct nsgtk_toolbar *tb, nsurl *url);
+
+
+/**
+ * set the websearch image
+ *
+ * \param toolbar A toolbar returned from a creation
+ * \param pixbuf The pixel buffer data to use to set the web search icon
+ * \return NSERROR_OK on success
+ */
+nserror nsgtk_toolbar_set_websearch_image(struct nsgtk_toolbar *tb, GdkPixbuf *pixbuf);
+
+
+/**
+ * activate the handler for a toolbar item
+ *
+ * This allows the same action to be performed for menu enties as if
+ * the user had clicked the toolbar widget.
+ *
+ * \param toolbar A toolbar returned from a creation
+ * \param itemid the id of the item to activate
+ * \return NSERROR_OK on success
+ */
+nserror nsgtk_toolbar_item_activate(struct nsgtk_toolbar *tb, nsgtk_toolbar_button itemid);
+
+/**
+ * set the toolbar to be shown or hidden
+ *
+ * \param toolbar A toolbar returned from a creation
+ * \param show true to show the toolbar and false to hide it.
+ * \return NSERROR_OK on success
+ */
+nserror nsgtk_toolbar_show(struct nsgtk_toolbar *tb, bool show);
+
+/**
+ * position the page info window appropriately
+ *
+ * \param tb The toolbar to position relative to
+ * \param win The page-info window to position
+ */
+nserror nsgtk_toolbar_position_page_info(struct nsgtk_toolbar *tb,
+ struct nsgtk_pi_window *win);
+
+/**
+ * position the local history window appropriately
+ *
+ * \param tb The toolbar to position relative to
+ */
+nserror nsgtk_toolbar_position_local_history(struct nsgtk_toolbar *tb);
+
+/**
+ * Initialise customization of toolbar entries
+ */
void nsgtk_toolbar_customization_init(struct nsgtk_scaffolding *g);
-void nsgtk_toolbar_init(struct nsgtk_scaffolding *g);
-void nsgtk_toolbar_customization_load(struct nsgtk_scaffolding *g);
-void nsgtk_toolbar_set_physical(struct nsgtk_scaffolding *g);
-void nsgtk_toolbar_connect_all(struct nsgtk_scaffolding *g);
-int nsgtk_toolbar_get_id_from_widget(GtkWidget *widget, struct nsgtk_scaffolding *g);
-
-#define TOOLPROTO(q) gboolean nsgtk_toolbar_##q##_button_data(\
- GtkWidget *widget, GdkDragContext *cont, GtkSelectionData\
- *selection, guint info, guint time, gpointer data);\
-gboolean nsgtk_toolbar_##q##_toolbar_button_data(GtkWidget *widget,\
- GdkDragContext *cont, GtkSelectionData *selection, guint info,\
- guint time, gpointer data)
-TOOLPROTO(home);
-TOOLPROTO(back);
-TOOLPROTO(forward);
-TOOLPROTO(reload);
-TOOLPROTO(stop);
-TOOLPROTO(throbber);
-TOOLPROTO(websearch);
-TOOLPROTO(history);
-TOOLPROTO(newwindow);
-TOOLPROTO(newtab);
-TOOLPROTO(openfile);
-TOOLPROTO(closetab);
-TOOLPROTO(closewindow);
-TOOLPROTO(savepage);
-TOOLPROTO(pdf);
-TOOLPROTO(plaintext);
-TOOLPROTO(drawfile);
-TOOLPROTO(postscript);
-TOOLPROTO(printpreview);
-TOOLPROTO(print);
-TOOLPROTO(quit);
-TOOLPROTO(cut);
-TOOLPROTO(copy);
-TOOLPROTO(paste);
-TOOLPROTO(delete);
-TOOLPROTO(selectall);
-TOOLPROTO(find);
-TOOLPROTO(preferences);
-TOOLPROTO(zoomplus);
-TOOLPROTO(zoomminus);
-TOOLPROTO(zoomnormal);
-TOOLPROTO(fullscreen);
-TOOLPROTO(viewsource);
-TOOLPROTO(downloads);
-TOOLPROTO(localhistory);
-TOOLPROTO(globalhistory);
-TOOLPROTO(addbookmarks);
-TOOLPROTO(showbookmarks);
-TOOLPROTO(showcookies);
-TOOLPROTO(openlocation);
-TOOLPROTO(nexttab);
-TOOLPROTO(prevtab);
-TOOLPROTO(savewindowsize);
-TOOLPROTO(toggledebugging);
-TOOLPROTO(debugboxtree);
-TOOLPROTO(debugdomtree);
-TOOLPROTO(contents);
-TOOLPROTO(guide);
-TOOLPROTO(info);
-TOOLPROTO(about);
-#undef TOOLPROTO
+
#endif
diff --git a/frontends/gtk/toolbar_items.h b/frontends/gtk/toolbar_items.h
new file mode 100644
index 000000000..b4bed371f
--- /dev/null
+++ b/frontends/gtk/toolbar_items.h
@@ -0,0 +1,159 @@
+/*
+ * Copyright 2012 Vincent Sanders <vince@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_GTK_TOOLBAR_ITEMS_H
+#define NETSURF_GTK_TOOLBAR_ITEMS_H
+
+typedef enum {
+ BACK_BUTTON = 0,
+ HISTORY_BUTTON,
+ FORWARD_BUTTON,
+ RELOADSTOP_BUTTON,
+ URL_BAR_ITEM,
+ WEBSEARCH_ITEM,
+ OPENMENU_BUTTON,
+ STOP_BUTTON,
+ RELOAD_BUTTON,
+ HOME_BUTTON,
+ THROBBER_ITEM,
+ NEWWINDOW_BUTTON,
+ NEWTAB_BUTTON,
+ OPENFILE_BUTTON,
+ CLOSETAB_BUTTON,
+ CLOSEWINDOW_BUTTON,
+ SAVEPAGE_BUTTON,
+ PDF_BUTTON,
+ PLAINTEXT_BUTTON,
+ DRAWFILE_BUTTON,
+ POSTSCRIPT_BUTTON,
+ PRINTPREVIEW_BUTTON,
+ PRINT_BUTTON,
+ QUIT_BUTTON,
+ CUT_BUTTON,
+ COPY_BUTTON,
+ PASTE_BUTTON,
+ DELETE_BUTTON,
+ SELECTALL_BUTTON,
+ FIND_BUTTON,
+ PREFERENCES_BUTTON,
+ ZOOMPLUS_BUTTON,
+ ZOOMMINUS_BUTTON,
+ ZOOMNORMAL_BUTTON,
+ FULLSCREEN_BUTTON,
+ VIEWSOURCE_BUTTON,
+ DOWNLOADS_BUTTON,
+ SAVEWINDOWSIZE_BUTTON,
+ TOGGLEDEBUGGING_BUTTON,
+ SAVEBOXTREE_BUTTON,
+ SAVEDOMTREE_BUTTON,
+ LOCALHISTORY_BUTTON,
+ GLOBALHISTORY_BUTTON,
+ ADDBOOKMARKS_BUTTON,
+ SHOWBOOKMARKS_BUTTON,
+ SHOWCOOKIES_BUTTON,
+ OPENLOCATION_BUTTON,
+ NEXTTAB_BUTTON,
+ PREVTAB_BUTTON,
+ CONTENTS_BUTTON,
+ GUIDE_BUTTON,
+ INFO_BUTTON,
+ ABOUT_BUTTON,
+ CUSTOMIZE_BUTTON,
+ PLACEHOLDER_BUTTON /* size indicator; array maximum indices */
+} nsgtk_toolbar_button; /* PLACEHOLDER_BUTTON - 1 */
+
+#endif
+
+/*
+ * Item fields are:
+ * - item identifier (enum value)
+ * - name (identifier)
+ * - initial sensitivity (true/false)
+ * - if there is a toolbar click signal handler (y/n) and it is available in
+ * the toolbar and toolbox as a button (b, implies y) if the item is
+ * available as a button but not placed in the toolbox (t, implies y)
+ * - if there is a menu activate signal handler (y/n) and it calls the
+ * toolbar click handler directly. (p, implies y)
+ * - item label as a netsurf message (identifier)
+ * - icon image name ("string")
+ */
+
+#ifndef TOOLBAR_ITEM
+#define TOOLBAR_ITEM(a, b, c, d, e, f, g)
+#define TOOLBAR_ITEM_SET
+#endif
+
+TOOLBAR_ITEM(BACK_BUTTON, back, false, b, p, gtkBack, "go-previous")
+TOOLBAR_ITEM(HISTORY_BUTTON, history, true, y, n, , "local-history")
+TOOLBAR_ITEM(FORWARD_BUTTON, forward, false, b, p, gtkForward, "go-next")
+TOOLBAR_ITEM(STOP_BUTTON, stop, false, t, p, gtkStop, NSGTK_STOCK_STOP)
+TOOLBAR_ITEM(RELOAD_BUTTON, reload, true, t, p, Reload, NSGTK_STOCK_REFRESH)
+TOOLBAR_ITEM(HOME_BUTTON, home, true, b, p, gtkHome, NSGTK_STOCK_HOME)
+TOOLBAR_ITEM(URL_BAR_ITEM, url_bar, true, n, n, , NULL)
+TOOLBAR_ITEM(WEBSEARCH_ITEM, websearch, true, n, n, , NULL)
+TOOLBAR_ITEM(THROBBER_ITEM, throbber, true, n, n, , NULL)
+TOOLBAR_ITEM(NEWWINDOW_BUTTON, newwindow, true, b, p, gtkNewWindow, "document-new")
+TOOLBAR_ITEM(NEWTAB_BUTTON, newtab, true, b, p, gtkNewTab, NSGTK_STOCK_ADD)
+TOOLBAR_ITEM(OPENFILE_BUTTON, openfile, true, b, p, gtkOpenFile, "document-open")
+TOOLBAR_ITEM(CLOSETAB_BUTTON, closetab, false, n, y, , "window-close")
+TOOLBAR_ITEM(CLOSEWINDOW_BUTTON, closewindow, true, y, p, , "window-close")
+TOOLBAR_ITEM(SAVEPAGE_BUTTON, savepage, true, b, p, gtkSavePage, "text-html")
+TOOLBAR_ITEM(PDF_BUTTON, pdf, false, y, p, , "x-office-document")
+TOOLBAR_ITEM(PLAINTEXT_BUTTON, plaintext, true, b, p, gtkPlainText, "text-x-generic")
+TOOLBAR_ITEM(DRAWFILE_BUTTON, drawfile, false, n, n, , NULL)
+TOOLBAR_ITEM(POSTSCRIPT_BUTTON, postscript, false, n, n, , NULL)
+TOOLBAR_ITEM(PRINTPREVIEW_BUTTON, printpreview, false, n, p, gtkPrintPreview, "gtk-print-preview")
+TOOLBAR_ITEM(PRINT_BUTTON, print, true, b, p, gtkPrint, "document-print")
+TOOLBAR_ITEM(QUIT_BUTTON, quit, true, b, p, gtkQuitMenu, "application-exit")
+TOOLBAR_ITEM(CUT_BUTTON, cut, true, b, p, gtkCut, "edit-cut")
+TOOLBAR_ITEM(COPY_BUTTON, copy, true, b, p, gtkCopy, "edit-copy")
+TOOLBAR_ITEM(PASTE_BUTTON, paste, true, b, p, gtkPaste, "edit-paste")
+TOOLBAR_ITEM(DELETE_BUTTON, delete, false, b, p, gtkDelete, "edit-delete")
+TOOLBAR_ITEM(SELECTALL_BUTTON, selectall, true, b, p, gtkSelectAll, "edit-select-all")
+TOOLBAR_ITEM(FIND_BUTTON, find, true, n, y, gtkFind, "edit-find")
+TOOLBAR_ITEM(PREFERENCES_BUTTON, preferences, true, b, p, gtkPreferences, "preferences-system")
+TOOLBAR_ITEM(ZOOMPLUS_BUTTON, zoomplus, true, b, p, gtkZoomPlus, "gtk-zoom-in")
+TOOLBAR_ITEM(ZOOMMINUS_BUTTON, zoomminus, true, b, p, gtkZoomMinus, "gtk-zoom-out")
+TOOLBAR_ITEM(ZOOMNORMAL_BUTTON, zoomnormal, true, b, p, gtkZoomNormal, "gtk-zoom-100")
+TOOLBAR_ITEM(FULLSCREEN_BUTTON, fullscreen, true, b, p, gtkFullScreen, "gtk-fullscreen")
+TOOLBAR_ITEM(VIEWSOURCE_BUTTON, viewsource, true, b, p, gtkPageSource, "gtk-index")
+TOOLBAR_ITEM(DOWNLOADS_BUTTON, downloads, true, b, p, gtkDownloads, NSGTK_STOCK_SAVE_AS)
+TOOLBAR_ITEM(SAVEWINDOWSIZE_BUTTON, savewindowsize, true, y, p, gtkSaveWindowSize, NULL)
+TOOLBAR_ITEM(TOGGLEDEBUGGING_BUTTON, toggledebugging, true, y, p, gtkToggleDebugging, NULL)
+TOOLBAR_ITEM(SAVEBOXTREE_BUTTON, debugboxtree, true, y, p, gtkDebugBoxTree, NULL)
+TOOLBAR_ITEM(SAVEDOMTREE_BUTTON, debugdomtree, true, y, p, gtkDebugDomTree, NULL)
+TOOLBAR_ITEM(LOCALHISTORY_BUTTON, localhistory, true, y, p, , NULL)
+TOOLBAR_ITEM(GLOBALHISTORY_BUTTON, globalhistory, true, y, p, gtkGlobalHistory, NULL)
+TOOLBAR_ITEM(ADDBOOKMARKS_BUTTON, addbookmarks, true, y, p, gtkAddBookMarks, NULL)
+TOOLBAR_ITEM(SHOWBOOKMARKS_BUTTON, showbookmarks, true, b, p, gtkShowBookMarks, "user-bookmarks")
+TOOLBAR_ITEM(SHOWCOOKIES_BUTTON, showcookies, true, b, p, gtkShowCookies, "show-cookie")
+TOOLBAR_ITEM(OPENLOCATION_BUTTON, openlocation, true, y, p, gtkOpenLocation, NULL)
+TOOLBAR_ITEM(NEXTTAB_BUTTON, nexttab, false, n, y, gtkNextTab, "media-skip-forward")
+TOOLBAR_ITEM(PREVTAB_BUTTON, prevtab, false, n, y, gtkPrevTab, "media-skip-backward")
+TOOLBAR_ITEM(CONTENTS_BUTTON, contents, true, y, p, gtkContents, "gtk-help")
+TOOLBAR_ITEM(GUIDE_BUTTON, guide, true, y, p, gtkGuide, "gtk-help")
+TOOLBAR_ITEM(INFO_BUTTON, info, true, y, p, gtkUserInformation, "dialog-information")
+TOOLBAR_ITEM(ABOUT_BUTTON, about, true, b, p, gtkAbout, "help-about")
+TOOLBAR_ITEM(OPENMENU_BUTTON, openmenu, true, b, n, gtkOpenMenu, NSGTK_STOCK_OPEN_MENU)
+TOOLBAR_ITEM(CUSTOMIZE_BUTTON, cutomize, true, y, p, , NULL)
+TOOLBAR_ITEM(RELOADSTOP_BUTTON, reloadstop, true, b, n, Reload, NSGTK_STOCK_REFRESH)
+
+#ifdef TOOLBAR_ITEM_SET
+#undef TOOLBAR_ITEM
+#undef TOOLBAR_ITEM_SET
+#endif
diff --git a/frontends/gtk/viewsource.c b/frontends/gtk/viewsource.c
index acf81018d..7c11862c6 100644
--- a/frontends/gtk/viewsource.c
+++ b/frontends/gtk/viewsource.c
@@ -34,8 +34,8 @@ nserror nsgtk_viewsource(GtkWindow *parent, struct browser_window *bw)
{
nserror ret;
struct hlcache_handle *hlcontent;
- const char *source_data;
- unsigned long source_size;
+ const uint8_t *source_data;
+ size_t source_size;
char *ndata = NULL;
size_t ndata_len;
char *filename;
@@ -52,7 +52,7 @@ nserror nsgtk_viewsource(GtkWindow *parent, struct browser_window *bw)
source_data = content_get_source_data(hlcontent, &source_size);
- ret = nsurl_nice(browser_window_get_url(bw), &filename, false);
+ ret = nsurl_nice(browser_window_access_url(bw), &filename, false);
if (ret != NSERROR_OK) {
filename = strdup(messages_get("SaveSource"));
if (filename == NULL) {
@@ -60,15 +60,16 @@ nserror nsgtk_viewsource(GtkWindow *parent, struct browser_window *bw)
}
}
- title = malloc(strlen(nsurl_access(browser_window_get_url(bw))) + SLEN("Source of - NetSurf") + 1);
+ title = malloc(strlen(nsurl_access(browser_window_access_url(bw))) + SLEN("Source of - NetSurf") + 1);
if (title == NULL) {
free(filename);
return NSERROR_NOMEM;
}
- sprintf(title, "Source of %s - NetSurf", nsurl_access(browser_window_get_url(bw)));
+ sprintf(title, "Source of %s - NetSurf", nsurl_access(browser_window_access_url(bw)));
- ret = utf8_from_enc(source_data,
- content_get_encoding(hlcontent, CONTENT_ENCODING_NORMAL),
+ ret = utf8_from_enc((const char *)source_data,
+ content_get_encoding(hlcontent,
+ CONTENT_ENCODING_NORMAL),
source_size,
&ndata,
&ndata_len);
diff --git a/frontends/gtk/window.c b/frontends/gtk/window.c
index 7f24d40ac..f5c87ef87 100644
--- a/frontends/gtk/window.c
+++ b/frontends/gtk/window.c
@@ -31,10 +31,13 @@
#include <gdk/gdkkeysyms.h>
#include <gdk-pixbuf/gdk-pixdata.h>
-#include "netsurf/inttypes.h"
+#include "utils/utils.h"
#include "utils/log.h"
#include "utils/utf8.h"
#include "utils/nsoption.h"
+#include "utils/messages.h"
+#include "utils/nsurl.h"
+#include "netsurf/inttypes.h"
#include "netsurf/content.h"
#include "netsurf/browser_window.h"
#include "netsurf/mouse.h"
@@ -45,12 +48,13 @@
#include "desktop/searchweb.h"
#include "desktop/textinput.h"
-#include "gtk/window.h"
#include "gtk/selection.h"
#include "gtk/warn.h"
#include "gtk/compat.h"
#include "gtk/gui.h"
#include "gtk/scaffolding.h"
+#include "gtk/toolbar_items.h"
+#include "gtk/toolbar.h"
#include "gtk/local_history.h"
#include "gtk/plotters.h"
#include "gtk/schedule.h"
@@ -58,13 +62,18 @@
#include "gtk/bitmap.h"
#include "gtk/gdk.h"
#include "gtk/resources.h"
+#include "gtk/search.h"
+#include "gtk/throbber.h"
+#include "gtk/window.h"
+
+/**
+ * time (in ms) between throbber animation frame updates
+ */
+#define THROBBER_FRAME_TIME (100)
static GtkWidget *select_menu;
static struct form_control *select_menu_control;
-static void nsgtk_select_menu_clicked(GtkCheckMenuItem *checkmenuitem,
- gpointer user_data);
-
struct gui_window {
/**
* The gtk scaffold object containing menu, buttons, url bar, [tabs],
@@ -94,12 +103,21 @@ struct gui_window {
/** previous event location */
int last_x, last_y;
- /** The top level container (tabContents) */
+ /** controls toolbar context */
+ struct nsgtk_toolbar *toolbar;
+
+ /** search toolbar context */
+ struct gtk_search *search;
+
+ /** The top level container (tabBox) */
GtkWidget *container;
/** display widget for this page or frame */
GtkLayout *layout;
+ /** The container for the layout etc */
+ GtkWidget *grid;
+
/** handle to the the visible tab */
GtkWidget *tab;
@@ -112,15 +130,15 @@ struct gui_window {
/** has the status pane had its first size operation yet? */
bool paned_sized;
- /** to allow disactivation / resume of normal window behaviour */
- gulong signalhandler[NSGTK_WINDOW_SIGNAL_COUNT];
-
/** The icon this window should have */
GdkPixbuf *icon;
/** The input method to use with this window */
GtkIMContext *input_method;
+ /** current frame of throbber */
+ int throb_frame;
+
/** list for cleanup */
struct gui_window *next, *prev;
};
@@ -128,60 +146,12 @@ struct gui_window {
/**< first entry in window list */
struct gui_window *window_list = NULL;
-/** flag controlling opening of tabs in teh background */
-int temp_open_background = -1;
-
-struct nsgtk_scaffolding *nsgtk_get_scaffold(struct gui_window *g)
-{
- return g->scaffold;
-}
-
-GdkPixbuf *nsgtk_get_icon(struct gui_window *gw)
-{
- return gw->icon;
-}
-
-struct browser_window *nsgtk_get_browser_window(struct gui_window *g)
-{
- return g->bw;
-}
-
-unsigned long nsgtk_window_get_signalhandler(struct gui_window *g, int i)
-{
- return g->signalhandler[i];
-}
-
-GtkLayout *nsgtk_window_get_layout(struct gui_window *g)
-{
- return g->layout;
-}
-
-GtkWidget *nsgtk_window_get_tab(struct gui_window *g)
-{
- return g->tab;
-}
-
-void nsgtk_window_set_tab(struct gui_window *g, GtkWidget *w)
-{
- g->tab = w;
-}
-
-
-struct gui_window *nsgtk_window_iterate(struct gui_window *g)
-{
- return g->next;
-}
-
-float nsgtk_get_scale_for_gui(struct gui_window *g)
-{
- return browser_window_get_scale(g->bw);
-}
-
-static void nsgtk_select_menu_clicked(GtkCheckMenuItem *checkmenuitem,
- gpointer user_data)
+static void
+nsgtk_select_menu_clicked(GtkCheckMenuItem *checkmenuitem,
+ gpointer user_data)
{
form_select_process_selection(select_menu_control,
- (intptr_t)user_data);
+ (intptr_t)user_data);
}
#if GTK_CHECK_VERSION(3,0,0)
@@ -278,8 +248,10 @@ nsgtk_window_draw_event(GtkWidget *widget, GdkEventExpose *event, gpointer data)
#endif
-static gboolean nsgtk_window_motion_notify_event(GtkWidget *widget,
- GdkEventMotion *event, gpointer data)
+static gboolean
+nsgtk_window_motion_notify_event(GtkWidget *widget,
+ GdkEventMotion *event,
+ gpointer data)
{
struct gui_window *g = data;
bool shift = event->state & GDK_SHIFT_MASK;
@@ -325,15 +297,34 @@ static gboolean nsgtk_window_motion_notify_event(GtkWidget *widget,
if (g->mouse.state & BROWSER_MOUSE_MOD_2 && !ctrl)
g->mouse.state ^= BROWSER_MOUSE_MOD_2;
- browser_window_mouse_track(g->bw, g->mouse.state,
- event->x / browser_window_get_scale(g->bw),
- event->y / browser_window_get_scale(g->bw));
+ browser_window_mouse_track(g->bw, g->mouse.state, event->x, event->y);
return TRUE;
}
-static gboolean nsgtk_window_button_press_event(GtkWidget *widget,
- GdkEventButton *event, gpointer data)
+/**
+ * GTK signal handler for focus-out-event on layout
+ *
+ * when focus leaves the layout widget ensure the caret is cleared
+ */
+static gboolean
+nsgtk_window_focus_out_event(GtkWidget *widget,
+ GdkEvent *event,
+ gpointer data)
+{
+ struct gui_window *g = data;
+
+ browser_window_remove_caret(g->bw, true);
+ return FALSE;
+}
+
+/**
+ * GTK signal handler for button-press-event on layout
+ */
+static gboolean
+nsgtk_window_button_press_event(GtkWidget *widget,
+ GdkEventButton *event,
+ gpointer data)
{
struct gui_window *g = data;
@@ -341,8 +332,8 @@ static gboolean nsgtk_window_button_press_event(GtkWidget *widget,
gtk_widget_grab_focus(GTK_WIDGET(g->layout));
nsgtk_local_history_hide();
- g->mouse.pressed_x = event->x / browser_window_get_scale(g->bw);
- g->mouse.pressed_y = event->y / browser_window_get_scale(g->bw);
+ g->mouse.pressed_x = event->x;
+ g->mouse.pressed_y = event->y;
switch (event->button) {
case 1: /* Left button, usually. Pass to core as BUTTON 1. */
@@ -382,25 +373,43 @@ static gboolean nsgtk_window_button_press_event(GtkWidget *widget,
g->last_x = event->x;
g->last_y = event->y;
- browser_window_mouse_click(g->bw, g->mouse.state, g->mouse.pressed_x,
- g->mouse.pressed_y);
+ browser_window_mouse_click(g->bw,
+ g->mouse.state,
+ g->mouse.pressed_x,
+ g->mouse.pressed_y);
return TRUE;
}
-static gboolean nsgtk_window_button_release_event(GtkWidget *widget,
- GdkEventButton *event, gpointer data)
+
+static gboolean
+nsgtk_window_button_release_event(GtkWidget *widget,
+ GdkEventButton *event,
+ gpointer data)
{
struct gui_window *g = data;
bool shift = event->state & GDK_SHIFT_MASK;
bool ctrl = event->state & GDK_CONTROL_MASK;
+ switch (event->button) {
+ case 8:
+ nsgtk_toolbar_item_activate(g->toolbar, BACK_BUTTON);
+ break;
+ case 9:
+ nsgtk_toolbar_item_activate(g->toolbar, FORWARD_BUTTON);
+ break;
+ default:
+ NSLOG(netsurf, DEBUG, "event button %d", event->button);
+ break;
+ }
+
/* If the mouse state is PRESS then we are waiting for a release to emit
* a click event, otherwise just reset the state to nothing */
- if (g->mouse.state & BROWSER_MOUSE_PRESS_1)
+ if (g->mouse.state & BROWSER_MOUSE_PRESS_1) {
g->mouse.state ^= (BROWSER_MOUSE_PRESS_1 | BROWSER_MOUSE_CLICK_1);
- else if (g->mouse.state & BROWSER_MOUSE_PRESS_2)
+ } else if (g->mouse.state & BROWSER_MOUSE_PRESS_2) {
g->mouse.state ^= (BROWSER_MOUSE_PRESS_2 | BROWSER_MOUSE_CLICK_2);
+ }
/* Handle modifiers being removed */
if (g->mouse.state & BROWSER_MOUSE_MOD_1 && !shift)
@@ -409,19 +418,16 @@ static gboolean nsgtk_window_button_release_event(GtkWidget *widget,
g->mouse.state ^= BROWSER_MOUSE_MOD_2;
if (g->mouse.state & (BROWSER_MOUSE_CLICK_1 | BROWSER_MOUSE_CLICK_2)) {
- browser_window_mouse_click(g->bw, g->mouse.state,
- event->x / browser_window_get_scale(g->bw),
- event->y / browser_window_get_scale(g->bw));
+ browser_window_mouse_click(g->bw, g->mouse.state, event->x, event->y);
} else {
- browser_window_mouse_track(g->bw, 0,
- event->x / browser_window_get_scale(g->bw),
- event->y / browser_window_get_scale(g->bw));
+ browser_window_mouse_track(g->bw, 0, event->x, event->y);
}
g->mouse.state = 0;
return TRUE;
}
+
static gboolean
nsgtk_window_scroll_event(GtkWidget *widget,
GdkEventScroll *event,
@@ -466,9 +472,8 @@ nsgtk_window_scroll_event(GtkWidget *widget,
deltay *= nsgtk_adjustment_get_step_increment(vscroll);
if (browser_window_scroll_at_point(g->bw,
- event->x / browser_window_get_scale(g->bw),
- event->y / browser_window_get_scale(g->bw),
- deltax, deltay) != true) {
+ event->x, event->y,
+ deltax, deltay) != true) {
/* core did not handle event so change adjustments */
@@ -510,12 +515,15 @@ nsgtk_window_scroll_event(GtkWidget *widget,
return TRUE;
}
-static gboolean nsgtk_window_keypress_event(GtkWidget *widget,
- GdkEventKey *event, gpointer data)
+
+static gboolean
+nsgtk_window_keypress_event(GtkWidget *widget,
+ GdkEventKey *event,
+ gpointer data)
{
struct gui_window *g = data;
uint32_t nskey;
-
+
if (gtk_im_context_filter_keypress(g->input_method, event))
return TRUE;
@@ -627,17 +635,22 @@ static gboolean nsgtk_window_keypress_event(GtkWidget *widget,
return TRUE;
}
-static gboolean nsgtk_window_keyrelease_event(GtkWidget *widget,
- GdkEventKey *event, gpointer data)
+
+static gboolean
+nsgtk_window_keyrelease_event(GtkWidget *widget,
+ GdkEventKey *event,
+ gpointer data)
{
struct gui_window *g = data;
-
+
return gtk_im_context_filter_keypress(g->input_method, event);
}
-static void nsgtk_window_input_method_commit(GtkIMContext *ctx,
- const gchar *str, gpointer data)
+static void
+nsgtk_window_input_method_commit(GtkIMContext *ctx,
+ const gchar *str,
+ gpointer data)
{
struct gui_window *g = data;
size_t len = strlen(str), offset = 0;
@@ -652,8 +665,10 @@ static void nsgtk_window_input_method_commit(GtkIMContext *ctx,
}
-static gboolean nsgtk_window_size_allocate_event(GtkWidget *widget,
- GtkAllocation *allocation, gpointer data)
+static gboolean
+nsgtk_window_size_allocate_event(GtkWidget *widget,
+ GtkAllocation *allocation,
+ gpointer data)
{
struct gui_window *g = data;
@@ -663,7 +678,8 @@ static gboolean nsgtk_window_size_allocate_event(GtkWidget *widget,
}
-/** when the pane position is changed update the user option
+/**
+ * when the pane position is changed update the user option
*
* The slightly awkward implementation with the first allocation flag
* is necessary because the initial window creation does not cause an
@@ -692,11 +708,15 @@ nsgtk_paned_notify__position(GObject *gobject, GParamSpec *pspec, gpointer data)
((gtk_paned_get_position(g->paned) * 10000) / (pane_alloc.width - 1)));
}
-/** Set status bar / scroll bar proportion according to user option
- * when pane is resized.
+
+/**
+ * Set status bar / scroll bar proportion according to user option
+ * when pane is resized.
*/
-static gboolean nsgtk_paned_size_allocate_event(GtkWidget *widget,
- GtkAllocation *allocation, gpointer data)
+static gboolean
+nsgtk_paned_size_allocate_event(GtkWidget *widget,
+ GtkAllocation *allocation,
+ gpointer data)
{
gtk_paned_set_position(GTK_PANED(widget),
(nsoption_int(toolbar_status_size) * allocation->width) / 10000);
@@ -704,7 +724,12 @@ static gboolean nsgtk_paned_size_allocate_event(GtkWidget *widget,
return TRUE;
}
-/* destroy the browsing context as there is nothing to display it now */
+
+/**
+ * handler for gtk destroy signal on window container
+ *
+ * destroy the browsing context as there is will be nothing to display it now
+ */
static void window_destroy(GtkWidget *widget, gpointer data)
{
struct gui_window *gw = data;
@@ -712,6 +737,66 @@ static void window_destroy(GtkWidget *widget, gpointer data)
browser_window_destroy(gw->bw);
g_object_unref(gw->input_method);
+
+ /* free any existing icon */
+ if (gw->icon != NULL) {
+ g_object_unref(gw->icon);
+ gw->icon = NULL;
+ }
+
+ free(gw);
+}
+
+
+static struct browser_window *bw_from_gw(void *data)
+{
+ struct gui_window *gw = data;
+ return gw->bw;
+}
+
+
+static bool get_tool_bar_show(void)
+{
+ const char *cur_bar_show;
+
+ cur_bar_show = nsoption_charp(bar_show);
+ if (cur_bar_show != NULL) {
+ if (strcmp(cur_bar_show, "menu/tool") == 0) {
+ return true;
+ } else if (strcmp(cur_bar_show, "tool") == 0) {
+ return true;
+ }
+ }
+ return false;
+}
+
+
+/**
+ * Make the throbber advance to next frame.
+ *
+ * scheduled callback to update the throbber
+ *
+ * \param p The context passed when scheduled.
+ */
+static void next_throbber_frame(void *p)
+{
+ struct gui_window *gw = p;
+ nserror res;
+ GdkPixbuf *pixbuf;
+
+ gw->throb_frame++; /* advance to next frame */
+
+ res = nsgtk_throbber_get_frame(gw->throb_frame, &pixbuf);
+ if (res == NSERROR_BAD_SIZE) {
+ gw->throb_frame = 1;
+ res = nsgtk_throbber_get_frame(gw->throb_frame, &pixbuf);
+ }
+
+ if (res == NSERROR_OK) {
+ nsgtk_tab_set_icon(gw->container, pixbuf);
+ /* only schedule next frame if there are no errors */
+ nsgtk_schedule(THROBBER_FRAME_TIME, next_throbber_frame, p);
+ }
}
@@ -730,13 +815,17 @@ static void window_destroy(GtkWidget *widget, gpointer data)
*/
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 *g; /* what is being created to return */
- bool tempback;
+ bool open_in_background = !(nsoption_bool(focus_new));
GtkBuilder* tab_builder;
+ /* If there is a foreground request, override user preference */
+ if (flags & GW_CREATE_FOREGROUND)
+ open_in_background = false;
+
nserror res;
res = nsgtk_builder_new_from_resname("tabcontents", &tab_builder);
@@ -781,12 +870,32 @@ gui_window_create(struct browser_window *bw,
}
/* Construct our primary elements */
- g->container = GTK_WIDGET(gtk_builder_get_object(tab_builder, "tabContents"));
+ g->container = GTK_WIDGET(gtk_builder_get_object(tab_builder, "tabBox"));
g->layout = GTK_LAYOUT(gtk_builder_get_object(tab_builder, "layout"));
+ g->grid = GTK_WIDGET(gtk_builder_get_object(tab_builder, "tabContents"));
g->status_bar = GTK_LABEL(gtk_builder_get_object(tab_builder, "status_bar"));
g->paned = GTK_PANED(gtk_builder_get_object(tab_builder, "hpaned1"));
g->input_method = gtk_im_multicontext_new();
+
+ /* create toolbar */
+ res = nsgtk_toolbar_create(tab_builder, bw_from_gw, g,
+ !!(flags & GW_CREATE_FOCUS_LOCATION),
+ &g->toolbar);
+ if (res != NSERROR_OK) {
+ free(g);
+ g_object_unref(tab_builder);
+ return NULL;
+ }
+
+ /* local page text search toolbar */
+ res = nsgtk_search_create(tab_builder, g->bw, &g->search);
+ if (res != NSERROR_OK) {
+ free(g);
+ g_object_unref(tab_builder);
+ return NULL;
+ }
+
/* set a default favicon */
g_object_ref(favicon_pixbuf);
g->icon = favicon_pixbuf;
@@ -816,11 +925,10 @@ gui_window_create(struct browser_window *bw,
/* set the default background colour of the drawing area to white. */
nsgtk_widget_override_background_color(GTK_WIDGET(g->layout),
- GTK_STATE_NORMAL,
+ GTK_STATE_FLAG_NORMAL,
0, 0xffff, 0xffff, 0xffff);
- g->signalhandler[NSGTK_WINDOW_SIGNAL_REDRAW] =
- nsgtk_connect_draw_event(GTK_WIDGET(g->layout),
+ nsgtk_connect_draw_event(GTK_WIDGET(g->layout),
G_CALLBACK(nsgtk_window_draw_event), g);
/* helper macro to conect signals to callbacks */
@@ -830,8 +938,7 @@ gui_window_create(struct browser_window *bw,
/* layout signals */
CONNECT(g->layout, "motion-notify-event",
nsgtk_window_motion_notify_event, g);
- g->signalhandler[NSGTK_WINDOW_SIGNAL_CLICK] =
- CONNECT(g->layout, "button-press-event",
+ CONNECT(g->layout, "button-press-event",
nsgtk_window_button_press_event, g);
CONNECT(g->layout, "button-release-event",
nsgtk_window_button_release_event, g);
@@ -843,6 +950,8 @@ gui_window_create(struct browser_window *bw,
nsgtk_window_size_allocate_event, g);
CONNECT(g->layout, "scroll-event",
nsgtk_window_scroll_event, g);
+ CONNECT(g->layout, "focus-out-event",
+ nsgtk_window_focus_out_event, g);
/* status pane signals */
CONNECT(g->paned, "size-allocate",
@@ -864,71 +973,65 @@ gui_window_create(struct browser_window *bw,
nsgtk_window_input_method_commit, g);
/* add the tab container to the scaffold notebook */
- switch (temp_open_background) {
- case -1:
- tempback = !(nsoption_bool(focus_new));
- break;
- case 0:
- tempback = false;
- break;
- default:
- tempback = true;
- break;
- }
- nsgtk_tab_add(g, g->container, tempback);
+ nsgtk_tab_add(g, g->container,
+ open_in_background,
+ messages_get("NewTab"), g->icon);
+
+ /* initialy should not be visible */
+ nsgtk_search_toggle_visibility(g->search);
+
+ /* set toolbar visibility from user option */
+ nsgtk_toolbar_show(g->toolbar, get_tool_bar_show());
/* safe to drop the reference to the tab_builder as the container is
* referenced by the notebook now.
*/
g_object_unref(tab_builder);
- return g;
-}
-
-
-
-void nsgtk_reflow_all_windows(void)
-{
- for (struct gui_window *g = window_list; g; g = g->next) {
- nsgtk_tab_options_changed(nsgtk_scaffolding_notebook(g->scaffold));
- browser_window_schedule_reformat(g->bw);
+ /* Finally we need to focus the location bar if requested */
+ if (flags & GW_CREATE_FOCUS_LOCATION) {
+ if (nsgtk_window_item_activate(g, OPENLOCATION_BUTTON) != NSERROR_OK) {
+ NSLOG(netsurf, WARNING, "Unable to focus location input");
+ }
}
+
+ return g;
}
-void nsgtk_window_destroy_browser(struct gui_window *gw)
+static void gui_window_destroy(struct gui_window *gw)
{
- /* remove tab */
- gtk_widget_destroy(gw->container);
-}
+ NSLOG(netsurf, INFO, "gui_window: %p", gw);
+ assert(gw != NULL);
+ assert(gw->bw != NULL);
+ NSLOG(netsurf, INFO, "scaffolding: %p", gw->scaffold);
-static void gui_window_destroy(struct gui_window *g)
-{
- NSLOG(netsurf, INFO, "gui_window: %p", g);
- assert(g != NULL);
- assert(g->bw != NULL);
- NSLOG(netsurf, INFO, "scaffolding: %p", g->scaffold);
+ /* kill off any throbber that might be running */
+ nsgtk_schedule(-1, next_throbber_frame, gw);
- if (g->prev) {
- g->prev->next = g->next;
+ /* remove from window list */
+ if (gw->prev) {
+ gw->prev->next = gw->next;
} else {
- window_list = g->next;
+ window_list = gw->next;
}
- if (g->next) {
- g->next->prev = g->prev;
+ if (gw->next) {
+ gw->next->prev = gw->prev;
}
NSLOG(netsurf, INFO, "window list head: %p", window_list);
}
+
/**
* favicon setting for gtk gui window.
*
* \param gw gtk gui window to set favicon on.
* \param icon A handle to the new favicon content.
*/
-static void gui_window_set_icon(struct gui_window *gw, struct hlcache_handle *icon)
+static void
+gui_window_set_icon(struct gui_window *gw, struct hlcache_handle *icon)
{
struct bitmap *icon_bitmap = NULL;
@@ -952,9 +1055,13 @@ static void gui_window_set_icon(struct gui_window *gw, struct hlcache_handle *ic
gw->icon = favicon_pixbuf;
}
- nsgtk_scaffolding_set_icon(gw);
+ /* only set icon if throbber not running */
+ if (gw->throb_frame == 0) {
+ nsgtk_tab_set_icon(gw->container, gw->icon);
+ }
}
+
static bool gui_window_get_scroll(struct gui_window *g, int *sx, int *sy)
{
GtkAdjustment *vadj = nsgtk_layout_get_vadjustment(g->layout);
@@ -969,6 +1076,7 @@ static bool gui_window_get_scroll(struct gui_window *g, int *sx, int *sy)
return true;
}
+
static void nsgtk_redraw_caret(struct gui_window *g)
{
int sx, sy;
@@ -983,6 +1091,7 @@ static void nsgtk_redraw_caret(struct gui_window *g)
}
+
static void gui_window_remove_caret(struct gui_window *g)
{
int sx, sy;
@@ -1000,6 +1109,7 @@ static void gui_window_remove_caret(struct gui_window *g)
}
+
/**
* Invalidates an area of a GTK browser window
*
@@ -1011,7 +1121,6 @@ static nserror
nsgtk_window_invalidate_area(struct gui_window *g, const struct rect *rect)
{
int sx, sy;
- float scale;
if (rect == NULL) {
gtk_widget_queue_draw(GTK_WIDGET(g->layout));
@@ -1023,17 +1132,17 @@ nsgtk_window_invalidate_area(struct gui_window *g, const struct rect *rect)
}
gui_window_get_scroll(g, &sx, &sy);
- scale = browser_window_get_scale(g->bw);
gtk_widget_queue_draw_area(GTK_WIDGET(g->layout),
- rect->x0 * scale - sx,
- rect->y0 * scale - sy,
- (rect->x1 - rect->x0) * scale,
- (rect->y1 - rect->y0) * scale);
+ rect->x0 - sx,
+ rect->y0 - sy,
+ rect->x1 - rect->x0,
+ rect->y1 - rect->y0);
return NSERROR_OK;
}
+
static void gui_window_set_status(struct gui_window *g, const char *text)
{
assert(g);
@@ -1087,17 +1196,20 @@ gui_window_set_scroll(struct gui_window *g, const struct rect *rect)
return NSERROR_OK;
}
+
static void gui_window_update_extent(struct gui_window *g)
{
int w, h;
if (browser_window_get_extents(g->bw, true, &w, &h) == NSERROR_OK) {
gtk_layout_set_size(g->layout, w, h);
+ gtk_widget_queue_resize(g->grid);
}
}
-static void gui_window_set_pointer(struct gui_window *g,
- gui_pointer_shape shape)
+
+static void
+gui_window_set_pointer(struct gui_window *g, gui_pointer_shape shape)
{
GdkCursor *cursor = NULL;
GdkCursorType cursortype;
@@ -1182,8 +1294,10 @@ static void gui_window_set_pointer(struct gui_window *g,
}
-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)
{
nsgtk_redraw_caret(g);
@@ -1215,14 +1329,11 @@ static void gui_window_place_caret(struct gui_window *g, int x, int y, int heigh
* \param gw The gui window to measure content area of.
* \param width receives width of window
* \param height receives height of window
- * \param scaled whether to return scaled values
* \return NSERROR_OK on sucess and width and height updated
* else error code.
*/
static nserror
-gui_window_get_dimensions(struct gui_window *gw,
- int *width, int *height,
- bool scaled)
+gui_window_get_dimensions(struct gui_window *gw, int *width, int *height)
{
GtkAllocation alloc;
@@ -1232,23 +1343,19 @@ gui_window_get_dimensions(struct gui_window *gw,
*width = alloc.width;
*height = alloc.height;
- if (scaled) {
- float scale = browser_window_get_scale(gw->bw);
- *width /= scale;
- *height /= scale;
- }
- NSLOG(netsurf, INFO, "gw:%p width:%i height:%i", gw, *width, *height);
-
return NSERROR_OK;
}
+
static void gui_window_start_selection(struct gui_window *g)
{
gtk_widget_grab_focus(GTK_WIDGET(g->layout));
}
-static void gui_window_create_form_select_menu(struct gui_window *g,
- struct form_control *control)
+
+static void
+gui_window_create_form_select_menu(struct gui_window *g,
+ struct form_control *control)
{
intptr_t item;
struct form_option *option;
@@ -1295,11 +1402,15 @@ static void gui_window_create_form_select_menu(struct gui_window *g,
gtk_widget_show_all(select_menu);
- gtk_menu_popup(GTK_MENU(select_menu), NULL, NULL, NULL,
- NULL /* data */, 0, gtk_get_current_event_time());
-
+ nsgtk_menu_popup_at_pointer(GTK_MENU(select_menu), NULL);
}
+
+/**
+ * GTK window UI callback when core needs a file selection gadget
+ *
+ * \param g The gui window on which the gadget has been requested
+ */
static void
gui_window_file_gadget_open(struct gui_window *g,
struct hlcache_handle *hl,
@@ -1315,7 +1426,7 @@ gui_window_file_gadget_open(struct gui_window *g,
NULL);
NSLOG(netsurf, INFO, "*** open dialog: %p", dialog);
-
+
int ret = gtk_dialog_run(GTK_DIALOG(dialog));
NSLOG(netsurf, INFO, "*** return value: %d", ret);
if (ret == GTK_RESPONSE_ACCEPT) {
@@ -1323,7 +1434,7 @@ gui_window_file_gadget_open(struct gui_window *g,
filename = gtk_file_chooser_get_filename(
GTK_FILE_CHOOSER(dialog));
-
+
browser_window_set_gadget_filename(g->bw, gadget, filename);
g_free(filename);
@@ -1332,6 +1443,147 @@ gui_window_file_gadget_open(struct gui_window *g,
gtk_widget_destroy(dialog);
}
+
+/**
+ * handle throbber changing state
+ */
+static nserror throbber(struct gui_window *gw, bool active)
+{
+ nsgtk_toolbar_throbber(gw->toolbar, active);
+ nsgtk_scaffolding_throbber(gw, active);
+ if (active) {
+ nsgtk_schedule(THROBBER_FRAME_TIME, next_throbber_frame, gw);
+ } else {
+ nsgtk_schedule(-1, next_throbber_frame, gw);
+ gw->throb_frame = 0;
+ /* set tab back to favicon */
+ nsgtk_tab_set_icon(gw->container, gw->icon);
+ }
+ return NSERROR_OK;
+}
+
+
+/**
+ * handle page info changing
+ */
+static nserror page_info_change(struct gui_window *gw)
+{
+ nsgtk_toolbar_page_info_change(gw->toolbar);
+ return NSERROR_OK;
+}
+
+/**
+ * GTK window UI callback to process miscellaneous events
+ *
+ * \param gw The window receiving the event.
+ * \param event The event code.
+ * \return NSERROR_OK when processed ok
+ */
+static nserror
+gui_window_event(struct gui_window *gw, enum gui_window_event event)
+{
+ switch (event) {
+ case GW_EVENT_UPDATE_EXTENT:
+ gui_window_update_extent(gw);
+ break;
+
+ case GW_EVENT_REMOVE_CARET:
+ gui_window_remove_caret(gw);
+ break;
+
+ case GW_EVENT_START_SELECTION:
+ gui_window_start_selection(gw);
+ break;
+
+ case GW_EVENT_START_THROBBER:
+ throbber(gw, true);
+ break;
+
+ case GW_EVENT_STOP_THROBBER:
+ throbber(gw, false);
+ break;
+
+ case GW_EVENT_PAGE_INFO_CHANGE:
+ page_info_change(gw);
+ break;
+
+ default:
+ break;
+ }
+ return NSERROR_OK;
+}
+
+
+/**
+ * GTK window UI callback when core changes the current url
+ *
+ * \param gw The gui window on which the url has been set.
+ * \param url The new url.
+ */
+static nserror gui_window_set_url(struct gui_window *gw, nsurl *url)
+{
+ return nsgtk_toolbar_set_url(gw->toolbar, url);
+}
+
+
+/**
+ * GTK window UI callback when core changes the current title
+ *
+ * \param gw The gui window on which the url has been set.
+ * \param url The new url.
+ */
+static void gui_window_set_title(struct gui_window *gw, const char *title)
+{
+
+ if ((title != NULL) && (title[0] != '\0')) {
+ nsgtk_tab_set_title(gw->container, title);
+ }
+ nsgtk_scaffolding_set_title(gw, title);
+}
+
+
+/**
+ * GTK UI callback when search provider details are updated.
+ *
+ * \param name The providers name.
+ * \param bitmap The bitmap representing the provider.
+ * \return NSERROR_OK on success else error code.
+ */
+static nserror
+gui_search_web_provider_update(const char *name, struct bitmap *bitmap)
+{
+ struct gui_window *gw;
+ GdkPixbuf *pixbuf = NULL;
+
+ if (bitmap != NULL) {
+ pixbuf = nsgdk_pixbuf_get_from_surface(bitmap->surface, 32, 32);
+ }
+
+ for (gw = window_list; gw != NULL; gw = gw->next) {
+ nsgtk_toolbar_set_websearch_image(gw->toolbar, pixbuf);
+ }
+
+ if (pixbuf != NULL) {
+ g_object_unref(pixbuf);
+ }
+
+ return NSERROR_OK;
+}
+
+
+/**
+ * GTK frontend web search operation table
+ */
+static struct gui_search_web_table search_web_table = {
+ .provider_update = gui_search_web_provider_update,
+};
+
+struct gui_search_web_table *nsgtk_search_web_table = &search_web_table;
+
+
+/**
+ * GTK frontend browser window operation table
+ */
static struct gui_window_table window_table = {
.create = gui_window_create,
.destroy = gui_window_destroy,
@@ -1339,22 +1591,115 @@ static struct gui_window_table window_table = {
.get_scroll = gui_window_get_scroll,
.set_scroll = gui_window_set_scroll,
.get_dimensions = gui_window_get_dimensions,
- .update_extent = gui_window_update_extent,
+ .event = gui_window_event,
.set_icon = gui_window_set_icon,
+ .set_title = gui_window_set_title,
.set_status = gui_window_set_status,
.set_pointer = gui_window_set_pointer,
.place_caret = gui_window_place_caret,
- .remove_caret = gui_window_remove_caret,
.create_form_select_menu = gui_window_create_form_select_menu,
.file_gadget_open = gui_window_file_gadget_open,
- .start_selection = gui_window_start_selection,
-
- /* from scaffold */
- .set_title = nsgtk_window_set_title,
.set_url = gui_window_set_url,
- .start_throbber = gui_window_start_throbber,
- .stop_throbber = gui_window_stop_throbber,
+
+
};
struct gui_window_table *nsgtk_window_table = &window_table;
+
+
+/* exported interface documented in window.h */
+struct nsgtk_scaffolding *nsgtk_get_scaffold(struct gui_window *g)
+{
+ return g->scaffold;
+}
+
+
+/* exported interface documented in window.h */
+struct browser_window *nsgtk_get_browser_window(struct gui_window *g)
+{
+ return g->bw;
+}
+
+
+/* exported interface documented in window.h */
+GtkLayout *nsgtk_window_get_layout(struct gui_window *g)
+{
+ return g->layout;
+}
+
+
+/* exported interface documented in window.h */
+nserror
+nsgtk_window_search_toggle(struct gui_window *gw)
+{
+ return nsgtk_search_toggle_visibility(gw->search);
+}
+
+
+/* exported interface documented in window.h */
+nserror
+nsgtk_window_item_activate(struct gui_window *gw, nsgtk_toolbar_button itemid)
+{
+ return nsgtk_toolbar_item_activate(gw->toolbar, itemid);
+}
+
+
+/* exported interface documented in window.h */
+void nsgtk_window_destroy_browser(struct gui_window *gw)
+{
+ /* remove tab */
+ gtk_widget_destroy(gw->container);
+}
+
+
+/* exported interface documented in window.h */
+nserror nsgtk_window_update_all(void)
+{
+ struct gui_window *gw;
+ for (gw = window_list; gw != NULL; gw = gw->next) {
+ nsgtk_tab_options_changed(nsgtk_scaffolding_notebook(gw->scaffold));
+ nsgtk_toolbar_restyle(gw->toolbar);
+ nsgtk_search_restyle(gw->search);
+ browser_window_schedule_reformat(gw->bw);
+ }
+ return NSERROR_OK;
+}
+
+
+/* exported interface documented in window.h */
+nserror nsgtk_window_toolbar_show(struct nsgtk_scaffolding *gs, bool show)
+{
+ struct gui_window *gw;
+ for (gw = window_list; gw != NULL; gw = gw->next) {
+ if (gw->scaffold == gs) {
+ nsgtk_toolbar_show(gw->toolbar, show);
+ }
+ }
+ return NSERROR_OK;
+}
+
+
+/* exported interface documented in window.h */
+nserror nsgtk_window_toolbar_update(void)
+{
+ struct gui_window *gw;
+ for (gw = window_list; gw != NULL; gw = gw->next) {
+ nsgtk_toolbar_update(gw->toolbar);
+
+ }
+ return NSERROR_OK;
+}
+
+/* exported interface documented in window.h */
+nserror nsgtk_window_position_page_info(struct gui_window *gw,
+ struct nsgtk_pi_window *win)
+{
+ return nsgtk_toolbar_position_page_info(gw->toolbar, win);
+}
+
+/* exported interface documented in window.h */
+nserror nsgtk_window_position_local_history(struct gui_window *gw)
+{
+ return nsgtk_toolbar_position_local_history(gw->toolbar);
+}
diff --git a/frontends/gtk/window.h b/frontends/gtk/window.h
index 7e46a7c60..a43e0b197 100644
--- a/frontends/gtk/window.h
+++ b/frontends/gtk/window.h
@@ -19,28 +19,98 @@
#ifndef NETSURF_GTK_WINDOW_H
#define NETSURF_GTK_WINDOW_H 1
-extern struct gui_window_table *nsgtk_window_table;
+struct nsgtk_pi_window;
-typedef enum nsgtk_window_signals {
- NSGTK_WINDOW_SIGNAL_CLICK,
- NSGTK_WINDOW_SIGNAL_REDRAW,
- NSGTK_WINDOW_SIGNAL_COUNT
-} nsgtk_window_signal;
+extern struct gui_window_table *nsgtk_window_table;
+extern struct gui_search_web_table *nsgtk_search_web_table;
extern struct gui_window *window_list;
-extern int temp_open_background;
-
-struct browser_window *nsgtk_get_browser_window(struct gui_window *g);
-struct nsgtk_scaffolding *nsgtk_get_scaffold(struct gui_window *g);
-GdkPixbuf *nsgtk_get_icon(struct gui_window *gw);
-void nsgtk_reflow_all_windows(void);
-float nsgtk_get_scale_for_gui(struct gui_window *g);
-int nsgtk_gui_window_update_targets(struct gui_window *g);
-void nsgtk_window_destroy_browser(struct gui_window *g);
-unsigned long nsgtk_window_get_signalhandler(struct gui_window *g, int i);
-GtkLayout *nsgtk_window_get_layout(struct gui_window *g);
-struct gui_window *nsgtk_window_iterate(struct gui_window *g);
-GtkWidget *nsgtk_window_get_tab(struct gui_window *g);
-void nsgtk_window_set_tab(struct gui_window *g, GtkWidget *w);
+
+/**
+ * get core browsing context from gui window handle
+ *
+ * \param gw gui window handle
+ */
+struct browser_window *nsgtk_get_browser_window(struct gui_window *gw);
+
+/**
+ * get containing nsgtk scaffolding handle from gui window handle
+ *
+ * \param gw gui window handle
+ */
+struct nsgtk_scaffolding *nsgtk_get_scaffold(struct gui_window *gw);
+
+/**
+ * Every window will have its tab, toolbar and drawing area updated
+ *
+ * The update will ensure the correct tab options are used, the
+ * toolbar size and style is changed and the browser window contents
+ * redrawn.
+ */
+nserror nsgtk_window_update_all(void);
+
+/**
+ * every window will have its toolbar updated to reflect user settings
+ */
+nserror nsgtk_window_toolbar_update(void);
+
+/**
+ * Windows associated with a scaffold will have their toolbar show state set
+ */
+nserror nsgtk_window_toolbar_show(struct nsgtk_scaffolding *gs, bool show);
+
+/**
+ * update targets
+ *
+ * \param gw gui window handle
+ */
+int nsgtk_gui_window_update_targets(struct gui_window *gw);
+
+/**
+ * destroy browsing context
+ *
+ * \param gw gui window handle
+ */
+void nsgtk_window_destroy_browser(struct gui_window *gw);
+
+
+/**
+ * toggle search visibility
+ *
+ * \param gw gui window handle
+ */
+nserror nsgtk_window_search_toggle(struct gui_window *gw);
+
+/**
+ * get gtk layout from gui handle
+ *
+ * \param gw gui window handle
+ */
+GtkLayout *nsgtk_window_get_layout(struct gui_window *gw);
+
+
+/**
+ * activate the handler for a item in a toolbar of a gui window
+ *
+ * \param gw The gui window handle
+ * \param itemid The id of the item to activate
+ */
+nserror nsgtk_window_item_activate(struct gui_window *gw, nsgtk_toolbar_button itemid);
+
+/**
+ * position page_info appropriately
+ *
+ * \param gw The gui window handle to position relative to
+ * \param win The page-info window to position
+ */
+nserror nsgtk_window_position_page_info(struct gui_window *gw,
+ struct nsgtk_pi_window *win);
+
+/**
+ * position local_history appropriately
+ *
+ * \param gw The gui window handle to position relative to
+ */
+nserror nsgtk_window_position_local_history(struct gui_window *gw);
#endif /* NETSURF_GTK_WINDOW_H */
diff --git a/frontends/monkey/401login.c b/frontends/monkey/401login.c
index 090f18984..1629425f6 100644
--- a/frontends/monkey/401login.c
+++ b/frontends/monkey/401login.c
@@ -16,40 +16,208 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "utils/ring.h"
-
#include <stdlib.h>
#include <stdio.h>
+#include <stdint.h>
+#include <string.h>
+#include "utils/ring.h"
+#include "utils/nsurl.h"
+
+#include "monkey/output.h"
#include "monkey/401login.h"
-typedef struct monkey401 {
+struct monkey401 {
struct monkey401 *r_next, *r_prev;
uint32_t num;
- lwc_string *host; /* Ignore */
- nserror (*cb)(bool,void*);
- void *pw;
-} monkey401_t;
+ nserror (*cb)(struct nsurl*, const char *, const char *, const char *, void *);
+ void *cbpw;
+ char *username;
+ char *password;
+ char *realm;
+ struct nsurl *url;
+};
+
+static struct monkey401 *m401_ring = NULL;
+static uint32_t m401_ctr = 0;
+
+
+nserror
+gui_401login_open(struct nsurl *url,
+ const char *realm,
+ const char *username,
+ const char *password,
+ nserror (*cb)(struct nsurl *url,
+ const char *realm,
+ const char *username,
+ const char *password,
+ void *pw),
+ void *cbpw)
+{
+ struct monkey401 *m401_ctx;
+
+ m401_ctx = calloc(sizeof(*m401_ctx), 1);
+ if (m401_ctx == NULL) {
+ return NSERROR_NOMEM;
+ }
+ m401_ctx->realm = strdup(realm);
+ if (m401_ctx->realm == NULL) {
+ free(m401_ctx);
+ return NSERROR_NOMEM;
+ }
+ m401_ctx->url = nsurl_ref(url);
+ m401_ctx->cb = cb;
+ m401_ctx->cbpw = cbpw;
+ m401_ctx->num = m401_ctr++;
+
+ RING_INSERT(m401_ring, m401_ctx);
+
+ if (username == NULL) {
+ username = "";
+ }
+
+ if (password == NULL) {
+ password = "";
+ }
+
+ moutf(MOUT_LOGIN, "OPEN LWIN %u URL %s", m401_ctx->num, nsurl_access(url));
+ moutf(MOUT_LOGIN, "USER LWIN %u STR %s", m401_ctx->num, username);
+ moutf(MOUT_LOGIN, "PASS LWIN %u STR %s", m401_ctx->num, password);
+ moutf(MOUT_LOGIN, "REALM LWIN %u STR %s", m401_ctx->num, realm);
+
+ return NSERROR_OK;
+}
+
+static struct monkey401 *
+monkey_find_login_by_num(uint32_t login_num)
+{
+ struct monkey401 *ret = NULL;
+
+ RING_ITERATE_START(struct monkey401, m401_ring, c_ring) {
+ if (c_ring->num == login_num) {
+ ret = c_ring;
+ RING_ITERATE_STOP(m401_ring, c_ring);
+ }
+ } RING_ITERATE_END(m401_ring, c_ring);
+
+ return ret;
+}
+
+static void free_login_context(struct monkey401 *m401_ctx) {
+ moutf(MOUT_LOGIN, "DESTROY LWIN %u", m401_ctx->num);
+ RING_REMOVE(m401_ring, m401_ctx);
+ if (m401_ctx->username != NULL) {
+ free(m401_ctx->username);
+ }
+ if (m401_ctx->password != NULL) {
+ free(m401_ctx->password);
+ }
+ free(m401_ctx->realm);
+ nsurl_unref(m401_ctx->url);
+ free(m401_ctx);
+}
+
+static void
+monkey_login_handle_go(int argc, char **argv)
+{
+ struct monkey401 *m401_ctx;
+
+ if (argc != 3) {
+ moutf(MOUT_ERROR, "LOGIN GO ARGS BAD");
+ return;
+ }
+
+ m401_ctx = monkey_find_login_by_num(atoi(argv[2]));
+ if (m401_ctx == NULL) {
+ moutf(MOUT_ERROR, "LOGIN NUM BAD");
+ return;
+ }
-static monkey401_t *m4_ring = NULL;
-static uint32_t m4_ctr = 0;
+ m401_ctx->cb(m401_ctx->url, m401_ctx->realm, m401_ctx->username, m401_ctx->password, m401_ctx->cbpw);
+
+ free_login_context(m401_ctx);
+}
-void gui_401login_open(nsurl *url, const char *realm,
- nserror (*cb)(bool proceed, void *pw), void *cbpw)
+static void
+monkey_login_handle_destroy(int argc, char **argv)
{
- monkey401_t *m4t = calloc(sizeof(*m4t), 1);
- if (m4t == NULL) {
- cb(false, cbpw);
+ struct monkey401 *m401_ctx;
+
+ if (argc != 3) {
+ moutf(MOUT_ERROR, "LOGIN DESTROY ARGS BAD");
return;
}
- m4t->cb = cb;
- m4t->pw = cbpw;
- m4t->num = m4_ctr++;
-
- RING_INSERT(m4_ring, m4t);
-
- fprintf(stdout, "401LOGIN OPEN M4 %u URL %s REALM %s\n",
- m4t->num, nsurl_access(url), realm);
+
+ m401_ctx = monkey_find_login_by_num(atoi(argv[2]));
+ if (m401_ctx == NULL) {
+ moutf(MOUT_ERROR, "LOGIN NUM BAD");
+ return;
+ }
+
+ free_login_context(m401_ctx);
}
+static void
+monkey_login_handle_username(int argc, char **argv)
+{
+ struct monkey401 *m401_ctx;
+
+ if (argc != 4) {
+ moutf(MOUT_ERROR, "LOGIN USERNAME ARGS BAD");
+ return;
+ }
+
+ m401_ctx = monkey_find_login_by_num(atoi(argv[2]));
+ if (m401_ctx == NULL) {
+ moutf(MOUT_ERROR, "LOGIN NUM BAD");
+ return;
+ }
+
+ if (m401_ctx->username != NULL) {
+ free(m401_ctx->username);
+ }
+
+ m401_ctx->username = strdup(argv[3]);
+}
+static void
+monkey_login_handle_password(int argc, char **argv)
+{
+ struct monkey401 *m401_ctx;
+
+ if (argc != 4) {
+ moutf(MOUT_ERROR, "LOGIN PASSWORD ARGS BAD");
+ return;
+ }
+
+ m401_ctx = monkey_find_login_by_num(atoi(argv[2]));
+ if (m401_ctx == NULL) {
+ moutf(MOUT_ERROR, "LOGIN NUM BAD");
+ return;
+ }
+
+ if (m401_ctx->password != NULL) {
+ free(m401_ctx->password);
+ }
+
+ m401_ctx->password = strdup(argv[3]);
+}
+
+void
+monkey_login_handle_command(int argc, char **argv)
+{
+ if (argc == 1)
+ return;
+
+ if (strcmp(argv[1], "USERNAME") == 0) {
+ monkey_login_handle_username(argc, argv);
+ } else if (strcmp(argv[1], "PASSWORD") == 0) {
+ monkey_login_handle_password(argc, argv);
+ } else if (strcmp(argv[1], "DESTROY") == 0) {
+ monkey_login_handle_destroy(argc, argv);
+ } else if (strcmp(argv[1], "GO") == 0) {
+ monkey_login_handle_go(argc, argv);
+ } else {
+ moutf(MOUT_ERROR, "LOGIN COMMAND UNKNOWN %s\n", argv[1]);
+ }
+}
diff --git a/frontends/monkey/401login.h b/frontends/monkey/401login.h
index e78355ea2..45a2a1b52 100644
--- a/frontends/monkey/401login.h
+++ b/frontends/monkey/401login.h
@@ -1,9 +1,39 @@
+/*
+ * Copyright 2018 Vincent Sanders <vince@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/>.
+ */
-#include <stdbool.h>
+#ifndef NS_MONKEY_401LOGIN_H
+#define NS_MONKEY_401LOGIN_H
-#include "utils/nsurl.h"
#include "utils/errors.h"
+struct nsurl;
-void gui_401login_open(nsurl *url, const char *realm,
- nserror (*cb)(bool proceed, void *pw), void *cbpw);
+nserror gui_401login_open(struct nsurl *url,
+ const char *realm,
+ const char *username,
+ const char *password,
+ nserror (*cb)(struct nsurl *url,
+ const char *realm,
+ const char *username,
+ const char *password,
+ void *pw),
+ void *cbpw);
+
+void monkey_login_handle_command(int argc, char **argv);
+
+#endif
diff --git a/frontends/monkey/Makefile b/frontends/monkey/Makefile
index 86f1d912e..d2dae3e16 100644
--- a/frontends/monkey/Makefile
+++ b/frontends/monkey/Makefile
@@ -9,20 +9,38 @@
CWARNFLAGS += -Werror
-CFLAGS += -std=c99 -Dmonkey -Dnsmonkey -g \
- -D_BSD_SOURCE \
- -D_DEFAULT_SOURCE \
- -D_XOPEN_SOURCE=700 \
- -D_POSIX_C_SOURCE=200809L \
- -D_NETBSD_SOURCE \
+CFLAGS += -std=c99 \
+ -Dmonkey -Dnsmonkey -g \
-DMONKEY_RESPATH=\"$(NETSURF_MONKEY_RESOURCES)\"
LDFLAGS += -lm
# ---------------------------------------------------------------------------
-# Windows flag setup
+# Target setup
# ---------------------------------------------------------------------------
+# Path to monkey resources
+MONKEY_RESOURCES_DIR := $(FRONTEND_RESOURCES_DIR)
+
+# The filter and target for split messages
+MESSAGES_FILTER=monkey
+MESSAGES_TARGET=$(MONKEY_RESOURCES_DIR)
+
+# ---------------------------------------------------------------------------
+# HOST specific feature flags
+# ---------------------------------------------------------------------------
+
+# enable POSIX and XSI features.
+# everywhere but freebsd where the default set already has them enabled
+ifneq ($(HOST),FreeBSD)
+ CFLAGS += -D_POSIX_C_SOURCE=200809L \
+ -D_XOPEN_SOURCE=700 \
+ -D_BSD_SOURCE \
+ -D_DEFAULT_SOURCE \
+ -D_NETBSD_SOURCE
+endif
+
+# Windows flag setup
ifeq ($(HOST),Windows_NT)
CFLAGS += -U__STRICT_ANSI__
endif
@@ -32,8 +50,8 @@ endif
# ----------------------------------------------------------------------------
# S_MONKEY are sources purely for the MONKEY build
-S_FRONTEND := main.c filetype.c schedule.c bitmap.c plot.c browser.c \
- download.c 401login.c cert.c layout.c dispatch.c fetch.c
+S_FRONTEND := main.c output.c filetype.c schedule.c bitmap.c plot.c browser.c \
+ download.c 401login.c layout.c dispatch.c fetch.c
# This is the final source build list
diff --git a/frontends/monkey/Makefile.defaults b/frontends/monkey/Makefile.defaults
index d6a90a3dc..87b6f3ac4 100644
--- a/frontends/monkey/Makefile.defaults
+++ b/frontends/monkey/Makefile.defaults
@@ -9,5 +9,6 @@ NETSURF_USE_RSVG := NO
NETSURF_USE_NSSVG := NO
NETSURF_USE_ROSPRITE := NO
NETSURF_USE_HARU_PDF := NO
+NETSURF_FS_BACKING_STORE := YES
CFLAGS += -O2
diff --git a/frontends/monkey/Makefile.tools b/frontends/monkey/Makefile.tools
new file mode 100644
index 000000000..7546506ff
--- /dev/null
+++ b/frontends/monkey/Makefile.tools
@@ -0,0 +1,15 @@
+# -*- mode: makefile-gmake -*-
+##
+## monkey target tool setup
+##
+
+ifeq ($(origin GCCSDK_INSTALL_ENV),undefined)
+ PKG_CONFIG := pkg-config
+else
+ PKG_CONFIG := PKG_CONFIG_LIBDIR="$(GCCSDK_INSTALL_ENV)/lib/pkgconfig" pkg-config
+endif
+
+ifneq ($(origin GCCSDK_INSTALL_CROSSBIN),undefined)
+ CC := $(wildcard $(GCCSDK_INSTALL_CROSSBIN)/*gcc)
+ CXX := $(wildcard $(GCCSDK_INSTALL_CROSSBIN)/*g++)
+endif
diff --git a/frontends/monkey/bitmap.c b/frontends/monkey/bitmap.c
index 83b8566b6..900dbca72 100644
--- a/frontends/monkey/bitmap.c
+++ b/frontends/monkey/bitmap.c
@@ -23,6 +23,7 @@
#include "utils/errors.h"
#include "netsurf/bitmap.h"
+#include "monkey/output.h"
#include "monkey/bitmap.h"
struct bitmap {
@@ -30,26 +31,26 @@ struct bitmap {
size_t rowstride;
int width;
int height;
- unsigned int state;
+ bool opaque;
};
-static void *bitmap_create(int width, int height, unsigned int state)
+static void *bitmap_create(int width, int height, enum gui_bitmap_flags flags)
{
struct bitmap *ret = calloc(sizeof(*ret), 1);
if (ret == NULL)
return NULL;
-
+
ret->width = width;
ret->height = height;
- ret->state = state;
-
+ ret->opaque = (flags & BITMAP_OPAQUE) == BITMAP_OPAQUE;
+
ret->ptr = calloc(width, height * 4);
-
+
if (ret->ptr == NULL) {
free(ret);
return NULL;
}
-
+
return ret;
}
@@ -63,23 +64,15 @@ static void bitmap_destroy(void *bitmap)
static void bitmap_set_opaque(void *bitmap, bool opaque)
{
struct bitmap *bmap = bitmap;
-
- if (opaque)
- bmap->state |= (BITMAP_OPAQUE);
- else
- bmap->state &= ~(BITMAP_OPAQUE);
-}
-static bool bitmap_test_opaque(void *bitmap)
-{
- return false;
+ bmap->opaque = opaque;
}
static bool bitmap_get_opaque(void *bitmap)
{
struct bitmap *bmap = bitmap;
-
- return (bmap->state & BITMAP_OPAQUE) == BITMAP_OPAQUE;
+
+ return bmap->opaque;
}
static unsigned char *bitmap_get_buffer(void *bitmap)
@@ -95,21 +88,9 @@ static size_t bitmap_get_rowstride(void *bitmap)
return bmap->width * 4;
}
-static size_t bitmap_get_bpp(void *bitmap)
-{
- /* OMG?! */
- return 4;
-}
-
-static bool bitmap_save(void *bitmap, const char *path, unsigned flags)
-{
- return true;
-}
-
static void bitmap_modified(void *bitmap)
{
- struct bitmap *bmap = bitmap;
- bmap->state |= BITMAP_MODIFIED;
+ return;
}
static int bitmap_get_width(void *bitmap)
@@ -127,7 +108,7 @@ static int bitmap_get_height(void *bitmap)
static nserror bitmap_render(struct bitmap *bitmap,
struct hlcache_handle *content)
{
- fprintf(stdout, "GENERIC BITMAP RENDER\n");
+ moutf(MOUT_GENERIC, "BITMAP RENDER");
return NSERROR_OK;
}
@@ -136,13 +117,10 @@ static struct gui_bitmap_table bitmap_table = {
.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,
};
diff --git a/frontends/monkey/browser.c b/frontends/monkey/browser.c
index 1fbbbf0b1..49cc63c3b 100644
--- a/frontends/monkey/browser.c
+++ b/frontends/monkey/browser.c
@@ -32,6 +32,7 @@
#include "netsurf/browser_window.h"
#include "netsurf/plotters.h"
+#include "monkey/output.h"
#include "monkey/browser.h"
#include "monkey/plot.h"
@@ -42,7 +43,7 @@ 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);
+ moutf(MOUT_WARNING, "%s %s", warning, detail);
return NSERROR_OK;
}
@@ -50,14 +51,14 @@ struct gui_window *
monkey_find_window_by_num(uint32_t win_num)
{
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);
-
+
return ret;
}
@@ -77,28 +78,31 @@ gui_window_create(struct browser_window *bw,
struct gui_window *ret = calloc(sizeof(*ret), 1);
if (ret == NULL)
return NULL;
-
+
ret->win_num = win_ctr++;
ret->bw = bw;
-
+
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);
-
+
+ moutf(MOUT_WINDOW,
+ "NEW WIN %u FOR %p EXISTING %p NEWTAB %s CLONE %s",
+ ret->win_num, bw, existing,
+ flags & GW_CREATE_TAB ? "TRUE" : "FALSE",
+ flags & GW_CREATE_CLONE ? "TRUE" : "FALSE");
+ moutf(MOUT_WINDOW,
+ "SIZE WIN %u WIDTH %d HEIGHT %d",
+ ret->win_num, ret->width, ret->height);
+
RING_INSERT(gw_ring, ret);
-
+
return ret;
}
static void
gui_window_destroy(struct gui_window *g)
{
- fprintf(stdout, "WINDOW DESTROY WIN %u\n", g->win_num);
+ moutf(MOUT_WINDOW, "DESTROY WIN %u", g->win_num);
RING_REMOVE(gw_ring, g);
free(g);
}
@@ -106,7 +110,7 @@ gui_window_destroy(struct gui_window *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);
+ moutf(MOUT_WINDOW, "TITLE WIN %u STR %s", g->win_num, title);
}
/**
@@ -115,43 +119,43 @@ gui_window_set_title(struct gui_window *g, const char *title)
* \param g The gui window to measure content area of.
* \param width receives width of window
* \param height receives height of window
- * \param scaled whether to return scaled values
* \return NSERROR_OK on sucess and width and height updated.
*/
static nserror
-gui_window_get_dimensions(struct gui_window *g, int *width, int *height,
- bool scaled)
+gui_window_get_dimensions(struct gui_window *g, int *width, int *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;
+ moutf(MOUT_WINDOW,
+ "GET_DIMENSIONS WIN %u WIDTH %d HEIGHT %d",
+ g->win_num, *width, *height);
+
return NSERROR_OK;
}
static void
gui_window_new_content(struct gui_window *g)
{
- fprintf(stdout, "WINDOW NEW_CONTENT WIN %u\n", g->win_num);
+ moutf(MOUT_WINDOW, "NEW_CONTENT WIN %u", 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);
+ moutf(MOUT_WINDOW, "NEW_ICON WIN %u", g->win_num);
}
static void
gui_window_start_throbber(struct gui_window *g)
{
- fprintf(stdout, "WINDOW START_THROBBER WIN %u\n", g->win_num);
+ moutf(MOUT_WINDOW, "START_THROBBER WIN %u", g->win_num);
}
static void
gui_window_stop_throbber(struct gui_window *g)
{
- fprintf(stdout, "WINDOW STOP_THROBBER WIN %u\n", g->win_num);
+ moutf(MOUT_WINDOW, "STOP_THROBBER WIN %u", g->win_num);
}
@@ -171,7 +175,7 @@ gui_window_set_scroll(struct gui_window *gw, const struct rect *rect)
gw->scrollx = rect->x0;
gw->scrolly = rect->y0;
- fprintf(stdout, "WINDOW SET_SCROLL WIN %u X %d Y %d\n",
+ moutf(MOUT_WINDOW, "SET_SCROLL WIN %u X %d Y %d",
gw->win_num, rect->x0, rect->y0);
return NSERROR_OK;
}
@@ -187,15 +191,14 @@ gui_window_set_scroll(struct gui_window *gw, const struct rect *rect)
static nserror
monkey_window_invalidate_area(struct gui_window *gw, const struct rect *rect)
{
- fprintf(stdout, "WINDOW INVALIDATE_AREA WIN %u", gw->win_num);
-
if (rect != NULL) {
- fprintf(stdout,
- " X %d Y %d WIDTH %d HEIGHT %d\n",
- rect->x0, rect->y0,
- (rect->x1 - rect->x0), (rect->y1 - rect->y0));
+ moutf(MOUT_WINDOW,
+ "INVALIDATE_AREA WIN %u X %d Y %d WIDTH %d HEIGHT %d",
+ gw->win_num,
+ rect->x0, rect->y0,
+ (rect->x1 - rect->x0), (rect->y1 - rect->y0));
} else {
- fprintf(stdout," ALL\n");
+ moutf(MOUT_WINDOW, "INVALIDATE_AREA WIN %u ALL", gw->win_num);
}
return NSERROR_OK;
@@ -209,21 +212,21 @@ gui_window_update_extent(struct gui_window *g)
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);
+ moutf(MOUT_WINDOW, "UPDATE_EXTENT WIN %u WIDTH %d HEIGHT %d",
+ 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);
+ moutf(MOUT_WINDOW, "SET_STATUS WIN %u STR %s", g->win_num, text);
}
static void
gui_window_set_pointer(struct gui_window *g, gui_pointer_shape shape)
{
const char *ptr_name = "UNKNOWN";
-
+
switch (shape) {
case GUI_POINTER_POINT:
ptr_name = "POINT";
@@ -285,21 +288,24 @@ gui_window_set_pointer(struct gui_window *g, gui_pointer_shape shape)
default:
break;
}
- fprintf(stdout, "WINDOW SET_POINTER WIN %u POINTER %s\n", g->win_num, ptr_name);
+
+ moutf(MOUT_WINDOW, "SET_POINTER WIN %u POINTER %s",
+ 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));
+ moutf(MOUT_WINDOW, "SET_URL WIN %u URL %s",
+ 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);
+ moutf(MOUT_WINDOW, "GET_SCROLL WIN %u X %d Y %d",
+ g->win_num, g->scrollx, g->scrolly);
*sx = g->scrollx;
*sy = g->scrolly;
return true;
@@ -308,7 +314,7 @@ gui_window_get_scroll(struct gui_window *g, int *sx, int *sy)
static bool
gui_window_scroll_start(struct gui_window *g)
{
- fprintf(stdout, "WINDOW SCROLL_START WIN %u\n", g->win_num);
+ moutf(MOUT_WINDOW, "SCROLL_START WIN %u", g->win_num);
g->scrollx = g->scrolly = 0;
return true;
}
@@ -318,33 +324,127 @@ static void
gui_window_place_caret(struct gui_window *g, int x, int y, int height,
const struct rect *clip)
{
- fprintf(stdout, "WINDOW PLACE_CARET WIN %u X %d Y %d HEIGHT %d\n",
- g->win_num, x, y, height);
+ moutf(MOUT_WINDOW, "PLACE_CARET WIN %u X %d Y %d HEIGHT %d",
+ 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);
+ moutf(MOUT_WINDOW, "REMOVE_CARET WIN %u", g->win_num);
}
static bool
gui_window_drag_start(struct gui_window *g, gui_drag_type type,
- const struct rect *rect)
+ const struct rect *rect)
{
- fprintf(stdout, "WINDOW SCROLL_START WIN %u TYPE %i\n", g->win_num, type);
+ moutf(MOUT_WINDOW, "SCROLL_START WIN %u TYPE %i", 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",
+ moutf(MOUT_WINDOW, "SAVE_LINK WIN %u URL %s TITLE %s",
g->win_num, nsurl_access(url), title);
return NSERROR_OK;
}
+static void
+gui_window_console_log(struct gui_window *g,
+ browser_window_console_source src,
+ const char *msg,
+ size_t msglen,
+ browser_window_console_flags flags)
+{
+ bool foldable = !!(flags & BW_CS_FLAG_FOLDABLE);
+ const char *src_text;
+ const char *level_text;
+
+ switch (src) {
+ case BW_CS_INPUT:
+ src_text = "client-input";
+ break;
+ case BW_CS_SCRIPT_ERROR:
+ src_text = "scripting-error";
+ break;
+ case BW_CS_SCRIPT_CONSOLE:
+ src_text = "scripting-console";
+ break;
+ default:
+ assert(0 && "Unknown scripting source");
+ src_text = "unknown";
+ break;
+ }
+
+ switch (flags & BW_CS_FLAG_LEVEL_MASK) {
+ case BW_CS_FLAG_LEVEL_DEBUG:
+ level_text = "DEBUG";
+ break;
+ case BW_CS_FLAG_LEVEL_LOG:
+ level_text = "LOG";
+ break;
+ case BW_CS_FLAG_LEVEL_INFO:
+ level_text = "INFO";
+ break;
+ case BW_CS_FLAG_LEVEL_WARN:
+ level_text = "WARN";
+ break;
+ case BW_CS_FLAG_LEVEL_ERROR:
+ level_text = "ERROR";
+ break;
+ default:
+ assert(0 && "Unknown console logging level");
+ level_text = "unknown";
+ break;
+ }
+
+ moutf(MOUT_WINDOW, "CONSOLE_LOG WIN %u SOURCE %s %sFOLDABLE %s %.*s",
+ g->win_num, src_text, foldable ? "" : "NOT-", level_text,
+ (int)msglen, msg);
+}
+
+static void
+gui_window_report_page_info(struct gui_window *g)
+{
+ const char *state = "***WAH***";
+
+ switch (browser_window_get_page_info_state(g->bw)) {
+ case PAGE_STATE_UNKNOWN:
+ state = "UNKNOWN";
+ break;
+
+ case PAGE_STATE_INTERNAL:
+ state = "INTERNAL";
+ break;
+
+ case PAGE_STATE_LOCAL:
+ state = "LOCAL";
+ break;
+
+ case PAGE_STATE_INSECURE:
+ state = "INSECURE";
+ break;
+
+ case PAGE_STATE_SECURE_OVERRIDE:
+ state = "SECURE_OVERRIDE";
+ break;
+ case PAGE_STATE_SECURE_ISSUES:
+ state = "SECURE_ISSUES";
+ break;
+
+ case PAGE_STATE_SECURE:
+ state = "SECURE";
+ break;
+
+ default:
+ assert(0 && "Monkey needs some lovin' here");
+ break;
+ }
+ moutf(MOUT_WINDOW, "PAGE_STATUS WIN %u STATUS %s",
+ g->win_num, state);
+}
/**** Handlers ****/
@@ -380,11 +480,11 @@ monkey_window_handle_destroy(int argc, char **argv)
{
struct gui_window *gw;
uint32_t nr = atoi((argc > 2) ? argv[2] : "-1");
-
+
gw = monkey_find_window_by_num(nr);
-
+
if (gw == NULL) {
- fprintf(stdout, "ERROR WINDOW NUM BAD\n");
+ moutf(MOUT_ERROR, "WINDOW NUM BAD");
} else {
browser_window_destroy(gw->bw);
}
@@ -397,16 +497,16 @@ monkey_window_handle_go(int argc, char **argv)
nsurl *url;
nsurl *ref_url = NULL;
nserror error;
-
+
if (argc < 4 || argc > 5) {
- fprintf(stdout, "ERROR WINDOW GO ARGS BAD\n");
+ moutf(MOUT_ERROR, "WINDOW GO ARGS BAD");
return;
}
-
+
gw = monkey_find_window_by_num(atoi(argv[2]));
-
+
if (gw == NULL) {
- fprintf(stdout, "ERROR WINDOW NUM BAD\n");
+ moutf(MOUT_ERROR, "WINDOW NUM BAD");
return;
}
@@ -436,6 +536,28 @@ monkey_window_handle_go(int argc, char **argv)
}
}
+/**
+ * handle WINDOW STOP command
+ */
+static void
+monkey_window_handle_stop(int argc, char **argv)
+{
+ struct gui_window *gw;
+ if (argc != 3) {
+ moutf(MOUT_ERROR, "WINDOW STOP ARGS BAD\n");
+ return;
+ }
+
+ gw = monkey_find_window_by_num(atoi(argv[2]));
+
+ if (gw == NULL) {
+ moutf(MOUT_ERROR, "WINDOW NUM BAD");
+ } else {
+ browser_window_stop(gw->bw);
+ }
+}
+
+
static void
monkey_window_handle_redraw(int argc, char **argv)
{
@@ -446,35 +568,35 @@ monkey_window_handle_redraw(int argc, char **argv)
.background_images = true,
.plot = monkey_plotters
};
-
+
if (argc != 3 && argc != 7) {
- fprintf(stdout, "ERROR WINDOW REDRAW ARGS BAD\n");
+ moutf(MOUT_ERROR, "WINDOW REDRAW ARGS BAD");
return;
}
gw = monkey_find_window_by_num(atoi(argv[2]));
-
+
if (gw == NULL) {
- fprintf(stdout, "ERROR WINDOW NUM BAD\n");
+ moutf(MOUT_ERROR, "WINDOW NUM BAD");
return;
}
-
+
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]);
}
-
+
NSLOG(netsurf, INFO, "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]));
+ moutf(MOUT_WINDOW, "REDRAW WIN %d START", atoi(argv[2]));
+ browser_window_redraw(gw->bw, gw->scrollx, gw->scrolly, &clip, &ctx);
+ moutf(MOUT_WINDOW, "REDRAW WIN %d STOP", atoi(argv[2]));
}
static void
@@ -482,39 +604,170 @@ 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");
+ moutf(MOUT_ERROR, "WINDOW RELOAD ARGS BAD\n");
+ return;
}
-
+
gw = monkey_find_window_by_num(atoi(argv[2]));
-
+
if (gw == NULL) {
- fprintf(stdout, "ERROR WINDOW NUM BAD\n");
+ moutf(MOUT_ERROR, "WINDOW NUM BAD");
} else {
browser_window_reload(gw->bw, argc == 4);
}
}
+static void
+monkey_window_handle_exec(int argc, char **argv)
+{
+ struct gui_window *gw;
+ if (argc < 5) {
+ moutf(MOUT_ERROR, "WINDOW EXEC ARGS BAD\n");
+ }
+
+ gw = monkey_find_window_by_num(atoi(argv[2]));
+
+ if (gw == NULL) {
+ moutf(MOUT_ERROR, "WINDOW NUM BAD");
+ } else {
+ /* Gather argv[4] onward into a string to pass to js_exec */
+ int total = 0;
+ for (int i = 4; i < argc; ++i) {
+ total += strlen(argv[i]) + 1;
+ }
+ char *cmd = calloc(total, 1);
+ if (cmd == NULL) {
+ moutf(MOUT_ERROR, "JS WIN %d RET ENOMEM", atoi(argv[2]));
+ return;
+ }
+ strcpy(cmd, argv[4]);
+ for (int i = 5; i < argc; ++i) {
+ strcat(cmd, " ");
+ strcat(cmd, argv[i]);
+ }
+ /* Now execute the JS */
+
+ moutf(MOUT_WINDOW, "JS WIN %d RET %s", atoi(argv[2]),
+ browser_window_exec(gw->bw, cmd, total - 1) ? "TRUE" : "FALSE");
+
+ free(cmd);
+ }
+}
+
+
+static void
+monkey_window_handle_click(int argc, char **argv)
+{
+ /* `WINDOW CLICK WIN` _%id%_ `X` _%num%_ `Y` _%num%_ `BUTTON` _%str%_ `KIND` _%str%_ */
+ /* 0 1 2 3 4 5 6 7 8 9 10 11 */
+ struct gui_window *gw;
+ if (argc != 12) {
+ moutf(MOUT_ERROR, "WINDOW CLICK ARGS BAD\n");
+ }
+
+ gw = monkey_find_window_by_num(atoi(argv[2]));
+
+ if (gw == NULL) {
+ moutf(MOUT_ERROR, "WINDOW NUM BAD");
+ } else {
+ int x = atoi(argv[5]);
+ int y = atoi(argv[7]);
+ browser_mouse_state mouse;
+ const char *button = argv[9];
+ const char *kind = argv[11];
+ if (strcmp(button, "LEFT") == 0) {
+ mouse = BROWSER_MOUSE_CLICK_1;
+ } else if (strcmp(button, "RIGHT") == 0) {
+ mouse = BROWSER_MOUSE_CLICK_2;
+ } else {
+ moutf(MOUT_ERROR, "WINDOW BUTTON BAD");
+ return;
+ }
+ if (strcmp(kind, "SINGLE") == 0) {
+ /* Nothing */
+ } else if (strcmp(kind, "DOUBLE") == 0) {
+ mouse |= BROWSER_MOUSE_DOUBLE_CLICK;
+ } else if (strcmp(kind, "TRIPLE") == 0) {
+ mouse |= BROWSER_MOUSE_TRIPLE_CLICK;
+ } else {
+ moutf(MOUT_ERROR, "WINDOW KIND BAD");
+ return;
+ }
+ browser_window_mouse_click(gw->bw, mouse, x, y);
+ }
+}
void
monkey_window_handle_command(int argc, char **argv)
{
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], "STOP") == 0) {
+ monkey_window_handle_stop(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 if (strcmp(argv[1], "EXEC") == 0) {
+ monkey_window_handle_exec(argc, argv);
+ } else if (strcmp(argv[1], "CLICK") == 0) {
+ monkey_window_handle_click(argc, argv);
} else {
- fprintf(stdout, "ERROR WINDOW COMMAND UNKNOWN %s\n", argv[1]);
+ moutf(MOUT_ERROR, "WINDOW COMMAND UNKNOWN %s\n", argv[1]);
}
-
+
+}
+
+/**
+ * process miscellaneous window events
+ *
+ * \param gw The window receiving the event.
+ * \param event The event code.
+ * \return NSERROR_OK when processed ok
+ */
+static nserror
+gui_window_event(struct gui_window *gw, enum gui_window_event event)
+{
+ switch (event) {
+ case GW_EVENT_UPDATE_EXTENT:
+ gui_window_update_extent(gw);
+ break;
+
+ case GW_EVENT_REMOVE_CARET:
+ gui_window_remove_caret(gw);
+ break;
+
+ case GW_EVENT_SCROLL_START:
+ gui_window_scroll_start(gw);
+ break;
+
+ case GW_EVENT_NEW_CONTENT:
+ gui_window_new_content(gw);
+ break;
+
+ case GW_EVENT_START_THROBBER:
+ gui_window_start_throbber(gw);
+ break;
+
+ case GW_EVENT_STOP_THROBBER:
+ gui_window_stop_throbber(gw);
+ break;
+
+ case GW_EVENT_PAGE_INFO_CHANGE:
+ gui_window_report_page_info(gw);
+ break;
+
+ default:
+ break;
+ }
+ return NSERROR_OK;
}
static struct gui_window_table window_table = {
@@ -524,7 +777,7 @@ static struct gui_window_table window_table = {
.get_scroll = gui_window_get_scroll,
.set_scroll = gui_window_set_scroll,
.get_dimensions = gui_window_get_dimensions,
- .update_extent = gui_window_update_extent,
+ .event = gui_window_event,
.set_title = gui_window_set_title,
.set_url = gui_window_set_url,
@@ -532,13 +785,10 @@ static struct gui_window_table window_table = {
.set_status = gui_window_set_status,
.set_pointer = gui_window_set_pointer,
.place_caret = gui_window_place_caret,
- .remove_caret = gui_window_remove_caret,
.drag_start = gui_window_drag_start,
.save_link = gui_window_save_link,
- .scroll_start = gui_window_scroll_start,
- .new_content = gui_window_new_content,
- .start_throbber = gui_window_start_throbber,
- .stop_throbber = gui_window_stop_throbber,
+
+ .console_log = gui_window_console_log,
};
struct gui_window_table *monkey_window_table = &window_table;
diff --git a/frontends/monkey/cert.c b/frontends/monkey/cert.c
deleted file mode 100644
index a19975527..000000000
--- a/frontends/monkey/cert.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright 2011 Daniel Silverstone <dsilvers@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/>.
- */
-
-#include <stdlib.h>
-#include <stdio.h>
-
-#include "utils/ring.h"
-#include "utils/nsurl.h"
-
-#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;
-} monkey_cert_t;
-
-static monkey_cert_t *cert_ring = NULL;
-static uint32_t cert_ctr = 0;
-
-nserror
-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++;
-
- RING_INSERT(cert_ring, m4t);
-
- fprintf(stdout, "SSLCERT VERIFY CERT %u URL %s\n",
- m4t->num, nsurl_access(url));
-
- return NSERROR_OK;
-}
-
-
diff --git a/frontends/monkey/dispatch.c b/frontends/monkey/dispatch.c
index e60325cf1..08bd352d5 100644
--- a/frontends/monkey/dispatch.c
+++ b/frontends/monkey/dispatch.c
@@ -29,7 +29,7 @@
typedef struct cmdhandler {
struct cmdhandler *r_next, *r_prev;
- const char *cmd;
+ char *cmd;
handle_command_fn fn;
} monkey_cmdhandler_t;
@@ -50,6 +50,17 @@ monkey_register_handler(const char *cmd, handle_command_fn fn)
}
void
+monkey_free_handlers(void)
+{
+ while (handler_ring != NULL) {
+ monkey_cmdhandler_t *handler = handler_ring;
+ RING_REMOVE(handler_ring, handler);
+ free(handler->cmd);
+ free(handler);
+ }
+}
+
+void
monkey_process_command(void)
{
char buffer[PATH_MAX];
diff --git a/frontends/monkey/dispatch.h b/frontends/monkey/dispatch.h
index dc6e50a0b..11b1c0239 100644
--- a/frontends/monkey/dispatch.h
+++ b/frontends/monkey/dispatch.h
@@ -25,4 +25,6 @@ nserror monkey_register_handler(const char *cmd, handle_command_fn fn);
void monkey_process_command(void);
+void monkey_free_handlers(void);
+
#endif /* NETSURF_MONKEY_DISPATCH_H */
diff --git a/frontends/monkey/download.c b/frontends/monkey/download.c
index 5c9ce1b53..b9ca1746f 100644
--- a/frontends/monkey/download.c
+++ b/frontends/monkey/download.c
@@ -25,6 +25,7 @@
#include "netsurf/download.h"
#include "desktop/download.h"
+#include "monkey/output.h"
#include "monkey/browser.h"
static uint32_t dwin_ctr = 0;
@@ -33,6 +34,7 @@ struct gui_download_window {
struct gui_download_window *r_next;
struct gui_download_window *r_prev;
struct gui_window *g;
+ download_context *dlctx;
uint32_t dwin_num;
char *host; /* ignore */
};
@@ -48,11 +50,12 @@ gui_download_window_create(download_context *ctx,
return NULL;
ret->g = parent;
ret->dwin_num = dwin_ctr++;
+ ret->dlctx = ctx;
RING_INSERT(dw_ring, ret);
- fprintf(stdout, "DOWNLOAD_WINDOW CREATE DWIN %u WIN %u\n",
- ret->dwin_num, parent->win_num);
+ moutf(MOUT_DOWNLOAD, "CREATE DWIN %u WIN %u",
+ ret->dwin_num, parent->win_num);
return ret;
}
@@ -61,7 +64,7 @@ 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",
+ moutf(MOUT_DOWNLOAD, "DATA DWIN %u SIZE %u DATA %s",
dw->dwin_num, size, data);
return NSERROR_OK;
}
@@ -70,16 +73,15 @@ 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);
+ moutf(MOUT_DOWNLOAD, "ERROR DWIN %u ERROR %s", 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);
+ moutf(MOUT_DOWNLOAD, "DONE DWIN %u", dw->dwin_num);
RING_REMOVE(dw_ring, dw);
+ download_context_destroy(dw->dlctx);
free(dw);
}
diff --git a/frontends/monkey/farmer.py b/frontends/monkey/farmer.py
deleted file mode 100644
index d4b4b1e21..000000000
--- a/frontends/monkey/farmer.py
+++ /dev/null
@@ -1,363 +0,0 @@
-#!/usr/bin/python
-
-# Copyright 2017 Daniel Silverstone <dsilvers@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.h b/frontends/monkey/fetch.h
index f146e2ef8..2881e92c5 100644
--- a/frontends/monkey/fetch.h
+++ b/frontends/monkey/fetch.h
@@ -19,6 +19,6 @@
#ifndef NS_MONKEY_FETCH_H
#define NS_MONKEY_FETCH_H
-struct gui_fetch_table *monkey_fetch_table;
+extern struct gui_fetch_table *monkey_fetch_table;
#endif /* NS_MONKEY_FETCH_H */
diff --git a/frontends/monkey/filetype.c b/frontends/monkey/filetype.c
index 979796baf..37853a63d 100644
--- a/frontends/monkey/filetype.c
+++ b/frontends/monkey/filetype.c
@@ -32,6 +32,7 @@
#include <stdio.h>
#include <stdbool.h>
+#include <stdint.h>
#include <string.h>
#include <strings.h>
#include <stdlib.h>
@@ -68,8 +69,10 @@ void monkey_fetch_filetype_init(const char *mimefile)
hash_add(mime_hash, "html", "text/html");
hash_add(mime_hash, "jpg", "image/jpeg");
hash_add(mime_hash, "jpeg", "image/jpeg");
+ hash_add(mime_hash, "bmp", "image/bmp");
hash_add(mime_hash, "gif", "image/gif");
hash_add(mime_hash, "png", "image/png");
+ hash_add(mime_hash, "ico", "image/ico");
hash_add(mime_hash, "jng", "image/jng");
hash_add(mime_hash, "mng", "image/mng");
hash_add(mime_hash, "webp", "image/webp");
@@ -107,9 +110,9 @@ void monkey_fetch_filetype_init(const char *mimefile)
type = ptr;
- /* search for the first non-whitespace char or NUL or
+ /* search for the first whitespace char or NUL or
* NL */
- while (*ptr && (!ascii_is_space(*ptr)) && *ptr != '\n')
+ while (*ptr && (!ascii_is_space(*ptr)))
ptr++;
if (*ptr == '\0' || *ptr == '\n') {
@@ -132,8 +135,7 @@ void monkey_fetch_filetype_init(const char *mimefile)
/* search for the first whitespace char or
* NUL or NL which is the end of the ext.
*/
- while (*ptr && (!ascii_is_space(*ptr)) &&
- *ptr != '\n')
+ while (*ptr && (!ascii_is_space(*ptr)))
ptr++;
if (*ptr == '\0' || *ptr == '\n') {
diff --git a/frontends/monkey/layout.c b/frontends/monkey/layout.c
index 7b7223144..0d6a3b4dc 100644
--- a/frontends/monkey/layout.c
+++ b/frontends/monkey/layout.c
@@ -33,7 +33,7 @@ static nserror nsfont_width(const plot_font_style_t *fstyle,
const char *string, size_t length,
int *width)
{
- *width = (fstyle->size * utf8_bounded_length(string, length)) / FONT_SIZE_SCALE;
+ *width = (fstyle->size * utf8_bounded_length(string, length)) / PLOT_STYLE_SCALE;
return NSERROR_OK;
}
@@ -53,10 +53,10 @@ 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)
{
- *char_offset = x / (fstyle->size / FONT_SIZE_SCALE);
+ *char_offset = x / (fstyle->size / PLOT_STYLE_SCALE);
if (*char_offset > length)
*char_offset = length;
- *actual_x = *char_offset * (fstyle->size / FONT_SIZE_SCALE);
+ *actual_x = *char_offset * (fstyle->size / PLOT_STYLE_SCALE);
return NSERROR_OK;
}
@@ -88,7 +88,7 @@ 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)
{
- int c_off = *char_offset = x / (fstyle->size / FONT_SIZE_SCALE);
+ int c_off = *char_offset = x / (fstyle->size / PLOT_STYLE_SCALE);
if (*char_offset > length) {
*char_offset = length;
} else {
@@ -104,7 +104,7 @@ static nserror nsfont_split(const plot_font_style_t *fstyle,
}
}
}
- *actual_x = *char_offset * (fstyle->size / FONT_SIZE_SCALE);
+ *actual_x = *char_offset * (fstyle->size / PLOT_STYLE_SCALE);
return NSERROR_OK;
}
diff --git a/frontends/monkey/main.c b/frontends/monkey/main.c
index 53cde5a72..463f0bea6 100644
--- a/frontends/monkey/main.c
+++ b/frontends/monkey/main.c
@@ -23,6 +23,8 @@
#include <sys/types.h>
#include <unistd.h>
#include <string.h>
+#include <errno.h>
+#include <signal.h>
#include "utils/config.h"
#include "utils/sys_time.h"
@@ -36,10 +38,11 @@
#include "netsurf/url_db.h"
#include "netsurf/cookie_db.h"
#include "content/fetch.h"
+#include "content/backing_store.h"
+#include "monkey/output.h"
#include "monkey/dispatch.h"
#include "monkey/browser.h"
-#include "monkey/cert.h"
#include "monkey/401login.h"
#include "monkey/filetype.h"
#include "monkey/fetch.h"
@@ -66,11 +69,12 @@ static bool monkey_done = false;
*/
static void die(const char * const error)
{
- fprintf(stderr, "DIE %s\n", error);
+ moutf(MOUT_DIE, "%s", error);
exit(EXIT_FAILURE);
}
-/** obtain language from environment
+/**
+ * obtain language from environment
*
* start with GNU extension LANGUAGE environment variable and then try
* POSIX variables LC_ALL, LC_MESSAGES and LANG
@@ -104,7 +108,8 @@ static const char *get_language(void)
}
-/** provide a string vector of languages in preference order
+/**
+ * provide a string vector of languages in preference order
*
* environment variables are processed to aquire a colon separated
* list of languages which are converted into a string vector. The
@@ -171,7 +176,16 @@ static const char * const *get_languagev(void)
return &langv[0];
}
-/* Stolen from gtk/gui.c */
+/**
+ * Create an array of valid paths to search for resources.
+ *
+ * The idea is that all the complex path computation to find resources
+ * is performed here, once, rather than every time a resource is
+ * searched for.
+ *
+ * \param resource_path A shell style colon separated path list
+ * \return A string vector of valid paths where resources can be found
+ */
static char **
nsmonkey_init_resource(const char *resource_path)
{
@@ -199,7 +213,17 @@ static void monkey_quit(void)
static nserror gui_launch_url(struct nsurl *url)
{
- fprintf(stdout, "GENERIC LAUNCH URL %s\n", nsurl_access(url));
+ moutf(MOUT_GENERIC, "LAUNCH URL %s", nsurl_access(url));
+ return NSERROR_OK;
+}
+
+static nserror gui_present_cookies(const char *search_term)
+{
+ if (search_term != NULL) {
+ moutf(MOUT_GENERIC, "PRESENT_COOKIES %s", search_term);
+ } else {
+ moutf(MOUT_GENERIC, "PRESENT_COOKIES");
+ }
return NSERROR_OK;
}
@@ -243,12 +267,11 @@ static bool nslog_stream_configure(FILE *fptr)
static struct gui_misc_table monkey_misc_table = {
.schedule = monkey_schedule,
- .warning = monkey_warn_user,
.quit = monkey_quit,
.launch_url = gui_launch_url,
- .cert_verify = gui_cert_verify,
.login = gui_401login_open,
+ .present_cookies = gui_present_cookies,
};
static void monkey_run(void)
@@ -262,6 +285,9 @@ static void monkey_run(void)
while (!monkey_done) {
+ /* discover the next scheduled event time */
+ schedtm = monkey_schedule_run();
+
/* clears fdset */
fetch_fdset(&read_fd_set, &write_fd_set, &exc_fd_set, &max_fd);
@@ -272,14 +298,11 @@ static void monkey_run(void)
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:
NSLOG(netsurf, INFO, "Iterate blocking");
- fprintf(stdout, "GENERIC POLL BLOCKING\n");
+ moutf(MOUT_GENERIC, "POLL BLOCKING");
timeout = NULL;
break;
@@ -292,7 +315,7 @@ static void monkey_run(void)
default:
NSLOG(netsurf, INFO, "Iterate non-blocking");
- fprintf(stdout, "GENERIC POLL TIMED %d\n", schedtm);
+ moutf(MOUT_GENERIC, "POLL TIMED %d", schedtm);
tv.tv_sec = schedtm / 1000; /* miliseconds to seconds */
tv.tv_usec = (schedtm % 1000) * 1000; /* remainder to microseconds */
timeout = &tv;
@@ -305,6 +328,7 @@ static void monkey_run(void)
&exc_fd_set,
timeout);
if (rdy_fd < 0) {
+ NSLOG(netsurf, CRITICAL, "Unable to select: %s", strerror(errno));
monkey_done = true;
} else if (rdy_fd > 0) {
if (FD_ISSET(0, &read_fd_set)) {
@@ -314,6 +338,53 @@ static void monkey_run(void)
}
}
+#if (!defined(NDEBUG) && defined(HAVE_EXECINFO))
+#include <execinfo.h>
+static void *backtrace_buffer[4096];
+
+void
+__assert_fail(const char *__assertion, const char *__file,
+ unsigned int __line, const char *__function)
+{
+ int frames;
+ fprintf(stderr,
+ "MONKEY: Assertion failure!\n"
+ "%s:%d: %s: Assertion `%s` failed.\n",
+ __file, __line, __function, __assertion);
+
+ frames = backtrace(&backtrace_buffer[0], 4096);
+ if (frames > 0 && frames < 4096) {
+ fprintf(stderr, "Backtrace:\n");
+ fflush(stderr);
+ backtrace_symbols_fd(&backtrace_buffer[0], frames, 2);
+ }
+
+ abort();
+}
+
+static void
+signal_handler(int sig)
+{
+ int frames;
+ fprintf(stderr, "Caught signal %s (%d)\n",
+ ((sig == SIGSEGV) ? "SIGSEGV" :
+ ((sig == SIGILL) ? "SIGILL" :
+ ((sig == SIGFPE) ? "SIGFPE" :
+ ((sig == SIGBUS) ? "SIGBUS" :
+ "unknown signal")))),
+ sig);
+ frames = backtrace(&backtrace_buffer[0], 4096);
+ if (frames > 0 && frames < 4096) {
+ fprintf(stderr, "Backtrace:\n");
+ fflush(stderr);
+ backtrace_symbols_fd(&backtrace_buffer[0], frames, 2);
+ }
+
+ abort();
+}
+
+#endif
+
int
main(int argc, char **argv)
{
@@ -328,8 +399,18 @@ main(int argc, char **argv)
.fetch = monkey_fetch_table,
.bitmap = monkey_bitmap_table,
.layout = monkey_layout_table,
+ .llcache = filesystem_llcache_table,
};
+#if (!defined(NDEBUG) && defined(HAVE_EXECINFO))
+ /* Catch segfault, illegal instructions and fp exceptions */
+ signal(SIGSEGV, signal_handler);
+ signal(SIGILL, signal_handler);
+ signal(SIGFPE, signal_handler);
+ /* It's unlikely, but SIGBUS could happen on some platforms */
+ signal(SIGBUS, signal_handler);
+#endif
+
ret = netsurf_register(&monkey_table);
if (ret != NSERROR_OK) {
die("NetSurf operation table failed registration");
@@ -377,6 +458,12 @@ main(int argc, char **argv)
urldb_load(nsoption_charp(url_file));
urldb_load_cookies(nsoption_charp(cookie_file));
+ /* Free resource paths now we're done finding resources */
+ for (char **s = respaths; *s != NULL; s++) {
+ free(*s);
+ }
+ free(respaths);
+
ret = monkey_register_handler("QUIT", quit_handler);
if (ret != NSERROR_OK) {
die("quit handler failed to register");
@@ -392,14 +479,20 @@ main(int argc, char **argv)
die("options handler failed to register");
}
- fprintf(stdout, "GENERIC STARTED\n");
+ ret = monkey_register_handler("LOGIN", monkey_login_handle_command);
+ if (ret != NSERROR_OK) {
+ die("login handler failed to register");
+ }
+
+
+ moutf(MOUT_GENERIC, "STARTED");
monkey_run();
- fprintf(stdout, "GENERIC CLOSING_DOWN\n");
+ moutf(MOUT_GENERIC, "CLOSING_DOWN");
monkey_kill_browser_windows();
netsurf_exit();
- fprintf(stdout, "GENERIC FINISHED\n");
+ moutf(MOUT_GENERIC, "FINISHED");
/* finalise options */
nsoption_finalise(nsoptions, nsoptions_default);
@@ -407,5 +500,8 @@ main(int argc, char **argv)
/* finalise logging */
nslog_finalise();
+ /* And free any monkey-specific bits */
+ monkey_free_handlers();
+
return 0;
}
diff --git a/frontends/monkey/options.h b/frontends/monkey/options.h
index 57cce7e1f..8f6dd8b42 100644
--- a/frontends/monkey/options.h
+++ b/frontends/monkey/options.h
@@ -16,14 +16,13 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef _NETSURF_MONKEY_OPTIONS_H_
-#define _NETSURF_MONKEY_OPTIONS_H_
+#ifndef NETSURF_MONKEY_OPTIONS_H_
+#define NETSURF_MONKEY_OPTIONS_H_
/* currently nothing here */
#endif
-NSOPTION_BOOL(render_resample, true)
NSOPTION_BOOL(downloads_clear, false)
NSOPTION_BOOL(request_overwrite, true)
NSOPTION_STRING(downloads_directory, NULL)
@@ -31,7 +30,6 @@ NSOPTION_STRING(url_file, NULL)
NSOPTION_BOOL(show_single_tab, false)
NSOPTION_INTEGER(button_type, 0)
NSOPTION_BOOL(disable_popups, false)
-NSOPTION_BOOL(disable_plugins, false)
NSOPTION_INTEGER(history_age, 0)
NSOPTION_BOOL(hover_urls, false)
NSOPTION_BOOL(focus_new, false)
diff --git a/frontends/monkey/cert.h b/frontends/monkey/output.c
index 4470e2e72..d7eb7cdb6 100644
--- a/frontends/monkey/cert.h
+++ b/frontends/monkey/output.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2012 Vincent Sanders <vince@netsurf-browser.org>
+ * Copyright 2018 Vincent Sanders <vince@nexturf-browser.org>
*
* This file is part of NetSurf, http://www.netsurf-browser.org/
*
@@ -16,13 +16,38 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef _NETSURF_MONKEY_CERT_H_
-#define _NETSURF_MONKEY_CERT_H_
+#include <stdio.h>
+#include <stdarg.h>
-struct ssl_cert_info;
+#include "monkey/output.h"
-nserror gui_cert_verify(nsurl *url, const struct ssl_cert_info *certs,
- unsigned long num, nserror (*cb)(bool proceed, void *pw),
- void *cbpw);
+/**
+ * output type prefixes
+ */
+static const char *type_text[]={
+ "DIE",
+ "ERROR",
+ "WARN",
+ "GENERIC",
+ "WINDOW",
+ "LOGIN",
+ "DOWNLOAD",
+ "PLOT",
+};
+
+/* exported interface documented in monkey/output.h */
+int moutf(enum monkey_output_type mout_type, const char *fmt, ...)
+{
+ va_list ap;
+ int res;
+
+ res = fprintf(stdout, "%s ", type_text[mout_type]);
+
+ va_start(ap, fmt);
+ res += vfprintf(stdout, fmt, ap);
+ va_end(ap);
+
+ fputc('\n', stdout);
-#endif
+ return res + 1;
+}
diff --git a/frontends/amiga/login.h b/frontends/monkey/output.h
index 058fa5948..8e6a0abd6 100755..100644
--- a/frontends/amiga/login.h
+++ b/frontends/monkey/output.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2008 Chris Young <chris@unsatisfactorysoftware.co.uk>
+ * Copyright 2018 Vincent Sanders <vince@netsurf-browser.org>
*
* This file is part of NetSurf, http://www.netsurf-browser.org/
*
@@ -16,14 +16,20 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef AMIGA_LOGIN_H
-#define AMIGA_LOGIN_H
+#ifndef NS_MONKEY_OUTPUT_H
+#define NS_MONKEY_OUTPUT_H
-#include <stdbool.h>
+enum monkey_output_type {
+ MOUT_DIE,
+ MOUT_ERROR,
+ MOUT_WARNING,
+ MOUT_GENERIC,
+ MOUT_WINDOW,
+ MOUT_LOGIN,
+ MOUT_DOWNLOAD,
+ MOUT_PLOT,
+};
-struct gui_login_window;
+int moutf(enum monkey_output_type mout_type, const char *fmt, ...);
-void gui_401login_open(nsurl *url, const char *realm,
- nserror (*cb)(bool proceed, void *pw), void *cbpw);
#endif
-
diff --git a/frontends/monkey/plot.c b/frontends/monkey/plot.c
index d00dca754..a8f0d61b6 100644
--- a/frontends/monkey/plot.c
+++ b/frontends/monkey/plot.c
@@ -22,6 +22,8 @@
#include "utils/errors.h"
#include "netsurf/plotters.h"
+#include "monkey/output.h"
+
/**
* \brief Sets a clip rectangle for subsequent plot operations.
*
@@ -33,8 +35,7 @@
static nserror
monkey_plot_clip(const struct redraw_context *ctx, const struct rect *clip)
{
- fprintf(stdout,
- "PLOT CLIP X0 %d Y0 %d X1 %d Y1 %d\n",
+ moutf(MOUT_PLOT, "CLIP X0 %d Y0 %d X1 %d Y1 %d",
clip->x0, clip->y0, clip->x1, clip->y1);
return NSERROR_OK;
}
@@ -61,9 +62,8 @@ monkey_plot_arc(const struct redraw_context *ctx,
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",
- x, y, radius, angle1, angle2);
+ moutf(MOUT_PLOT, "ARC X %d Y %d RADIUS %d ANGLE1 %d ANGLE2 %d",
+ x, y, radius, angle1, angle2);
return NSERROR_OK;
}
@@ -85,9 +85,7 @@ monkey_plot_disc(const struct redraw_context *ctx,
const plot_style_t *style,
int x, int y, int radius)
{
- fprintf(stdout,
- "PLOT DISC X %d Y %d RADIUS %d\n",
- x, y, radius);
+ moutf(MOUT_PLOT, "DISC X %d Y %d RADIUS %d", x, y, radius);
return NSERROR_OK;
}
@@ -108,8 +106,7 @@ monkey_plot_line(const struct redraw_context *ctx,
const plot_style_t *style,
const struct rect *line)
{
- fprintf(stdout,
- "PLOT LINE X0 %d Y0 %d X1 %d Y1 %d\n",
+ moutf(MOUT_PLOT, "LINE X0 %d Y0 %d X1 %d Y1 %d",
line->x0, line->y0, line->x1, line->y1);
return NSERROR_OK;
}
@@ -133,8 +130,7 @@ monkey_plot_rectangle(const struct redraw_context *ctx,
const plot_style_t *style,
const struct rect *rect)
{
- fprintf(stdout,
- "PLOT RECT X0 %d Y0 %d X1 %d Y1 %d\n",
+ moutf(MOUT_PLOT, "RECT X0 %d Y0 %d X1 %d Y1 %d",
rect->x0, rect->y0, rect->x1, rect->y1);
return NSERROR_OK;
}
@@ -160,9 +156,7 @@ monkey_plot_polygon(const struct redraw_context *ctx,
const int *p,
unsigned int n)
{
- fprintf(stdout,
- "PLOT POLYGON VERTICIES %d\n",
- n);
+ moutf(MOUT_PLOT, "POLYGON VERTICIES %d", n);
return NSERROR_OK;
}
@@ -177,7 +171,6 @@ monkey_plot_polygon(const struct redraw_context *ctx,
* \param pstyle Style controlling the path plot.
* \param p elements of path
* \param n nunber of elements on path
- * \param width The width of the path
* \param transform A transform to apply to the path.
* \return NSERROR_OK on success else error code.
*/
@@ -186,12 +179,10 @@ 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])
{
- fprintf(stdout,
- "PLOT PATH VERTICIES %d WIDTH %f\n",
- n, width);
+ moutf(MOUT_PLOT, "PATH VERTICIES %d WIDTH %f",
+ n, plot_style_fixed_to_float(pstyle->stroke_width));
return NSERROR_OK;
}
@@ -229,9 +220,8 @@ monkey_plot_bitmap(const struct redraw_context *ctx,
colour bg,
bitmap_flags_t flags)
{
- fprintf(stdout,
- "PLOT BITMAP X %d Y %d WIDTH %d HEIGHT %d\n",
- x, y, width, height);
+ moutf(MOUT_PLOT, "BITMAP X %d Y %d WIDTH %d HEIGHT %d",
+ x, y, width, height);
return NSERROR_OK;
}
@@ -255,9 +245,7 @@ monkey_plot_text(const struct redraw_context *ctx,
const char *text,
size_t length)
{
- fprintf(stdout,
- "PLOT TEXT X %d Y %d STR %*s\n",
- x, y, (int)length, text);
+ moutf(MOUT_PLOT, "TEXT X %d Y %d STR %.*s", x, y, (int)length, text);
return NSERROR_OK;
}
@@ -273,7 +261,7 @@ static const struct plotter_table plotters = {
.path = monkey_plot_path,
.bitmap = monkey_plot_bitmap,
.text = monkey_plot_text,
- .option_knockout = true,
+ .option_knockout = true,
};
const struct plotter_table* monkey_plotters = &plotters;
diff --git a/frontends/monkey/schedule.c b/frontends/monkey/schedule.c
index 3d76997f4..9d3ab7af8 100644
--- a/frontends/monkey/schedule.c
+++ b/frontends/monkey/schedule.c
@@ -43,6 +43,7 @@ struct nscallback
*
* \param callback callback function
* \param p user parameter, passed to callback function
+ * \return NSERROR_OK if callback found and removed else NSERROR_NOT_FOUND
*
* All scheduled callbacks matching both callback and p are removed.
*/
@@ -51,10 +52,11 @@ static nserror schedule_remove(void (*callback)(void *p), void *p)
struct nscallback *cur_nscb;
struct nscallback *prev_nscb;
struct nscallback *unlnk_nscb;
+ bool removed = false;
/* check there is something on the list to remove */
if (schedule_list == NULL) {
- return NSERROR_OK;
+ return NSERROR_NOT_FOUND;
}
NSLOG(schedule, DEBUG, "removing %p, %p", callback, p);
@@ -80,6 +82,7 @@ static nserror schedule_remove(void (*callback)(void *p), void *p)
prev_nscb->next = cur_nscb;
}
free (unlnk_nscb);
+ removed = true;
} else {
/* move to next element */
prev_nscb = cur_nscb;
@@ -87,6 +90,9 @@ static nserror schedule_remove(void (*callback)(void *p), void *p)
}
}
+ if (removed == false) {
+ return NSERROR_NOT_FOUND;
+ }
return NSERROR_OK;
}
@@ -99,7 +105,7 @@ nserror monkey_schedule(int tival, void (*callback)(void *p), void *p)
/* ensure uniqueness of the callback and context */
ret = schedule_remove(callback, p);
- if ((tival < 0) || (ret != NSERROR_OK)) {
+ if (tival < 0) {
return ret;
}
diff --git a/frontends/riscos/401login.c b/frontends/riscos/401login.c
deleted file mode 100644
index 4b2deb16b..000000000
--- a/frontends/riscos/401login.c
+++ /dev/null
@@ -1,235 +0,0 @@
-/*
- * Copyright 2003 John M Bell <jmb202@ecs.soton.ac.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 "utils/config.h"
-
-#include <assert.h>
-#include <stdbool.h>
-#include <string.h>
-#include <oslib/wimp.h>
-
-#include "utils/log.h"
-#include "utils/messages.h"
-#include "utils/nsurl.h"
-#include "netsurf/url_db.h"
-
-#include "riscos/gui.h"
-#include "riscos/dialog.h"
-#include "riscos/wimp_event.h"
-
-#define ICON_401LOGIN_LOGIN 0
-#define ICON_401LOGIN_CANCEL 1
-#define ICON_401LOGIN_HOST 2
-#define ICON_401LOGIN_REALM 3
-#define ICON_401LOGIN_USERNAME 4
-#define ICON_401LOGIN_PASSWORD 5
-
-static void ro_gui_401login_close(wimp_w w);
-static bool ro_gui_401login_apply(wimp_w w);
-static void ro_gui_401login_open(nsurl *url, lwc_string *host,
- const char *realm,
- nserror (*cb)(bool proceed, void *pw), void *cbpw);
-
-static wimp_window *dialog_401_template;
-
-struct session_401 {
- lwc_string *host; /**< Host for user display */
- char *realm; /**< Authentication realm */
- char uname[256]; /**< Buffer for username */
- nsurl *url; /**< URL being fetched */
- char pwd[256]; /**< Buffer for password */
- nserror (*cb)(bool proceed, void *pw); /**< Continuation callback */
- void *cbpw; /**< Continuation callback data */
-};
-
-
-/**
- * Load the 401 login window template.
- */
-
-void ro_gui_401login_init(void)
-{
- dialog_401_template = ro_gui_dialog_load_template("login");
-}
-
-
-/**
- * Open the login dialog
- */
-void gui_401login_open(nsurl *url, const char *realm,
- nserror (*cb)(bool proceed, void *pw), void *cbpw)
-{
- lwc_string *host = nsurl_get_component(url, NSURL_HOST);
- assert(host != NULL);
-
- ro_gui_401login_open(url, host, realm, cb, cbpw);
-
- lwc_string_unref(host);
-}
-
-
-/**
- * Open a 401 login window.
- */
-
-void ro_gui_401login_open(nsurl *url, lwc_string *host, const char *realm,
- nserror (*cb)(bool proceed, void *pw), void *cbpw)
-{
- struct session_401 *session;
- wimp_w w;
- const char *auth;
-
- session = calloc(1, sizeof(struct session_401));
- if (!session) {
- ro_warn_user("NoMemory", 0);
- return;
- }
-
- session->url = nsurl_ref(url);
- if (realm == NULL)
- realm = "Secure Area";
- auth = urldb_get_auth_details(session->url, realm);
- if (auth == NULL) {
- session->uname[0] = '\0';
- session->pwd[0] = '\0';
- } else {
- const char *pwd;
- size_t pwd_len;
-
- pwd = strchr(auth, ':');
- assert(pwd && pwd < auth + sizeof(session->uname));
- memcpy(session->uname, auth, pwd - auth);
- session->uname[pwd - auth] = '\0';
- ++pwd;
- pwd_len = strlen(pwd);
- assert(pwd_len < sizeof(session->pwd));
- memcpy(session->pwd, pwd, pwd_len);
- session->pwd[pwd_len] = '\0';
- }
- session->host = lwc_string_ref(host);
- session->realm = strdup(realm);
- session->cb = cb;
- session->cbpw = cbpw;
-
- if (!session->realm) {
- nsurl_unref(session->url);
- lwc_string_unref(session->host);
- free(session);
- ro_warn_user("NoMemory", 0);
- return;
- }
-
- /* fill in download window icons */
- dialog_401_template->icons[ICON_401LOGIN_HOST].data.
- indirected_text.text =
- (char *)lwc_string_data(session->host);
- dialog_401_template->icons[ICON_401LOGIN_HOST].data.
- indirected_text.size =
- lwc_string_length(session->host) + 1;
- dialog_401_template->icons[ICON_401LOGIN_REALM].data.
- indirected_text.text = session->realm;
- dialog_401_template->icons[ICON_401LOGIN_REALM].data.
- indirected_text.size = strlen(session->realm) + 1;
- dialog_401_template->icons[ICON_401LOGIN_USERNAME].data.
- indirected_text.text = session->uname;
- dialog_401_template->icons[ICON_401LOGIN_USERNAME].data.
- indirected_text.size = sizeof(session->uname);
- dialog_401_template->icons[ICON_401LOGIN_PASSWORD].data.
- indirected_text.text = session->pwd;
- dialog_401_template->icons[ICON_401LOGIN_PASSWORD].data.
- indirected_text.size = sizeof(session->pwd);
-
- /* create and open the window */
- w = wimp_create_window(dialog_401_template);
-
- ro_gui_wimp_event_register_text_field(w, ICON_401LOGIN_USERNAME);
- ro_gui_wimp_event_register_text_field(w, ICON_401LOGIN_PASSWORD);
- ro_gui_wimp_event_register_cancel(w, ICON_401LOGIN_CANCEL);
- ro_gui_wimp_event_register_ok(w, ICON_401LOGIN_LOGIN,
- ro_gui_401login_apply);
- ro_gui_wimp_event_register_close_window(w, ro_gui_401login_close);
- ro_gui_wimp_event_set_user_data(w, session);
-
- ro_gui_dialog_open_persistent(NULL, w, false);
-}
-
-/**
- * Handle closing of login dialog
- */
-void ro_gui_401login_close(wimp_w w)
-{
- os_error *error;
- struct session_401 *session;
-
- session = (struct session_401 *)ro_gui_wimp_event_get_user_data(w);
-
- assert(session);
-
- /* If ok didn't happen, send failure response */
- if (session->cb != NULL)
- session->cb(false, session->cbpw);
-
- nsurl_unref(session->url);
- lwc_string_unref(session->host);
- free(session->realm);
- free(session);
-
- error = xwimp_delete_window(w);
- if (error) {
- NSLOG(netsurf, INFO, "xwimp_delete_window: 0x%x:%s",
- error->errnum, error->errmess);
- ro_warn_user("WimpError", error->errmess);
- }
- ro_gui_wimp_event_finalise(w);
-}
-
-
-/* Login Clicked -> create a new fetch request, specifying uname & pwd
- * CURLOPT_USERPWD takes a string "username:password"
- */
-bool ro_gui_401login_apply(wimp_w w)
-{
- struct session_401 *session;
- char *auth;
-
- session = (struct session_401 *)ro_gui_wimp_event_get_user_data(w);
-
- assert(session);
-
- auth = malloc(strlen(session->uname) + strlen(session->pwd) + 2);
- if (!auth) {
- NSLOG(netsurf, INFO, "calloc failed");
- ro_warn_user("NoMemory", 0);
- return false;
- }
-
- sprintf(auth, "%s:%s", session->uname, session->pwd);
-
- urldb_set_auth_details(session->url, session->realm, auth);
-
- free(auth);
-
- session->cb(true, session->cbpw);
-
- /* Flag that we sent response by invalidating callback details */
- session->cb = NULL;
- session->cbpw = NULL;
-
- return true;
-}
-
diff --git a/frontends/riscos/Makefile b/frontends/riscos/Makefile
index 84a1c93f9..265f9289d 100644
--- a/frontends/riscos/Makefile
+++ b/frontends/riscos/Makefile
@@ -16,12 +16,15 @@ $(eval $(call feature_enabled,DRAW_EXPORT,-DWITH_DRAW_EXPORT,-lpencil,Drawfile e
TPD_RISCOS = $(foreach TPL,$(notdir $(TPL_RISCOS)), \
- !NetSurf/Resources/$(TPL)/Templates$(TPLEXT))
+ $(FRONTEND_SOURCE_DIR)/appdir/Resources/$(TPL)/Templates$(TPLEXT))
RESOURCES = $(TPD_RISCOS)
CFLAGS += -Driscos -std=c99 -D_BSD_SOURCE -D_POSIX_C_SOURCE \
-mpoke-function-name -fno-strict-aliasing
+ifeq ($(findstring -elfeabi,$(SUBTARGET)),-elfeabi)
+ CFLAGS += -funwind-tables
+endif
CFLAGS += -I$(GCCSDK_INSTALL_ENV)/include
ifeq ($(HOST),riscos)
@@ -33,7 +36,7 @@ ifeq ($(HOST),riscos)
LDFLAGS += -LOSLib: -lOSLib32
else
LDFLAGS += -lOSLib32
- ifeq ($(SUBTARGET),-elf)
+ ifeq ($(findstring -elf,$(SUBTARGET)),-elf)
# Go for static builds & AIF binary at the moment:
CFLAGS += -static
LDFLAGS += -static
@@ -46,17 +49,52 @@ endif
# ----------------------------------------------------------------------------
# S_RISCOS are sources purely for the RISC OS build
-S_FRONTEND := 401login.c assert.c bitmap.c buffer.c configure.c gui.c \
- dialog.c download.c filetype.c font.c help.c image.c \
- iconbar.c menus.c message.c mouse.c palettes.c plotters.c \
- print.c query.c save.c save_draw.c save_pdf.c schedule.c \
- search.c searchweb.c textarea.c textselection.c theme.c \
- theme_install.c toolbar.c url_suggest.c wimp.c wimp_event.c \
- ucstables.c uri.c url_complete.c url_protocol.c window.c \
- corewindow.c cookies.c sslcert.c hotlist.c \
- local_history.c global_history.c \
- $(addprefix content-handlers/,artworks.c awrender.s draw.c \
- sprite.c) \
+S_FRONTEND := \
+ assert.c \
+ bitmap.c \
+ buffer.c \
+ configure.c \
+ cookies.c \
+ corewindow.c \
+ dialog.c \
+ download.c \
+ filetype.c \
+ font.c \
+ global_history.c \
+ gui.c \
+ help.c \
+ hotlist.c \
+ image.c \
+ iconbar.c \
+ local_history.c \
+ menus.c \
+ message.c \
+ mouse.c \
+ pageinfo.c \
+ palettes.c \
+ plotters.c \
+ print.c \
+ query.c \
+ save.c \
+ save_draw.c \
+ save_pdf.c \
+ schedule.c \
+ search.c \
+ searchweb.c \
+ textarea.c \
+ textselection.c \
+ theme.c \
+ theme_install.c \
+ toolbar.c \
+ url_suggest.c \
+ ucstables.c \
+ uri.c \
+ url_complete.c \
+ url_protocol.c \
+ window.c \
+ wimp.c \
+ wimp_event.c \
+ $(addprefix content-handlers/,artworks.c awrender.s draw.c sprite.c) \
$(addprefix gui/,button_bar.c progress_bar.c status_bar.c \
throbber.c url_bar.c) \
$(addprefix configure/,con_cache.c con_connect.c con_content.c \
@@ -68,16 +106,19 @@ S_FRONTEND := 401login.c assert.c bitmap.c buffer.c configure.c gui.c \
# are not yet available
SOURCES = $(S_COMMON) $(S_IMAGE) $(S_BROWSER) $(S_FRONTEND)
-EXETARGET := !NetSurf/!RunImage$(EXEEXT)
+EXETARGET := $(FRONTEND_SOURCE_DIR)/appdir/!RunImage$(EXEEXT)
# The filter and target for split messages
MESSAGES_FILTER=ro
-!NetSurf/!Run$(RUNEXT): $(FRONTEND_SOURCE_DIR)/scripts/Run $(EXETARGET)
+$(FRONTEND_SOURCE_DIR)/appdir/!Run$(RUNEXT): $(FRONTEND_SOURCE_DIR)/scripts/Run $(EXETARGET)
$(VQ)echo " MAKERUN: $@"
$(Q)$(MAKERUN) $(EXETARGET) $< $@
+ifeq ($(findstring -elfeabi,$(SUBTARGET)),-elfeabi)
+ $(Q)$(SED) -i -e 's/^|\(RMEnsure ARMEABISupport\)/\1/' -e 's/SharedUnixLibrary 1\.07/SharedUnixLibrary 1.16/g' $@
+endif
-!NetSurf/!Help$(RUNEXT): $(FRONTEND_SOURCE_DIR)/scripts/Help
+$(FRONTEND_SOURCE_DIR)/appdir/!Help$(RUNEXT): $(FRONTEND_SOURCE_DIR)/scripts/Help
$(VQ)echo " CP: $@"
$(Q)cp $< $@
@@ -86,16 +127,16 @@ $(DEPROOT)/squeeze.d: $(EXETARGET)
$(Q)$(SQUEEZE) -f -v $(EXETARGET)
$(Q)$(TOUCH) $@
-POSTEXES += !NetSurf/!Run$(RUNEXT) !NetSurf/!Help$(RUNEXT) $(DEPROOT)/squeeze.d
+POSTEXES += $(FRONTEND_SOURCE_DIR)/appdir/!Run$(RUNEXT) $(FRONTEND_SOURCE_DIR)/appdir/!Help$(RUNEXT) $(DEPROOT)/squeeze.d
clean-run:
- $(VQ)echo " CLEAN: !NetSurf/!Run$(RUNEXT)"
- $(Q) $(RM) !NetSurf/!Run$(RUNEXT)
+ $(VQ)echo " CLEAN: !Run$(RUNEXT)"
+ $(Q) $(RM) $(FRONTEND_SOURCE_DIR)/appdir/!Run$(RUNEXT)
clean-help:
- $(VQ)echo " CLEAN: !NetSurf/!Help$(RUNEXT)"
- $(Q) $(RM) !NetSurf/!Help$(RUNEXT)
+ $(VQ)echo " CLEAN: !Help$(RUNEXT)"
+ $(Q) $(RM) $(FRONTEND_SOURCE_DIR)/appdir/!Help$(RUNEXT)
CLEANS += clean-run clean-help
@@ -109,12 +150,12 @@ TPL_RISCOS := $(addprefix $(FRONTEND_SOURCE_DIR)/templates/,$(TPL_RISCOS))
# Template target creation macro
define compile_template
-!NetSurf/Resources/$(1)/Templates$$(TPLEXT): $(2)
+$(FRONTEND_SOURCE_DIR)/appdir/Resources/$(1)/Templates$$(TPLEXT): $(2)
$$(VQ)echo "TEMPLATE: $(2)"
- $$(Q)$$(MKDIR) -p !NetSurf/Resources/$(1)
+ $$(Q)$$(MKDIR) -p $(FRONTEND_SOURCE_DIR)/appdir/Resources/$(1)
$$(Q)$$(CC) -x c -E -P $$(CFLAGS) $(2) | $$(CCRES) - $$@
-CLEAN_TEMPLATES += !NetSurf/Resources/$(1)/Templates$$(TPLEXT)
+CLEAN_TEMPLATES += $(FRONTEND_SOURCE_DIR)/appdir/Resources/$(1)/Templates$$(TPLEXT)
endef
@@ -139,15 +180,15 @@ install-riscos:
package-riscos: netsurf.zip
-netsurf.zip: $(EXETARGET)
+netsurf.zip: $(EXETARGET) $(POSTEXES)
$(eval $@_TMPDIR := $(shell mktemp -d))
$(Q) $(RM) $@
- $(Q) rsync --archive --verbose $(CURDIR)/!NetSurf $($@_TMPDIR)
- $(Q) $(CURDIR)/utils/git-date.sh $(FRONTEND_SOURCE_DIR)/distribution
+ $(Q) cp -rLvp $(FRONTEND_SOURCE_DIR)/appdir $($@_TMPDIR)/!NetSurf
+ $(Q) $(CURDIR)/tools/git-date.sh $(FRONTEND_SOURCE_DIR)/distribution
$(Q) rsync --archive --verbose $(FRONTEND_SOURCE_DIR)/distribution/!Boot $($@_TMPDIR)
$(Q) rsync --archive --verbose $(FRONTEND_SOURCE_DIR)/distribution/!System $($@_TMPDIR)
$(Q) rsync --archive --verbose $(FRONTEND_SOURCE_DIR)/distribution/3rdParty $($@_TMPDIR)
$(Q) cp $(FRONTEND_SOURCE_DIR)/distribution/ReadMe $($@_TMPDIR)
$(Q) cp $(FRONTEND_SOURCE_DIR)/distribution/LeesMij $($@_TMPDIR)
- $(Q) cd $($@_TMPDIR) && /opt/netsurf/arm-unknown-riscos/env/bin/zip -9vr\, $(CURDIR)/$@ *
+ $(Q) cd $($@_TMPDIR) && $(ZIP) -9vr\, $(CURDIR)/$@ *
$(Q) $(RM) -rf $($@_TMPDIR)
diff --git a/frontends/riscos/Makefile.tools b/frontends/riscos/Makefile.tools
new file mode 100644
index 000000000..a5b5cca1e
--- /dev/null
+++ b/frontends/riscos/Makefile.tools
@@ -0,0 +1,100 @@
+# -*- mode: makefile-gmake -*-
+##
+## RISC OS target tool setup
+##
+
+ifeq ($(HOST),riscos)
+ # Build for RO on RO
+ GCCSDK_INSTALL_ENV := <NSLibs$$Dir>
+ CCRES := ccres
+ TPLEXT :=
+ MAKERUN := makerun
+ SQUEEZE := squeeze
+ RUNEXT :=
+ CC := gcc
+ CXX := g++
+ EXEEXT :=
+ PKG_CONFIG :=
+ ZIP := zip
+ SED :=
+else
+ # Cross-build for RO
+ # Four options are available:
+ # a. GCCSDK 3.4.6 - AOF (machine: arm-unknown-riscos)
+ # b. GCCSDK 4 - ELF (machine: arm-unknown-riscos)
+ # c. GCCSDK 8+ - ELF, using soft-float EABI (machine: arm-riscos-gnueabi)
+ # d. GCCSDK 8+ - ELF, using hard-float EABI (machine: arm-riscos-gnueabihf)
+ # GCCSDK 3.4.6 and 4 are distinguished by GCCSDK 3.4.6 binary names
+ # not having the machine prefix (e.g. gcc), whereas GCCSDK 4 binaries
+ # do (e.g. arm-unknown-riscos-gcc).
+
+ # Search for the toolchain install locations if we haven't been told
+ # The search order prefers GCCSDK 3.4.6/4 over 8+ and soft-float over hard.
+ ifeq ($(origin GCCSDK_INSTALL_ENV),undefined)
+ ifneq ($(realpath /opt/netsurf/arm-unknown-riscos/env),)
+ GCCSDK_INSTALL_ENV := /opt/netsurf/arm-unknown-riscos/env
+ else
+ ifneq ($(realpath /opt/netsurf/arm-riscos-gnueabi/env),)
+ GCCSDK_INSTALL_ENV := /opt/netsurf/arm-riscos-gnueabi/env
+ else
+ ifneq ($(realpath /opt/netsurf/arm-riscos-gnueabihf/env),)
+ GCCSDK_INSTALL_ENV := /opt/netsurf/arm-riscos-gnueabihf/env
+ else
+ # No NetSurf-specific toolchain found: try the "normal" GCCSDK path
+ GCCSDK_INSTALL_ENV := /home/riscos/env
+ endif
+ endif
+ endif
+ endif
+
+ ifeq ($(origin GCCSDK_INSTALL_CROSSBIN),undefined)
+ ifneq ($(realpath /opt/netsurf/arm-unknown-riscos/cross/bin),)
+ GCCSDK_INSTALL_CROSSBIN := /opt/netsurf/arm-unknown-riscos/cross/bin
+ else
+ ifneq ($(realpath /opt/netsurf/arm-riscos-gnueabi/cross/bin),)
+ GCCSDK_INSTALL_CROSSBIN := /opt/netsurf/arm-riscos-gnueabi/cross/bin
+ else
+ ifneq ($(realpath /opt/netsurf/arm-riscos-gnueabihf/cross/bin),)
+ GCCSDK_INSTALL_CROSSBIN := /opt/netsurf/arm-riscos-gnueabihf/cross/bin
+ else
+ # No NetSurf-specific toolchain found: try the "normal" GCCSDK path
+ GCCSDK_INSTALL_CROSSBIN := /home/riscos/cross/bin
+ endif
+ endif
+ endif
+ endif
+
+ CCRES := $(GCCSDK_INSTALL_CROSSBIN)/ccres
+ TPLEXT := ,fec
+ MAKERUN := $(GCCSDK_INSTALL_CROSSBIN)/makerun
+ SQUEEZE := $(GCCSDK_INSTALL_CROSSBIN)/squeeze
+ RUNEXT := ,feb
+ CC := $(wildcard $(GCCSDK_INSTALL_CROSSBIN)/*gcc)
+
+ # Work out what kind of toolchain we're dealing with
+ ifneq (,$(findstring arm-unknown-riscos-gcc,$(CC)))
+ # GCCSDK 4
+ SUBTARGET := -elf
+ EXEEXT := ,e1f
+ ELF2AIF := $(GCCSDK_INSTALL_CROSSBIN)/elf2aif
+ else
+ ifneq (,$(findstring arm-riscos-gnueabi,$(CC)))
+ # GCCSDK 8+
+ SUBTARGET := -elfeabi
+ ifneq (,$(findstring gnueabihf,$(CC)))
+ SUBTARGET := -elfeabihf
+ endif
+ EXEEXT := ,e1f
+ ELF2AIF := $(GCCSDK_INSTALL_CROSSBIN)/elf2aif -e
+ else
+ # GCCSDK 3.4.6
+ SUBTARGET := -aof
+ EXEEXT := ,ff8
+ endif
+ endif
+
+ CXX := $(wildcard $(GCCSDK_INSTALL_CROSSBIN)/*g++)
+ PKG_CONFIG = PKG_CONFIG_LIBDIR="$(PREFIX)/lib/pkgconfig:$(GCCSDK_INSTALL_ENV)/lib/pkgconfig:$(GCCSDK_INSTALL_ENV)/share/pkgconfig" pkg-config
+ ZIP := $(GCCSDK_INSTALL_CROSSBIN)/zip
+ SED := sed
+endif
diff --git a/frontends/riscos/appdir/!Boot,feb b/frontends/riscos/appdir/!Boot,feb
new file mode 100644
index 000000000..acaad8192
--- /dev/null
+++ b/frontends/riscos/appdir/!Boot,feb
@@ -0,0 +1,88 @@
+| Boot file for NetSurf. ( $Revision$ )
+|
+| This file sets up various system variables which NetSurf may use.
+| Additionally, it places the NetSurf application sprites into the Wimp
+| sprite pool.
+|
+| This file may be executed in two ways:
+| 1. When NetSurf is first seen by the OS.
+| 2. When NetSurf is run by the user (called from the !Run file).
+| In the first instance, NetSurf-specific variables are set and non
+| NetSurf-specific variables which are unset are initialised.
+| In the second instance, all variables are set, irrespective of their
+| previous state. This is achieved by use of the NetSurf$ForceVars
+| variable, which is set by the !Run file prior to calling this file.
+
+| Set up NetSurf$Dir
+If (("<NetSurf$Dir>" = "") OR ("<NetSurf$ForceVars>" = "1")) Then Set NetSurf$Dir <Obey$Dir>
+
+| Filetype -> Type name mappings
+|
+| These get set whether they were previously set or not
+Set File$Type_132 ICO
+Set File$Type_695 GIF
+Set File$Type_69C BMP
+Set File$Type_AAD SVG
+Set File$Type_ADF PDF
+Set File$Type_B28 URL
+Set File$Type_B60 PNG
+Set File$Type_C85 JPEG
+Set File$Type_F78 JNG
+Set File$Type_F79 CSS
+Set File$Type_F81 JSScript
+Set File$Type_F83 MNG
+Set File$Type_F91 URI
+Set File$Type_FAF HTML
+
+| Application system variables
+If (("<NetSurf$Help>" = "") OR ("<NetSurf$ForceVars>" = "1")) Then Set NetSurf$Help <NetSurf$Dir>.Docs.docs_en
+If (("<NetSurf$Web>" = "") OR ("<NetSurf$ForceVars>" = "1")) Then Set NetSurf$Web "https://www.netsurf-browser.org/"
+If (("<NetSurf$Title>" = "") OR ("<NetSurf$ForceVars>" = "1")) Then Set NetSurf$Title "NetSurf"
+If (("<NetSurf$Publisher>" = "") OR ("<NetSurf$ForceVars>" = "1")) Then Set NetSurf$Publisher "The NetSurf Developers"
+If (("<NetSurf$Description>" = "") OR ("<NetSurf$ForceVars>" = "1")) Then Set NetSurf$Description "Web browser"
+
+| NetSurf Sprites
+Set NetSurf$Sprites "!Sprites"
+/<NetSurf$Dir>.ChkSprites
+IconSprites <NetSurf$Dir>.<NetSurf$Sprites>
+Unset NetSurf$Sprites
+
+| Acorn URI protocol
+|
+| Format: Alias$Open_URI_<scheme> <command to run>
+|
+| These are basically a last resort. The URI module will initially broadcast
+| Message_URI_MProcess. If this isn't claimed, then it'll check if an
+| appropriate Alias$Open_URI_<scheme> variable is set. If such a variable
+| exists, then it will attempt to launch the task named by the variable.
+| If the launch is successful, the Message_URI_MProcess is rebroadcast.
+| The -nowin is required to ensure only one window is opened (this only has
+| an effect if the user has configured auto window opening at startup).
+If (("<Alias$Open_URI_http>" = "") OR ("<NetSurf$ForceVars>" = "1")) Then Set Alias$Open_URI_http /<NetSurf$Dir>.!Run -nowin
+If (("<Alias$Open_URI_https>" = "") OR ("<NetSurf$ForceVars>" = "1")) Then Set Alias$Open_URI_https /<NetSurf$Dir>.!Run -nowin
+If (("<Alias$Open_URI_file>" = "") OR ("<NetSurf$ForceVars>" = "1")) Then Set Alias$Open_URI_file /<NetSurf$Dir>.!Run -nowin
+
+| ANT URL protocol
+|
+| Format: Alias$URLOpen_<scheme> <command to run>
+|
+| These handle the "load" stage of the protocol. The appropriate variable's
+| existence is checked then, if it is present, the URL to be opened is
+| appended to the string "URLOpen_<scheme> " and this is then fed to
+| Wimp_StartTask.
+If (("<Alias$URLOpen_http>" = "") OR ("<NetSurf$ForceVars>" = "1")) Then Set Alias$URLOpen_http /<NetSurf$Dir>.!Run -url %%*0
+If (("<Alias$URLOpen_https>" = "") OR ("<NetSurf$ForceVars>" = "1")) Then Set Alias$URLOpen_https /<NetSurf$Dir>.!Run -url %%*0
+If (("<Alias$URLOpen_file>" = "") OR ("<NetSurf$ForceVars>" = "1")) Then Set Alias$URLOpen_file /<NetSurf$Dir>.!Run -url %%*0
+
+| Claim HTML and URL files
+|
+| Format: Alias$@RunType_<hex> <command to run>
+|
+| Again, a fallback. The filer initially tries a DataOpen message. If that
+| bounces, it looks at these variables.
+If (("<Alias$@RunType_FAF>" = "") OR ("<NetSurf$ForceVars>" = "1")) Then Set Alias$@RunType_FAF /<NetSurf$Dir>.!Run -html %%*0
+If (("<Alias$@RunType_B28>" = "") OR ("<NetSurf$ForceVars>" = "1")) Then Set Alias$@RunType_B28 /<NetSurf$Dir>.!Run -urlf %%*0
+
+| We don't claim the URI filetype as the spec tells us not to:
+| "Applications must not set an Alias$@RunType variable for the URI filetype"
+| Obviously this means that Browse/Phoenix and the Oreganos are incorrect.
diff --git a/frontends/riscos/appdir/!Sprites,ff9 b/frontends/riscos/appdir/!Sprites,ff9
new file mode 100644
index 000000000..2c7d6f648
--- /dev/null
+++ b/frontends/riscos/appdir/!Sprites,ff9
Binary files differ
diff --git a/frontends/riscos/appdir/!Sprites22,ff9 b/frontends/riscos/appdir/!Sprites22,ff9
new file mode 100644
index 000000000..8bc3aa616
--- /dev/null
+++ b/frontends/riscos/appdir/!Sprites22,ff9
Binary files differ
diff --git a/frontends/riscos/appdir/5Sprites,ff9 b/frontends/riscos/appdir/5Sprites,ff9
new file mode 100755
index 000000000..b0cf1c95f
--- /dev/null
+++ b/frontends/riscos/appdir/5Sprites,ff9
Binary files differ
diff --git a/frontends/riscos/appdir/5Sprites11,ff9 b/frontends/riscos/appdir/5Sprites11,ff9
new file mode 100755
index 000000000..c039ea180
--- /dev/null
+++ b/frontends/riscos/appdir/5Sprites11,ff9
Binary files differ
diff --git a/frontends/riscos/appdir/5Sprites22,ff9 b/frontends/riscos/appdir/5Sprites22,ff9
new file mode 100755
index 000000000..766471428
--- /dev/null
+++ b/frontends/riscos/appdir/5Sprites22,ff9
Binary files differ
diff --git a/frontends/riscos/appdir/ASprites,ff9 b/frontends/riscos/appdir/ASprites,ff9
new file mode 100755
index 000000000..5cab2a16b
--- /dev/null
+++ b/frontends/riscos/appdir/ASprites,ff9
Binary files differ
diff --git a/frontends/riscos/appdir/ASprites11,ff9 b/frontends/riscos/appdir/ASprites11,ff9
new file mode 100755
index 000000000..5f94dfbd9
--- /dev/null
+++ b/frontends/riscos/appdir/ASprites11,ff9
Binary files differ
diff --git a/frontends/riscos/appdir/ASprites22,ff9 b/frontends/riscos/appdir/ASprites22,ff9
new file mode 100755
index 000000000..cc932844e
--- /dev/null
+++ b/frontends/riscos/appdir/ASprites22,ff9
Binary files differ
diff --git a/frontends/riscos/appdir/ChkSprites,ffb b/frontends/riscos/appdir/ChkSprites,ffb
new file mode 100644
index 000000000..4e38dfba5
--- /dev/null
+++ b/frontends/riscos/appdir/ChkSprites,ffb
Binary files differ
diff --git a/frontends/riscos/appdir/Docs/online,b60 b/frontends/riscos/appdir/Docs/online,b60
new file mode 100755
index 000000000..1ef39f0c9
--- /dev/null
+++ b/frontends/riscos/appdir/Docs/online,b60
Binary files differ
diff --git a/frontends/riscos/appdir/FixFonts,ffb b/frontends/riscos/appdir/FixFonts,ffb
new file mode 100644
index 000000000..c6b73d0b0
--- /dev/null
+++ b/frontends/riscos/appdir/FixFonts,ffb
@@ -0,0 +1,147 @@
+REM Attempt to fix broken font installations which have non-Base0 copies of the
+REM ROM fonts in !Fonts on disc.
+
+ON ERROR ON ERROR OFF: PRINT REPORT$ + " (at line " + STR$ERL + ")": END
+
+DIM f$(11)
+f$() = "Corpus.Bold","Corpus.Bold.Oblique","Corpus.Medium","Corpus.Medium.Oblique","Homerton.Bold","Homerton.Bold.Oblique","Homerton.Medium","Homerton.Medium.Oblique","Trinity.Bold","Trinity.Bold.Italic","Trinity.Medium","Trinity.Medium.Italic"
+
+PRINT "FONT INSTALLATION FIX"
+PRINT
+
+PRINT "Checking ROM fonts"
+PRINT
+ok% = TRUE
+FOR f% = 0 TO 11
+ PROCcheck_rom_font(f$(f%))
+NEXT
+PRINT
+IF NOT ok% THEN
+ PRINT "One or more of the standard ROM fonts are missing!"
+ PRINT "Please contact the developers stating your RISC OS version."
+ END
+ENDIF
+
+
+PRINT "Searching for obsolete copies in Boot:Resources.!Fonts"
+PRINT
+ok% = TRUE
+FOR f% = 0 TO 11
+ PROCcheck_disc_font(f$(f%))
+NEXT
+PRINT
+IF ok% THEN
+ PRINT "No problems were found."
+ END
+ENDIF
+
+PRINT "One or more obsolete fonts were found in !Fonts."
+PRINT
+PRINT "Press Y to move these fonts to a new directory"
+PRINT "called 'ObsolFonts' and remove them from the"
+PRINT "font list ('Messages1'),"
+PRINT "or any other key to exit without changes."
+key$ = GET$
+IF INSTR("Yy", key$) = 0 THEN
+ PRINT
+ PRINT "Exiting without changes."
+ END
+ENDIF
+PRINT
+
+PRINT "Creating 'ObsolFonts' directory - ";
+SYS"OS_File", 8, "<Boot$Dir>.^.ObsolFonts"
+PRINT "done"
+PRINT
+PRINT "Closing open files - ";
+SYS"OS_FSControl", 22
+PRINT "done"
+PRINT
+PRINT "Removing fonts from font list - ";
+file% = OPENIN "<Boot$Dir>.Resources.!Fonts.Messages1"
+IF file% THEN
+ new% = OPENOUT "<Boot$Dir>.Resources.!Fonts.Messages_"
+ IF new% = 0 THEN
+ PRINT "Failed to open new font list"
+ END
+ ENDIF
+ WHILE NOT EOF#file%
+ line$ = GET$#file%
+ ok% = TRUE
+ FOR f% = 0 TO 11
+ IF INSTR(line$, "Font_" + f$(f%) + ":") <> 0 THEN ok% = FALSE
+ NEXT
+ IF ok% THEN
+ BPUT#new%, line$
+ ENDIF
+ ENDWHILE
+ CLOSE#file%
+ CLOSE#new%
+ SYS"OS_File", 18, "<Boot$Dir>.Resources.!Fonts.Messages_", &fff
+ SYS"XOS_FSControl", 27, "<Boot$Dir>.^.ObsolFonts.Messages1"
+ SYS"OS_FSControl", 25, "<Boot$Dir>.Resources.!Fonts.Messages1", "<Boot$Dir>.^.ObsolFonts.Messages1"
+ SYS"OS_FSControl", 25, "<Boot$Dir>.Resources.!Fonts.Messages_", "<Boot$Dir>.Resources.!Fonts.Messages1"
+ENDIF
+PRINT "done"
+PRINT
+PRINT "Moving away obsolete fonts"
+PRINT
+FOR f% = 0 TO 11
+ PROCfix_font(f$(f%))
+NEXT
+PRINT
+PRINT "Finished"
+PRINT "Please restart your machine for the changes to take effect."
+
+END
+
+
+
+DEF PROCcheck_rom_font(f$)
+PRINT " "; f$;
+SYS"OS_File", 17, "Resources:$.Fonts." + f$ + ".Outlines0" TO t1%
+SYS"OS_File", 17, "Resources:$.Fonts." + f$ + ".IntMetric0" TO t2%
+IF t1% = 1 AND t2% = 1 THEN
+ PRINT " - ok"
+ELSE
+ PRINT " - MISSING"
+ ok% = FALSE
+ENDIF
+ENDPROC
+
+
+
+DEF PROCcheck_disc_font(f$)
+SYS"OS_File", 17, "<Boot$Dir>.Resources.!Fonts." + f$ + ".Outlines" TO t%
+IF t% <> 0 THEN
+ PRINT " "; f$
+ ok% = FALSE
+ENDIF
+ENDPROC
+
+
+
+DEF PROCfix_font(f$)
+SYS"OS_File", 17, "<Boot$Dir>.Resources.!Fonts." + f$ + ".Outlines" TO t%
+IF t% = 0 THEN ENDPROC
+
+PRINT " "; f$; " - ";
+i% = 0
+REPEAT
+ i% = INSTR(f$, ".", i% + 1)
+ IF i% <> 0 THEN
+ SYS"OS_File", 8, "<Boot$Dir>.^.ObsolFonts." + LEFT$(f$, i% - 1)
+ ENDIF
+UNTIL i% = 0
+SYS"OS_File", 8, "<Boot$Dir>.^.ObsolFonts." + f$
+
+SYS"OS_FSControl", 25, "<Boot$Dir>.Resources.!Fonts." + f$ + ".Outlines", "<Boot$Dir>.^.ObsolFonts." + f$ + ".Outlines"
+
+SYS"OS_File", 17, "<Boot$Dir>.Resources.!Fonts." + f$ + ".IntMetrics" TO t%
+IF t% <> 0 THEN
+ SYS"OS_FSControl", 25, "<Boot$Dir>.Resources.!Fonts." + f$ + ".IntMetrics", "<Boot$Dir>.^.ObsolFonts." + f$ + ".IntMetrics"
+ENDIF
+
+PRINT "done"
+ENDPROC
+
diff --git a/frontends/riscos/appdir/KickNS,ffb b/frontends/riscos/appdir/KickNS,ffb
new file mode 100644
index 000000000..bc209ad02
--- /dev/null
+++ b/frontends/riscos/appdir/KickNS,ffb
Binary files differ
diff --git a/frontends/riscos/appdir/OpenChoices,feb b/frontends/riscos/appdir/OpenChoices,feb
new file mode 100755
index 000000000..06ed7be01
--- /dev/null
+++ b/frontends/riscos/appdir/OpenChoices,feb
@@ -0,0 +1 @@
+*Filer_OpenDir Choices:WWW.NetSurf
diff --git a/frontends/riscos/appdir/OpenHelp,ffb b/frontends/riscos/appdir/OpenHelp,ffb
new file mode 100644
index 000000000..8928652da
--- /dev/null
+++ b/frontends/riscos/appdir/OpenHelp,ffb
Binary files differ
diff --git a/frontends/riscos/appdir/OpenScrap,feb b/frontends/riscos/appdir/OpenScrap,feb
new file mode 100755
index 000000000..e45854bcd
--- /dev/null
+++ b/frontends/riscos/appdir/OpenScrap,feb
@@ -0,0 +1 @@
+*Filer_OpenDir <Wimp$ScrapDir>.WWW.NetSurf
diff --git a/frontends/riscos/appdir/Resources/AdBlock,f79 b/frontends/riscos/appdir/Resources/AdBlock,f79
new file mode 120000
index 000000000..8f57c43fd
--- /dev/null
+++ b/frontends/riscos/appdir/Resources/AdBlock,f79
@@ -0,0 +1 @@
+../../../../resources/adblock.css \ No newline at end of file
diff --git a/frontends/riscos/appdir/Resources/Aletheia,ffd b/frontends/riscos/appdir/Resources/Aletheia,ffd
new file mode 100644
index 000000000..8eb1773da
--- /dev/null
+++ b/frontends/riscos/appdir/Resources/Aletheia,ffd
Binary files differ
diff --git a/frontends/riscos/appdir/Resources/CSS,f79 b/frontends/riscos/appdir/Resources/CSS,f79
new file mode 120000
index 000000000..3238d9188
--- /dev/null
+++ b/frontends/riscos/appdir/Resources/CSS,f79
@@ -0,0 +1 @@
+../../../../resources/default.css \ No newline at end of file
diff --git a/frontends/riscos/appdir/Resources/Fonts/NSSymbol/Encoding b/frontends/riscos/appdir/Resources/Fonts/NSSymbol/Encoding
new file mode 100644
index 000000000..c92dad17a
--- /dev/null
+++ b/frontends/riscos/appdir/Resources/Fonts/NSSymbol/Encoding
@@ -0,0 +1,39 @@
+% Encoding vector for NSSymbol
+
+% Codes 0-31
+/.notdef
+/.notdef
+/.notdef
+/.notdef
+/.notdef
+/.notdef
+/.notdef
+/.notdef
+/.notdef
+/.notdef
+/.notdef
+/.notdef
+/.notdef
+/.notdef
+/.notdef
+/.notdef
+/.notdef
+/.notdef
+/.notdef
+/.notdef
+/.notdef
+/.notdef
+/.notdef
+/.notdef
+/.notdef
+/.notdef
+/.notdef
+/.notdef
+/.notdef
+/.notdef
+/.notdef
+/.notdef
+
+% Codes 32-33
+/H18543
+/circle
diff --git a/frontends/riscos/appdir/Resources/Fonts/NSSymbol/IntMetrics,ff6 b/frontends/riscos/appdir/Resources/Fonts/NSSymbol/IntMetrics,ff6
new file mode 100644
index 000000000..4dcbc625d
--- /dev/null
+++ b/frontends/riscos/appdir/Resources/Fonts/NSSymbol/IntMetrics,ff6
Binary files differ
diff --git a/frontends/riscos/appdir/Resources/Fonts/NSSymbol/Outlines,ff6 b/frontends/riscos/appdir/Resources/Fonts/NSSymbol/Outlines,ff6
new file mode 100644
index 000000000..d2e624132
--- /dev/null
+++ b/frontends/riscos/appdir/Resources/Fonts/NSSymbol/Outlines,ff6
Binary files differ
diff --git a/frontends/riscos/appdir/Resources/Icons b/frontends/riscos/appdir/Resources/Icons
new file mode 120000
index 000000000..6820377bb
--- /dev/null
+++ b/frontends/riscos/appdir/Resources/Icons
@@ -0,0 +1 @@
+../../../../resources/icons \ No newline at end of file
diff --git a/frontends/riscos/appdir/Resources/Image,ff9 b/frontends/riscos/appdir/Resources/Image,ff9
new file mode 100755
index 000000000..a61ddefd2
--- /dev/null
+++ b/frontends/riscos/appdir/Resources/Image,ff9
Binary files differ
diff --git a/frontends/riscos/appdir/Resources/LangNames b/frontends/riscos/appdir/Resources/LangNames
new file mode 100644
index 000000000..de7c76c65
--- /dev/null
+++ b/frontends/riscos/appdir/Resources/LangNames
@@ -0,0 +1,52 @@
+# Language names file for NetSurf
+#
+# IMPORTANT! - If you add/remove a language from this file, the
+# languages menu definition in menus.c _must_ be updated correspondingly.
+#
+lang_af:Afrikaans
+lang_bm:Bamanankan
+lang_ca:Català
+lang_cs:Cestina
+lang_cy:Cymraeg
+lang_da:Dansk
+lang_de:Deutsch
+lang_en:English
+lang_es:Español
+lang_et:Eesti
+lang_eu:euskera
+lang_ff:Fulfulde
+lang_fi:suomi
+lang_fr:français
+lang_ga:Gaeilge
+lang_gl:Galego
+lang_ha:Hausa
+lang_hr:Hrvatski
+lang_hu:Magyar
+lang_id:Bahasa indonesia
+lang_is:íslenska
+lang_it:italiano
+lang_lt:Lietuviskai
+lang_lv:Latviesu
+lang_ms:Bahasa melayu
+lang_mt:Malti
+lang_nl:Nederlands
+lang_no:Norsk
+lang_pl:Polski
+lang_pt:português
+lang_rn:Kirundi
+lang_ro:Româna
+lang_rw:Kinyarwanda
+lang_sk:Slovencina
+lang_sl:Slovenscina
+lang_so:Somali
+lang_sq:shqip
+lang_sr:Srpski
+lang_sv:svenska
+lang_sw:Kiswahili
+lang_tr:Türkçe
+lang_uz:o'zbek
+lang_vi:Tiêng Viêêt
+lang_wo:Wolof
+lang_xs:isiXhosa
+lang_yo:Yorùbá
+lang_zu:isiZulu
diff --git a/frontends/riscos/appdir/Resources/Quirks,f79 b/frontends/riscos/appdir/Resources/Quirks,f79
new file mode 120000
index 000000000..995fafc61
--- /dev/null
+++ b/frontends/riscos/appdir/Resources/Quirks,f79
@@ -0,0 +1 @@
+../../../../resources/quirks.css \ No newline at end of file
diff --git a/frontends/riscos/appdir/Resources/SearchEngines b/frontends/riscos/appdir/Resources/SearchEngines
new file mode 100644
index 000000000..1e4530f06
--- /dev/null
+++ b/frontends/riscos/appdir/Resources/SearchEngines
@@ -0,0 +1,21 @@
+Google|www.google.com|https://www.google.com/search?q=%s|https://www.google.com/favicon.ico|
+Yahoo|search.yahoo.com|https://search.yahoo.com/search?p=%s|https://www.yahoo.com/favicon.ico|
+Bing|www.bing.com|https://www.bing.com/search?q=%s|https://www.bing.com/favicon.ico|
+Business.com|www.business.com|https://www.business.com/search/rslt_default.asp?query=%s|https://www.business.com/favicon.ico|
+Omgili|www.omgili.com|https://www.omgili.com/AAAAA/%s.html|https://www.omgili.com/favicon.ico|
+BBC News|search.bbc.co.uk|https://search.bbc.co.uk/search?q=%s&tab=ns|https://news.bbc.co.uk/favicon.ico|
+Ubuntu Packages|packages.ubuntu.com|https://packages.ubuntu.com/search?keywords=%s|https://packages.ubuntu.com/favicon.ico|
+Creative Commons|creativecommons.org|https://creativecommons.org/?s=%s|https://creativecommons.org/favicon.ico|
+Ask.com|www.ask.com|https://www.ask.com/web?q=%s|https://www.ask.com/favicon.ico|
+Answers.com|www.answers.com|https://www.answers.com/%s|https://www.answers.com/favicon.ico|
+Dictionary.com|dictionary.reference.com|https://dictionary.reference.com/browse/%s?jss=0|https://dictionary.reference.com/favicon.ico|
+Youtube|www.youtube.com|https://www.youtube.com/results?search_query=%s|https://www.youtube.com/favicon.ico|
+AeroMp3|www.aeromp3.com|https://www.aeromp3.com/search?q=%s|https://www.aeromp3.com/favicon.ico|
+AOL|search.aol.com|https://search.aol.com/aol/search?query=%s|https://www.aol.com/favicon.ico|
+Baidu|www.baidu.com|https://www.baidu.com/s?wd=%s|https://www.baidu.com/favicon.ico|
+Amazon|www.amazon.com|https://www.amazon.com/s/ref=nb_ss_gw?field-keywords=%s|https://www.amazon.com/favicon.ico|
+Ebay|shop.ebay.com|https://shop.ebay.com/items/%s|https://www.ebay.com/favicon.ico|
+IMDB|www.imdb.com|https://www.imdb.com/find?q=%s|https://www.imdb.com/favicon.ico|
+ESPN|search.espn.go.com|https://search.espn.go.com/%s/|https://www.espn.go.com/favicon.ico|
+Wikipedia|en.wikipedia.org|https://en.wikipedia.org/w/index.php?title=Special%%3ASearch&search=%s|https://en.wikipedia.org/favicon.ico|
+DuckDuckGo|www.duckduckgo.com|https://www.duckduckgo.com/?q=%s|https://www.duckduckgo.com/favicon.ico|
diff --git a/frontends/riscos/appdir/Resources/Sprites,ff9 b/frontends/riscos/appdir/Resources/Sprites,ff9
new file mode 100755
index 000000000..bdbd6e877
--- /dev/null
+++ b/frontends/riscos/appdir/Resources/Sprites,ff9
Binary files differ
diff --git a/frontends/riscos/appdir/Resources/ca-bundle b/frontends/riscos/appdir/Resources/ca-bundle
new file mode 120000
index 000000000..2d99c7508
--- /dev/null
+++ b/frontends/riscos/appdir/Resources/ca-bundle
@@ -0,0 +1 @@
+../../../../resources/ca-bundle \ No newline at end of file
diff --git a/frontends/riscos/appdir/Resources/de/Messages b/frontends/riscos/appdir/Resources/de/Messages
new file mode 120000
index 000000000..aa4060685
--- /dev/null
+++ b/frontends/riscos/appdir/Resources/de/Messages
@@ -0,0 +1 @@
+../../../../../resources/de/Messages \ No newline at end of file
diff --git a/frontends/riscos/appdir/Resources/de/welcome.html,faf b/frontends/riscos/appdir/Resources/de/welcome.html,faf
new file mode 120000
index 000000000..d3cfb115d
--- /dev/null
+++ b/frontends/riscos/appdir/Resources/de/welcome.html,faf
@@ -0,0 +1 @@
+../../../../../resources/de/welcome.html \ No newline at end of file
diff --git a/frontends/riscos/appdir/Resources/en/!Help b/frontends/riscos/appdir/Resources/en/!Help
new file mode 100644
index 000000000..bba2b2a72
--- /dev/null
+++ b/frontends/riscos/appdir/Resources/en/!Help
@@ -0,0 +1,14 @@
+NetSurf - Open Source web browser - https://www.netsurf-browser.org/
+
+To view the full documentation, start NetSurf and choose "Help..." from the
+icon bar menu.
+
+This is a development build of NetSurf. In case of problems, please check
+for a newer development build at https://www.netsurf-browser.org/
+
+Please report any unexpected behaviour on the NetSurf bug tracker.
+This may be found at https://bugs.netsurf-browser.org/
+
+
+Alternatively, the developers are often available on libera.chat in the
+channel #netsurf.
diff --git a/frontends/riscos/appdir/Resources/en/Messages b/frontends/riscos/appdir/Resources/en/Messages
new file mode 120000
index 000000000..56c2ae237
--- /dev/null
+++ b/frontends/riscos/appdir/Resources/en/Messages
@@ -0,0 +1 @@
+../../../../../resources/en/Messages \ No newline at end of file
diff --git a/frontends/riscos/appdir/Resources/en/credits.html,faf b/frontends/riscos/appdir/Resources/en/credits.html,faf
new file mode 120000
index 000000000..7999c6c56
--- /dev/null
+++ b/frontends/riscos/appdir/Resources/en/credits.html,faf
@@ -0,0 +1 @@
+../../../../../resources/en/credits.html \ No newline at end of file
diff --git a/frontends/riscos/appdir/Resources/en/licence.html,faf b/frontends/riscos/appdir/Resources/en/licence.html,faf
new file mode 120000
index 000000000..70371ada8
--- /dev/null
+++ b/frontends/riscos/appdir/Resources/en/licence.html,faf
@@ -0,0 +1 @@
+../../../../../resources/en/licence.html \ No newline at end of file
diff --git a/frontends/riscos/appdir/Resources/en/welcome.html,faf b/frontends/riscos/appdir/Resources/en/welcome.html,faf
new file mode 120000
index 000000000..71020bfe8
--- /dev/null
+++ b/frontends/riscos/appdir/Resources/en/welcome.html,faf
@@ -0,0 +1 @@
+../../../../../resources/en/welcome.html \ No newline at end of file
diff --git a/frontends/riscos/appdir/Resources/fr/Messages b/frontends/riscos/appdir/Resources/fr/Messages
new file mode 120000
index 000000000..4c321aefd
--- /dev/null
+++ b/frontends/riscos/appdir/Resources/fr/Messages
@@ -0,0 +1 @@
+../../../../../resources/fr/Messages \ No newline at end of file
diff --git a/frontends/riscos/appdir/Resources/internal.css,f79 b/frontends/riscos/appdir/Resources/internal.css,f79
new file mode 120000
index 000000000..c807a4d3d
--- /dev/null
+++ b/frontends/riscos/appdir/Resources/internal.css,f79
@@ -0,0 +1 @@
+../../../../resources/internal.css \ No newline at end of file
diff --git a/frontends/riscos/appdir/Resources/it/Messages b/frontends/riscos/appdir/Resources/it/Messages
new file mode 120000
index 000000000..7dc2ae2b1
--- /dev/null
+++ b/frontends/riscos/appdir/Resources/it/Messages
@@ -0,0 +1 @@
+../../../../../resources/it/Messages \ No newline at end of file
diff --git a/frontends/riscos/appdir/Resources/it/credits.html,faf b/frontends/riscos/appdir/Resources/it/credits.html,faf
new file mode 120000
index 000000000..e0bd9a23f
--- /dev/null
+++ b/frontends/riscos/appdir/Resources/it/credits.html,faf
@@ -0,0 +1 @@
+../../../../../resources/it/credits.html \ No newline at end of file
diff --git a/frontends/riscos/appdir/Resources/it/licence.html,faf b/frontends/riscos/appdir/Resources/it/licence.html,faf
new file mode 120000
index 000000000..7e8c83571
--- /dev/null
+++ b/frontends/riscos/appdir/Resources/it/licence.html,faf
@@ -0,0 +1 @@
+../../../../../resources/it/licence.html \ No newline at end of file
diff --git a/frontends/riscos/appdir/Resources/it/welcome.html,faf b/frontends/riscos/appdir/Resources/it/welcome.html,faf
new file mode 120000
index 000000000..6e24135ff
--- /dev/null
+++ b/frontends/riscos/appdir/Resources/it/welcome.html,faf
@@ -0,0 +1 @@
+../../../../../resources/it/welcome.html \ No newline at end of file
diff --git a/frontends/riscos/appdir/Resources/ja/welcome.html,faf b/frontends/riscos/appdir/Resources/ja/welcome.html,faf
new file mode 120000
index 000000000..1dfdbd7ea
--- /dev/null
+++ b/frontends/riscos/appdir/Resources/ja/welcome.html,faf
@@ -0,0 +1 @@
+../../../../../resources/ja/welcome.html \ No newline at end of file
diff --git a/frontends/riscos/appdir/Resources/netsurf.png,b60 b/frontends/riscos/appdir/Resources/netsurf.png,b60
new file mode 120000
index 000000000..e7fa4cb87
--- /dev/null
+++ b/frontends/riscos/appdir/Resources/netsurf.png,b60
@@ -0,0 +1 @@
+../../../../resources/netsurf.png \ No newline at end of file
diff --git a/frontends/riscos/appdir/Resources/nl/!Help b/frontends/riscos/appdir/Resources/nl/!Help
new file mode 100644
index 000000000..8a68e94f9
--- /dev/null
+++ b/frontends/riscos/appdir/Resources/nl/!Help
@@ -0,0 +1,15 @@
+NetSurf - Webbrowser (met open broncode) - https://www.netsurf-browser.org/
+
+Om alle documentatie te kunnen raadplegen: start NetSurf en kies "Help..."
+vanuit het symbolenbalkmenu.
+
+Dit is een ontwikkelversie van NetSurf. Bij problemen: kijk eerst of er een
+nieuwere versie is op https://www.netsurf-browser.org/
+
+Gelieve ook elk onverwacht gedrag van NetSurf, in het Engels te melden via
+onze 'bug tracker' op https://bugs.netsurf-browser.org/
+
+
+Een alternatief is libera.chat op het kanaal #netsurf waar de ontwikkelaars
+vaak bereikbaar zijn.
+
diff --git a/frontends/riscos/appdir/Resources/nl/Messages b/frontends/riscos/appdir/Resources/nl/Messages
new file mode 120000
index 000000000..20acc40f2
--- /dev/null
+++ b/frontends/riscos/appdir/Resources/nl/Messages
@@ -0,0 +1 @@
+../../../../../resources/nl/Messages \ No newline at end of file
diff --git a/frontends/riscos/appdir/Resources/nl/credits.html,faf b/frontends/riscos/appdir/Resources/nl/credits.html,faf
new file mode 120000
index 000000000..2380aa33c
--- /dev/null
+++ b/frontends/riscos/appdir/Resources/nl/credits.html,faf
@@ -0,0 +1 @@
+../../../../../resources/nl/credits.html \ No newline at end of file
diff --git a/frontends/riscos/appdir/Resources/nl/licence.html,faf b/frontends/riscos/appdir/Resources/nl/licence.html,faf
new file mode 120000
index 000000000..46804ce86
--- /dev/null
+++ b/frontends/riscos/appdir/Resources/nl/licence.html,faf
@@ -0,0 +1 @@
+../../../../../resources/nl/licence.html \ No newline at end of file
diff --git a/frontends/riscos/appdir/Resources/nl/welcome.html,faf b/frontends/riscos/appdir/Resources/nl/welcome.html,faf
new file mode 120000
index 000000000..6de5c4a73
--- /dev/null
+++ b/frontends/riscos/appdir/Resources/nl/welcome.html,faf
@@ -0,0 +1 @@
+../../../../../resources/nl/welcome.html \ No newline at end of file
diff --git a/frontends/riscos/bitmap.c b/frontends/riscos/bitmap.c
index d554d54b4..97dce6acc 100644
--- a/frontends/riscos/bitmap.c
+++ b/frontends/riscos/bitmap.c
@@ -44,7 +44,6 @@
#include "utils/log.h"
#include "utils/messages.h"
#include "netsurf/plotters.h"
-#include "netsurf/bitmap.h"
#include "netsurf/content.h"
#include "riscos/gui.h"
@@ -91,7 +90,7 @@ static bool bitmap_initialise(struct bitmap *bitmap)
assert(!bitmap->sprite_area);
area_size = 16 + 44 + bitmap->width * bitmap->height * 4;
- if (bitmap->state & BITMAP_CLEAR_MEMORY)
+ if (bitmap->clear)
bitmap->sprite_area = calloc(1, area_size);
else
bitmap->sprite_area = malloc(area_size);
@@ -123,7 +122,7 @@ static bool bitmap_initialise(struct bitmap *bitmap)
/* exported interface documented in riscos/bitmap.h */
-void *riscos_bitmap_create(int width, int height, unsigned int state)
+void *riscos_bitmap_create(int width, int height, enum gui_bitmap_flags flags)
{
struct bitmap *bitmap;
@@ -135,7 +134,8 @@ void *riscos_bitmap_create(int width, int height, unsigned int state)
return NULL;
bitmap->width = width;
bitmap->height = height;
- bitmap->state = state;
+ bitmap->opaque = (flags & BITMAP_OPAQUE) == BITMAP_OPAQUE;
+ bitmap->clear = (flags & BITMAP_CLEAR) == BITMAP_CLEAR;
return bitmap;
}
@@ -172,10 +172,7 @@ static void bitmap_set_opaque(void *vbitmap, bool opaque)
struct bitmap *bitmap = (struct bitmap *) vbitmap;
assert(bitmap);
- if (opaque)
- bitmap->state |= BITMAP_OPAQUE;
- else
- bitmap->state &= ~BITMAP_OPAQUE;
+ bitmap->opaque = opaque;
}
@@ -192,61 +189,12 @@ static size_t bitmap_get_rowstride(void *vbitmap)
}
-/**
- * Tests whether a bitmap has an opaque alpha channel
- *
- * \param vbitmap a bitmap, as returned by bitmap_create()
- * \return whether the bitmap is opaque
- */
-static bool bitmap_test_opaque(void *vbitmap)
-{
- struct bitmap *bitmap = (struct bitmap *) vbitmap;
- unsigned char *sprite;
- unsigned int width, height, size;
- osspriteop_header *sprite_header;
- unsigned *p, *ep;
-
- assert(bitmap);
-
- sprite = riscos_bitmap_get_buffer(bitmap);
- if (!sprite)
- return false;
-
- width = bitmap_get_rowstride(bitmap);
-
- sprite_header = (osspriteop_header *) (bitmap->sprite_area + 1);
-
- height = (sprite_header->height + 1);
-
- size = width * height;
-
- p = (void *) sprite;
-
- ep = (void *) (sprite + (size & ~31));
- while (p < ep) {
- /* \todo prefetch(p, 128)? */
- if (((p[0] & p[1] & p[2] & p[3] & p[4] & p[5] & p[6] & p[7])
- & 0xff000000U) != 0xff000000U)
- return false;
- p += 8;
- }
-
- ep = (void *) (sprite + size);
- while (p < ep) {
- if ((*p & 0xff000000U) != 0xff000000U) return false;
- p++;
- }
-
- return true;
-}
-
-
/* exported interface documented in riscos/bitmap.h */
bool riscos_bitmap_get_opaque(void *vbitmap)
{
struct bitmap *bitmap = (struct bitmap *) vbitmap;
assert(bitmap);
- return (bitmap->state & BITMAP_OPAQUE);
+ return bitmap->opaque;
}
@@ -449,8 +397,7 @@ bool riscos_bitmap_save(void *vbitmap, const char *path, unsigned flags)
*/
static void bitmap_modified(void *vbitmap)
{
- struct bitmap *bitmap = (struct bitmap *) vbitmap;
- bitmap->state |= BITMAP_MODIFIED;
+ (void)(vbitmap);
}
@@ -480,20 +427,6 @@ static int bitmap_get_height(void *vbitmap)
}
-/**
- * Find the bytes per pixel of a bitmap
- *
- * \param vbitmap a bitmap, as returned by bitmap_create()
- * \return bytes per pixel
- */
-static size_t bitmap_get_bpp(void *vbitmap)
-{
- struct bitmap *bitmap = (struct bitmap *)vbitmap;
- assert(bitmap);
- return 4;
-}
-
-
/* exported interface documented in riscos/bitmap.h */
void riscos_bitmap_overlay_sprite(struct bitmap *bitmap,
const osspriteop_header *s)
@@ -874,13 +807,10 @@ static struct gui_bitmap_table bitmap_table = {
.destroy = riscos_bitmap_destroy,
.set_opaque = bitmap_set_opaque,
.get_opaque = riscos_bitmap_get_opaque,
- .test_opaque = bitmap_test_opaque,
.get_buffer = riscos_bitmap_get_buffer,
.get_rowstride = bitmap_get_rowstride,
.get_width = bitmap_get_width,
.get_height = bitmap_get_height,
- .get_bpp = bitmap_get_bpp,
- .save = riscos_bitmap_save,
.modified = bitmap_modified,
.render = riscos_bitmap_render,
};
diff --git a/frontends/riscos/bitmap.h b/frontends/riscos/bitmap.h
index 3aca30de6..628ec4b7a 100644
--- a/frontends/riscos/bitmap.h
+++ b/frontends/riscos/bitmap.h
@@ -19,13 +19,15 @@
#ifndef _NETSURF_RISCOS_BITMAP_H_
#define _NETSURF_RISCOS_BITMAP_H_
+#include "netsurf/bitmap.h"
+
struct osspriteop_area;
struct osspriteop_header;
struct hlcache_handle;
struct bitmap;
/** bitmap operations table */
-struct gui_bitmap_table *riscos_bitmap_table;
+extern struct gui_bitmap_table *riscos_bitmap_table;
/** save with full alpha channel (if not opaque) */
#define BITMAP_SAVE_FULL_ALPHA (1 << 0)
@@ -37,7 +39,8 @@ struct bitmap {
int width; /**< width of bitmap */
int height; /**< height of bitmap */
- unsigned int state; /**< The bitmap attributes (opaque/dirty etc.) */
+ bool opaque; /**< Whether the bitmap is opaque. */
+ bool clear; /**< Whether the bitmap should be initialised to zeros. */
struct osspriteop_area *sprite_area; /**< Uncompressed data, or NULL */
};
@@ -71,11 +74,11 @@ void riscos_bitmap_overlay_sprite(struct bitmap *bitmap, const struct osspriteop
* Create a bitmap.
*
* \param width width of image in pixels
- * \param height width of image in pixels
- * \param state the state to create the bitmap in.
+ * \param height height of image in pixels
+ * \param flags flags for bitmap creation.
* \return an opaque struct bitmap, or NULL on memory exhaustion
*/
-void *riscos_bitmap_create(int width, int height, unsigned int state);
+void *riscos_bitmap_create(int width, int height, enum gui_bitmap_flags flags);
/**
* Free a bitmap.
diff --git a/frontends/riscos/buffer.c b/frontends/riscos/buffer.c
index c63a270db..9c8f8fe11 100644
--- a/frontends/riscos/buffer.c
+++ b/frontends/riscos/buffer.c
@@ -81,7 +81,7 @@ static os_mode mode;
*
* \param redraw the current WIMP redraw area to buffer
*/
-void ro_gui_buffer_open(wimp_draw *redraw)
+void ro_gui_buffer_open(const wimp_draw *redraw)
{
int size;
int total_size;
diff --git a/frontends/riscos/buffer.h b/frontends/riscos/buffer.h
index a683c324c..7de0ecdc6 100644
--- a/frontends/riscos/buffer.h
+++ b/frontends/riscos/buffer.h
@@ -25,7 +25,7 @@
#include "oslib/wimp.h"
-void ro_gui_buffer_open(wimp_draw *redraw);
+void ro_gui_buffer_open(const wimp_draw *redraw);
void ro_gui_buffer_close(void);
#endif
diff --git a/frontends/riscos/configure/con_content.c b/frontends/riscos/configure/con_content.c
index 50bbd15ef..bdf147bd4 100644
--- a/frontends/riscos/configure/con_content.c
+++ b/frontends/riscos/configure/con_content.c
@@ -30,7 +30,7 @@
#define CONTENT_BLOCK_ADVERTISEMENTS 2
#define CONTENT_BLOCK_POPUPS 3
-#define CONTENT_NO_PLUGINS 4
+#define CONTENT_BLOCK_CSS 4
#define CONTENT_TARGET_BLANK 7
#define CONTENT_DEFAULT_BUTTON 8
#define CONTENT_CANCEL_BUTTON 9
@@ -47,8 +47,8 @@ bool ro_gui_options_content_initialise(wimp_w w)
nsoption_bool(block_advertisements));
ro_gui_set_icon_selected_state(w, CONTENT_BLOCK_POPUPS,
nsoption_bool(block_popups));
- ro_gui_set_icon_selected_state(w, CONTENT_NO_PLUGINS,
- nsoption_bool(no_plugins));
+ ro_gui_set_icon_selected_state(w, CONTENT_BLOCK_CSS,
+ !nsoption_bool(author_level_css));
ro_gui_set_icon_selected_state(w, CONTENT_TARGET_BLANK,
nsoption_bool(target_blank));
ro_gui_set_icon_selected_state(w, CONTENT_NO_JAVASCRIPT,
@@ -57,7 +57,7 @@ bool ro_gui_options_content_initialise(wimp_w w)
/* initialise all functions for a newly created window */
ro_gui_wimp_event_register_checkbox(w, CONTENT_BLOCK_ADVERTISEMENTS);
ro_gui_wimp_event_register_checkbox(w, CONTENT_BLOCK_POPUPS);
- ro_gui_wimp_event_register_checkbox(w, CONTENT_NO_PLUGINS);
+ ro_gui_wimp_event_register_checkbox(w, CONTENT_BLOCK_CSS);
ro_gui_wimp_event_register_checkbox(w, CONTENT_TARGET_BLANK);
ro_gui_wimp_event_register_checkbox(w, CONTENT_NO_JAVASCRIPT);
ro_gui_wimp_event_register_button(w, CONTENT_DEFAULT_BUTTON,
@@ -78,7 +78,7 @@ void ro_gui_options_content_default(wimp_pointer *pointer)
false);
ro_gui_set_icon_selected_state(pointer->w, CONTENT_BLOCK_POPUPS,
false);
- ro_gui_set_icon_selected_state(pointer->w, CONTENT_NO_PLUGINS,
+ ro_gui_set_icon_selected_state(pointer->w, CONTENT_BLOCK_CSS,
false);
ro_gui_set_icon_selected_state(pointer->w, CONTENT_TARGET_BLANK,
true);
@@ -93,8 +93,8 @@ bool ro_gui_options_content_ok(wimp_w w)
nsoption_set_bool(block_popups,
ro_gui_get_icon_selected_state(w, CONTENT_BLOCK_POPUPS));
- nsoption_set_bool(no_plugins,
- ro_gui_get_icon_selected_state(w, CONTENT_NO_PLUGINS));
+ nsoption_set_bool(author_level_css,
+ !ro_gui_get_icon_selected_state(w, CONTENT_BLOCK_CSS));
nsoption_set_bool(target_blank,
ro_gui_get_icon_selected_state(w, CONTENT_TARGET_BLANK));
diff --git a/frontends/riscos/configure/con_image.c b/frontends/riscos/configure/con_image.c
index c7fc7f314..d81dc5c3b 100644
--- a/frontends/riscos/configure/con_image.c
+++ b/frontends/riscos/configure/con_image.c
@@ -23,6 +23,7 @@
#include "utils/nsoption.h"
#include "utils/log.h"
+#include "utils/utils.h"
#include "riscos/gui.h"
#include "riscos/configure/configure.h"
@@ -38,15 +39,10 @@
#define IMAGE_BACKGROUND_FIELD 6
#define IMAGE_BACKGROUND_MENU 7
#define IMAGE_CURRENT_DISPLAY 8
-#define IMAGE_SPEED_TEXT 11
-#define IMAGE_SPEED_FIELD 12
-#define IMAGE_SPEED_DEC 13
-#define IMAGE_SPEED_INC 14
-#define IMAGE_SPEED_CS 15
-#define IMAGE_DISABLE_ANIMATION 16
-#define IMAGE_DEFAULT_BUTTON 17
-#define IMAGE_CANCEL_BUTTON 18
-#define IMAGE_OK_BUTTON 19
+#define IMAGE_DISABLE_ANIMATION 11
+#define IMAGE_DEFAULT_BUTTON 12
+#define IMAGE_CANCEL_BUTTON 13
+#define IMAGE_OK_BUTTON 14
static bool ro_gui_options_image_click(wimp_pointer *pointer);
static bool ro_gui_options_image_ok(wimp_w w);
@@ -88,8 +84,6 @@ bool ro_gui_options_image_initialise(wimp_w w)
image_quality_menu->entries[i].
data.indirected_text.text, true);
}
- ro_gui_set_icon_decimal(w, IMAGE_SPEED_FIELD,
- nsoption_int(minimum_gif_delay), 2);
ro_gui_set_icon_selected_state(w, IMAGE_DISABLE_ANIMATION,
!nsoption_bool(animate_images));
ro_gui_options_update_shading(w);
@@ -99,11 +93,7 @@ bool ro_gui_options_image_initialise(wimp_w w)
IMAGE_FOREGROUND_MENU, image_quality_menu);
ro_gui_wimp_event_register_menu_gright(w, IMAGE_BACKGROUND_FIELD,
IMAGE_BACKGROUND_MENU, image_quality_menu);
- ro_gui_wimp_event_register_text_field(w, IMAGE_SPEED_TEXT);
- ro_gui_wimp_event_register_numeric_field(w, IMAGE_SPEED_FIELD,
- IMAGE_SPEED_INC, IMAGE_SPEED_DEC, 0, 6000, 10, 2);
ro_gui_wimp_event_register_checkbox(w, IMAGE_DISABLE_ANIMATION);
- ro_gui_wimp_event_register_text_field(w, IMAGE_SPEED_CS);
ro_gui_wimp_event_register_redraw_window(w,
ro_gui_options_image_redraw);
ro_gui_wimp_event_register_mouse_click(w,
@@ -218,10 +208,9 @@ bool ro_gui_options_image_click(wimp_pointer *pointer)
IMAGE_BACKGROUND_FIELD,
image_quality_menu->entries[2].
data.indirected_text.text, true);
- ro_gui_set_icon_decimal(pointer->w, IMAGE_SPEED_FIELD,
- 10, 2);
ro_gui_set_icon_selected_state(pointer->w,
IMAGE_DISABLE_ANIMATION, false);
+ fallthrough;
case IMAGE_DISABLE_ANIMATION:
ro_gui_options_update_shading(pointer->w);
break;
@@ -245,11 +234,6 @@ void ro_gui_options_update_shading(wimp_w w)
bool shaded;
shaded = ro_gui_get_icon_selected_state(w, IMAGE_DISABLE_ANIMATION);
- ro_gui_set_icon_shaded_state(w, IMAGE_SPEED_TEXT, shaded);
- ro_gui_set_icon_shaded_state(w, IMAGE_SPEED_FIELD, shaded);
- ro_gui_set_icon_shaded_state(w, IMAGE_SPEED_DEC, shaded);
- ro_gui_set_icon_shaded_state(w, IMAGE_SPEED_INC, shaded);
- ro_gui_set_icon_shaded_state(w, IMAGE_SPEED_CS, shaded);
}
bool ro_gui_options_image_ok(wimp_w w)
@@ -258,9 +242,6 @@ bool ro_gui_options_image_ok(wimp_w w)
(unsigned int *)&nsoption_int(plot_bg_quality),
(unsigned int *)&nsoption_int(plot_fg_quality));
- nsoption_set_int(minimum_gif_delay,
- ro_gui_get_icon_decimal(w, IMAGE_SPEED_FIELD, 2));
-
nsoption_set_bool(animate_images,
!ro_gui_get_icon_selected_state(w,
IMAGE_DISABLE_ANIMATION));
diff --git a/frontends/riscos/content-handlers/artworks.c b/frontends/riscos/content-handlers/artworks.c
index 8ec4edcae..c107ec6b4 100644
--- a/frontends/riscos/content-handlers/artworks.c
+++ b/frontends/riscos/content-handlers/artworks.c
@@ -38,7 +38,9 @@
#include "utils/utils.h"
#include "netsurf/plotters.h"
#include "netsurf/content.h"
+#include "content/content.h"
#include "content/content_protected.h"
+#include "content/content_factory.h"
#include "content/llcache.h"
#include "riscos/content-handlers/artworks.h"
@@ -91,7 +93,7 @@ struct awinfo_block {
/* Assembler routines for interfacing with the ArtworksRenderer module */
extern os_error *awrender_init(const char **doc,
- unsigned long *doc_size,
+ size_t *doc_size,
void *routine,
void *workspace);
@@ -170,8 +172,8 @@ bool artworks_convert(struct content *c)
{
artworks_content *aw = (artworks_content *) c;
union content_msg_data msg_data;
- const char *source_data;
- unsigned long source_size;
+ const uint8_t *source_data;
+ size_t source_size;
void *init_workspace;
void *init_routine;
os_error *error;
@@ -184,7 +186,8 @@ bool artworks_convert(struct content *c)
&used, NULL, NULL);
if (used >= 0) {
NSLOG(netsurf, INFO, "Alias$LoadArtWorksModules not defined");
- msg_data.error = messages_get("AWNotSeen");
+ msg_data.errordata.errorcode = NSERROR_UNKNOWN;
+ msg_data.errordata.errormsg = messages_get("AWNotSeen");
content_broadcast(c, CONTENT_MSG_ERROR, &msg_data);
return false;
}
@@ -194,7 +197,8 @@ bool artworks_convert(struct content *c)
if (error) {
NSLOG(netsurf, INFO, "xos_cli: 0x%x: %s", error->errnum,
error->errmess);
- msg_data.error = error->errmess;
+ msg_data.errordata.errorcode = NSERROR_UNKNOWN;
+ msg_data.errordata.errormsg = error->errmess;
content_broadcast(c, CONTENT_MSG_ERROR, &msg_data);
return false;
}
@@ -205,7 +209,8 @@ bool artworks_convert(struct content *c)
if (error) {
NSLOG(netsurf, INFO, "AWRender_FileInitAddress: 0x%x: %s",
error->errnum, error->errmess);
- msg_data.error = error->errmess;
+ msg_data.errordata.errorcode = NSERROR_UNKNOWN;
+ msg_data.errordata.errormsg = error->errmess;
content_broadcast(c, CONTENT_MSG_ERROR, &msg_data);
return false;
}
@@ -216,7 +221,8 @@ bool artworks_convert(struct content *c)
if (error) {
NSLOG(netsurf, INFO, "AWRender_RenderAddress: 0x%x: %s",
error->errnum, error->errmess);
- msg_data.error = error->errmess;
+ msg_data.errordata.errorcode = NSERROR_UNKNOWN;
+ msg_data.errordata.errormsg = error->errmess;
content_broadcast(c, CONTENT_MSG_ERROR, &msg_data);
return false;
}
@@ -224,12 +230,13 @@ bool artworks_convert(struct content *c)
source_data = content__get_source_data(c, &source_size);
/* initialise (convert file to new format if required) */
- error = awrender_init(&source_data, &source_size,
+ error = awrender_init((const char **)&source_data, &source_size,
init_routine, init_workspace);
if (error) {
NSLOG(netsurf, INFO, "awrender_init: 0x%x : %s",
error->errnum, error->errmess);
- msg_data.error = error->errmess;
+ msg_data.errordata.errorcode = NSERROR_UNKNOWN;
+ msg_data.errordata.errormsg = error->errmess;
content_broadcast(c, CONTENT_MSG_ERROR, &msg_data);
return false;
}
@@ -245,7 +252,8 @@ bool artworks_convert(struct content *c)
if (error) {
NSLOG(netsurf, INFO, "AWRender_DocBounds: 0x%x: %s",
error->errnum, error->errmess);
- msg_data.error = error->errmess;
+ msg_data.errordata.errorcode = NSERROR_UNKNOWN;
+ msg_data.errordata.errormsg = error->errmess;
content_broadcast(c, CONTENT_MSG_ERROR, &msg_data);
return false;
}
@@ -261,7 +269,8 @@ bool artworks_convert(struct content *c)
if (!aw->block) {
NSLOG(netsurf, INFO,
"failed to create block for ArtworksRenderer");
- msg_data.error = messages_get("NoMemory");
+ msg_data.errordata.errorcode = NSERROR_NOMEM;
+ msg_data.errordata.errormsg = messages_get("NoMemory");
content_broadcast(c, CONTENT_MSG_ERROR, &msg_data);
return false;
}
@@ -313,8 +322,8 @@ bool artworks_redraw(struct content *c, struct content_redraw_data *data,
};
artworks_content *aw = (artworks_content *) c;
struct awinfo_block info;
- const char *source_data;
- unsigned long source_size;
+ const uint8_t *source_data;
+ size_t source_size;
os_error *error;
os_trfm matrix;
int vals[24];
@@ -389,17 +398,17 @@ bool artworks_redraw(struct content *c, struct content_redraw_data *data,
source_data = content__get_source_data(c, &source_size);
- error = awrender_render(source_data,
- &info,
- &matrix,
- vals,
- &aw->block,
- &aw->size,
- 110, /* fully anti-aliased */
- 0,
- source_size,
- aw->render_routine,
- aw->render_workspace);
+ error = awrender_render((const char *)source_data,
+ &info,
+ &matrix,
+ vals,
+ &aw->block,
+ &aw->size,
+ 110, /* fully anti-aliased */
+ 0,
+ source_size,
+ aw->render_routine,
+ aw->render_workspace);
if (error) {
NSLOG(netsurf, INFO, "awrender_render: 0x%x: %s",
diff --git a/frontends/riscos/content-handlers/awrender.s b/frontends/riscos/content-handlers/awrender.s
index 5bcafe520..fe37f66fb 100644
--- a/frontends/riscos/content-handlers/awrender.s
+++ b/frontends/riscos/content-handlers/awrender.s
@@ -209,12 +209,18 @@ errblk % 256
@ os_error *awrender_init(byte **doc, size_t *doc_size, void *init_routine, void *init_workspace);
.global awrender_init
-awrender_init: MOV ip,sp
+awrender_init:
+#ifndef __ARM_EABI__
+ MOV ip,sp
STMFD sp!,{a1,a2,v1,v2,fp,ip,lr,pc}
SUB fp,ip,#4
SUB ip,sp,#512
CMP ip,sl
BLMI __rt_stkovf_split_big
+#else
+ STMFD sp!,{a1,a2,v1,v2,fp,lr}
+ ADD fp,sp,#4*4
+#endif
LDR v2,=aw_temp
LDR a1,[a1]
@@ -235,14 +241,18 @@ awrender_init: MOV ip,sp
@ return updated block ptr & size to caller
- LDR a2,[fp,#-28]
- LDR a3,[fp,#-24]
+ LDR a2,[sp],#4
+ LDR a3,[sp],#4
LDR ip,[v2,#aw_rsz_block]
LDR lr,[v2,#aw_rsz_size]
STR ip,[a2]
STR lr,[a3]
- LDMEA fp,{v1,v2,fp,sp,pc}
+#ifndef __ARM_EABI__
+ LDMDB fp,{v1,v2,fp,sp,pc}
+#else
+ LDMIA sp!,{v1,v2,fp,pc}
+#endif
@ os_error *awrender_render(const char *doc,
@@ -258,37 +268,46 @@ awrender_init: MOV ip,sp
@ void *workspace);
.global awrender_render
-awrender_render: MOV ip,sp
- STMFD sp!,{v1-v4,fp,ip,lr,pc}
+awrender_render:
+#ifndef __ARM_EABI__
+ MOV ip,sp
+ STMFD sp!,{v1-v6,fp,ip,lr,pc}
SUB fp,ip,#4
SUB ip,sp,#512
CMP ip,sl
BLMI __rt_stkovf_split_big
+ ADD ip,fp,#4 @ ip -> stacked args
+#else
+ MOV ip,sp @ ip -> stacked args
+ STMFD sp!,{v1-v6,fp,lr}
+ ADD fp,sp,#6*4
+#endif
- LDR R12,[fp,#20]
LDR R14,=aw_temp
- LDR R5,[fp,#4]
- LDR R6,[fp,#12]
+ LDR R5,[ip,#0] @ rsz_block
+ LDR R6,[ip,#8] @ wysiwyg_setting
LDR R4,[R5] @ resizable block
- LDR R7,[fp,#16]
+ LDR R7,[ip,#12] @ output_dest
+ LDR R8,[ip,#16] @ doc_size
+ LDR R9,[ip,#4] @ rsz_size
STR R4,[R14,#aw_rsz_block]
STR R0,[R14,#aw_fixed_block] @ document ptr
- STR R12,[R14,#aw_fixed_size] @ document size
- LDR R12,[fp,#8]
+ STR R8,[R14,#aw_fixed_size] @ document size
STR R5,[sp,#-4]! @ ptr to receive block
- STR R12,[sp,#-4]! @ ptr to receive size
+ STR R9,[sp,#-4]! @ ptr to receive size
- LDR R12,[R12]
+ LDR R9,[R9]
ADR R5,aw_callback
- STR R12,[R14,#aw_rsz_size]
+ STR R9,[R14,#aw_rsz_size]
STR sl,[R14,#aw_sl]
STR fp,[R14,#aw_fp]
- LDR R12,[fp,#28]
+ LDR R8,[ip,#20] @ routine
+ LDR R12,[ip,#24] @ workspace
MOV lr,pc
- LDR pc,[fp,#24]
+ MOV pc,R8
MOVVC a1,#0
@ return updated block ptr & size to caller
@@ -301,7 +320,11 @@ awrender_render: MOV ip,sp
STR R5,[R12]
STR R6,[R4]
- LDMEA fp,{v1-v4,fp,sp,pc}
+#ifndef __ARM_EABI__
+ LDMDB fp,{v1-v6,fp,sp,pc}
+#else
+ LDMIA sp!,{v1-v6,fp,pc}
+#endif
@ Callback routine for block resizing
@@ -340,11 +363,18 @@ aw_callback: TEQ R11,#3
CMP R1,R2
BLS aw_read
- STMFD R13!,{R1,R10-R12,R14}
+ STMFD R13!,{R1,R4,R10-R12,R14}
+#ifdef __ARM_EABI__
+ MOV R4,R13 @ save original sp
+ BIC R13,R13,#7 @ align to multiple of 8
+#endif
LDR sl,[R11,#aw_sl]
LDR fp,[R11,#aw_fp]
BL realloc
- LDMFD R13!,{R1,R10-R12,R14}
+#ifdef __ARM_EABI__
+ MOV R13,R4 @ restore unaligned sp
+#endif
+ LDMFD R13!,{R1,R4,R10-R12,R14}
CMP R0,#0 @ did it work?
BEQ aw_nomem
@@ -359,7 +389,11 @@ aw_read: @ return details of fixed block
SUBS R11,R11,R11 @ clear V
MOV PC,R14
-aw_nomem: STMFD R13!,{R10,R12,R14}
+aw_nomem: STMFD R13!,{R4,R10,R12,R14}
+#ifdef __ARM_EABI__
+ MOV R4,R13 @ save original sp
+ BIC R13,R13,#7 @ align to multiple of 8
+#endif
LDR sl,[R11,#aw_sl]
LDR fp,[R11,#aw_fp]
ADR R0,tok_nomem
@@ -370,13 +404,17 @@ aw_nomem: STMFD R13!,{R10,R12,R14}
SUB R0,R0,#4 @ error number already 0
MOV R11,#0 @ restore reason code
CMP PC,#1<<31 @ set V
- LDMFD R13!,{R10,R12,PC}
+#ifdef __ARM_EABI__
+ MOV R13,R4 @ restore original sp
+#endif
+ LDMFD R13!,{R4,R10,R12,PC}
tok_nomem: .asciz "NoMemory"
.align
.bss
+ .align
aw_temp: .space sizeof_aw
.type aw_temp, %object
.size aw_temp, . - aw_temp
diff --git a/frontends/riscos/content-handlers/draw.c b/frontends/riscos/content-handlers/draw.c
index bb66f9dbb..522d5d3fe 100644
--- a/frontends/riscos/content-handlers/draw.c
+++ b/frontends/riscos/content-handlers/draw.c
@@ -35,7 +35,9 @@
#include "utils/utils.h"
#include "netsurf/plotters.h"
#include "netsurf/content.h"
+#include "content/content.h"
#include "content/content_protected.h"
+#include "content/content_factory.h"
#include "content/llcache.h"
#include "riscos/content-handlers/draw.h"
@@ -112,8 +114,8 @@ bool draw_convert(struct content *c)
{
draw_content *draw = (draw_content *) c;
union content_msg_data msg_data;
- const char *source_data;
- unsigned long source_size;
+ const uint8_t *source_data;
+ size_t source_size;
const void *data;
os_box bbox;
os_error *error;
@@ -128,7 +130,8 @@ bool draw_convert(struct content *c)
if (error) {
NSLOG(netsurf, INFO, "xdrawfile_bbox: 0x%x: %s",
error->errnum, error->errmess);
- msg_data.error = error->errmess;
+ msg_data.errordata.errorcode = NSERROR_UNKNOWN;
+ msg_data.errordata.errormsg = error->errmess;
content_broadcast(c, CONTENT_MSG_ERROR, &msg_data);
return false;
}
@@ -180,8 +183,8 @@ bool draw_redraw(struct content *c, struct content_redraw_data *data,
{
draw_content *draw = (draw_content *) c;
os_trfm matrix;
- const char *source_data;
- unsigned long source_size;
+ const uint8_t *source_data;
+ size_t source_size;
const void *src_data;
os_error *error;
diff --git a/frontends/riscos/content-handlers/sprite.c b/frontends/riscos/content-handlers/sprite.c
index 3556aa555..f6ab68451 100644
--- a/frontends/riscos/content-handlers/sprite.c
+++ b/frontends/riscos/content-handlers/sprite.c
@@ -16,7 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/** \file
+/**
+ * \file
* Content for image/x-riscos-sprite (RISC OS implementation).
*
* No conversion is necessary: we can render RISC OS sprites directly under
@@ -35,7 +36,9 @@
#include "netsurf/plotters.h"
#include "netsurf/content.h"
#include "content/llcache.h"
+#include "content/content.h"
#include "content/content_protected.h"
+#include "content/content_factory.h"
#include "riscos/gui.h"
#include "riscos/image.h"
@@ -112,8 +115,8 @@ bool sprite_convert(struct content *c)
os_error *error;
int w, h;
union content_msg_data msg_data;
- const char *source_data;
- unsigned long source_size;
+ const uint8_t *source_data;
+ size_t source_size;
const void *sprite_data;
char *title;
@@ -125,7 +128,8 @@ bool sprite_convert(struct content *c)
/* check for bad data */
if ((int)source_size + 4 != area->used) {
- msg_data.error = messages_get("BadSprite");
+ msg_data.errordata.errorcode = NSERROR_UNKNOWN;
+ msg_data.errordata.errormsg = messages_get("BadSprite");
content_broadcast(c, CONTENT_MSG_ERROR, &msg_data);
return false;
}
@@ -139,7 +143,8 @@ bool sprite_convert(struct content *c)
"xosspriteop_read_sprite_info: 0x%x: %s",
error->errnum,
error->errmess);
- msg_data.error = error->errmess;
+ msg_data.errordata.errorcode = NSERROR_UNKNOWN;
+ msg_data.errordata.errormsg = error->errmess;
content_broadcast(c, CONTENT_MSG_ERROR, &msg_data);
return false;
}
diff --git a/frontends/riscos/cookies.c b/frontends/riscos/cookies.c
index 125d04356..199699dba 100644
--- a/frontends/riscos/cookies.c
+++ b/frontends/riscos/cookies.c
@@ -342,6 +342,7 @@ cookie_menu_select(wimp_w w,
*/
static nserror ro_cookie_init(void)
{
+ os_error *error;
struct ro_cookie_window *ncwin;
nserror res;
static const struct ns_menu cookie_menu_def = {
@@ -383,7 +384,14 @@ static nserror ro_cookie_init(void)
}
/* create window from template */
- ncwin->core.wh = wimp_create_window(dialog_cookie_template);
+ error = xwimp_create_window(dialog_cookie_template, &ncwin->core.wh);
+ if (error) {
+ NSLOG(netsurf, INFO, "xwimp_create_window: 0x%x: %s",
+ error->errnum, error->errmess);
+ ro_warn_user("WimpError", error->errmess);
+ free(ncwin);
+ return NSERROR_NOMEM;
+ }
ro_gui_set_window_title(ncwin->core.wh, messages_get("Cookies"));
@@ -439,7 +447,7 @@ static nserror ro_cookie_init(void)
/* exported interface documented in riscos/cookies.h */
-nserror ro_gui_cookies_present(void)
+nserror ro_gui_cookies_present(const char *search_term)
{
nserror res;
@@ -449,6 +457,9 @@ nserror ro_gui_cookies_present(void)
ro_gui_dialog_open_top(cookie_window->core.wh,
cookie_window->core.toolbar,
600, 800);
+ if (search_term != NULL) {
+ res = cookie_manager_set_search_string(search_term);
+ }
} else {
NSLOG(netsurf, INFO, "Failed presenting code %d", res);
}
diff --git a/frontends/riscos/cookies.h b/frontends/riscos/cookies.h
index 1b07d2122..6a217903e 100644
--- a/frontends/riscos/cookies.h
+++ b/frontends/riscos/cookies.h
@@ -41,7 +41,7 @@ void ro_gui_cookies_initialise(void);
*
* \return NSERROR_OK on success else appropriate error code on faliure.
*/
-nserror ro_gui_cookies_present(void);
+nserror ro_gui_cookies_present(const char *search_term);
/**
* Free any resources allocated for the cookie window.
diff --git a/frontends/riscos/corewindow.c b/frontends/riscos/corewindow.c
index 84177aa90..88bb5c3ef 100644
--- a/frontends/riscos/corewindow.c
+++ b/frontends/riscos/corewindow.c
@@ -45,12 +45,15 @@
#include "riscos/window.h"
#include "riscos/toolbar.h"
#include "riscos/mouse.h"
+#include "riscos/wimputils.h"
#include "riscos/corewindow.h"
#ifndef wimp_KEY_END
#define wimp_KEY_END wimp_KEY_COPY
#endif
+static struct ro_corewindow *ro_cw_drag_cw;
+
/**
* Update a windows scrollbars.
*
@@ -119,10 +122,15 @@ static void ro_cw_redraw(wimp_draw *redraw)
origin_x = redraw->box.x0 - redraw->xscroll;
origin_y = redraw->box.y1 + ro_cw->origin_y - redraw->yscroll;
- r.x0 = (redraw->clip.x0 - origin_x) / 2;
- r.y0 = (origin_y - redraw->clip.y1) / 2;
- r.x1 = r.x0 + ((redraw->clip.x1 - redraw->clip.x0) / 2);
- r.y1 = r.y0 + ((redraw->clip.y1 - redraw->clip.y0) / 2);
+ ro_plot_clip_rect.x0 = redraw->clip.x0 - origin_x;
+ ro_plot_clip_rect.y0 = origin_y - redraw->clip.y0;
+ ro_plot_clip_rect.x1 = redraw->clip.x1 - origin_x;
+ ro_plot_clip_rect.y1 = origin_y - redraw->clip.y1;
+
+ r.x0 = (ro_plot_clip_rect.x0 ) / 2; /* left */
+ r.y0 = (ro_plot_clip_rect.y1 ) / 2; /* top */
+ r.x1 = (ro_plot_clip_rect.x1 + 1) / 2; /* right */
+ r.y1 = (ro_plot_clip_rect.y0 + 1) / 2; /* bottom */
/* call the draw callback */
ro_cw->draw(ro_cw, origin_x, origin_y, &r);
@@ -143,10 +151,24 @@ static void ro_cw_scroll(wimp_scroll *scroll)
int page_y;
struct ro_corewindow *ro_cw;
wimp_open open;
+ wimp_window_state state;
ro_cw = (struct ro_corewindow *)ro_gui_wimp_event_get_user_data(scroll->w);
NSLOG(netsurf, INFO, "RO corewindow context %p", ro_cw);
+ state.w = ro_cw->wh;
+ error = xwimp_get_window_state(&state);
+ if (error) {
+ NSLOG(netsurf, INFO, "xwimp_get_window_state: 0x%x: %s",
+ error->errnum, error->errmess);
+ return;
+ }
+
+ /* Don't try to update window if it's closed */
+ if (!(state.flags & wimp_WINDOW_OPEN)) {
+ return;
+ }
+
page_x = scroll->visible.x1 - scroll->visible.x0 - 32;
page_y = scroll->visible.y1 - scroll->visible.y0 - 32;
@@ -235,6 +257,11 @@ static void ro_cw_mouse_at(wimp_pointer *pointer, void *data)
(unsigned int)pointer->w);
return;
}
+ if (ro_cw != ro_cw_drag_cw) {
+ NSLOG(netsurf, DEEPDEBUG, "Called without drag window: %p",
+ ro_cw);
+ return;
+ }
NSLOG(netsurf, INFO, "RO corewindow context %p", ro_cw);
/* Not a Menu click. */
@@ -371,6 +398,7 @@ ro_cw_drag_start(struct ro_corewindow *ro_cw,
ro_warn_user("WimpError", error->errmess);
}
+ ro_cw_drag_cw = ro_cw;
ro_mouse_drag_start(ro_cw_drag_end, ro_cw_mouse_at, NULL, NULL);
}
}
@@ -791,7 +819,7 @@ ro_cw_invalidate(struct core_window *cw, const struct rect *r)
/**
* Callback from the core to update the content area size.
*/
-static void
+static nserror
ro_cw_update_size(struct core_window *cw, int width, int height)
{
struct ro_corewindow *ro_cw = (struct ro_corewindow *)cw;
@@ -810,7 +838,7 @@ ro_cw_update_size(struct core_window *cw, int width, int height)
if (error) {
NSLOG(netsurf, INFO, "xwimp_get_window_state: 0x%x: %s",
error->errnum, error->errmess);
- return;
+ return NSERROR_INVALID;
}
/* only update the window if it is open */
@@ -823,16 +851,63 @@ ro_cw_update_size(struct core_window *cw, int width, int height)
update_scrollbars(ro_cw, &open);
}
+ return NSERROR_OK;
}
/**
* Callback from the core to scroll the visible content.
*/
-static void
-ro_cw_scroll_visible(struct core_window *cw, const struct rect *r)
+static nserror
+ro_cw_get_scroll(const struct core_window *cw, int *x, int *y)
{
- //struct ro_corewindow *ro_cw = (struct ro_corewindow *)cw;
+ struct ro_corewindow *ro_cw = (struct ro_corewindow *)cw;
+ wimp_window_state state = {
+ .w = ro_cw->wh,
+ };
+ os_error *error;
+
+ error = xwimp_get_window_state(&state);
+ if (error) {
+ NSLOG(netsurf, ERROR, "xwimp_get_window_state: 0x%x: %s",
+ error->errnum, error->errmess);
+ return NSERROR_INVALID;
+ }
+
+ *x = state.xscroll / 2;
+ *y = -state.yscroll / 2;
+ return NSERROR_OK;
+}
+
+
+/**
+ * Callback from the core to scroll the visible content.
+ */
+static nserror
+ro_cw_set_scroll(struct core_window *cw, int x, int y)
+{
+ struct ro_corewindow *ro_cw = (struct ro_corewindow *)cw;
+ wimp_window_state state = {
+ .w = ro_cw->wh,
+ };
+ os_error *error;
+
+ error = xwimp_get_window_state(&state);
+ if (error) {
+ NSLOG(netsurf, ERROR, "xwimp_get_window_state: 0x%x: %s",
+ error->errnum, error->errmess);
+ return NSERROR_INVALID;
+ }
+
+ state.xscroll = x * 2;
+ state.yscroll = -y * 2;
+
+ /* only update the window if it is open */
+ if (state.flags & wimp_WINDOW_OPEN) {
+ update_scrollbars(ro_cw, PTR_WIMP_OPEN(&state));
+ }
+
+ return NSERROR_OK;
}
@@ -843,8 +918,9 @@ ro_cw_scroll_visible(struct core_window *cw, const struct rect *r)
* \param[out] width to be set to viewport width in px
* \param[out] height to be set to viewport height in px
*/
-static void
-ro_cw_get_window_dimensions(struct core_window *cw, int *width, int *height)
+static nserror
+ro_cw_get_window_dimensions(const struct core_window *cw,
+ int *width, int *height)
{
struct ro_corewindow *ro_cw = (struct ro_corewindow *)cw;
os_error *error;
@@ -855,29 +931,42 @@ ro_cw_get_window_dimensions(struct core_window *cw, int *width, int *height)
if (error) {
NSLOG(netsurf, INFO, "xwimp_get_window_state: 0x%x: %s",
error->errnum, error->errmess);
- return;
+ return NSERROR_INVALID;
}
*width = (state.visible.x1 - state.visible.x0) / 2;
*height = (state.visible.y1 - state.visible.y0) / 2;
+
+ /* Account for toolbar height, if present */
+ if (ro_cw->toolbar != NULL) {
+ *height -= ro_toolbar_full_height(ro_cw->toolbar) / 2;
+ }
+ if (*height < 0) {
+ *height = 0;
+ }
+
+ return NSERROR_OK;
}
/**
* Callback from the core to update the drag status.
*/
-static void
+static nserror
ro_cw_drag_status(struct core_window *cw, core_window_drag_status ds)
{
struct ro_corewindow *ro_cw = (struct ro_corewindow *)cw;
ro_cw->drag_status = ds;
+
+ return NSERROR_OK;
}
struct core_window_callback_table ro_cw_cb_table = {
.invalidate = ro_cw_invalidate,
.update_size = ro_cw_update_size,
- .scroll_visible = ro_cw_scroll_visible,
+ .set_scroll = ro_cw_set_scroll,
+ .get_scroll = ro_cw_get_scroll,
.get_window_dimensions = ro_cw_get_window_dimensions,
.drag_status = ro_cw_drag_status
};
@@ -965,6 +1054,8 @@ ro_corewindow_init(struct ro_corewindow *ro_cw,
}
/* setup context for event handlers */
+ NSLOG(netsurf, INFO, "Setting corewindow %p for window handle %p",
+ ro_cw, ro_cw->wh);
ro_gui_wimp_event_set_user_data(ro_cw->wh, ro_cw);
/* register wimp events. */
diff --git a/frontends/riscos/dialog.c b/frontends/riscos/dialog.c
index a50d1289b..67019c4ff 100644
--- a/frontends/riscos/dialog.c
+++ b/frontends/riscos/dialog.c
@@ -39,6 +39,7 @@
#include "utils/messages.h"
#include "utils/nsurl.h"
#include "desktop/version.h"
+#include "desktop/searchweb.h"
#include "netsurf/browser_window.h"
#include "riscos/configure.h"
@@ -49,9 +50,9 @@
#include "riscos/gui.h"
#include "riscos/window.h"
#include "riscos/hotlist.h"
+#include "riscos/pageinfo.h"
#include "riscos/menus.h"
#include "riscos/save.h"
-#include "riscos/sslcert.h"
#include "riscos/toolbar.h"
#include "riscos/url_complete.h"
#include "riscos/url_suggest.h"
@@ -72,7 +73,6 @@
wimp_w dialog_info, dialog_saveas,
- dialog_401li,
dialog_zoom, dialog_pageinfo, dialog_objinfo, dialog_tooltip,
dialog_warning,
dialog_folder, dialog_entry, dialog_search, dialog_print,
@@ -114,9 +114,6 @@ void ro_gui_dialog_init(void)
/* configure window */
ro_gui_configure_initialise();
- /* 401 login window */
- ro_gui_401login_init();
-
/* theme installation */
dialog_theme_install = ro_gui_dialog_create("theme_inst");
ro_gui_wimp_event_register_cancel(dialog_theme_install,
@@ -182,9 +179,6 @@ void ro_gui_dialog_init(void)
* associated dialogues to be set up first.
*/
- /* certificate verification window */
- ro_gui_cert_initialise();
-
/* hotlist window */
ro_gui_hotlist_initialise();
@@ -196,6 +190,9 @@ void ro_gui_dialog_init(void)
/* cookies window */
ro_gui_cookies_initialise();
+
+ /* page info window */
+ ro_gui_pageinfo_initialise();
}
@@ -339,12 +336,16 @@ void ro_gui_dialog_close(wimp_w close)
{
int i;
wimp_caret caret;
+ wimp_w parent = (wimp_w)-1;
os_error *error;
/* Check if we're a persistent window */
for (i = 0; i < MAX_PERSISTENT; i++) {
if (persistent_dialog[i].dialog == close) {
/* We are => invalidate record */
+ if (persistent_dialog[i].parent != NULL) {
+ parent = persistent_dialog[i].parent;
+ }
persistent_dialog[i].parent = NULL;
persistent_dialog[i].dialog = NULL;
break;
@@ -367,7 +368,7 @@ void ro_gui_dialog_close(wimp_w close)
/* Check if we are a persistent window */
if (i < MAX_PERSISTENT) {
error = xwimp_set_caret_position(
- persistent_dialog[i].parent,
+ parent,
wimp_ICON_WINDOW, -100, -100,
32, -1);
/* parent may have been closed first */
@@ -429,9 +430,9 @@ bool ro_gui_dialog_open_top(wimp_w w, struct toolbar *toolbar,
if (!open) {
int dimension;
int scroll_width;
- /* cancel any editing */
- if (ro_toolbar_get_editing(toolbar))
- ro_toolbar_toggle_edit(toolbar);
+ /* cancel any editing */
+ if (ro_toolbar_get_editing(toolbar))
+ ro_toolbar_toggle_edit(toolbar);
/* move to the centre */
ro_gui_screen_size(&screen_width, &screen_height);
@@ -605,7 +606,7 @@ void ro_gui_dialog_open_persistent(wimp_w parent, wimp_w w, bool pointer) {
void ro_gui_dialog_add_persistent(wimp_w parent, wimp_w w) {
- int i;
+ int i;
/* all persistant windows have a back icon */
ro_gui_wimp_update_window_furniture(w, wimp_WINDOW_BACK_ICON,
@@ -754,9 +755,9 @@ static bool ro_gui_dialog_open_url_init(void)
xwimp_close_template();
die(error->errmess);
}
-
+
free(definition);
-
+
ro_gui_wimp_event_register_menu_gright(dialog_openurl, ICON_OPENURL_URL,
ICON_OPENURL_MENU, ro_gui_url_suggest_menu);
ro_gui_wimp_event_register_cancel(dialog_openurl, ICON_OPENURL_CANCEL);
@@ -771,35 +772,31 @@ static bool ro_gui_dialog_open_url_init(void)
-bool ro_gui_dialog_openurl_apply(wimp_w w) {
- const char *urltxt;
- char *url2;
+bool ro_gui_dialog_openurl_apply(wimp_w w)
+{
+ nserror res;
+ const char *url_s;
nsurl *url;
- nserror error;
- urltxt = ro_gui_get_icon_string(w, ICON_OPENURL_URL);
- url2 = strdup(urltxt); /** @todo why is this copied */
- if (url2 == NULL) {
- return false;
- }
+ url_s = ro_gui_get_icon_string(w, ICON_OPENURL_URL);
+
+ res = search_web_omni(url_s, SEARCH_WEB_OMNI_NONE, &url);
- error = nsurl_create(url2, &url);
- free(url2);
- if (error == NSERROR_OK) {
- error = browser_window_create(BW_CREATE_HISTORY,
- url,
- NULL,
- NULL,
- NULL);
+ if (res == NSERROR_OK) {
+ res = 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);
+
+ if (res != NSERROR_OK) {
+ ro_warn_user(messages_get_errorcode(res), 0);
return false;
}
return true;
-
}
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/!Boot,feb b/frontends/riscos/distribution/!Boot/Resources/!Unicode/!Boot,feb
index 7c0c46241..b2cdbf102 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/!Boot,feb
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/!Boot,feb
@@ -2,4 +2,4 @@
|
Set Unicode$Dir <Obey$Dir>
SetMacro Unicode$Path <Unicode$Dir>.,Resources:$.Resources.Unicode.
-IconSprites Unicode:!Sprites
+IconSprites Unicode:Themes.!Sprites
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/!Help b/frontends/riscos/distribution/!Boot/Resources/!Unicode/!Help
index 8c0488185..a24701e02 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/!Help
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/!Help
@@ -1 +1,5 @@
-This application contains resources for Unicode support in applications.
+ !Unicode
+ ========
+
+This application contains resources for Unicode support in
+applications.
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/!Run,feb b/frontends/riscos/distribution/!Boot/Resources/!Unicode/!Run,feb
index bd70e96ac..40999ded5 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/!Run,feb
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/!Run,feb
@@ -2,4 +2,4 @@
|
Set Unicode$Dir <Obey$Dir>
SetMacro Unicode$Path <Unicode$Dir>.,Resources:$.Resources.Unicode.
-IconSprites Unicode:!Sprites
+IconSprites Unicode:Themes.!Sprites
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Acorn/Latin1 b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Acorn/Latin1,ffd
index bdf5d3b67..bdf5d3b67 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Acorn/Latin1
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Acorn/Latin1,ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Apple/CentEuro b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Apple/CentEuro,ffd
index 5ab69ff2e..5ab69ff2e 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Apple/CentEuro
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Apple/CentEuro,ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Apple/Cyrillic b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Apple/Cyrillic,ffd
index 670fd6cdc..670fd6cdc 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Apple/Cyrillic
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Apple/Cyrillic,ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Apple/Roman b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Apple/Roman,ffd
index 254579e2c..254579e2c 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Apple/Roman
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Apple/Roman,ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Apple/Ukrainian b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Apple/Ukrainian,ffd
index a220587ba..a220587ba 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Apple/Ukrainian
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Apple/Ukrainian,ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/BigFive b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/BigFive,ffd
index c659cef19..c659cef19 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/BigFive
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/BigFive,ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/C0/40[ISO646] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/C0/40[ISO646],ffd
index cd92b5486..cd92b5486 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/C0/40[ISO646]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/C0/40[ISO646],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/C1/43[IS6429] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/C1/43[IS6429],ffd
index 74002a168..74002a168 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/C1/43[IS6429]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/C1/43[IS6429],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/40[646old] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/40[646old],ffd
index 00e2d1096..00e2d1096 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/40[646old]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/40[646old],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/41[646-GB] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/41[646-GB],ffd
index c293f93d6..c293f93d6 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/41[646-GB]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/41[646-GB],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/42[646IRV] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/42[646IRV],ffd
index e0b4bcadb..e0b4bcadb 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/42[646IRV]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/42[646IRV],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/43[FinSwe] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/43[FinSwe],ffd
index 7d4646905..7d4646905 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/43[FinSwe]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/43[FinSwe],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/47[646-SE] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/47[646-SE],ffd
index a6b091a22..a6b091a22 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/47[646-SE]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/47[646-SE],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/48[646-SE] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/48[646-SE],ffd
index 9bd24ab29..9bd24ab29 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/48[646-SE]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/48[646-SE],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/49[JS201K] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/49[JS201K],ffd
index 20ce8d498..20ce8d498 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/49[JS201K]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/49[JS201K],ffd
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/4A[JS201R] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/4A[JS201R],ffd
index 21d2a479b..21d2a479b 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/4A[JS201R]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/4A[JS201R],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/4B[646-DE] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/4B[646-DE],ffd
index a2e284e1b..a2e284e1b 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/4B[646-DE]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/4B[646-DE],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/4C[646-PT] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/4C[646-PT],ffd
index e076e2517..e076e2517 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/4C[646-PT]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/4C[646-PT],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/54[GB1988] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/54[GB1988],ffd
index 3b43719ce..3b43719ce 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/54[GB1988]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/54[GB1988],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/56[Teltxt] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/56[Teltxt],ffd
index 73ce49e17..73ce49e17 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/56[Teltxt]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/56[Teltxt],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/59[646-IT] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/59[646-IT],ffd
index f1ae81962..f1ae81962 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/59[646-IT]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/59[646-IT],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/5A[646-ES] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/5A[646-ES],ffd
index 674fc2d70..674fc2d70 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/5A[646-ES]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/5A[646-ES],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/60[646-NO] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/60[646-NO],ffd
index fc92892ee..fc92892ee 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/60[646-NO]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/60[646-NO],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/66[646-FR] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/66[646-FR],ffd
index 8dd604679..8dd604679 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/66[646-FR]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/66[646-FR],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/69[646-HU] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/69[646-HU],ffd
index 65300b2c5..65300b2c5 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/69[646-HU]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/69[646-HU],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/6B[Arabic] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/6B[Arabic],ffd
index c47689914..c47689914 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/6B[Arabic]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/6B[Arabic],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/6C[IS6937] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/6C[IS6937],ffd
index 93453f5de..93453f5de 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/6C[IS6937]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/6C[IS6937],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/7A[SerbCr] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/7A[SerbCr],ffd
index 9740e784e..9740e784e 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/7A[SerbCr]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94/7A[SerbCr],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/40[JS6226] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/40[JS6226],ffd
index a677dfc3d..a677dfc3d 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/40[JS6226]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/40[JS6226],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/41[GB2312] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/41[GB2312],ffd
index 679608ad2..679608ad2 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/41[GB2312]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/41[GB2312],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/42[JIS208] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/42[JIS208],ffd
index 532b1f4f3..532b1f4f3 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/42[JIS208]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/42[JIS208],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/43[KS1001] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/43[KS1001],ffd
index 36186c864..36186c864 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/43[KS1001]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/43[KS1001],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/44[JIS212] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/44[JIS212],ffd
index f5343a30e..f5343a30e 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/44[JIS212]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/44[JIS212],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/47[CNS1] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/47[CNS1],ffd
index da07f45d3..da07f45d3 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/47[CNS1]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/47[CNS1],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/48[CNS2] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/48[CNS2],ffd
index 44ee24c91..44ee24c91 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/48[CNS2]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/48[CNS2],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/49[CNS3] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/49[CNS3],ffd
index a8464e5aa..a8464e5aa 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/49[CNS3]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/49[CNS3],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/4A[CNS4] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/4A[CNS4],ffd
index a8f3e3270..a8f3e3270 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/4A[CNS4]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/4A[CNS4],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/4B[CNS5] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/4B[CNS5],ffd
index 535b0f4b5..535b0f4b5 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/4B[CNS5]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/4B[CNS5],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/4C[CNS6] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/4C[CNS6],ffd
index 7bfb2b1d4..7bfb2b1d4 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/4C[CNS6]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/4C[CNS6],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/4D[CNS7] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/4D[CNS7],ffd
index be14c7279..be14c7279 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/4D[CNS7]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G94x94/4D[CNS7],ffd
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/41[Lat1] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/41[Lat1],ffd
index 97e6b1106..97e6b1106 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/41[Lat1]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/41[Lat1],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/42[Lat2] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/42[Lat2],ffd
index b753c40fe..b753c40fe 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/42[Lat2]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/42[Lat2],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/43[Lat3] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/43[Lat3],ffd
index 88d477886..88d477886 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/43[Lat3]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/43[Lat3],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/44[Lat4] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/44[Lat4],ffd
index a40662d45..a40662d45 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/44[Lat4]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/44[Lat4],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/46[Greek] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/46[Greek],ffd
index c42397388..c42397388 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/46[Greek]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/46[Greek],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/47[Arabic] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/47[Arabic],ffd
index 4507f467a..4507f467a 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/47[Arabic]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/47[Arabic],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/48[Hebrew] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/48[Hebrew],ffd
index 70f39cca6..70f39cca6 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/48[Hebrew]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/48[Hebrew],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/4C[Cyrill] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/4C[Cyrill],ffd
index 8ff0115e4..8ff0115e4 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/4C[Cyrill]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/4C[Cyrill],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/4D[Lat5] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/4D[Lat5],ffd
index 6381e607e..6381e607e 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/4D[Lat5]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/4D[Lat5],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/50[LatSup] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/50[LatSup],ffd
index a320c7fe8..a320c7fe8 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/50[LatSup]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/50[LatSup],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/52[IS6937] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/52[IS6937],ffd
index dff6ccba4..dff6ccba4 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/52[IS6937]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/52[IS6937],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/54[Thai] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/54[Thai],ffd
index d74377759..d74377759 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/54[Thai]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/54[Thai],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/56[Lat6] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/56[Lat6],ffd
index 4e3e4f313..4e3e4f313 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/56[Lat6]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/56[Lat6],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/58[L6Sami] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/58[L6Sami],ffd
index 4dfd9188c..4dfd9188c 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/58[L6Sami]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/58[L6Sami],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/59[Lat7] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/59[Lat7],ffd
index 256a88e76..256a88e76 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/59[Lat7]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/59[Lat7],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/5C[Welsh] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/5C[Welsh],ffd
index b5e00509f..b5e00509f 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/5C[Welsh]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/5C[Welsh],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/5D[Sami] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/5D[Sami],ffd
index 15734c036..15734c036 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/5D[Sami]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/5D[Sami],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/5E[Hebrew] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/5E[Hebrew],ffd
index a6593b071..a6593b071 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/5E[Hebrew]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/5E[Hebrew],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/5F[Lat8] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/5F[Lat8],ffd
index c15713e82..c15713e82 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/5F[Lat8]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/5F[Lat8],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/62[Lat9] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/62[Lat9],ffd
index 5bf449d58..5bf449d58 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/62[Lat9]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/62[Lat9],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/66[Lat10] b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/66[Lat10],ffd
index e8ba925d3..e8ba925d3 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/66[Lat10]
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/ISO2022/G96/66[Lat10],ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/KOI8-R b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/KOI8-R,ffd
index 8063cd4bc..8063cd4bc 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/KOI8-R
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/KOI8-R,ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1250 b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1250,ffd
index 7a0d35ceb..7a0d35ceb 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1250
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1250,ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1251 b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1251,ffd
index 3d6009cab..3d6009cab 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1251
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1251,ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1252 b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1252,ffd
index 6d3bf293d..6d3bf293d 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1252
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1252,ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1253 b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1253,ffd
index 50a48be13..50a48be13 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1253
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1253,ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1254 b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1254,ffd
index 45ecfe907..45ecfe907 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1254
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1254,ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1256 b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1256,ffd
index 7fc95a92f..7fc95a92f 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1256
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP1256,ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP866 b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP866,ffd
index cd214d24b..cd214d24b 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP866
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP866,ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP874 b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP874,ffd
index 26a6fc8c3..26a6fc8c3 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP874
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP874,ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP932 b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP932,ffd
index 2c0c111f9..2c0c111f9 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP932
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Encodings/Microsoft/CP932,ffd
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Files/CharNames b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Files/CharNames
new file mode 100644
index 000000000..3600913be
--- /dev/null
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Files/CharNames
@@ -0,0 +1,14016 @@
+# > Unicode:Files.CharNames
+# Mapping of code points to character names
+#
+# Lines starting with a '#' are comments, blank lines are ignored.
+#
+# Copyright (c) 2002 Unicode, Inc. All rights reserved.
+# Based on http://www.unicode.org/Public/3.2-Update/UnicodeData-3.2.0.txt
+#
+0000-001F:\ê
+0020:SPACE
+0021:EXCLAM\”\¥
+0022:QUOT\”\¥
+0023:\­SIGN
+0024:DOLLAR\‚
+0025:PERCENT\‚
+0026:AMPERSAND
+0027:APOSTROPHE
+0028:\‰ \ÑS
+0029:\ù\ÑS
+002A:ASTERISK
+002B:PLUS\‚
+002C:COMMA
+002D:HYPHEN-MINUS
+002E:FULL STOP
+002F:SOLIDUS
+0030:DIGIT ZERO
+0031:DIGIT ONE
+0032:DIGIT TWO
+0033:DIGIT THREE
+0034:DIGIT FOUR
+0035:DIGIT FIVE
+0036:DIGIT SIX
+0037:DIGIT SEVEN
+0038:DIGIT E\¼
+0039:DIGIT NINE
+003A:COLON
+003B:SEMICOLON
+003C:\µ\‚
+003D:EQUALS\‚
+003E:\’\‚
+003F:QUESTION\¥
+0040:COMMERCIAL AT
+0041:\PA
+0042:\PB
+0043:\PC
+0044:\PD
+0045:\PE
+0046:\PF
+0047:\PG
+0048:\PH
+0049:\PI
+004A:\PJ
+004B:\PK
+004C:\PL
+004D:\PM
+004E:\PN
+004F:\PO
+0050:\PP
+0051:\PQ
+0052:\PR
+0053:\PS
+0054:\PT
+0055:\PU
+0056:\PV
+0057:\PW
+0058:\PX
+0059:\PY
+005A:\PZ
+005B:\‰ \r\–
+005C:REVERSE SOLIDUS
+005D:\ù\r\–
+005E:CIRCUMFLEX\×
+005F:LOW \ä
+0060:GRAVE\×
+0061:\LA
+0062:\LB
+0063:\LC
+0064:\LD
+0065:\LE
+0066:\LF
+0067:\LG
+0068:\LH
+0069:\LI
+006A:\LJ
+006B:\LK
+006C:\LL
+006D:\LM
+006E:\LN
+006F:\LO
+0070:\LP
+0071:\LQ
+0072:\LR
+0073:\LS
+0074:\LT
+0075:\LU
+0076:\LV
+0077:\LW
+0078:\LX
+0079:\LY
+007A:\LZ
+007B:\‰ CURLY \–
+007C:\€ \ä
+007D:\ùCURLY \–
+007E:\æ
+007F:\ê
+0080:\ê
+0081:\ê
+0082:\ê
+0083:\ê
+0084:\ê
+0085:\ê
+0086:\ê
+0087:\ê
+0088:\ê
+0089:\ê
+008A:\ê
+008B:\ê
+008C:\ê
+008D:\ê
+008E:\ê
+008F:\ê
+0090:\ê
+0091:\ê
+0092:\ê
+0093:\ê
+0094:\ê
+0095:\ê
+0096:\ê
+0097:\ê
+0098:\ê
+0099:\ê
+009A:\ê
+009B:\ê
+009C:\ê
+009D:\ê
+009E:\ê
+009F:\ê
+00A0:NO-BREAK SPACE
+00A1:INVERT\ÂEXCLAM\”\¥
+00A2:CENT\‚
+00A3:POUND\‚
+00A4:CURRENCY\‚
+00A5:YEN\‚
+00A6:BROKEN\ì
+00A7:SECTION\‚
+00A8:DIAERESIS
+00A9:COPY\ùSIGN
+00AA:FEMININE ORDINAL INDICATOR
+00AB:\‰-\Ä\0 ANGLE QUOT\”\¥
+00AC:NOT\‚
+00AD:SOFT HYPHEN
+00AE:REGISTERED\‚
+00AF:\å
+00B0:DEGREE\‚
+00B1:PLUS-MINUS\‚
+00B2:SUPER\Ž TWO
+00B3:SUPER\Ž THREE
+00B4:\Ü\×
+00B5:MICRO\‚
+00B6:PILCROW\‚
+00B7:MIDDLE DOT
+00B8:CEDILLA
+00B9:SUPER\Ž ONE
+00BA:MASCU\ä ORDINAL INDICATOR
+00BB:\q-\Ä\0 ANGLE QUOT\”\¥
+00BC:\úONE QUARTER
+00BD:\úONE HALF
+00BE:\úTHREE QUARTERS
+00BF:INVERT\ÂQUESTION\¥
+00C0:\PA\HGRAVE
+00C1:\PA\H\Ü
+00C2:\PA\ˆ
+00C3:\PA\H\æ
+00C4:\PA\ž
+00C5:\PA\HR\ô\p
+00C6:\PAE
+00C7:\PC\HCEDILLA
+00C8:\PE\HGRAVE
+00C9:\PE\H\Ü
+00CA:\PE\ˆ
+00CB:\PE\ž
+00CC:\PI\HGRAVE
+00CD:\PI\H\Ü
+00CE:\PI\ˆ
+00CF:\PI\ž
+00D0:\PETH
+00D1:\PN\H\æ
+00D2:\PO\HGRAVE
+00D3:\PO\H\Ü
+00D4:\PO\ˆ
+00D5:\PO\H\æ
+00D6:\PO\ž
+00D7:MULTIPLIC\”\‚
+00D8:\PO\H\Á
+00D9:\PU\HGRAVE
+00DA:\PU\H\Ü
+00DB:\PU\ˆ
+00DC:\PU\ž
+00DD:\PY\H\Ü
+00DE:\PTHORN
+00DF:\LSHARP S
+00E0:\LA\HGRAVE
+00E1:\LA\H\Ü
+00E2:\LA\ˆ
+00E3:\LA\H\æ
+00E4:\LA\ž
+00E5:\LA\HR\ô\p
+00E6:\LAE
+00E7:\LC\HCEDILLA
+00E8:\LE\HGRAVE
+00E9:\LE\H\Ü
+00EA:\LE\ˆ
+00EB:\LE\ž
+00EC:\LI\HGRAVE
+00ED:\LI\H\Ü
+00EE:\LI\ˆ
+00EF:\LI\ž
+00F0:\LETH
+00F1:\LN\H\æ
+00F2:\LO\HGRAVE
+00F3:\LO\H\Ü
+00F4:\LO\ˆ
+00F5:\LO\H\æ
+00F6:\LO\ž
+00F7:DIVISION\‚
+00F8:\LO\H\Á
+00F9:\LU\HGRAVE
+00FA:\LU\H\Ü
+00FB:\LU\ˆ
+00FC:\LU\ž
+00FD:\LY\H\Ü
+00FE:\LTHORN
+00FF:\LY\ž
+0100:\PA\H\å
+0101:\LA\H\å
+0102:\PA\HBREVE
+0103:\LA\HBREVE
+0104:\PA\HOGONEK
+0105:\LA\HOGONEK
+0106:\PC\H\Ü
+0107:\LC\H\Ü
+0108:\PC\ˆ
+0109:\LC\ˆ
+010A:\PC\³\p
+010B:\LC\³\p
+010C:\PC\û
+010D:\LC\û
+010E:\PD\û
+010F:\LD\û
+0110:\PD\H\Á
+0111:\LD\H\Á
+0112:\PE\H\å
+0113:\LE\H\å
+0114:\PE\HBREVE
+0115:\LE\HBREVE
+0116:\PE\³\p
+0117:\LE\³\p
+0118:\PE\HOGONEK
+0119:\LE\HOGONEK
+011A:\PE\û
+011B:\LE\û
+011C:\PG\ˆ
+011D:\LG\ˆ
+011E:\PG\HBREVE
+011F:\LG\HBREVE
+0120:\PG\³\p
+0121:\LG\³\p
+0122:\PG\HCEDILLA
+0123:\LG\HCEDILLA
+0124:\PH\ˆ
+0125:\LH\ˆ
+0126:\PH\H\Á
+0127:\LH\H\Á
+0128:\PI\H\æ
+0129:\LI\H\æ
+012A:\PI\H\å
+012B:\LI\H\å
+012C:\PI\HBREVE
+012D:\LI\HBREVE
+012E:\PI\HOGONEK
+012F:\LI\HOGONEK
+0130:\PI\³\p
+0131:\LDOTLESS I
+0132:LATIN\Ò\òIJ
+0133:LATIN\Ç\òIJ
+0134:\PJ\ˆ
+0135:\LJ\ˆ
+0136:\PK\HCEDILLA
+0137:\LK\HCEDILLA
+0138:\LKRA
+0139:\PL\H\Ü
+013A:\LL\H\Ü
+013B:\PL\HCEDILLA
+013C:\LL\HCEDILLA
+013D:\PL\û
+013E:\LL\û
+013F:\PL\HMIDDLE DOT
+0140:\LL\HMIDDLE DOT
+0141:\PL\H\Á
+0142:\LL\H\Á
+0143:\PN\H\Ü
+0144:\LN\H\Ü
+0145:\PN\HCEDILLA
+0146:\LN\HCEDILLA
+0147:\PN\û
+0148:\LN\û
+0149:\LN PRECED\ÂBY APOSTROPHE
+014A:\PENG
+014B:\LENG
+014C:\PO\H\å
+014D:\LO\H\å
+014E:\PO\HBREVE
+014F:\LO\HBREVE
+0150:\PO\H\0 \Ü
+0151:\LO\H\0 \Ü
+0152:LATIN\Ò\òOE
+0153:LATIN\Ç\òOE
+0154:\PR\H\Ü
+0155:\LR\H\Ü
+0156:\PR\HCEDILLA
+0157:\LR\HCEDILLA
+0158:\PR\û
+0159:\LR\û
+015A:\PS\H\Ü
+015B:\LS\H\Ü
+015C:\PS\ˆ
+015D:\LS\ˆ
+015E:\PS\HCEDILLA
+015F:\LS\HCEDILLA
+0160:\PS\û
+0161:\LS\û
+0162:\PT\HCEDILLA
+0163:\LT\HCEDILLA
+0164:\PT\û
+0165:\LT\û
+0166:\PT\H\Á
+0167:\LT\H\Á
+0168:\PU\H\æ
+0169:\LU\H\æ
+016A:\PU\H\å
+016B:\LU\H\å
+016C:\PU\HBREVE
+016D:\LU\HBREVE
+016E:\PU\HR\ô\p
+016F:\LU\HR\ô\p
+0170:\PU\H\0 \Ü
+0171:\LU\H\0 \Ü
+0172:\PU\HOGONEK
+0173:\LU\HOGONEK
+0174:\PW\ˆ
+0175:\LW\ˆ
+0176:\PY\ˆ
+0177:\LY\ˆ
+0178:\PY\ž
+0179:\PZ\H\Ü
+017A:\LZ\H\Ü
+017B:\PZ\³\p
+017C:\LZ\³\p
+017D:\PZ\û
+017E:\LZ\û
+017F:\LLONG S
+0180:\LB\H\Á
+0181:\PB\í
+0182:\PB\HTOPBAR
+0183:\LB\HTOPBAR
+0184:\PTONE SIX
+0185:\LTONE SIX
+0186:\POPEN O
+0187:\PC\í
+0188:\LC\í
+0189:\PAFRICAN D
+018A:\PD\í
+018B:\PD\HTOPBAR
+018C:\LD\HTOPBAR
+018D:\LTURN\ÂDELTA
+018E:\P\öE
+018F:\PSCHWA
+0190:\POPEN E
+0191:\PF\í
+0192:\LF\í
+0193:\PG\í
+0194:\PGAMMA
+0195:\LHV
+0196:\PIOTA
+0197:\PI\H\Á
+0198:\PK\í
+0199:\LK\í
+019A:\LL\HBAR
+019B:\LLAMBDA\H\Á
+019C:\PTURN\ÂM
+019D:\PN\H\‰ HOOK
+019E:\LN\HLONG \ùLEG
+019F:\PO\HMIDDLE \æ
+01A0:\PO\HHORN
+01A1:\LO\HHORN
+01A2:\POI
+01A3:\LOI
+01A4:\PP\í
+01A5:\LP\í
+01A6:LATIN\@YR
+01A7:\PTONE TWO
+01A8:\LTONE TWO
+01A9:\PESH
+01AA:LATIN\@\öESH LOOP
+01AB:\LT\HPALATAL HOOK
+01AC:\PT\í
+01AD:\LT\í
+01AE:\PT\HRETROFLEX HOOK
+01AF:\PU\HHORN
+01B0:\LU\HHORN
+01B1:\PU\É
+01B2:\PV\í
+01B3:\PY\í
+01B4:\LY\í
+01B5:\PZ\H\Á
+01B6:\LZ\H\Á
+01B7:\PEZH
+01B8:\PEZH REVERSED
+01B9:\LEZH REVERSED
+01BA:\LEZH\HTAIL
+01BB:LATIN\@TWO\H\Á
+01BC:\PTONE FIVE
+01BD:\LTONE FIVE
+01BE:LATIN\@INVERT\ÂGLOTTAL STOP\H\Á
+01BF:LATIN\@WYNN
+01C0:LATIN\@DENTAL CLICK
+01C1:LATIN\@LATERAL CLICK
+01C2:LATIN\@ALVEOLAR CLICK
+01C3:LATIN\@RETROFLEX CLICK
+01C4:\PDZ\û
+01C5:\PD\HSMALL\@Z\û
+01C6:\LDZ\û
+01C7:\PLJ
+01C8:\PL\HSMALL\@J
+01C9:\LLJ
+01CA:\PNJ
+01CB:\PN\HSMALL\@J
+01CC:\LNJ
+01CD:\PA\û
+01CE:\LA\û
+01CF:\PI\û
+01D0:\LI\û
+01D1:\PO\û
+01D2:\LO\û
+01D3:\PU\û
+01D4:\LU\û
+01D5:\PU\ž\i\å
+01D6:\LU\ž\i\å
+01D7:\PU\ž\i\Ü
+01D8:\LU\ž\i\Ü
+01D9:\PU\ž\iCARON
+01DA:\LU\ž\iCARON
+01DB:\PU\ž\iGRAVE
+01DC:\LU\ž\iGRAVE
+01DD:\LTURN\ÂE
+01DE:\PA\ž\i\å
+01DF:\LA\ž\i\å
+01E0:\PA\³\p\i\å
+01E1:\LA\³\p\i\å
+01E2:\PAE\H\å
+01E3:\LAE\H\å
+01E4:\PG\H\Á
+01E5:\LG\H\Á
+01E6:\PG\û
+01E7:\LG\û
+01E8:\PK\û
+01E9:\LK\û
+01EA:\PO\HOGONEK
+01EB:\LO\HOGONEK
+01EC:\PO\HOGONEK\i\å
+01ED:\LO\HOGONEK\i\å
+01EE:\PEZH\û
+01EF:\LEZH\û
+01F0:\LJ\û
+01F1:\PDZ
+01F2:\PD\HSMALL\@Z
+01F3:\LDZ
+01F4:\PG\H\Ü
+01F5:\LG\H\Ü
+01F6:\PHWAIR
+01F7:\PWYNN
+01F8:\PN\HGRAVE
+01F9:\LN\HGRAVE
+01FA:\PA\HR\ô\p\i\Ü
+01FB:\LA\HR\ô\p\i\Ü
+01FC:\PAE\H\Ü
+01FD:\LAE\H\Ü
+01FE:\PO\H\Á\i\Ü
+01FF:\LO\H\Á\i\Ü
+0200:\PA\H\0 GRAVE
+0201:\LA\H\0 GRAVE
+0202:\PA\HINVERT\ÂBREVE
+0203:\LA\HINVERT\ÂBREVE
+0204:\PE\H\0 GRAVE
+0205:\LE\H\0 GRAVE
+0206:\PE\HINVERT\ÂBREVE
+0207:\LE\HINVERT\ÂBREVE
+0208:\PI\H\0 GRAVE
+0209:\LI\H\0 GRAVE
+020A:\PI\HINVERT\ÂBREVE
+020B:\LI\HINVERT\ÂBREVE
+020C:\PO\H\0 GRAVE
+020D:\LO\H\0 GRAVE
+020E:\PO\HINVERT\ÂBREVE
+020F:\LO\HINVERT\ÂBREVE
+0210:\PR\H\0 GRAVE
+0211:\LR\H\0 GRAVE
+0212:\PR\HINVERT\ÂBREVE
+0213:\LR\HINVERT\ÂBREVE
+0214:\PU\H\0 GRAVE
+0215:\LU\H\0 GRAVE
+0216:\PU\HINVERT\ÂBREVE
+0217:\LU\HINVERT\ÂBREVE
+0218:\PS\HCOMMA\…
+0219:\LS\HCOMMA\…
+021A:\PT\HCOMMA\…
+021B:\LT\HCOMMA\…
+021C:\PYOGH
+021D:\LYOGH
+021E:\PH\û
+021F:\LH\û
+0220:\PN\HLONG \ùLEG
+0222:\POU
+0223:\LOU
+0224:\PZ\í
+0225:\LZ\í
+0226:\PA\³\p
+0227:\LA\³\p
+0228:\PE\HCEDILLA
+0229:\LE\HCEDILLA
+022A:\PO\ž\i\å
+022B:\LO\ž\i\å
+022C:\PO\H\æ\i\å
+022D:\LO\H\æ\i\å
+022E:\PO\³\p
+022F:\LO\³\p
+0230:\PO\³\p\i\å
+0231:\LO\³\p\i\å
+0232:\PY\H\å
+0233:\LY\H\å
+0250:\LTURN\ÂA
+0251:\L\þ
+0252:\LTURN\Â\þ
+0253:\LB\í
+0254:\LOPEN O
+0255:\LC\HCURL
+0256:\LD\HTAIL
+0257:\LD\í
+0258:\L\öE
+0259:\LSCHWA
+025A:\LSCHWA\í
+025B:\LOPEN E
+025C:\L\öOPEN E
+025D:\L\öOPEN E\í
+025E:\LCLOS\Â\öOPEN E
+025F:\LDOTLESS J\H\Á
+0260:\LG\í
+0261:\L\Ž G
+0262:LATIN\@SMALL\ÒG
+0263:\LGAMMA
+0264:\LRAMS HORN
+0265:\LTURN\ÂH
+0266:\LH\í
+0267:\LHENG\í
+0268:\LI\H\Á
+0269:\LIOTA
+026A:LATIN\@SMALL\ÒI
+026B:\LL\HMIDDLE \æ
+026C:\LL\HBELT
+026D:\LL\HRETROFLEX HOOK
+026E:\LLEZH
+026F:\LTURN\ÂM
+0270:\LTURN\ÂM\HLONG LEG
+0271:\LM\í
+0272:\LN\H\‰ HOOK
+0273:\LN\HRETROFLEX HOOK
+0274:LATIN\@SMALL\ÒN
+0275:\LBARR\ÂO
+0276:LATIN\@SMALL\ÒOE
+0277:\LCLOS\Â\ü
+0278:\LPHI
+0279:\LTURN\ÂR
+027A:\LTURN\ÂR\HLONG LEG
+027B:\LTURN\ÂR\í
+027C:\LR\HLONG LEG
+027D:\LR\HTAIL
+027E:\LR\HFISHHOOK
+027F:\L\öR\HFISHHOOK
+0280:LATIN\@SMALL\ÒR
+0281:LATIN\@SMALL\ÒINVERT\ÂR
+0282:\LS\í
+0283:\LESH
+0284:\LDOTLESS J\H\Á\iHOOK
+0285:\LSQUAT \öESH
+0286:\LESH\HCURL
+0287:\LTURN\ÂT
+0288:\LT\HRETROFLEX HOOK
+0289:\LU\ì
+028A:\LU\É
+028B:\LV\í
+028C:\LTURN\ÂV
+028D:\LTURN\ÂW
+028E:\LTURN\ÂY
+028F:LATIN\@SMALL\ÒY
+0290:\LZ\HRETROFLEX HOOK
+0291:\LZ\HCURL
+0292:\LEZH
+0293:\LEZH\HCURL
+0294:LATIN\@GLOTTAL STOP
+0295:LATIN\@PHARYNGEAL VOIC\ÂFRICATIVE
+0296:LATIN\@INVERT\ÂGLOTTAL STOP
+0297:LATIN\@STRETCH\ÂC
+0298:LATIN\@BILABIAL CLICK
+0299:LATIN\@SMALL\ÒB
+029A:\LCLOS\ÂOPEN E
+029B:LATIN\@SMALL\ÒG\í
+029C:LATIN\@SMALL\ÒH
+029D:\LJ\HCROSSED-TAIL
+029E:\LTURN\ÂK
+029F:LATIN\@SMALL\ÒL
+02A0:\LQ\í
+02A1:LATIN\@GLOTTAL STOP\H\Á
+02A2:LATIN\@\öGLOTTAL STOP\H\Á
+02A3:\LDZ DIGRAPH
+02A4:\LDEZH DIGRAPH
+02A5:\LDZ DIGRAPH\HCURL
+02A6:\LTS DIGRAPH
+02A7:\LTESH DIGRAPH
+02A8:\LTC DIGRAPH\HCURL
+02A9:\LFENG DIGRAPH
+02AA:\LLS DIGRAPH
+02AB:\LLZ DIGRAPH
+02AC:LATIN\@BILABIAL PERCUSSIVE
+02AD:LATIN\@BIDENTAL PERCUSSIVE
+02B0:\®\§H
+02B1:\®\§H\í
+02B2:\®\§J
+02B3:\®\§R
+02B4:\®\§TURN\ÂR
+02B5:\®\§TURN\ÂR\í
+02B6:\®SMALL\ÒINVERT\ÂR
+02B7:\®\§W
+02B8:\®\§Y
+02B9:\®PRIME
+02BA:\®\0 PRIME
+02BB:\®TURN\ÂCOMMA
+02BC:\®APOSTROPHE
+02BD:\®\öCOMMA
+02BE:\®\ùHALF R\ô
+02BF:\®\‰ HALF R\ô
+02C0:\®GLOTTAL STOP
+02C1:\®\öGLOTTAL STOP
+02C2:\®\‰\uHEAD
+02C3:\®\q\uHEAD
+02C4:\®UP\uHEAD
+02C5:\®\Ë\uHEAD
+02C6:\®CIRCUMFLEX\×
+02C7:CARON
+02C8:\®\€ \ä
+02C9:\®\å
+02CA:\®\Ü\×
+02CB:\®GRAVE\×
+02CC:\®LOW \€ \ä
+02CD:\®LOW \å
+02CE:\®LOW GRAVE\×
+02CF:\®LOW \Ü\×
+02D0:\®TRIANGULAR COLON
+02D1:\®HALF TRIANGULAR COLON
+02D2:\®CENTR\Â\ùHALF R\ô
+02D3:\®CENTR\Â\‰ HALF R\ô
+02D4:\®UP TACK
+02D5:\®\Ë TACK
+02D6:\®PLUS\‚
+02D7:\®MINUS\‚
+02D8:BREVE
+02D9:DOT\p
+02DA:R\ô\p
+02DB:OGONEK
+02DC:\§\æ
+02DD:\0 \Ü\×
+02DE:\®RHOTIC HOOK
+02DF:\®CROSS\×
+02E0:\®\§GAMMA
+02E1:\®\§L
+02E2:\®\§S
+02E3:\®\§X
+02E4:\®\§\öGLOTTAL STOP
+02E5:\®EXTRA-HIGH TONE\ì
+02E6:\®HIGH TONE\ì
+02E7:\®MID TONE\ì
+02E8:\®LOW TONE\ì
+02E9:\®EXTRA-LOW TONE\ì
+02EA:\®YIN DEPART\ô TONE\¥
+02EB:\®YANG DEPART\ô TONE\¥
+02EC:\®VOIC\ô
+02ED:\®UNASPIRATED
+02EE:\®\0 APOSTROPHE
+0300:\oGRAVE\×
+0301:\o\Ü\×
+0302:\oCIRCUMFLEX\×
+0303:\o\æ
+0304:\o\å
+0305:\oOVER\ä
+0306:\oBREVE
+0307:\oDOT\p
+0308:\oDIAERESIS
+0309:\oHOOK\p
+030A:\oR\ô\p
+030B:\o\0 \Ü\×
+030C:\oCARON
+030D:\o\€ \ä\p
+030E:\o\0 \€ \ä\p
+030F:\o\0 GRAVE\×
+0310:\oCANDRABINDU
+0311:\oINVERT\ÂBREVE
+0312:\oTURN\ÂCOMMA\p
+0313:\oCOMMA\p
+0314:\o\öCOMMA\p
+0315:\oCOMMA\p \q
+0316:\oGRAVE\×\…
+0317:\o\Ü\×\…
+0318:\o\‰ TACK\…
+0319:\o\ùTACK\…
+031A:\o\‰ ANGLE\p
+031B:\oHORN
+031C:\o\‰ HALF R\ô\…
+031D:\oUP TACK\…
+031E:\o\Ë TACK\…
+031F:\oPLUS\‚\…
+0320:\oMINUS\‚\…
+0321:\oPALATALIZ\ÂHOOK\…
+0322:\oRETROFLEX HOOK\…
+0323:\oDOT\…
+0324:\oDIAERESIS\…
+0325:\oR\ô\…
+0326:\oCOMMA\…
+0327:\oCEDILLA
+0328:\oOGONEK
+0329:\o\€ \ä\…
+032A:\oBRIDGE\…
+032B:\oINVERT\Â\0 ARCH\…
+032C:\oCARON\…
+032D:\oCIRCUMFLEX\×\…
+032E:\oBREVE\…
+032F:\oINVERT\ÂBREVE\…
+0330:\o\æ\…
+0331:\o\å\…
+0332:\oLOW \ä
+0333:\o\0 LOW \ä
+0334:\o\æ OVERLAY
+0335:\oSHORT \Á OVERLAY
+0336:\oLONG \Á OVERLAY
+0337:\oSHORT SOLIDUS OVERLAY
+0338:\oLONG SOLIDUS OVERLAY
+0339:\o\ùHALF R\ô\…
+033A:\oINVERT\ÂBRIDGE\…
+033B:\o\rBELOW
+033C:\oSEAGULL\…
+033D:\oX\p
+033E:\o\€ \æ
+033F:\o\0 OVER\ä
+0340:\oGRAVE TONE\¥
+0341:\o\Ü TONE\¥
+0342:\oGREEK \´
+0343:\oGREEK KORONIS
+0344:\oGREEK DIALYTIKA TONOS
+0345:\oGREEK YPO\œ
+0346:\oBRIDGE\p
+0347:\oEQUALS\‚\…
+0348:\o\0 \€ \ä\…
+0349:\o\‰ ANGLE\…
+034A:\oNOT \æ\p
+034B:\oHOMOTHETIC\p
+034C:\oALMOST\‘\p
+034D:\o\‰ \q\u\…
+034E:\oUP\Š\u\…
+034F:\oGRAPHEME JOINER
+0360:\o\0 \æ
+0361:\o\0 INVERT\ÂBREVE
+0362:\o\0 \Ù\…
+0363:\o\LA
+0364:\o\LE
+0365:\o\LI
+0366:\o\LO
+0367:\o\LU
+0368:\o\LC
+0369:\o\LD
+036A:\o\LH
+036B:\o\LM
+036C:\o\LR
+036D:\o\LT
+036E:\o\LV
+036F:\o\LX
+0374:GREEK NUMERAL\‚
+0375:GREEK \ïNUMERAL\‚
+037A:GREEK YPO\œ
+037E:GREEK QUESTION\¥
+0384:GREEK TONOS
+0385:GREEK DIALYTIKA TONOS
+0386:\9\þ\HTONOS
+0387:GREEK ANO TELEIA
+0388:\9E\É\HTONOS
+0389:\9ETA\HTONOS
+038A:\9IOTA\HTONOS
+038C:\9OMICRON\HTONOS
+038E:\9U\É\HTONOS
+038F:\9\ü\HTONOS
+0390:\yIOTA\HDIALYTIKA\iTONOS
+0391:\9\þ
+0392:\9BETA
+0393:\9GAMMA
+0394:\9DELTA
+0395:\9E\É
+0396:\9ZETA
+0397:\9ETA
+0398:\9THETA
+0399:\9IOTA
+039A:\9KAPPA
+039B:\9LAMDA
+039C:\9MU
+039D:\9NU
+039E:\9XI
+039F:\9OMICRON
+03A0:\9PI
+03A1:\9RHO
+03A3:\9SIGMA
+03A4:\9TAU
+03A5:\9U\É
+03A6:\9PHI
+03A7:\9CHI
+03A8:\9PSI
+03A9:\9\ü
+03AA:\9IOTA\HDIALYTIKA
+03AB:\9U\É\HDIALYTIKA
+03AC:\y\þ\HTONOS
+03AD:\yE\É\HTONOS
+03AE:\yETA\HTONOS
+03AF:\yIOTA\HTONOS
+03B0:\yU\É\HDIALYTIKA\iTONOS
+03B1:\y\þ
+03B2:\yBETA
+03B3:\yGAMMA
+03B4:\yDELTA
+03B5:\yE\É
+03B6:\yZETA
+03B7:\yETA
+03B8:\yTHETA
+03B9:\yIOTA
+03BA:\yKAPPA
+03BB:\yLAMDA
+03BC:\yMU
+03BD:\yNU
+03BE:\yXI
+03BF:\yOMICRON
+03C0:\yPI
+03C1:\yRHO
+03C2:\yFINAL SIGMA
+03C3:\ySIGMA
+03C4:\yTAU
+03C5:\yU\É
+03C6:\yPHI
+03C7:\yCHI
+03C8:\yPSI
+03C9:\y\ü
+03CA:\yIOTA\HDIALYTIKA
+03CB:\yU\É\HDIALYTIKA
+03CC:\yOMICRON\HTONOS
+03CD:\yU\É\HTONOS
+03CE:\y\ü\HTONOS
+03D0:GREEK BETA \
+03D1:GREEK THETA \
+03D2:GREEK U\É\í \
+03D3:GREEK U\É\H\Ü\iHOOK \
+03D4:GREEK U\É\ž\iHOOK \
+03D5:GREEK PHI \
+03D6:GREEK PI \
+03D7:GREEK KAI \
+03D8:GREEK\@ARCHAIC KOPPA
+03D9:\yARCHAIC KOPPA
+03DA:GREEK\@STIGMA
+03DB:\ySTIGMA
+03DC:GREEK\@DIGAMMA
+03DD:\yDIGAMMA
+03DE:GREEK\@KOPPA
+03DF:\yKOPPA
+03E0:GREEK\@SAMPI
+03E1:\ySAMPI
+03E2:COPTIC\ãSHEI
+03E3:COPTIC\N\@SHEI
+03E4:COPTIC\ãFEI
+03E5:COPTIC\N\@FEI
+03E6:COPTIC\ãKHEI
+03E7:COPTIC\N\@KHEI
+03E8:COPTIC\ãHORI
+03E9:COPTIC\N\@HORI
+03EA:COPTIC\ãGANGIA
+03EB:COPTIC\N\@GANGIA
+03EC:COPTIC\ãSHIMA
+03ED:COPTIC\N\@SHIMA
+03EE:COPTIC\ãDEI
+03EF:COPTIC\N\@DEI
+03F0:GREEK KAPPA \
+03F1:GREEK RHO \
+03F2:GREEK LUNATE SIGMA \
+03F3:GREEK\@YOT
+03F4:GREEK\ÒTHETA \
+03F5:GREEK LUNATE E\É \
+03F6:GREEK \öLUNATE E\É \
+0400:\¡IE\HGRAVE
+0401:\¡IO
+0402:\¡DJE
+0403:\¡GJE
+0404:\¡UKRAINIAN IE
+0405:\¡DZE
+0406:\¡BYELORUSSIAN-UKRAINIAN I
+0407:\¡YI
+0408:\¡JE
+0409:\¡LJE
+040A:\¡NJE
+040B:\¡TSHE
+040C:\¡KJE
+040D:\¡I\HGRAVE
+040E:\¡SHORT U
+040F:\¡DZHE
+0410:\¡A
+0411:\¡BE
+0412:\¡VE
+0413:\¡GHE
+0414:\¡DE
+0415:\¡IE
+0416:\¡ZHE
+0417:\¡ZE
+0418:\¡I
+0419:\¡SHORT I
+041A:\¡KA
+041B:\¡EL
+041C:\¡EM
+041D:\¡EN
+041E:\¡O
+041F:\¡PE
+0420:\¡ER
+0421:\¡ES
+0422:\¡TE
+0423:\¡U
+0424:\¡EF
+0425:\¡HA
+0426:\¡TSE
+0427:\¡CHE
+0428:\¡SHA
+0429:\¡SHCHA
+042A:\¡HARD\‚
+042B:\¡YERU
+042C:\¡SOFT\‚
+042D:\¡E
+042E:\¡YU
+042F:\¡YA
+0430:\¢A
+0431:\¢BE
+0432:\¢VE
+0433:\¢GHE
+0434:\¢DE
+0435:\¢IE
+0436:\¢ZHE
+0437:\¢ZE
+0438:\¢I
+0439:\¢SHORT I
+043A:\¢KA
+043B:\¢EL
+043C:\¢EM
+043D:\¢EN
+043E:\¢O
+043F:\¢PE
+0440:\¢ER
+0441:\¢ES
+0442:\¢TE
+0443:\¢U
+0444:\¢EF
+0445:\¢HA
+0446:\¢TSE
+0447:\¢CHE
+0448:\¢SHA
+0449:\¢SHCHA
+044A:\¢HARD\‚
+044B:\¢YERU
+044C:\¢SOFT\‚
+044D:\¢E
+044E:\¢YU
+044F:\¢YA
+0450:\¢IE\HGRAVE
+0451:\¢IO
+0452:\¢DJE
+0453:\¢GJE
+0454:\¢UKRAINIAN IE
+0455:\¢DZE
+0456:\¢BYELORUSSIAN-UKRAINIAN I
+0457:\¢YI
+0458:\¢JE
+0459:\¢LJE
+045A:\¢NJE
+045B:\¢TSHE
+045C:\¢KJE
+045D:\¢I\HGRAVE
+045E:\¢SHORT U
+045F:\¢DZHE
+0460:\¡\ü
+0461:\¢\ü
+0462:\¡YAT
+0463:\¢YAT
+0464:\¡IOTIFI\ÂE
+0465:\¢IOTIFI\ÂE
+0466:\¡LITTLE YUS
+0467:\¢LITTLE YUS
+0468:\¡IOTIFI\ÂLITTLE YUS
+0469:\¢IOTIFI\ÂLITTLE YUS
+046A:\¡BIG YUS
+046B:\¢BIG YUS
+046C:\¡IOTIFI\ÂBIG YUS
+046D:\¢IOTIFI\ÂBIG YUS
+046E:\¡KSI
+046F:\¢KSI
+0470:\¡PSI
+0471:\¢PSI
+0472:\¡FITA
+0473:\¢FITA
+0474:\¡IZHITSA
+0475:\¢IZHITSA
+0476:\¡IZHITSA\H\0 GRAVE\×
+0477:\¢IZHITSA\H\0 GRAVE\×
+0478:\¡UK
+0479:\¢UK
+047A:\¡ROUND \ü
+047B:\¢ROUND \ü
+047C:\¡\ü\HTITLO
+047D:\¢\ü\HTITLO
+047E:\¡OT
+047F:\¢OT
+0480:\¡KOPPA
+0481:\¢KOPPA
+0482:\g THOUSANDS\‚
+0483:\o\g TITLO
+0484:\o\g PALATALIZ\”
+0485:\o\g DASIA PNEUMATA
+0486:\o\g PSILI PNEUMATA
+0488:\o\g HUNDR\ÂTHOUSANDS\‚
+0489:\o\g MILLIONS\‚
+048A:\¡SHORT I\HTAIL
+048B:\¢SHORT I\HTAIL
+048C:\¡SEMISOFT\‚
+048D:\¢SEMISOFT\‚
+048E:\¡ER\HTICK
+048F:\¢ER\HTICK
+0490:\¡GHE\HUPTURN
+0491:\¢GHE\HUPTURN
+0492:\¡GHE\H\Á
+0493:\¢GHE\H\Á
+0494:\¡GHE\HMIDDLE HOOK
+0495:\¢GHE\HMIDDLE HOOK
+0496:\¡ZHE\HDESCENDER
+0497:\¢ZHE\HDESCENDER
+0498:\¡ZE\HDESCENDER
+0499:\¢ZE\HDESCENDER
+049A:\¡KA\HDESCENDER
+049B:\¢KA\HDESCENDER
+049C:\¡KA\H\€ \Á
+049D:\¢KA\H\€ \Á
+049E:\¡KA\H\Á
+049F:\¢KA\H\Á
+04A0:\¡BASHKIR KA
+04A1:\¢BASHKIR KA
+04A2:\¡EN\HDESCENDER
+04A3:\¢EN\HDESCENDER
+04A4:\g\Ò\òEN GHE
+04A5:\g\Ç\òEN GHE
+04A6:\¡PE\HMIDDLE HOOK
+04A7:\¢PE\HMIDDLE HOOK
+04A8:\¡ABKHASIAN HA
+04A9:\¢ABKHASIAN HA
+04AA:\¡ES\HDESCENDER
+04AB:\¢ES\HDESCENDER
+04AC:\¡TE\HDESCENDER
+04AD:\¢TE\HDESCENDER
+04AE:\¡STRA\¼ U
+04AF:\¢STRA\¼ U
+04B0:\¡STRA\¼ U\H\Á
+04B1:\¢STRA\¼ U\H\Á
+04B2:\¡HA\HDESCENDER
+04B3:\¢HA\HDESCENDER
+04B4:\g\Ò\òTE TSE
+04B5:\g\Ç\òTE TSE
+04B6:\¡CHE\HDESCENDER
+04B7:\¢CHE\HDESCENDER
+04B8:\¡CHE\H\€ \Á
+04B9:\¢CHE\H\€ \Á
+04BA:\¡SHHA
+04BB:\¢SHHA
+04BC:\¡ABKHASIAN CHE
+04BD:\¢ABKHASIAN CHE
+04BE:\¡ABKHASIAN CHE\HDESCENDER
+04BF:\¢ABKHASIAN CHE\HDESCENDER
+04C0:\g\@PALOCHKA
+04C1:\¡ZHE\HBREVE
+04C2:\¢ZHE\HBREVE
+04C3:\¡KA\í
+04C4:\¢KA\í
+04C5:\¡EL\HTAIL
+04C6:\¢EL\HTAIL
+04C7:\¡EN\í
+04C8:\¢EN\í
+04C9:\¡EN\HTAIL
+04CA:\¢EN\HTAIL
+04CB:\¡KHAKASSIAN CHE
+04CC:\¢KHAKASSIAN CHE
+04CD:\¡EM\HTAIL
+04CE:\¢EM\HTAIL
+04D0:\¡A\HBREVE
+04D1:\¢A\HBREVE
+04D2:\¡A\ž
+04D3:\¢A\ž
+04D4:\g\Ò\òA IE
+04D5:\g\Ç\òA IE
+04D6:\¡IE\HBREVE
+04D7:\¢IE\HBREVE
+04D8:\¡SCHWA
+04D9:\¢SCHWA
+04DA:\¡SCHWA\ž
+04DB:\¢SCHWA\ž
+04DC:\¡ZHE\ž
+04DD:\¢ZHE\ž
+04DE:\¡ZE\ž
+04DF:\¢ZE\ž
+04E0:\¡ABKHASIAN DZE
+04E1:\¢ABKHASIAN DZE
+04E2:\¡I\H\å
+04E3:\¢I\H\å
+04E4:\¡I\ž
+04E5:\¢I\ž
+04E6:\¡O\ž
+04E7:\¢O\ž
+04E8:\¡BARR\ÂO
+04E9:\¢BARR\ÂO
+04EA:\¡BARR\ÂO\ž
+04EB:\¢BARR\ÂO\ž
+04EC:\¡E\ž
+04ED:\¢E\ž
+04EE:\¡U\H\å
+04EF:\¢U\H\å
+04F0:\¡U\ž
+04F1:\¢U\ž
+04F2:\¡U\H\0 \Ü
+04F3:\¢U\H\0 \Ü
+04F4:\¡CHE\ž
+04F5:\¢CHE\ž
+04F8:\¡YERU\ž
+04F9:\¢YERU\ž
+0500:\¡KOMI DE
+0501:\¢KOMI DE
+0502:\¡KOMI DJE
+0503:\¢KOMI DJE
+0504:\¡KOMI ZJE
+0505:\¢KOMI ZJE
+0506:\¡KOMI DZJE
+0507:\¢KOMI DZJE
+0508:\¡KOMI LJE
+0509:\¢KOMI LJE
+050A:\¡KOMI NJE
+050B:\¢KOMI NJE
+050C:\¡KOMI SJE
+050D:\¢KOMI SJE
+050E:\¡KOMI TJE
+050F:\¢KOMI TJE
+0531:ARMENIAN\ãAYB
+0532:ARMENIAN\ãBEN
+0533:ARMENIAN\ãGIM
+0534:ARMENIAN\ãDA
+0535:ARMENIAN\ãECH
+0536:ARMENIAN\ãZA
+0537:ARMENIAN\ãEH
+0538:ARMENIAN\ãET
+0539:ARMENIAN\ãTO
+053A:ARMENIAN\ãZHE
+053B:ARMENIAN\ãINI
+053C:ARMENIAN\ãLIWN
+053D:ARMENIAN\ãXEH
+053E:ARMENIAN\ãCA
+053F:ARMENIAN\ãKEN
+0540:ARMENIAN\ãHO
+0541:ARMENIAN\ãJA
+0542:ARMENIAN\ãGHAD
+0543:ARMENIAN\ãCHEH
+0544:ARMENIAN\ãMEN
+0545:ARMENIAN\ãYI
+0546:ARMENIAN\ãNOW
+0547:ARMENIAN\ãSHA
+0548:ARMENIAN\ãVO
+0549:ARMENIAN\ãCHA
+054A:ARMENIAN\ãPEH
+054B:ARMENIAN\ãJHEH
+054C:ARMENIAN\ãRA
+054D:ARMENIAN\ãSEH
+054E:ARMENIAN\ãVEW
+054F:ARMENIAN\ãTIWN
+0550:ARMENIAN\ãREH
+0551:ARMENIAN\ãCO
+0552:ARMENIAN\ãYIWN
+0553:ARMENIAN\ãPIWR
+0554:ARMENIAN\ãKEH
+0555:ARMENIAN\ãOH
+0556:ARMENIAN\ãFEH
+0559:ARMENIAN \®\‰ HALF R\ô
+055A:ARMENIAN APOSTROPHE
+055B:ARMENIAN EMPHASIS\¥
+055C:ARMENIAN EXCLAM\”\¥
+055D:ARMENIAN COMMA
+055E:ARMENIAN QUESTION\¥
+055F:ARMENIAN ABBREVI\”\¥
+0561:ARMENIAN\N\@AYB
+0562:ARMENIAN\N\@BEN
+0563:ARMENIAN\N\@GIM
+0564:ARMENIAN\N\@DA
+0565:ARMENIAN\N\@ECH
+0566:ARMENIAN\N\@ZA
+0567:ARMENIAN\N\@EH
+0568:ARMENIAN\N\@ET
+0569:ARMENIAN\N\@TO
+056A:ARMENIAN\N\@ZHE
+056B:ARMENIAN\N\@INI
+056C:ARMENIAN\N\@LIWN
+056D:ARMENIAN\N\@XEH
+056E:ARMENIAN\N\@CA
+056F:ARMENIAN\N\@KEN
+0570:ARMENIAN\N\@HO
+0571:ARMENIAN\N\@JA
+0572:ARMENIAN\N\@GHAD
+0573:ARMENIAN\N\@CHEH
+0574:ARMENIAN\N\@MEN
+0575:ARMENIAN\N\@YI
+0576:ARMENIAN\N\@NOW
+0577:ARMENIAN\N\@SHA
+0578:ARMENIAN\N\@VO
+0579:ARMENIAN\N\@CHA
+057A:ARMENIAN\N\@PEH
+057B:ARMENIAN\N\@JHEH
+057C:ARMENIAN\N\@RA
+057D:ARMENIAN\N\@SEH
+057E:ARMENIAN\N\@VEW
+057F:ARMENIAN\N\@TIWN
+0580:ARMENIAN\N\@REH
+0581:ARMENIAN\N\@CO
+0582:ARMENIAN\N\@YIWN
+0583:ARMENIAN\N\@PIWR
+0584:ARMENIAN\N\@KEH
+0585:ARMENIAN\N\@OH
+0586:ARMENIAN\N\@FEH
+0587:ARMENIAN\Ç\òECH YIWN
+0589:ARMENIAN\é
+058A:ARMENIAN HYPHEN
+0591:\Ÿ\× ETNAHTA
+0592:\Ÿ\× SEGOL
+0593:\Ÿ\× SHALSHELET
+0594:\Ÿ\× ZAQEF QATAN
+0595:\Ÿ\× ZAQEF GADOL
+0596:\Ÿ\× TIPEHA
+0597:\Ÿ\× REVIA
+0598:\Ÿ\× ZARQA
+0599:\Ÿ\× PASHTA
+059A:\Ÿ\× YETIV
+059B:\Ÿ\× TEVIR
+059C:\Ÿ\× GERESH
+059D:\Ÿ\× GERESH MUQDAM
+059E:\Ÿ\× GERSHAYIM
+059F:\Ÿ\× QARNEY PARA
+05A0:\Ÿ\× TELISHA GEDOLA
+05A1:\Ÿ\× PAZER
+05A3:\Ÿ\× MUNAH
+05A4:\Ÿ\× MAHAPAKH
+05A5:\Ÿ\× MERKHA
+05A6:\Ÿ\× MERKHA KEFULA
+05A7:\Ÿ\× DARGA
+05A8:\Ÿ\× QADMA
+05A9:\Ÿ\× TELISHA QETANA
+05AA:\Ÿ\× YERAH BEN YOMO
+05AB:\Ÿ\× OLE
+05AC:\Ÿ\× ILUY
+05AD:\Ÿ\× DEHI
+05AE:\Ÿ\× ZINOR
+05AF:\Ÿ\¥ MASORA \Ð
+05B0:\Ÿ POINT SHEVA
+05B1:\Ÿ POINT HATAF SEGOL
+05B2:\Ÿ POINT HATAF PATAH
+05B3:\Ÿ POINT HATAF QAMATS
+05B4:\Ÿ POINT HIRIQ
+05B5:\Ÿ POINT TSERE
+05B6:\Ÿ POINT SEGOL
+05B7:\Ÿ POINT PATAH
+05B8:\Ÿ POINT QAMATS
+05B9:\Ÿ POINT HOLAM
+05BB:\Ÿ POINT QUBUTS
+05BC:\Ÿ POINT DAGESH OR MAPIQ
+05BD:\Ÿ POINT METEG
+05BE:\Ÿ PUNCTU\” MAQAF
+05BF:\Ÿ POINT RAFE
+05C0:\Ÿ PUNCTU\” PASEQ
+05C1:\Ÿ POINT SHIN DOT
+05C2:\Ÿ POINT SIN DOT
+05C3:\Ÿ PUNCTU\” SOF PASUQ
+05C4:\Ÿ\¥ \÷DOT
+05D0:\Ÿ\@ALEF
+05D1:\Ÿ\@BET
+05D2:\Ÿ\@GIMEL
+05D3:\Ÿ\@DALET
+05D4:\Ÿ\@HE
+05D5:\Ÿ\@VAV
+05D6:\Ÿ\@ZAYIN
+05D7:\Ÿ\@HET
+05D8:\Ÿ\@TET
+05D9:\Ÿ\@YOD
+05DA:\Ÿ\@FINAL KAF
+05DB:\Ÿ\@KAF
+05DC:\Ÿ\@LAMED
+05DD:\Ÿ\@FINAL MEM
+05DE:\Ÿ\@MEM
+05DF:\Ÿ\@FINAL NUN
+05E0:\Ÿ\@NUN
+05E1:\Ÿ\@SAMEKH
+05E2:\Ÿ\@AYIN
+05E3:\Ÿ\@FINAL PE
+05E4:\Ÿ\@PE
+05E5:\Ÿ\@FINAL TSADI
+05E6:\Ÿ\@TSADI
+05E7:\Ÿ\@QOF
+05E8:\Ÿ\@RESH
+05E9:\Ÿ\@SHIN
+05EA:\Ÿ\@TAV
+05F0:\Ÿ \òYIDDISH \0 VAV
+05F1:\Ÿ \òYIDDISH VAV YOD
+05F2:\Ÿ \òYIDDISH \0 YOD
+05F3:\Ÿ PUNCTU\” GERESH
+05F4:\Ÿ PUNCTU\” GERSHAYIM
+060C:\Ê COMMA
+061B:\Ê SEMICOLON
+061F:\Ê QUESTION\¥
+0621:\^HAMZA
+0622:\^ALEF\HMADDA\p
+0623:\^ALEF\HHAMZA\p
+0624:\^WAW\HHAMZA\p
+0625:\^ALEF\HHAMZA\…
+0626:\^\º
+0627:\^ALEF
+0628:\^BEH
+0629:\^TEH MARBUTA
+062A:\^TEH
+062B:\^THEH
+062C:\^JEEM
+062D:\^HAH
+062E:\^KHAH
+062F:\^DAL
+0630:\^THAL
+0631:\^REH
+0632:\^ZAIN
+0633:\^SEEN
+0634:\^SHEEN
+0635:\^SAD
+0636:\^DAD
+0637:\^TAH
+0638:\^ZAH
+0639:\^AIN
+063A:\^GHAIN
+0640:\Ê TATWEEL
+0641:\^FEH
+0642:\^QAF
+0643:\^KAF
+0644:\^LAM
+0645:\^MEEM
+0646:\^NOON
+0647:\^HEH
+0648:\^WAW
+0649:\^ALEF MAKSURA
+064A:\^YEH
+064B:\Ê FATHATAN
+064C:\Ê DAMMATAN
+064D:\Ê KASRATAN
+064E:\Ê FATHA
+064F:\Ê DAMMA
+0650:\Ê KASRA
+0651:\Ê SHADDA
+0652:\Ê SUKUN
+0653:\Ê MADDAH\p
+0654:\Ê HAMZA\p
+0655:\Ê HAMZA\…
+0660:\Ê-INDIC\hZERO
+0661:\Ê-INDIC\hONE
+0662:\Ê-INDIC\hTWO
+0663:\Ê-INDIC\hTHREE
+0664:\Ê-INDIC\hFOUR
+0665:\Ê-INDIC\hFIVE
+0666:\Ê-INDIC\hSIX
+0667:\Ê-INDIC\hSEVEN
+0668:\Ê-INDIC\hE\¼
+0669:\Ê-INDIC\hNINE
+066A:\Ê PERCENT\‚
+066B:\Ê DECIMAL SEPARATOR
+066C:\Ê THOUSANDS SEPARATOR
+066D:\Ê FIVE POINT\ÂSTAR
+066E:\^DOTLESS BEH
+066F:\^DOTLESS QAF
+0670:\^SUPER\Ž ALEF
+0671:\^ALEF WASLA
+0672:\^ALEF\HWAVY HAMZA\p
+0673:\^ALEF\HWAVY HAMZA\…
+0674:\^HIGH HAMZA
+0675:\^HIGH HAMZA ALEF
+0676:\^HIGH HAMZA WAW
+0677:\^U\HHAMZA\p
+0678:\^HIGH HAMZA YEH
+0679:\^TTEH
+067A:\^TTEHEH
+067B:\^BEEH
+067C:\^TEH\HR\ô
+067D:\^TEH\HTHREE DOTS\p \Ë\Š
+067E:\^PEH
+067F:\^TEHEH
+0680:\^BEHEH
+0681:\^HAH\HHAMZA\p
+0682:\^HAH\HTWO DOTS \€\p
+0683:\^NYEH
+0684:\^DYEH
+0685:\^HAH\HTHREE DOTS\p
+0686:\^TCHEH
+0687:\^TCHEHEH
+0688:\^DDAL
+0689:\^DAL\HR\ô
+068A:\^DAL\³\…
+068B:\^DAL\³\… AND\ÇTAH
+068C:\^DAHAL
+068D:\^DDAHAL
+068E:\^DUL
+068F:\^DAL\HTHREE DOTS\p \Ë\Š
+0690:\^DAL\HFOUR DOTS\p
+0691:\^RREH
+0692:\^REH WITH\ÇV
+0693:\^REH\HR\ô
+0694:\^REH\³\…
+0695:\^REH WITH\ÇV\…
+0696:\^REH\³\…\iDOT\p
+0697:\^REH\HTWO DOTS\p
+0698:\^JEH
+0699:\^REH\HFOUR DOTS\p
+069A:\^SEEN\³\…\iDOT\p
+069B:\^SEEN\HTHREE DOTS\…
+069C:\^SEEN\HTHREE DOTS\…\iTHREE DOTS\p
+069D:\^SAD\HTWO DOTS\…
+069E:\^SAD\HTHREE DOTS\p
+069F:\^TAH\HTHREE DOTS\p
+06A0:\^AIN\HTHREE DOTS\p
+06A1:\^DOTLESS FEH
+06A2:\^FEH\³ MOVED\…
+06A3:\^FEH\³\…
+06A4:\^VEH
+06A5:\^FEH\HTHREE DOTS\…
+06A6:\^PEHEH
+06A7:\^QAF\³\p
+06A8:\^QAF\HTHREE DOTS\p
+06A9:\^KEHEH
+06AA:\^SWASH KAF
+06AB:\^KAF\HR\ô
+06AC:\^KAF\³\p
+06AD:\^NG
+06AE:\^KAF\HTHREE DOTS\…
+06AF:\^GAF
+06B0:\^GAF\HR\ô
+06B1:\^NGOEH
+06B2:\^GAF\HTWO DOTS\…
+06B3:\^GUEH
+06B4:\^GAF\HTHREE DOTS\p
+06B5:\^LAM WITH\ÇV
+06B6:\^LAM\³\p
+06B7:\^LAM\HTHREE DOTS\p
+06B8:\^LAM\HTHREE DOTS\…
+06B9:\^NOON\³\…
+06BA:\^NOON GHUNNA
+06BB:\^RNOON
+06BC:\^NOON\HR\ô
+06BD:\^NOON\HTHREE DOTS\p
+06BE:\^HEH DOACHASHMEE
+06BF:\^TCHEH\³\p
+06C0:\^HEH\HYEH\p
+06C1:\^HEH GOAL
+06C2:\^HEH GOAL\HHAMZA\p
+06C3:\^TEH MARBUTA GOAL
+06C4:\^WAW\HR\ô
+06C5:\^KIRGHIZ OE
+06C6:\^OE
+06C7:\^U
+06C8:\^YU
+06C9:\^KIRGHIZ YU
+06CA:\^WAW\HTWO DOTS\p
+06CB:\^VE
+06CC:\^FARSI YEH
+06CD:\^YEH\HTAIL
+06CE:\^YEH WITH\ÇV
+06CF:\^WAW\³\p
+06D0:\^E
+06D1:\^YEH\HTHREE DOTS\…
+06D2:\^YEH\ìREE
+06D3:\^YEH\ìREE\HHAMZA\p
+06D4:\Ê\é
+06D5:\^AE
+06D6:\Ê\ÇHIGH \òSAD\HLAM\‡
+06D7:\Ê\ÇHIGH \òQAF\HLAM\‡
+06D8:\Ê\ÇHIGH MEEM\2
+06D9:\Ê\ÇHIGH LAM ALEF
+06DA:\Ê\ÇHIGH JEEM
+06DB:\Ê\ÇHIGH THREE DOTS
+06DC:\Ê\ÇHIGH SEEN
+06DD:\Ê END OF AYAH
+06DE:\Ê START OF RUB EL HIZB
+06DF:\Ê\ÇHIGH ROUND\ÂZERO
+06E0:\Ê\ÇHIGH UP\ùRECTANGULAR ZERO
+06E1:\Ê\ÇHIGH DOTLESS HEAD OF KHAH
+06E2:\Ê\ÇHIGH MEEM\Q
+06E3:\Ê\ÇLOW SEEN
+06E4:\Ê\ÇHIGH MADDA
+06E5:\Ê\ÇWAW
+06E6:\Ê\ÇYEH
+06E7:\Ê\ÇHIGH YEH
+06E8:\Ê\ÇHIGH NOON
+06E9:\Ê PLACE OF SAJDAH
+06EA:\Ê EMPTY CENTRE LOW STOP
+06EB:\Ê EMPTY CENTRE HIGH STOP
+06EC:\Ê ROUND\ÂHIGH STOP\HFILL\ÂCENTRE
+06ED:\Ê\ÇLOW MEEM
+06F0:EXTEND\Â\Ê-INDIC\hZERO
+06F1:EXTEND\Â\Ê-INDIC\hONE
+06F2:EXTEND\Â\Ê-INDIC\hTWO
+06F3:EXTEND\Â\Ê-INDIC\hTHREE
+06F4:EXTEND\Â\Ê-INDIC\hFOUR
+06F5:EXTEND\Â\Ê-INDIC\hFIVE
+06F6:EXTEND\Â\Ê-INDIC\hSIX
+06F7:EXTEND\Â\Ê-INDIC\hSEVEN
+06F8:EXTEND\Â\Ê-INDIC\hE\¼
+06F9:EXTEND\Â\Ê-INDIC\hNINE
+06FA:\^SHEEN\³\…
+06FB:\^DAD\³\…
+06FC:\^GHAIN\³\…
+06FD:\Ê\‚ SINDHI AMPERSAND
+06FE:\Ê\‚ SINDHI POSTPOSITION MEN
+0700:\Ó END OF PARAGRAPH
+0701:\Ó SUPRA\äAR\é
+0702:\Ó SUB\äAR\é
+0703:\Ó SUPRA\äAR COLON
+0704:\Ó SUB\äAR COLON
+0705:\Ó \ COLON
+0706:\Ó COLON SKEW\Â\‰
+0707:\Ó COLON SKEW\Â\q
+0708:\Ó SUPRA\äAR COLON SKEW\Â\‰
+0709:\Ó SUB\äAR COLON SKEW\Â\q
+070A:\Ó CONTRACTION
+070B:\Ó HARKLEAN OBELUS
+070C:\Ó HARKLEAN METOBELUS
+070D:\Ó HARKLEAN ASTERISCUS
+070F:\Ó ABBREVI\”\¥
+0710:\Ó\@ALAPH
+0711:\Ó\@SUPER\Ž ALAPH
+0712:\Ó\@BETH
+0713:\Ó\@GAMAL
+0714:\Ó\@GAMAL GARSHUNI
+0715:\Ó\@DALATH
+0716:\Ó\@DOTLESS DALATH RISH
+0717:\Ó\@HE
+0718:\Ó\@WAW
+0719:\Ó\@ZAIN
+071A:\Ó\@HETH
+071B:\Ó\@TETH
+071C:\Ó\@TETH GARSHUNI
+071D:\Ó\@YUDH
+071E:\Ó\@YUDH HE
+071F:\Ó\@KAPH
+0720:\Ó\@LAMADH
+0721:\Ó\@MIM
+0722:\Ó\@NUN
+0723:\Ó\@SEMKATH
+0724:\Ó\@FINAL SEMKATH
+0725:\Ó\@E
+0726:\Ó\@PE
+0727:\Ó\@\öPE
+0728:\Ó\@SADHE
+0729:\Ó\@QAPH
+072A:\Ó\@RISH
+072B:\Ó\@SHIN
+072C:\Ó\@TAW
+0730:\Ó PTHAHA\p
+0731:\Ó PTHAHA\…
+0732:\Ó PTHAHA DOTTED
+0733:\Ó ZQAPHA\p
+0734:\Ó ZQAPHA\…
+0735:\Ó ZQAPHA DOTTED
+0736:\Ó RBASA\p
+0737:\Ó RBASA\…
+0738:\Ó DOTT\ÂZLAMA \
+0739:\Ó DOTT\ÂZLAMA ANGULAR
+073A:\Ó HBASA\p
+073B:\Ó HBASA\…
+073C:\Ó HBASA-ESASA DOTTED
+073D:\Ó ESASA\p
+073E:\Ó ESASA\…
+073F:\Ó RWAHA
+0740:\Ó FEMININE DOT
+0741:\Ó QUSHSHAYA
+0742:\Ó RUKKAKHA
+0743:\Ó TWO \€ DOTS\p
+0744:\Ó TWO \€ DOTS\…
+0745:\Ó THREE DOTS\p
+0746:\Ó THREE DOTS\…
+0747:\Ó OBLIQUE \ä\p
+0748:\Ó OBLIQUE \ä\…
+0749:\Ó MUSIC
+074A:\Ó\ìREKH
+0780:\ëHAA
+0781:\ëSHAVIYANI
+0782:\ëNOONU
+0783:\ëRAA
+0784:\ëBAA
+0785:\ëLHAVIYANI
+0786:\ëKAAFU
+0787:\ëALIFU
+0788:\ëVAAVU
+0789:\ëMEEMU
+078A:\ëFAAFU
+078B:\ëDHAALU
+078C:\ëTHAA
+078D:\ëLAAMU
+078E:\ëGAAFU
+078F:\ëGNAVIYANI
+0790:\ëSEENU
+0791:\ëDAVIYANI
+0792:\ëZAVIYANI
+0793:\ëTAVIYANI
+0794:\ëYAA
+0795:\ëPAVIYANI
+0796:\ëJAVIYANI
+0797:\ëCHAVIYANI
+0798:\ëTTAA
+0799:\ëHHAA
+079A:\ëKHAA
+079B:\ëTHAALU
+079C:\ëZAA
+079D:\ëSHEENU
+079E:\ëSAADHU
+079F:\ëDAADHU
+07A0:\ëTO
+07A1:\ëZO
+07A2:\ëAINU
+07A3:\ëGHAINU
+07A4:\ëQAAFU
+07A5:\ëWAAVU
+07A6:THAANA ABAFILI
+07A7:THAANA AABAAFILI
+07A8:THAANA IBIFILI
+07A9:THAANA EEBEEFILI
+07AA:THAANA UBUFILI
+07AB:THAANA OOBOOFILI
+07AC:THAANA EBEFILI
+07AD:THAANA EYBEYFILI
+07AE:THAANA OBOFILI
+07AF:THAANA OABOAFILI
+07B0:THAANA SUKUN
+07B1:\ëNAA
+0901:\„\‚ CANDRABINDU
+0902:\„\‚ ANUSVARA
+0903:\„\‚ VISARGA
+0905:\„\@A
+0906:\„\@AA
+0907:\„\@I
+0908:\„\@II
+0909:\„\@U
+090A:\„\@UU
+090B:\„\@\ÎR
+090C:\„\@\ÎL
+090D:\„\@CANDRA E
+090E:\„\@SHORT E
+090F:\„\@E
+0910:\„\@AI
+0911:\„\@CANDRA O
+0912:\„\@SHORT O
+0913:\„\@O
+0914:\„\@AU
+0915:\„\@KA
+0916:\„\@KHA
+0917:\„\@GA
+0918:\„\@GHA
+0919:\„\@NGA
+091A:\„\@CA
+091B:\„\@CHA
+091C:\„\@JA
+091D:\„\@JHA
+091E:\„\@NYA
+091F:\„\@TTA
+0920:\„\@TTHA
+0921:\„\@DDA
+0922:\„\@DDHA
+0923:\„\@NNA
+0924:\„\@TA
+0925:\„\@THA
+0926:\„\@DA
+0927:\„\@DHA
+0928:\„\@NA
+0929:\„\@NNNA
+092A:\„\@PA
+092B:\„\@PHA
+092C:\„\@BA
+092D:\„\@BHA
+092E:\„\@MA
+092F:\„\@YA
+0930:\„\@RA
+0931:\„\@RRA
+0932:\„\@LA
+0933:\„\@LLA
+0934:\„\@LLLA
+0935:\„\@VA
+0936:\„\@SHA
+0937:\„\@SSA
+0938:\„\@SA
+0939:\„\@HA
+093C:\„\‚ NUKTA
+093D:\„\‚ AVAGRAHA
+093E:\„\bAA
+093F:\„\bI
+0940:\„\bII
+0941:\„\bU
+0942:\„\bUU
+0943:\„\b\ÎR
+0944:\„\b\ÎRR
+0945:\„\bCANDRA E
+0946:\„\bSHORT E
+0947:\„\bE
+0948:\„\bAI
+0949:\„\bCANDRA O
+094A:\„\bSHORT O
+094B:\„\bO
+094C:\„\bAU
+094D:\„\‚ VIRAMA
+0950:\„ OM
+0951:\„ STRESS\‚ UDATTA
+0952:\„ STRESS\‚ ANUDATTA
+0953:\„ GRAVE\×
+0954:\„ \Ü\×
+0958:\„\@QA
+0959:\„\@KHHA
+095A:\„\@GHHA
+095B:\„\@ZA
+095C:\„\@DDDHA
+095D:\„\@RHA
+095E:\„\@FA
+095F:\„\@YYA
+0960:\„\@\ÎRR
+0961:\„\@\ÎLL
+0962:\„\b\ÎL
+0963:\„\b\ÎLL
+0964:\„ DANDA
+0965:\„ \0 DANDA
+0966:\„\hZERO
+0967:\„\hONE
+0968:\„\hTWO
+0969:\„\hTHREE
+096A:\„\hFOUR
+096B:\„\hFIVE
+096C:\„\hSIX
+096D:\„\hSEVEN
+096E:\„\hE\¼
+096F:\„\hNINE
+0970:\„ ABBREVI\”\‚
+0981:\°\‚ CANDRABINDU
+0982:\°\‚ ANUSVARA
+0983:\°\‚ VISARGA
+0985:\°\@A
+0986:\°\@AA
+0987:\°\@I
+0988:\°\@II
+0989:\°\@U
+098A:\°\@UU
+098B:\°\@\ÎR
+098C:\°\@\ÎL
+098F:\°\@E
+0990:\°\@AI
+0993:\°\@O
+0994:\°\@AU
+0995:\°\@KA
+0996:\°\@KHA
+0997:\°\@GA
+0998:\°\@GHA
+0999:\°\@NGA
+099A:\°\@CA
+099B:\°\@CHA
+099C:\°\@JA
+099D:\°\@JHA
+099E:\°\@NYA
+099F:\°\@TTA
+09A0:\°\@TTHA
+09A1:\°\@DDA
+09A2:\°\@DDHA
+09A3:\°\@NNA
+09A4:\°\@TA
+09A5:\°\@THA
+09A6:\°\@DA
+09A7:\°\@DHA
+09A8:\°\@NA
+09AA:\°\@PA
+09AB:\°\@PHA
+09AC:\°\@BA
+09AD:\°\@BHA
+09AE:\°\@MA
+09AF:\°\@YA
+09B0:\°\@RA
+09B2:\°\@LA
+09B6:\°\@SHA
+09B7:\°\@SSA
+09B8:\°\@SA
+09B9:\°\@HA
+09BC:\°\‚ NUKTA
+09BE:\°\bAA
+09BF:\°\bI
+09C0:\°\bII
+09C1:\°\bU
+09C2:\°\bUU
+09C3:\°\b\ÎR
+09C4:\°\b\ÎRR
+09C7:\°\bE
+09C8:\°\bAI
+09CB:\°\bO
+09CC:\°\bAU
+09CD:\°\‚ VIRAMA
+09D7:\° AU LENGTH\¥
+09DC:\°\@RRA
+09DD:\°\@RHA
+09DF:\°\@YYA
+09E0:\°\@\ÎRR
+09E1:\°\@\ÎLL
+09E2:\°\b\ÎL
+09E3:\°\b\ÎLL
+09E6:\°\hZERO
+09E7:\°\hONE
+09E8:\°\hTWO
+09E9:\°\hTHREE
+09EA:\°\hFOUR
+09EB:\°\hFIVE
+09EC:\°\hSIX
+09ED:\°\hSEVEN
+09EE:\°\hE\¼
+09EF:\°\hNINE
+09F0:\°\@RA\HMIDDLE DIAGONAL
+09F1:\°\@RA\H\ïDIAGONAL
+09F2:\° RUPEE\¥
+09F3:\° RUPEE\‚
+09F4:\° CURRENCY NUMERATOR ONE
+09F5:\° CURRENCY NUMERATOR TWO
+09F6:\° CURRENCY NUMERATOR THREE
+09F7:\° CURRENCY NUMERATOR FOUR
+09F8:\° CURRENCY NUMERATOR ONE LESS THAN THE DENOMINATOR
+09F9:\° CURRENCY DENOMINATOR SIXTEEN
+09FA:\° ISSHAR
+0A02:\¯\‚ BINDI
+0A05:\¯\@A
+0A06:\¯\@AA
+0A07:\¯\@I
+0A08:\¯\@II
+0A09:\¯\@U
+0A0A:\¯\@UU
+0A0F:\¯\@EE
+0A10:\¯\@AI
+0A13:\¯\@OO
+0A14:\¯\@AU
+0A15:\¯\@KA
+0A16:\¯\@KHA
+0A17:\¯\@GA
+0A18:\¯\@GHA
+0A19:\¯\@NGA
+0A1A:\¯\@CA
+0A1B:\¯\@CHA
+0A1C:\¯\@JA
+0A1D:\¯\@JHA
+0A1E:\¯\@NYA
+0A1F:\¯\@TTA
+0A20:\¯\@TTHA
+0A21:\¯\@DDA
+0A22:\¯\@DDHA
+0A23:\¯\@NNA
+0A24:\¯\@TA
+0A25:\¯\@THA
+0A26:\¯\@DA
+0A27:\¯\@DHA
+0A28:\¯\@NA
+0A2A:\¯\@PA
+0A2B:\¯\@PHA
+0A2C:\¯\@BA
+0A2D:\¯\@BHA
+0A2E:\¯\@MA
+0A2F:\¯\@YA
+0A30:\¯\@RA
+0A32:\¯\@LA
+0A33:\¯\@LLA
+0A35:\¯\@VA
+0A36:\¯\@SHA
+0A38:\¯\@SA
+0A39:\¯\@HA
+0A3C:\¯\‚ NUKTA
+0A3E:\¯\bAA
+0A3F:\¯\bI
+0A40:\¯\bII
+0A41:\¯\bU
+0A42:\¯\bUU
+0A47:\¯\bEE
+0A48:\¯\bAI
+0A4B:\¯\bOO
+0A4C:\¯\bAU
+0A4D:\¯\‚ VIRAMA
+0A59:\¯\@KHHA
+0A5A:\¯\@GHHA
+0A5B:\¯\@ZA
+0A5C:\¯\@RRA
+0A5E:\¯\@FA
+0A66:\¯\hZERO
+0A67:\¯\hONE
+0A68:\¯\hTWO
+0A69:\¯\hTHREE
+0A6A:\¯\hFOUR
+0A6B:\¯\hFIVE
+0A6C:\¯\hSIX
+0A6D:\¯\hSEVEN
+0A6E:\¯\hE\¼
+0A6F:\¯\hNINE
+0A70:\¯ TIPPI
+0A71:\¯ ADDAK
+0A72:\¯ IRI
+0A73:\¯ URA
+0A74:\¯ EK ONKAR
+0A81:\ª\‚ CANDRABINDU
+0A82:\ª\‚ ANUSVARA
+0A83:\ª\‚ VISARGA
+0A85:\ª\@A
+0A86:\ª\@AA
+0A87:\ª\@I
+0A88:\ª\@II
+0A89:\ª\@U
+0A8A:\ª\@UU
+0A8B:\ª\@\ÎR
+0A8D:\ª VOWEL CANDRA E
+0A8F:\ª\@E
+0A90:\ª\@AI
+0A91:\ª VOWEL CANDRA O
+0A93:\ª\@O
+0A94:\ª\@AU
+0A95:\ª\@KA
+0A96:\ª\@KHA
+0A97:\ª\@GA
+0A98:\ª\@GHA
+0A99:\ª\@NGA
+0A9A:\ª\@CA
+0A9B:\ª\@CHA
+0A9C:\ª\@JA
+0A9D:\ª\@JHA
+0A9E:\ª\@NYA
+0A9F:\ª\@TTA
+0AA0:\ª\@TTHA
+0AA1:\ª\@DDA
+0AA2:\ª\@DDHA
+0AA3:\ª\@NNA
+0AA4:\ª\@TA
+0AA5:\ª\@THA
+0AA6:\ª\@DA
+0AA7:\ª\@DHA
+0AA8:\ª\@NA
+0AAA:\ª\@PA
+0AAB:\ª\@PHA
+0AAC:\ª\@BA
+0AAD:\ª\@BHA
+0AAE:\ª\@MA
+0AAF:\ª\@YA
+0AB0:\ª\@RA
+0AB2:\ª\@LA
+0AB3:\ª\@LLA
+0AB5:\ª\@VA
+0AB6:\ª\@SHA
+0AB7:\ª\@SSA
+0AB8:\ª\@SA
+0AB9:\ª\@HA
+0ABC:\ª\‚ NUKTA
+0ABD:\ª\‚ AVAGRAHA
+0ABE:\ª\bAA
+0ABF:\ª\bI
+0AC0:\ª\bII
+0AC1:\ª\bU
+0AC2:\ª\bUU
+0AC3:\ª\b\ÎR
+0AC4:\ª\b\ÎRR
+0AC5:\ª\bCANDRA E
+0AC7:\ª\bE
+0AC8:\ª\bAI
+0AC9:\ª\bCANDRA O
+0ACB:\ª\bO
+0ACC:\ª\bAU
+0ACD:\ª\‚ VIRAMA
+0AD0:\ª OM
+0AE0:\ª\@\ÎRR
+0AE6:\ª\hZERO
+0AE7:\ª\hONE
+0AE8:\ª\hTWO
+0AE9:\ª\hTHREE
+0AEA:\ª\hFOUR
+0AEB:\ª\hFIVE
+0AEC:\ª\hSIX
+0AED:\ª\hSEVEN
+0AEE:\ª\hE\¼
+0AEF:\ª\hNINE
+0B01:ORIYA\‚ CANDRABINDU
+0B02:ORIYA\‚ ANUSVARA
+0B03:ORIYA\‚ VISARGA
+0B05:\âA
+0B06:\âAA
+0B07:\âI
+0B08:\âII
+0B09:\âU
+0B0A:\âUU
+0B0B:\â\ÎR
+0B0C:\â\ÎL
+0B0F:\âE
+0B10:\âAI
+0B13:\âO
+0B14:\âAU
+0B15:\âKA
+0B16:\âKHA
+0B17:\âGA
+0B18:\âGHA
+0B19:\âNGA
+0B1A:\âCA
+0B1B:\âCHA
+0B1C:\âJA
+0B1D:\âJHA
+0B1E:\âNYA
+0B1F:\âTTA
+0B20:\âTTHA
+0B21:\âDDA
+0B22:\âDDHA
+0B23:\âNNA
+0B24:\âTA
+0B25:\âTHA
+0B26:\âDA
+0B27:\âDHA
+0B28:\âNA
+0B2A:\âPA
+0B2B:\âPHA
+0B2C:\âBA
+0B2D:\âBHA
+0B2E:\âMA
+0B2F:\âYA
+0B30:\âRA
+0B32:\âLA
+0B33:\âLLA
+0B36:\âSHA
+0B37:\âSSA
+0B38:\âSA
+0B39:\âHA
+0B3C:ORIYA\‚ NUKTA
+0B3D:ORIYA\‚ AVAGRAHA
+0B3E:ORIYA\bAA
+0B3F:ORIYA\bI
+0B40:ORIYA\bII
+0B41:ORIYA\bU
+0B42:ORIYA\bUU
+0B43:ORIYA\b\ÎR
+0B47:ORIYA\bE
+0B48:ORIYA\bAI
+0B4B:ORIYA\bO
+0B4C:ORIYA\bAU
+0B4D:ORIYA\‚ VIRAMA
+0B56:ORIYA AI LENGTH\¥
+0B57:ORIYA AU LENGTH\¥
+0B5C:\âRRA
+0B5D:\âRHA
+0B5F:\âYYA
+0B60:\â\ÎRR
+0B61:\â\ÎLL
+0B66:ORIYA\hZERO
+0B67:ORIYA\hONE
+0B68:ORIYA\hTWO
+0B69:ORIYA\hTHREE
+0B6A:ORIYA\hFOUR
+0B6B:ORIYA\hFIVE
+0B6C:ORIYA\hSIX
+0B6D:ORIYA\hSEVEN
+0B6E:ORIYA\hE\¼
+0B6F:ORIYA\hNINE
+0B70:ORIYA ISSHAR
+0B82:TAMIL\‚ ANUSVARA
+0B83:TAMIL\‚ VISARGA
+0B85:TAMIL\@A
+0B86:TAMIL\@AA
+0B87:TAMIL\@I
+0B88:TAMIL\@II
+0B89:TAMIL\@U
+0B8A:TAMIL\@UU
+0B8E:TAMIL\@E
+0B8F:TAMIL\@EE
+0B90:TAMIL\@AI
+0B92:TAMIL\@O
+0B93:TAMIL\@OO
+0B94:TAMIL\@AU
+0B95:TAMIL\@KA
+0B99:TAMIL\@NGA
+0B9A:TAMIL\@CA
+0B9C:TAMIL\@JA
+0B9E:TAMIL\@NYA
+0B9F:TAMIL\@TTA
+0BA3:TAMIL\@NNA
+0BA4:TAMIL\@TA
+0BA8:TAMIL\@NA
+0BA9:TAMIL\@NNNA
+0BAA:TAMIL\@PA
+0BAE:TAMIL\@MA
+0BAF:TAMIL\@YA
+0BB0:TAMIL\@RA
+0BB1:TAMIL\@RRA
+0BB2:TAMIL\@LA
+0BB3:TAMIL\@LLA
+0BB4:TAMIL\@LLLA
+0BB5:TAMIL\@VA
+0BB7:TAMIL\@SSA
+0BB8:TAMIL\@SA
+0BB9:TAMIL\@HA
+0BBE:TAMIL\bAA
+0BBF:TAMIL\bI
+0BC0:TAMIL\bII
+0BC1:TAMIL\bU
+0BC2:TAMIL\bUU
+0BC6:TAMIL\bE
+0BC7:TAMIL\bEE
+0BC8:TAMIL\bAI
+0BCA:TAMIL\bO
+0BCB:TAMIL\bOO
+0BCC:TAMIL\bAU
+0BCD:TAMIL\‚ VIRAMA
+0BD7:TAMIL AU LENGTH\¥
+0BE7:TAMIL\hONE
+0BE8:TAMIL\hTWO
+0BE9:TAMIL\hTHREE
+0BEA:TAMIL\hFOUR
+0BEB:TAMIL\hFIVE
+0BEC:TAMIL\hSIX
+0BED:TAMIL\hSEVEN
+0BEE:TAMIL\hE\¼
+0BEF:TAMIL\hNINE
+0BF0:TAMIL \­TEN
+0BF1:TAMIL \­ONE HUNDRED
+0BF2:TAMIL \­ONE THOUSAND
+0C01:\Ï\‚ CANDRABINDU
+0C02:\Ï\‚ ANUSVARA
+0C03:\Ï\‚ VISARGA
+0C05:\Ï\@A
+0C06:\Ï\@AA
+0C07:\Ï\@I
+0C08:\Ï\@II
+0C09:\Ï\@U
+0C0A:\Ï\@UU
+0C0B:\Ï\@\ÎR
+0C0C:\Ï\@\ÎL
+0C0E:\Ï\@E
+0C0F:\Ï\@EE
+0C10:\Ï\@AI
+0C12:\Ï\@O
+0C13:\Ï\@OO
+0C14:\Ï\@AU
+0C15:\Ï\@KA
+0C16:\Ï\@KHA
+0C17:\Ï\@GA
+0C18:\Ï\@GHA
+0C19:\Ï\@NGA
+0C1A:\Ï\@CA
+0C1B:\Ï\@CHA
+0C1C:\Ï\@JA
+0C1D:\Ï\@JHA
+0C1E:\Ï\@NYA
+0C1F:\Ï\@TTA
+0C20:\Ï\@TTHA
+0C21:\Ï\@DDA
+0C22:\Ï\@DDHA
+0C23:\Ï\@NNA
+0C24:\Ï\@TA
+0C25:\Ï\@THA
+0C26:\Ï\@DA
+0C27:\Ï\@DHA
+0C28:\Ï\@NA
+0C2A:\Ï\@PA
+0C2B:\Ï\@PHA
+0C2C:\Ï\@BA
+0C2D:\Ï\@BHA
+0C2E:\Ï\@MA
+0C2F:\Ï\@YA
+0C30:\Ï\@RA
+0C31:\Ï\@RRA
+0C32:\Ï\@LA
+0C33:\Ï\@LLA
+0C35:\Ï\@VA
+0C36:\Ï\@SHA
+0C37:\Ï\@SSA
+0C38:\Ï\@SA
+0C39:\Ï\@HA
+0C3E:\Ï\bAA
+0C3F:\Ï\bI
+0C40:\Ï\bII
+0C41:\Ï\bU
+0C42:\Ï\bUU
+0C43:\Ï\b\ÎR
+0C44:\Ï\b\ÎRR
+0C46:\Ï\bE
+0C47:\Ï\bEE
+0C48:\Ï\bAI
+0C4A:\Ï\bO
+0C4B:\Ï\bOO
+0C4C:\Ï\bAU
+0C4D:\Ï\‚ VIRAMA
+0C55:\Ï LENGTH\¥
+0C56:\Ï AI LENGTH\¥
+0C60:\Ï\@\ÎRR
+0C61:\Ï\@\ÎLL
+0C66:\Ï\hZERO
+0C67:\Ï\hONE
+0C68:\Ï\hTWO
+0C69:\Ï\hTHREE
+0C6A:\Ï\hFOUR
+0C6B:\Ï\hFIVE
+0C6C:\Ï\hSIX
+0C6D:\Ï\hSEVEN
+0C6E:\Ï\hE\¼
+0C6F:\Ï\hNINE
+0C82:\»\‚ ANUSVARA
+0C83:\»\‚ VISARGA
+0C85:\»\@A
+0C86:\»\@AA
+0C87:\»\@I
+0C88:\»\@II
+0C89:\»\@U
+0C8A:\»\@UU
+0C8B:\»\@\ÎR
+0C8C:\»\@\ÎL
+0C8E:\»\@E
+0C8F:\»\@EE
+0C90:\»\@AI
+0C92:\»\@O
+0C93:\»\@OO
+0C94:\»\@AU
+0C95:\»\@KA
+0C96:\»\@KHA
+0C97:\»\@GA
+0C98:\»\@GHA
+0C99:\»\@NGA
+0C9A:\»\@CA
+0C9B:\»\@CHA
+0C9C:\»\@JA
+0C9D:\»\@JHA
+0C9E:\»\@NYA
+0C9F:\»\@TTA
+0CA0:\»\@TTHA
+0CA1:\»\@DDA
+0CA2:\»\@DDHA
+0CA3:\»\@NNA
+0CA4:\»\@TA
+0CA5:\»\@THA
+0CA6:\»\@DA
+0CA7:\»\@DHA
+0CA8:\»\@NA
+0CAA:\»\@PA
+0CAB:\»\@PHA
+0CAC:\»\@BA
+0CAD:\»\@BHA
+0CAE:\»\@MA
+0CAF:\»\@YA
+0CB0:\»\@RA
+0CB1:\»\@RRA
+0CB2:\»\@LA
+0CB3:\»\@LLA
+0CB5:\»\@VA
+0CB6:\»\@SHA
+0CB7:\»\@SSA
+0CB8:\»\@SA
+0CB9:\»\@HA
+0CBE:\»\bAA
+0CBF:\»\bI
+0CC0:\»\bII
+0CC1:\»\bU
+0CC2:\»\bUU
+0CC3:\»\b\ÎR
+0CC4:\»\b\ÎRR
+0CC6:\»\bE
+0CC7:\»\bEE
+0CC8:\»\bAI
+0CCA:\»\bO
+0CCB:\»\bOO
+0CCC:\»\bAU
+0CCD:\»\‚ VIRAMA
+0CD5:\» LENGTH\¥
+0CD6:\» AI LENGTH\¥
+0CDE:\»\@FA
+0CE0:\»\@\ÎRR
+0CE1:\»\@\ÎLL
+0CE6:\»\hZERO
+0CE7:\»\hONE
+0CE8:\»\hTWO
+0CE9:\»\hTHREE
+0CEA:\»\hFOUR
+0CEB:\»\hFIVE
+0CEC:\»\hSIX
+0CED:\»\hSEVEN
+0CEE:\»\hE\¼
+0CEF:\»\hNINE
+0D02:\š\‚ ANUSVARA
+0D03:\š\‚ VISARGA
+0D05:\š\@A
+0D06:\š\@AA
+0D07:\š\@I
+0D08:\š\@II
+0D09:\š\@U
+0D0A:\š\@UU
+0D0B:\š\@\ÎR
+0D0C:\š\@\ÎL
+0D0E:\š\@E
+0D0F:\š\@EE
+0D10:\š\@AI
+0D12:\š\@O
+0D13:\š\@OO
+0D14:\š\@AU
+0D15:\š\@KA
+0D16:\š\@KHA
+0D17:\š\@GA
+0D18:\š\@GHA
+0D19:\š\@NGA
+0D1A:\š\@CA
+0D1B:\š\@CHA
+0D1C:\š\@JA
+0D1D:\š\@JHA
+0D1E:\š\@NYA
+0D1F:\š\@TTA
+0D20:\š\@TTHA
+0D21:\š\@DDA
+0D22:\š\@DDHA
+0D23:\š\@NNA
+0D24:\š\@TA
+0D25:\š\@THA
+0D26:\š\@DA
+0D27:\š\@DHA
+0D28:\š\@NA
+0D2A:\š\@PA
+0D2B:\š\@PHA
+0D2C:\š\@BA
+0D2D:\š\@BHA
+0D2E:\š\@MA
+0D2F:\š\@YA
+0D30:\š\@RA
+0D31:\š\@RRA
+0D32:\š\@LA
+0D33:\š\@LLA
+0D34:\š\@LLLA
+0D35:\š\@VA
+0D36:\š\@SHA
+0D37:\š\@SSA
+0D38:\š\@SA
+0D39:\š\@HA
+0D3E:\š\bAA
+0D3F:\š\bI
+0D40:\š\bII
+0D41:\š\bU
+0D42:\š\bUU
+0D43:\š\b\ÎR
+0D46:\š\bE
+0D47:\š\bEE
+0D48:\š\bAI
+0D4A:\š\bO
+0D4B:\š\bOO
+0D4C:\š\bAU
+0D4D:\š\‚ VIRAMA
+0D57:\š AU LENGTH\¥
+0D60:\š\@\ÎRR
+0D61:\š\@\ÎLL
+0D66:\š\hZERO
+0D67:\š\hONE
+0D68:\š\hTWO
+0D69:\š\hTHREE
+0D6A:\š\hFOUR
+0D6B:\š\hFIVE
+0D6C:\š\hSIX
+0D6D:\š\hSEVEN
+0D6E:\š\hE\¼
+0D6F:\š\hNINE
+0D82:SINHALA\‚ ANUSVARAYA
+0D83:SINHALA\‚ VISARGAYA
+0D85:\¶AYANNA
+0D86:\¶AAYANNA
+0D87:\¶AEYANNA
+0D88:\¶AEEYANNA
+0D89:\¶IYANNA
+0D8A:\¶IIYANNA
+0D8B:\¶UYANNA
+0D8C:\¶UUYANNA
+0D8D:\¶IRUYANNA
+0D8E:\¶IRUUYANNA
+0D8F:\¶ILUYANNA
+0D90:\¶ILUUYANNA
+0D91:\¶EYANNA
+0D92:\¶EEYANNA
+0D93:\¶AIYANNA
+0D94:\¶OYANNA
+0D95:\¶OOYANNA
+0D96:\¶AUYANNA
+0D9A:\¶ALPAPRAANA KAYANNA
+0D9B:\¶MAHAAPRAANA KAYANNA
+0D9C:\¶ALPAPRAANA GAYANNA
+0D9D:\¶MAHAAPRAANA GAYANNA
+0D9E:\¶KANTAJA NAASIKYAYA
+0D9F:\¶SANYAKA GAYANNA
+0DA0:\¶ALPAPRAANA CAYANNA
+0DA1:\¶MAHAAPRAANA CAYANNA
+0DA2:\¶ALPAPRAANA JAYANNA
+0DA3:\¶MAHAAPRAANA JAYANNA
+0DA4:\¶TAALUJA NAASIKYAYA
+0DA5:\¶TAALUJA SANYOOGA NAAKSIKYAYA
+0DA6:\¶SANYAKA JAYANNA
+0DA7:\¶ALPAPRAANA TTAYANNA
+0DA8:\¶MAHAAPRAANA TTAYANNA
+0DA9:\¶ALPAPRAANA DDAYANNA
+0DAA:\¶MAHAAPRAANA DDAYANNA
+0DAB:\¶MUURDHAJA NAYANNA
+0DAC:\¶SANYAKA DDAYANNA
+0DAD:\¶ALPAPRAANA TAYANNA
+0DAE:\¶MAHAAPRAANA TAYANNA
+0DAF:\¶ALPAPRAANA DAYANNA
+0DB0:\¶MAHAAPRAANA DAYANNA
+0DB1:\¶DANTAJA NAYANNA
+0DB3:\¶SANYAKA DAYANNA
+0DB4:\¶ALPAPRAANA PAYANNA
+0DB5:\¶MAHAAPRAANA PAYANNA
+0DB6:\¶ALPAPRAANA BAYANNA
+0DB7:\¶MAHAAPRAANA BAYANNA
+0DB8:\¶MAYANNA
+0DB9:\¶AMBA BAYANNA
+0DBA:\¶YAYANNA
+0DBB:\¶RAYANNA
+0DBD:\¶DANTAJA LAYANNA
+0DC0:\¶VAYANNA
+0DC1:\¶TAALUJA SAYANNA
+0DC2:\¶MUURDHAJA SAYANNA
+0DC3:\¶DANTAJA SAYANNA
+0DC4:\¶HAYANNA
+0DC5:\¶MUURDHAJA LAYANNA
+0DC6:\¶FAYANNA
+0DCA:SINHALA\‚ AL-LAKUNA
+0DCF:SINHALA\bAELA-PILLA
+0DD0:SINHALA\bKETTI AEDA-PILLA
+0DD1:SINHALA\bDIGA AEDA-PILLA
+0DD2:SINHALA\bKETTI IS-PILLA
+0DD3:SINHALA\bDIGA IS-PILLA
+0DD4:SINHALA\bKETTI PAA-PILLA
+0DD6:SINHALA\bDIGA PAA-PILLA
+0DD8:SINHALA\bGAETTA-PILLA
+0DD9:SINHALA\bKOMBUVA
+0DDA:SINHALA\bDIGA KOMBUVA
+0DDB:SINHALA\bKOMBU DEKA
+0DDC:SINHALA\bKOMBUVA HAA AELA-PILLA
+0DDD:SINHALA\bKOMBUVA HAA DIGA AELA-PILLA
+0DDE:SINHALA\bKOMBUVA HAA GAYANUKITTA
+0DDF:SINHALA\bGAYANUKITTA
+0DF2:SINHALA\bDIGA GAETTA-PILLA
+0DF3:SINHALA\bDIGA GAYANUKITTA
+0DF4:SINHALA PUNCTU\” KUNDDALIYA
+0E01:\3KO KAI
+0E02:\3KHO KHAI
+0E03:\3KHO KHUAT
+0E04:\3KHO KHWAI
+0E05:\3KHO KHON
+0E06:\3KHO RAKHANG
+0E07:\3NGO NGU
+0E08:\3CHO CHAN
+0E09:\3CHO CH\ô
+0E0A:\3CHO CHANG
+0E0B:\3SO SO
+0E0C:\3CHO CHOE
+0E0D:\3YO Y\ô
+0E0E:\3DO CHADA
+0E0F:\3TO PATAK
+0E10:\3THO THAN
+0E11:\3THO NANGMONTHO
+0E12:\3THO PHUTHAO
+0E13:\3NO NEN
+0E14:\3DO DEK
+0E15:\3TO TAO
+0E16:\3THO THUNG
+0E17:\3THO THAHAN
+0E18:\3THO THONG
+0E19:\3NO NU
+0E1A:\3BO BAIMAI
+0E1B:\3PO PLA
+0E1C:\3PHO PHUNG
+0E1D:\3FO FA
+0E1E:\3PHO PHAN
+0E1F:\3FO FAN
+0E20:\3PHO SAMPHAO
+0E21:\3MO MA
+0E22:\3YO YAK
+0E23:\3RO RUA
+0E24:\3RU
+0E25:\3LO L\ô
+0E26:\3LU
+0E27:\3WO WAEN
+0E28:\3SO SALA
+0E29:\3SO RUSI
+0E2A:\3SO SUA
+0E2B:\3HO HIP
+0E2C:\3LO CHULA
+0E2D:\3O ANG
+0E2E:\3HO NOKHUK
+0E2F:\3PAIYANNOI
+0E30:\3SARA A
+0E31:\3MAI HAN-AKAT
+0E32:\3SARA AA
+0E33:\3SARA AM
+0E34:\3SARA I
+0E35:\3SARA II
+0E36:\3SARA UE
+0E37:\3SARA UEE
+0E38:\3SARA U
+0E39:\3SARA UU
+0E3A:\3PHINTHU
+0E3F:THAI CURRENCY \ BAHT
+0E40:\3SARA E
+0E41:\3SARA AE
+0E42:\3SARA O
+0E43:\3SARA AI MAIMUAN
+0E44:\3SARA AI MAIMALAI
+0E45:\3LAKKHANGYAO
+0E46:\3MAIYAMOK
+0E47:\3MAITAIKHU
+0E48:\3MAI EK
+0E49:\3MAI THO
+0E4A:\3MAI TRI
+0E4B:\3MAI CHATTAWA
+0E4C:\3THANTHAKHAT
+0E4D:\3NIKHAHIT
+0E4E:\3YAMAKKAN
+0E4F:\3FONGMAN
+0E50:THAI\hZERO
+0E51:THAI\hONE
+0E52:THAI\hTWO
+0E53:THAI\hTHREE
+0E54:THAI\hFOUR
+0E55:THAI\hFIVE
+0E56:THAI\hSIX
+0E57:THAI\hSEVEN
+0E58:THAI\hE\¼
+0E59:THAI\hNINE
+0E5A:\3ANGKHANKHU
+0E5B:\3KHOMUT
+0E81:LAO\@KO
+0E82:LAO\@KHO SUNG
+0E84:LAO\@KHO TAM
+0E87:LAO\@NGO
+0E88:LAO\@CO
+0E8A:LAO\@SO TAM
+0E8D:LAO\@NYO
+0E94:LAO\@DO
+0E95:LAO\@TO
+0E96:LAO\@THO SUNG
+0E97:LAO\@THO TAM
+0E99:LAO\@NO
+0E9A:LAO\@BO
+0E9B:LAO\@PO
+0E9C:LAO\@PHO SUNG
+0E9D:LAO\@FO TAM
+0E9E:LAO\@PHO TAM
+0E9F:LAO\@FO SUNG
+0EA1:LAO\@MO
+0EA2:LAO\@YO
+0EA3:LAO\@LO L\ô
+0EA5:LAO\@LO LOOT
+0EA7:LAO\@WO
+0EAA:LAO\@SO SUNG
+0EAB:LAO\@HO SUNG
+0EAD:LAO\@O
+0EAE:LAO\@HO TAM
+0EAF:LAO ELLIPSIS
+0EB0:LAO\bA
+0EB1:LAO\bMAI KAN
+0EB2:LAO\bAA
+0EB3:LAO\bAM
+0EB4:LAO\bI
+0EB5:LAO\bII
+0EB6:LAO\bY
+0EB7:LAO\bYY
+0EB8:LAO\bU
+0EB9:LAO\bUU
+0EBB:LAO\bMAI KON
+0EBC:LAO SEMIVOWEL\‚ LO
+0EBD:LAO SEMIVOWEL\‚ NYO
+0EC0:LAO\bE
+0EC1:LAO\bEI
+0EC2:LAO\bO
+0EC3:LAO\bAY
+0EC4:LAO\bAI
+0EC6:LAO KO LA
+0EC8:LAO TONE MAI EK
+0EC9:LAO TONE MAI THO
+0ECA:LAO TONE MAI TI
+0ECB:LAO TONE MAI CATAWA
+0ECC:LAO CANCELL\”\¥
+0ECD:LAO NIGGAHITA
+0ED0:LAO\hZERO
+0ED1:LAO\hONE
+0ED2:LAO\hTWO
+0ED3:LAO\hTHREE
+0ED4:LAO\hFOUR
+0ED5:LAO\hFIVE
+0ED6:LAO\hSIX
+0ED7:LAO\hSEVEN
+0ED8:LAO\hE\¼
+0ED9:LAO\hNINE
+0EDC:LAO HO NO
+0EDD:LAO HO MO
+0F00:\5\COM
+0F01:\5\¥ GTER YIG MGO TRUNCAT\ÂA
+0F02:\5\¥ GTER YIG MGO -UM RNAM BCAD MA
+0F03:\5\¥ GTER YIG MGO -UM GTER TSHEG MA
+0F04:\5\¥ INITIAL YIG MGO MDUN MA
+0F05:\5\¥ CLOS\ô YIG MGO SGAB MA
+0F06:\5\¥ CARET YIG MGO PHUR SHAD MA
+0F07:\5\¥ YIG MGO TSHEG SHAD MA
+0F08:\5\¥ SBRUL SHAD
+0F09:\5\¥ BSKUR YIG MGO
+0F0A:\5\¥ BKA- SHOG YIG MGO
+0F0B:\5\¥ INTERSYLLABIC TSHEG
+0F0C:\5\¥ DELIMITER TSHEG BSTAR
+0F0D:\5\¥ SHAD
+0F0E:\5\¥ NYIS SHAD
+0F0F:\5\¥ TSHEG SHAD
+0F10:\5\¥ NYIS TSHEG SHAD
+0F11:\5\¥ RIN CHEN SPUNGS SHAD
+0F12:\5\¥ RGYA GRAM SHAD
+0F13:\5\¥ CARET -DZUD RTAGS ME LONG CAN
+0F14:\5\¥ GTER TSHEG
+0F15:\5 LOGOTYPE\‚ CHAD RTAGS
+0F16:\5 LOGOTYPE\‚ LHAG RTAGS
+0F17:\5 ASTROLOGICAL\‚ SGRA GCAN -CHAR RTAGS
+0F18:\5 ASTROLOGICAL\‚ -KHYUD PA
+0F19:\5 ASTROLOGICAL\‚ SDONG TSHUGS
+0F1A:\5\‚ RDEL DKAR GCIG
+0F1B:\5\‚ RDEL DKAR GNYIS
+0F1C:\5\‚ RDEL DKAR GSUM
+0F1D:\5\‚ RDEL NAG GCIG
+0F1E:\5\‚ RDEL NAG GNYIS
+0F1F:\5\‚ RDEL DKAR RDEL NAG
+0F20:\5\hZERO
+0F21:\5\hONE
+0F22:\5\hTWO
+0F23:\5\hTHREE
+0F24:\5\hFOUR
+0F25:\5\hFIVE
+0F26:\5\hSIX
+0F27:\5\hSEVEN
+0F28:\5\hE\¼
+0F29:\5\hNINE
+0F2A:\5\hHALF ONE
+0F2B:\5\hHALF TWO
+0F2C:\5\hHALF THREE
+0F2D:\5\hHALF FOUR
+0F2E:\5\hHALF FIVE
+0F2F:\5\hHALF SIX
+0F30:\5\hHALF SEVEN
+0F31:\5\hHALF E\¼
+0F32:\5\hHALF NINE
+0F33:\5\hHALF ZERO
+0F34:\5\¥ BSDUS RTAGS
+0F35:\5\¥ NGAS BZUNG NYI ZLA
+0F36:\5\¥ CARET -DZUD RTAGS BZHI MIG CAN
+0F37:\5\¥ NGAS BZUNG SGOR RTAGS
+0F38:\5\¥ CHE MGO
+0F39:\5\¥ TSA -PHRU
+0F3A:\5\¥ GUG RTAGS GYON
+0F3B:\5\¥ GUG RTAGS GYAS
+0F3C:\5\¥ ANG KHANG GYON
+0F3D:\5\¥ ANG KHANG GYAS
+0F3E:\5\‚ YAR TSHES
+0F3F:\5\‚ MAR TSHES
+0F40:\5\@KA
+0F41:\5\@KHA
+0F42:\5\@GA
+0F43:\5\@GHA
+0F44:\5\@NGA
+0F45:\5\@CA
+0F46:\5\@CHA
+0F47:\5\@JA
+0F49:\5\@NYA
+0F4A:\5\@TTA
+0F4B:\5\@TTHA
+0F4C:\5\@DDA
+0F4D:\5\@DDHA
+0F4E:\5\@NNA
+0F4F:\5\@TA
+0F50:\5\@THA
+0F51:\5\@DA
+0F52:\5\@DHA
+0F53:\5\@NA
+0F54:\5\@PA
+0F55:\5\@PHA
+0F56:\5\@BA
+0F57:\5\@BHA
+0F58:\5\@MA
+0F59:\5\@TSA
+0F5A:\5\@TSHA
+0F5B:\5\@DZA
+0F5C:\5\@DZHA
+0F5D:\5\@WA
+0F5E:\5\@ZHA
+0F5F:\5\@ZA
+0F60:\5\@-A
+0F61:\5\@YA
+0F62:\5\@RA
+0F63:\5\@LA
+0F64:\5\@SHA
+0F65:\5\@SSA
+0F66:\5\@SA
+0F67:\5\@HA
+0F68:\5\@A
+0F69:\5\@KSSA
+0F6A:\5\@FIXED-FORM RA
+0F71:\5\bAA
+0F72:\5\bI
+0F73:\5\bII
+0F74:\5\bU
+0F75:\5\bUU
+0F76:\5\b\ÎR
+0F77:\5\b\ÎRR
+0F78:\5\b\ÎL
+0F79:\5\b\ÎLL
+0F7A:\5\bE
+0F7B:\5\bEE
+0F7C:\5\bO
+0F7D:\5\bOO
+0F7E:\5\‚ RJES SU NGA RO
+0F7F:\5\‚ RNAM BCAD
+0F80:\5\b\öI
+0F81:\5\b\öII
+0F82:\5\‚ NYI ZLA NAA DA
+0F83:\5\‚ SNA LDAN
+0F84:\5\¥ HALANTA
+0F85:\5\¥ PALUTA
+0F86:\5\‚ LCI RTAGS
+0F87:\5\‚ YANG RTAGS
+0F88:\5\‚ LCE TSA CAN
+0F89:\5\‚ MCHU CAN
+0F8A:\5\‚ GRU CAN RGY\ôS
+0F8B:\5\‚ GRU M\ÂRGY\ôS
+0F90:\KA
+0F91:\KHA
+0F92:\GA
+0F93:\GHA
+0F94:\NGA
+0F95:\CA
+0F96:\CHA
+0F97:\JA
+0F99:\NYA
+0F9A:\TTA
+0F9B:\TTHA
+0F9C:\DDA
+0F9D:\DDHA
+0F9E:\NNA
+0F9F:\TA
+0FA0:\THA
+0FA1:\DA
+0FA2:\DHA
+0FA3:\NA
+0FA4:\PA
+0FA5:\PHA
+0FA6:\BA
+0FA7:\BHA
+0FA8:\MA
+0FA9:\TSA
+0FAA:\TSHA
+0FAB:\DZA
+0FAC:\DZHA
+0FAD:\WA
+0FAE:\ZHA
+0FAF:\ZA
+0FB0:\-A
+0FB1:\YA
+0FB2:\RA
+0FB3:\LA
+0FB4:\SHA
+0FB5:\SSA
+0FB6:\SA
+0FB7:\HA
+0FB8:\A
+0FB9:\KSSA
+0FBA:\FIXED-FORM WA
+0FBB:\FIXED-FORM YA
+0FBC:\FIXED-FORM RA
+0FBE:\5 KU RU KHA
+0FBF:\5 KU RU KHA BZHI MIG CAN
+0FC0:\5 CANTILL\”\‚ \Å BEAT
+0FC1:\5 CANTILL\”\‚ L\¼ BEAT
+0FC2:\5 CANTILL\”\‚ CANG TE-U
+0FC3:\5 CANTILL\”\‚ SBUB -CHAL
+0FC4:\5 \ DRIL BU
+0FC5:\5 \ RDO RJE
+0FC6:\5 \ PADMA GDAN
+0FC7:\5 \ RDO RJE RGYA GRAM
+0FC8:\5 \ PHUR PA
+0FC9:\5 \ NOR BU
+0FCA:\5 \ NOR BU NYIS -KHYIL
+0FCB:\5 \ NOR BU GSUM -KHYIL
+0FCC:\5 \ NOR BU BZHI -KHYIL
+0FCF:\5\‚ RDEL NAG GSUM
+1000:\½\@KA
+1001:\½\@KHA
+1002:\½\@GA
+1003:\½\@GHA
+1004:\½\@NGA
+1005:\½\@CA
+1006:\½\@CHA
+1007:\½\@JA
+1008:\½\@JHA
+1009:\½\@NYA
+100A:\½\@NNYA
+100B:\½\@TTA
+100C:\½\@TTHA
+100D:\½\@DDA
+100E:\½\@DDHA
+100F:\½\@NNA
+1010:\½\@TA
+1011:\½\@THA
+1012:\½\@DA
+1013:\½\@DHA
+1014:\½\@NA
+1015:\½\@PA
+1016:\½\@PHA
+1017:\½\@BA
+1018:\½\@BHA
+1019:\½\@MA
+101A:\½\@YA
+101B:\½\@RA
+101C:\½\@LA
+101D:\½\@WA
+101E:\½\@SA
+101F:\½\@HA
+1020:\½\@LLA
+1021:\½\@A
+1023:\½\@I
+1024:\½\@II
+1025:\½\@U
+1026:\½\@UU
+1027:\½\@E
+1029:\½\@O
+102A:\½\@AU
+102C:\½\bAA
+102D:\½\bI
+102E:\½\bII
+102F:\½\bU
+1030:\½\bUU
+1031:\½\bE
+1032:\½\bAI
+1036:\½\‚ ANUSVARA
+1037:\½\‚ DOT\…
+1038:\½\‚ VISARGA
+1039:\½\‚ VIRAMA
+1040:\½\hZERO
+1041:\½\hONE
+1042:\½\hTWO
+1043:\½\hTHREE
+1044:\½\hFOUR
+1045:\½\hFIVE
+1046:\½\hSIX
+1047:\½\hSEVEN
+1048:\½\hE\¼
+1049:\½\hNINE
+104A:\½\‚ LITTLE SECTION
+104B:\½\‚ SECTION
+104C:\½ \ LOCATIVE
+104D:\½ \ COMPLETED
+104E:\½ \ AFOREMENTIONED
+104F:\½ \ GENITIVE
+1050:\½\@SHA
+1051:\½\@SSA
+1052:\½\@\ÎR
+1053:\½\@\ÎRR
+1054:\½\@\ÎL
+1055:\½\@\ÎLL
+1056:\½\b\ÎR
+1057:\½\b\ÎRR
+1058:\½\b\ÎL
+1059:\½\b\ÎLL
+10A0:GEORGIAN\ãAN
+10A1:GEORGIAN\ãBAN
+10A2:GEORGIAN\ãGAN
+10A3:GEORGIAN\ãDON
+10A4:GEORGIAN\ãEN
+10A5:GEORGIAN\ãVIN
+10A6:GEORGIAN\ãZEN
+10A7:GEORGIAN\ãTAN
+10A8:GEORGIAN\ãIN
+10A9:GEORGIAN\ãKAN
+10AA:GEORGIAN\ãLAS
+10AB:GEORGIAN\ãMAN
+10AC:GEORGIAN\ãNAR
+10AD:GEORGIAN\ãON
+10AE:GEORGIAN\ãPAR
+10AF:GEORGIAN\ãZHAR
+10B0:GEORGIAN\ãRAE
+10B1:GEORGIAN\ãSAN
+10B2:GEORGIAN\ãTAR
+10B3:GEORGIAN\ãUN
+10B4:GEORGIAN\ãPHAR
+10B5:GEORGIAN\ãKHAR
+10B6:GEORGIAN\ãGHAN
+10B7:GEORGIAN\ãQAR
+10B8:GEORGIAN\ãSHIN
+10B9:GEORGIAN\ãCHIN
+10BA:GEORGIAN\ãCAN
+10BB:GEORGIAN\ãJIL
+10BC:GEORGIAN\ãCIL
+10BD:GEORGIAN\ãCHAR
+10BE:GEORGIAN\ãXAN
+10BF:GEORGIAN\ãJHAN
+10C0:GEORGIAN\ãHAE
+10C1:GEORGIAN\ãHE
+10C2:GEORGIAN\ãHIE
+10C3:GEORGIAN\ãWE
+10C4:GEORGIAN\ãHAR
+10C5:GEORGIAN\ãHOE
+10D0:GEORGIAN\@AN
+10D1:GEORGIAN\@BAN
+10D2:GEORGIAN\@GAN
+10D3:GEORGIAN\@DON
+10D4:GEORGIAN\@EN
+10D5:GEORGIAN\@VIN
+10D6:GEORGIAN\@ZEN
+10D7:GEORGIAN\@TAN
+10D8:GEORGIAN\@IN
+10D9:GEORGIAN\@KAN
+10DA:GEORGIAN\@LAS
+10DB:GEORGIAN\@MAN
+10DC:GEORGIAN\@NAR
+10DD:GEORGIAN\@ON
+10DE:GEORGIAN\@PAR
+10DF:GEORGIAN\@ZHAR
+10E0:GEORGIAN\@RAE
+10E1:GEORGIAN\@SAN
+10E2:GEORGIAN\@TAR
+10E3:GEORGIAN\@UN
+10E4:GEORGIAN\@PHAR
+10E5:GEORGIAN\@KHAR
+10E6:GEORGIAN\@GHAN
+10E7:GEORGIAN\@QAR
+10E8:GEORGIAN\@SHIN
+10E9:GEORGIAN\@CHIN
+10EA:GEORGIAN\@CAN
+10EB:GEORGIAN\@JIL
+10EC:GEORGIAN\@CIL
+10ED:GEORGIAN\@CHAR
+10EE:GEORGIAN\@XAN
+10EF:GEORGIAN\@JHAN
+10F0:GEORGIAN\@HAE
+10F1:GEORGIAN\@HE
+10F2:GEORGIAN\@HIE
+10F3:GEORGIAN\@WE
+10F4:GEORGIAN\@HAR
+10F5:GEORGIAN\@HOE
+10F6:GEORGIAN\@FI
+10F7:GEORGIAN\@YN
+10F8:GEORGIAN\@ELIFI
+10FB:GEORGIAN PARAGRAPH SEPARATOR
+1100:\™KIYEOK
+1101:\™SSANGKIYEOK
+1102:\™N\ÆN
+1103:\™TIKEUT
+1104:\™SSANGTIKEUT
+1105:\™R\ÆL
+1106:\™M\ÆM
+1107:\™P\ÆP
+1108:\™SSANGP\ÆP
+1109:\™SIOS
+110A:\™SSANGSIOS
+110B:\™\ÆNG
+110C:\™C\ÆC
+110D:\™SSANGC\ÆC
+110E:\™CH\ÆCH
+110F:\™KH\ÆKH
+1110:\™TH\ÆTH
+1111:\™PH\ÆPH
+1112:\™H\ÆH
+1113:\™N\ÆN-KIYEOK
+1114:\™SSANGN\ÆN
+1115:\™N\ÆN-TIKEUT
+1116:\™N\ÆN-P\ÆP
+1117:\™TIKEUT-KIYEOK
+1118:\™R\ÆL-N\ÆN
+1119:\™SSANGR\ÆL
+111A:\™R\ÆL-H\ÆH
+111B:\™KAPYEOUNR\ÆL
+111C:\™M\ÆM-P\ÆP
+111D:\™KAPYEOUNM\ÆM
+111E:\™P\ÆP-KIYEOK
+111F:\™P\ÆP-N\ÆN
+1120:\™P\ÆP-TIKEUT
+1121:\™P\ÆP-SIOS
+1122:\™P\ÆP-SIOS-KIYEOK
+1123:\™P\ÆP-SIOS-TIKEUT
+1124:\™P\ÆP-SIOS-P\ÆP
+1125:\™P\ÆP-SSANGSIOS
+1126:\™P\ÆP-SIOS-C\ÆC
+1127:\™P\ÆP-C\ÆC
+1128:\™P\ÆP-CH\ÆCH
+1129:\™P\ÆP-TH\ÆTH
+112A:\™P\ÆP-PH\ÆPH
+112B:\™KAPYEOUNP\ÆP
+112C:\™KAPYEOUNSSANGP\ÆP
+112D:\™SIOS-KIYEOK
+112E:\™SIOS-N\ÆN
+112F:\™SIOS-TIKEUT
+1130:\™SIOS-R\ÆL
+1131:\™SIOS-M\ÆM
+1132:\™SIOS-P\ÆP
+1133:\™SIOS-P\ÆP-KIYEOK
+1134:\™SIOS-SSANGSIOS
+1135:\™SIOS-\ÆNG
+1136:\™SIOS-C\ÆC
+1137:\™SIOS-CH\ÆCH
+1138:\™SIOS-KH\ÆKH
+1139:\™SIOS-TH\ÆTH
+113A:\™SIOS-PH\ÆPH
+113B:\™SIOS-H\ÆH
+113C:\™CHITUEUMSIOS
+113D:\™CHITUEUMSSANGSIOS
+113E:\™CEONGCH\ÆMSIOS
+113F:\™CEONGCH\ÆMSSANGSIOS
+1140:\™PANSIOS
+1141:\™\ÆNG-KIYEOK
+1142:\™\ÆNG-TIKEUT
+1143:\™\ÆNG-M\ÆM
+1144:\™\ÆNG-P\ÆP
+1145:\™\ÆNG-SIOS
+1146:\™\ÆNG-PANSIOS
+1147:\™SSANG\ÆNG
+1148:\™\ÆNG-C\ÆC
+1149:\™\ÆNG-CH\ÆCH
+114A:\™\ÆNG-TH\ÆTH
+114B:\™\ÆNG-PH\ÆPH
+114C:\™YES\ÆNG
+114D:\™C\ÆC-\ÆNG
+114E:\™CHITUEUMC\ÆC
+114F:\™CHITUEUMSSANGC\ÆC
+1150:\™CEONGCH\ÆMC\ÆC
+1151:\™CEONGCH\ÆMSSANGC\ÆC
+1152:\™CH\ÆCH-KH\ÆKH
+1153:\™CH\ÆCH-H\ÆH
+1154:\™CHITUEUMCH\ÆCH
+1155:\™CEONGCH\ÆMCH\ÆCH
+1156:\™PH\ÆPH-P\ÆP
+1157:\™KAPYEOUNPH\ÆPH
+1158:\™SSANGH\ÆH
+1159:\™YEORINH\ÆH
+115F:\™FILLER
+1160:\«FILLER
+1161:\«A
+1162:\«AE
+1163:\«YA
+1164:\«YAE
+1165:\«EO
+1166:\«E
+1167:\«YEO
+1168:\«YE
+1169:\«O
+116A:\«WA
+116B:\«WAE
+116C:\«OE
+116D:\«YO
+116E:\«U
+116F:\«WEO
+1170:\«WE
+1171:\«WI
+1172:\«YU
+1173:\«EU
+1174:\«YI
+1175:\«I
+1176:\«A-O
+1177:\«A-U
+1178:\«YA-O
+1179:\«YA-YO
+117A:\«EO-O
+117B:\«EO-U
+117C:\«EO-EU
+117D:\«YEO-O
+117E:\«YEO-U
+117F:\«O-EO
+1180:\«O-E
+1181:\«O-YE
+1182:\«O-O
+1183:\«O-U
+1184:\«YO-YA
+1185:\«YO-YAE
+1186:\«YO-YEO
+1187:\«YO-O
+1188:\«YO-I
+1189:\«U-A
+118A:\«U-AE
+118B:\«U-EO-EU
+118C:\«U-YE
+118D:\«U-U
+118E:\«YU-A
+118F:\«YU-EO
+1190:\«YU-E
+1191:\«YU-YEO
+1192:\«YU-YE
+1193:\«YU-U
+1194:\«YU-I
+1195:\«EU-U
+1196:\«EU-EU
+1197:\«YI-U
+1198:\«I-A
+1199:\«I-YA
+119A:\«I-O
+119B:\«I-U
+119C:\«I-EU
+119D:\«I-ARAEA
+119E:\«ARAEA
+119F:\«ARAEA-EO
+11A0:\«ARAEA-U
+11A1:\«ARAEA-I
+11A2:\«SSANGARAEA
+11A8:\“KIYEOK
+11A9:\“SSANGKIYEOK
+11AA:\“KIYEOK-SIOS
+11AB:\“N\ÆN
+11AC:\“N\ÆN-C\ÆC
+11AD:\“N\ÆN-H\ÆH
+11AE:\“TIKEUT
+11AF:\“R\ÆL
+11B0:\“R\ÆL-KIYEOK
+11B1:\“R\ÆL-M\ÆM
+11B2:\“R\ÆL-P\ÆP
+11B3:\“R\ÆL-SIOS
+11B4:\“R\ÆL-TH\ÆTH
+11B5:\“R\ÆL-PH\ÆPH
+11B6:\“R\ÆL-H\ÆH
+11B7:\“M\ÆM
+11B8:\“P\ÆP
+11B9:\“P\ÆP-SIOS
+11BA:\“SIOS
+11BB:\“SSANGSIOS
+11BC:\“\ÆNG
+11BD:\“C\ÆC
+11BE:\“CH\ÆCH
+11BF:\“KH\ÆKH
+11C0:\“TH\ÆTH
+11C1:\“PH\ÆPH
+11C2:\“H\ÆH
+11C3:\“KIYEOK-R\ÆL
+11C4:\“KIYEOK-SIOS-KIYEOK
+11C5:\“N\ÆN-KIYEOK
+11C6:\“N\ÆN-TIKEUT
+11C7:\“N\ÆN-SIOS
+11C8:\“N\ÆN-PANSIOS
+11C9:\“N\ÆN-TH\ÆTH
+11CA:\“TIKEUT-KIYEOK
+11CB:\“TIKEUT-R\ÆL
+11CC:\“R\ÆL-KIYEOK-SIOS
+11CD:\“R\ÆL-N\ÆN
+11CE:\“R\ÆL-TIKEUT
+11CF:\“R\ÆL-TIKEUT-H\ÆH
+11D0:\“SSANGR\ÆL
+11D1:\“R\ÆL-M\ÆM-KIYEOK
+11D2:\“R\ÆL-M\ÆM-SIOS
+11D3:\“R\ÆL-P\ÆP-SIOS
+11D4:\“R\ÆL-P\ÆP-H\ÆH
+11D5:\“R\ÆL-KAPYEOUNP\ÆP
+11D6:\“R\ÆL-SSANGSIOS
+11D7:\“R\ÆL-PANSIOS
+11D8:\“R\ÆL-KH\ÆKH
+11D9:\“R\ÆL-YEORINH\ÆH
+11DA:\“M\ÆM-KIYEOK
+11DB:\“M\ÆM-R\ÆL
+11DC:\“M\ÆM-P\ÆP
+11DD:\“M\ÆM-SIOS
+11DE:\“M\ÆM-SSANGSIOS
+11DF:\“M\ÆM-PANSIOS
+11E0:\“M\ÆM-CH\ÆCH
+11E1:\“M\ÆM-H\ÆH
+11E2:\“KAPYEOUNM\ÆM
+11E3:\“P\ÆP-R\ÆL
+11E4:\“P\ÆP-PH\ÆPH
+11E5:\“P\ÆP-H\ÆH
+11E6:\“KAPYEOUNP\ÆP
+11E7:\“SIOS-KIYEOK
+11E8:\“SIOS-TIKEUT
+11E9:\“SIOS-R\ÆL
+11EA:\“SIOS-P\ÆP
+11EB:\“PANSIOS
+11EC:\“\ÆNG-KIYEOK
+11ED:\“\ÆNG-SSANGKIYEOK
+11EE:\“SSANG\ÆNG
+11EF:\“\ÆNG-KH\ÆKH
+11F0:\“YES\ÆNG
+11F1:\“YES\ÆNG-SIOS
+11F2:\“YES\ÆNG-PANSIOS
+11F3:\“PH\ÆPH-P\ÆP
+11F4:\“KAPYEOUNPH\ÆPH
+11F5:\“H\ÆH-N\ÆN
+11F6:\“H\ÆH-R\ÆL
+11F7:\“H\ÆH-M\ÆM
+11F8:\“H\ÆH-P\ÆP
+11F9:\“YEORINH\ÆH
+1200:\VHA
+1201:\VHU
+1202:\VHI
+1203:\VHAA
+1204:\VHEE
+1205:\VHE
+1206:\VHO
+1208:\VLA
+1209:\VLU
+120A:\VLI
+120B:\VLAA
+120C:\VLEE
+120D:\VLE
+120E:\VLO
+120F:\VLWA
+1210:\VHHA
+1211:\VHHU
+1212:\VHHI
+1213:\VHHAA
+1214:\VHHEE
+1215:\VHHE
+1216:\VHHO
+1217:\VHHWA
+1218:\VMA
+1219:\VMU
+121A:\VMI
+121B:\VMAA
+121C:\VMEE
+121D:\VME
+121E:\VMO
+121F:\VMWA
+1220:\VSZA
+1221:\VSZU
+1222:\VSZI
+1223:\VSZAA
+1224:\VSZEE
+1225:\VSZE
+1226:\VSZO
+1227:\VSZWA
+1228:\VRA
+1229:\VRU
+122A:\VRI
+122B:\VRAA
+122C:\VREE
+122D:\VRE
+122E:\VRO
+122F:\VRWA
+1230:\VSA
+1231:\VSU
+1232:\VSI
+1233:\VSAA
+1234:\VSEE
+1235:\VSE
+1236:\VSO
+1237:\VSWA
+1238:\VSHA
+1239:\VSHU
+123A:\VSHI
+123B:\VSHAA
+123C:\VSHEE
+123D:\VSHE
+123E:\VSHO
+123F:\VSHWA
+1240:\VQA
+1241:\VQU
+1242:\VQI
+1243:\VQAA
+1244:\VQEE
+1245:\VQE
+1246:\VQO
+1248:\VQWA
+124A:\VQWI
+124B:\VQWAA
+124C:\VQWEE
+124D:\VQWE
+1250:\VQHA
+1251:\VQHU
+1252:\VQHI
+1253:\VQHAA
+1254:\VQHEE
+1255:\VQHE
+1256:\VQHO
+1258:\VQHWA
+125A:\VQHWI
+125B:\VQHWAA
+125C:\VQHWEE
+125D:\VQHWE
+1260:\VBA
+1261:\VBU
+1262:\VBI
+1263:\VBAA
+1264:\VBEE
+1265:\VBE
+1266:\VBO
+1267:\VBWA
+1268:\VVA
+1269:\VVU
+126A:\VVI
+126B:\VVAA
+126C:\VVEE
+126D:\VVE
+126E:\VVO
+126F:\VVWA
+1270:\VTA
+1271:\VTU
+1272:\VTI
+1273:\VTAA
+1274:\VTEE
+1275:\VTE
+1276:\VTO
+1277:\VTWA
+1278:\VCA
+1279:\VCU
+127A:\VCI
+127B:\VCAA
+127C:\VCEE
+127D:\VCE
+127E:\VCO
+127F:\VCWA
+1280:\VXA
+1281:\VXU
+1282:\VXI
+1283:\VXAA
+1284:\VXEE
+1285:\VXE
+1286:\VXO
+1288:\VXWA
+128A:\VXWI
+128B:\VXWAA
+128C:\VXWEE
+128D:\VXWE
+1290:\VNA
+1291:\VNU
+1292:\VNI
+1293:\VNAA
+1294:\VNEE
+1295:\VNE
+1296:\VNO
+1297:\VNWA
+1298:\VNYA
+1299:\VNYU
+129A:\VNYI
+129B:\VNYAA
+129C:\VNYEE
+129D:\VNYE
+129E:\VNYO
+129F:\VNYWA
+12A0:\VGLOTTAL A
+12A1:\VGLOTTAL U
+12A2:\VGLOTTAL I
+12A3:\VGLOTTAL AA
+12A4:\VGLOTTAL EE
+12A5:\VGLOTTAL E
+12A6:\VGLOTTAL O
+12A7:\VGLOTTAL WA
+12A8:\VKA
+12A9:\VKU
+12AA:\VKI
+12AB:\VKAA
+12AC:\VKEE
+12AD:\VKE
+12AE:\VKO
+12B0:\VKWA
+12B2:\VKWI
+12B3:\VKWAA
+12B4:\VKWEE
+12B5:\VKWE
+12B8:\VKXA
+12B9:\VKXU
+12BA:\VKXI
+12BB:\VKXAA
+12BC:\VKXEE
+12BD:\VKXE
+12BE:\VKXO
+12C0:\VKXWA
+12C2:\VKXWI
+12C3:\VKXWAA
+12C4:\VKXWEE
+12C5:\VKXWE
+12C8:\VWA
+12C9:\VWU
+12CA:\VWI
+12CB:\VWAA
+12CC:\VWEE
+12CD:\VWE
+12CE:\VWO
+12D0:\VPHARYNGEAL A
+12D1:\VPHARYNGEAL U
+12D2:\VPHARYNGEAL I
+12D3:\VPHARYNGEAL AA
+12D4:\VPHARYNGEAL EE
+12D5:\VPHARYNGEAL E
+12D6:\VPHARYNGEAL O
+12D8:\VZA
+12D9:\VZU
+12DA:\VZI
+12DB:\VZAA
+12DC:\VZEE
+12DD:\VZE
+12DE:\VZO
+12DF:\VZWA
+12E0:\VZHA
+12E1:\VZHU
+12E2:\VZHI
+12E3:\VZHAA
+12E4:\VZHEE
+12E5:\VZHE
+12E6:\VZHO
+12E7:\VZHWA
+12E8:\VYA
+12E9:\VYU
+12EA:\VYI
+12EB:\VYAA
+12EC:\VYEE
+12ED:\VYE
+12EE:\VYO
+12F0:\VDA
+12F1:\VDU
+12F2:\VDI
+12F3:\VDAA
+12F4:\VDEE
+12F5:\VDE
+12F6:\VDO
+12F7:\VDWA
+12F8:\VDDA
+12F9:\VDDU
+12FA:\VDDI
+12FB:\VDDAA
+12FC:\VDDEE
+12FD:\VDDE
+12FE:\VDDO
+12FF:\VDDWA
+1300:\VJA
+1301:\VJU
+1302:\VJI
+1303:\VJAA
+1304:\VJEE
+1305:\VJE
+1306:\VJO
+1307:\VJWA
+1308:\VGA
+1309:\VGU
+130A:\VGI
+130B:\VGAA
+130C:\VGEE
+130D:\VGE
+130E:\VGO
+1310:\VGWA
+1312:\VGWI
+1313:\VGWAA
+1314:\VGWEE
+1315:\VGWE
+1318:\VGGA
+1319:\VGGU
+131A:\VGGI
+131B:\VGGAA
+131C:\VGGEE
+131D:\VGGE
+131E:\VGGO
+1320:\VTHA
+1321:\VTHU
+1322:\VTHI
+1323:\VTHAA
+1324:\VTHEE
+1325:\VTHE
+1326:\VTHO
+1327:\VTHWA
+1328:\VCHA
+1329:\VCHU
+132A:\VCHI
+132B:\VCHAA
+132C:\VCHEE
+132D:\VCHE
+132E:\VCHO
+132F:\VCHWA
+1330:\VPHA
+1331:\VPHU
+1332:\VPHI
+1333:\VPHAA
+1334:\VPHEE
+1335:\VPHE
+1336:\VPHO
+1337:\VPHWA
+1338:\VTSA
+1339:\VTSU
+133A:\VTSI
+133B:\VTSAA
+133C:\VTSEE
+133D:\VTSE
+133E:\VTSO
+133F:\VTSWA
+1340:\VTZA
+1341:\VTZU
+1342:\VTZI
+1343:\VTZAA
+1344:\VTZEE
+1345:\VTZE
+1346:\VTZO
+1348:\VFA
+1349:\VFU
+134A:\VFI
+134B:\VFAA
+134C:\VFEE
+134D:\VFE
+134E:\VFO
+134F:\VFWA
+1350:\VPA
+1351:\VPU
+1352:\VPI
+1353:\VPAA
+1354:\VPEE
+1355:\VPE
+1356:\VPO
+1357:\VPWA
+1358:\VRYA
+1359:\VMYA
+135A:\VFYA
+1361:ETHIOPIC WORDSPACE
+1362:ETHIOPIC\é
+1363:ETHIOPIC COMMA
+1364:ETHIOPIC SEMICOLON
+1365:ETHIOPIC COLON
+1366:ETHIOPIC PREFACE COLON
+1367:ETHIOPIC QUESTION\¥
+1368:ETHIOPIC PARAGRAPH SEPARATOR
+1369:ETHIOPIC\hONE
+136A:ETHIOPIC\hTWO
+136B:ETHIOPIC\hTHREE
+136C:ETHIOPIC\hFOUR
+136D:ETHIOPIC\hFIVE
+136E:ETHIOPIC\hSIX
+136F:ETHIOPIC\hSEVEN
+1370:ETHIOPIC\hE\¼
+1371:ETHIOPIC\hNINE
+1372:ETHIOPIC \­TEN
+1373:ETHIOPIC \­TWENTY
+1374:ETHIOPIC \­THIRTY
+1375:ETHIOPIC \­FORTY
+1376:ETHIOPIC \­FIFTY
+1377:ETHIOPIC \­SIXTY
+1378:ETHIOPIC \­SEVENTY
+1379:ETHIOPIC \­E\¼Y
+137A:ETHIOPIC \­NINETY
+137B:ETHIOPIC \­HUNDRED
+137C:ETHIOPIC \­TEN THOUSAND
+13A0:\ŒA
+13A1:\ŒE
+13A2:\ŒI
+13A3:\ŒO
+13A4:\ŒU
+13A5:\ŒV
+13A6:\ŒGA
+13A7:\ŒKA
+13A8:\ŒGE
+13A9:\ŒGI
+13AA:\ŒGO
+13AB:\ŒGU
+13AC:\ŒGV
+13AD:\ŒHA
+13AE:\ŒHE
+13AF:\ŒHI
+13B0:\ŒHO
+13B1:\ŒHU
+13B2:\ŒHV
+13B3:\ŒLA
+13B4:\ŒLE
+13B5:\ŒLI
+13B6:\ŒLO
+13B7:\ŒLU
+13B8:\ŒLV
+13B9:\ŒMA
+13BA:\ŒME
+13BB:\ŒMI
+13BC:\ŒMO
+13BD:\ŒMU
+13BE:\ŒNA
+13BF:\ŒHNA
+13C0:\ŒNAH
+13C1:\ŒNE
+13C2:\ŒNI
+13C3:\ŒNO
+13C4:\ŒNU
+13C5:\ŒNV
+13C6:\ŒQUA
+13C7:\ŒQUE
+13C8:\ŒQUI
+13C9:\ŒQUO
+13CA:\ŒQUU
+13CB:\ŒQUV
+13CC:\ŒSA
+13CD:\ŒS
+13CE:\ŒSE
+13CF:\ŒSI
+13D0:\ŒSO
+13D1:\ŒSU
+13D2:\ŒSV
+13D3:\ŒDA
+13D4:\ŒTA
+13D5:\ŒDE
+13D6:\ŒTE
+13D7:\ŒDI
+13D8:\ŒTI
+13D9:\ŒDO
+13DA:\ŒDU
+13DB:\ŒDV
+13DC:\ŒDLA
+13DD:\ŒTLA
+13DE:\ŒTLE
+13DF:\ŒTLI
+13E0:\ŒTLO
+13E1:\ŒTLU
+13E2:\ŒTLV
+13E3:\ŒTSA
+13E4:\ŒTSE
+13E5:\ŒTSI
+13E6:\ŒTSO
+13E7:\ŒTSU
+13E8:\ŒTSV
+13E9:\ŒWA
+13EA:\ŒWE
+13EB:\ŒWI
+13EC:\ŒWO
+13ED:\ŒWU
+13EE:\ŒWV
+13EF:\ŒYA
+13F0:\ŒYE
+13F1:\ŒYI
+13F2:\ŒYO
+13F3:\ŒYU
+13F4:\ŒYV
+1401:\FE
+1402:\FAAI
+1403:\FI
+1404:\FII
+1405:\FO
+1406:\FOO
+1407:\FY-CREE OO
+1408:\kEE
+1409:\kI
+140A:\FA
+140B:\FAA
+140C:\FWE
+140D:\WE
+140E:\FWI
+140F:\WI
+1410:\FWII
+1411:\WII
+1412:\FWO
+1413:\WO
+1414:\FWOO
+1415:\WOO
+1416:\FNASKAPI WOO
+1417:\FWA
+1418:\WA
+1419:\FWAA
+141A:\WAA
+141B:\FNASKAPI WAA
+141C:\FAI
+141D:\FY-CREE W
+141E:\FGLOTTAL STOP
+141F:\FFINAL \Ü
+1420:\FFINAL GRAVE
+1421:\FFINAL BOTTOM HALF R\ô
+1422:\FFINAL TOP HALF R\ô
+1423:\FFINAL \ùHALF R\ô
+1424:\FFINAL R\ô
+1425:\FFINAL \0 \Ü
+1426:\FFINAL \0 SHORT \€ \ÁS
+1427:\FFINAL MIDDLE DOT
+1428:\FFINAL SHORT \ \Á
+1429:\FFINAL PLUS
+142A:\FFINAL \Ë TACK
+142B:\FEN
+142C:\FIN
+142D:\FON
+142E:\FAN
+142F:\FPE
+1430:\FPAAI
+1431:\FPI
+1432:\FPII
+1433:\FPO
+1434:\FPOO
+1435:\FY-CREE POO
+1436:\kHEE
+1437:\kHI
+1438:\FPA
+1439:\FPAA
+143A:\FPWE
+143B:\PWE
+143C:\FPWI
+143D:\PWI
+143E:\FPWII
+143F:\PWII
+1440:\FPWO
+1441:\PWO
+1442:\FPWOO
+1443:\PWOO
+1444:\FPWA
+1445:\PWA
+1446:\FPWAA
+1447:\PWAA
+1448:\FY-CREE PWAA
+1449:\FP
+144A:\P
+144B:\kH
+144C:\FTE
+144D:\FTAAI
+144E:\FTI
+144F:\FTII
+1450:\FTO
+1451:\FTOO
+1452:\FY-CREE TOO
+1453:\kDEE
+1454:\kDI
+1455:\FTA
+1456:\FTAA
+1457:\FTWE
+1458:\TWE
+1459:\FTWI
+145A:\TWI
+145B:\FTWII
+145C:\TWII
+145D:\FTWO
+145E:\TWO
+145F:\FTWOO
+1460:\TWOO
+1461:\FTWA
+1462:\TWA
+1463:\FTWAA
+1464:\TWAA
+1465:\FNASKAPI TWAA
+1466:\FT
+1467:\FTTE
+1468:\FTTI
+1469:\FTTO
+146A:\FTTA
+146B:\FKE
+146C:\FKAAI
+146D:\FKI
+146E:\FKII
+146F:\FKO
+1470:\FKOO
+1471:\FY-CREE KOO
+1472:\FKA
+1473:\FKAA
+1474:\FKWE
+1475:\KWE
+1476:\FKWI
+1477:\KWI
+1478:\FKWII
+1479:\KWII
+147A:\FKWO
+147B:\KWO
+147C:\FKWOO
+147D:\KWOO
+147E:\FKWA
+147F:\KWA
+1480:\FKWAA
+1481:\KWAA
+1482:\FNASKAPI KWAA
+1483:\FK
+1484:\FKW
+1485:\FSOUTH-SLAVEY KEH
+1486:\FSOUTH-SLAVEY KIH
+1487:\FSOUTH-SLAVEY KOH
+1488:\FSOUTH-SLAVEY KAH
+1489:\FCE
+148A:\FCAAI
+148B:\FCI
+148C:\FCII
+148D:\FCO
+148E:\FCOO
+148F:\FY-CREE COO
+1490:\FCA
+1491:\FCAA
+1492:\FCWE
+1493:\CWE
+1494:\FCWI
+1495:\CWI
+1496:\FCWII
+1497:\CWII
+1498:\FCWO
+1499:\CWO
+149A:\FCWOO
+149B:\CWOO
+149C:\FCWA
+149D:\CWA
+149E:\FCWAA
+149F:\CWAA
+14A0:\FNASKAPI CWAA
+14A1:\FC
+14A2:\FSAYISI TH
+14A3:\FME
+14A4:\FMAAI
+14A5:\FMI
+14A6:\FMII
+14A7:\FMO
+14A8:\FMOO
+14A9:\FY-CREE MOO
+14AA:\FMA
+14AB:\FMAA
+14AC:\FMWE
+14AD:\MWE
+14AE:\FMWI
+14AF:\MWI
+14B0:\FMWII
+14B1:\MWII
+14B2:\FMWO
+14B3:\MWO
+14B4:\FMWOO
+14B5:\MWOO
+14B6:\FMWA
+14B7:\MWA
+14B8:\FMWAA
+14B9:\MWAA
+14BA:\FNASKAPI MWAA
+14BB:\FM
+14BC:\M
+14BD:\FMH
+14BE:\FATHAPASCAN M
+14BF:\FSAYISI M
+14C0:\FNE
+14C1:\FNAAI
+14C2:\FNI
+14C3:\FNII
+14C4:\FNO
+14C5:\FNOO
+14C6:\FY-CREE NOO
+14C7:\FNA
+14C8:\FNAA
+14C9:\FNWE
+14CA:\NWE
+14CB:\FNWA
+14CC:\NWA
+14CD:\FNWAA
+14CE:\NWAA
+14CF:\FNASKAPI NWAA
+14D0:\FN
+14D1:\kNG
+14D2:\FNH
+14D3:\FLE
+14D4:\FLAAI
+14D5:\FLI
+14D6:\FLII
+14D7:\FLO
+14D8:\FLOO
+14D9:\FY-CREE LOO
+14DA:\FLA
+14DB:\FLAA
+14DC:\FLWE
+14DD:\LWE
+14DE:\FLWI
+14DF:\LWI
+14E0:\FLWII
+14E1:\LWII
+14E2:\FLWO
+14E3:\LWO
+14E4:\FLWOO
+14E5:\LWOO
+14E6:\FLWA
+14E7:\LWA
+14E8:\FLWAA
+14E9:\LWAA
+14EA:\FL
+14EB:\L
+14EC:\FMEDIAL L
+14ED:\FSE
+14EE:\FSAAI
+14EF:\FSI
+14F0:\FSII
+14F1:\FSO
+14F2:\FSOO
+14F3:\FY-CREE SOO
+14F4:\FSA
+14F5:\FSAA
+14F6:\FSWE
+14F7:\SWE
+14F8:\FSWI
+14F9:\SWI
+14FA:\FSWII
+14FB:\SWII
+14FC:\FSWO
+14FD:\SWO
+14FE:\FSWOO
+14FF:\SWOO
+1500:\FSWA
+1501:\SWA
+1502:\FSWAA
+1503:\SWAA
+1504:\FNASKAPI SWAA
+1505:\FS
+1506:\FATHAPASCAN S
+1507:\FSW
+1508:\F\¬FOOT S
+1509:\FMOOSE-CREE SK
+150A:\FNASKAPI SKW
+150B:\FNASKAPI S-W
+150C:\FNASKAPI SPWA
+150D:\FNASKAPI STWA
+150E:\FNASKAPI SKWA
+150F:\FNASKAPI SCWA
+1510:\FSHE
+1511:\FSHI
+1512:\FSHII
+1513:\FSHO
+1514:\FSHOO
+1515:\FSHA
+1516:\FSHAA
+1517:\FSHWE
+1518:\SHWE
+1519:\FSHWI
+151A:\SHWI
+151B:\FSHWII
+151C:\SHWII
+151D:\FSHWO
+151E:\SHWO
+151F:\FSHWOO
+1520:\SHWOO
+1521:\FSHWA
+1522:\SHWA
+1523:\FSHWAA
+1524:\SHWAA
+1525:\FSH
+1526:\FYE
+1527:\FYAAI
+1528:\FYI
+1529:\FYII
+152A:\FYO
+152B:\FYOO
+152C:\FY-CREE YOO
+152D:\FYA
+152E:\FYAA
+152F:\FYWE
+1530:\YWE
+1531:\FYWI
+1532:\YWI
+1533:\FYWII
+1534:\YWII
+1535:\FYWO
+1536:\YWO
+1537:\FYWOO
+1538:\YWOO
+1539:\FYWA
+153A:\YWA
+153B:\FYWAA
+153C:\YWAA
+153D:\FNASKAPI YWAA
+153E:\FY
+153F:\FBIBLE-CREE Y
+1540:\Y
+1541:\FSAYISI YI
+1542:\FRE
+1543:\FR-CREE RE
+1544:\LE
+1545:\FRAAI
+1546:\FRI
+1547:\FRII
+1548:\FRO
+1549:\FROO
+154A:\LO
+154B:\FRA
+154C:\FRAA
+154D:\LA
+154E:\FRWAA
+154F:\RWAA
+1550:\FR
+1551:\R
+1552:\FMEDIAL R
+1553:\FFE
+1554:\FFAAI
+1555:\FFI
+1556:\FFII
+1557:\FFO
+1558:\FFOO
+1559:\FFA
+155A:\FFAA
+155B:\FFWAA
+155C:\FWAA
+155D:\FF
+155E:\FTHE
+155F:\FN-CREE THE
+1560:\FTHI
+1561:\FN-CREE THI
+1562:\FTHII
+1563:\FN-CREE THII
+1564:\FTHO
+1565:\FTHOO
+1566:\FTHA
+1567:\FTHAA
+1568:\FTHWAA
+1569:\THWAA
+156A:\FTH
+156B:\FTTHE
+156C:\FTTHI
+156D:\FTTHO
+156E:\FTTHA
+156F:\FTTH
+1570:\FTYE
+1571:\FTYI
+1572:\FTYO
+1573:\FTYA
+1574:\FNUNAVIK HE
+1575:\FNUNAVIK HI
+1576:\FNUNAVIK HII
+1577:\FNUNAVIK HO
+1578:\FNUNAVIK HOO
+1579:\FNUNAVIK HA
+157A:\FNUNAVIK HAA
+157B:\FNUNAVIK H
+157C:\FNUNAVUT H
+157D:\FHK
+157E:\FQAAI
+157F:\FQI
+1580:\FQII
+1581:\FQO
+1582:\FQOO
+1583:\FQA
+1584:\FQAA
+1585:\FQ
+1586:\FTLHE
+1587:\FTLHI
+1588:\FTLHO
+1589:\FTLHA
+158A:\RE
+158B:\RI
+158C:\RO
+158D:\RA
+158E:\FNGAAI
+158F:\FNGI
+1590:\FNGII
+1591:\FNGO
+1592:\FNGOO
+1593:\FNGA
+1594:\FNGAA
+1595:\FNG
+1596:\FNNG
+1597:\FSAYISI SHE
+1598:\FSAYISI SHI
+1599:\FSAYISI SHO
+159A:\FSAYISI SHA
+159B:\FWOODS-CREE THE
+159C:\FWOODS-CREE THI
+159D:\FWOODS-CREE THO
+159E:\FWOODS-CREE THA
+159F:\FWOODS-CREE TH
+15A0:\FLHI
+15A1:\FLHII
+15A2:\FLHO
+15A3:\FLHOO
+15A4:\FLHA
+15A5:\FLHAA
+15A6:\FLH
+15A7:\FTH-CREE THE
+15A8:\FTH-CREE THI
+15A9:\FTH-CREE THII
+15AA:\FTH-CREE THO
+15AB:\FTH-CREE THOO
+15AC:\FTH-CREE THA
+15AD:\FTH-CREE THAA
+15AE:\FTH-CREE TH
+15AF:\FAIVILIK B
+15B0:\F\¬FOOT E
+15B1:\F\¬FOOT I
+15B2:\F\¬FOOT O
+15B3:\F\¬FOOT A
+15B4:\F\¬FOOT WE
+15B5:\F\¬FOOT WI
+15B6:\F\¬FOOT WO
+15B7:\F\¬FOOT WA
+15B8:\F\¬FOOT NE
+15B9:\F\¬FOOT NI
+15BA:\F\¬FOOT NO
+15BB:\F\¬FOOT NA
+15BC:\F\¬FOOT KE
+15BD:\F\¬FOOT KI
+15BE:\F\¬FOOT KO
+15BF:\F\¬FOOT KA
+15C0:\FSAYISI HE
+15C1:\FSAYISI HI
+15C2:\FSAYISI HO
+15C3:\FSAYISI HA
+15C4:\kGHU
+15C5:\kGHO
+15C6:\kGHE
+15C7:\kGHEE
+15C8:\kGHI
+15C9:\kGHA
+15CA:\kRU
+15CB:\kRO
+15CC:\kRE
+15CD:\kREE
+15CE:\kRI
+15CF:\kRA
+15D0:\kWU
+15D1:\kWO
+15D2:\kWE
+15D3:\kWEE
+15D4:\kWI
+15D5:\kWA
+15D6:\kHWU
+15D7:\kHWO
+15D8:\kHWE
+15D9:\kHWEE
+15DA:\kHWI
+15DB:\kHWA
+15DC:\kTHU
+15DD:\kTHO
+15DE:\kTHE
+15DF:\kTHEE
+15E0:\kTHI
+15E1:\kTHA
+15E2:\kTTU
+15E3:\kTTO
+15E4:\kTTE
+15E5:\kTTEE
+15E6:\kTTI
+15E7:\kTTA
+15E8:\kPU
+15E9:\kPO
+15EA:\kPE
+15EB:\kPEE
+15EC:\kPI
+15ED:\kPA
+15EE:\kP
+15EF:\kGU
+15F0:\kGO
+15F1:\kGE
+15F2:\kGEE
+15F3:\kGI
+15F4:\kGA
+15F5:\kKHU
+15F6:\kKHO
+15F7:\kKHE
+15F8:\kKHEE
+15F9:\kKHI
+15FA:\kKHA
+15FB:\kKKU
+15FC:\kKKO
+15FD:\kKKE
+15FE:\kKKEE
+15FF:\kKKI
+1600:\kKKA
+1601:\kKK
+1602:\kNU
+1603:\kNO
+1604:\kNE
+1605:\kNEE
+1606:\kNI
+1607:\kNA
+1608:\kMU
+1609:\kMO
+160A:\kME
+160B:\kMEE
+160C:\kMI
+160D:\kMA
+160E:\kYU
+160F:\kYO
+1610:\kYE
+1611:\kYEE
+1612:\kYI
+1613:\kYA
+1614:\kJU
+1615:\FSAYISI JU
+1616:\kJO
+1617:\kJE
+1618:\kJEE
+1619:\kJI
+161A:\FSAYISI JI
+161B:\kJA
+161C:\kJJU
+161D:\kJJO
+161E:\kJJE
+161F:\kJJEE
+1620:\kJJI
+1621:\kJJA
+1622:\kLU
+1623:\kLO
+1624:\kLE
+1625:\kLEE
+1626:\kLI
+1627:\kLA
+1628:\kDLU
+1629:\kDLO
+162A:\kDLE
+162B:\kDLEE
+162C:\kDLI
+162D:\kDLA
+162E:\kLHU
+162F:\kLHO
+1630:\kLHE
+1631:\kLHEE
+1632:\kLHI
+1633:\kLHA
+1634:\kTLHU
+1635:\kTLHO
+1636:\kTLHE
+1637:\kTLHEE
+1638:\kTLHI
+1639:\kTLHA
+163A:\kTLU
+163B:\kTLO
+163C:\kTLE
+163D:\kTLEE
+163E:\kTLI
+163F:\kTLA
+1640:\kZU
+1641:\kZO
+1642:\kZE
+1643:\kZEE
+1644:\kZI
+1645:\kZA
+1646:\kZ
+1647:\kINITIAL Z
+1648:\kDZU
+1649:\kDZO
+164A:\kDZE
+164B:\kDZEE
+164C:\kDZI
+164D:\kDZA
+164E:\kSU
+164F:\kSO
+1650:\kSE
+1651:\kSEE
+1652:\kSI
+1653:\kSA
+1654:\kSHU
+1655:\kSHO
+1656:\kSHE
+1657:\kSHEE
+1658:\kSHI
+1659:\kSHA
+165A:\kSH
+165B:\kTSU
+165C:\kTSO
+165D:\kTSE
+165E:\kTSEE
+165F:\kTSI
+1660:\kTSA
+1661:\kCHU
+1662:\kCHO
+1663:\kCHE
+1664:\kCHEE
+1665:\kCHI
+1666:\kCHA
+1667:\kTTSU
+1668:\kTTSO
+1669:\kTTSE
+166A:\kTTSEE
+166B:\kTTSI
+166C:\kTTSA
+166D:\FCHI\‚
+166E:\FFULL STOP
+166F:\FQAI
+1670:\FNGAI
+1671:\FNNGI
+1672:\FNNGII
+1673:\FNNGO
+1674:\FNNGOO
+1675:\FNNGA
+1676:\FNNGAA
+1680:OGHAM SPACE\¥
+1681:OGHAM\@BEITH
+1682:OGHAM\@LUIS
+1683:OGHAM\@FEARN
+1684:OGHAM\@SAIL
+1685:OGHAM\@NION
+1686:OGHAM\@UATH
+1687:OGHAM\@DAIR
+1688:OGHAM\@TINNE
+1689:OGHAM\@COLL
+168A:OGHAM\@CEIRT
+168B:OGHAM\@MUIN
+168C:OGHAM\@GORT
+168D:OGHAM\@NGEADAL
+168E:OGHAM\@STRAIF
+168F:OGHAM\@RUIS
+1690:OGHAM\@AILM
+1691:OGHAM\@ONN
+1692:OGHAM\@UR
+1693:OGHAM\@EADHADH
+1694:OGHAM\@IODHADH
+1695:OGHAM\@EABHADH
+1696:OGHAM\@OR
+1697:OGHAM\@UILLEANN
+1698:OGHAM\@IFIN
+1699:OGHAM\@EAMHANCHOLL
+169A:OGHAM\@PEITH
+169B:OGHAM FEATHER\¥
+169C:OGHAM \öFEATHER\¥
+16A0:\ÀFEHU FEOH FE F
+16A1:\ÀV
+16A2:\ÀURUZ UR U
+16A3:\ÀYR
+16A4:\ÀY
+16A5:\ÀW
+16A6:\ÀTHURISAZ THURS THORN
+16A7:\ÀETH
+16A8:\ÀANSUZ A
+16A9:\ÀOS O
+16AA:\ÀAC A
+16AB:\ÀAESC
+16AC:\ÀLONG-BRANCH-OSS O
+16AD:\ÀSHORT-TWIG-OSS O
+16AE:\ÀO
+16AF:\ÀOE
+16B0:\ÀON
+16B1:\ÀRAIDO RAD REID R
+16B2:\ÀKAUNA
+16B3:\ÀCEN
+16B4:\ÀKAUN K
+16B5:\ÀG
+16B6:\ÀENG
+16B7:\ÀGEBO GYFU G
+16B8:\ÀGAR
+16B9:\ÀWUNJO WYNN W
+16BA:\ÀHAGLAZ H
+16BB:\ÀHAEGL H
+16BC:\ÀLONG-BRANCH-HAGALL H
+16BD:\ÀSHORT-TWIG-HAGALL H
+16BE:\ÀNAUDIZ NYD NAUD N
+16BF:\ÀSHORT-TWIG-NAUD N
+16C0:\ÀDOTTED-N
+16C1:\ÀISAZ IS ISS I
+16C2:\ÀE
+16C3:\ÀJERAN J
+16C4:\ÀGER
+16C5:\ÀLONG-BRANCH-AR AE
+16C6:\ÀSHORT-TWIG-AR A
+16C7:\ÀIWAZ EOH
+16C8:\ÀPERTHO PEORTH P
+16C9:\ÀALGIZ EOLHX
+16CA:\ÀSOWILO S
+16CB:\ÀSIGEL LONG-BRANCH-SOL S
+16CC:\ÀSHORT-TWIG-SOL S
+16CD:\ÀC
+16CE:\ÀZ
+16CF:\ÀTIWAZ TIR TYR T
+16D0:\ÀSHORT-TWIG-TYR T
+16D1:\ÀD
+16D2:\ÀBERKANAN BEORC BJARKAN B
+16D3:\ÀSHORT-TWIG-BJARKAN B
+16D4:\ÀDOTTED-P
+16D5:\ÀOPEN-P
+16D6:\ÀEHWAZ EH E
+16D7:\ÀMANNAZ MAN M
+16D8:\ÀLONG-BRANCH-MADR M
+16D9:\ÀSHORT-TWIG-MADR M
+16DA:\ÀLAUKAZ LAGU LOGR L
+16DB:\ÀDOTTED-L
+16DC:\À\ôWAZ
+16DD:\À\ô
+16DE:\ÀDAGAZ DAEG D
+16DF:\ÀOTHALAN ETHEL O
+16E0:\ÀEAR
+16E1:\ÀIOR
+16E2:\ÀCWEORTH
+16E3:\ÀCALC
+16E4:\ÀCEALC
+16E5:\ÀSTAN
+16E6:\ÀLONG-BRANCH-YR
+16E7:\ÀSHORT-TWIG-YR
+16E8:\ÀICELANDIC-YR
+16E9:\ÀQ
+16EA:\ÀX
+16EB:RUNIC S\ôLE PUNCTU\”
+16EC:RUNIC MULTIPLE PUNCTU\”
+16ED:RUNIC CROSS PUNCTU\”
+16EE:RUNIC ARLAUG \
+16EF:RUNIC TVIMADUR \
+16F0:RUNIC BELGTHOR \
+1700:TAGALOG\@A
+1701:TAGALOG\@I
+1702:TAGALOG\@U
+1703:TAGALOG\@KA
+1704:TAGALOG\@GA
+1705:TAGALOG\@NGA
+1706:TAGALOG\@TA
+1707:TAGALOG\@DA
+1708:TAGALOG\@NA
+1709:TAGALOG\@PA
+170A:TAGALOG\@BA
+170B:TAGALOG\@MA
+170C:TAGALOG\@YA
+170E:TAGALOG\@LA
+170F:TAGALOG\@WA
+1710:TAGALOG\@SA
+1711:TAGALOG\@HA
+1712:TAGALOG\bI
+1713:TAGALOG\bU
+1714:TAGALOG\‚ VIRAMA
+1720:HANUNOO\@A
+1721:HANUNOO\@I
+1722:HANUNOO\@U
+1723:HANUNOO\@KA
+1724:HANUNOO\@GA
+1725:HANUNOO\@NGA
+1726:HANUNOO\@TA
+1727:HANUNOO\@DA
+1728:HANUNOO\@NA
+1729:HANUNOO\@PA
+172A:HANUNOO\@BA
+172B:HANUNOO\@MA
+172C:HANUNOO\@YA
+172D:HANUNOO\@RA
+172E:HANUNOO\@LA
+172F:HANUNOO\@WA
+1730:HANUNOO\@SA
+1731:HANUNOO\@HA
+1732:HANUNOO\bI
+1733:HANUNOO\bU
+1734:HANUNOO\‚ PAMUDPOD
+1735:PHILIPPINE S\ôLE PUNCTU\”
+1736:PHILIPPINE \0 PUNCTU\”
+1740:BUHID\@A
+1741:BUHID\@I
+1742:BUHID\@U
+1743:BUHID\@KA
+1744:BUHID\@GA
+1745:BUHID\@NGA
+1746:BUHID\@TA
+1747:BUHID\@DA
+1748:BUHID\@NA
+1749:BUHID\@PA
+174A:BUHID\@BA
+174B:BUHID\@MA
+174C:BUHID\@YA
+174D:BUHID\@RA
+174E:BUHID\@LA
+174F:BUHID\@WA
+1750:BUHID\@SA
+1751:BUHID\@HA
+1752:BUHID\bI
+1753:BUHID\bU
+1760:TAGBANWA\@A
+1761:TAGBANWA\@I
+1762:TAGBANWA\@U
+1763:TAGBANWA\@KA
+1764:TAGBANWA\@GA
+1765:TAGBANWA\@NGA
+1766:TAGBANWA\@TA
+1767:TAGBANWA\@DA
+1768:TAGBANWA\@NA
+1769:TAGBANWA\@PA
+176A:TAGBANWA\@BA
+176B:TAGBANWA\@MA
+176C:TAGBANWA\@YA
+176E:TAGBANWA\@LA
+176F:TAGBANWA\@WA
+1770:TAGBANWA\@SA
+1772:TAGBANWA\bI
+1773:TAGBANWA\bU
+1780:\Ý\@KA
+1781:\Ý\@KHA
+1782:\Ý\@KO
+1783:\Ý\@KHO
+1784:\Ý\@NGO
+1785:\Ý\@CA
+1786:\Ý\@CHA
+1787:\Ý\@CO
+1788:\Ý\@CHO
+1789:\Ý\@NYO
+178A:\Ý\@DA
+178B:\Ý\@TTHA
+178C:\Ý\@DO
+178D:\Ý\@TTHO
+178E:\Ý\@NNO
+178F:\Ý\@TA
+1790:\Ý\@THA
+1791:\Ý\@TO
+1792:\Ý\@THO
+1793:\Ý\@NO
+1794:\Ý\@BA
+1795:\Ý\@PHA
+1796:\Ý\@PO
+1797:\Ý\@PHO
+1798:\Ý\@MO
+1799:\Ý\@YO
+179A:\Ý\@RO
+179B:\Ý\@LO
+179C:\Ý\@VO
+179D:\Ý\@SHA
+179E:\Ý\@SSO
+179F:\Ý\@SA
+17A0:\Ý\@HA
+17A1:\Ý\@LA
+17A2:\Ý\@QA
+17A3:\ÃQAQ
+17A4:\ÃQAA
+17A5:\ÃQI
+17A6:\ÃQII
+17A7:\ÃQU
+17A8:\ÃQUK
+17A9:\ÃQUU
+17AA:\ÃQUUV
+17AB:\ÃRY
+17AC:\ÃRYY
+17AD:\ÃLY
+17AE:\ÃLYY
+17AF:\ÃQE
+17B0:\ÃQAI
+17B1:\ÃQOO TYPE ONE
+17B2:\ÃQOO TYPE TWO
+17B3:\ÃQAU
+17B4:\Ý VOWEL INHERENT AQ
+17B5:\Ý VOWEL INHERENT AA
+17B6:\Ý\bAA
+17B7:\Ý\bI
+17B8:\Ý\bII
+17B9:\Ý\bY
+17BA:\Ý\bYY
+17BB:\Ý\bU
+17BC:\Ý\bUU
+17BD:\Ý\bUA
+17BE:\Ý\bOE
+17BF:\Ý\bYA
+17C0:\Ý\bIE
+17C1:\Ý\bE
+17C2:\Ý\bAE
+17C3:\Ý\bAI
+17C4:\Ý\bOO
+17C5:\Ý\bAU
+17C6:\Ý\‚ NIKAHIT
+17C7:\Ý\‚ REAHMUK
+17C8:\Ý\‚ YUUKALEAPINTU
+17C9:\Ý\‚ MUUSIKATOAN
+17CA:\Ý\‚ TRIISAP
+17CB:\Ý\‚ BANTOC
+17CC:\Ý\‚ ROBAT
+17CD:\Ý\‚ TOANDAKHIAT
+17CE:\Ý\‚ KAKABAT
+17CF:\Ý\‚ AHSDA
+17D0:\Ý\‚ SAMYOK SANNYA
+17D1:\Ý\‚ VIRIAM
+17D2:\Ý\‚ COENG
+17D3:\Ý\‚ BATHAMASAT
+17D4:\Ý\‚ KHAN
+17D5:\Ý\‚\ìIYOOSAN
+17D6:\Ý\‚ CAMNUC PII KUUH
+17D7:\Ý\‚ LEK TOO
+17D8:\Ý\‚ BEYYAL
+17D9:\Ý\‚ PHNAEK MUAN
+17DA:\Ý\‚ KOOMUUT
+17DB:\Ý CURRENCY \ RIEL
+17DC:\Ý\‚ AVAKRAHASANYA
+17E0:\Ý\hZERO
+17E1:\Ý\hONE
+17E2:\Ý\hTWO
+17E3:\Ý\hTHREE
+17E4:\Ý\hFOUR
+17E5:\Ý\hFIVE
+17E6:\Ý\hSIX
+17E7:\Ý\hSEVEN
+17E8:\Ý\hE\¼
+17E9:\Ý\hNINE
+1800:MONGOLIAN BIRGA
+1801:MONGOLIAN ELLIPSIS
+1802:MONGOLIAN COMMA
+1803:MONGOLIAN\é
+1804:MONGOLIAN COLON
+1805:MONGOLIAN FOUR DOTS
+1806:MONGOLIAN TODO SOFT HYPHEN
+1807:MONGOLIAN SIBE\CBOUNDARY\¥ER
+1808:MONGOLIAN MANCHU COMMA
+1809:MONGOLIAN MANCHU\é
+180A:MONGOLIAN NIRUGU
+180B:MONGOLIAN FREE \ç ONE
+180C:MONGOLIAN FREE \ç TWO
+180D:MONGOLIAN FREE \ç THREE
+180E:MONGOLIAN VOWEL SEPARATOR
+1810:MONGOLIAN\hZERO
+1811:MONGOLIAN\hONE
+1812:MONGOLIAN\hTWO
+1813:MONGOLIAN\hTHREE
+1814:MONGOLIAN\hFOUR
+1815:MONGOLIAN\hFIVE
+1816:MONGOLIAN\hSIX
+1817:MONGOLIAN\hSEVEN
+1818:MONGOLIAN\hE\¼
+1819:MONGOLIAN\hNINE
+1820:\xA
+1821:\xE
+1822:\xI
+1823:\xO
+1824:\xU
+1825:\xOE
+1826:\xUE
+1827:\xEE
+1828:\xNA
+1829:\xANG
+182A:\xBA
+182B:\xPA
+182C:\xQA
+182D:\xGA
+182E:\xMA
+182F:\xLA
+1830:\xSA
+1831:\xSHA
+1832:\xTA
+1833:\xDA
+1834:\xCHA
+1835:\xJA
+1836:\xYA
+1837:\xRA
+1838:\xWA
+1839:\xFA
+183A:\xKA
+183B:\xKHA
+183C:\xTSA
+183D:\xZA
+183E:\xHAA
+183F:\xZRA
+1840:\xLHA
+1841:\xZHI
+1842:\xCHI
+1843:\xTODO LONG VOWEL\‚
+1844:\xTODO E
+1845:\xTODO I
+1846:\xTODO O
+1847:\xTODO U
+1848:\xTODO OE
+1849:\xTODO UE
+184A:\xTODO ANG
+184B:\xTODO BA
+184C:\xTODO PA
+184D:\xTODO QA
+184E:\xTODO GA
+184F:\xTODO MA
+1850:\xTODO TA
+1851:\xTODO DA
+1852:\xTODO CHA
+1853:\xTODO JA
+1854:\xTODO TSA
+1855:\xTODO YA
+1856:\xTODO WA
+1857:\xTODO KA
+1858:\xTODO GAA
+1859:\xTODO HAA
+185A:\xTODO JIA
+185B:\xTODO NIA
+185C:\xTODO DZA
+185D:\xSIBE E
+185E:\xSIBE I
+185F:\xSIBE IY
+1860:\xSIBE UE
+1861:\xSIBE U
+1862:\xSIBE ANG
+1863:\xSIBE KA
+1864:\xSIBE GA
+1865:\xSIBE HA
+1866:\xSIBE PA
+1867:\xSIBE SHA
+1868:\xSIBE TA
+1869:\xSIBE DA
+186A:\xSIBE JA
+186B:\xSIBE FA
+186C:\xSIBE GAA
+186D:\xSIBE HAA
+186E:\xSIBE TSA
+186F:\xSIBE ZA
+1870:\xSIBE RAA
+1871:\xSIBE CHA
+1872:\xSIBE ZHA
+1873:\xMANCHU I
+1874:\xMANCHU KA
+1875:\xMANCHU RA
+1876:\xMANCHU FA
+1877:\xMANCHU ZHA
+1880:\x\ÕANUSVARA ONE
+1881:\x\ÕVISARGA ONE
+1882:\x\ÕDAMARU
+1883:\x\ÕUBADAMA
+1884:\x\ÕINVERT\ÂUBADAMA
+1885:\x\ÕBALUDA
+1886:\x\ÕTHREE BALUDA
+1887:\x\ÕA
+1888:\x\ÕI
+1889:\x\ÕKA
+188A:\x\ÕNGA
+188B:\x\ÕCA
+188C:\x\ÕTTA
+188D:\x\ÕTTHA
+188E:\x\ÕDDA
+188F:\x\ÕNNA
+1890:\x\ÕTA
+1891:\x\ÕDA
+1892:\x\ÕPA
+1893:\x\ÕPHA
+1894:\x\ÕSSA
+1895:\x\ÕZHA
+1896:\x\ÕZA
+1897:\x\ÕAH
+1898:\xTODO \ÕTA
+1899:\xTODO \ÕZHA
+189A:\xMANCHU \ÕGHA
+189B:\xMANCHU \ÕNGA
+189C:\xMANCHU \ÕCA
+189D:\xMANCHU \ÕJHA
+189E:\xMANCHU \ÕTTA
+189F:\xMANCHU \ÕDDHA
+18A0:\xMANCHU \ÕTA
+18A1:\xMANCHU \ÕDHA
+18A2:\xMANCHU \ÕSSA
+18A3:\xMANCHU \ÕCYA
+18A4:\xMANCHU \ÕZHA
+18A5:\xMANCHU \ÕZA
+18A6:\x\ÕHALF U
+18A7:\x\ÕHALF YA
+18A8:\xMANCHU \ÕBHA
+18A9:\x\ÕDAGALGA
+1E00:\PA\HR\ô\…
+1E01:\LA\HR\ô\…
+1E02:\PB\³\p
+1E03:\LB\³\p
+1E04:\PB\³\…
+1E05:\LB\³\…
+1E06:\PB\H\ä\…
+1E07:\LB\H\ä\…
+1E08:\PC\HCEDILLA\i\Ü
+1E09:\LC\HCEDILLA\i\Ü
+1E0A:\PD\³\p
+1E0B:\LD\³\p
+1E0C:\PD\³\…
+1E0D:\LD\³\…
+1E0E:\PD\H\ä\…
+1E0F:\LD\H\ä\…
+1E10:\PD\HCEDILLA
+1E11:\LD\HCEDILLA
+1E12:\PD\ˆ\…
+1E13:\LD\ˆ\…
+1E14:\PE\H\å\iGRAVE
+1E15:\LE\H\å\iGRAVE
+1E16:\PE\H\å\i\Ü
+1E17:\LE\H\å\i\Ü
+1E18:\PE\ˆ\…
+1E19:\LE\ˆ\…
+1E1A:\PE\H\æ\…
+1E1B:\LE\H\æ\…
+1E1C:\PE\HCEDILLA\iBREVE
+1E1D:\LE\HCEDILLA\iBREVE
+1E1E:\PF\³\p
+1E1F:\LF\³\p
+1E20:\PG\H\å
+1E21:\LG\H\å
+1E22:\PH\³\p
+1E23:\LH\³\p
+1E24:\PH\³\…
+1E25:\LH\³\…
+1E26:\PH\ž
+1E27:\LH\ž
+1E28:\PH\HCEDILLA
+1E29:\LH\HCEDILLA
+1E2A:\PH\HBREVE\…
+1E2B:\LH\HBREVE\…
+1E2C:\PI\H\æ\…
+1E2D:\LI\H\æ\…
+1E2E:\PI\ž\i\Ü
+1E2F:\LI\ž\i\Ü
+1E30:\PK\H\Ü
+1E31:\LK\H\Ü
+1E32:\PK\³\…
+1E33:\LK\³\…
+1E34:\PK\H\ä\…
+1E35:\LK\H\ä\…
+1E36:\PL\³\…
+1E37:\LL\³\…
+1E38:\PL\³\…\i\å
+1E39:\LL\³\…\i\å
+1E3A:\PL\H\ä\…
+1E3B:\LL\H\ä\…
+1E3C:\PL\ˆ\…
+1E3D:\LL\ˆ\…
+1E3E:\PM\H\Ü
+1E3F:\LM\H\Ü
+1E40:\PM\³\p
+1E41:\LM\³\p
+1E42:\PM\³\…
+1E43:\LM\³\…
+1E44:\PN\³\p
+1E45:\LN\³\p
+1E46:\PN\³\…
+1E47:\LN\³\…
+1E48:\PN\H\ä\…
+1E49:\LN\H\ä\…
+1E4A:\PN\ˆ\…
+1E4B:\LN\ˆ\…
+1E4C:\PO\H\æ\i\Ü
+1E4D:\LO\H\æ\i\Ü
+1E4E:\PO\H\æ\iDIAERESIS
+1E4F:\LO\H\æ\iDIAERESIS
+1E50:\PO\H\å\iGRAVE
+1E51:\LO\H\å\iGRAVE
+1E52:\PO\H\å\i\Ü
+1E53:\LO\H\å\i\Ü
+1E54:\PP\H\Ü
+1E55:\LP\H\Ü
+1E56:\PP\³\p
+1E57:\LP\³\p
+1E58:\PR\³\p
+1E59:\LR\³\p
+1E5A:\PR\³\…
+1E5B:\LR\³\…
+1E5C:\PR\³\…\i\å
+1E5D:\LR\³\…\i\å
+1E5E:\PR\H\ä\…
+1E5F:\LR\H\ä\…
+1E60:\PS\³\p
+1E61:\LS\³\p
+1E62:\PS\³\…
+1E63:\LS\³\…
+1E64:\PS\H\Ü\iDOT\p
+1E65:\LS\H\Ü\iDOT\p
+1E66:\PS\û\iDOT\p
+1E67:\LS\û\iDOT\p
+1E68:\PS\³\…\iDOT\p
+1E69:\LS\³\…\iDOT\p
+1E6A:\PT\³\p
+1E6B:\LT\³\p
+1E6C:\PT\³\…
+1E6D:\LT\³\…
+1E6E:\PT\H\ä\…
+1E6F:\LT\H\ä\…
+1E70:\PT\ˆ\…
+1E71:\LT\ˆ\…
+1E72:\PU\ž\…
+1E73:\LU\ž\…
+1E74:\PU\H\æ\…
+1E75:\LU\H\æ\…
+1E76:\PU\ˆ\…
+1E77:\LU\ˆ\…
+1E78:\PU\H\æ\i\Ü
+1E79:\LU\H\æ\i\Ü
+1E7A:\PU\H\å\iDIAERESIS
+1E7B:\LU\H\å\iDIAERESIS
+1E7C:\PV\H\æ
+1E7D:\LV\H\æ
+1E7E:\PV\³\…
+1E7F:\LV\³\…
+1E80:\PW\HGRAVE
+1E81:\LW\HGRAVE
+1E82:\PW\H\Ü
+1E83:\LW\H\Ü
+1E84:\PW\ž
+1E85:\LW\ž
+1E86:\PW\³\p
+1E87:\LW\³\p
+1E88:\PW\³\…
+1E89:\LW\³\…
+1E8A:\PX\³\p
+1E8B:\LX\³\p
+1E8C:\PX\ž
+1E8D:\LX\ž
+1E8E:\PY\³\p
+1E8F:\LY\³\p
+1E90:\PZ\ˆ
+1E91:\LZ\ˆ
+1E92:\PZ\³\…
+1E93:\LZ\³\…
+1E94:\PZ\H\ä\…
+1E95:\LZ\H\ä\…
+1E96:\LH\H\ä\…
+1E97:\LT\ž
+1E98:\LW\HR\ô\p
+1E99:\LY\HR\ô\p
+1E9A:\LA\H\ùHALF R\ô
+1E9B:\LLONG S\³\p
+1EA0:\PA\³\…
+1EA1:\LA\³\…
+1EA2:\PA\í\p
+1EA3:\LA\í\p
+1EA4:\PA\ˆ\i\Ü
+1EA5:\LA\ˆ\i\Ü
+1EA6:\PA\ˆ\iGRAVE
+1EA7:\LA\ˆ\iGRAVE
+1EA8:\PA\ˆ\iHOOK\p
+1EA9:\LA\ˆ\iHOOK\p
+1EAA:\PA\ˆ\i\æ
+1EAB:\LA\ˆ\i\æ
+1EAC:\PA\ˆ\iDOT\…
+1EAD:\LA\ˆ\iDOT\…
+1EAE:\PA\HBREVE\i\Ü
+1EAF:\LA\HBREVE\i\Ü
+1EB0:\PA\HBREVE\iGRAVE
+1EB1:\LA\HBREVE\iGRAVE
+1EB2:\PA\HBREVE\iHOOK\p
+1EB3:\LA\HBREVE\iHOOK\p
+1EB4:\PA\HBREVE\i\æ
+1EB5:\LA\HBREVE\i\æ
+1EB6:\PA\HBREVE\iDOT\…
+1EB7:\LA\HBREVE\iDOT\…
+1EB8:\PE\³\…
+1EB9:\LE\³\…
+1EBA:\PE\í\p
+1EBB:\LE\í\p
+1EBC:\PE\H\æ
+1EBD:\LE\H\æ
+1EBE:\PE\ˆ\i\Ü
+1EBF:\LE\ˆ\i\Ü
+1EC0:\PE\ˆ\iGRAVE
+1EC1:\LE\ˆ\iGRAVE
+1EC2:\PE\ˆ\iHOOK\p
+1EC3:\LE\ˆ\iHOOK\p
+1EC4:\PE\ˆ\i\æ
+1EC5:\LE\ˆ\i\æ
+1EC6:\PE\ˆ\iDOT\…
+1EC7:\LE\ˆ\iDOT\…
+1EC8:\PI\í\p
+1EC9:\LI\í\p
+1ECA:\PI\³\…
+1ECB:\LI\³\…
+1ECC:\PO\³\…
+1ECD:\LO\³\…
+1ECE:\PO\í\p
+1ECF:\LO\í\p
+1ED0:\PO\ˆ\i\Ü
+1ED1:\LO\ˆ\i\Ü
+1ED2:\PO\ˆ\iGRAVE
+1ED3:\LO\ˆ\iGRAVE
+1ED4:\PO\ˆ\iHOOK\p
+1ED5:\LO\ˆ\iHOOK\p
+1ED6:\PO\ˆ\i\æ
+1ED7:\LO\ˆ\i\æ
+1ED8:\PO\ˆ\iDOT\…
+1ED9:\LO\ˆ\iDOT\…
+1EDA:\PO\HHORN\i\Ü
+1EDB:\LO\HHORN\i\Ü
+1EDC:\PO\HHORN\iGRAVE
+1EDD:\LO\HHORN\iGRAVE
+1EDE:\PO\HHORN\iHOOK\p
+1EDF:\LO\HHORN\iHOOK\p
+1EE0:\PO\HHORN\i\æ
+1EE1:\LO\HHORN\i\æ
+1EE2:\PO\HHORN\iDOT\…
+1EE3:\LO\HHORN\iDOT\…
+1EE4:\PU\³\…
+1EE5:\LU\³\…
+1EE6:\PU\í\p
+1EE7:\LU\í\p
+1EE8:\PU\HHORN\i\Ü
+1EE9:\LU\HHORN\i\Ü
+1EEA:\PU\HHORN\iGRAVE
+1EEB:\LU\HHORN\iGRAVE
+1EEC:\PU\HHORN\iHOOK\p
+1EED:\LU\HHORN\iHOOK\p
+1EEE:\PU\HHORN\i\æ
+1EEF:\LU\HHORN\i\æ
+1EF0:\PU\HHORN\iDOT\…
+1EF1:\LU\HHORN\iDOT\…
+1EF2:\PY\HGRAVE
+1EF3:\LY\HGRAVE
+1EF4:\PY\³\…
+1EF5:\LY\³\…
+1EF6:\PY\í\p
+1EF7:\LY\í\p
+1EF8:\PY\H\æ
+1EF9:\LY\H\æ
+1F00:\y\þ\HPSILI
+1F01:\y\þ\HDASIA
+1F02:\y\þ\·VARIA
+1F03:\y\þ\±VARIA
+1F04:\y\þ\·OXIA
+1F05:\y\þ\±OXIA
+1F06:\y\þ\·\´
+1F07:\y\þ\±\´
+1F08:\9\þ\HPSILI
+1F09:\9\þ\HDASIA
+1F0A:\9\þ\·VARIA
+1F0B:\9\þ\±VARIA
+1F0C:\9\þ\·OXIA
+1F0D:\9\þ\±OXIA
+1F0E:\9\þ\·\´
+1F0F:\9\þ\±\´
+1F10:\yE\É\HPSILI
+1F11:\yE\É\HDASIA
+1F12:\yE\É\·VARIA
+1F13:\yE\É\±VARIA
+1F14:\yE\É\·OXIA
+1F15:\yE\É\±OXIA
+1F18:\9E\É\HPSILI
+1F19:\9E\É\HDASIA
+1F1A:\9E\É\·VARIA
+1F1B:\9E\É\±VARIA
+1F1C:\9E\É\·OXIA
+1F1D:\9E\É\±OXIA
+1F20:\yETA\HPSILI
+1F21:\yETA\HDASIA
+1F22:\yETA\·VARIA
+1F23:\yETA\±VARIA
+1F24:\yETA\·OXIA
+1F25:\yETA\±OXIA
+1F26:\yETA\·\´
+1F27:\yETA\±\´
+1F28:\9ETA\HPSILI
+1F29:\9ETA\HDASIA
+1F2A:\9ETA\·VARIA
+1F2B:\9ETA\±VARIA
+1F2C:\9ETA\·OXIA
+1F2D:\9ETA\±OXIA
+1F2E:\9ETA\·\´
+1F2F:\9ETA\±\´
+1F30:\yIOTA\HPSILI
+1F31:\yIOTA\HDASIA
+1F32:\yIOTA\·VARIA
+1F33:\yIOTA\±VARIA
+1F34:\yIOTA\·OXIA
+1F35:\yIOTA\±OXIA
+1F36:\yIOTA\·\´
+1F37:\yIOTA\±\´
+1F38:\9IOTA\HPSILI
+1F39:\9IOTA\HDASIA
+1F3A:\9IOTA\·VARIA
+1F3B:\9IOTA\±VARIA
+1F3C:\9IOTA\·OXIA
+1F3D:\9IOTA\±OXIA
+1F3E:\9IOTA\·\´
+1F3F:\9IOTA\±\´
+1F40:\yOMICRON\HPSILI
+1F41:\yOMICRON\HDASIA
+1F42:\yOMICRON\·VARIA
+1F43:\yOMICRON\±VARIA
+1F44:\yOMICRON\·OXIA
+1F45:\yOMICRON\±OXIA
+1F48:\9OMICRON\HPSILI
+1F49:\9OMICRON\HDASIA
+1F4A:\9OMICRON\·VARIA
+1F4B:\9OMICRON\±VARIA
+1F4C:\9OMICRON\·OXIA
+1F4D:\9OMICRON\±OXIA
+1F50:\yU\É\HPSILI
+1F51:\yU\É\HDASIA
+1F52:\yU\É\·VARIA
+1F53:\yU\É\±VARIA
+1F54:\yU\É\·OXIA
+1F55:\yU\É\±OXIA
+1F56:\yU\É\·\´
+1F57:\yU\É\±\´
+1F59:\9U\É\HDASIA
+1F5B:\9U\É\±VARIA
+1F5D:\9U\É\±OXIA
+1F5F:\9U\É\±\´
+1F60:\y\ü\HPSILI
+1F61:\y\ü\HDASIA
+1F62:\y\ü\·VARIA
+1F63:\y\ü\±VARIA
+1F64:\y\ü\·OXIA
+1F65:\y\ü\±OXIA
+1F66:\y\ü\·\´
+1F67:\y\ü\±\´
+1F68:\9\ü\HPSILI
+1F69:\9\ü\HDASIA
+1F6A:\9\ü\·VARIA
+1F6B:\9\ü\±VARIA
+1F6C:\9\ü\·OXIA
+1F6D:\9\ü\±OXIA
+1F6E:\9\ü\·\´
+1F6F:\9\ü\±\´
+1F70:\y\þ\HVARIA
+1F71:\y\þ\HOXIA
+1F72:\yE\É\HVARIA
+1F73:\yE\É\HOXIA
+1F74:\yETA\HVARIA
+1F75:\yETA\HOXIA
+1F76:\yIOTA\HVARIA
+1F77:\yIOTA\HOXIA
+1F78:\yOMICRON\HVARIA
+1F79:\yOMICRON\HOXIA
+1F7A:\yU\É\HVARIA
+1F7B:\yU\É\HOXIA
+1F7C:\y\ü\HVARIA
+1F7D:\y\ü\HOXIA
+1F80:\y\þ\·YPO\œ
+1F81:\y\þ\±YPO\œ
+1F82:\y\þ\·VARIA\iYPO\œ
+1F83:\y\þ\±VARIA\iYPO\œ
+1F84:\y\þ\·OXIA\iYPO\œ
+1F85:\y\þ\±OXIA\iYPO\œ
+1F86:\y\þ\·\´\iYPO\œ
+1F87:\y\þ\±\´\iYPO\œ
+1F88:\9\þ\·PROS\œ
+1F89:\9\þ\±PROS\œ
+1F8A:\9\þ\·VARIA\iPROS\œ
+1F8B:\9\þ\±VARIA\iPROS\œ
+1F8C:\9\þ\·OXIA\iPROS\œ
+1F8D:\9\þ\±OXIA\iPROS\œ
+1F8E:\9\þ\·\´\iPROS\œ
+1F8F:\9\þ\±\´\iPROS\œ
+1F90:\yETA\·YPO\œ
+1F91:\yETA\±YPO\œ
+1F92:\yETA\·VARIA\iYPO\œ
+1F93:\yETA\±VARIA\iYPO\œ
+1F94:\yETA\·OXIA\iYPO\œ
+1F95:\yETA\±OXIA\iYPO\œ
+1F96:\yETA\·\´\iYPO\œ
+1F97:\yETA\±\´\iYPO\œ
+1F98:\9ETA\·PROS\œ
+1F99:\9ETA\±PROS\œ
+1F9A:\9ETA\·VARIA\iPROS\œ
+1F9B:\9ETA\±VARIA\iPROS\œ
+1F9C:\9ETA\·OXIA\iPROS\œ
+1F9D:\9ETA\±OXIA\iPROS\œ
+1F9E:\9ETA\·\´\iPROS\œ
+1F9F:\9ETA\±\´\iPROS\œ
+1FA0:\y\ü\·YPO\œ
+1FA1:\y\ü\±YPO\œ
+1FA2:\y\ü\·VARIA\iYPO\œ
+1FA3:\y\ü\±VARIA\iYPO\œ
+1FA4:\y\ü\·OXIA\iYPO\œ
+1FA5:\y\ü\±OXIA\iYPO\œ
+1FA6:\y\ü\·\´\iYPO\œ
+1FA7:\y\ü\±\´\iYPO\œ
+1FA8:\9\ü\·PROS\œ
+1FA9:\9\ü\±PROS\œ
+1FAA:\9\ü\·VARIA\iPROS\œ
+1FAB:\9\ü\±VARIA\iPROS\œ
+1FAC:\9\ü\·OXIA\iPROS\œ
+1FAD:\9\ü\±OXIA\iPROS\œ
+1FAE:\9\ü\·\´\iPROS\œ
+1FAF:\9\ü\±\´\iPROS\œ
+1FB0:\y\þ\HVRACHY
+1FB1:\y\þ\H\å
+1FB2:\y\þ\HVARIA\iYPO\œ
+1FB3:\y\þ\HYPO\œ
+1FB4:\y\þ\HOXIA\iYPO\œ
+1FB6:\y\þ\H\´
+1FB7:\y\þ\H\´\iYPO\œ
+1FB8:\9\þ\HVRACHY
+1FB9:\9\þ\H\å
+1FBA:\9\þ\HVARIA
+1FBB:\9\þ\HOXIA
+1FBC:\9\þ\HPROS\œ
+1FBD:GREEK KORONIS
+1FBE:GREEK PROS\œ
+1FBF:GREEK PSILI
+1FC0:GREEK \´
+1FC1:GREEK DIALYTIKA\i\´
+1FC2:\yETA\HVARIA\iYPO\œ
+1FC3:\yETA\HYPO\œ
+1FC4:\yETA\HOXIA\iYPO\œ
+1FC6:\yETA\H\´
+1FC7:\yETA\H\´\iYPO\œ
+1FC8:\9E\É\HVARIA
+1FC9:\9E\É\HOXIA
+1FCA:\9ETA\HVARIA
+1FCB:\9ETA\HOXIA
+1FCC:\9ETA\HPROS\œ
+1FCD:GREEK PSILI\iVARIA
+1FCE:GREEK PSILI\iOXIA
+1FCF:GREEK PSILI\i\´
+1FD0:\yIOTA\HVRACHY
+1FD1:\yIOTA\H\å
+1FD2:\yIOTA\HDIALYTIKA\iVARIA
+1FD3:\yIOTA\HDIALYTIKA\iOXIA
+1FD6:\yIOTA\H\´
+1FD7:\yIOTA\HDIALYTIKA\i\´
+1FD8:\9IOTA\HVRACHY
+1FD9:\9IOTA\H\å
+1FDA:\9IOTA\HVARIA
+1FDB:\9IOTA\HOXIA
+1FDD:GREEK DASIA\iVARIA
+1FDE:GREEK DASIA\iOXIA
+1FDF:GREEK DASIA\i\´
+1FE0:\yU\É\HVRACHY
+1FE1:\yU\É\H\å
+1FE2:\yU\É\HDIALYTIKA\iVARIA
+1FE3:\yU\É\HDIALYTIKA\iOXIA
+1FE4:\yRHO\HPSILI
+1FE5:\yRHO\HDASIA
+1FE6:\yU\É\H\´
+1FE7:\yU\É\HDIALYTIKA\i\´
+1FE8:\9U\É\HVRACHY
+1FE9:\9U\É\H\å
+1FEA:\9U\É\HVARIA
+1FEB:\9U\É\HOXIA
+1FEC:\9RHO\HDASIA
+1FED:GREEK DIALYTIKA\iVARIA
+1FEE:GREEK DIALYTIKA\iOXIA
+1FEF:GREEK VARIA
+1FF2:\y\ü\HVARIA\iYPO\œ
+1FF3:\y\ü\HYPO\œ
+1FF4:\y\ü\HOXIA\iYPO\œ
+1FF6:\y\ü\H\´
+1FF7:\y\ü\H\´\iYPO\œ
+1FF8:\9OMICRON\HVARIA
+1FF9:\9OMICRON\HOXIA
+1FFA:\9\ü\HVARIA
+1FFB:\9\ü\HOXIA
+1FFC:\9\ü\HPROS\œ
+1FFD:GREEK OXIA
+1FFE:GREEK DASIA
+2000:EN QUAD
+2001:EM QUAD
+2002:EN SPACE
+2003:EM SPACE
+2004:THREE-PER-EM SPACE
+2005:FOUR-PER-EM SPACE
+2006:SIX-PER-EM SPACE
+2007:FIGURE SPACE
+2008:PUNCTU\” SPACE
+2009:THIN SPACE
+200A:HAIR SPACE
+200B:ZERO WIDTH SPACE
+200C:ZERO WIDTH NON-JOINER
+200D:ZERO WIDTH JOINER
+200E:\‰-TO-\ùMARK
+200F:\q-TO-\‰\¥
+2010:HYPHEN
+2011:NON-BREAK\ô HYPHEN
+2012:FIGURE DASH
+2013:EN DASH
+2014:EM DASH
+2015:\\ì
+2016:\0 \€ \ä
+2017:\0 LOW \ä
+2018:\‰ S\ôLE QUOT\”\¥
+2019:\ùS\ôLE QUOT\”\¥
+201A:S\ôLE LOW-9 QUOT\”\¥
+201B:S\ôLE HIGH-REVERSED-9 QUOT\”\¥
+201C:\‰ \0 QUOT\”\¥
+201D:\ù\0 QUOT\”\¥
+201E:\0 LOW-9 QUOT\”\¥
+201F:\0 HIGH-REVERSED-9 QUOT\”\¥
+2020:DAGGER
+2021:\0 DAGGER
+2022:BULLET
+2023:TRIANGULAR BULLET
+2024:ONE DOT LEADER
+2025:TWO DOT LEADER
+2026:\ ELLIPSIS
+2027:HYPHEN\” POINT
+2028:\ä SEPARATOR
+2029:PARAGRAPH SEPARATOR
+202A:\‰-TO-\ùEMBEDD\ô
+202B:\q-TO-\‰ EMBEDD\ô
+202C:POP DIRECTION\XATT\ô
+202D:\‰-TO-\ùOVERRIDE
+202E:\q-TO-\‰ OVERRIDE
+202F:NARROW NO-BREAK SPACE
+2030:PER MILLE\‚
+2031:PER TEN THOUSAND\‚
+2032:PRIME
+2033:\0 PRIME
+2034:TRIPLE PRIME
+2035:\öPRIME
+2036:\ö\0 PRIME
+2037:\öTRIPLE PRIME
+2038:CARET
+2039:S\ôLE \‰-\ÄANGLE QUOT\”\¥
+203A:S\ôLE \q-\ÄANGLE QUOT\”\¥
+203B:REFERENCE\¥
+203C:\0 EXCLAM\”\¥
+203D:INTERROBANG
+203E:OVER\ä
+203F:UNDERTIE
+2040:CHARACTER TIE
+2041:CARET INSERTION POINT
+2042:ASTERISM
+2043:HYPHEN BULLET
+2044:FRACTION SLASH
+2045:\‰ \r\–\HQUILL
+2046:\ù\r\–\HQUILL
+2047:\0 QUESTION\¥
+2048:QUESTION EXCLAM\”\¥
+2049:EXCLAM\” QUESTION\¥
+204A:TIRONIAN\‚ ET
+204B:\öPILCROW\‚
+204C:\¬ \‰\Š BULLET
+204D:\¬ \q\Š BULLET
+204E:LOW ASTERISK
+204F:\öSEMICOLON
+2050:CLOSE UP
+2051:TWO ASTERISKS ALIGN\Â\€LY
+2052:COMMERCIAL MINUS\‚
+2057:QUADRUPLE PRIME
+205F:MEDIUM \ESPACE
+2060:WORD JOINER
+2061:FUNCTION APPLIC\”
+2062:INVISIBLE TIMES
+2063:INVISIBLE SEPARATOR
+206A:INHIBIT SYMMETRIC SWAPP\ô
+206B:ACTIVATE SYMMETRIC SWAPP\ô
+206C:INHIBIT \Ê FORM SHAP\ô
+206D:ACTIVATE \Ê FORM SHAP\ô
+206E:N\”AL\hSHAPES
+206F:NOMINAL\hSHAPES
+2070:SUPER\Ž ZERO
+2071:SUPER\Ž \LI
+2074:SUPER\Ž FOUR
+2075:SUPER\Ž FIVE
+2076:SUPER\Ž SIX
+2077:SUPER\Ž SEVEN
+2078:SUPER\Ž E\¼
+2079:SUPER\Ž NINE
+207A:SUPER\Ž PLUS\‚
+207B:SUPER\Ž MINUS
+207C:SUPER\Ž EQUALS\‚
+207D:SUPER\Ž \‰ \ÑS
+207E:SUPER\Ž \ù\ÑS
+207F:SUPER\Ž \LN
+2080:SUB\Ž ZERO
+2081:SUB\Ž ONE
+2082:SUB\Ž TWO
+2083:SUB\Ž THREE
+2084:SUB\Ž FOUR
+2085:SUB\Ž FIVE
+2086:SUB\Ž SIX
+2087:SUB\Ž SEVEN
+2088:SUB\Ž E\¼
+2089:SUB\Ž NINE
+208A:SUB\Ž PLUS\‚
+208B:SUB\Ž MINUS
+208C:SUB\Ž EQUALS\‚
+208D:SUB\Ž \‰ \ÑS
+208E:SUB\Ž \ù\ÑS
+20A0:EURO-CURRENCY\‚
+20A1:COLON\‚
+20A2:CRUZEIRO\‚
+20A3:FRENCH FRANC\‚
+20A4:LIRA\‚
+20A5:MILL\‚
+20A6:NAIRA\‚
+20A7:PESETA\‚
+20A8:RUPEE\‚
+20A9:WON\‚
+20AA:NEW SHEQEL\‚
+20AB:DONG\‚
+20AC:EURO\‚
+20AD:KIP\‚
+20AE:TUGRIK\‚
+20AF:DRACHMA\‚
+20B0:GERMAN PENNY\‚
+20B1:PESO\‚
+20D0:\o\‰ HARPOON\p
+20D1:\o\ùHARPOON\p
+20D2:\oLONG \€ \ä OVERLAY
+20D3:\oSHORT \€ \ä OVERLAY
+20D4:\oANTICLOCKWISE\u\p
+20D5:\oCLOCKWISE\u\p
+20D6:\o\‰\u\p
+20D7:\o\q\u\p
+20D8:\oR\ô OVERLAY
+20D9:\oCLOCKWISE R\ô OVERLAY
+20DA:\oANTICLOCKWISE R\ô OVERLAY
+20DB:\oTHREE DOTS\p
+20DC:\oFOUR DOTS\p
+20DD:\oENCLOS\ô \Ð
+20DE:\oENCLOS\ô \ý
+20DF:\oENCLOS\ô DIAMOND
+20E0:\oENCLOS\ô \Ð BACKSLASH
+20E1:\o\‰ \q\u\p
+20E2:\oENCLOS\ô SCREEN
+20E3:\oENCLOS\ô KEYCAP
+20E4:\oENCLOS\ô UPWARD \Ä\¾
+20E5:\oREVERSE SOLIDUS OVERLAY
+20E6:\o\0 \€ \Á OVERLAY
+20E7:\oANNUITY \
+20E8:\oTRIPLE UNDERDOT
+20E9:\oWIDE BRIDGE\p
+20EA:\o\‰\Š\u OVERLAY
+2100:ACCOUNT OF
+2101:ADDRESS\ÂTO THE SUBJECT
+2102:\¤\ÒC
+2103:DEGREE CELSIUS
+2104:CENTRE \ä \
+2105:CARE OF
+2106:CADA UNA
+2107:EULER CONSTANT
+2108:SCRUPLE
+2109:DEGREE FAHRENHEIT
+210A:\Ž\ÇG
+210B:\Ž\ÒH
+210C:\¬-LETTER\ÒH
+210D:\¤\ÒH
+210E:PLANCK CONSTANT
+210F:PLANCK CONSTANT OVER TWO PI
+2110:\Ž\ÒI
+2111:\¬-LETTER\ÒI
+2112:\Ž\ÒL
+2113:\Ž\ÇL
+2114:L B\ì \
+2115:\¤\ÒN
+2116:NUMERO\‚
+2117:SOUND RECORD\ô COPY\q
+2118:\Ž\ÒP
+2119:\¤\ÒP
+211A:\¤\ÒQ
+211B:\Ž\ÒR
+211C:\¬-LETTER\ÒR
+211D:\¤\ÒR
+211E:PRE\ŽION TAKE
+211F:RESPONSE
+2120:SERVICE\¥
+2121:TELEPHONE\‚
+2122:TRADE\¥\‚
+2123:VERSICLE
+2124:\¤\ÒZ
+2125:OUNCE\‚
+2126:OHM\‚
+2127:INVERT\ÂOHM\‚
+2128:\¬-LETTER\ÒZ
+2129:TURN\Â\yIOTA
+212A:KELVIN\‚
+212B:ANGSTROM\‚
+212C:\Ž\ÒB
+212D:\¬-LETTER\ÒC
+212E:ESTIMAT\Â\
+212F:\Ž\ÇE
+2130:\Ž\ÒE
+2131:\Ž\ÒF
+2132:TURNED\ÒF
+2133:\Ž\ÒM
+2134:\Ž\ÇO
+2135:ALEF \
+2136:BET \
+2137:GIMEL \
+2138:DALET \
+2139:INFORM\” SOURCE
+213A:ROTATED\ÒQ
+213D:\¤\ÇGAMMA
+213E:\¤\ÒGAMMA
+213F:\¤\ÒPI
+2140:\¤ N-ARY SUMM\”
+2141:TURN\ÂSANS-SERIF\ÒG
+2142:TURN\ÂSANS-SERIF\ÒL
+2143:\öSANS-SERIF\ÒL
+2144:TURN\ÂSANS-SERIF\ÒY
+2145:\¤ \›D
+2146:\¤ \—D
+2147:\¤ \—E
+2148:\¤ \—I
+2149:\¤ \—J
+214A:PROPERTY \ä
+214B:TURN\ÂAMPERSAND
+2153:\úONE THIRD
+2154:\úTWO THIRDS
+2155:\úONE FIFTH
+2156:\úTWO FIFTHS
+2157:\úTHREE FIFTHS
+2158:\úFOUR FIFTHS
+2159:\úONE SIXTH
+215A:\úFIVE SIXTHS
+215B:\úONE E\¼H
+215C:\úTHREE E\¼HS
+215D:\úFIVE E\¼HS
+215E:\úSEVEN E\¼HS
+215F:FRACTION NUMERATOR ONE
+2160:\²ONE
+2161:\²TWO
+2162:\²THREE
+2163:\²FOUR
+2164:\²FIVE
+2165:\²SIX
+2166:\²SEVEN
+2167:\²E\¼
+2168:\²NINE
+2169:\²TEN
+216A:\²ELEVEN
+216B:\²TWELVE
+216C:\²FIFTY
+216D:\²ONE HUNDRED
+216E:\²FIVE HUNDRED
+216F:\²ONE THOUSAND
+2170:\§\²ONE
+2171:\§\²TWO
+2172:\§\²THREE
+2173:\§\²FOUR
+2174:\§\²FIVE
+2175:\§\²SIX
+2176:\§\²SEVEN
+2177:\§\²E\¼
+2178:\§\²NINE
+2179:\§\²TEN
+217A:\§\²ELEVEN
+217B:\§\²TWELVE
+217C:\§\²FIFTY
+217D:\§\²ONE HUNDRED
+217E:\§\²FIVE HUNDRED
+217F:\§\²ONE THOUSAND
+2180:\²ONE THOUSAND C D
+2181:\²FIVE THOUSAND
+2182:\²TEN THOUSAND
+2183:\²\öONE HUNDRED
+2190:\‰\Š\u
+2191:UP\Š\u
+2192:\Ù
+2193:\Ë\Š\u
+2194:\‰ \q\u
+2195:UP \Ë\u
+2196:NORTH WEST\u
+2197:NORTH EAST\u
+2198:SOUTH EAST\u
+2199:SOUTH WEST\u
+219A:\‰\Š\u\H\Á
+219B:\Ù\H\Á
+219C:\‰\Š WAVE\u
+219D:\q\Š WAVE\u
+219E:\‰\Š TWO HEADED\u
+219F:UP\Š TWO HEADED\u
+21A0:\q\Š TWO HEADED\u
+21A1:\Ë\Š TWO HEADED\u
+21A2:\‰\Š\u\HTAIL
+21A3:\Ù\HTAIL
+21A4:\‰\Š\u FROM\ì
+21A5:UP\Š\u FROM\ì
+21A6:\Ù FROM\ì
+21A7:\Ë\Š\u FROM\ì
+21A8:UP \Ë\u\HBASE
+21A9:\‰\Š\u\í
+21AA:\Ù\í
+21AB:\‰\Š\u\HLOOP
+21AC:\Ù\HLOOP
+21AD:\‰ \ùWAVE\u
+21AE:\‰ \q\u\H\Á
+21AF:\Ë\Š ZIGZAG\u
+21B0:UP\Š\u\HTIP \‰\Š
+21B1:UP\Š\u\HTIP \q\Š
+21B2:\Ë\Š\u\HTIP \‰\Š
+21B3:\Ë\Š\u\HTIP \q\Š
+21B4:\Ù\HCORNER \Ë\Š
+21B5:\Ë\Š\u\HCORNER \‰\Š
+21B6:ANTICLOCKWISE TOP SEMI\Ð\u
+21B7:CLOCKWISE TOP SEMI\Ð\u
+21B8:NORTH WEST\u TO LONG\ì
+21B9:\‰\Š\u TO\ì OVER \Ù TO\ì
+21BA:ANTICLOCKWISE OPEN \Ð\u
+21BB:CLOCKWISE OPEN \Ð\u
+21BC:\‰\ƒUP\Š
+21BD:\‰\ƒ\Ë\Š
+21BE:UP\ƒ\q\Š
+21BF:UP\ƒ\‰\Š
+21C0:\q\ƒUP\Š
+21C1:\q\ƒ\Ë\Š
+21C2:\Ë\ƒ\q\Š
+21C3:\Ë\ƒ\‰\Š
+21C4:\Ù OVER \‰\Š\u
+21C5:UP\Š\u \‰\Š OF \Ë\Š\u
+21C6:\‰\Š\u OVER \Ù
+21C7:\‰\Š PAIRED\uS
+21C8:UP\Š PAIRED\uS
+21C9:\q\Š PAIRED\uS
+21CA:\Ë\Š PAIRED\uS
+21CB:\‰\Š HARPOON OVER \q\Š HARPOON
+21CC:\q\Š HARPOON OVER \‰\Š HARPOON
+21CD:\‰\Š \0\u\H\Á
+21CE:\‰ \ù\0\u\H\Á
+21CF:\q\Š \0\u\H\Á
+21D0:\‰\Š \0\u
+21D1:UP\Š \0\u
+21D2:\q\Š \0\u
+21D3:\Ë\Š \0\u
+21D4:\‰ \ù\0\u
+21D5:UP \Ë \0\u
+21D6:NORTH WEST \0\u
+21D7:NORTH EAST \0\u
+21D8:SOUTH EAST \0\u
+21D9:SOUTH WEST \0\u
+21DA:\‰\Š TRIPLE\u
+21DB:\q\Š TRIPLE\u
+21DC:\‰\Š SQUIGGLE\u
+21DD:\q\Š SQUIGGLE\u
+21DE:UP\Š\u\H\0 \Á
+21DF:\Ë\Š\u\H\0 \Á
+21E0:\‰\Š DASHED\u
+21E1:UP\Š DASHED\u
+21E2:\q\Š DASHED\u
+21E3:\Ë\Š DASHED\u
+21E4:\‰\Š\u TO\ì
+21E5:\Ù TO\ì
+21E6:\‰\Š WHITE\u
+21E7:UP\Š WHITE\u
+21E8:\q\Š WHITE\u
+21E9:\Ë\Š WHITE\u
+21EA:UP\Š WHITE\u FROM\ì
+21EB:UP\Š WHITE\u ON PEDESTAL
+21EC:UP\Š WHITE\u ON PEDESTAL\H\\ì
+21ED:UP\Š WHITE\u ON PEDESTAL\H\€\ì
+21EE:UP\Š \¦\0\u
+21EF:UP\Š \¦\0\u ON PEDESTAL
+21F0:\q\Š WHITE\u FROM WALL
+21F1:NORTH WEST\u TO CORNER
+21F2:SOUTH EAST\u TO CORNER
+21F3:UP \Ë WHITE\u
+21F4:\q\u WITH\Ç\Ð
+21F5:\Ë\Š\u \‰\Š OF UP\Š\u
+21F6:THREE \ÙS
+21F7:\‰\Š\u\H\€ \Á
+21F8:\Ù\H\€ \Á
+21F9:\‰ \q\u\H\€ \Á
+21FA:\‰\Š\u\H\0 \€ \Á
+21FB:\Ù\H\0 \€ \Á
+21FC:\‰ \q\u\H\0 \€ \Á
+21FD:\‰\Š OPEN-HEADED\u
+21FE:\q\Š OPEN-HEADED\u
+21FF:\‰ \ùOPEN-HEADED\u
+2200:FOR ALL
+2201:COMPLEMENT
+2202:PARTIAL DIFFERENTIAL
+2203:THERE EXISTS
+2204:THERE DOES NOT EXIST
+2205:EMPTY SET
+2206:INCREMENT
+2207:NABLA
+2208:ELEMENT OF
+2209:NOT AN ELEMENT OF
+220A:\§ELEMENT OF
+220B:CONTAINS AS MEMBER
+220C:DOES NOT CONTAIN AS MEMBER
+220D:\§CONTAINS AS MEMBER
+220E:END OF PROOF
+220F:N-ARY PRODUCT
+2210:N-ARY COPRODUCT
+2211:N-ARY SUMM\”
+2212:MINUS\‚
+2213:MINUS-OR-PLUS\‚
+2214:DOT PLUS
+2215:DIVISION SLASH
+2216:SET MINUS
+2217:ASTERISK\Ú
+2218:R\ô\Ú
+2219:BULLET\Ú
+221A:\rROOT
+221B:CUBE ROOT
+221C:FOURTH ROOT
+221D:PROPORTIONAL TO
+221E:INFINITY
+221F:\ùANGLE
+2220:ANGLE
+2221:MEASUR\ÂANGLE
+2222:SPHERICAL ANGLE
+2223:DIVIDES
+2224:DOES NOT DIVIDE
+2225:PARALLEL TO
+2226:NOT PARALLEL TO
+2227:LOGICAL AND
+2228:LOGICAL OR
+2229:INTERSECTION
+222A:UNION
+222B:INTEGRAL
+222C:\0 INTEGRAL
+222D:TRIPLE INTEGRAL
+222E:CONTOUR INTEGRAL
+222F:SURFACE INTEGRAL
+2230:VOLUME INTEGRAL
+2231:CLOCKWISE INTEGRAL
+2232:CLOCKWISE CONTOUR INTEGRAL
+2233:ANTICLOCKWISE CONTOUR INTEGRAL
+2234:THEREFORE
+2235:BECAUSE
+2236:RATIO
+2237:PROPORTION
+2238:DOT MINUS
+2239:EXCESS
+223A:GEOMETRIC PROPORTION
+223B:HOMOTHETIC
+223C:\æ\Ú
+223D:\ö\æ
+223E:INVERT\ÂLAZY S
+223F:SINE WAVE
+2240:WREATH PRODUCT
+2241:NOT \æ
+2242:MINUS \æ
+2243:ASYMPTOTICALLY\‘
+2244:NOT ASYMPTOTICALLY\‘
+2245:APPROXIMATELY\‘
+2246:APPROXIMATELY BUT NOT ACTUALLY\‘
+2247:NEITHER APPROXIMATELY NOR ACTUALLY\‘
+2248:ALMOST\‘
+2249:NOT ALMOST\‘
+224A:ALMOST EQUAL OR\‘
+224B:TRIPLE \æ
+224C:ALL\‘
+224D:EQUIVALENT TO
+224E:GEOMETRICALLY EQUIVALENT TO
+224F:DIFFERENCE BETWEEN
+2250:APPROACHES THE LIMIT
+2251:GEOMETRICALLY\‘
+2252:APPROXIMATELY\‘ OR THE IMAGE OF
+2253:IMAGE OF OR APPROXIMATELY\‘
+2254:COLON EQUALS
+2255:EQUALS COLON
+2256:R\ô IN\‘
+2257:R\ô\‘
+2258:CORRESPONDS TO
+2259:ESTIMATES
+225A:EQUIANGULAR TO
+225B:STAR EQUALS
+225C:DELTA\‘
+225D:EQUAL TO BY DEFINITION
+225E:MEASUR\ÂBY
+225F:QUESTIONED\‘
+2260:NOT\‘
+2261:IDENTICAL TO
+2262:NOT IDENTICAL TO
+2263:STRICTLY EQUIVALENT TO
+2264:\µ OR\‘
+2265:\’ OR\‘
+2266:\µ OVER\‘
+2267:\’ OVER\‘
+2268:\µ BUT NOT\‘
+2269:\’ BUT NOT\‘
+226A:MUCH \µ
+226B:MUCH \’
+226C:BETWEEN
+226D:NOT EQUIVALENT TO
+226E:NOT \µ
+226F:NOT \’
+2270:NEITHER \µ NOR\‘
+2271:NEITHER \’ NOR\‘
+2272:\µ OR EQUIVALENT TO
+2273:\’ OR EQUIVALENT TO
+2274:NEITHER \µ NOR EQUIVALENT TO
+2275:NEITHER \’ NOR EQUIVALENT TO
+2276:\µ OR \’
+2277:\’ OR \µ
+2278:NEITHER \µ NOR \’
+2279:NEITHER \’ NOR \µ
+227A:PRECEDES
+227B:SUCCEEDS
+227C:PRECEDES OR\‘
+227D:SUCCEEDS OR\‘
+227E:PRECEDES OR EQUIVALENT TO
+227F:SUCCEEDS OR EQUIVALENT TO
+2280:DOES NOT PRECEDE
+2281:DOES NOT SUCCEED
+2282:SUBSET OF
+2283:SUPERSET OF
+2284:NOT A SUBSET OF
+2285:NOT A SUPERSET OF
+2286:SUBSET OF OR\‘
+2287:SUPERSET OF OR\‘
+2288:NEITHER A SUBSET OF NOR\‘
+2289:NEITHER A SUPERSET OF NOR\‘
+228A:SUBSET OF\HNOT\‘
+228B:SUPERSET OF\HNOT\‘
+228C:MULTISET
+228D:MULTISET MULTIPLIC\”
+228E:MULTISET UNION
+228F:\rIMAGE OF
+2290:\rORIGINAL OF
+2291:\rIMAGE OF OR\‘
+2292:\rORIGINAL OF OR\‘
+2293:\rCAP
+2294:\rCUP
+2295:\cPLUS
+2296:\cMINUS
+2297:\cTIMES
+2298:\cDIVISION SLASH
+2299:\cDOT\Ú
+229A:\cR\ô\Ú
+229B:\cASTERISK\Ú
+229C:\cEQUALS
+229D:\cDASH
+229E:\ýD PLUS
+229F:\ýD MINUS
+22A0:\ýD TIMES
+22A1:\ýD DOT\Ú
+22A2:\ùTACK
+22A3:\‰ TACK
+22A4:\Ë TACK
+22A5:UP TACK
+22A6:ASSERTION
+22A7:MODELS
+22A8:TRUE
+22A9:FORCES
+22AA:TRIPLE \€\ì \ùTURNSTILE
+22AB:\0 \€\ì \0 \ùTURNSTILE
+22AC:DOES NOT PROVE
+22AD:NOT TRUE
+22AE:DOES NOT FORCE
+22AF:NEGAT\Â\0 \€\ì \0 \ùTURNSTILE
+22B0:PRECEDES UNDER REL\”
+22B1:SUCCEEDS UNDER REL\”
+22B2:NORMAL SUBGROUP OF
+22B3:CONTAINS AS NORMAL SUBGROUP
+22B4:NORMAL SUBGROUP OF OR\‘
+22B5:CONTAINS AS NORMAL SUBGROUP OR\‘
+22B6:ORIGINAL OF
+22B7:IMAGE OF
+22B8:MULTIMAP
+22B9:HERMITIAN CONJUGATE MATRIX
+22BA:INTERCALATE
+22BB:XOR
+22BC:NAND
+22BD:NOR
+22BE:\ùANGLE\HARC
+22BF:\ù\¾
+22C0:N-ARY LOGICAL AND
+22C1:N-ARY LOGICAL OR
+22C2:N-ARY INTERSECTION
+22C3:N-ARY UNION
+22C4:DIAMOND\Ú
+22C5:DOT\Ú
+22C6:STAR\Ú
+22C7:DIVISION TIMES
+22C8:BOWTIE
+22C9:\‰ NORMAL FACTOR SEMIDIRECT PRODUCT
+22CA:\ùNORMAL FACTOR SEMIDIRECT PRODUCT
+22CB:\‰ SEMIDIRECT PRODUCT
+22CC:\ùSEMIDIRECT PRODUCT
+22CD:\ö\æ EQUALS
+22CE:CURLY LOGICAL OR
+22CF:CURLY LOGICAL AND
+22D0:\0 SUBSET
+22D1:\0 SUPERSET
+22D2:\0 INTERSECTION
+22D3:\0 UNION
+22D4:PITCHFORK
+22D5:EQUAL\iPARALLEL TO
+22D6:\µ\³
+22D7:\’\³
+22D8:VERY MUCH \µ
+22D9:VERY MUCH \’
+22DA:\µ\‘ OR \’
+22DB:\’\‘ OR \µ
+22DC:EQUAL TO OR \µ
+22DD:EQUAL TO OR \’
+22DE:EQUAL TO OR PRECEDES
+22DF:EQUAL TO OR SUCCEEDS
+22E0:DOES NOT PRECEDE OR EQUAL
+22E1:DOES NOT SUCCE\ÂOR EQUAL
+22E2:NOT \rIMAGE OF OR\‘
+22E3:NOT \rORIGINAL OF OR\‘
+22E4:\rIMAGE OF OR NOT\‘
+22E5:\rORIGINAL OF OR NOT\‘
+22E6:\µ BUT NOT EQUIVALENT TO
+22E7:\’ BUT NOT EQUIVALENT TO
+22E8:PRECEDES BUT NOT EQUIVALENT TO
+22E9:SUCCEEDS BUT NOT EQUIVALENT TO
+22EA:NOT NORMAL SUBGROUP OF
+22EB:DOES NOT CONTAIN AS NORMAL SUBGROUP
+22EC:NOT NORMAL SUBGROUP OF OR\‘
+22ED:DOES NOT CONTAIN AS NORMAL SUBGROUP OR EQUAL
+22EE:\€ ELLIPSIS
+22EF:MID\ä \ ELLIPSIS
+22F0:UP \ùDIAGONAL ELLIPSIS
+22F1:\Ë \ùDIAGONAL ELLIPSIS
+22F2:ELEMENT OF\HLONG \ \Á
+22F3:ELEMENT OF\H\€\ì AT END OF \ \Á
+22F4:\§ELEMENT OF\H\€\ì AT END OF \ \Á
+22F5:ELEMENT OF\³\p
+22F6:ELEMENT OF\HOVERBAR
+22F7:\§ELEMENT OF\HOVERBAR
+22F8:ELEMENT OF\HUNDERBAR
+22F9:ELEMENT OF\HTWO \ \ÁS
+22FA:CONTAINS\HLONG \ \Á
+22FB:CONTAINS\H\€\ì AT END OF \ \Á
+22FC:\§CONTAINS\H\€\ì AT END OF \ \Á
+22FD:CONTAINS\HOVERBAR
+22FE:\§CONTAINS\HOVERBAR
+22FF:Z NOT\” BAG MEMBERSHIP
+2300:DIAMETER\‚
+2301:ELECTRIC\u
+2302:HOUSE
+2303:UP\uHEAD
+2304:\Ë\uHEAD
+2305:PROJECTIVE
+2306:PERSPECTIVE
+2307:WAVY \ä
+2308:\‰ CEIL\ô
+2309:\ùCEIL\ô
+230A:\‰ FLOOR
+230B:\ùFLOOR
+230C:BOTTOM \ùCROP
+230D:BOTTOM \‰ CROP
+230E:TOP \ùCROP
+230F:TOP \‰ CROP
+2310:\öNOT\‚
+2311:\rLOZENGE
+2312:ARC
+2313:SEGMENT
+2314:SECTOR
+2315:TELEPHONE RECORDER
+2316:POSITION INDICATOR
+2317:VIEWDATA \ý
+2318:PLACE OF INTEREST\‚
+2319:TURN\ÂNOT\‚
+231A:WATCH
+231B:HOURGLASS
+231C:TOP \‰ CORNER
+231D:TOP \ùCORNER
+231E:BOTTOM \‰ CORNER
+231F:BOTTOM \ùCORNER
+2320:TOP HALF INTEGRAL
+2321:BOTTOM HALF INTEGRAL
+2322:FROWN
+2323:SMILE
+2324:UP\uHEAD BETWEEN TWO \\ìS
+2325:OPTION KEY
+2326:ERASE TO THE \q
+2327:X IN A RECTANGLE BOX
+2328:KEYBOARD
+2329:\‰-\ÄANGLE \–
+232A:\q-\ÄANGLE \–
+232B:ERASE TO THE \‰
+232C:BENZENE R\ô
+232D:CYLINDRICITY
+232E:ALL AROUND-PROFILE
+232F:SYMMETRY
+2330:TOTAL RUNOUT
+2331:DIMENSION ORIGIN
+2332:CONICAL TAPER
+2333:SLOPE
+2334:COUNTERBORE
+2335:COUNTERSINK
+2336:\lI-BEAM
+2337:\lSQUISH QUAD
+2338:\lQUAD EQUAL
+2339:\lQUAD DIVIDE
+233A:\lQUAD DIAMOND
+233B:\lQUAD JOT
+233C:\lQUAD \Ð
+233D:\l\Ð STILE
+233E:\l\Ð JOT
+233F:\lSLASH\ì
+2340:\lBACKSLASH\ì
+2341:\lQUAD SLASH
+2342:\lQUAD BACKSLASH
+2343:\lQUAD \µ
+2344:\lQUAD \’
+2345:\l\‰\Š VANE
+2346:\l\q\Š VANE
+2347:\lQUAD \‰\Š\u
+2348:\lQUAD \Ù
+2349:\l\Ð BACKSLASH
+234A:\l\Ë TACK UNDERBAR
+234B:\lDELTA STILE
+234C:\lQUAD \Ë CARET
+234D:\lQUAD DELTA
+234E:\l\Ë TACK JOT
+234F:\lUP\Š VANE
+2350:\lQUAD UP\Š\u
+2351:\lUP TACK OVERBAR
+2352:\lDEL STILE
+2353:\lQUAD UP CARET
+2354:\lQUAD DEL
+2355:\lUP TACK JOT
+2356:\l\Ë\Š VANE
+2357:\lQUAD \Ë\Š\u
+2358:\lQUOTE UNDERBAR
+2359:\lDELTA UNDERBAR
+235A:\lDIAMOND UNDERBAR
+235B:\lJOT UNDERBAR
+235C:\l\Ð UNDERBAR
+235D:\lUP SHOE JOT
+235E:\lQUOTE QUAD
+235F:\l\Ð STAR
+2360:\lQUAD COLON
+2361:\lUP TACK DIAERESIS
+2362:\lDEL DIAERESIS
+2363:\lSTAR DIAERESIS
+2364:\lJOT DIAERESIS
+2365:\l\Ð DIAERESIS
+2366:\l\Ë SHOE STILE
+2367:\l\‰ SHOE STILE
+2368:\l\æ DIAERESIS
+2369:\l\’ DIAERESIS
+236A:\lCOMMA\ì
+236B:\lDEL \æ
+236C:\lZILDE
+236D:\lSTILE \æ
+236E:\lSEMICOLON UNDERBAR
+236F:\lQUAD NOT EQUAL
+2370:\lQUAD QUESTION
+2371:\l\Ë CARET \æ
+2372:\lUP CARET \æ
+2373:\lIOTA
+2374:\lRHO
+2375:\l\ü
+2376:\l\þ UNDERBAR
+2377:\lE\É UNDERBAR
+2378:\lIOTA UNDERBAR
+2379:\l\ü UNDERBAR
+237A:\l\þ
+237B:NOT CHECK\¥
+237C:\ùANGLE\H\Ë\Š ZIGZAG\u
+237D:SHOULDER\ÂOPEN BOX
+237E:BELL \
+237F:\€ \ä\HMIDDLE DOT
+2380:INSERTION \
+2381:CONTINUOUS UNDER\ä \
+2382:DISCONTINUOUS UNDER\ä \
+2383:EMPHASIS \
+2384:COMPOSITION \
+2385:\¦\rWITH CENTRE \€ \ä
+2386:ENTER \
+2387:ALTERNATIVE KEY \
+2388:HELM \
+2389:\c\\ì\HNOTCH
+238A:\c\¾ \Ë
+238B:BROKEN \Ð\HNORTHWEST\u
+238C:UNDO \
+238D:MONOSTABLE \
+238E:HYSTERESIS \
+238F:OPEN-CIRCUIT-OUTPUT H-TYPE \
+2390:OPEN-CIRCUIT-OUTPUT L-TYPE \
+2391:PASSIVE-PULL-\Ë-OUTPUT \
+2392:PASSIVE-PULL-UP-OUTPUT \
+2393:DIRECT CURRENT \ FORM TWO
+2394:SOFTWARE-FUNCTION \
+2395:\lQUAD
+2396:DECIMAL SEPARATOR KEY \
+2397:PREVIOUS PAGE
+2398:NEXT PAGE
+2399:PRINT SCREEN \
+239A:CLEAR SCREEN \
+239B:\‰ \ÑS \÷HOOK
+239C:\‰ \ÑS EXTENSION
+239D:\‰ \ÑS \ïHOOK
+239E:\ù\ÑS \÷HOOK
+239F:\ù\ÑS EXTENSION
+23A0:\ù\ÑS \ïHOOK
+23A1:\‰ \r\– \÷CORNER
+23A2:\‰ \r\– EXTENSION
+23A3:\‰ \r\– \ïCORNER
+23A4:\ù\r\– \÷CORNER
+23A5:\ù\r\– EXTENSION
+23A6:\ù\r\– \ïCORNER
+23A7:\‰ CURLY \– \÷HOOK
+23A8:\‰ CURLY \– MIDDLE PIECE
+23A9:\‰ CURLY \– \ïHOOK
+23AA:CURLY \– EXTENSION
+23AB:\ùCURLY \– \÷HOOK
+23AC:\ùCURLY \– MIDDLE PIECE
+23AD:\ùCURLY \– \ïHOOK
+23AE:INTEGRAL EXTENSION
+23AF:\ \ä EXTENSION
+23B0:\÷\‰ OR \ï\ùCURLY \– SECTION
+23B1:\÷\ùOR \ï\‰ CURLY \– SECTION
+23B2:SUMM\” TOP
+23B3:SUMM\” BOTTOM
+23B4:TOP \r\–
+23B5:BOTTOM \r\–
+23B6:BOTTOM \r\– OVER TOP \r\–
+23B7:RADICAL \ BOTTOM
+23B8:\‰ \€ BOX \ä
+23B9:\ù\€ BOX \ä
+23BA:\ SCAN \ä-1
+23BB:\ SCAN \ä-3
+23BC:\ SCAN \ä-7
+23BD:\ SCAN \ä-9
+23BE:\ó\€\iTOP \q
+23BF:\ó\€\iBOTTOM \q
+23C0:\ó\€\H\Ð
+23C1:\ó\Ë\i\\H\Ð
+23C2:\óUP\i\\H\Ð
+23C3:\ó\€\H\¾
+23C4:\ó\Ë\i\\H\¾
+23C5:\óUP\i\\H\¾
+23C6:\ó\€\iWAVE
+23C7:\ó\Ë\i\\HWAVE
+23C8:\óUP\i\\HWAVE
+23C9:\ó\Ë\i\
+23CA:\óUP\i\
+23CB:\ó\€\iTOP \‰
+23CC:\ó\€\iBOTTOM \‰
+23CD:\rFOOT
+23CE:RETURN \
+2400:\ñNULL
+2401:\ñSTART OF HEAD\ô
+2402:\ñSTART OF TEXT
+2403:\ñEND OF TEXT
+2404:\ñEND OF TRANSMISSION
+2405:\ñENQUIRY
+2406:\ñACKNOWLEDGE
+2407:\ñBELL
+2408:\ñBACKSPACE
+2409:\ñ\ TABUL\”
+240A:\ñ\ä FEED
+240B:\ñ\€ TABUL\”
+240C:\ñFORM FEED
+240D:\ñCARRIAGE RETURN
+240E:\ñSHIFT OUT
+240F:\ñSHIFT IN
+2410:\ñDATA LINK ESCAPE
+2411:\ñDEVICE CONTROL ONE
+2412:\ñDEVICE CONTROL TWO
+2413:\ñDEVICE CONTROL THREE
+2414:\ñDEVICE CONTROL FOUR
+2415:\ñNEGATIVE ACKNOWLEDGE
+2416:\ñSYNCHRONOUS IDLE
+2417:\ñEND OF TRANSMISSION BLOCK
+2418:\ñCANCEL
+2419:\ñEND OF MEDIUM
+241A:\ñSUBSTITUTE
+241B:\ñESCAPE
+241C:\ñFILE SEPARATOR
+241D:\ñGROUP SEPARATOR
+241E:\ñRECORD SEPARATOR
+241F:\ñUNIT SEPARATOR
+2420:\ñSPACE
+2421:\ñDELETE
+2422:BLANK \
+2423:OPEN BOX
+2424:\ñNEW\ä
+2425:\ñDELETE FORM TWO
+2426:\ñSUBSTITUTE FORM TWO
+2440:OCR HOOK
+2441:OCR CHAIR
+2442:OCR FORK
+2443:OCR INVERT\ÂFORK
+2444:OCR BELT BUCKLE
+2445:OCR BOW TIE
+2446:OCR BRANCH BANK IDENTIFIC\”
+2447:OCR AMOUNT OF CHECK
+2448:OCR DASH
+2449:OCR CUSTOMER ACCOUNT NUMBER
+244A:OCR \0 BACKSLASH
+2460:\cDIGIT ONE
+2461:\cDIGIT TWO
+2462:\cDIGIT THREE
+2463:\cDIGIT FOUR
+2464:\cDIGIT FIVE
+2465:\cDIGIT SIX
+2466:\cDIGIT SEVEN
+2467:\cDIGIT E\¼
+2468:\cDIGIT NINE
+2469:\c\­TEN
+246A:\c\­ELEVEN
+246B:\c\­TWELVE
+246C:\c\­THIRTEEN
+246D:\c\­FOURTEEN
+246E:\c\­FIFTEEN
+246F:\c\­SIXTEEN
+2470:\c\­SEVENTEEN
+2471:\c\­E\¼EEN
+2472:\c\­NINETEEN
+2473:\c\­TWENTY
+2474:\tDIGIT ONE
+2475:\tDIGIT TWO
+2476:\tDIGIT THREE
+2477:\tDIGIT FOUR
+2478:\tDIGIT FIVE
+2479:\tDIGIT SIX
+247A:\tDIGIT SEVEN
+247B:\tDIGIT E\¼
+247C:\tDIGIT NINE
+247D:\t\­TEN
+247E:\t\­ELEVEN
+247F:\t\­TWELVE
+2480:\t\­THIRTEEN
+2481:\t\­FOURTEEN
+2482:\t\­FIFTEEN
+2483:\t\­SIXTEEN
+2484:\t\­SEVENTEEN
+2485:\t\­E\¼EEN
+2486:\t\­NINETEEN
+2487:\t\­TWENTY
+2488:DIGIT ONE\é
+2489:DIGIT TWO\é
+248A:DIGIT THREE\é
+248B:DIGIT FOUR\é
+248C:DIGIT FIVE\é
+248D:DIGIT SIX\é
+248E:DIGIT SEVEN\é
+248F:DIGIT E\¼\é
+2490:DIGIT NINE\é
+2491:\­TEN\é
+2492:\­ELEVEN\é
+2493:\­TWELVE\é
+2494:\­THIRTEEN\é
+2495:\­FOURTEEN\é
+2496:\­FIFTEEN\é
+2497:\­SIXTEEN\é
+2498:\­SEVENTEEN\é
+2499:\­E\¼EEN\é
+249A:\­NINETEEN\é
+249B:\­TWENTY\é
+249C:\t\LA
+249D:\t\LB
+249E:\t\LC
+249F:\t\LD
+24A0:\t\LE
+24A1:\t\LF
+24A2:\t\LG
+24A3:\t\LH
+24A4:\t\LI
+24A5:\t\LJ
+24A6:\t\LK
+24A7:\t\LL
+24A8:\t\LM
+24A9:\t\LN
+24AA:\t\LO
+24AB:\t\LP
+24AC:\t\LQ
+24AD:\t\LR
+24AE:\t\LS
+24AF:\t\LT
+24B0:\t\LU
+24B1:\t\LV
+24B2:\t\LW
+24B3:\t\LX
+24B4:\t\LY
+24B5:\t\LZ
+24B6:\c\PA
+24B7:\c\PB
+24B8:\c\PC
+24B9:\c\PD
+24BA:\c\PE
+24BB:\c\PF
+24BC:\c\PG
+24BD:\c\PH
+24BE:\c\PI
+24BF:\c\PJ
+24C0:\c\PK
+24C1:\c\PL
+24C2:\c\PM
+24C3:\c\PN
+24C4:\c\PO
+24C5:\c\PP
+24C6:\c\PQ
+24C7:\c\PR
+24C8:\c\PS
+24C9:\c\PT
+24CA:\c\PU
+24CB:\c\PV
+24CC:\c\PW
+24CD:\c\PX
+24CE:\c\PY
+24CF:\c\PZ
+24D0:\c\LA
+24D1:\c\LB
+24D2:\c\LC
+24D3:\c\LD
+24D4:\c\LE
+24D5:\c\LF
+24D6:\c\LG
+24D7:\c\LH
+24D8:\c\LI
+24D9:\c\LJ
+24DA:\c\LK
+24DB:\c\LL
+24DC:\c\LM
+24DD:\c\LN
+24DE:\c\LO
+24DF:\c\LP
+24E0:\c\LQ
+24E1:\c\LR
+24E2:\c\LS
+24E3:\c\LT
+24E4:\c\LU
+24E5:\c\LV
+24E6:\c\LW
+24E7:\c\LX
+24E8:\c\LY
+24E9:\c\LZ
+24EA:\cDIGIT ZERO
+24EB:NEGATIVE \c\­ELEVEN
+24EC:NEGATIVE \c\­TWELVE
+24ED:NEGATIVE \c\­THIRTEEN
+24EE:NEGATIVE \c\­FOURTEEN
+24EF:NEGATIVE \c\­FIFTEEN
+24F0:NEGATIVE \c\­SIXTEEN
+24F1:NEGATIVE \c\­SEVENTEEN
+24F2:NEGATIVE \c\­E\¼EEN
+24F3:NEGATIVE \c\­NINETEEN
+24F4:NEGATIVE \c\­TWENTY
+24F5:\0 \cDIGIT ONE
+24F6:\0 \cDIGIT TWO
+24F7:\0 \cDIGIT THREE
+24F8:\0 \cDIGIT FOUR
+24F9:\0 \cDIGIT FIVE
+24FA:\0 \cDIGIT SIX
+24FB:\0 \cDIGIT SEVEN
+24FC:\0 \cDIGIT E\¼
+24FD:\0 \cDIGIT NINE
+24FE:\0 \c\­TEN
+2500:\jL\¼ \
+2501:\j\Å \
+2502:\jL\¼ \€
+2503:\j\Å \€
+2504:\jL\¼ TRIPLE DASH \
+2505:\j\Å TRIPLE DASH \
+2506:\jL\¼ TRIPLE DASH \€
+2507:\j\Å TRIPLE DASH \€
+2508:\jL\¼ QUADRUPLE DASH \
+2509:\j\Å QUADRUPLE DASH \
+250A:\jL\¼ QUADRUPLE DASH \€
+250B:\j\Å QUADRUPLE DASH \€
+250C:\jL\¼ \Ë\i\q
+250D:\j\Ë L\¼\i\ù\Å
+250E:\j\Ë \Å\i\ùL\¼
+250F:\j\Å \Ë\i\q
+2510:\jL\¼ \Ë\i\‰
+2511:\j\Ë L\¼\i\‰ \Å
+2512:\j\Ë \Å\i\‰ L\¼
+2513:\j\Å \Ë\i\‰
+2514:\jL\¼ UP\i\q
+2515:\jUP L\¼\i\ù\Å
+2516:\jUP \Å\i\ùL\¼
+2517:\j\Å UP\i\q
+2518:\jL\¼ UP\i\‰
+2519:\jUP L\¼\i\‰ \Å
+251A:\jUP \Å\i\‰ L\¼
+251B:\j\Å UP\i\‰
+251C:\jL\¼ \€\i\q
+251D:\j\€ L\¼\i\ù\Å
+251E:\jUP \Å\i\ù\Ë L\¼
+251F:\j\Ë \Å\i\ùUP L\¼
+2520:\j\€ \Å\i\ùL\¼
+2521:\j\Ë L\¼\i\ùUP \Å
+2522:\jUP L\¼\i\ù\Ë \Å
+2523:\j\Å \€\i\q
+2524:\jL\¼ \€\i\‰
+2525:\j\€ L\¼\i\‰ \Å
+2526:\jUP \Å\i\‰ \Ë L\¼
+2527:\j\Ë \Å\i\‰ UP L\¼
+2528:\j\€ \Å\i\‰ L\¼
+2529:\j\Ë L\¼\i\‰ UP \Å
+252A:\jUP L\¼\i\‰ \Ë \Å
+252B:\j\Å \€\i\‰
+252C:\jL\¼ \Ë\i\
+252D:\j\‰ \Å\i\ù\Ë L\¼
+252E:\j\ù\Å\i\‰ \Ë L\¼
+252F:\j\Ë L\¼\i\ \Å
+2530:\j\Ë \Å\i\ L\¼
+2531:\j\ùL\¼\i\‰ \Ë \Å
+2532:\j\‰ L\¼\i\ù\Ë \Å
+2533:\j\Å \Ë\i\
+2534:\jL\¼ UP\i\
+2535:\j\‰ \Å\i\ùUP L\¼
+2536:\j\ù\Å\i\‰ UP L\¼
+2537:\jUP L\¼\i\ \Å
+2538:\jUP \Å\i\ L\¼
+2539:\j\ùL\¼\i\‰ UP \Å
+253A:\j\‰ L\¼\i\ùUP \Å
+253B:\j\Å UP\i\
+253C:\jL\¼ \€\i\
+253D:\j\‰ \Å\i\ù\€ L\¼
+253E:\j\ù\Å\i\‰ \€ L\¼
+253F:\j\€ L\¼\i\ \Å
+2540:\jUP \Å\i\Ë \ L\¼
+2541:\j\Ë \Å\iUP \ L\¼
+2542:\j\€ \Å\i\ L\¼
+2543:\j\‰ UP \Å\i\ù\Ë L\¼
+2544:\j\ùUP \Å\i\‰ \Ë L\¼
+2545:\j\‰ \Ë \Å\i\ùUP L\¼
+2546:\j\ù\Ë \Å\i\‰ UP L\¼
+2547:\j\Ë L\¼\iUP \ \Å
+2548:\jUP L\¼\i\Ë \ \Å
+2549:\j\ùL\¼\i\‰ \€ \Å
+254A:\j\‰ L\¼\i\ù\€ \Å
+254B:\j\Å \€\i\
+254C:\jL\¼ \0 DASH \
+254D:\j\Å \0 DASH \
+254E:\jL\¼ \0 DASH \€
+254F:\j\Å \0 DASH \€
+2550:\j\0 \
+2551:\j\0 \€
+2552:\j\Ë S\ôLE\i\ù\0
+2553:\j\Ë \0\i\ùS\ôLE
+2554:\j\0 \Ë\i\q
+2555:\j\Ë S\ôLE\i\‰ \0
+2556:\j\Ë \0\i\‰ S\ôLE
+2557:\j\0 \Ë\i\‰
+2558:\jUP S\ôLE\i\ù\0
+2559:\jUP \0\i\ùS\ôLE
+255A:\j\0 UP\i\q
+255B:\jUP S\ôLE\i\‰ \0
+255C:\jUP \0\i\‰ S\ôLE
+255D:\j\0 UP\i\‰
+255E:\j\€ S\ôLE\i\ù\0
+255F:\j\€ \0\i\ùS\ôLE
+2560:\j\0 \€\i\q
+2561:\j\€ S\ôLE\i\‰ \0
+2562:\j\€ \0\i\‰ S\ôLE
+2563:\j\0 \€\i\‰
+2564:\j\Ë S\ôLE\i\ \0
+2565:\j\Ë \0\i\ S\ôLE
+2566:\j\0 \Ë\i\
+2567:\jUP S\ôLE\i\ \0
+2568:\jUP \0\i\ S\ôLE
+2569:\j\0 UP\i\
+256A:\j\€ S\ôLE\i\ \0
+256B:\j\€ \0\i\ S\ôLE
+256C:\j\0 \€\i\
+256D:\jL\¼ ARC \Ë\i\q
+256E:\jL\¼ ARC \Ë\i\‰
+256F:\jL\¼ ARC UP\i\‰
+2570:\jL\¼ ARC UP\i\q
+2571:\jL\¼ DIAGONAL \÷\ùTO \ï\‰
+2572:\jL\¼ DIAGONAL \÷\‰ TO \ï\q
+2573:\jL\¼ DIAGONAL CROSS
+2574:\jL\¼ \‰
+2575:\jL\¼ UP
+2576:\jL\¼ \q
+2577:\jL\¼ \Ë
+2578:\j\Å \‰
+2579:\j\Å UP
+257A:\j\Å \q
+257B:\j\Å \Ë
+257C:\jL\¼ \‰\i\Å \q
+257D:\jL\¼ UP\i\Å \Ë
+257E:\j\Å \‰\iL\¼ \q
+257F:\j\Å UP\iL\¼ \Ë
+2580:\÷HALF BLOCK
+2581:\ïONE E\¼H BLOCK
+2582:\ïONE QUARTER BLOCK
+2583:\ïTHREE E\¼HS BLOCK
+2584:\ïHALF BLOCK
+2585:\ïFIVE E\¼HS BLOCK
+2586:\ïTHREE QUARTERS BLOCK
+2587:\ïSEVEN E\¼HS BLOCK
+2588:FULL BLOCK
+2589:\‰ SEVEN E\¼HS BLOCK
+258A:\‰ THREE QUARTERS BLOCK
+258B:\‰ FIVE E\¼HS BLOCK
+258C:\‰ HALF BLOCK
+258D:\‰ THREE E\¼HS BLOCK
+258E:\‰ ONE QUARTER BLOCK
+258F:\‰ ONE E\¼H BLOCK
+2590:\ùHALF BLOCK
+2591:L\¼ SHADE
+2592:MEDIUM SHADE
+2593:DARK SHADE
+2594:\÷ONE E\¼H BLOCK
+2595:\ùONE E\¼H BLOCK
+2596:QUADRANT \ï\‰
+2597:QUADRANT \ï\q
+2598:QUADRANT \÷\‰
+2599:QUADRANT \÷\‰\i\ï\‰\i\ï\q
+259A:QUADRANT \÷\‰\i\ï\q
+259B:QUADRANT \÷\‰\i\÷\ùAND \ï\‰
+259C:QUADRANT \÷\‰\i\÷\ùAND \ï\q
+259D:QUADRANT \÷\q
+259E:QUADRANT \÷\ùAND \ï\‰
+259F:QUADRANT \÷\ùAND \ï\‰\i\ï\q
+25A0:\¬ \ý
+25A1:\¦\ý
+25A2:\¦\rWITH ROUND\ÂCORNERS
+25A3:\¦\rCONTAIN\ô \¬\Ç\ý
+25A4:\rWITH \ FILL
+25A5:\rWITH \€ FILL
+25A6:\rWITH ORTHOGONAL CROSSHATCH FILL
+25A7:\rWITH \÷\‰ TO \ï\ùFILL
+25A8:\rWITH \÷\ùTO \ï\‰ FILL
+25A9:\rWITH DIAGONAL CROSSHATCH FILL
+25AA:\¬\Ç\ý
+25AB:WHITE\Ç\ý
+25AC:\¬ RECTANGLE
+25AD:\¦RECTANGLE
+25AE:\¬ \€ RECTANGLE
+25AF:\¦\€ RECTANGLE
+25B0:\¬ PARALLELOGRAM
+25B1:\¦PARALLELOGRAM
+25B2:\¬ UP-\Ä\¾
+25B3:\¦UP-\Ä\¾
+25B4:\¬ UP-\Ä\§\¾
+25B5:\¦UP-\Ä\§\¾
+25B6:\¬ \q-\Ä\¾
+25B7:\¦\q-\Ä\¾
+25B8:\¬ \q-\Ä\§\¾
+25B9:\¦\q-\Ä\§\¾
+25BA:\¬ \q-\ÄPOINTER
+25BB:\¦\q-\ÄPOINTER
+25BC:\¬ \Ë-\Ä\¾
+25BD:\¦\Ë-\Ä\¾
+25BE:\¬ \Ë-\Ä\§\¾
+25BF:\¦\Ë-\Ä\§\¾
+25C0:\¬ \‰-\Ä\¾
+25C1:\¦\‰-\Ä\¾
+25C2:\¬ \‰-\Ä\§\¾
+25C3:\¦\‰-\Ä\§\¾
+25C4:\¬ \‰-\ÄPOINTER
+25C5:\¦\‰-\ÄPOINTER
+25C6:\¬ DIAMOND
+25C7:\¦DIAMOND
+25C8:\¦DIAMOND CONTAIN\ô \¬\ÇDIAMOND
+25C9:FISHEYE
+25CA:LOZENGE
+25CB:\¦\Ð
+25CC:DOTT\Â\Ð
+25CD:\Ð\H\€ FILL
+25CE:BULLSEYE
+25CF:\¬ \Ð
+25D0:\Ð\H\‰ HALF \¬
+25D1:\Ð\H\ùHALF \¬
+25D2:\Ð\H\ïHALF \¬
+25D3:\Ð\H\÷HALF \¬
+25D4:\Ð\H\÷\ùQUADRANT \¬
+25D5:\Ð\HALL BUT \÷\‰ QUADRANT \¬
+25D6:\‰ HALF \¬ \Ð
+25D7:\ùHALF \¬ \Ð
+25D8:INVERSE BULLET
+25D9:INVERSE \¦\Ð
+25DA:\÷HALF INVERSE \¦\Ð
+25DB:\ïHALF INVERSE \¦\Ð
+25DC:\÷\‰ QUADRANT CIRCULAR ARC
+25DD:\÷\ùQUADRANT CIRCULAR ARC
+25DE:\ï\ùQUADRANT CIRCULAR ARC
+25DF:\ï\‰ QUADRANT CIRCULAR ARC
+25E0:\÷HALF \Ð
+25E1:\ïHALF \Ð
+25E2:\¬ \ï\ù\¾
+25E3:\¬ \ï\‰ \¾
+25E4:\¬ \÷\‰ \¾
+25E5:\¬ \÷\ù\¾
+25E6:\¦BULLET
+25E7:\rWITH \‰ HALF \¬
+25E8:\rWITH \ùHALF \¬
+25E9:\rWITH \÷\‰ DIAGONAL HALF \¬
+25EA:\rWITH \ï\ùDIAGONAL HALF \¬
+25EB:\¦\rWITH \€ BISECT\ô \ä
+25EC:\¦UP-\Ä\¾\³
+25ED:UP-\Ä\¾\H\‰ HALF \¬
+25EE:UP-\Ä\¾\H\ùHALF \¬
+25EF:LARGE \Ð
+25F0:\¦\rWITH \÷\‰ QUADRANT
+25F1:\¦\rWITH \ï\‰ QUADRANT
+25F2:\¦\rWITH \ï\ùQUADRANT
+25F3:\¦\rWITH \÷\ùQUADRANT
+25F4:\¦\Ð\H\÷\‰ QUADRANT
+25F5:\¦\Ð\H\ï\‰ QUADRANT
+25F6:\¦\Ð\H\ï\ùQUADRANT
+25F7:\¦\Ð\H\÷\ùQUADRANT
+25F8:\÷\‰ \¾
+25F9:\÷\ù\¾
+25FA:\ï\‰ \¾
+25FB:\¦MEDIUM \ý
+25FC:\¬ MEDIUM \ý
+25FD:\¦MEDIUM\Ç\ý
+25FE:\¬ MEDIUM\Ç\ý
+25FF:\ï\ù\¾
+2600:\¬ SUN\HRAYS
+2601:CLOUD
+2602:UMBRELLA
+2603:SNOWMAN
+2604:COMET
+2605:\¬ STAR
+2606:\¦STAR
+2607:L\¼N\ô
+2608:THUNDERSTORM
+2609:SUN
+260A:ASCEND\ô NODE
+260B:DESCEND\ô NODE
+260C:CONJUNCTION
+260D:OPPOSITION
+260E:\¬ TELEPHONE
+260F:\¦TELEPHONE
+2610:BALLOT BOX
+2611:BALLOT BOX\HCHECK
+2612:BALLOT BOX\HX
+2613:SALTIRE
+2616:\¦SHOGI PIECE
+2617:\¬ SHOGI PIECE
+2619:\öROTAT\ÂFLORAL HEART BULLET
+261A:\¬ \‰ \ÄINDEX
+261B:\¬ \ù\ÄINDEX
+261C:\¦\‰ \ÄINDEX
+261D:\¦UP \ÄINDEX
+261E:\¦\ù\ÄINDEX
+261F:\¦\Ë \ÄINDEX
+2620:SKULL\iCROSSBONES
+2621:CAUTION\‚
+2622:RADIOACTIVE\‚
+2623:BIOHAZARD\‚
+2624:CADUCEUS
+2625:ANKH
+2626:ORTHODOX CROSS
+2627:CHI RHO
+2628:CROSS OF LORRAINE
+2629:CROSS OF JERUSALEM
+262A:STAR\iCRESCENT
+262B:FARSI \
+262C:ADI SHAKTI
+262D:HAMMER\iSICKLE
+262E:PEACE \
+262F:YIN YANG
+2630:TRIGRAM FOR HEAVEN
+2631:TRIGRAM FOR LAKE
+2632:TRIGRAM FOR FIRE
+2633:TRIGRAM FOR THUNDER
+2634:TRIGRAM FOR WIND
+2635:TRIGRAM FOR WATER
+2636:TRIGRAM FOR MOUNTAIN
+2637:TRIGRAM FOR EARTH
+2638:WHEEL OF DHARMA
+2639:\¦FROWN\ô FACE
+263A:\¦SMIL\ô FACE
+263B:\¬ SMIL\ô FACE
+263C:\¦SUN\HRAYS
+263D:FIRST QUARTER MOON
+263E:LAST QUARTER MOON
+263F:MERCURY
+2640:FEMALE\‚
+2641:EARTH
+2642:MALE\‚
+2643:JUPITER
+2644:SATURN
+2645:URANUS
+2646:NEPTUNE
+2647:PLUTO
+2648:ARIES
+2649:TAURUS
+264A:GEMINI
+264B:CANCER
+264C:LEO
+264D:VIRGO
+264E:LIBRA
+264F:SCORPIUS
+2650:SAGITTARIUS
+2651:CAPRICORN
+2652:AQUARIUS
+2653:PISCES
+2654:\¦CHESS K\ô
+2655:\¦CHESS QUEEN
+2656:\¦CHESS ROOK
+2657:\¦CHESS BISHOP
+2658:\¦CHESS KN\¼
+2659:\¦CHESS PAWN
+265A:\¬ CHESS K\ô
+265B:\¬ CHESS QUEEN
+265C:\¬ CHESS ROOK
+265D:\¬ CHESS BISHOP
+265E:\¬ CHESS KN\¼
+265F:\¬ CHESS PAWN
+2660:\¬ SPADE SUIT
+2661:\¦HEART SUIT
+2662:\¦DIAMOND SUIT
+2663:\¬ CLUB SUIT
+2664:\¦SPADE SUIT
+2665:\¬ HEART SUIT
+2666:\¬ DIAMOND SUIT
+2667:\¦CLUB SUIT
+2668:HOT SPR\ôS
+2669:QUARTER NOTE
+266A:E\¼H NOTE
+266B:BEAM\ÂE\¼H NOTES
+266C:BEAM\ÂSIXTEENTH NOTES
+266D:MUSIC FLAT\‚
+266E:MUSIC NATURAL\‚
+266F:MUSIC SHARP\‚
+2670:WEST \Ó CROSS
+2671:EAST \Ó CROSS
+2672:UNIVERSAL RECYCL\ô \
+2673:RECYCL\ô \ñTYPE-1 PLASTICS
+2674:RECYCL\ô \ñTYPE-2 PLASTICS
+2675:RECYCL\ô \ñTYPE-3 PLASTICS
+2676:RECYCL\ô \ñTYPE-4 PLASTICS
+2677:RECYCL\ô \ñTYPE-5 PLASTICS
+2678:RECYCL\ô \ñTYPE-6 PLASTICS
+2679:RECYCL\ô \ñTYPE-7 PLASTICS
+267A:RECYCL\ô \ñGENERIC MATERIALS
+267B:\¬ UNIVERSAL RECYCL\ô \
+267C:RECYCL\ÂPAPER \
+267D:PARTIALLY-RECYCL\ÂPAPER \
+2680:DIE FACE-1
+2681:DIE FACE-2
+2682:DIE FACE-3
+2683:DIE FACE-4
+2684:DIE FACE-5
+2685:DIE FACE-6
+2686:\¦\Ð\³ \q
+2687:\¦\Ð\HTWO DOTS
+2688:\¬ \Ð\H\¦DOT \q
+2689:\¬ \Ð\HTWO \¦DOTS
+2701:\÷BLADE SCISSORS
+2702:\¬ SCISSORS
+2703:\ïBLADE SCISSORS
+2704:\¦SCISSORS
+2706:TELEPHONE LOC\”\‚
+2707:TAPE DRIVE
+2708:AIRPLANE
+2709:ENVELOPE
+270C:VICTORY HAND
+270D:WRIT\ô HAND
+270E:\ï\ùPENCIL
+270F:PENCIL
+2710:\÷\ùPENCIL
+2711:\¦NIB
+2712:\¬ NIB
+2713:CHECK\¥
+2714:\Å CHECK\¥
+2715:MULTIPLIC\” X
+2716:\Å MULTIPLIC\” X
+2717:BALLOT X
+2718:\Å BALLOT X
+2719:OUT\äD GREEK CROSS
+271A:\Å GREEK CROSS
+271B:OPEN CENTRE CROSS
+271C:\Å OPEN CENTRE CROSS
+271D:LATIN CROSS
+271E:SHADOW\Â\¦LATIN CROSS
+271F:OUT\äD LATIN CROSS
+2720:MALTESE CROSS
+2721:STAR OF DAVID
+2722:FOUR TEARDROP-SPOK\ÂASTERISK
+2723:FOUR BALLOON-SPOK\ÂASTERISK
+2724:\Å FOUR BALLOON-SPOK\ÂASTERISK
+2725:FOUR CLUB-SPOK\ÂASTERISK
+2726:\¬ FOUR POINT\ÂSTAR
+2727:\¦FOUR POINT\ÂSTAR
+2729:STRESS OUT\äD \¦STAR
+272A:\c\¦STAR
+272B:OPEN CENTRE \¬ STAR
+272C:\¬ CENTRE \¦STAR
+272D:OUT\äD \¬ STAR
+272E:\Å OUT\äD \¬ STAR
+272F:PINWHEEL STAR
+2730:SHADOW\Â\¦STAR
+2731:\Å ASTERISK
+2732:OPEN CENTRE ASTERISK
+2733:E\¼ SPOK\ÂASTERISK
+2734:E\¼ POINT\Â\¬ STAR
+2735:E\¼ POINT\ÂPINWHEEL STAR
+2736:SIX POINT\Â\¬ STAR
+2737:E\¼ POINT\ÂRECTI\äAR \¬ STAR
+2738:\Å E\¼ POINT\ÂRECTI\äAR \¬ STAR
+2739:TWELVE POINT\Â\¬ STAR
+273A:SIXTEEN POINT\ÂASTERISK
+273B:TEARDROP-SPOK\ÂASTERISK
+273C:OPEN CENTRE TEARDROP-SPOK\ÂASTERISK
+273D:\Å TEARDROP-SPOK\ÂASTERISK
+273E:SIX PETALL\Â\¬\i\¦FLORETTE
+273F:\¬ FLORETTE
+2740:\¦FLORETTE
+2741:E\¼ PETALL\ÂOUT\äD \¬ FLORETTE
+2742:\cOPEN CENTRE E\¼ POINT\ÂSTAR
+2743:\Å TEARDROP-SPOK\ÂPINWHEEL ASTERISK
+2744:SNOWFLAKE
+2745:T\¼ TRIFOLIATE SNOWFLAKE
+2746:\Å CHEVRON SNOWFLAKE
+2747:SPARKLE
+2748:\Å SPARKLE
+2749:BALLOON-SPOK\ÂASTERISK
+274A:E\¼ TEARDROP-SPOK\ÂPROPELLER ASTERISK
+274B:\Å E\¼ TEARDROP-SPOK\ÂPROPELLER ASTERISK
+274D:SHADOW\Â\¦\Ð
+274F:\ï\ùDROP-SHADOW\Â\¦\ý
+2750:\÷\ùDROP-SHADOW\Â\¦\ý
+2751:\ï\ùSHADOW\Â\¦\ý
+2752:\÷\ùSHADOW\Â\¦\ý
+2756:\¬ DIAMOND MINUS \¦X
+2758:L\¼ \€\ì
+2759:MEDIUM \€\ì
+275A:\Å \€\ì
+275B:\Å S\ôLE TURN\ÂCOMMA QUOT\”\¥ ORNAMENT
+275C:\Å S\ôLE COMMA QUOT\”\¥ ORNAMENT
+275D:\Å \0 TURN\ÂCOMMA QUOT\”\¥ ORNAMENT
+275E:\Å \0 COMMA QUOT\”\¥ ORNAMENT
+2761:CURV\ÂSTEM PARAGRAPH\‚ ORNAMENT
+2762:\Å EXCLAM\”\¥ ORNAMENT
+2763:\Å HEART EXCLAM\”\¥ ORNAMENT
+2764:\Å \¬ HEART
+2765:ROTAT\Â\Å \¬ HEART BULLET
+2766:FLORAL HEART
+2767:ROTAT\ÂFLORAL HEART BULLET
+2768:MEDIUM \‰ \ÑS ORNAMENT
+2769:MEDIUM \ù\ÑS ORNAMENT
+276A:MEDIUM FLATTEN\Â\‰ \ÑS ORNAMENT
+276B:MEDIUM FLATTEN\Â\ù\ÑS ORNAMENT
+276C:MEDIUM \‰-\ÄANGLE \– ORNAMENT
+276D:MEDIUM \q-\ÄANGLE \– ORNAMENT
+276E:\Å \‰-\ÄANGLE QUOT\”\¥ ORNAMENT
+276F:\Å \q-\ÄANGLE QUOT\”\¥ ORNAMENT
+2770:\Å \‰-\ÄANGLE \– ORNAMENT
+2771:\Å \q-\ÄANGLE \– ORNAMENT
+2772:L\¼ \‰ TORTOISE SHELL \– ORNAMENT
+2773:L\¼ \ùTORTOISE SHELL \– ORNAMENT
+2774:MEDIUM \‰ CURLY \– ORNAMENT
+2775:MEDIUM \ùCURLY \– ORNAMENT
+2776:\ÌDIGIT ONE
+2777:\ÌDIGIT TWO
+2778:\ÌDIGIT THREE
+2779:\ÌDIGIT FOUR
+277A:\ÌDIGIT FIVE
+277B:\ÌDIGIT SIX
+277C:\ÌDIGIT SEVEN
+277D:\ÌDIGIT E\¼
+277E:\ÌDIGIT NINE
+277F:\Ì\­TEN
+2780:D\ôBAT \cSANS-SERIF\hONE
+2781:D\ôBAT \cSANS-SERIF\hTWO
+2782:D\ôBAT \cSANS-SERIF\hTHREE
+2783:D\ôBAT \cSANS-SERIF\hFOUR
+2784:D\ôBAT \cSANS-SERIF\hFIVE
+2785:D\ôBAT \cSANS-SERIF\hSIX
+2786:D\ôBAT \cSANS-SERIF\hSEVEN
+2787:D\ôBAT \cSANS-SERIF\hE\¼
+2788:D\ôBAT \cSANS-SERIF\hNINE
+2789:D\ôBAT \cSANS-SERIF \­TEN
+278A:\ÌSANS-SERIF\hONE
+278B:\ÌSANS-SERIF\hTWO
+278C:\ÌSANS-SERIF\hTHREE
+278D:\ÌSANS-SERIF\hFOUR
+278E:\ÌSANS-SERIF\hFIVE
+278F:\ÌSANS-SERIF\hSIX
+2790:\ÌSANS-SERIF\hSEVEN
+2791:\ÌSANS-SERIF\hE\¼
+2792:\ÌSANS-SERIF\hNINE
+2793:\ÌSANS-SERIF \­TEN
+2794:\Å WIDE-HEAD\Â\Ù
+2798:\Å SOUTH EAST\u
+2799:\Å \Ù
+279A:\Å NORTH EAST\u
+279B:DRAFT\ô POINT \Ù
+279C:\Å ROUND-TIPP\Â\Ù
+279D:\¾-HEAD\Â\Ù
+279E:\Å \¾-HEAD\Â\Ù
+279F:DASH\Â\¾-HEAD\Â\Ù
+27A0:\Å DASH\Â\¾-HEAD\Â\Ù
+27A1:\¬ \Ù
+27A2:THREE-D TOP-L\¼\Â\ÙHEAD
+27A3:THREE-D BOTTOM-L\¼\Â\ÙHEAD
+27A4:\¬ \ÙHEAD
+27A5:\Å \¬ CURV\Â\Ë\Š\i\Ù
+27A6:\Å \¬ CURV\ÂUP\Š\i\Ù
+27A7:SQUAT \¬ \Ù
+27A8:\Å CONCAVE-POINT\Â\¬ \Ù
+27A9:\q-SHAD\Â\¦\Ù
+27AA:\‰-SHAD\Â\¦\Ù
+27AB:BACK-TILT\ÂSHADOW\Â\¦\Ù
+27AC:FRONT-TILT\ÂSHADOW\Â\¦\Ù
+27AD:\Å \ï\q-SHADOW\Â\¦\Ù
+27AE:\Å \÷\q-SHADOW\Â\¦\Ù
+27AF:NOTCH\Â\ï\q-SHADOW\Â\¦\Ù
+27B1:NOTCH\Â\÷\q-SHADOW\Â\¦\Ù
+27B2:\c\Å \¦\Ù
+27B3:WHITE-FEATHER\Â\Ù
+27B4:\¬-FEATHER\ÂSOUTH EAST\u
+27B5:\¬-FEATHER\Â\Ù
+27B6:\¬-FEATHER\ÂNORTH EAST\u
+27B7:\Å \¬-FEATHER\ÂSOUTH EAST\u
+27B8:\Å \¬-FEATHER\Â\Ù
+27B9:\Å \¬-FEATHER\ÂNORTH EAST\u
+27BA:TEARDROP-BARB\Â\Ù
+27BB:\Å TEARDROP-SHANK\Â\Ù
+27BC:WEDGE-TAIL\Â\Ù
+27BD:\Å WEDGE-TAIL\Â\Ù
+27BE:OPEN-OUT\äD \Ù
+27D0:\¦DIAMOND\HCENTR\ÂDOT
+27D1:AND\³
+27D2:ELEMENT OF OPEN\ô UP\Š
+27D3:\ï\ùCORNER\³
+27D4:\÷\‰ CORNER\³
+27D5:\‰ OUTER JOIN
+27D6:\ùOUTER JOIN
+27D7:FULL OUTER JOIN
+27D8:LARGE UP TACK
+27D9:LARGE \Ë TACK
+27DA:\‰\i\ù\0 TURNSTILE
+27DB:\‰\i\ùTACK
+27DC:\‰ MULTIMAP
+27DD:LONG \ùTACK
+27DE:LONG \‰ TACK
+27DF:UP TACK\H\Ð\p
+27E0:LOZENGE DIVID\ÂBY \ RULE
+27E1:\¦CONCAVE-SID\ÂDIAMOND
+27E2:\¦CONCAVE-SID\ÂDIAMOND\H\‰\Š TICK
+27E3:\¦CONCAVE-SID\ÂDIAMOND\H\q\Š TICK
+27E4:\¦\rWITH \‰\Š TICK
+27E5:\¦\rWITH \q\Š TICK
+27E6:\E\‰ \¦\r\–
+27E7:\E\ù\¦\r\–
+27E8:\E\‰ ANGLE \–
+27E9:\E\ùANGLE \–
+27EA:\E\‰ \0 ANGLE \–
+27EB:\E\ù\0 ANGLE \–
+27F0:UP\Š QUADRUPLE\u
+27F1:\Ë\Š QUADRUPLE\u
+27F2:ANTICLOCKWISE GAPP\Â\Ð\u
+27F3:CLOCKWISE GAPP\Â\Ð\u
+27F4:\q\u\H\cPLUS
+27F5:LONG \‰\Š\u
+27F6:LONG \Ù
+27F7:LONG \‰ \q\u
+27F8:LONG \‰\Š \0\u
+27F9:LONG \q\Š \0\u
+27FA:LONG \‰ \ù\0\u
+27FB:LONG \‰\Š\u FROM\ì
+27FC:LONG \Ù FROM\ì
+27FD:LONG \‰\Š \0\u FROM\ì
+27FE:LONG \q\Š \0\u FROM\ì
+27FF:LONG \q\Š SQUIGGLE\u
+2800:BRAILLE PATTERN BLANK
+2801:\M1
+2802:\M2
+2803:\M12
+2804:\M3
+2805:\M13
+2806:\M23
+2807:\M123
+2808:\M4
+2809:\M14
+280A:\M24
+280B:\M124
+280C:\M34
+280D:\M134
+280E:\M234
+280F:\M1234
+2810:\M5
+2811:\M15
+2812:\M25
+2813:\M125
+2814:\M35
+2815:\M135
+2816:\M235
+2817:\M1235
+2818:\M45
+2819:\M145
+281A:\M245
+281B:\M1245
+281C:\M345
+281D:\M1345
+281E:\M2345
+281F:\M12345
+2820:\M6
+2821:\M16
+2822:\M26
+2823:\M126
+2824:\M36
+2825:\M136
+2826:\M236
+2827:\M1236
+2828:\M46
+2829:\M146
+282A:\M246
+282B:\M1246
+282C:\M346
+282D:\M1346
+282E:\M2346
+282F:\M12346
+2830:\M56
+2831:\M156
+2832:\M256
+2833:\M1256
+2834:\M356
+2835:\M1356
+2836:\M2356
+2837:\M12356
+2838:\M456
+2839:\M1456
+283A:\M2456
+283B:\M12456
+283C:\M3456
+283D:\M13456
+283E:\M23456
+283F:\M123456
+2840:\M7
+2841:\M17
+2842:\M27
+2843:\M127
+2844:\M37
+2845:\M137
+2846:\M237
+2847:\M1237
+2848:\M47
+2849:\M147
+284A:\M247
+284B:\M1247
+284C:\M347
+284D:\M1347
+284E:\M2347
+284F:\M12347
+2850:\M57
+2851:\M157
+2852:\M257
+2853:\M1257
+2854:\M357
+2855:\M1357
+2856:\M2357
+2857:\M12357
+2858:\M457
+2859:\M1457
+285A:\M2457
+285B:\M12457
+285C:\M3457
+285D:\M13457
+285E:\M23457
+285F:\M123457
+2860:\M67
+2861:\M167
+2862:\M267
+2863:\M1267
+2864:\M367
+2865:\M1367
+2866:\M2367
+2867:\M12367
+2868:\M467
+2869:\M1467
+286A:\M2467
+286B:\M12467
+286C:\M3467
+286D:\M13467
+286E:\M23467
+286F:\M123467
+2870:\M567
+2871:\M1567
+2872:\M2567
+2873:\M12567
+2874:\M3567
+2875:\M13567
+2876:\M23567
+2877:\M123567
+2878:\M4567
+2879:\M14567
+287A:\M24567
+287B:\M124567
+287C:\M34567
+287D:\M134567
+287E:\M234567
+287F:\M1234567
+2880:\M8
+2881:\M18
+2882:\M28
+2883:\M128
+2884:\M38
+2885:\M138
+2886:\M238
+2887:\M1238
+2888:\M48
+2889:\M148
+288A:\M248
+288B:\M1248
+288C:\M348
+288D:\M1348
+288E:\M2348
+288F:\M12348
+2890:\M58
+2891:\M158
+2892:\M258
+2893:\M1258
+2894:\M358
+2895:\M1358
+2896:\M2358
+2897:\M12358
+2898:\M458
+2899:\M1458
+289A:\M2458
+289B:\M12458
+289C:\M3458
+289D:\M13458
+289E:\M23458
+289F:\M123458
+28A0:\M68
+28A1:\M168
+28A2:\M268
+28A3:\M1268
+28A4:\M368
+28A5:\M1368
+28A6:\M2368
+28A7:\M12368
+28A8:\M468
+28A9:\M1468
+28AA:\M2468
+28AB:\M12468
+28AC:\M3468
+28AD:\M13468
+28AE:\M23468
+28AF:\M123468
+28B0:\M568
+28B1:\M1568
+28B2:\M2568
+28B3:\M12568
+28B4:\M3568
+28B5:\M13568
+28B6:\M23568
+28B7:\M123568
+28B8:\M4568
+28B9:\M14568
+28BA:\M24568
+28BB:\M124568
+28BC:\M34568
+28BD:\M134568
+28BE:\M234568
+28BF:\M1234568
+28C0:\M78
+28C1:\M178
+28C2:\M278
+28C3:\M1278
+28C4:\M378
+28C5:\M1378
+28C6:\M2378
+28C7:\M12378
+28C8:\M478
+28C9:\M1478
+28CA:\M2478
+28CB:\M12478
+28CC:\M3478
+28CD:\M13478
+28CE:\M23478
+28CF:\M123478
+28D0:\M578
+28D1:\M1578
+28D2:\M2578
+28D3:\M12578
+28D4:\M3578
+28D5:\M13578
+28D6:\M23578
+28D7:\M123578
+28D8:\M4578
+28D9:\M14578
+28DA:\M24578
+28DB:\M124578
+28DC:\M34578
+28DD:\M134578
+28DE:\M234578
+28DF:\M1234578
+28E0:\M678
+28E1:\M1678
+28E2:\M2678
+28E3:\M12678
+28E4:\M3678
+28E5:\M13678
+28E6:\M23678
+28E7:\M123678
+28E8:\M4678
+28E9:\M14678
+28EA:\M24678
+28EB:\M124678
+28EC:\M34678
+28ED:\M134678
+28EE:\M234678
+28EF:\M1234678
+28F0:\M5678
+28F1:\M15678
+28F2:\M25678
+28F3:\M125678
+28F4:\M35678
+28F5:\M135678
+28F6:\M235678
+28F7:\M1235678
+28F8:\M45678
+28F9:\M145678
+28FA:\M245678
+28FB:\M1245678
+28FC:\M345678
+28FD:\M1345678
+28FE:\M2345678
+28FF:\M12345678
+2900:\q\Š TWO-HEADED\u\H\€ \Á
+2901:\q\Š TWO-HEADED\u\H\0 \€ \Á
+2902:\‰\Š \0\u\H\€ \Á
+2903:\q\Š \0\u\H\€ \Á
+2904:\‰ \ù\0\u\H\€ \Á
+2905:\q\Š TWO-HEADED\u FROM\ì
+2906:\‰\Š \0\u FROM\ì
+2907:\q\Š \0\u FROM\ì
+2908:\Ë\Š\u\H\ \Á
+2909:UP\Š\u\H\ \Á
+290A:UP\Š TRIPLE\u
+290B:\Ë\Š TRIPLE\u
+290C:\‰\Š \0 DASH\u
+290D:\q\Š \0 DASH\u
+290E:\‰\Š TRIPLE DASH\u
+290F:\q\Š TRIPLE DASH\u
+2910:\q\Š TWO-HEAD\ÂTRIPLE DASH\u
+2911:\Ù\³T\ÂSTEM
+2912:UP\Š\u TO\ì
+2913:\Ë\Š\u TO\ì
+2914:\Ù\HTAIL\H\€ \Á
+2915:\Ù\HTAIL\H\0 \€ \Á
+2916:\q\Š TWO-HEADED\u\HTAIL
+2917:\q\Š TWO-HEADED\u\HTAIL\H\€ \Á
+2918:\q\Š TWO-HEADED\u\HTAIL\H\0 \€ \Á
+2919:\‰\Š\u-TAIL
+291A:\Ù-TAIL
+291B:\‰\Š \0\u-TAIL
+291C:\q\Š \0\u-TAIL
+291D:\‰\Š\u TO \¬ DIAMOND
+291E:\Ù TO \¬ DIAMOND
+291F:\‰\Š\u FROM\ì TO \¬ DIAMOND
+2920:\Ù FROM\ì TO \¬ DIAMOND
+2921:NORTH WEST\iSOUTH EAST\u
+2922:NORTH EAST\iSOUTH WEST\u
+2923:NORTH WEST\u\í
+2924:NORTH EAST\u\í
+2925:SOUTH EAST\u\í
+2926:SOUTH WEST\u\í
+2927:NORTH WEST\u\iNORTH EAST\u
+2928:NORTH EAST\u\iSOUTH EAST\u
+2929:SOUTH EAST\u\iSOUTH WEST\u
+292A:SOUTH WEST\u\iNORTH WEST\u
+292B:RIS\ô DIAGONAL CROSS\ô FALL\ô DIAGONAL
+292C:FALL\ô DIAGONAL CROSS\ô RIS\ô DIAGONAL
+292D:SOUTH EAST\u CROSS\ô NORTH EAST\u
+292E:NORTH EAST\u CROSS\ô SOUTH EAST\u
+292F:FALL\ô DIAGONAL CROSS\ô NORTH EAST\u
+2930:RIS\ô DIAGONAL CROSS\ô SOUTH EAST\u
+2931:NORTH EAST\u CROSS\ô NORTH WEST\u
+2932:NORTH WEST\u CROSS\ô NORTH EAST\u
+2933:WAVE\u \ÄDIRECTLY \q
+2934:ARROW \Ä\q\Š THEN CURV\ô UP\Š
+2935:ARROW \Ä\q\Š THEN CURV\ô \Ë\Š
+2936:ARROW \Ä\Ë\Š THEN CURV\ô \‰\Š
+2937:ARROW \Ä\Ë\Š THEN CURV\ô \q\Š
+2938:\q-SIDE ARC CLOCKWISE\u
+2939:\‰-SIDE ARC ANTICLOCKWISE\u
+293A:TOP ARC ANTICLOCKWISE\u
+293B:BOTTOM ARC ANTICLOCKWISE\u
+293C:TOP ARC CLOCKWISE\u\HMINUS
+293D:TOP ARC ANTICLOCKWISE\u\HPLUS
+293E:\ï\ùSEMICIRCULAR CLOCKWISE\u
+293F:\ï\‰ SEMICIRCULAR ANTICLOCKWISE\u
+2940:ANTICLOCKWISE CLOS\Â\Ð\u
+2941:CLOCKWISE CLOS\Â\Ð\u
+2942:\Ù\p SHORT \‰\Š\u
+2943:\‰\Š\u\p SHORT \Ù
+2944:SHORT \Ù\p \‰\Š\u
+2945:\Ù\HPLUS\…
+2946:\‰\Š\u\HPLUS\…
+2947:\Ù THROUGH X
+2948:\‰ \q\u THROUGH\Ç\Ð
+2949:UP\Š TWO-HEADED\u FROM\Ç\Ð
+294A:\‰\ìB UP \ùBARB \Ë HARPOON
+294B:\‰\ìB \Ë \ùBARB UP HARPOON
+294C:UP\ìB \ù\Ë\ìB \‰ HARPOON
+294D:UP\ìB \‰ \Ë\ìB \ùHARPOON
+294E:\‰\ìB UP \ùBARB UP HARPOON
+294F:UP\ìB \ù\Ë\ìB \ùHARPOON
+2950:\‰\ìB \Ë \ùBARB \Ë HARPOON
+2951:UP\ìB \‰ \Ë\ìB \‰ HARPOON
+2952:\‰\ƒUP TO\ì
+2953:\q\ƒUP TO\ì
+2954:UP\ƒ\ùTO\ì
+2955:\Ë\ƒ\ùTO\ì
+2956:\‰\ƒ\Ë TO\ì
+2957:\q\ƒ\Ë TO\ì
+2958:UP\ƒ\‰ TO\ì
+2959:\Ë\ƒ\‰ TO\ì
+295A:\‰\ƒUP FROM\ì
+295B:\q\ƒUP FROM\ì
+295C:UP\ƒ\ùFROM\ì
+295D:\Ë\ƒ\ùFROM\ì
+295E:\‰\ƒ\Ë FROM\ì
+295F:\q\ƒ\Ë FROM\ì
+2960:UP\ƒ\‰ FROM\ì
+2961:\Ë\ƒ\‰ FROM\ì
+2962:\‰\ƒUP\p \‰\ƒ\Ë
+2963:UP\ƒ\‰ BESIDE UP\ƒ\q
+2964:\q\ƒUP\p \q\ƒ\Ë
+2965:\Ë\ƒ\‰ BESIDE \Ë\ƒ\q
+2966:\‰\ƒUP\p \q\ƒUP
+2967:\‰\ƒ\Ë\p \q\ƒ\Ë
+2968:\q\ƒUP\p \‰\ƒUP
+2969:\q\ƒ\Ë\p \‰\ƒ\Ë
+296A:\‰\ƒUP\p LONG DASH
+296B:\‰\ƒ\Ë\… LONG DASH
+296C:\q\ƒUP\p LONG DASH
+296D:\q\ƒ\Ë\… LONG DASH
+296E:UP\ƒ\‰ BESIDE \Ë\ƒ\q
+296F:\Ë\ƒ\‰ BESIDE UP\ƒ\q
+2970:\ù\0\u\HROUND\ÂHEAD
+2971:EQUALS\‚\p \Ù
+2972:\æ\Ú\p \Ù
+2973:\‰\Š\u\p \æ\Ú
+2974:\Ù\p \æ\Ú
+2975:\Ù\p ALMOST\‘
+2976:\µ\p \‰\Š\u
+2977:\‰\Š\u THROUGH \µ
+2978:\’\p \Ù
+2979:SUBSET\p \Ù
+297A:\‰\Š\u THROUGH SUBSET
+297B:SUPERSET\p \‰\Š\u
+297C:\‰ FISH TAIL
+297D:\ùFISH TAIL
+297E:UP FISH TAIL
+297F:\Ë FISH TAIL
+2980:TRIPLE \€\ì DELIMITER
+2981:Z NOT\” SPOT
+2982:Z NOT\” TYPE COLON
+2983:\‰ \¦CURLY \–
+2984:\ù\¦CURLY \–
+2985:\‰ \¦\ÑS
+2986:\ù\¦\ÑS
+2987:Z NOT\” \‰ IMAGE \–
+2988:Z NOT\” \ùIMAGE \–
+2989:Z NOT\” \‰ BIND\ô \–
+298A:Z NOT\” \ùBIND\ô \–
+298B:\‰ \r\–\HUNDERBAR
+298C:\ù\r\–\HUNDERBAR
+298D:\‰ \r\–\HTICK IN TOP CORNER
+298E:\ù\r\–\HTICK IN BOTTOM CORNER
+298F:\‰ \r\–\HTICK IN BOTTOM CORNER
+2990:\ù\r\–\HTICK IN TOP CORNER
+2991:\‰ ANGLE \–\³
+2992:\ùANGLE \–\³
+2993:\‰ ARC \µ \–
+2994:\ùARC \’ \–
+2995:\0 \‰ ARC \’ \–
+2996:\0 \ùARC \µ \–
+2997:\‰ \¬ TORTOISE SHELL \–
+2998:\ù\¬ TORTOISE SHELL \–
+2999:DOTT\ÂFENCE
+299A:\€ ZIGZAG \ä
+299B:MEASUR\ÂANGLE OPEN\ô \‰
+299C:\ùANGLE VARIANT\H\ý
+299D:MEASUR\Â\ùANGLE\³
+299E:ANGLE\HS INSIDE
+299F:\Ü ANGLE
+29A0:SPHERICAL ANGLE OPEN\ô \‰
+29A1:SPHERICAL ANGLE OPEN\ô UP
+29A2:TURN\ÂANGLE
+29A3:\öANGLE
+29A4:ANGLE\HUNDERBAR
+29A5:\öANGLE\HUNDERBAR
+29A6:OBLIQUE ANGLE OPEN\ô UP
+29A7:OBLIQUE ANGLE OPEN\ô \Ë
+29A8:\àUP\i\q
+29A9:\àUP\i\‰
+29AA:\à\Ë\i\q
+29AB:\à\Ë\i\‰
+29AC:\à\ùAND UP
+29AD:\à\‰\iUP
+29AE:\à\ùAND \Ë
+29AF:\à\‰\i\Ë
+29B0:\öEMPTY SET
+29B1:EMPTY SET\HOVERBAR
+29B2:EMPTY SET WITH\Ç\Ð\p
+29B3:EMPTY SET\H\q\u\p
+29B4:EMPTY SET\H\‰\u\p
+29B5:\Ð\H\\ì
+29B6:\c\€\ì
+29B7:\cPARALLEL
+29B8:\cREVERSE SOLIDUS
+29B9:\cPERPENDICULAR
+29BA:\Ð DIVID\ÂBY \\ì\iTOP HALF DIVID\ÂBY \€\ì
+29BB:\Ð\HSUPERIMPOS\ÂX
+29BC:\cANTICLOCKWISE-ROTAT\ÂDIVISION\‚
+29BD:UP\u THROUGH \Ð
+29BE:\c\¦BULLET
+29BF:\cBULLET
+29C0:\c\µ
+29C1:\c\’
+29C2:\Ð WITH\Ç\Ð TO THE \q
+29C3:\Ð\HTWO \ \ÁS TO THE \q
+29C4:\ýD RIS\ô DIAGONAL SLASH
+29C5:\ýD FALL\ô DIAGONAL SLASH
+29C6:\ýD ASTERISK
+29C7:\ýD\Ç\Ð
+29C8:\ýD \ý
+29C9:TWO JOIN\Â\ýS
+29CA:\¾\³\p
+29CB:\¾\HUNDERBAR
+29CC:S IN \¾
+29CD:\¾\HSERIFS AT BOTTOM
+29CE:\ù\¾\p \‰ \¾
+29CF:\‰ \¾ BESIDE \€\ì
+29D0:\€\ì BESIDE \ù\¾
+29D1:BOWTIE\H\‰ HALF \¬
+29D2:BOWTIE\H\ùHALF \¬
+29D3:\¬ BOWTIE
+29D4:TIMES\H\‰ HALF \¬
+29D5:TIMES\H\ùHALF \¬
+29D6:\¦HOURGLASS
+29D7:\¬ HOURGLASS
+29D8:\‰ WIGGLY FENCE
+29D9:\ùWIGGLY FENCE
+29DA:\‰ \0 WIGGLY FENCE
+29DB:\ù\0 WIGGLY FENCE
+29DC:INCOMPLETE INFINITY
+29DD:TIE OVER INFINITY
+29DE:INFINITY NEGATED\H\€\ì
+29DF:\0-END\ÂMULTIMAP
+29E0:\rWITH CONTOUR\ÂOUT\ä
+29E1:INCREASES AS
+29E2:SHUFFLE PRODUCT
+29E3:EQUALS\‚\iSLANT\ÂPARALLEL
+29E4:EQUALS\‚\iSLANT\ÂPARALLEL\H\æ\p
+29E5:IDENTICAL TO\iSLANT\ÂPARALLEL
+29E6:GLEICH STARK
+29E7:THERMODYNAMIC
+29E8:\Ë-\Ä\¾\H\‰ HALF \¬
+29E9:\Ë-\Ä\¾\H\ùHALF \¬
+29EA:\¬ DIAMOND\H\Ë\u
+29EB:\¬ LOZENGE
+29EC:\¦\Ð\H\Ë\u
+29ED:\¬ \Ð\H\Ë\u
+29EE:ERROR-BARR\Â\¦\ý
+29EF:ERROR-BARR\Â\¬ \ý
+29F0:ERROR-BARR\Â\¦DIAMOND
+29F1:ERROR-BARR\Â\¬ DIAMOND
+29F2:ERROR-BARR\Â\¦\Ð
+29F3:ERROR-BARR\Â\¬ \Ð
+29F4:RULE-DELAYED
+29F5:REVERSE SOLIDUS\Ú
+29F6:SOLIDUS\HOVERBAR
+29F7:REVERSE SOLIDUS\H\ \Á
+29F8:BIG SOLIDUS
+29F9:BIG REVERSE SOLIDUS
+29FA:\0 PLUS
+29FB:TRIPLE PLUS
+29FC:\‰-\ÄCURV\ÂANGLE \–
+29FD:\q-\ÄCURV\ÂANGLE \–
+29FE:TINY
+29FF:MINY
+2A00:N-ARY \cDOT\Ú
+2A01:N-ARY \cPLUS\Ú
+2A02:N-ARY \cTIMES\Ú
+2A03:N-ARY UNION\Ú\³
+2A04:N-ARY UNION\Ú\HPLUS
+2A05:N-ARY \rINTERSECTION\Ú
+2A06:N-ARY \rUNION\Ú
+2A07:TWO LOGICAL AND\Ú
+2A08:TWO LOGICAL OR\Ú
+2A09:N-ARY TIMES\Ú
+2A0A:MODULO TWO SUM
+2A0B:SUMM\”\HINTEGRAL
+2A0C:QUADRUPLE INTEGRAL\Ú
+2A0D:FINITE PART INTEGRAL
+2A0E:INTEGRAL\H\0 \Á
+2A0F:INTEGRAL AVERAGE\HSLASH
+2A10:CIRCUL\” FUNCTION
+2A11:ANTICLOCKWISE INTEGR\”
+2A12:\ä INTEGR\”\HRECTANGULAR PATH AROUND POLE
+2A13:\ä INTEGR\”\HSEMICIRCULAR PATH AROUND POLE
+2A14:\ä INTEGR\” NOT INCLUD\ô THE POLE
+2A15:INTEGRAL AROUND A POINT\Ú
+2A16:QUATERNION INTEGRAL\Ú
+2A17:INTEGRAL\H\‰\Š\u\í
+2A18:INTEGRAL\HTIMES\‚
+2A19:INTEGRAL\HINTERSECTION
+2A1A:INTEGRAL\HUNION
+2A1B:INTEGRAL\HOVERBAR
+2A1C:INTEGRAL\HUNDERBAR
+2A1D:JOIN
+2A1E:LARGE \‰ \¾\Ú
+2A1F:Z NOT\” SCHEMA COMPOSITION
+2A20:Z NOT\” SCHEMA PIP\ô
+2A21:Z NOT\” SCHEMA PROJECTION
+2A22:PLUS\‚ WITH\Ç\Ð\p
+2A23:PLUS\‚\ˆ\×\p
+2A24:PLUS\‚\H\æ\p
+2A25:PLUS\‚\³\…
+2A26:PLUS\‚\H\æ\…
+2A27:PLUS\‚\HSUB\Ž TWO
+2A28:PLUS\‚\H\¬ \¾
+2A29:MINUS\‚\HCOMMA\p
+2A2A:MINUS\‚\³\…
+2A2B:MINUS\‚\HFALL\ô DOTS
+2A2C:MINUS\‚\HRIS\ô DOTS
+2A2D:PLUS\‚ IN \‰ HALF \Ð
+2A2E:PLUS\‚ IN \ùHALF \Ð
+2A2F:VECTOR OR CROSS PRODUCT
+2A30:MULTIPLIC\”\‚\³\p
+2A31:MULTIPLIC\”\‚\HUNDERBAR
+2A32:SEMIDIRECT PRODUCT\HBOTTOM CLOSED
+2A33:SMASH PRODUCT
+2A34:MULTIPLIC\”\‚ IN \‰ HALF \Ð
+2A35:MULTIPLIC\”\‚ IN \ùHALF \Ð
+2A36:\cMULTIPLIC\”\‚\ˆ\×
+2A37:MULTIPLIC\”\‚ IN \0 \Ð
+2A38:\cDIVISION\‚
+2A39:PLUS\‚ IN \¾
+2A3A:MINUS\‚ IN \¾
+2A3B:MULTIPLIC\”\‚ IN \¾
+2A3C:INTERIOR PRODUCT
+2A3D:\qHAND INTERIOR PRODUCT
+2A3E:Z NOT\” REL\”AL COMPOSITION
+2A3F:AMALGAM\” OR COPRODUCT
+2A40:INTERSECTION\³
+2A41:UNION\HMINUS\‚
+2A42:UNION\HOVERBAR
+2A43:INTERSECTION\HOVERBAR
+2A44:INTERSECTION\HLOGICAL AND
+2A45:UNION\HLOGICAL OR
+2A46:UNION\p INTERSECTION
+2A47:INTERSECTION\p UNION
+2A48:UNION\p\ì\p INTERSECTION
+2A49:INTERSECTION\p\ì\p UNION
+2A4A:UNION BESIDE\iJOINED\HUNION
+2A4B:INTERSECTION BESIDE\iJOINED\HINTERSECTION
+2A4C:CLOS\ÂUNION\HSERIFS
+2A4D:CLOS\ÂINTERSECTION\HSERIFS
+2A4E:\0 \rINTERSECTION
+2A4F:\0 \rUNION
+2A50:CLOS\ÂUNION\HSERIFS\iSMASH PRODUCT
+2A51:LOGICAL AND\³\p
+2A52:LOGICAL OR\³\p
+2A53:\0 LOGICAL AND
+2A54:\0 LOGICAL OR
+2A55:TWO INTERSECT\ô LOGICAL AND
+2A56:TWO INTERSECT\ô LOGICAL OR
+2A57:SLOP\ô LARGE OR
+2A58:SLOP\ô LARGE AND
+2A59:LOGICAL OR OVERLAPP\ô LOGICAL AND
+2A5A:LOGICAL AND\HMIDDLE STEM
+2A5B:LOGICAL OR\HMIDDLE STEM
+2A5C:LOGICAL AND\H\ DASH
+2A5D:LOGICAL OR\H\ DASH
+2A5E:LOGICAL AND\H\0 OVERBAR
+2A5F:LOGICAL AND\HUNDERBAR
+2A60:LOGICAL AND\H\0 UNDERBAR
+2A61:\§VEE\HUNDERBAR
+2A62:LOGICAL OR\H\0 OVERBAR
+2A63:LOGICAL OR\H\0 UNDERBAR
+2A64:Z NOT\” DOMAIN ANTIRESTRICTION
+2A65:Z NOT\” RANGE ANTIRESTRICTION
+2A66:EQUALS\‚\³\…
+2A67:IDENTICAL\³\p
+2A68:TRIPLE \\ì\H\0 \€ \Á
+2A69:TRIPLE \\ì\HTRIPLE \€ \Á
+2A6A:\æ\Ú\³\p
+2A6B:\æ\Ú\HRIS\ô DOTS
+2A6C:SIMILAR MINUS SIMILAR
+2A6D:CONGRUENT\³\p
+2A6E:EQUALS\HASTERISK
+2A6F:ALMOST\‘\ˆ\×
+2A70:APPROXIMATELY EQUAL OR\‘
+2A71:EQUALS\‚\p PLUS\‚
+2A72:PLUS\‚\p EQUALS\‚
+2A73:EQUALS\‚\p \æ\Ú
+2A74:\0 COLON EQUAL
+2A75:TWO CONSECUTIVE EQUALS\‚S
+2A76:THREE CONSECUTIVE EQUALS\‚S
+2A77:EQUALS\‚\HTWO DOTS\p\iTWO DOTS\…
+2A78:EQUIVALENT\HFOUR DOTS\p
+2A79:\µ\H\Ð INSIDE
+2A7A:\’\H\Ð INSIDE
+2A7B:\µ\HQUESTION\¥\p
+2A7C:\’\HQUESTION\¥\p
+2A7D:\µ OR SLANTED\‘
+2A7E:\’ OR SLANTED\‘
+2A7F:\µ OR SLANTED\‘\³ INSIDE
+2A80:\’ OR SLANTED\‘\³ INSIDE
+2A81:\µ OR SLANTED\‘\³\p
+2A82:\’ OR SLANTED\‘\³\p
+2A83:\µ OR SLANTED\‘\³\p \q
+2A84:\’ OR SLANTED\‘\³\p \‰
+2A85:\µ OR APPROXIMATE
+2A86:\’ OR APPROXIMATE
+2A87:\µ\iS\ôLE-\ä NOT\‘
+2A88:\’\iS\ôLE-\ä NOT\‘
+2A89:\µ\iNOT APPROXIMATE
+2A8A:\’\iNOT APPROXIMATE
+2A8B:\µ\p \0-\ä EQUAL\p \’
+2A8C:\’\p \0-\ä EQUAL\p \µ
+2A8D:\µ\p SIMILAR OR EQUAL
+2A8E:\’\p SIMILAR OR EQUAL
+2A8F:\µ\p SIMILAR\p \’
+2A90:\’\p SIMILAR\p \µ
+2A91:\µ\p \’\p \0-\ä EQUAL
+2A92:\’\p \µ\p \0-\ä EQUAL
+2A93:\µ\p SLANT\ÂEQUAL\p \’\p SLANT\ÂEQUAL
+2A94:\’\p SLANT\ÂEQUAL\p \µ\p SLANT\ÂEQUAL
+2A95:SLANTED\‘ OR \µ
+2A96:SLANTED\‘ OR \’
+2A97:SLANTED\‘ OR \µ\³ INSIDE
+2A98:SLANTED\‘ OR \’\³ INSIDE
+2A99:\0-\ä\‘ OR \µ
+2A9A:\0-\ä\‘ OR \’
+2A9B:\0-\ä SLANTED\‘ OR \µ
+2A9C:\0-\ä SLANTED\‘ OR \’
+2A9D:SIMILAR OR \µ
+2A9E:SIMILAR OR \’
+2A9F:SIMILAR\p \µ\p EQUALS\‚
+2AA0:SIMILAR\p \’\p EQUALS\‚
+2AA1:\0 NEST\Â\µ
+2AA2:\0 NEST\Â\’
+2AA3:\0 NEST\Â\µ\HUNDERBAR
+2AA4:\’ OVERLAPP\ô \µ
+2AA5:\’ BESIDE \µ
+2AA6:\µ CLOS\ÂBY CURVE
+2AA7:\’ CLOS\ÂBY CURVE
+2AA8:\µ CLOS\ÂBY CURVE\p SLANT\ÂEQUAL
+2AA9:\’ CLOS\ÂBY CURVE\p SLANT\ÂEQUAL
+2AAA:SMALLER THAN
+2AAB:LARGER THAN
+2AAC:SMALLER THAN OR\‘
+2AAD:LARGER THAN OR\‘
+2AAE:EQUALS\‚\HBUMPY\p
+2AAF:PRECEDES\p S\ôLE-\ä EQUALS\‚
+2AB0:SUCCEEDS\p S\ôLE-\ä EQUALS\‚
+2AB1:PRECEDES\p S\ôLE-\ä NOT\‘
+2AB2:SUCCEEDS\p S\ôLE-\ä NOT\‘
+2AB3:PRECEDES\p EQUALS\‚
+2AB4:SUCCEEDS\p EQUALS\‚
+2AB5:PRECEDES\p NOT\‘
+2AB6:SUCCEEDS\p NOT\‘
+2AB7:PRECEDES\p ALMOST\‘
+2AB8:SUCCEEDS\p ALMOST\‘
+2AB9:PRECEDES\p NOT ALMOST\‘
+2ABA:SUCCEEDS\p NOT ALMOST\‘
+2ABB:\0 PRECEDES
+2ABC:\0 SUCCEEDS
+2ABD:SUBSET\³
+2ABE:SUPERSET\³
+2ABF:SUBSET\HPLUS\‚\…
+2AC0:SUPERSET\HPLUS\‚\…
+2AC1:SUBSET\HMULTIPLIC\”\‚\…
+2AC2:SUPERSET\HMULTIPLIC\”\‚\…
+2AC3:SUBSET OF OR\‘\³\p
+2AC4:SUPERSET OF OR\‘\³\p
+2AC5:SUBSET OF\p EQUALS\‚
+2AC6:SUPERSET OF\p EQUALS\‚
+2AC7:SUBSET OF\p \æ\Ú
+2AC8:SUPERSET OF\p \æ\Ú
+2AC9:SUBSET OF\p ALMOST\‘
+2ACA:SUPERSET OF\p ALMOST\‘
+2ACB:SUBSET OF\p NOT\‘
+2ACC:SUPERSET OF\p NOT\‘
+2ACD:\r\‰ OPEN BOX\Ú
+2ACE:\r\ùOPEN BOX\Ú
+2ACF:CLOS\ÂSUBSET
+2AD0:CLOS\ÂSUPERSET
+2AD1:CLOS\ÂSUBSET OR\‘
+2AD2:CLOS\ÂSUPERSET OR\‘
+2AD3:SUBSET\p SUPERSET
+2AD4:SUPERSET\p SUBSET
+2AD5:SUBSET\p SUBSET
+2AD6:SUPERSET\p SUPERSET
+2AD7:SUPERSET BESIDE SUBSET
+2AD8:SUPERSET BESIDE\iJOIN\ÂBY DASH\HSUBSET
+2AD9:ELEMENT OF OPEN\ô \Ë\Š
+2ADA:PITCHFORK\HTEE TOP
+2ADB:TRANSVERSAL INTERSECTION
+2ADC:FORK\ô
+2ADD:NONFORK\ô
+2ADE:SHORT \‰ TACK
+2ADF:SHORT \Ë TACK
+2AE0:SHORT UP TACK
+2AE1:PERPENDICULAR\HS
+2AE2:\€\ì TRIPLE \ùTURNSTILE
+2AE3:\0 \€\ì \‰ TURNSTILE
+2AE4:\€\ì \0 \‰ TURNSTILE
+2AE5:\0 \€\ì \0 \‰ TURNSTILE
+2AE6:LONG DASH FROM \‰ MEMBER OF \0 \€
+2AE7:SHORT \Ë TACK\HOVERBAR
+2AE8:SHORT UP TACK\HUNDERBAR
+2AE9:SHORT UP TACK\p SHORT \Ë TACK
+2AEA:\0 \Ë TACK
+2AEB:\0 UP TACK
+2AEC:\0 \Á NOT\‚
+2AED:\ö\0 \Á NOT\‚
+2AEE:DOES NOT DIVIDE\H\öNEG\” SLASH
+2AEF:\€ \ä\H\Ð\p
+2AF0:\€ \ä\H\Ð\…
+2AF1:\Ë TACK\H\Ð\…
+2AF2:PARALLEL\H\ \Á
+2AF3:PARALLEL\H\æ\Ú
+2AF4:TRIPLE \€\ì BINARY REL\”
+2AF5:TRIPLE \€\ì\H\ \Á
+2AF6:TRIPLE COLON\Ú
+2AF7:TRIPLE NEST\Â\µ
+2AF8:TRIPLE NEST\Â\’
+2AF9:\0-\ä SLANT\Â\µ OR\‘
+2AFA:\0-\ä SLANT\Â\’ OR\‘
+2AFB:TRIPLE SOLIDUS BINARY REL\”
+2AFC:LARGE TRIPLE \€\ì\Ú
+2AFD:\0 SOLIDUS\Ú
+2AFE:\¦\€\ì
+2AFF:N-ARY \¦\€\ì
+2E80:CJK\vREPEAT
+2E81:CJK\vCLIFF
+2E82:CJK\vSECOND ONE
+2E83:CJK\vSECOND TWO
+2E84:CJK\vSECOND THREE
+2E85:CJK\vPERSON
+2E86:CJK\vBOX
+2E87:CJK\vTABLE
+2E88:CJK\vKNIFE ONE
+2E89:CJK\vKNIFE TWO
+2E8A:CJK\vDIVIN\”
+2E8B:CJK\vSEAL
+2E8C:CJK\v\§ONE
+2E8D:CJK\v\§TWO
+2E8E:CJK\vLAME ONE
+2E8F:CJK\vLAME TWO
+2E90:CJK\vLAME THREE
+2E91:CJK\vLAME FOUR
+2E92:CJK\vSNAKE
+2E93:CJK\vTHREAD
+2E94:CJK\vSNOUT ONE
+2E95:CJK\vSNOUT TWO
+2E96:CJK\vHEART ONE
+2E97:CJK\vHEART TWO
+2E98:CJK\vHAND
+2E99:CJK\vRAP
+2E9B:CJK\vCHOKE
+2E9C:CJK\vSUN
+2E9D:CJK\vMOON
+2E9E:CJK\vDEATH
+2E9F:CJK\vMOTHER
+2EA0:CJK\vCIVILIAN
+2EA1:CJK\vWATER ONE
+2EA2:CJK\vWATER TWO
+2EA3:CJK\vFIRE
+2EA4:CJK\vPAW ONE
+2EA5:CJK\vPAW TWO
+2EA6:CJK\vSIMPLIFI\ÂHALF TREE TRUNK
+2EA7:CJK\vCOW
+2EA8:CJK\vDOG
+2EA9:CJK\vJADE
+2EAA:CJK\vBOLT OF CLOTH
+2EAB:CJK\vEYE
+2EAC:CJK\vSPIRIT ONE
+2EAD:CJK\vSPIRIT TWO
+2EAE:CJK\vBAMBOO
+2EAF:CJK\vSILK
+2EB0:CJK\vC-SIMPLIFI\ÂSILK
+2EB1:CJK\vNET ONE
+2EB2:CJK\vNET TWO
+2EB3:CJK\vNET THREE
+2EB4:CJK\vNET FOUR
+2EB5:CJK\vMESH
+2EB6:CJK\vSHEEP
+2EB7:CJK\vRAM
+2EB8:CJK\vEWE
+2EB9:CJK\vOLD
+2EBA:CJK\vBRUSH ONE
+2EBB:CJK\vBRUSH TWO
+2EBC:CJK\vMEAT
+2EBD:CJK\vMORTAR
+2EBE:CJK\vGRASS ONE
+2EBF:CJK\vGRASS TWO
+2EC0:CJK\vGRASS THREE
+2EC1:CJK\vTIGER
+2EC2:CJK\vCLOTHES
+2EC3:CJK\vWEST ONE
+2EC4:CJK\vWEST TWO
+2EC5:CJK\vC-SIMPLIFI\ÂSEE
+2EC6:CJK\vSIMPLIFI\ÂHORN
+2EC7:CJK\vHORN
+2EC8:CJK\vC-SIMPLIFI\ÂSPEECH
+2EC9:CJK\vC-SIMPLIFI\ÂSHELL
+2ECA:CJK\vFOOT
+2ECB:CJK\vC-SIMPLIFI\ÂCART
+2ECC:CJK\vSIMPLIFI\ÂWALK
+2ECD:CJK\vWALK ONE
+2ECE:CJK\vWALK TWO
+2ECF:CJK\vCITY
+2ED0:CJK\vC-SIMPLIFI\ÂGOLD
+2ED1:CJK\vLONG ONE
+2ED2:CJK\vLONG TWO
+2ED3:CJK\vC-SIMPLIFI\ÂLONG
+2ED4:CJK\vC-SIMPLIFI\ÂGATE
+2ED5:CJK\vMOUND ONE
+2ED6:CJK\vMOUND TWO
+2ED7:CJK\vRAIN
+2ED8:CJK\vBLUE
+2ED9:CJK\vC-SIMPLIFI\ÂTANN\ÂLEATHER
+2EDA:CJK\vC-SIMPLIFI\ÂLEAF
+2EDB:CJK\vC-SIMPLIFI\ÂWIND
+2EDC:CJK\vC-SIMPLIFI\ÂFLY
+2EDD:CJK\vEAT ONE
+2EDE:CJK\vEAT TWO
+2EDF:CJK\vEAT THREE
+2EE0:CJK\vC-SIMPLIFI\ÂEAT
+2EE1:CJK\vHEAD
+2EE2:CJK\vC-SIMPLIFI\ÂHORSE
+2EE3:CJK\vBONE
+2EE4:CJK\vGHOST
+2EE5:CJK\vC-SIMPLIFI\ÂFISH
+2EE6:CJK\vC-SIMPLIFI\ÂBIRD
+2EE7:CJK\vC-SIMPLIFI\ÂSALT
+2EE8:CJK\vSIMPLIFI\ÂWHEAT
+2EE9:CJK\vSIMPLIFI\ÂYELLOW
+2EEA:CJK\vC-SIMPLIFI\ÂFROG
+2EEB:CJK\vJ-SIMPLIFI\ÂEVEN
+2EEC:CJK\vC-SIMPLIFI\ÂEVEN
+2EED:CJK\vJ-SIMPLIFI\ÂTOOTH
+2EEE:CJK\vC-SIMPLIFI\ÂTOOTH
+2EEF:CJK\vJ-SIMPLIFI\ÂDRAGON
+2EF0:CJK\vC-SIMPLIFI\ÂDRAGON
+2EF1:CJK\vTURTLE
+2EF2:CJK\vJ-SIMPLIFI\ÂTURTLE
+2EF3:CJK\vC-SIMPLIFI\ÂTURTLE
+2F00:\UONE
+2F01:\U\ä
+2F02:\UDOT
+2F03:\USLASH
+2F04:\USECOND
+2F05:\UHOOK
+2F06:\UTWO
+2F07:\ULID
+2F08:\UMAN
+2F09:\ULEGS
+2F0A:\UENTER
+2F0B:\UE\¼
+2F0C:\U\Ë BOX
+2F0D:\UCOVER
+2F0E:\UICE
+2F0F:\UTABLE
+2F10:\UOPEN BOX
+2F11:\UKNIFE
+2F12:\UPOWER
+2F13:\UWRAP
+2F14:\USPOON
+2F15:\U\ùOPEN BOX
+2F16:\UHID\ô ENCLOSURE
+2F17:\UTEN
+2F18:\UDIVIN\”
+2F19:\USEAL
+2F1A:\UCLIFF
+2F1B:\UPRIVATE
+2F1C:\UAGAIN
+2F1D:\UMOUTH
+2F1E:\UENCLOSURE
+2F1F:\UEARTH
+2F20:\USCHOLAR
+2F21:\UGO
+2F22:\UGO SLOWLY
+2F23:\UEVEN\ô
+2F24:\UBIG
+2F25:\UWOMAN
+2F26:\UCHILD
+2F27:\UROOF
+2F28:\UINCH
+2F29:\USMALL
+2F2A:\ULAME
+2F2B:\UCORPSE
+2F2C:\USPROUT
+2F2D:\UMOUNTAIN
+2F2E:\URIVER
+2F2F:\UWORK
+2F30:\UONESELF
+2F31:\UTURBAN
+2F32:\UDRY
+2F33:\USHORT THREAD
+2F34:\UDOTT\ÂCLIFF
+2F35:\ULONG STRIDE
+2F36:\UTWO HANDS
+2F37:\USHOOT
+2F38:\UBOW
+2F39:\USNOUT
+2F3A:\UBRISTLE
+2F3B:\USTEP
+2F3C:\UHEART
+2F3D:\UHALBERD
+2F3E:\UDOOR
+2F3F:\UHAND
+2F40:\UBRANCH
+2F41:\URAP
+2F42:\U\Ž
+2F43:\UDIPPER
+2F44:\UAXE
+2F45:\U\ý
+2F46:\UNOT
+2F47:\USUN
+2F48:\USAY
+2F49:\UMOON
+2F4A:\UTREE
+2F4B:\ULACK
+2F4C:\USTOP
+2F4D:\UDEATH
+2F4E:\UWEAPON
+2F4F:\UDO NOT
+2F50:\UCOMPARE
+2F51:\UFUR
+2F52:\UCLAN
+2F53:\USTEAM
+2F54:\UWATER
+2F55:\UFIRE
+2F56:\UCLAW
+2F57:\UFATHER
+2F58:\U\0 X
+2F59:\UHALF TREE TRUNK
+2F5A:\USLICE
+2F5B:\UFANG
+2F5C:\UCOW
+2F5D:\UDOG
+2F5E:\UPROFOUND
+2F5F:\UJADE
+2F60:\UMELON
+2F61:\UTILE
+2F62:\USWEET
+2F63:\ULIFE
+2F64:\UUSE
+2F65:\UFIELD
+2F66:\UBOLT OF CLOTH
+2F67:\USICKNESS
+2F68:\UDOTT\ÂTENT
+2F69:\UWHITE
+2F6A:\USKIN
+2F6B:\UDISH
+2F6C:\UEYE
+2F6D:\USPEAR
+2F6E:\UARROW
+2F6F:\USTONE
+2F70:\USPIRIT
+2F71:\UTRACK
+2F72:\UGRAIN
+2F73:\UCAVE
+2F74:\USTAND
+2F75:\UBAMBOO
+2F76:\URICE
+2F77:\USILK
+2F78:\UJAR
+2F79:\UNET
+2F7A:\USHEEP
+2F7B:\UFEATHER
+2F7C:\UOLD
+2F7D:\UAND
+2F7E:\UPLOW
+2F7F:\UEAR
+2F80:\UBRUSH
+2F81:\UMEAT
+2F82:\UMINISTER
+2F83:\USELF
+2F84:\UARRIVE
+2F85:\UMORTAR
+2F86:\UTONGUE
+2F87:\UOPPOSE
+2F88:\UBOAT
+2F89:\USTOPP\ô
+2F8A:\UCOLOR
+2F8B:\UGRASS
+2F8C:\UTIGER
+2F8D:\UINSECT
+2F8E:\UBLOOD
+2F8F:\UWALK ENCLOSURE
+2F90:\UCLOTHES
+2F91:\UWEST
+2F92:\USEE
+2F93:\UHORN
+2F94:\USPEECH
+2F95:\UVALLEY
+2F96:\UBEAN
+2F97:\UPIG
+2F98:\UBADGER
+2F99:\USHELL
+2F9A:\URED
+2F9B:\URUN
+2F9C:\UFOOT
+2F9D:\UBODY
+2F9E:\UCART
+2F9F:\UBITTER
+2FA0:\UMORN\ô
+2FA1:\UWALK
+2FA2:\UCITY
+2FA3:\UWINE
+2FA4:\UDIST\ôUISH
+2FA5:\UVILLAGE
+2FA6:\UGOLD
+2FA7:\ULONG
+2FA8:\UGATE
+2FA9:\UMOUND
+2FAA:\USLAVE
+2FAB:\USHORT TAIL\ÂBIRD
+2FAC:\URAIN
+2FAD:\UBLUE
+2FAE:\UWRONG
+2FAF:\UFACE
+2FB0:\ULEATHER
+2FB1:\UTANN\ÂLEATHER
+2FB2:\ULEEK
+2FB3:\USOUND
+2FB4:\ULEAF
+2FB5:\UWIND
+2FB6:\UFLY
+2FB7:\UEAT
+2FB8:\UHEAD
+2FB9:\UFRAGRANT
+2FBA:\UHORSE
+2FBB:\UBONE
+2FBC:\UTALL
+2FBD:\UHAIR
+2FBE:\UF\¼
+2FBF:\USACRIFICIAL WINE
+2FC0:\UCAULDRON
+2FC1:\UGHOST
+2FC2:\UFISH
+2FC3:\UBIRD
+2FC4:\USALT
+2FC5:\UDEER
+2FC6:\UWHEAT
+2FC7:\UHEMP
+2FC8:\UYELLOW
+2FC9:\UMILLET
+2FCA:\U\¬
+2FCB:\UEMBROIDERY
+2FCC:\UFROG
+2FCD:\UTRIPOD
+2FCE:\UDRUM
+2FCF:\URAT
+2FD0:\UNOSE
+2FD1:\UEVEN
+2FD2:\UTOOTH
+2FD3:\UDRAGON
+2FD4:\UTURTLE
+2FD5:\UFLUTE
+2FF0:\ð \‰ TO \q
+2FF1:\ð\p TO\…
+2FF2:\ð \‰ TO MIDDLE\i\q
+2FF3:\ð\p TO MIDDLE AND\…
+2FF4:\ð FULL SURROUND
+2FF5:\ð SURROUND FROM\p
+2FF6:\ð SURROUND FROM\…
+2FF7:\ð SURROUND FROM \‰
+2FF8:\ð SURROUND FROM \÷\‰
+2FF9:\ð SURROUND FROM \÷\q
+2FFA:\ð SURROUND FROM \ï\‰
+2FFB:\ð OVERLAID
+3000:\8IC SPACE
+3001:\8IC COMMA
+3002:\8IC\é
+3003:DITTO\¥
+3004:JAPANESE INDUSTRIAL STANDARD \
+3005:\8IC ITER\”\¥
+3006:\8IC CLOS\ô\¥
+3007:\8IC \­ZERO
+3008:\‰ ANGLE \–
+3009:\ùANGLE \–
+300A:\‰ \0 ANGLE \–
+300B:\ù\0 ANGLE \–
+300C:\‰ CORNER \–
+300D:\ùCORNER \–
+300E:\‰ \¦CORNER \–
+300F:\ù\¦CORNER \–
+3010:\‰ \¬ LENTICULAR \–
+3011:\ù\¬ LENTICULAR \–
+3012:POSTAL\¥
+3013:GETA\¥
+3014:\‰ TORTOISE SHELL \–
+3015:\ùTORTOISE SHELL \–
+3016:\‰ \¦LENTICULAR \–
+3017:\ù\¦LENTICULAR \–
+3018:\‰ \¦TORTOISE SHELL \–
+3019:\ù\¦TORTOISE SHELL \–
+301A:\‰ \¦\r\–
+301B:\ù\¦\r\–
+301C:WAVE DASH
+301D:\ö\0 PRIME QUOT\”\¥
+301E:\0 PRIME QUOT\”\¥
+301F:LOW \0 PRIME QUOT\”\¥
+3020:POSTAL\¥ FACE
+3021:HANGZHOU NUMERAL ONE
+3022:HANGZHOU NUMERAL TWO
+3023:HANGZHOU NUMERAL THREE
+3024:HANGZHOU NUMERAL FOUR
+3025:HANGZHOU NUMERAL FIVE
+3026:HANGZHOU NUMERAL SIX
+3027:HANGZHOU NUMERAL SEVEN
+3028:HANGZHOU NUMERAL E\¼
+3029:HANGZHOU NUMERAL NINE
+302A:\8IC LEVEL TONE\¥
+302B:\8IC RIS\ô TONE\¥
+302C:\8IC DEPART\ô TONE\¥
+302D:\8IC ENTER\ô TONE\¥
+302E:\e S\ôLE DOT TONE\¥
+302F:\e \0 DOT TONE\¥
+3030:WAVY DASH
+3031:\€ KANA REPEAT\¥
+3032:\€ KANA REPEAT\HVOIC\ÂSOUND\¥
+3033:\€ KANA REPEAT\¥ \÷HALF
+3034:\€ KANA REPEAT\HVOIC\ÂSOUND\¥ \÷HALF
+3035:\€ KANA REPEAT\¥ \ïHALF
+3036:\cPOSTAL\¥
+3037:\8IC TELEGRAPH \ä FE\ÂSEPARATOR \
+3038:HANGZHOU NUMERAL TEN
+3039:HANGZHOU NUMERAL TWENTY
+303A:HANGZHOU NUMERAL THIRTY
+303B:\€ \8IC ITER\”\¥
+303C:MASU\¥
+303D:PART ALTERN\”\¥
+303E:\8IC VARI\” INDICATOR
+303F:\8IC HALF FILL SPACE
+3041:\‹\§A
+3042:\‹A
+3043:\‹\§I
+3044:\‹I
+3045:\‹\§U
+3046:\‹U
+3047:\‹\§E
+3048:\‹E
+3049:\‹\§O
+304A:\‹O
+304B:\‹KA
+304C:\‹GA
+304D:\‹KI
+304E:\‹GI
+304F:\‹KU
+3050:\‹GU
+3051:\‹KE
+3052:\‹GE
+3053:\‹KO
+3054:\‹GO
+3055:\‹SA
+3056:\‹ZA
+3057:\‹SI
+3058:\‹ZI
+3059:\‹SU
+305A:\‹ZU
+305B:\‹SE
+305C:\‹ZE
+305D:\‹SO
+305E:\‹ZO
+305F:\‹TA
+3060:\‹DA
+3061:\‹TI
+3062:\‹DI
+3063:\‹\§TU
+3064:\‹TU
+3065:\‹DU
+3066:\‹TE
+3067:\‹DE
+3068:\‹TO
+3069:\‹DO
+306A:\‹NA
+306B:\‹NI
+306C:\‹NU
+306D:\‹NE
+306E:\‹NO
+306F:\‹HA
+3070:\‹BA
+3071:\‹PA
+3072:\‹HI
+3073:\‹BI
+3074:\‹PI
+3075:\‹HU
+3076:\‹BU
+3077:\‹PU
+3078:\‹HE
+3079:\‹BE
+307A:\‹PE
+307B:\‹HO
+307C:\‹BO
+307D:\‹PO
+307E:\‹MA
+307F:\‹MI
+3080:\‹MU
+3081:\‹ME
+3082:\‹MO
+3083:\‹\§YA
+3084:\‹YA
+3085:\‹\§YU
+3086:\‹YU
+3087:\‹\§YO
+3088:\‹YO
+3089:\‹RA
+308A:\‹RI
+308B:\‹RU
+308C:\‹RE
+308D:\‹RO
+308E:\‹\§WA
+308F:\‹WA
+3090:\‹WI
+3091:\‹WE
+3092:\‹WO
+3093:\‹N
+3094:\‹VU
+3095:\‹\§KA
+3096:\‹\§KE
+3099:\o\n-HIRAGANA VOIC\ÂSOUND\¥
+309A:\o\n-HIRAGANA SEMI-VOIC\ÂSOUND\¥
+309B:\n-HIRAGANA VOIC\ÂSOUND\¥
+309C:\n-HIRAGANA SEMI-VOIC\ÂSOUND\¥
+309D:HIRAGANA ITER\”\¥
+309E:HIRAGANA VOIC\ÂITER\”\¥
+309F:HIRAGANA DIGRAPH YORI
+30A0:\n-HIRAGANA \0 HYPHEN
+30A1:\Í\§A
+30A2:\ÍA
+30A3:\Í\§I
+30A4:\ÍI
+30A5:\Í\§U
+30A6:\ÍU
+30A7:\Í\§E
+30A8:\ÍE
+30A9:\Í\§O
+30AA:\ÍO
+30AB:\ÍKA
+30AC:\ÍGA
+30AD:\ÍKI
+30AE:\ÍGI
+30AF:\ÍKU
+30B0:\ÍGU
+30B1:\ÍKE
+30B2:\ÍGE
+30B3:\ÍKO
+30B4:\ÍGO
+30B5:\ÍSA
+30B6:\ÍZA
+30B7:\ÍSI
+30B8:\ÍZI
+30B9:\ÍSU
+30BA:\ÍZU
+30BB:\ÍSE
+30BC:\ÍZE
+30BD:\ÍSO
+30BE:\ÍZO
+30BF:\ÍTA
+30C0:\ÍDA
+30C1:\ÍTI
+30C2:\ÍDI
+30C3:\Í\§TU
+30C4:\ÍTU
+30C5:\ÍDU
+30C6:\ÍTE
+30C7:\ÍDE
+30C8:\ÍTO
+30C9:\ÍDO
+30CA:\ÍNA
+30CB:\ÍNI
+30CC:\ÍNU
+30CD:\ÍNE
+30CE:\ÍNO
+30CF:\ÍHA
+30D0:\ÍBA
+30D1:\ÍPA
+30D2:\ÍHI
+30D3:\ÍBI
+30D4:\ÍPI
+30D5:\ÍHU
+30D6:\ÍBU
+30D7:\ÍPU
+30D8:\ÍHE
+30D9:\ÍBE
+30DA:\ÍPE
+30DB:\ÍHO
+30DC:\ÍBO
+30DD:\ÍPO
+30DE:\ÍMA
+30DF:\ÍMI
+30E0:\ÍMU
+30E1:\ÍME
+30E2:\ÍMO
+30E3:\Í\§YA
+30E4:\ÍYA
+30E5:\Í\§YU
+30E6:\ÍYU
+30E7:\Í\§YO
+30E8:\ÍYO
+30E9:\ÍRA
+30EA:\ÍRI
+30EB:\ÍRU
+30EC:\ÍRE
+30ED:\ÍRO
+30EE:\Í\§WA
+30EF:\ÍWA
+30F0:\ÍWI
+30F1:\ÍWE
+30F2:\ÍWO
+30F3:\ÍN
+30F4:\ÍVU
+30F5:\Í\§KA
+30F6:\Í\§KE
+30F7:\ÍVA
+30F8:\ÍVI
+30F9:\ÍVE
+30FA:\ÍVO
+30FB:\n MIDDLE DOT
+30FC:\n-HIRAGANA PROLONG\ÂSOUND\¥
+30FD:\n ITER\”\¥
+30FE:\n VOIC\ÂITER\”\¥
+30FF:\n DIGRAPH KOTO
+3105:\©B
+3106:\©P
+3107:\©M
+3108:\©F
+3109:\©D
+310A:\©T
+310B:\©N
+310C:\©L
+310D:\©G
+310E:\©K
+310F:\©H
+3110:\©J
+3111:\©Q
+3112:\©X
+3113:\©ZH
+3114:\©CH
+3115:\©SH
+3116:\©R
+3117:\©Z
+3118:\©C
+3119:\©S
+311A:\©A
+311B:\©O
+311C:\©E
+311D:\©EH
+311E:\©AI
+311F:\©EI
+3120:\©AU
+3121:\©OU
+3122:\©AN
+3123:\©EN
+3124:\©ANG
+3125:\©ENG
+3126:\©ER
+3127:\©I
+3128:\©U
+3129:\©IU
+312A:\©V
+312B:\©NG
+312C:\©GN
+3131:\ÖKIYEOK
+3132:\ÖSSANGKIYEOK
+3133:\ÖKIYEOK-SIOS
+3134:\ÖN\ÆN
+3135:\ÖN\ÆN-C\ÆC
+3136:\ÖN\ÆN-H\ÆH
+3137:\ÖTIKEUT
+3138:\ÖSSANGTIKEUT
+3139:\ÖR\ÆL
+313A:\ÖR\ÆL-KIYEOK
+313B:\ÖR\ÆL-M\ÆM
+313C:\ÖR\ÆL-P\ÆP
+313D:\ÖR\ÆL-SIOS
+313E:\ÖR\ÆL-TH\ÆTH
+313F:\ÖR\ÆL-PH\ÆPH
+3140:\ÖR\ÆL-H\ÆH
+3141:\ÖM\ÆM
+3142:\ÖP\ÆP
+3143:\ÖSSANGP\ÆP
+3144:\ÖP\ÆP-SIOS
+3145:\ÖSIOS
+3146:\ÖSSANGSIOS
+3147:\Ö\ÆNG
+3148:\ÖC\ÆC
+3149:\ÖSSANGC\ÆC
+314A:\ÖCH\ÆCH
+314B:\ÖKH\ÆKH
+314C:\ÖTH\ÆTH
+314D:\ÖPH\ÆPH
+314E:\ÖH\ÆH
+314F:\ÖA
+3150:\ÖAE
+3151:\ÖYA
+3152:\ÖYAE
+3153:\ÖEO
+3154:\ÖE
+3155:\ÖYEO
+3156:\ÖYE
+3157:\ÖO
+3158:\ÖWA
+3159:\ÖWAE
+315A:\ÖOE
+315B:\ÖYO
+315C:\ÖU
+315D:\ÖWEO
+315E:\ÖWE
+315F:\ÖWI
+3160:\ÖYU
+3161:\ÖEU
+3162:\ÖYI
+3163:\ÖI
+3164:\e FILLER
+3165:\ÖSSANGN\ÆN
+3166:\ÖN\ÆN-TIKEUT
+3167:\ÖN\ÆN-SIOS
+3168:\ÖN\ÆN-PANSIOS
+3169:\ÖR\ÆL-KIYEOK-SIOS
+316A:\ÖR\ÆL-TIKEUT
+316B:\ÖR\ÆL-P\ÆP-SIOS
+316C:\ÖR\ÆL-PANSIOS
+316D:\ÖR\ÆL-YEORINH\ÆH
+316E:\ÖM\ÆM-P\ÆP
+316F:\ÖM\ÆM-SIOS
+3170:\ÖM\ÆM-PANSIOS
+3171:\ÖKAPYEOUNM\ÆM
+3172:\ÖP\ÆP-KIYEOK
+3173:\ÖP\ÆP-TIKEUT
+3174:\ÖP\ÆP-SIOS-KIYEOK
+3175:\ÖP\ÆP-SIOS-TIKEUT
+3176:\ÖP\ÆP-C\ÆC
+3177:\ÖP\ÆP-TH\ÆTH
+3178:\ÖKAPYEOUNP\ÆP
+3179:\ÖKAPYEOUNSSANGP\ÆP
+317A:\ÖSIOS-KIYEOK
+317B:\ÖSIOS-N\ÆN
+317C:\ÖSIOS-TIKEUT
+317D:\ÖSIOS-P\ÆP
+317E:\ÖSIOS-C\ÆC
+317F:\ÖPANSIOS
+3180:\ÖSSANG\ÆNG
+3181:\ÖYES\ÆNG
+3182:\ÖYES\ÆNG-SIOS
+3183:\ÖYES\ÆNG-PANSIOS
+3184:\ÖKAPYEOUNPH\ÆPH
+3185:\ÖSSANGH\ÆH
+3186:\ÖYEORINH\ÆH
+3187:\ÖYO-YA
+3188:\ÖYO-YAE
+3189:\ÖYO-I
+318A:\ÖYU-YEO
+318B:\ÖYU-YE
+318C:\ÖYU-I
+318D:\ÖARAEA
+318E:\ÖARAEAE
+3190:\8IC ANNOT\” LINK\ô\¥
+3191:\8IC ANNOT\” REVERSE\¥
+3192:\8IC ANNOT\” ONE\¥
+3193:\8IC ANNOT\” TWO\¥
+3194:\8IC ANNOT\” THREE\¥
+3195:\8IC ANNOT\” FOUR\¥
+3196:\8IC ANNOT\” TOP\¥
+3197:\8IC ANNOT\” MIDDLE\¥
+3198:\8IC ANNOT\” BOTTOM\¥
+3199:\8IC ANNOT\” FIRST\¥
+319A:\8IC ANNOT\” SECOND\¥
+319B:\8IC ANNOT\” THIRD\¥
+319C:\8IC ANNOT\” FOURTH\¥
+319D:\8IC ANNOT\” HEAVEN\¥
+319E:\8IC ANNOT\” EARTH\¥
+319F:\8IC ANNOT\” MAN\¥
+31A0:\©BU
+31A1:\©ZI
+31A2:\©JI
+31A3:\©GU
+31A4:\©EE
+31A5:\©ENN
+31A6:\©OO
+31A7:\©ONN
+31A8:\©IR
+31A9:\©ANN
+31AA:\©INN
+31AB:\©UNN
+31AC:\©IM
+31AD:\©NGG
+31AE:\©AINN
+31AF:\©AUNN
+31B0:\©AM
+31B1:\©OM
+31B2:\©ONG
+31B3:\©INNN
+31B4:BOPOMOFO FINAL\@P
+31B5:BOPOMOFO FINAL\@T
+31B6:BOPOMOFO FINAL\@K
+31B7:BOPOMOFO FINAL\@H
+31F0:\Í\§KU
+31F1:\Í\§SI
+31F2:\Í\§SU
+31F3:\Í\§TO
+31F4:\Í\§NU
+31F5:\Í\§HA
+31F6:\Í\§HI
+31F7:\Í\§HU
+31F8:\Í\§HE
+31F9:\Í\§HO
+31FA:\Í\§MU
+31FB:\Í\§RA
+31FC:\Í\§RI
+31FD:\Í\§RU
+31FE:\Í\§RE
+31FF:\Í\§RO
+3200:\t\e KIYEOK
+3201:\t\e N\ÆN
+3202:\t\e TIKEUT
+3203:\t\e R\ÆL
+3204:\t\e M\ÆM
+3205:\t\e P\ÆP
+3206:\t\e SIOS
+3207:\t\e \ÆNG
+3208:\t\e C\ÆC
+3209:\t\e CH\ÆCH
+320A:\t\e KH\ÆKH
+320B:\t\e TH\ÆTH
+320C:\t\e PH\ÆPH
+320D:\t\e H\ÆH
+320E:\t\e KIYEOK A
+320F:\t\e N\ÆN A
+3210:\t\e TIKEUT A
+3211:\t\e R\ÆL A
+3212:\t\e M\ÆM A
+3213:\t\e P\ÆP A
+3214:\t\e SIOS A
+3215:\t\e \ÆNG A
+3216:\t\e C\ÆC A
+3217:\t\e CH\ÆCH A
+3218:\t\e KH\ÆKH A
+3219:\t\e TH\ÆTH A
+321A:\t\e PH\ÆPH A
+321B:\t\e H\ÆH A
+321C:\t\e C\ÆC U
+3220:\t\8 ONE
+3221:\t\8 TWO
+3222:\t\8 THREE
+3223:\t\8 FOUR
+3224:\t\8 FIVE
+3225:\t\8 SIX
+3226:\t\8 SEVEN
+3227:\t\8 E\¼
+3228:\t\8 NINE
+3229:\t\8 TEN
+322A:\t\8 MOON
+322B:\t\8 FIRE
+322C:\t\8 WATER
+322D:\t\8 WOOD
+322E:\t\8 METAL
+322F:\t\8 EARTH
+3230:\t\8 SUN
+3231:\t\8 STOCK
+3232:\t\8 HAVE
+3233:\t\8 SOCIETY
+3234:\t\8 NAME
+3235:\t\8 SPECIAL
+3236:\t\8 FINANCIAL
+3237:\t\8 CONGRATUL\”
+3238:\t\8 LABOR
+3239:\t\8 REPRESENT
+323A:\t\8 CALL
+323B:\t\8 STUDY
+323C:\t\8 SUPERVISE
+323D:\t\8 ENTERPRISE
+323E:\t\8 RESOURCE
+323F:\t\8 ALLIANCE
+3240:\t\8 FESTIVAL
+3241:\t\8 REST
+3242:\t\8 SELF
+3243:\t\8 REACH
+3251:\c\­TWENTY ONE
+3252:\c\­TWENTY TWO
+3253:\c\­TWENTY THREE
+3254:\c\­TWENTY FOUR
+3255:\c\­TWENTY FIVE
+3256:\c\­TWENTY SIX
+3257:\c\­TWENTY SEVEN
+3258:\c\­TWENTY E\¼
+3259:\c\­TWENTY NINE
+325A:\c\­THIRTY
+325B:\c\­THIRTY ONE
+325C:\c\­THIRTY TWO
+325D:\c\­THIRTY THREE
+325E:\c\­THIRTY FOUR
+325F:\c\­THIRTY FIVE
+3260:\c\e KIYEOK
+3261:\c\e N\ÆN
+3262:\c\e TIKEUT
+3263:\c\e R\ÆL
+3264:\c\e M\ÆM
+3265:\c\e P\ÆP
+3266:\c\e SIOS
+3267:\c\e \ÆNG
+3268:\c\e C\ÆC
+3269:\c\e CH\ÆCH
+326A:\c\e KH\ÆKH
+326B:\c\e TH\ÆTH
+326C:\c\e PH\ÆPH
+326D:\c\e H\ÆH
+326E:\c\e KIYEOK A
+326F:\c\e N\ÆN A
+3270:\c\e TIKEUT A
+3271:\c\e R\ÆL A
+3272:\c\e M\ÆM A
+3273:\c\e P\ÆP A
+3274:\c\e SIOS A
+3275:\c\e \ÆNG A
+3276:\c\e C\ÆC A
+3277:\c\e CH\ÆCH A
+3278:\c\e KH\ÆKH A
+3279:\c\e TH\ÆTH A
+327A:\c\e PH\ÆPH A
+327B:\c\e H\ÆH A
+327F:KOREAN STANDARD \
+3280:\c\8 ONE
+3281:\c\8 TWO
+3282:\c\8 THREE
+3283:\c\8 FOUR
+3284:\c\8 FIVE
+3285:\c\8 SIX
+3286:\c\8 SEVEN
+3287:\c\8 E\¼
+3288:\c\8 NINE
+3289:\c\8 TEN
+328A:\c\8 MOON
+328B:\c\8 FIRE
+328C:\c\8 WATER
+328D:\c\8 WOOD
+328E:\c\8 METAL
+328F:\c\8 EARTH
+3290:\c\8 SUN
+3291:\c\8 STOCK
+3292:\c\8 HAVE
+3293:\c\8 SOCIETY
+3294:\c\8 NAME
+3295:\c\8 SPECIAL
+3296:\c\8 FINANCIAL
+3297:\c\8 CONGRATUL\”
+3298:\c\8 LABOR
+3299:\c\8 SECRET
+329A:\c\8 MALE
+329B:\c\8 FEMALE
+329C:\c\8 SUITABLE
+329D:\c\8 EXCELLENT
+329E:\c\8 PRINT
+329F:\c\8 ATTENTION
+32A0:\c\8 ITEM
+32A1:\c\8 REST
+32A2:\c\8 COPY
+32A3:\c\8 CORRECT
+32A4:\c\8 HIGH
+32A5:\c\8 CENTRE
+32A6:\c\8 LOW
+32A7:\c\8 \‰
+32A8:\c\8 \q
+32A9:\c\8 MEDICINE
+32AA:\c\8 RELIGION
+32AB:\c\8 STUDY
+32AC:\c\8 SUPERVISE
+32AD:\c\8 ENTERPRISE
+32AE:\c\8 RESOURCE
+32AF:\c\8 ALLIANCE
+32B0:\c\8 N\¼
+32B1:\c\­THIRTY SIX
+32B2:\c\­THIRTY SEVEN
+32B3:\c\­THIRTY E\¼
+32B4:\c\­THIRTY NINE
+32B5:\c\­FORTY
+32B6:\c\­FORTY ONE
+32B7:\c\­FORTY TWO
+32B8:\c\­FORTY THREE
+32B9:\c\­FORTY FOUR
+32BA:\c\­FORTY FIVE
+32BB:\c\­FORTY SIX
+32BC:\c\­FORTY SEVEN
+32BD:\c\­FORTY E\¼
+32BE:\c\­FORTY NINE
+32BF:\c\­FIFTY
+32C0:\_JANUARY
+32C1:\_FEBRUARY
+32C2:\_MARCH
+32C3:\_APRIL
+32C4:\_MAY
+32C5:\_JUNE
+32C6:\_JULY
+32C7:\_AUGUST
+32C8:\_SEPTEMBER
+32C9:\_OCTOBER
+32CA:\_NOVEMBER
+32CB:\_DECEMBER
+32D0:\c\n A
+32D1:\c\n I
+32D2:\c\n U
+32D3:\c\n E
+32D4:\c\n O
+32D5:\c\n KA
+32D6:\c\n KI
+32D7:\c\n KU
+32D8:\c\n KE
+32D9:\c\n KO
+32DA:\c\n SA
+32DB:\c\n SI
+32DC:\c\n SU
+32DD:\c\n SE
+32DE:\c\n SO
+32DF:\c\n TA
+32E0:\c\n TI
+32E1:\c\n TU
+32E2:\c\n TE
+32E3:\c\n TO
+32E4:\c\n NA
+32E5:\c\n NI
+32E6:\c\n NU
+32E7:\c\n NE
+32E8:\c\n NO
+32E9:\c\n HA
+32EA:\c\n HI
+32EB:\c\n HU
+32EC:\c\n HE
+32ED:\c\n HO
+32EE:\c\n MA
+32EF:\c\n MI
+32F0:\c\n MU
+32F1:\c\n ME
+32F2:\c\n MO
+32F3:\c\n YA
+32F4:\c\n YU
+32F5:\c\n YO
+32F6:\c\n RA
+32F7:\c\n RI
+32F8:\c\n RU
+32F9:\c\n RE
+32FA:\c\n RO
+32FB:\c\n WA
+32FC:\c\n WI
+32FD:\c\n WE
+32FE:\c\n WO
+3300:\rAPAATO
+3301:\rARUHUA
+3302:\rANPEA
+3303:\rAARU
+3304:\rIN\ôU
+3305:\rINTI
+3306:\rUON
+3307:\rESUKUUDO
+3308:\rEEKAA
+3309:\rONSU
+330A:\rOOMU
+330B:\rKAIRI
+330C:\rKARATTO
+330D:\rKARORII
+330E:\rGARON
+330F:\rGANMA
+3310:\rGIGA
+3311:\rGINII
+3312:\rKYURII
+3313:\rGIRUDAA
+3314:\rKIRO
+3315:\rKIROGURAMU
+3316:\rKIROMEETORU
+3317:\rKIROWATTO
+3318:\rGURAMU
+3319:\rGURAMUTON
+331A:\rKURUZEIRO
+331B:\rKUROONE
+331C:\rKEESU
+331D:\rKORUNA
+331E:\rKOOPO
+331F:\rSAIKURU
+3320:\rSANTIIMU
+3321:\rSIR\ôU
+3322:\rSENTI
+3323:\rSENTO
+3324:\rDAASU
+3325:\rDESI
+3326:\rDORU
+3327:\rTON
+3328:\rNANO
+3329:\rNOTTO
+332A:\rHAITU
+332B:\rPAASENTO
+332C:\rPAATU
+332D:\rBAARERU
+332E:\rPIASUTORU
+332F:\rPIKURU
+3330:\rPIKO
+3331:\rBIRU
+3332:\rHUARADDO
+3333:\rHUIITO
+3334:\rBUSSYERU
+3335:\rHURAN
+3336:\rHEKUTAARU
+3337:\rPESO
+3338:\rPENIHI
+3339:\rHERUTU
+333A:\rPENSU
+333B:\rPEEZI
+333C:\rBEETA
+333D:\rPOINTO
+333E:\rBORUTO
+333F:\rHON
+3340:\rPONDO
+3341:\rHOORU
+3342:\rHOON
+3343:\rMAIKURO
+3344:\rMAIRU
+3345:\rMAHHA
+3346:\rMARUKU
+3347:\rMANSYON
+3348:\rMIKURON
+3349:\rMIRI
+334A:\rMIRIBAARU
+334B:\rMEGA
+334C:\rMEGATON
+334D:\rMEETORU
+334E:\rYAADO
+334F:\rYAARU
+3350:\rYUAN
+3351:\rRITTORU
+3352:\rRIRA
+3353:\rRUPII
+3354:\rRUUBURU
+3355:\rREMU
+3356:\rRENTOGEN
+3357:\rWATTO
+3358:\_HOUR ZERO
+3359:\_HOUR ONE
+335A:\_HOUR TWO
+335B:\_HOUR THREE
+335C:\_HOUR FOUR
+335D:\_HOUR FIVE
+335E:\_HOUR SIX
+335F:\_HOUR SEVEN
+3360:\_HOUR E\¼
+3361:\_HOUR NINE
+3362:\_HOUR TEN
+3363:\_HOUR ELEVEN
+3364:\_HOUR TWELVE
+3365:\_HOUR THIRTEEN
+3366:\_HOUR FOURTEEN
+3367:\_HOUR FIFTEEN
+3368:\_HOUR SIXTEEN
+3369:\_HOUR SEVENTEEN
+336A:\_HOUR E\¼EEN
+336B:\_HOUR NINETEEN
+336C:\_HOUR TWENTY
+336D:\_HOUR TWENTY-ONE
+336E:\_HOUR TWENTY-TWO
+336F:\_HOUR TWENTY-THREE
+3370:\_HOUR TWENTY-FOUR
+3371:\rHPA
+3372:\rDA
+3373:\rAU
+3374:\rBAR
+3375:\rOV
+3376:\rPC
+337B:\rERA NAME HEISEI
+337C:\rERA NAME SYOUWA
+337D:\rERA NAME TAISYOU
+337E:\rERA NAME MEIZI
+337F:\rCORPOR\”
+3380:\rPA AMPS
+3381:\rNA
+3382:\rMU A
+3383:\rMA
+3384:\rKA
+3385:\rKB
+3386:\rMB
+3387:\rGB
+3388:\rCAL
+3389:\rKCAL
+338A:\rPF
+338B:\rNF
+338C:\rMU F
+338D:\rMU G
+338E:\rMG
+338F:\rKG
+3390:\rHZ
+3391:\rKHZ
+3392:\rMHZ
+3393:\rGHZ
+3394:\rTHZ
+3395:\rMU L
+3396:\rML
+3397:\rDL
+3398:\rKL
+3399:\rFM
+339A:\rNM
+339B:\rMU M
+339C:\rMM
+339D:\rCM
+339E:\rKM
+339F:\rMM \ýD
+33A0:\rCM \ýD
+33A1:\rM \ýD
+33A2:\rKM \ýD
+33A3:\rMM CUBED
+33A4:\rCM CUBED
+33A5:\rM CUBED
+33A6:\rKM CUBED
+33A7:\rM OVER S
+33A8:\rM OVER S \ýD
+33A9:\rPA
+33AA:\rKPA
+33AB:\rMPA
+33AC:\rGPA
+33AD:\rRAD
+33AE:\rRAD OVER S
+33AF:\rRAD OVER S \ýD
+33B0:\rPS
+33B1:\rNS
+33B2:\rMU S
+33B3:\rMS
+33B4:\rPV
+33B5:\rNV
+33B6:\rMU V
+33B7:\rMV
+33B8:\rKV
+33B9:\rMV MEGA
+33BA:\rPW
+33BB:\rNW
+33BC:\rMU W
+33BD:\rMW
+33BE:\rKW
+33BF:\rMW MEGA
+33C0:\rK OHM
+33C1:\rM OHM
+33C2:\rAM
+33C3:\rBQ
+33C4:\rCC
+33C5:\rCD
+33C6:\rC OVER KG
+33C7:\rCO
+33C8:\rDB
+33C9:\rGY
+33CA:\rHA
+33CB:\rHP
+33CC:\rIN
+33CD:\rKK
+33CE:\rKM\I
+33CF:\rKT
+33D0:\rLM
+33D1:\rLN
+33D2:\rLOG
+33D3:\rLX
+33D4:\rMB\N
+33D5:\rMIL
+33D6:\rMOL
+33D7:\rPH
+33D8:\rPM
+33D9:\rPPM
+33DA:\rPR
+33DB:\rSR
+33DC:\rSV
+33DD:\rWB
+33E0:\_DAY ONE
+33E1:\_DAY TWO
+33E2:\_DAY THREE
+33E3:\_DAY FOUR
+33E4:\_DAY FIVE
+33E5:\_DAY SIX
+33E6:\_DAY SEVEN
+33E7:\_DAY E\¼
+33E8:\_DAY NINE
+33E9:\_DAY TEN
+33EA:\_DAY ELEVEN
+33EB:\_DAY TWELVE
+33EC:\_DAY THIRTEEN
+33ED:\_DAY FOURTEEN
+33EE:\_DAY FIFTEEN
+33EF:\_DAY SIXTEEN
+33F0:\_DAY SEVENTEEN
+33F1:\_DAY E\¼EEN
+33F2:\_DAY NINETEEN
+33F3:\_DAY TWENTY
+33F4:\_DAY TWENTY-ONE
+33F5:\_DAY TWENTY-TWO
+33F6:\_DAY TWENTY-THREE
+33F7:\_DAY TWENTY-FOUR
+33F8:\_DAY TWENTY-FIVE
+33F9:\_DAY TWENTY-SIX
+33FA:\_DAY TWENTY-SEVEN
+33FB:\_DAY TWENTY-E\¼
+33FC:\_DAY TWENTY-NINE
+33FD:\_DAY THIRTY
+33FE:\_DAY THIRTY-ONE
+3400-4DB5:<CJK Ideograph Extension A>
+4E00-9FA5:<CJK Ideograph>
+A000:\ZIT
+A001:\ZIX
+A002:\ZI
+A003:\ZIP
+A004:\ZIET
+A005:\ZIEX
+A006:\ZIE
+A007:\ZIEP
+A008:\ZAT
+A009:\ZAX
+A00A:\ZA
+A00B:\ZAP
+A00C:\ZUOX
+A00D:\ZUO
+A00E:\ZUOP
+A00F:\ZOT
+A010:\ZOX
+A011:\ZO
+A012:\ZOP
+A013:\ZEX
+A014:\ZE
+A015:\ZWU
+A016:\ZBIT
+A017:\ZBIX
+A018:\ZBI
+A019:\ZBIP
+A01A:\ZBIET
+A01B:\ZBIEX
+A01C:\ZBIE
+A01D:\ZBIEP
+A01E:\ZBAT
+A01F:\ZBAX
+A020:\ZBA
+A021:\ZBAP
+A022:\ZBUOX
+A023:\ZBUO
+A024:\ZBUOP
+A025:\ZBOT
+A026:\ZBOX
+A027:\ZBO
+A028:\ZBOP
+A029:\ZBEX
+A02A:\ZBE
+A02B:\ZBEP
+A02C:\ZBUT
+A02D:\ZBUX
+A02E:\ZBU
+A02F:\ZBUP
+A030:\ZBURX
+A031:\ZBUR
+A032:\ZBYT
+A033:\ZBYX
+A034:\ZBY
+A035:\ZBYP
+A036:\ZBYRX
+A037:\ZBYR
+A038:\ZPIT
+A039:\ZPIX
+A03A:\ZPI
+A03B:\ZPIP
+A03C:\ZPIEX
+A03D:\ZPIE
+A03E:\ZPIEP
+A03F:\ZPAT
+A040:\ZPAX
+A041:\ZPA
+A042:\ZPAP
+A043:\ZPUOX
+A044:\ZPUO
+A045:\ZPUOP
+A046:\ZPOT
+A047:\ZPOX
+A048:\ZPO
+A049:\ZPOP
+A04A:\ZPUT
+A04B:\ZPUX
+A04C:\ZPU
+A04D:\ZPUP
+A04E:\ZPURX
+A04F:\ZPUR
+A050:\ZPYT
+A051:\ZPYX
+A052:\ZPY
+A053:\ZPYP
+A054:\ZPYRX
+A055:\ZPYR
+A056:\ZBBIT
+A057:\ZBBIX
+A058:\ZBBI
+A059:\ZBBIP
+A05A:\ZBBIET
+A05B:\ZBBIEX
+A05C:\ZBBIE
+A05D:\ZBBIEP
+A05E:\ZBBAT
+A05F:\ZBBAX
+A060:\ZBBA
+A061:\ZBBAP
+A062:\ZBBUOX
+A063:\ZBBUO
+A064:\ZBBUOP
+A065:\ZBBOT
+A066:\ZBBOX
+A067:\ZBBO
+A068:\ZBBOP
+A069:\ZBBEX
+A06A:\ZBBE
+A06B:\ZBBEP
+A06C:\ZBBUT
+A06D:\ZBBUX
+A06E:\ZBBU
+A06F:\ZBBUP
+A070:\ZBBURX
+A071:\ZBBUR
+A072:\ZBBYT
+A073:\ZBBYX
+A074:\ZBBY
+A075:\ZBBYP
+A076:\ÿBIT
+A077:\ÿBIX
+A078:\ÿBI
+A079:\ÿBIP
+A07A:\ÿBIEX
+A07B:\ÿBIE
+A07C:\ÿBIEP
+A07D:\ÿBAT
+A07E:\ÿBAX
+A07F:\ÿBA
+A080:\ÿBAP
+A081:\ÿBOT
+A082:\ÿBOX
+A083:\ÿBO
+A084:\ÿBOP
+A085:\ÿBUT
+A086:\ÿBUX
+A087:\ÿBU
+A088:\ÿBUP
+A089:\ÿBURX
+A08A:\ÿBUR
+A08B:\ÿBYT
+A08C:\ÿBYX
+A08D:\ÿBY
+A08E:\ÿBYP
+A08F:\ÿBYRX
+A090:\ÿBYR
+A091:\ZHMIT
+A092:\ZHMIX
+A093:\ZHMI
+A094:\ZHMIP
+A095:\ZHMIEX
+A096:\ZHMIE
+A097:\ZHMIEP
+A098:\ZHMAT
+A099:\ZHMAX
+A09A:\ZHMA
+A09B:\ZHMAP
+A09C:\ZHMUOX
+A09D:\ZHMUO
+A09E:\ZHMUOP
+A09F:\ZHMOT
+A0A0:\ZHMOX
+A0A1:\ZHMO
+A0A2:\ZHMOP
+A0A3:\ZHMUT
+A0A4:\ZHMUX
+A0A5:\ZHMU
+A0A6:\ZHMUP
+A0A7:\ZHMURX
+A0A8:\ZHMUR
+A0A9:\ZHMYX
+A0AA:\ZHMY
+A0AB:\ZHMYP
+A0AC:\ZHMYRX
+A0AD:\ZHMYR
+A0AE:\ZMIT
+A0AF:\ZMIX
+A0B0:\ZMI
+A0B1:\ZMIP
+A0B2:\ZMIEX
+A0B3:\ZMIE
+A0B4:\ZMIEP
+A0B5:\ZMAT
+A0B6:\ZMAX
+A0B7:\ZMA
+A0B8:\ZMAP
+A0B9:\ZMUOT
+A0BA:\ZMUOX
+A0BB:\ZMUO
+A0BC:\ZMUOP
+A0BD:\ZMOT
+A0BE:\ZMOX
+A0BF:\ZMO
+A0C0:\ZMOP
+A0C1:\ZMEX
+A0C2:\ZME
+A0C3:\ZMUT
+A0C4:\ZMUX
+A0C5:\ZMU
+A0C6:\ZMUP
+A0C7:\ZMURX
+A0C8:\ZMUR
+A0C9:\ZMYT
+A0CA:\ZMYX
+A0CB:\ZMY
+A0CC:\ZMYP
+A0CD:\ZFIT
+A0CE:\ZFIX
+A0CF:\ZFI
+A0D0:\ZFIP
+A0D1:\ZFAT
+A0D2:\ZFAX
+A0D3:\ZFA
+A0D4:\ZFAP
+A0D5:\ZFOX
+A0D6:\ZFO
+A0D7:\ZFOP
+A0D8:\ZFUT
+A0D9:\ZFUX
+A0DA:\ZFU
+A0DB:\ZFUP
+A0DC:\ZFURX
+A0DD:\ZFUR
+A0DE:\ZFYT
+A0DF:\ZFYX
+A0E0:\ZFY
+A0E1:\ZFYP
+A0E2:\ZVIT
+A0E3:\ZVIX
+A0E4:\ZVI
+A0E5:\ZVIP
+A0E6:\ZVIET
+A0E7:\ZVIEX
+A0E8:\ZVIE
+A0E9:\ZVIEP
+A0EA:\ZVAT
+A0EB:\ZVAX
+A0EC:\ZVA
+A0ED:\ZVAP
+A0EE:\ZVOT
+A0EF:\ZVOX
+A0F0:\ZVO
+A0F1:\ZVOP
+A0F2:\ZVEX
+A0F3:\ZVEP
+A0F4:\ZVUT
+A0F5:\ZVUX
+A0F6:\ZVU
+A0F7:\ZVUP
+A0F8:\ZVURX
+A0F9:\ZVUR
+A0FA:\ZVYT
+A0FB:\ZVYX
+A0FC:\ZVY
+A0FD:\ZVYP
+A0FE:\ZVYRX
+A0FF:\ZVYR
+A100:\ZDIT
+A101:\ZDIX
+A102:\ZDI
+A103:\ZDIP
+A104:\ZDIEX
+A105:\ZDIE
+A106:\ZDIEP
+A107:\ZDAT
+A108:\ZDAX
+A109:\ZDA
+A10A:\ZDAP
+A10B:\ZDUOX
+A10C:\ZDUO
+A10D:\ZDOT
+A10E:\ZDOX
+A10F:\ZDO
+A110:\ZDOP
+A111:\ZDEX
+A112:\ZDE
+A113:\ZDEP
+A114:\ZDUT
+A115:\ZDUX
+A116:\ZDU
+A117:\ZDUP
+A118:\ZDURX
+A119:\ZDUR
+A11A:\ZTIT
+A11B:\ZTIX
+A11C:\ZTI
+A11D:\ZTIP
+A11E:\ZTIEX
+A11F:\ZTIE
+A120:\ZTIEP
+A121:\ZTAT
+A122:\ZTAX
+A123:\ZTA
+A124:\ZTAP
+A125:\ZTUOT
+A126:\ZTUOX
+A127:\ZTUO
+A128:\ZTUOP
+A129:\ZTOT
+A12A:\ZTOX
+A12B:\ZTO
+A12C:\ZTOP
+A12D:\ZTEX
+A12E:\ZTE
+A12F:\ZTEP
+A130:\ZTUT
+A131:\ZTUX
+A132:\ZTU
+A133:\ZTUP
+A134:\ZTURX
+A135:\ZTUR
+A136:\ZDDIT
+A137:\ZDDIX
+A138:\ZDDI
+A139:\ZDDIP
+A13A:\ZDDIEX
+A13B:\ZDDIE
+A13C:\ZDDIEP
+A13D:\ZDDAT
+A13E:\ZDDAX
+A13F:\ZDDA
+A140:\ZDDAP
+A141:\ZDDUOX
+A142:\ZDDUO
+A143:\ZDDUOP
+A144:\ZDDOT
+A145:\ZDDOX
+A146:\ZDDO
+A147:\ZDDOP
+A148:\ZDDEX
+A149:\ZDDE
+A14A:\ZDDEP
+A14B:\ZDDUT
+A14C:\ZDDUX
+A14D:\ZDDU
+A14E:\ZDDUP
+A14F:\ZDDURX
+A150:\ZDDUR
+A151:\ÿDIT
+A152:\ÿDIX
+A153:\ÿDI
+A154:\ÿDIP
+A155:\ÿDIEX
+A156:\ÿDIE
+A157:\ÿDAT
+A158:\ÿDAX
+A159:\ÿDA
+A15A:\ÿDAP
+A15B:\ÿDOT
+A15C:\ÿDOX
+A15D:\ÿDO
+A15E:\ÿDOP
+A15F:\ÿDEX
+A160:\ÿDE
+A161:\ÿDEP
+A162:\ÿDUT
+A163:\ÿDUX
+A164:\ÿDU
+A165:\ÿDUP
+A166:\ÿDURX
+A167:\ÿDUR
+A168:\ZHNIT
+A169:\ZHNIX
+A16A:\ZHNI
+A16B:\ZHNIP
+A16C:\ZHNIET
+A16D:\ZHNIEX
+A16E:\ZHNIE
+A16F:\ZHNIEP
+A170:\ZHNAT
+A171:\ZHNAX
+A172:\ZHNA
+A173:\ZHNAP
+A174:\ZHNUOX
+A175:\ZHNUO
+A176:\ZHNOT
+A177:\ZHNOX
+A178:\ZHNOP
+A179:\ZHNEX
+A17A:\ZHNE
+A17B:\ZHNEP
+A17C:\ZHNUT
+A17D:\ÿIT
+A17E:\ÿIX
+A17F:\ÿI
+A180:\ÿIP
+A181:\ÿIEX
+A182:\ÿIE
+A183:\ÿIEP
+A184:\ÿAX
+A185:\ÿA
+A186:\ÿAP
+A187:\ÿUOX
+A188:\ÿUO
+A189:\ÿUOP
+A18A:\ÿOT
+A18B:\ÿOX
+A18C:\ÿO
+A18D:\ÿOP
+A18E:\ÿEX
+A18F:\ÿE
+A190:\ÿEP
+A191:\ÿUT
+A192:\ÿUX
+A193:\ÿU
+A194:\ÿUP
+A195:\ÿURX
+A196:\ÿUR
+A197:\ZHLIT
+A198:\ZHLIX
+A199:\ZHLI
+A19A:\ZHLIP
+A19B:\ZHLIEX
+A19C:\ZHLIE
+A19D:\ZHLIEP
+A19E:\ZHLAT
+A19F:\ZHLAX
+A1A0:\ZHLA
+A1A1:\ZHLAP
+A1A2:\ZHLUOX
+A1A3:\ZHLUO
+A1A4:\ZHLUOP
+A1A5:\ZHLOX
+A1A6:\ZHLO
+A1A7:\ZHLOP
+A1A8:\ZHLEX
+A1A9:\ZHLE
+A1AA:\ZHLEP
+A1AB:\ZHLUT
+A1AC:\ZHLUX
+A1AD:\ZHLU
+A1AE:\ZHLUP
+A1AF:\ZHLURX
+A1B0:\ZHLUR
+A1B1:\ZHLYT
+A1B2:\ZHLYX
+A1B3:\ZHLY
+A1B4:\ZHLYP
+A1B5:\ZHLYRX
+A1B6:\ZHLYR
+A1B7:\ZLIT
+A1B8:\ZLIX
+A1B9:\ZLI
+A1BA:\ZLIP
+A1BB:\ZLIET
+A1BC:\ZLIEX
+A1BD:\ZLIE
+A1BE:\ZLIEP
+A1BF:\ZLAT
+A1C0:\ZLAX
+A1C1:\ZLA
+A1C2:\ZLAP
+A1C3:\ZLUOT
+A1C4:\ZLUOX
+A1C5:\ZLUO
+A1C6:\ZLUOP
+A1C7:\ZLOT
+A1C8:\ZLOX
+A1C9:\ZLO
+A1CA:\ZLOP
+A1CB:\ZLEX
+A1CC:\ZLE
+A1CD:\ZLEP
+A1CE:\ZLUT
+A1CF:\ZLUX
+A1D0:\ZLU
+A1D1:\ZLUP
+A1D2:\ZLURX
+A1D3:\ZLUR
+A1D4:\ZLYT
+A1D5:\ZLYX
+A1D6:\ZLY
+A1D7:\ZLYP
+A1D8:\ZLYRX
+A1D9:\ZLYR
+A1DA:\ZGIT
+A1DB:\ZGIX
+A1DC:\ZGI
+A1DD:\ZGIP
+A1DE:\ZGIET
+A1DF:\ZGIEX
+A1E0:\ZGIE
+A1E1:\ZGIEP
+A1E2:\ZGAT
+A1E3:\ZGAX
+A1E4:\ZGA
+A1E5:\ZGAP
+A1E6:\ZGUOT
+A1E7:\ZGUOX
+A1E8:\ZGUO
+A1E9:\ZGUOP
+A1EA:\ZGOT
+A1EB:\ZGOX
+A1EC:\ZGO
+A1ED:\ZGOP
+A1EE:\ZGET
+A1EF:\ZGEX
+A1F0:\ZGE
+A1F1:\ZGEP
+A1F2:\ZGUT
+A1F3:\ZGUX
+A1F4:\ZGU
+A1F5:\ZGUP
+A1F6:\ZGURX
+A1F7:\ZGUR
+A1F8:\ZKIT
+A1F9:\ZKIX
+A1FA:\ZKI
+A1FB:\ZKIP
+A1FC:\ZKIEX
+A1FD:\ZKIE
+A1FE:\ZKIEP
+A1FF:\ZKAT
+A200:\ZKAX
+A201:\ZKA
+A202:\ZKAP
+A203:\ZKUOX
+A204:\ZKUO
+A205:\ZKUOP
+A206:\ZKOT
+A207:\ZKOX
+A208:\ZKO
+A209:\ZKOP
+A20A:\ZKET
+A20B:\ZKEX
+A20C:\ZKE
+A20D:\ZKEP
+A20E:\ZKUT
+A20F:\ZKUX
+A210:\ZKU
+A211:\ZKUP
+A212:\ZKURX
+A213:\ZKUR
+A214:\ZGGIT
+A215:\ZGGIX
+A216:\ZGGI
+A217:\ZGGIEX
+A218:\ZGGIE
+A219:\ZGGIEP
+A21A:\ZGGAT
+A21B:\ZGGAX
+A21C:\ZGGA
+A21D:\ZGGAP
+A21E:\ZGGUOT
+A21F:\ZGGUOX
+A220:\ZGGUO
+A221:\ZGGUOP
+A222:\ZGGOT
+A223:\ZGGOX
+A224:\ZGGO
+A225:\ZGGOP
+A226:\ZGGET
+A227:\ZGGEX
+A228:\ZGGE
+A229:\ZGGEP
+A22A:\ZGGUT
+A22B:\ZGGUX
+A22C:\ZGGU
+A22D:\ZGGUP
+A22E:\ZGGURX
+A22F:\ZGGUR
+A230:\ZMGIEX
+A231:\ZMGIE
+A232:\ZMGAT
+A233:\ZMGAX
+A234:\ZMGA
+A235:\ZMGAP
+A236:\ZMGUOX
+A237:\ZMGUO
+A238:\ZMGUOP
+A239:\ZMGOT
+A23A:\ZMGOX
+A23B:\ZMGO
+A23C:\ZMGOP
+A23D:\ZMGEX
+A23E:\ZMGE
+A23F:\ZMGEP
+A240:\ZMGUT
+A241:\ZMGUX
+A242:\ZMGU
+A243:\ZMGUP
+A244:\ZMGURX
+A245:\ZMGUR
+A246:\ZHXIT
+A247:\ZHXIX
+A248:\ZHXI
+A249:\ZHXIP
+A24A:\ZHXIET
+A24B:\ZHXIEX
+A24C:\ZHXIE
+A24D:\ZHXIEP
+A24E:\ZHXAT
+A24F:\ZHXAX
+A250:\ZHXA
+A251:\ZHXAP
+A252:\ZHXUOT
+A253:\ZHXUOX
+A254:\ZHXUO
+A255:\ZHXUOP
+A256:\ZHXOT
+A257:\ZHXOX
+A258:\ZHXO
+A259:\ZHXOP
+A25A:\ZHXEX
+A25B:\ZHXE
+A25C:\ZHXEP
+A25D:\ÿGIEX
+A25E:\ÿGIE
+A25F:\ÿGIEP
+A260:\ÿGAT
+A261:\ÿGAX
+A262:\ÿGA
+A263:\ÿGAP
+A264:\ÿGUOT
+A265:\ÿGUOX
+A266:\ÿGUO
+A267:\ÿGOT
+A268:\ÿGOX
+A269:\ÿGO
+A26A:\ÿGOP
+A26B:\ÿGEX
+A26C:\ÿGE
+A26D:\ÿGEP
+A26E:\ZHIT
+A26F:\ZHIEX
+A270:\ZHIE
+A271:\ZHAT
+A272:\ZHAX
+A273:\ZHA
+A274:\ZHAP
+A275:\ZHUOT
+A276:\ZHUOX
+A277:\ZHUO
+A278:\ZHUOP
+A279:\ZHOT
+A27A:\ZHOX
+A27B:\ZHO
+A27C:\ZHOP
+A27D:\ZHEX
+A27E:\ZHE
+A27F:\ZHEP
+A280:\ZWAT
+A281:\ZWAX
+A282:\ZWA
+A283:\ZWAP
+A284:\ZWUOX
+A285:\ZWUO
+A286:\ZWUOP
+A287:\ZWOX
+A288:\ZWO
+A289:\ZWOP
+A28A:\ZWEX
+A28B:\ZWE
+A28C:\ZWEP
+A28D:\ZZIT
+A28E:\ZZIX
+A28F:\ZZI
+A290:\ZZIP
+A291:\ZZIEX
+A292:\ZZIE
+A293:\ZZIEP
+A294:\ZZAT
+A295:\ZZAX
+A296:\ZZA
+A297:\ZZAP
+A298:\ZZUOX
+A299:\ZZUO
+A29A:\ZZUOP
+A29B:\ZZOT
+A29C:\ZZOX
+A29D:\ZZO
+A29E:\ZZOP
+A29F:\ZZEX
+A2A0:\ZZE
+A2A1:\ZZEP
+A2A2:\ZZUT
+A2A3:\ZZUX
+A2A4:\ZZU
+A2A5:\ZZUP
+A2A6:\ZZURX
+A2A7:\ZZUR
+A2A8:\ZZYT
+A2A9:\ZZYX
+A2AA:\ZZY
+A2AB:\ZZYP
+A2AC:\ZZYRX
+A2AD:\ZZYR
+A2AE:\ZCIT
+A2AF:\ZCIX
+A2B0:\ZCI
+A2B1:\ZCIP
+A2B2:\ZCIET
+A2B3:\ZCIEX
+A2B4:\ZCIE
+A2B5:\ZCIEP
+A2B6:\ZCAT
+A2B7:\ZCAX
+A2B8:\ZCA
+A2B9:\ZCAP
+A2BA:\ZCUOX
+A2BB:\ZCUO
+A2BC:\ZCUOP
+A2BD:\ZCOT
+A2BE:\ZCOX
+A2BF:\ZCO
+A2C0:\ZCOP
+A2C1:\ZCEX
+A2C2:\ZCE
+A2C3:\ZCEP
+A2C4:\ZCUT
+A2C5:\ZCUX
+A2C6:\ZCU
+A2C7:\ZCUP
+A2C8:\ZCURX
+A2C9:\ZCUR
+A2CA:\ZCYT
+A2CB:\ZCYX
+A2CC:\ZCY
+A2CD:\ZCYP
+A2CE:\ZCYRX
+A2CF:\ZCYR
+A2D0:\ZZZIT
+A2D1:\ZZZIX
+A2D2:\ZZZI
+A2D3:\ZZZIP
+A2D4:\ZZZIET
+A2D5:\ZZZIEX
+A2D6:\ZZZIE
+A2D7:\ZZZIEP
+A2D8:\ZZZAT
+A2D9:\ZZZAX
+A2DA:\ZZZA
+A2DB:\ZZZAP
+A2DC:\ZZZOX
+A2DD:\ZZZO
+A2DE:\ZZZOP
+A2DF:\ZZZEX
+A2E0:\ZZZE
+A2E1:\ZZZEP
+A2E2:\ZZZUX
+A2E3:\ZZZU
+A2E4:\ZZZUP
+A2E5:\ZZZURX
+A2E6:\ZZZUR
+A2E7:\ZZZYT
+A2E8:\ZZZYX
+A2E9:\ZZZY
+A2EA:\ZZZYP
+A2EB:\ZZZYRX
+A2EC:\ZZZYR
+A2ED:\ÿZIT
+A2EE:\ÿZIX
+A2EF:\ÿZI
+A2F0:\ÿZIP
+A2F1:\ÿZIEX
+A2F2:\ÿZIE
+A2F3:\ÿZIEP
+A2F4:\ÿZAT
+A2F5:\ÿZAX
+A2F6:\ÿZA
+A2F7:\ÿZAP
+A2F8:\ÿZUOX
+A2F9:\ÿZUO
+A2FA:\ÿZOX
+A2FB:\ÿZOP
+A2FC:\ÿZEX
+A2FD:\ÿZE
+A2FE:\ÿZUX
+A2FF:\ÿZU
+A300:\ÿZUP
+A301:\ÿZURX
+A302:\ÿZUR
+A303:\ÿZYT
+A304:\ÿZYX
+A305:\ÿZY
+A306:\ÿZYP
+A307:\ÿZYRX
+A308:\ÿZYR
+A309:\ZSIT
+A30A:\ZSIX
+A30B:\ZSI
+A30C:\ZSIP
+A30D:\ZSIEX
+A30E:\ZSIE
+A30F:\ZSIEP
+A310:\ZSAT
+A311:\ZSAX
+A312:\ZSA
+A313:\ZSAP
+A314:\ZSUOX
+A315:\ZSUO
+A316:\ZSUOP
+A317:\ZSOT
+A318:\ZSOX
+A319:\ZSO
+A31A:\ZSOP
+A31B:\ZSEX
+A31C:\ZSE
+A31D:\ZSEP
+A31E:\ZSUT
+A31F:\ZSUX
+A320:\ZSU
+A321:\ZSUP
+A322:\ZSURX
+A323:\ZSUR
+A324:\ZSYT
+A325:\ZSYX
+A326:\ZSY
+A327:\ZSYP
+A328:\ZSYRX
+A329:\ZSYR
+A32A:\ZSSIT
+A32B:\ZSSIX
+A32C:\ZSSI
+A32D:\ZSSIP
+A32E:\ZSSIEX
+A32F:\ZSSIE
+A330:\ZSSIEP
+A331:\ZSSAT
+A332:\ZSSAX
+A333:\ZSSA
+A334:\ZSSAP
+A335:\ZSSOT
+A336:\ZSSOX
+A337:\ZSSO
+A338:\ZSSOP
+A339:\ZSSEX
+A33A:\ZSSE
+A33B:\ZSSEP
+A33C:\ZSSUT
+A33D:\ZSSUX
+A33E:\ZSSU
+A33F:\ZSSUP
+A340:\ZSSYT
+A341:\ZSSYX
+A342:\ZSSY
+A343:\ZSSYP
+A344:\ZSSYRX
+A345:\ZSSYR
+A346:\ZZHAT
+A347:\ZZHAX
+A348:\ZZHA
+A349:\ZZHAP
+A34A:\ZZHUOX
+A34B:\ZZHUO
+A34C:\ZZHUOP
+A34D:\ZZHOT
+A34E:\ZZHOX
+A34F:\ZZHO
+A350:\ZZHOP
+A351:\ZZHET
+A352:\ZZHEX
+A353:\ZZHE
+A354:\ZZHEP
+A355:\ZZHUT
+A356:\ZZHUX
+A357:\ZZHU
+A358:\ZZHUP
+A359:\ZZHURX
+A35A:\ZZHUR
+A35B:\ZZHYT
+A35C:\ZZHYX
+A35D:\ZZHY
+A35E:\ZZHYP
+A35F:\ZZHYRX
+A360:\ZZHYR
+A361:\ZCHAT
+A362:\ZCHAX
+A363:\ZCHA
+A364:\ZCHAP
+A365:\ZCHUOT
+A366:\ZCHUOX
+A367:\ZCHUO
+A368:\ZCHUOP
+A369:\ZCHOT
+A36A:\ZCHOX
+A36B:\ZCHO
+A36C:\ZCHOP
+A36D:\ZCHET
+A36E:\ZCHEX
+A36F:\ZCHE
+A370:\ZCHEP
+A371:\ZCHUX
+A372:\ZCHU
+A373:\ZCHUP
+A374:\ZCHURX
+A375:\ZCHUR
+A376:\ZCHYT
+A377:\ZCHYX
+A378:\ZCHY
+A379:\ZCHYP
+A37A:\ZCHYRX
+A37B:\ZCHYR
+A37C:\ZRRAX
+A37D:\ZRRA
+A37E:\ZRRUOX
+A37F:\ZRRUO
+A380:\ZRROT
+A381:\ZRROX
+A382:\ZRRO
+A383:\ZRROP
+A384:\ZRRET
+A385:\ZRREX
+A386:\ZRRE
+A387:\ZRREP
+A388:\ZRRUT
+A389:\ZRRUX
+A38A:\ZRRU
+A38B:\ZRRUP
+A38C:\ZRRURX
+A38D:\ZRRUR
+A38E:\ZRRYT
+A38F:\ZRRYX
+A390:\ZRRY
+A391:\ZRRYP
+A392:\ZRRYRX
+A393:\ZRRYR
+A394:\ÿRAT
+A395:\ÿRAX
+A396:\ÿRA
+A397:\ÿRAP
+A398:\ÿROX
+A399:\ÿRO
+A39A:\ÿROP
+A39B:\ÿRET
+A39C:\ÿREX
+A39D:\ÿRE
+A39E:\ÿREP
+A39F:\ÿRUT
+A3A0:\ÿRUX
+A3A1:\ÿRU
+A3A2:\ÿRUP
+A3A3:\ÿRURX
+A3A4:\ÿRUR
+A3A5:\ÿRYT
+A3A6:\ÿRYX
+A3A7:\ÿRY
+A3A8:\ÿRYP
+A3A9:\ÿRYRX
+A3AA:\ÿRYR
+A3AB:\ZSHAT
+A3AC:\ZSHAX
+A3AD:\ZSHA
+A3AE:\ZSHAP
+A3AF:\ZSHUOX
+A3B0:\ZSHUO
+A3B1:\ZSHUOP
+A3B2:\ZSHOT
+A3B3:\ZSHOX
+A3B4:\ZSHO
+A3B5:\ZSHOP
+A3B6:\ZSHET
+A3B7:\ZSHEX
+A3B8:\ZSHE
+A3B9:\ZSHEP
+A3BA:\ZSHUT
+A3BB:\ZSHUX
+A3BC:\ZSHU
+A3BD:\ZSHUP
+A3BE:\ZSHURX
+A3BF:\ZSHUR
+A3C0:\ZSHYT
+A3C1:\ZSHYX
+A3C2:\ZSHY
+A3C3:\ZSHYP
+A3C4:\ZSHYRX
+A3C5:\ZSHYR
+A3C6:\ZRAT
+A3C7:\ZRAX
+A3C8:\ZRA
+A3C9:\ZRAP
+A3CA:\ZRUOX
+A3CB:\ZRUO
+A3CC:\ZRUOP
+A3CD:\ZROT
+A3CE:\ZROX
+A3CF:\ZRO
+A3D0:\ZROP
+A3D1:\ZREX
+A3D2:\ZRE
+A3D3:\ZREP
+A3D4:\ZRUT
+A3D5:\ZRUX
+A3D6:\ZRU
+A3D7:\ZRUP
+A3D8:\ZRURX
+A3D9:\ZRUR
+A3DA:\ZRYT
+A3DB:\ZRYX
+A3DC:\ZRY
+A3DD:\ZRYP
+A3DE:\ZRYRX
+A3DF:\ZRYR
+A3E0:\ZJIT
+A3E1:\ZJIX
+A3E2:\ZJI
+A3E3:\ZJIP
+A3E4:\ZJIET
+A3E5:\ZJIEX
+A3E6:\ZJIE
+A3E7:\ZJIEP
+A3E8:\ZJUOT
+A3E9:\ZJUOX
+A3EA:\ZJUO
+A3EB:\ZJUOP
+A3EC:\ZJOT
+A3ED:\ZJOX
+A3EE:\ZJO
+A3EF:\ZJOP
+A3F0:\ZJUT
+A3F1:\ZJUX
+A3F2:\ZJU
+A3F3:\ZJUP
+A3F4:\ZJURX
+A3F5:\ZJUR
+A3F6:\ZJYT
+A3F7:\ZJYX
+A3F8:\ZJY
+A3F9:\ZJYP
+A3FA:\ZJYRX
+A3FB:\ZJYR
+A3FC:\ZQIT
+A3FD:\ZQIX
+A3FE:\ZQI
+A3FF:\ZQIP
+A400:\ZQIET
+A401:\ZQIEX
+A402:\ZQIE
+A403:\ZQIEP
+A404:\ZQUOT
+A405:\ZQUOX
+A406:\ZQUO
+A407:\ZQUOP
+A408:\ZQOT
+A409:\ZQOX
+A40A:\ZQO
+A40B:\ZQOP
+A40C:\ZQUT
+A40D:\ZQUX
+A40E:\ZQU
+A40F:\ZQUP
+A410:\ZQURX
+A411:\ZQUR
+A412:\ZQYT
+A413:\ZQYX
+A414:\ZQY
+A415:\ZQYP
+A416:\ZQYRX
+A417:\ZQYR
+A418:\ZJJIT
+A419:\ZJJIX
+A41A:\ZJJI
+A41B:\ZJJIP
+A41C:\ZJJIET
+A41D:\ZJJIEX
+A41E:\ZJJIE
+A41F:\ZJJIEP
+A420:\ZJJUOX
+A421:\ZJJUO
+A422:\ZJJUOP
+A423:\ZJJOT
+A424:\ZJJOX
+A425:\ZJJO
+A426:\ZJJOP
+A427:\ZJJUT
+A428:\ZJJUX
+A429:\ZJJU
+A42A:\ZJJUP
+A42B:\ZJJURX
+A42C:\ZJJUR
+A42D:\ZJJYT
+A42E:\ZJJYX
+A42F:\ZJJY
+A430:\ZJJYP
+A431:\ÿJIT
+A432:\ÿJIX
+A433:\ÿJI
+A434:\ÿJIP
+A435:\ÿJIET
+A436:\ÿJIEX
+A437:\ÿJIE
+A438:\ÿJIEP
+A439:\ÿJUOX
+A43A:\ÿJUO
+A43B:\ÿJOT
+A43C:\ÿJOX
+A43D:\ÿJO
+A43E:\ÿJOP
+A43F:\ÿJUX
+A440:\ÿJU
+A441:\ÿJUP
+A442:\ÿJURX
+A443:\ÿJUR
+A444:\ÿJYT
+A445:\ÿJYX
+A446:\ÿJY
+A447:\ÿJYP
+A448:\ÿJYRX
+A449:\ÿJYR
+A44A:\ÿYIT
+A44B:\ÿYIX
+A44C:\ÿYI
+A44D:\ÿYIP
+A44E:\ÿYIET
+A44F:\ÿYIEX
+A450:\ÿYIE
+A451:\ÿYIEP
+A452:\ÿYUOX
+A453:\ÿYUO
+A454:\ÿYUOP
+A455:\ÿYOT
+A456:\ÿYOX
+A457:\ÿYO
+A458:\ÿYOP
+A459:\ÿYUT
+A45A:\ÿYUX
+A45B:\ÿYU
+A45C:\ÿYUP
+A45D:\ZXIT
+A45E:\ZXIX
+A45F:\ZXI
+A460:\ZXIP
+A461:\ZXIET
+A462:\ZXIEX
+A463:\ZXIE
+A464:\ZXIEP
+A465:\ZXUOX
+A466:\ZXUO
+A467:\ZXOT
+A468:\ZXOX
+A469:\ZXO
+A46A:\ZXOP
+A46B:\ZXYT
+A46C:\ZXYX
+A46D:\ZXY
+A46E:\ZXYP
+A46F:\ZXYRX
+A470:\ZXYR
+A471:\ZYIT
+A472:\ZYIX
+A473:\ZYI
+A474:\ZYIP
+A475:\ZYIET
+A476:\ZYIEX
+A477:\ZYIE
+A478:\ZYIEP
+A479:\ZYUOT
+A47A:\ZYUOX
+A47B:\ZYUO
+A47C:\ZYUOP
+A47D:\ZYOT
+A47E:\ZYOX
+A47F:\ZYO
+A480:\ZYOP
+A481:\ZYUT
+A482:\ZYUX
+A483:\ZYU
+A484:\ZYUP
+A485:\ZYURX
+A486:\ZYUR
+A487:\ZYYT
+A488:\ZYYX
+A489:\ZYY
+A48A:\ZYYP
+A48B:\ZYYRX
+A48C:\ZYYR
+A490:YI\vQOT
+A491:YI\vLI
+A492:YI\vKIT
+A493:YI\vNYIP
+A494:YI\vCYP
+A495:YI\vSSI
+A496:YI\vGGOP
+A497:YI\vGEP
+A498:YI\vMI
+A499:YI\vHXIT
+A49A:YI\vLYR
+A49B:YI\vBBUT
+A49C:YI\vMOP
+A49D:YI\vYO
+A49E:YI\vPUT
+A49F:YI\vHXUO
+A4A0:YI\vTAT
+A4A1:YI\vGA
+A4A2:YI\vZUP
+A4A3:YI\vCYT
+A4A4:YI\vDDUR
+A4A5:YI\vBUR
+A4A6:YI\vGGUO
+A4A7:YI\vNYOP
+A4A8:YI\vTU
+A4A9:YI\vOP
+A4AA:YI\vJJUT
+A4AB:YI\vZOT
+A4AC:YI\vPYT
+A4AD:YI\vHMO
+A4AE:YI\vYIT
+A4AF:YI\vVUR
+A4B0:YI\vSHY
+A4B1:YI\vVEP
+A4B2:YI\vZA
+A4B3:YI\vJO
+A4B4:YI\vNZUP
+A4B5:YI\vJJY
+A4B6:YI\vGOT
+A4B7:YI\vJJIE
+A4B8:YI\vWO
+A4B9:YI\vDU
+A4BA:YI\vSHUR
+A4BB:YI\vLIE
+A4BC:YI\vCY
+A4BD:YI\vCUOP
+A4BE:YI\vCIP
+A4BF:YI\vHXOP
+A4C0:YI\vSHAT
+A4C1:YI\vZUR
+A4C2:YI\vSHOP
+A4C3:YI\vCHE
+A4C4:YI\vZZIET
+A4C5:YI\vNBIE
+A4C6:YI\vKE
+AC00-D7A3:<Hangul Syllable>
+D800-DB7F:<Non Private Use High Surrogate>
+DB80-DBFF:<Private Use High Surrogate>
+DC00-DFFF:<Low Surrogate>
+E000-F8FF:<Private Use>
+F900:\ 00
+F901:\ 01
+F902:\ 02
+F903:\ 03
+F904:\ 04
+F905:\ 05
+F906:\ 06
+F907:\ 07
+F908:\ 08
+F909:\ 09
+F90A:\ 0A
+F90B:\ 0B
+F90C:\ 0C
+F90D:\ 0D
+F90E:\ 0E
+F90F:\ 0F
+F910:\ 10
+F911:\ 11
+F912:\ 12
+F913:\ 13
+F914:\ 14
+F915:\ 15
+F916:\ 16
+F917:\ 17
+F918:\ 18
+F919:\ 19
+F91A:\ 1A
+F91B:\ 1B
+F91C:\ 1C
+F91D:\ 1D
+F91E:\ 1E
+F91F:\ 1F
+F920:\ 20
+F921:\ 21
+F922:\ 22
+F923:\ 23
+F924:\ 24
+F925:\ 25
+F926:\ 26
+F927:\ 27
+F928:\ 28
+F929:\ 29
+F92A:\ 2A
+F92B:\ 2B
+F92C:\ 2C
+F92D:\ 2D
+F92E:\ 2E
+F92F:\ 2F
+F930:\ 30
+F931:\ 31
+F932:\ 32
+F933:\ 33
+F934:\ 34
+F935:\ 35
+F936:\ 36
+F937:\ 37
+F938:\ 38
+F939:\ 39
+F93A:\ 3A
+F93B:\ 3B
+F93C:\ 3C
+F93D:\ 3D
+F93E:\ 3E
+F93F:\ 3F
+F940:\ 40
+F941:\ 41
+F942:\ 42
+F943:\ 43
+F944:\ 44
+F945:\ 45
+F946:\ 46
+F947:\ 47
+F948:\ 48
+F949:\ 49
+F94A:\ 4A
+F94B:\ 4B
+F94C:\ 4C
+F94D:\ 4D
+F94E:\ 4E
+F94F:\ 4F
+F950:\ 50
+F951:\ 51
+F952:\ 52
+F953:\ 53
+F954:\ 54
+F955:\ 55
+F956:\ 56
+F957:\ 57
+F958:\ 58
+F959:\ 59
+F95A:\ 5A
+F95B:\ 5B
+F95C:\ 5C
+F95D:\ 5D
+F95E:\ 5E
+F95F:\ 5F
+F960:\ 60
+F961:\ 61
+F962:\ 62
+F963:\ 63
+F964:\ 64
+F965:\ 65
+F966:\ 66
+F967:\ 67
+F968:\ 68
+F969:\ 69
+F96A:\ 6A
+F96B:\ 6B
+F96C:\ 6C
+F96D:\ 6D
+F96E:\ 6E
+F96F:\ 6F
+F970:\ 70
+F971:\ 71
+F972:\ 72
+F973:\ 73
+F974:\ 74
+F975:\ 75
+F976:\ 76
+F977:\ 77
+F978:\ 78
+F979:\ 79
+F97A:\ 7A
+F97B:\ 7B
+F97C:\ 7C
+F97D:\ 7D
+F97E:\ 7E
+F97F:\ 7F
+F980:\ 80
+F981:\ 81
+F982:\ 82
+F983:\ 83
+F984:\ 84
+F985:\ 85
+F986:\ 86
+F987:\ 87
+F988:\ 88
+F989:\ 89
+F98A:\ 8A
+F98B:\ 8B
+F98C:\ 8C
+F98D:\ 8D
+F98E:\ 8E
+F98F:\ 8F
+F990:\ 90
+F991:\ 91
+F992:\ 92
+F993:\ 93
+F994:\ 94
+F995:\ 95
+F996:\ 96
+F997:\ 97
+F998:\ 98
+F999:\ 99
+F99A:\ 9A
+F99B:\ 9B
+F99C:\ 9C
+F99D:\ 9D
+F99E:\ 9E
+F99F:\ 9F
+F9A0:\ A0
+F9A1:\ A1
+F9A2:\ A2
+F9A3:\ A3
+F9A4:\ A4
+F9A5:\ A5
+F9A6:\ A6
+F9A7:\ A7
+F9A8:\ A8
+F9A9:\ A9
+F9AA:\ AA
+F9AB:\ AB
+F9AC:\ AC
+F9AD:\ AD
+F9AE:\ AE
+F9AF:\ AF
+F9B0:\ B0
+F9B1:\ B1
+F9B2:\ B2
+F9B3:\ B3
+F9B4:\ B4
+F9B5:\ B5
+F9B6:\ B6
+F9B7:\ B7
+F9B8:\ B8
+F9B9:\ B9
+F9BA:\ BA
+F9BB:\ BB
+F9BC:\ BC
+F9BD:\ BD
+F9BE:\ BE
+F9BF:\ BF
+F9C0:\ C0
+F9C1:\ C1
+F9C2:\ C2
+F9C3:\ C3
+F9C4:\ C4
+F9C5:\ C5
+F9C6:\ C6
+F9C7:\ C7
+F9C8:\ C8
+F9C9:\ C9
+F9CA:\ CA
+F9CB:\ CB
+F9CC:\ CC
+F9CD:\ CD
+F9CE:\ CE
+F9CF:\ CF
+F9D0:\ D0
+F9D1:\ D1
+F9D2:\ D2
+F9D3:\ D3
+F9D4:\ D4
+F9D5:\ D5
+F9D6:\ D6
+F9D7:\ D7
+F9D8:\ D8
+F9D9:\ D9
+F9DA:\ DA
+F9DB:\ DB
+F9DC:\ DC
+F9DD:\ DD
+F9DE:\ DE
+F9DF:\ DF
+F9E0:\ E0
+F9E1:\ E1
+F9E2:\ E2
+F9E3:\ E3
+F9E4:\ E4
+F9E5:\ E5
+F9E6:\ E6
+F9E7:\ E7
+F9E8:\ E8
+F9E9:\ E9
+F9EA:\ EA
+F9EB:\ EB
+F9EC:\ EC
+F9ED:\ ED
+F9EE:\ EE
+F9EF:\ EF
+F9F0:\ F0
+F9F1:\ F1
+F9F2:\ F2
+F9F3:\ F3
+F9F4:\ F4
+F9F5:\ F5
+F9F6:\ F6
+F9F7:\ F7
+F9F8:\ F8
+F9F9:\ F9
+F9FA:\ FA
+F9FB:\ FB
+F9FC:\ FC
+F9FD:\ FD
+F9FE:\ FE
+F9FF:\ FF
+FA00:\õ00
+FA01:\õ01
+FA02:\õ02
+FA03:\õ03
+FA04:\õ04
+FA05:\õ05
+FA06:\õ06
+FA07:\õ07
+FA08:\õ08
+FA09:\õ09
+FA0A:\õ0A
+FA0B:\õ0B
+FA0C:\õ0C
+FA0D:\õ0D
+FA0E:\õ0E
+FA0F:\õ0F
+FA10:\õ10
+FA11:\õ11
+FA12:\õ12
+FA13:\õ13
+FA14:\õ14
+FA15:\õ15
+FA16:\õ16
+FA17:\õ17
+FA18:\õ18
+FA19:\õ19
+FA1A:\õ1A
+FA1B:\õ1B
+FA1C:\õ1C
+FA1D:\õ1D
+FA1E:\õ1E
+FA1F:\õ1F
+FA20:\õ20
+FA21:\õ21
+FA22:\õ22
+FA23:\õ23
+FA24:\õ24
+FA25:\õ25
+FA26:\õ26
+FA27:\õ27
+FA28:\õ28
+FA29:\õ29
+FA2A:\õ2A
+FA2B:\õ2B
+FA2C:\õ2C
+FA2D:\õ2D
+FA30:\õ30
+FA31:\õ31
+FA32:\õ32
+FA33:\õ33
+FA34:\õ34
+FA35:\õ35
+FA36:\õ36
+FA37:\õ37
+FA38:\õ38
+FA39:\õ39
+FA3A:\õ3A
+FA3B:\õ3B
+FA3C:\õ3C
+FA3D:\õ3D
+FA3E:\õ3E
+FA3F:\õ3F
+FA40:\õ40
+FA41:\õ41
+FA42:\õ42
+FA43:\õ43
+FA44:\õ44
+FA45:\õ45
+FA46:\õ46
+FA47:\õ47
+FA48:\õ48
+FA49:\õ49
+FA4A:\õ4A
+FA4B:\õ4B
+FA4C:\õ4C
+FA4D:\õ4D
+FA4E:\õ4E
+FA4F:\õ4F
+FA50:\õ50
+FA51:\õ51
+FA52:\õ52
+FA53:\õ53
+FA54:\õ54
+FA55:\õ55
+FA56:\õ56
+FA57:\õ57
+FA58:\õ58
+FA59:\õ59
+FA5A:\õ5A
+FA5B:\õ5B
+FA5C:\õ5C
+FA5D:\õ5D
+FA5E:\õ5E
+FA5F:\õ5F
+FA60:\õ60
+FA61:\õ61
+FA62:\õ62
+FA63:\õ63
+FA64:\õ64
+FA65:\õ65
+FA66:\õ66
+FA67:\õ67
+FA68:\õ68
+FA69:\õ69
+FA6A:\õ6A
+FB00:LATIN\Ç\òFF
+FB01:LATIN\Ç\òFI
+FB02:LATIN\Ç\òFL
+FB03:LATIN\Ç\òFFI
+FB04:LATIN\Ç\òFFL
+FB05:LATIN\Ç\òLONG S T
+FB06:LATIN\Ç\òST
+FB13:ARMENIAN\Ç\òMEN NOW
+FB14:ARMENIAN\Ç\òMEN ECH
+FB15:ARMENIAN\Ç\òMEN INI
+FB16:ARMENIAN\Ç\òVEW NOW
+FB17:ARMENIAN\Ç\òMEN XEH
+FB1D:\Ÿ\@YOD\HHIRIQ
+FB1E:\Ÿ POINT JUDEO-SPANISH VARIKA
+FB1F:\Ÿ \òYIDDISH YOD YOD PATAH
+FB20:\Ÿ\@ALTERNATIVE AYIN
+FB21:\Ÿ\@WIDE ALEF
+FB22:\Ÿ\@WIDE DALET
+FB23:\Ÿ\@WIDE HE
+FB24:\Ÿ\@WIDE KAF
+FB25:\Ÿ\@WIDE LAMED
+FB26:\Ÿ\@WIDE FINAL MEM
+FB27:\Ÿ\@WIDE RESH
+FB28:\Ÿ\@WIDE TAV
+FB29:\Ÿ\@ALTERNATIVE PLUS\‚
+FB2A:\Ÿ\@SHIN\HSHIN DOT
+FB2B:\Ÿ\@SHIN\HSIN DOT
+FB2C:\Ÿ\@SHIN\HDAGESH\iSHIN DOT
+FB2D:\Ÿ\@SHIN\HDAGESH\iSIN DOT
+FB2E:\Ÿ\@ALEF\HPATAH
+FB2F:\Ÿ\@ALEF\HQAMATS
+FB30:\Ÿ\@ALEF\HMAPIQ
+FB31:\Ÿ\@BET\HDAGESH
+FB32:\Ÿ\@GIMEL\HDAGESH
+FB33:\Ÿ\@DALET\HDAGESH
+FB34:\Ÿ\@HE\HMAPIQ
+FB35:\Ÿ\@VAV\HDAGESH
+FB36:\Ÿ\@ZAYIN\HDAGESH
+FB38:\Ÿ\@TET\HDAGESH
+FB39:\Ÿ\@YOD\HDAGESH
+FB3A:\Ÿ\@FINAL KAF\HDAGESH
+FB3B:\Ÿ\@KAF\HDAGESH
+FB3C:\Ÿ\@LAMED\HDAGESH
+FB3E:\Ÿ\@MEM\HDAGESH
+FB40:\Ÿ\@NUN\HDAGESH
+FB41:\Ÿ\@SAMEKH\HDAGESH
+FB43:\Ÿ\@FINAL PE\HDAGESH
+FB44:\Ÿ\@PE\HDAGESH
+FB46:\Ÿ\@TSADI\HDAGESH
+FB47:\Ÿ\@QOF\HDAGESH
+FB48:\Ÿ\@RESH\HDAGESH
+FB49:\Ÿ\@SHIN\HDAGESH
+FB4A:\Ÿ\@TAV\HDAGESH
+FB4B:\Ÿ\@VAV\HHOLAM
+FB4C:\Ÿ\@BET\HRAFE
+FB4D:\Ÿ\@KAF\HRAFE
+FB4E:\Ÿ\@PE\HRAFE
+FB4F:\Ÿ \òALEF LAMED
+FB50:\^ALEF WASLA\Q
+FB51:\^ALEF WASLA\6
+FB52:\^BEEH\Q
+FB53:\^BEEH\6
+FB54:\^BEEH\2
+FB55:\^BEEH MEDI\X
+FB56:\^PEH\Q
+FB57:\^PEH\6
+FB58:\^PEH\2
+FB59:\^PEH MEDI\X
+FB5A:\^BEHEH\Q
+FB5B:\^BEHEH\6
+FB5C:\^BEHEH\2
+FB5D:\^BEHEH MEDI\X
+FB5E:\^TTEHEH\Q
+FB5F:\^TTEHEH\6
+FB60:\^TTEHEH\2
+FB61:\^TTEHEH MEDI\X
+FB62:\^TEHEH\Q
+FB63:\^TEHEH\6
+FB64:\^TEHEH\2
+FB65:\^TEHEH MEDI\X
+FB66:\^TTEH\Q
+FB67:\^TTEH\6
+FB68:\^TTEH\2
+FB69:\^TTEH MEDI\X
+FB6A:\^VEH\Q
+FB6B:\^VEH\6
+FB6C:\^VEH\2
+FB6D:\^VEH MEDI\X
+FB6E:\^PEHEH\Q
+FB6F:\^PEHEH\6
+FB70:\^PEHEH\2
+FB71:\^PEHEH MEDI\X
+FB72:\^DYEH\Q
+FB73:\^DYEH\6
+FB74:\^DYEH\2
+FB75:\^DYEH MEDI\X
+FB76:\^NYEH\Q
+FB77:\^NYEH\6
+FB78:\^NYEH\2
+FB79:\^NYEH MEDI\X
+FB7A:\^TCHEH\Q
+FB7B:\^TCHEH\6
+FB7C:\^TCHEH\2
+FB7D:\^TCHEH MEDI\X
+FB7E:\^TCHEHEH\Q
+FB7F:\^TCHEHEH\6
+FB80:\^TCHEHEH\2
+FB81:\^TCHEHEH MEDI\X
+FB82:\^DDAHAL\Q
+FB83:\^DDAHAL\6
+FB84:\^DAHAL\Q
+FB85:\^DAHAL\6
+FB86:\^DUL\Q
+FB87:\^DUL\6
+FB88:\^DDAL\Q
+FB89:\^DDAL\6
+FB8A:\^JEH\Q
+FB8B:\^JEH\6
+FB8C:\^RREH\Q
+FB8D:\^RREH\6
+FB8E:\^KEHEH\Q
+FB8F:\^KEHEH\6
+FB90:\^KEHEH\2
+FB91:\^KEHEH MEDI\X
+FB92:\^GAF\Q
+FB93:\^GAF\6
+FB94:\^GAF\2
+FB95:\^GAF MEDI\X
+FB96:\^GUEH\Q
+FB97:\^GUEH\6
+FB98:\^GUEH\2
+FB99:\^GUEH MEDI\X
+FB9A:\^NGOEH\Q
+FB9B:\^NGOEH\6
+FB9C:\^NGOEH\2
+FB9D:\^NGOEH MEDI\X
+FB9E:\^NOON GHUNNA\Q
+FB9F:\^NOON GHUNNA\6
+FBA0:\^RNOON\Q
+FBA1:\^RNOON\6
+FBA2:\^RNOON\2
+FBA3:\^RNOON MEDI\X
+FBA4:\^HEH\HYEH\p\Q
+FBA5:\^HEH\HYEH\p\6
+FBA6:\^HEH GOAL\Q
+FBA7:\^HEH GOAL\6
+FBA8:\^HEH GOAL\2
+FBA9:\^HEH GOAL MEDI\X
+FBAA:\^HEH DOACHASHMEE\Q
+FBAB:\^HEH DOACHASHMEE\6
+FBAC:\^HEH DOACHASHMEE\2
+FBAD:\^HEH DOACHASHMEE MEDI\X
+FBAE:\^YEH\ìREE\Q
+FBAF:\^YEH\ìREE\6
+FBB0:\^YEH\ìREE\HHAMZA\p\Q
+FBB1:\^YEH\ìREE\HHAMZA\p\6
+FBD3:\^NG\Q
+FBD4:\^NG\6
+FBD5:\^NG\2
+FBD6:\^NG MEDI\X
+FBD7:\^U\Q
+FBD8:\^U\6
+FBD9:\^OE\Q
+FBDA:\^OE\6
+FBDB:\^YU\Q
+FBDC:\^YU\6
+FBDD:\^U\HHAMZA\p\Q
+FBDE:\^VE\Q
+FBDF:\^VE\6
+FBE0:\^KIRGHIZ OE\Q
+FBE1:\^KIRGHIZ OE\6
+FBE2:\^KIRGHIZ YU\Q
+FBE3:\^KIRGHIZ YU\6
+FBE4:\^E\Q
+FBE5:\^E\6
+FBE6:\^E\2
+FBE7:\^E MEDI\X
+FBE8:\^UIGHUR KAZAKH KIRGHIZ ALEF MAKSURA\2
+FBE9:\^UIGHUR KAZAKH KIRGHIZ ALEF MAKSURA MEDI\X
+FBEA:\J\º\HALEF\Q
+FBEB:\J\º\HALEF\6
+FBEC:\J\º\HAE\Q
+FBED:\J\º\HAE\6
+FBEE:\J\º\HWAW\Q
+FBEF:\J\º\HWAW\6
+FBF0:\J\º\HU\Q
+FBF1:\J\º\HU\6
+FBF2:\J\º\HOE\Q
+FBF3:\J\º\HOE\6
+FBF4:\J\º\HYU\Q
+FBF5:\J\º\HYU\6
+FBF6:\J\º\HE\Q
+FBF7:\J\º\HE\6
+FBF8:\J\º\HE\2
+FBF9:\JUIGHUR KIRGHIZ \º\‡\Q
+FBFA:\JUIGHUR KIRGHIZ \º\‡\6
+FBFB:\JUIGHUR KIRGHIZ \º\‡\2
+FBFC:\^FARSI YEH\Q
+FBFD:\^FARSI YEH\6
+FBFE:\^FARSI YEH\2
+FBFF:\^FARSI YEH MEDI\X
+FC00:\J\º\Ô\Q
+FC01:\J\º\HHAH\Q
+FC02:\J\º\\Q
+FC03:\J\º\‡\Q
+FC04:\J\º\HYEH\Q
+FC05:\JBEH\Ô\Q
+FC06:\JBEH\HHAH\Q
+FC07:\JBEH\HKHAH\Q
+FC08:\JBEH\\Q
+FC09:\JBEH\‡\Q
+FC0A:\JBEH\HYEH\Q
+FC0B:\JTEH\Ô\Q
+FC0C:\JTEH\HHAH\Q
+FC0D:\JTEH\HKHAH\Q
+FC0E:\JTEH\\Q
+FC0F:\JTEH\‡\Q
+FC10:\JTEH\HYEH\Q
+FC11:\JTHEH\Ô\Q
+FC12:\JTHEH\\Q
+FC13:\JTHEH\‡\Q
+FC14:\JTHEH\HYEH\Q
+FC15:\JJEEM\HHAH\Q
+FC16:\JJEEM\\Q
+FC17:\JHAH\Ô\Q
+FC18:\JHAH\\Q
+FC19:\JKHAH\Ô\Q
+FC1A:\JKHAH\HHAH\Q
+FC1B:\JKHAH\\Q
+FC1C:\JSEEN\Ô\Q
+FC1D:\JSEEN\HHAH\Q
+FC1E:\JSEEN\HKHAH\Q
+FC1F:\JSEEN\\Q
+FC20:\JSAD\HHAH\Q
+FC21:\JSAD\\Q
+FC22:\JDAD\Ô\Q
+FC23:\JDAD\HHAH\Q
+FC24:\JDAD\HKHAH\Q
+FC25:\JDAD\\Q
+FC26:\JTAH\HHAH\Q
+FC27:\JTAH\\Q
+FC28:\JZAH\\Q
+FC29:\JAIN\Ô\Q
+FC2A:\JAIN\\Q
+FC2B:\JGHAIN\Ô\Q
+FC2C:\JGHAIN\\Q
+FC2D:\JFEH\Ô\Q
+FC2E:\JFEH\HHAH\Q
+FC2F:\JFEH\HKHAH\Q
+FC30:\JFEH\\Q
+FC31:\JFEH\‡\Q
+FC32:\JFEH\HYEH\Q
+FC33:\JQAF\HHAH\Q
+FC34:\JQAF\\Q
+FC35:\JQAF\‡\Q
+FC36:\JQAF\HYEH\Q
+FC37:\JKAF\HALEF\Q
+FC38:\JKAF\Ô\Q
+FC39:\JKAF\HHAH\Q
+FC3A:\JKAF\HKHAH\Q
+FC3B:\JKAF\HLAM\Q
+FC3C:\JKAF\\Q
+FC3D:\JKAF\‡\Q
+FC3E:\JKAF\HYEH\Q
+FC3F:\JLAM\Ô\Q
+FC40:\JLAM\HHAH\Q
+FC41:\JLAM\HKHAH\Q
+FC42:\JLAM\\Q
+FC43:\JLAM\‡\Q
+FC44:\JLAM\HYEH\Q
+FC45:\JMEEM\Ô\Q
+FC46:\JMEEM\HHAH\Q
+FC47:\JMEEM\HKHAH\Q
+FC48:\JMEEM\\Q
+FC49:\JMEEM\‡\Q
+FC4A:\JMEEM\HYEH\Q
+FC4B:\JNOON\Ô\Q
+FC4C:\JNOON\HHAH\Q
+FC4D:\JNOON\HKHAH\Q
+FC4E:\JNOON\\Q
+FC4F:\JNOON\‡\Q
+FC50:\JNOON\HYEH\Q
+FC51:\JHEH\Ô\Q
+FC52:\JHEH\\Q
+FC53:\JHEH\‡\Q
+FC54:\JHEH\HYEH\Q
+FC55:\JYEH\Ô\Q
+FC56:\JYEH\HHAH\Q
+FC57:\JYEH\HKHAH\Q
+FC58:\JYEH\\Q
+FC59:\JYEH\‡\Q
+FC5A:\JYEH\HYEH\Q
+FC5B:\JTHAL\HSUPER\Ž ALEF\Q
+FC5C:\JREH\HSUPER\Ž ALEF\Q
+FC5D:\JALEF MAKSURA\HSUPER\Ž ALEF\Q
+FC5E:\JSHADDA\HDAMMATAN\Q
+FC5F:\JSHADDA\HKASRATAN\Q
+FC60:\JSHADDA\HFATHA\Q
+FC61:\JSHADDA\HDAMMA\Q
+FC62:\JSHADDA\HKASRA\Q
+FC63:\JSHADDA\HSUPER\Ž ALEF\Q
+FC64:\J\º\HREH\6
+FC65:\J\º\HZAIN\6
+FC66:\J\º\\6
+FC67:\J\º\HNOON\6
+FC68:\J\º\‡\6
+FC69:\J\º\Û
+FC6A:\JBEH\HREH\6
+FC6B:\JBEH\HZAIN\6
+FC6C:\JBEH\\6
+FC6D:\JBEH\HNOON\6
+FC6E:\JBEH\‡\6
+FC6F:\JBEH\Û
+FC70:\JTEH\HREH\6
+FC71:\JTEH\HZAIN\6
+FC72:\JTEH\\6
+FC73:\JTEH\HNOON\6
+FC74:\JTEH\‡\6
+FC75:\JTEH\Û
+FC76:\JTHEH\HREH\6
+FC77:\JTHEH\HZAIN\6
+FC78:\JTHEH\\6
+FC79:\JTHEH\HNOON\6
+FC7A:\JTHEH\‡\6
+FC7B:\JTHEH\Û
+FC7C:\JFEH\‡\6
+FC7D:\JFEH\Û
+FC7E:\JQAF\‡\6
+FC7F:\JQAF\Û
+FC80:\JKAF\HALEF\6
+FC81:\JKAF\HLAM\6
+FC82:\JKAF\\6
+FC83:\JKAF\‡\6
+FC84:\JKAF\Û
+FC85:\JLAM\\6
+FC86:\JLAM\‡\6
+FC87:\JLAM\Û
+FC88:\JMEEM\HALEF\6
+FC89:\JMEEM\\6
+FC8A:\JNOON\HREH\6
+FC8B:\JNOON\HZAIN\6
+FC8C:\JNOON\\6
+FC8D:\JNOON\HNOON\6
+FC8E:\JNOON\‡\6
+FC8F:\JNOON\Û
+FC90:\JALEF MAKSURA\HSUPER\Ž ALEF\6
+FC91:\JYEH\HREH\6
+FC92:\JYEH\HZAIN\6
+FC93:\JYEH\\6
+FC94:\JYEH\HNOON\6
+FC95:\JYEH\‡\6
+FC96:\JYEH\Û
+FC97:\J\º\Ô\2
+FC98:\J\º\HHAH\2
+FC99:\J\º\HKHAH\2
+FC9A:\J\º\\2
+FC9B:\J\º\HHEH\2
+FC9C:\JBEH\Ô\2
+FC9D:\JBEH\HHAH\2
+FC9E:\JBEH\HKHAH\2
+FC9F:\JBEH\\2
+FCA0:\JBEH\HHEH\2
+FCA1:\JTEH\Ô\2
+FCA2:\JTEH\HHAH\2
+FCA3:\JTEH\HKHAH\2
+FCA4:\JTEH\\2
+FCA5:\JTEH\HHEH\2
+FCA6:\JTHEH\\2
+FCA7:\JJEEM\HHAH\2
+FCA8:\JJEEM\\2
+FCA9:\JHAH\Ô\2
+FCAA:\JHAH\\2
+FCAB:\JKHAH\Ô\2
+FCAC:\JKHAH\\2
+FCAD:\JSEEN\Ô\2
+FCAE:\JSEEN\HHAH\2
+FCAF:\JSEEN\HKHAH\2
+FCB0:\JSEEN\\2
+FCB1:\JSAD\HHAH\2
+FCB2:\JSAD\HKHAH\2
+FCB3:\JSAD\\2
+FCB4:\JDAD\Ô\2
+FCB5:\JDAD\HHAH\2
+FCB6:\JDAD\HKHAH\2
+FCB7:\JDAD\\2
+FCB8:\JTAH\HHAH\2
+FCB9:\JZAH\\2
+FCBA:\JAIN\Ô\2
+FCBB:\JAIN\\2
+FCBC:\JGHAIN\Ô\2
+FCBD:\JGHAIN\\2
+FCBE:\JFEH\Ô\2
+FCBF:\JFEH\HHAH\2
+FCC0:\JFEH\HKHAH\2
+FCC1:\JFEH\\2
+FCC2:\JQAF\HHAH\2
+FCC3:\JQAF\\2
+FCC4:\JKAF\Ô\2
+FCC5:\JKAF\HHAH\2
+FCC6:\JKAF\HKHAH\2
+FCC7:\JKAF\HLAM\2
+FCC8:\JKAF\\2
+FCC9:\JLAM\Ô\2
+FCCA:\JLAM\HHAH\2
+FCCB:\JLAM\HKHAH\2
+FCCC:\JLAM\\2
+FCCD:\JLAM\HHEH\2
+FCCE:\JMEEM\Ô\2
+FCCF:\JMEEM\HHAH\2
+FCD0:\JMEEM\HKHAH\2
+FCD1:\JMEEM\\2
+FCD2:\JNOON\Ô\2
+FCD3:\JNOON\HHAH\2
+FCD4:\JNOON\HKHAH\2
+FCD5:\JNOON\\2
+FCD6:\JNOON\HHEH\2
+FCD7:\JHEH\Ô\2
+FCD8:\JHEH\\2
+FCD9:\JHEH\HSUPER\Ž ALEF\2
+FCDA:\JYEH\Ô\2
+FCDB:\JYEH\HHAH\2
+FCDC:\JYEH\HKHAH\2
+FCDD:\JYEH\\2
+FCDE:\JYEH\HHEH\2
+FCDF:\J\º\ MEDI\X
+FCE0:\J\º\HHEH MEDI\X
+FCE1:\JBEH\ MEDI\X
+FCE2:\JBEH\HHEH MEDI\X
+FCE3:\JTEH\ MEDI\X
+FCE4:\JTEH\HHEH MEDI\X
+FCE5:\JTHEH\ MEDI\X
+FCE6:\JTHEH\HHEH MEDI\X
+FCE7:\JSEEN\ MEDI\X
+FCE8:\JSEEN\HHEH MEDI\X
+FCE9:\JSHEEN\ MEDI\X
+FCEA:\JSHEEN\HHEH MEDI\X
+FCEB:\JKAF\HLAM MEDI\X
+FCEC:\JKAF\ MEDI\X
+FCED:\JLAM\ MEDI\X
+FCEE:\JNOON\ MEDI\X
+FCEF:\JNOON\HHEH MEDI\X
+FCF0:\JYEH\ MEDI\X
+FCF1:\JYEH\HHEH MEDI\X
+FCF2:\JSHADDA\HFATHA MEDI\X
+FCF3:\JSHADDA\HDAMMA MEDI\X
+FCF4:\JSHADDA\HKASRA MEDI\X
+FCF5:\JTAH\‡\Q
+FCF6:\JTAH\HYEH\Q
+FCF7:\JAIN\‡\Q
+FCF8:\JAIN\HYEH\Q
+FCF9:\JGHAIN\‡\Q
+FCFA:\JGHAIN\HYEH\Q
+FCFB:\JSEEN\‡\Q
+FCFC:\JSEEN\HYEH\Q
+FCFD:\JSHEEN\‡\Q
+FCFE:\JSHEEN\HYEH\Q
+FCFF:\JHAH\‡\Q
+FD00:\JHAH\HYEH\Q
+FD01:\JJEEM\‡\Q
+FD02:\JJEEM\HYEH\Q
+FD03:\JKHAH\‡\Q
+FD04:\JKHAH\HYEH\Q
+FD05:\JSAD\‡\Q
+FD06:\JSAD\HYEH\Q
+FD07:\JDAD\‡\Q
+FD08:\JDAD\HYEH\Q
+FD09:\JSHEEN\Ô\Q
+FD0A:\JSHEEN\HHAH\Q
+FD0B:\JSHEEN\HKHAH\Q
+FD0C:\JSHEEN\\Q
+FD0D:\JSHEEN\HREH\Q
+FD0E:\JSEEN\HREH\Q
+FD0F:\JSAD\HREH\Q
+FD10:\JDAD\HREH\Q
+FD11:\JTAH\‡\6
+FD12:\JTAH\Û
+FD13:\JAIN\‡\6
+FD14:\JAIN\Û
+FD15:\JGHAIN\‡\6
+FD16:\JGHAIN\Û
+FD17:\JSEEN\‡\6
+FD18:\JSEEN\Û
+FD19:\JSHEEN\‡\6
+FD1A:\JSHEEN\Û
+FD1B:\JHAH\‡\6
+FD1C:\JHAH\Û
+FD1D:\JJEEM\‡\6
+FD1E:\JJEEM\Û
+FD1F:\JKHAH\‡\6
+FD20:\JKHAH\Û
+FD21:\JSAD\‡\6
+FD22:\JSAD\Û
+FD23:\JDAD\‡\6
+FD24:\JDAD\Û
+FD25:\JSHEEN\Ô\6
+FD26:\JSHEEN\HHAH\6
+FD27:\JSHEEN\HKHAH\6
+FD28:\JSHEEN\\6
+FD29:\JSHEEN\HREH\6
+FD2A:\JSEEN\HREH\6
+FD2B:\JSAD\HREH\6
+FD2C:\JDAD\HREH\6
+FD2D:\JSHEEN\Ô\2
+FD2E:\JSHEEN\HHAH\2
+FD2F:\JSHEEN\HKHAH\2
+FD30:\JSHEEN\\2
+FD31:\JSEEN\HHEH\2
+FD32:\JSHEEN\HHEH\2
+FD33:\JTAH\\2
+FD34:\JSEEN\Ô MEDI\X
+FD35:\JSEEN\HHAH MEDI\X
+FD36:\JSEEN\HKHAH MEDI\X
+FD37:\JSHEEN\Ô MEDI\X
+FD38:\JSHEEN\HHAH MEDI\X
+FD39:\JSHEEN\HKHAH MEDI\X
+FD3A:\JTAH\ MEDI\X
+FD3B:\JZAH\ MEDI\X
+FD3C:\JALEF\HFATHATAN\6
+FD3D:\JALEF\HFATHATAN\Q
+FD3E:ORNATE \‰ \ÑS
+FD3F:ORNATE \ù\ÑS
+FD50:\JTEH\Ô\\2
+FD51:\JTEH\HHAH\Ô\6
+FD52:\JTEH\HHAH\Ô\2
+FD53:\JTEH\HHAH\\2
+FD54:\JTEH\HKHAH\\2
+FD55:\JTEH\\Ô\2
+FD56:\JTEH\\HHAH\2
+FD57:\JTEH\\HKHAH\2
+FD58:\JJEEM\\HHAH\6
+FD59:\JJEEM\\HHAH\2
+FD5A:\JHAH\\Û
+FD5B:\JHAH\\‡\6
+FD5C:\JSEEN\HHAH\Ô\2
+FD5D:\JSEEN\Ô\HHAH\2
+FD5E:\JSEEN\Ô\‡\6
+FD5F:\JSEEN\\HHAH\6
+FD60:\JSEEN\\HHAH\2
+FD61:\JSEEN\\Ô\2
+FD62:\JSEEN\\\6
+FD63:\JSEEN\\\2
+FD64:\JSAD\HHAH\HHAH\6
+FD65:\JSAD\HHAH\HHAH\2
+FD66:\JSAD\\\6
+FD67:\JSHEEN\HHAH\\6
+FD68:\JSHEEN\HHAH\\2
+FD69:\JSHEEN\Ô\Û
+FD6A:\JSHEEN\\HKHAH\6
+FD6B:\JSHEEN\\HKHAH\2
+FD6C:\JSHEEN\\\6
+FD6D:\JSHEEN\\\2
+FD6E:\JDAD\HHAH\‡\6
+FD6F:\JDAD\HKHAH\\6
+FD70:\JDAD\HKHAH\\2
+FD71:\JTAH\\HHAH\6
+FD72:\JTAH\\HHAH\2
+FD73:\JTAH\\\2
+FD74:\JTAH\\Û
+FD75:\JAIN\Ô\\6
+FD76:\JAIN\\\6
+FD77:\JAIN\\\2
+FD78:\JAIN\\‡\6
+FD79:\JGHAIN\\\6
+FD7A:\JGHAIN\\Û
+FD7B:\JGHAIN\\‡\6
+FD7C:\JFEH\HKHAH\\6
+FD7D:\JFEH\HKHAH\\2
+FD7E:\JQAF\\HHAH\6
+FD7F:\JQAF\\\6
+FD80:\JLAM\HHAH\\6
+FD81:\JLAM\HHAH\Û
+FD82:\JLAM\HHAH\‡\6
+FD83:\JLAM\Ô\Ô\2
+FD84:\JLAM\Ô\Ô\6
+FD85:\JLAM\HKHAH\\6
+FD86:\JLAM\HKHAH\\2
+FD87:\JLAM\\HHAH\6
+FD88:\JLAM\\HHAH\2
+FD89:\JMEEM\HHAH\Ô\2
+FD8A:\JMEEM\HHAH\\2
+FD8B:\JMEEM\HHAH\Û
+FD8C:\JMEEM\Ô\HHAH\2
+FD8D:\JMEEM\Ô\\2
+FD8E:\JMEEM\HKHAH\Ô\2
+FD8F:\JMEEM\HKHAH\\2
+FD92:\JMEEM\Ô\HKHAH\2
+FD93:\JHEH\\Ô\2
+FD94:\JHEH\\\2
+FD95:\JNOON\HHAH\\2
+FD96:\JNOON\HHAH\‡\6
+FD97:\JNOON\Ô\\6
+FD98:\JNOON\Ô\\2
+FD99:\JNOON\Ô\‡\6
+FD9A:\JNOON\\Û
+FD9B:\JNOON\\‡\6
+FD9C:\JYEH\\\6
+FD9D:\JYEH\\\2
+FD9E:\JBEH\HKHAH\Û
+FD9F:\JTEH\Ô\Û
+FDA0:\JTEH\Ô\‡\6
+FDA1:\JTEH\HKHAH\Û
+FDA2:\JTEH\HKHAH\‡\6
+FDA3:\JTEH\\Û
+FDA4:\JTEH\\‡\6
+FDA5:\JJEEM\\Û
+FDA6:\JJEEM\HHAH\‡\6
+FDA7:\JJEEM\\‡\6
+FDA8:\JSEEN\HKHAH\‡\6
+FDA9:\JSAD\HHAH\Û
+FDAA:\JSHEEN\HHAH\Û
+FDAB:\JDAD\HHAH\Û
+FDAC:\JLAM\Ô\Û
+FDAD:\JLAM\\Û
+FDAE:\JYEH\HHAH\Û
+FDAF:\JYEH\Ô\Û
+FDB0:\JYEH\\Û
+FDB1:\JMEEM\\Û
+FDB2:\JQAF\\Û
+FDB3:\JNOON\HHAH\Û
+FDB4:\JQAF\\HHAH\2
+FDB5:\JLAM\HHAH\\2
+FDB6:\JAIN\\Û
+FDB7:\JKAF\\Û
+FDB8:\JNOON\Ô\HHAH\2
+FDB9:\JMEEM\HKHAH\Û
+FDBA:\JLAM\Ô\\2
+FDBB:\JKAF\\\6
+FDBC:\JLAM\Ô\\6
+FDBD:\JNOON\Ô\HHAH\6
+FDBE:\JJEEM\HHAH\Û
+FDBF:\JHAH\Ô\Û
+FDC0:\JMEEM\Ô\Û
+FDC1:\JFEH\\Û
+FDC2:\JBEH\HHAH\Û
+FDC3:\JKAF\\\2
+FDC4:\JAIN\Ô\\2
+FDC5:\JSAD\\\2
+FDC6:\JSEEN\HKHAH\Û
+FDC7:\JNOON\Ô\Û
+FDF0:\JSALLA US\ÂAS KORANIC STOP\‚\Q
+FDF1:\JQALA US\ÂAS KORANIC STOP\‚\Q
+FDF2:\JALLAH\Q
+FDF3:\JAKBAR\Q
+FDF4:\JMOHAMMAD\Q
+FDF5:\JSALAM\Q
+FDF6:\JRASOUL\Q
+FDF7:\JALAYHE\Q
+FDF8:\JWASALLAM\Q
+FDF9:\JSALLA\Q
+FDFA:\JSALLALLAHOU ALAYHE WASALLAM
+FDFB:\JJALLAJALALOUHOU
+FDFC:RIAL\‚
+FE00:\ç-1
+FE01:\ç-2
+FE02:\ç-3
+FE03:\ç-4
+FE04:\ç-5
+FE05:\ç-6
+FE06:\ç-7
+FE07:\ç-8
+FE08:\ç-9
+FE09:\ç-10
+FE0A:\ç-11
+FE0B:\ç-12
+FE0C:\ç-13
+FE0D:\ç-14
+FE0E:\ç-15
+FE0F:\ç-16
+FE20:\o\ò\‰ HALF
+FE21:\o\ò\ùHALF
+FE22:\o\0 \æ \‰ HALF
+FE23:\o\0 \æ \ùHALF
+FE30:\¹TWO DOT LEADER
+FE31:\¹EM DASH
+FE32:\¹EN DASH
+FE33:\¹LOW \ä
+FE34:\¹WAVY LOW \ä
+FE35:\¹\‰ \ÑS
+FE36:\¹\ù\ÑS
+FE37:\¹\‰ CURLY \–
+FE38:\¹\ùCURLY \–
+FE39:\¹\‰ TORTOISE SHELL \–
+FE3A:\¹\ùTORTOISE SHELL \–
+FE3B:\¹\‰ \¬ LENTICULAR \–
+FE3C:\¹\ù\¬ LENTICULAR \–
+FE3D:\¹\‰ \0 ANGLE \–
+FE3E:\¹\ù\0 ANGLE \–
+FE3F:\¹\‰ ANGLE \–
+FE40:\¹\ùANGLE \–
+FE41:\¹\‰ CORNER \–
+FE42:\¹\ùCORNER \–
+FE43:\¹\‰ \¦CORNER \–
+FE44:\¹\ù\¦CORNER \–
+FE45:SESAME DOT
+FE46:\¦SESAME DOT
+FE49:DASH\ÂOVER\ä
+FE4A:CENTRE\ä OVER\ä
+FE4B:WAVY OVER\ä
+FE4C:\0 WAVY OVER\ä
+FE4D:DASH\ÂLOW \ä
+FE4E:CENTRE\ä LOW \ä
+FE4F:WAVY LOW \ä
+FE50:\§COMMA
+FE51:\§\8IC COMMA
+FE52:SMALL\é
+FE54:\§SEMICOLON
+FE55:\§COLON
+FE56:\§QUESTION\¥
+FE57:\§EXCLAM\”\¥
+FE58:\§EM DASH
+FE59:\§\‰ \ÑS
+FE5A:\§\ù\ÑS
+FE5B:\§\‰ CURLY \–
+FE5C:\§\ùCURLY \–
+FE5D:\§\‰ TORTOISE SHELL \–
+FE5E:\§\ùTORTOISE SHELL \–
+FE5F:\§\­SIGN
+FE60:\§AMPERSAND
+FE61:\§ASTERISK
+FE62:\§PLUS\‚
+FE63:\§HYPHEN-MINUS
+FE64:\§\µ\‚
+FE65:\§\’\‚
+FE66:\§EQUALS\‚
+FE68:\§REVERSE SOLIDUS
+FE69:\§DOLLAR\‚
+FE6A:\§PERCENT\‚
+FE6B:\§COMMERCIAL AT
+FE70:\Ê FATHATAN\Q
+FE71:\Ê TATWEEL\HFATHATAN\p
+FE72:\Ê DAMMATAN\Q
+FE73:\Ê TAIL FRAGMENT
+FE74:\Ê KASRATAN\Q
+FE76:\Ê FATHA\Q
+FE77:\Ê FATHA MEDI\X
+FE78:\Ê DAMMA\Q
+FE79:\Ê DAMMA MEDI\X
+FE7A:\Ê KASRA\Q
+FE7B:\Ê KASRA MEDI\X
+FE7C:\Ê SHADDA\Q
+FE7D:\Ê SHADDA MEDI\X
+FE7E:\Ê SUKUN\Q
+FE7F:\Ê SUKUN MEDI\X
+FE80:\^HAMZA\Q
+FE81:\^ALEF\HMADDA\p\Q
+FE82:\^ALEF\HMADDA\p\6
+FE83:\^ALEF\HHAMZA\p\Q
+FE84:\^ALEF\HHAMZA\p\6
+FE85:\^WAW\HHAMZA\p\Q
+FE86:\^WAW\HHAMZA\p\6
+FE87:\^ALEF\HHAMZA\…\Q
+FE88:\^ALEF\HHAMZA\…\6
+FE89:\^\º\Q
+FE8A:\^\º\6
+FE8B:\^\º\2
+FE8C:\^\º MEDI\X
+FE8D:\^ALEF\Q
+FE8E:\^ALEF\6
+FE8F:\^BEH\Q
+FE90:\^BEH\6
+FE91:\^BEH\2
+FE92:\^BEH MEDI\X
+FE93:\^TEH MARBUTA\Q
+FE94:\^TEH MARBUTA\6
+FE95:\^TEH\Q
+FE96:\^TEH\6
+FE97:\^TEH\2
+FE98:\^TEH MEDI\X
+FE99:\^THEH\Q
+FE9A:\^THEH\6
+FE9B:\^THEH\2
+FE9C:\^THEH MEDI\X
+FE9D:\^JEEM\Q
+FE9E:\^JEEM\6
+FE9F:\^JEEM\2
+FEA0:\^JEEM MEDI\X
+FEA1:\^HAH\Q
+FEA2:\^HAH\6
+FEA3:\^HAH\2
+FEA4:\^HAH MEDI\X
+FEA5:\^KHAH\Q
+FEA6:\^KHAH\6
+FEA7:\^KHAH\2
+FEA8:\^KHAH MEDI\X
+FEA9:\^DAL\Q
+FEAA:\^DAL\6
+FEAB:\^THAL\Q
+FEAC:\^THAL\6
+FEAD:\^REH\Q
+FEAE:\^REH\6
+FEAF:\^ZAIN\Q
+FEB0:\^ZAIN\6
+FEB1:\^SEEN\Q
+FEB2:\^SEEN\6
+FEB3:\^SEEN\2
+FEB4:\^SEEN MEDI\X
+FEB5:\^SHEEN\Q
+FEB6:\^SHEEN\6
+FEB7:\^SHEEN\2
+FEB8:\^SHEEN MEDI\X
+FEB9:\^SAD\Q
+FEBA:\^SAD\6
+FEBB:\^SAD\2
+FEBC:\^SAD MEDI\X
+FEBD:\^DAD\Q
+FEBE:\^DAD\6
+FEBF:\^DAD\2
+FEC0:\^DAD MEDI\X
+FEC1:\^TAH\Q
+FEC2:\^TAH\6
+FEC3:\^TAH\2
+FEC4:\^TAH MEDI\X
+FEC5:\^ZAH\Q
+FEC6:\^ZAH\6
+FEC7:\^ZAH\2
+FEC8:\^ZAH MEDI\X
+FEC9:\^AIN\Q
+FECA:\^AIN\6
+FECB:\^AIN\2
+FECC:\^AIN MEDI\X
+FECD:\^GHAIN\Q
+FECE:\^GHAIN\6
+FECF:\^GHAIN\2
+FED0:\^GHAIN MEDI\X
+FED1:\^FEH\Q
+FED2:\^FEH\6
+FED3:\^FEH\2
+FED4:\^FEH MEDI\X
+FED5:\^QAF\Q
+FED6:\^QAF\6
+FED7:\^QAF\2
+FED8:\^QAF MEDI\X
+FED9:\^KAF\Q
+FEDA:\^KAF\6
+FEDB:\^KAF\2
+FEDC:\^KAF MEDI\X
+FEDD:\^LAM\Q
+FEDE:\^LAM\6
+FEDF:\^LAM\2
+FEE0:\^LAM MEDI\X
+FEE1:\^MEEM\Q
+FEE2:\^MEEM\6
+FEE3:\^MEEM\2
+FEE4:\^MEEM MEDI\X
+FEE5:\^NOON\Q
+FEE6:\^NOON\6
+FEE7:\^NOON\2
+FEE8:\^NOON MEDI\X
+FEE9:\^HEH\Q
+FEEA:\^HEH\6
+FEEB:\^HEH\2
+FEEC:\^HEH MEDI\X
+FEED:\^WAW\Q
+FEEE:\^WAW\6
+FEEF:\^ALEF MAKSURA\Q
+FEF0:\^ALEF MAKSURA\6
+FEF1:\^YEH\Q
+FEF2:\^YEH\6
+FEF3:\^YEH\2
+FEF4:\^YEH MEDI\X
+FEF5:\JLAM\HALEF\HMADDA\p\Q
+FEF6:\JLAM\HALEF\HMADDA\p\6
+FEF7:\JLAM\HALEF\HHAMZA\p\Q
+FEF8:\JLAM\HALEF\HHAMZA\p\6
+FEF9:\JLAM\HALEF\HHAMZA\…\Q
+FEFA:\JLAM\HALEF\HHAMZA\…\6
+FEFB:\JLAM\HALEF\Q
+FEFC:\JLAM\HALEF\6
+FEFF:ZERO WIDTH NO-BREAK SPACE
+FF01:\†EXCLAM\”\¥
+FF02:\†QUOT\”\¥
+FF03:\†\­SIGN
+FF04:\†DOLLAR\‚
+FF05:\†PERCENT\‚
+FF06:\†AMPERSAND
+FF07:\†APOSTROPHE
+FF08:\†\‰ \ÑS
+FF09:\†\ù\ÑS
+FF0A:\†ASTERISK
+FF0B:\†PLUS\‚
+FF0C:\†COMMA
+FF0D:\†HYPHEN-MINUS
+FF0E:\†FULL STOP
+FF0F:\†SOLIDUS
+FF10:\†DIGIT ZERO
+FF11:\†DIGIT ONE
+FF12:\†DIGIT TWO
+FF13:\†DIGIT THREE
+FF14:\†DIGIT FOUR
+FF15:\†DIGIT FIVE
+FF16:\†DIGIT SIX
+FF17:\†DIGIT SEVEN
+FF18:\†DIGIT E\¼
+FF19:\†DIGIT NINE
+FF1A:\†COLON
+FF1B:\†SEMICOLON
+FF1C:\†\µ\‚
+FF1D:\†EQUALS\‚
+FF1E:\†\’\‚
+FF1F:\†QUESTION\¥
+FF20:\†COMMERCIAL AT
+FF21:\†\PA
+FF22:\†\PB
+FF23:\†\PC
+FF24:\†\PD
+FF25:\†\PE
+FF26:\†\PF
+FF27:\†\PG
+FF28:\†\PH
+FF29:\†\PI
+FF2A:\†\PJ
+FF2B:\†\PK
+FF2C:\†\PL
+FF2D:\†\PM
+FF2E:\†\PN
+FF2F:\†\PO
+FF30:\†\PP
+FF31:\†\PQ
+FF32:\†\PR
+FF33:\†\PS
+FF34:\†\PT
+FF35:\†\PU
+FF36:\†\PV
+FF37:\†\PW
+FF38:\†\PX
+FF39:\†\PY
+FF3A:\†\PZ
+FF3B:\†\‰ \r\–
+FF3C:\†REVERSE SOLIDUS
+FF3D:\†\ù\r\–
+FF3E:\†CIRCUMFLEX\×
+FF3F:\†LOW \ä
+FF40:\†GRAVE\×
+FF41:\†\LA
+FF42:\†\LB
+FF43:\†\LC
+FF44:\†\LD
+FF45:\†\LE
+FF46:\†\LF
+FF47:\†\LG
+FF48:\†\LH
+FF49:\†\LI
+FF4A:\†\LJ
+FF4B:\†\LK
+FF4C:\†\LL
+FF4D:\†\LM
+FF4E:\†\LN
+FF4F:\†\LO
+FF50:\†\LP
+FF51:\†\LQ
+FF52:\†\LR
+FF53:\†\LS
+FF54:\†\LT
+FF55:\†\LU
+FF56:\†\LV
+FF57:\†\LW
+FF58:\†\LX
+FF59:\†\LY
+FF5A:\†\LZ
+FF5B:\†\‰ CURLY \–
+FF5C:\†\€ \ä
+FF5D:\†\ùCURLY \–
+FF5E:\†\æ
+FF5F:\†\‰ \¦\ÑS
+FF60:\†\ù\¦\ÑS
+FF61:\4\8IC\é
+FF62:\4\‰ CORNER \–
+FF63:\4\ùCORNER \–
+FF64:\4\8IC COMMA
+FF65:\4\n MIDDLE DOT
+FF66:\4\ÍWO
+FF67:\4\Í\§A
+FF68:\4\Í\§I
+FF69:\4\Í\§U
+FF6A:\4\Í\§E
+FF6B:\4\Í\§O
+FF6C:\4\Í\§YA
+FF6D:\4\Í\§YU
+FF6E:\4\Í\§YO
+FF6F:\4\Í\§TU
+FF70:\4\n-HIRAGANA PROLONG\ÂSOUND\¥
+FF71:\4\ÍA
+FF72:\4\ÍI
+FF73:\4\ÍU
+FF74:\4\ÍE
+FF75:\4\ÍO
+FF76:\4\ÍKA
+FF77:\4\ÍKI
+FF78:\4\ÍKU
+FF79:\4\ÍKE
+FF7A:\4\ÍKO
+FF7B:\4\ÍSA
+FF7C:\4\ÍSI
+FF7D:\4\ÍSU
+FF7E:\4\ÍSE
+FF7F:\4\ÍSO
+FF80:\4\ÍTA
+FF81:\4\ÍTI
+FF82:\4\ÍTU
+FF83:\4\ÍTE
+FF84:\4\ÍTO
+FF85:\4\ÍNA
+FF86:\4\ÍNI
+FF87:\4\ÍNU
+FF88:\4\ÍNE
+FF89:\4\ÍNO
+FF8A:\4\ÍHA
+FF8B:\4\ÍHI
+FF8C:\4\ÍHU
+FF8D:\4\ÍHE
+FF8E:\4\ÍHO
+FF8F:\4\ÍMA
+FF90:\4\ÍMI
+FF91:\4\ÍMU
+FF92:\4\ÍME
+FF93:\4\ÍMO
+FF94:\4\ÍYA
+FF95:\4\ÍYU
+FF96:\4\ÍYO
+FF97:\4\ÍRA
+FF98:\4\ÍRI
+FF99:\4\ÍRU
+FF9A:\4\ÍRE
+FF9B:\4\ÍRO
+FF9C:\4\ÍWA
+FF9D:\4\ÍN
+FF9E:\4\n VOIC\ÂSOUND\¥
+FF9F:\4\n SEMI-VOIC\ÂSOUND\¥
+FFA0:\4\e FILLER
+FFA1:\4\ÖKIYEOK
+FFA2:\4\ÖSSANGKIYEOK
+FFA3:\4\ÖKIYEOK-SIOS
+FFA4:\4\ÖN\ÆN
+FFA5:\4\ÖN\ÆN-C\ÆC
+FFA6:\4\ÖN\ÆN-H\ÆH
+FFA7:\4\ÖTIKEUT
+FFA8:\4\ÖSSANGTIKEUT
+FFA9:\4\ÖR\ÆL
+FFAA:\4\ÖR\ÆL-KIYEOK
+FFAB:\4\ÖR\ÆL-M\ÆM
+FFAC:\4\ÖR\ÆL-P\ÆP
+FFAD:\4\ÖR\ÆL-SIOS
+FFAE:\4\ÖR\ÆL-TH\ÆTH
+FFAF:\4\ÖR\ÆL-PH\ÆPH
+FFB0:\4\ÖR\ÆL-H\ÆH
+FFB1:\4\ÖM\ÆM
+FFB2:\4\ÖP\ÆP
+FFB3:\4\ÖSSANGP\ÆP
+FFB4:\4\ÖP\ÆP-SIOS
+FFB5:\4\ÖSIOS
+FFB6:\4\ÖSSANGSIOS
+FFB7:\4\Ö\ÆNG
+FFB8:\4\ÖC\ÆC
+FFB9:\4\ÖSSANGC\ÆC
+FFBA:\4\ÖCH\ÆCH
+FFBB:\4\ÖKH\ÆKH
+FFBC:\4\ÖTH\ÆTH
+FFBD:\4\ÖPH\ÆPH
+FFBE:\4\ÖH\ÆH
+FFC2:\4\ÖA
+FFC3:\4\ÖAE
+FFC4:\4\ÖYA
+FFC5:\4\ÖYAE
+FFC6:\4\ÖEO
+FFC7:\4\ÖE
+FFCA:\4\ÖYEO
+FFCB:\4\ÖYE
+FFCC:\4\ÖO
+FFCD:\4\ÖWA
+FFCE:\4\ÖWAE
+FFCF:\4\ÖOE
+FFD2:\4\ÖYO
+FFD3:\4\ÖU
+FFD4:\4\ÖWEO
+FFD5:\4\ÖWE
+FFD6:\4\ÖWI
+FFD7:\4\ÖYU
+FFDA:\4\ÖEU
+FFDB:\4\ÖYI
+FFDC:\4\ÖI
+FFE0:\†CENT\‚
+FFE1:\†POUND\‚
+FFE2:\†NOT\‚
+FFE3:\†\å
+FFE4:\†BROKEN\ì
+FFE5:\†YEN\‚
+FFE6:\†WON\‚
+FFE8:\4FORMS L\¼ \€
+FFE9:\4\‰\Š\u
+FFEA:\4UP\Š\u
+FFEB:\4\Ù
+FFEC:\4\Ë\Š\u
+FFED:\4\¬ \ý
+FFEE:\4\¦\Ð
+FFF9:INTER\äAR ANNOT\” ANCHOR
+FFFA:INTER\äAR ANNOT\” SEPARATOR
+FFFB:INTER\äAR ANNOT\” TERMINATOR
+FFFC:OBJECT REPLACEMENT CHARACTER
+FFFD:REPLACEMENT CHARACTER
+10300:OLD \f\@A
+10301:OLD \f\@BE
+10302:OLD \f\@KE
+10303:OLD \f\@DE
+10304:OLD \f\@E
+10305:OLD \f\@VE
+10306:OLD \f\@ZE
+10307:OLD \f\@HE
+10308:OLD \f\@THE
+10309:OLD \f\@I
+1030A:OLD \f\@KA
+1030B:OLD \f\@EL
+1030C:OLD \f\@EM
+1030D:OLD \f\@EN
+1030E:OLD \f\@ESH
+1030F:OLD \f\@O
+10310:OLD \f\@PE
+10311:OLD \f\@SHE
+10312:OLD \f\@KU
+10313:OLD \f\@ER
+10314:OLD \f\@ES
+10315:OLD \f\@TE
+10316:OLD \f\@U
+10317:OLD \f\@EKS
+10318:OLD \f\@PHE
+10319:OLD \f\@KHE
+1031A:OLD \f\@EF
+1031B:OLD \f\@ERS
+1031C:OLD \f\@CHE
+1031D:OLD \f\@II
+1031E:OLD \f\@UU
+10320:OLD \f NUMERAL ONE
+10321:OLD \f NUMERAL FIVE
+10322:OLD \f NUMERAL TEN
+10323:OLD \f NUMERAL FIFTY
+10330:GOTHIC\@AHSA
+10331:GOTHIC\@BAIRKAN
+10332:GOTHIC\@GIBA
+10333:GOTHIC\@DAGS
+10334:GOTHIC\@AIHVUS
+10335:GOTHIC\@QAIRTHRA
+10336:GOTHIC\@IUJA
+10337:GOTHIC\@HAGL
+10338:GOTHIC\@THIUTH
+10339:GOTHIC\@EIS
+1033A:GOTHIC\@KUSMA
+1033B:GOTHIC\@LAGUS
+1033C:GOTHIC\@MANNA
+1033D:GOTHIC\@NAUTHS
+1033E:GOTHIC\@JER
+1033F:GOTHIC\@URUS
+10340:GOTHIC\@PAIRTHRA
+10341:GOTHIC\@NINETY
+10342:GOTHIC\@RAIDA
+10343:GOTHIC\@SAUIL
+10344:GOTHIC\@TEIWS
+10345:GOTHIC\@WINJA
+10346:GOTHIC\@FAIHU
+10347:GOTHIC\@IGGWS
+10348:GOTHIC\@HWAIR
+10349:GOTHIC\@OTHAL
+1034A:GOTHIC\@NINE HUNDRED
+10400:\¿\ãLONG I
+10401:\¿\ãLONG E
+10402:\¿\ãLONG A
+10403:\¿\ãLONG AH
+10404:\¿\ãLONG O
+10405:\¿\ãLONG OO
+10406:\¿\ãSHORT I
+10407:\¿\ãSHORT E
+10408:\¿\ãSHORT A
+10409:\¿\ãSHORT AH
+1040A:\¿\ãSHORT O
+1040B:\¿\ãSHORT OO
+1040C:\¿\ãAY
+1040D:\¿\ãOW
+1040E:\¿\ãWU
+1040F:\¿\ãYEE
+10410:\¿\ãH
+10411:\¿\ãPEE
+10412:\¿\ãBEE
+10413:\¿\ãTEE
+10414:\¿\ãDEE
+10415:\¿\ãCHEE
+10416:\¿\ãJEE
+10417:\¿\ãKAY
+10418:\¿\ãGAY
+10419:\¿\ãEF
+1041A:\¿\ãVEE
+1041B:\¿\ãETH
+1041C:\¿\ãTHEE
+1041D:\¿\ãES
+1041E:\¿\ãZEE
+1041F:\¿\ãESH
+10420:\¿\ãZHEE
+10421:\¿\ãER
+10422:\¿\ãEL
+10423:\¿\ãEM
+10424:\¿\ãEN
+10425:\¿\ãENG
+10428:\¿\N\@LONG I
+10429:\¿\N\@LONG E
+1042A:\¿\N\@LONG A
+1042B:\¿\N\@LONG AH
+1042C:\¿\N\@LONG O
+1042D:\¿\N\@LONG OO
+1042E:\¿\N\@SHORT I
+1042F:\¿\N\@SHORT E
+10430:\¿\N\@SHORT A
+10431:\¿\N\@SHORT AH
+10432:\¿\N\@SHORT O
+10433:\¿\N\@SHORT OO
+10434:\¿\N\@AY
+10435:\¿\N\@OW
+10436:\¿\N\@WU
+10437:\¿\N\@YEE
+10438:\¿\N\@H
+10439:\¿\N\@PEE
+1043A:\¿\N\@BEE
+1043B:\¿\N\@TEE
+1043C:\¿\N\@DEE
+1043D:\¿\N\@CHEE
+1043E:\¿\N\@JEE
+1043F:\¿\N\@KAY
+10440:\¿\N\@GAY
+10441:\¿\N\@EF
+10442:\¿\N\@VEE
+10443:\¿\N\@ETH
+10444:\¿\N\@THEE
+10445:\¿\N\@ES
+10446:\¿\N\@ZEE
+10447:\¿\N\@ESH
+10448:\¿\N\@ZHEE
+10449:\¿\N\@ER
+1044A:\¿\N\@EL
+1044B:\¿\N\@EM
+1044C:\¿\N\@EN
+1044D:\¿\N\@ENG
+1D000:\YPSILI
+1D001:\YDASEIA
+1D002:\Y\´
+1D003:\YOXEIA EKFONITIKON
+1D004:\YOXEIA DIPLI
+1D005:\YVAREIA EKFONITIKON
+1D006:\YVAREIA DIPLI
+1D007:\YKATHISTI
+1D008:\YSYRMATIKI
+1D009:\YPARAKLITIKI
+1D00A:\YYPOKRISIS
+1D00B:\YYPOKRISIS DIPLI
+1D00C:\YKREMASTI
+1D00D:\YAPESO EKFONITIKON
+1D00E:\YEXO EKFONITIKON
+1D00F:\YTELEIA
+1D010:\YKENTIMATA
+1D011:\YAPOSTROFOS
+1D012:\YAPOSTROFOS DIPLI
+1D013:\YSYNEVMA
+1D014:\YTHITA
+1D015:\YOLIGON ARCHAION
+1D016:\YGORGON ARCHAION
+1D017:\Y\É
+1D018:\YCHAMILON
+1D019:\YVATHY
+1D01A:\YISON ARCHAION
+1D01B:\YKENTIMA ARCHAION
+1D01C:\YKENTIMATA ARCHAION
+1D01D:\YSAXIMATA
+1D01E:\YPARICHON
+1D01F:\YSTAVROS APODEXIA
+1D020:\YOXEIAI ARCHAION
+1D021:\YVAREIAI ARCHAION
+1D022:\YAPODERMA ARCHAION
+1D023:\YAPOTHEMA
+1D024:\YKLASMA
+1D025:\YREVMA
+1D026:\YPIASMA ARCHAION
+1D027:\YTINAGMA
+1D028:\YANATRICHISMA
+1D029:\YSEISMA
+1D02A:\YSYNAGMA ARCHAION
+1D02B:\YSYNAGMA META STAVROU
+1D02C:\YOYRANISMA ARCHAION
+1D02D:\YTHEMA
+1D02E:\YLEMOI
+1D02F:\YDYO
+1D030:\YTRIA
+1D031:\YTESSERA
+1D032:\YKRATIMATA
+1D033:\YAPESO EXO NEO
+1D034:\YFTHORA ARCHAION
+1D035:\YIMIFTHORA
+1D036:\YTROMIKON ARCHAION
+1D037:\YKATAVA TROMIKON
+1D038:\YPELASTON
+1D039:\YPSIFISTON
+1D03A:\YKONTEVMA
+1D03B:\YCHOREVMA ARCHAION
+1D03C:\YRAPISMA
+1D03D:\YPARAKALESMA ARCHAION
+1D03E:\YPARAKLITIKI ARCHAION
+1D03F:\YICHADIN
+1D040:\YNANA
+1D041:\YPETASMA
+1D042:\YKONTEVMA ALLO
+1D043:\YTROMIKON ALLO
+1D044:\YSTRAGGISMATA
+1D045:\YGRONTHISMATA
+1D046:\YISON NEO
+1D047:\YOLIGON NEO
+1D048:\YOXEIA NEO
+1D049:\YPETASTI
+1D04A:\YKOUFISMA
+1D04B:\YPETASTOKOUFISMA
+1D04C:\YKRATIMOKOUFISMA
+1D04D:\YPELASTON NEO
+1D04E:\YKENTIMATA NEO ANO
+1D04F:\YKENTIMA NEO ANO
+1D050:\YYPSILI
+1D051:\YAPOSTROFOS NEO
+1D052:\YAPOSTROFOI SYNDESMOS NEO
+1D053:\YYPORROI
+1D054:\YKRATIMOYPORROON
+1D055:\YELAFRON
+1D056:\YCHAMILI
+1D057:\YMIKRON ISON
+1D058:\YVAREIA NEO
+1D059:\YPIASMA NEO
+1D05A:\YPSIFISTON NEO
+1D05B:\YOMALON
+1D05C:\YANTIKENOMA
+1D05D:\YLYGISMA
+1D05E:\YPARAKLITIKI NEO
+1D05F:\YPARAKALESMA NEO
+1D060:\YETERON PARAKALESMA
+1D061:\YKYLISMA
+1D062:\YANTIKENOKYLISMA
+1D063:\YTROMIKON NEO
+1D064:\YEKSTREPTON
+1D065:\YSYNAGMA NEO
+1D066:\YSYRMA
+1D067:\YCHOREVMA NEO
+1D068:\YEPEGERMA
+1D069:\YSEISMA NEO
+1D06A:\YXIRON KLASMA
+1D06B:\YTROMIKOPSIFISTON
+1D06C:\YPSIFISTOLYGISMA
+1D06D:\YTROMIKOLYGISMA
+1D06E:\YTROMIKOPARAKALESMA
+1D06F:\YPSIFISTOPARAKALESMA
+1D070:\YTROMIKOSYNAGMA
+1D071:\YPSIFISTOSYNAGMA
+1D072:\YGORGOSYNTHETON
+1D073:\YARGOSYNTHETON
+1D074:\YETERON ARGOSYNTHETON
+1D075:\YOYRANISMA NEO
+1D076:\YTHEMATISMOS ESO
+1D077:\YTHEMATISMOS EXO
+1D078:\YTHEMA APLOUN
+1D079:\YTHES KAI APOTHES
+1D07A:\YKATAVASMA
+1D07B:\YENDOFONON
+1D07C:\YYFEN KATO
+1D07D:\YYFEN ANO
+1D07E:\YSTAVROS
+1D07F:\YKLASMA ANO
+1D080:\YDIPLI ARCHAION
+1D081:\YKRATIMA ARCHAION
+1D082:\YKRATIMA ALLO
+1D083:\YKRATIMA NEO
+1D084:\YAPODERMA NEO
+1D085:\YAPLI
+1D086:\YDIPLI
+1D087:\YTRIPLI
+1D088:\YTETRAPLI
+1D089:\YKORONIS
+1D08A:\YLEIMMA ENOS CHRONOU
+1D08B:\YLEIMMA DYO CHRONON
+1D08C:\YLEIMMA TRION CHRONON
+1D08D:\YLEIMMA TESSARON CHRONON
+1D08E:\YLEIMMA IMISEOS CHRONOU
+1D08F:\YGORGON NEO ANO
+1D090:\YGORGON PARESTIGMENON ARISTERA
+1D091:\YGORGON PARESTIGMENON DEXIA
+1D092:\YDIGORGON
+1D093:\YDIGORGON PARESTIGMENON ARISTERA KATO
+1D094:\YDIGORGON PARESTIGMENON ARISTERA ANO
+1D095:\YDIGORGON PARESTIGMENON DEXIA
+1D096:\YTRIGORGON
+1D097:\YARGON
+1D098:\YIMIDIARGON
+1D099:\YDIARGON
+1D09A:\YAGOGI POLI ARGI
+1D09B:\YAGOGI ARGOTERI
+1D09C:\YAGOGI ARGI
+1D09D:\YAGOGI METRIA
+1D09E:\YAGOGI MESI
+1D09F:\YAGOGI GORGI
+1D0A0:\YAGOGI GORGOTERI
+1D0A1:\YAGOGI POLI GORGI
+1D0A2:\YMARTYRIA PROTOS ICHOS
+1D0A3:\YMARTYRIA ALLI PROTOS ICHOS
+1D0A4:\YMARTYRIA DEYTEROS ICHOS
+1D0A5:\YMARTYRIA ALLI DEYTEROS ICHOS
+1D0A6:\YMARTYRIA TRITOS ICHOS
+1D0A7:\YMARTYRIA TRIFONIAS
+1D0A8:\YMARTYRIA TETARTOS ICHOS
+1D0A9:\YMARTYRIA TETARTOS LEGETOS ICHOS
+1D0AA:\YMARTYRIA LEGETOS ICHOS
+1D0AB:\YMARTYRIA PLAGIOS ICHOS
+1D0AC:\YISAKIA TELOUS ICHIMATOS
+1D0AD:\YAPOSTROFOI TELOUS ICHIMATOS
+1D0AE:\YFANEROSIS TETRAFONIAS
+1D0AF:\YFANEROSIS MONOFONIAS
+1D0B0:\YFANEROSIS DIFONIAS
+1D0B1:\YMARTYRIA VARYS ICHOS
+1D0B2:\YMARTYRIA PROTOVARYS ICHOS
+1D0B3:\YMARTYRIA PLAGIOS TETARTOS ICHOS
+1D0B4:\YGORTHMIKON N APLOUN
+1D0B5:\YGORTHMIKON N DIPLOUN
+1D0B6:\YENARXIS KAI FTHORA VOU
+1D0B7:\YIMIFONON
+1D0B8:\YIMIFTHORON
+1D0B9:\YFTHORA ARCHAION DEYTEROU ICHOU
+1D0BA:\YFTHORA DIATONIKI PA
+1D0BB:\YFTHORA DIATONIKI NANA
+1D0BC:\YFTHORA NAOS ICHOS
+1D0BD:\YFTHORA DIATONIKI DI
+1D0BE:\YFTHORA SKLIRON DIATONON DI
+1D0BF:\YFTHORA DIATONIKI KE
+1D0C0:\YFTHORA DIATONIKI ZO
+1D0C1:\YFTHORA DIATONIKI NI KATO
+1D0C2:\YFTHORA DIATONIKI NI ANO
+1D0C3:\YFTHORA MALAKON CHROMA DIFONIAS
+1D0C4:\YFTHORA MALAKON CHROMA MONOFONIAS
+1D0C5:\YFHTORA SKLIRON CHROMA VASIS
+1D0C6:\YFTHORA SKLIRON CHROMA SYNAFI
+1D0C7:\YFTHORA NENANO
+1D0C8:\YCHROA ZYGOS
+1D0C9:\YCHROA KLITON
+1D0CA:\YCHROA SPATHI
+1D0CB:\YFTHORA I YFESIS TETARTIMORION
+1D0CC:\YFTHORA ENARMONIOS ANTIFONIA
+1D0CD:\YYFESIS TRITIMORION
+1D0CE:\YDIESIS TRITIMORION
+1D0CF:\YDIESIS TETARTIMORION
+1D0D0:\YDIESIS APLI DYO DODEKATA
+1D0D1:\YDIESIS MONOGRAMMOS TESSERA DODEKATA
+1D0D2:\YDIESIS DIGRAMMOS EX DODEKATA
+1D0D3:\YDIESIS TRIGRAMMOS OKTO DODEKATA
+1D0D4:\YYFESIS APLI DYO DODEKATA
+1D0D5:\YYFESIS MONOGRAMMOS TESSERA DODEKATA
+1D0D6:\YYFESIS DIGRAMMOS EX DODEKATA
+1D0D7:\YYFESIS TRIGRAMMOS OKTO DODEKATA
+1D0D8:\YGENIKI DIESIS
+1D0D9:\YGENIKI YFESIS
+1D0DA:\YDIASTOLI APLI MIKRI
+1D0DB:\YDIASTOLI APLI MEGALI
+1D0DC:\YDIASTOLI DIPLI
+1D0DD:\YDIASTOLI THESEOS
+1D0DE:\YSIMANSIS THESEOS
+1D0DF:\YSIMANSIS THESEOS DISIMOU
+1D0E0:\YSIMANSIS THESEOS TRISIMOU
+1D0E1:\YSIMANSIS THESEOS TETRASIMOU
+1D0E2:\YSIMANSIS ARSEOS
+1D0E3:\YSIMANSIS ARSEOS DISIMOU
+1D0E4:\YSIMANSIS ARSEOS TRISIMOU
+1D0E5:\YSIMANSIS ARSEOS TETRASIMOU
+1D0E6:\YDIGRAMMA GG
+1D0E7:\YDIFTOGGOS OU
+1D0E8:\YSTIGMA
+1D0E9:\YARKTIKO PA
+1D0EA:\YARKTIKO VOU
+1D0EB:\YARKTIKO GA
+1D0EC:\YARKTIKO DI
+1D0ED:\YARKTIKO KE
+1D0EE:\YARKTIKO ZO
+1D0EF:\YARKTIKO NI
+1D0F0:\YKENTIMATA NEO MESO
+1D0F1:\YKENTIMA NEO MESO
+1D0F2:\YKENTIMATA NEO KATO
+1D0F3:\YKENTIMA NEO KATO
+1D0F4:\YKLASMA KATO
+1D0F5:\YGORGON NEO KATO
+1D100:\KS\ôLE\ì\ä
+1D101:\K\0\ì\ä
+1D102:\KFINAL\ì\ä
+1D103:\KREVERSE FINAL\ì\ä
+1D104:\KDASHED\ì\ä
+1D105:\KSHORT\ì\ä
+1D106:\K\‰ REPEAT\‚
+1D107:\K\ùREPEAT\‚
+1D108:\KREPEAT DOTS
+1D109:\KDAL SEGNO
+1D10A:\KDA CAPO
+1D10B:\KSEGNO
+1D10C:\KCODA
+1D10D:\KREPEAT\ÂFIGURE-1
+1D10E:\KREPEAT\ÂFIGURE-2
+1D10F:\KREPEAT\ÂFIGURE-3
+1D110:\KFERMATA
+1D111:\KFERMATA\…
+1D112:\KBREATH\¥
+1D113:\KCAESURA
+1D114:\KBRACE
+1D115:\K\–
+1D116:\KONE-\ä STAFF
+1D117:\KTWO-\ä STAFF
+1D118:\KTHREE-\ä STAFF
+1D119:\KFOUR-\ä STAFF
+1D11A:\KFIVE-\ä STAFF
+1D11B:\KSIX-\ä STAFF
+1D11C:\KSIX-STR\ô FRETBOARD
+1D11D:\KFOUR-STR\ô FRETBOARD
+1D11E:\KG CLEF
+1D11F:\KG CLEF OTTAVA ALTA
+1D120:\KG CLEF OTTAVA BASSA
+1D121:\KC CLEF
+1D122:\KF CLEF
+1D123:\KF CLEF OTTAVA ALTA
+1D124:\KF CLEF OTTAVA BASSA
+1D125:\KDRUM CLEF-1
+1D126:\KDRUM CLEF-2
+1D12A:\K\0 SHARP
+1D12B:\K\0 FLAT
+1D12C:\KFLAT UP
+1D12D:\KFLAT \Ë
+1D12E:\KNATURAL UP
+1D12F:\KNATURAL \Ë
+1D130:\KSHARP UP
+1D131:\KSHARP \Ë
+1D132:\KQUARTER TONE SHARP
+1D133:\KQUARTER TONE FLAT
+1D134:\KCOMMON TIME
+1D135:\KCUT TIME
+1D136:\KOTTAVA ALTA
+1D137:\KOTTAVA BASSA
+1D138:\KQUINDICESIMA ALTA
+1D139:\KQUINDICESIMA BASSA
+1D13A:\KMULTI REST
+1D13B:\KWHOLE REST
+1D13C:\KHALF REST
+1D13D:\KQUARTER REST
+1D13E:\KE\¼H REST
+1D13F:\KSIXTEENTH REST
+1D140:\KTHIRTY-SECOND REST
+1D141:\KSIXTY-FOURTH REST
+1D142:\KONE HUNDR\ÂTWENTY-E\¼H REST
+1D143:\KX NOTEHEAD
+1D144:\KPLUS NOTEHEAD
+1D145:\K\Ð X NOTEHEAD
+1D146:\K\rNOTEHEAD WHITE
+1D147:\K\rNOTEHEAD \¬
+1D148:\K\¾ NOTEHEAD UP WHITE
+1D149:\K\¾ NOTEHEAD UP \¬
+1D14A:\K\¾ NOTEHEAD \‰ WHITE
+1D14B:\K\¾ NOTEHEAD \‰ \¬
+1D14C:\K\¾ NOTEHEAD \ùWHITE
+1D14D:\K\¾ NOTEHEAD \ù\¬
+1D14E:\K\¾ NOTEHEAD \Ë WHITE
+1D14F:\K\¾ NOTEHEAD \Ë \¬
+1D150:\K\¾ NOTEHEAD UP \ùWHITE
+1D151:\K\¾ NOTEHEAD UP \ù\¬
+1D152:\KMOON NOTEHEAD WHITE
+1D153:\KMOON NOTEHEAD \¬
+1D154:\K\¾-ROUND NOTEHEAD \Ë WHITE
+1D155:\K\¾-ROUND NOTEHEAD \Ë \¬
+1D156:\K\ÑS NOTEHEAD
+1D157:\KVOID NOTEHEAD
+1D158:\KNOTEHEAD \¬
+1D159:\KNULL NOTEHEAD
+1D15A:\KCLUSTER NOTEHEAD WHITE
+1D15B:\KCLUSTER NOTEHEAD \¬
+1D15C:\KBREVE
+1D15D:\KWHOLE NOTE
+1D15E:\KHALF NOTE
+1D15F:\KQUARTER NOTE
+1D160:\KE\¼H NOTE
+1D161:\KSIXTEENTH NOTE
+1D162:\KTHIRTY-SECOND NOTE
+1D163:\KSIXTY-FOURTH NOTE
+1D164:\KONE HUNDR\ÂTWENTY-E\¼H NOTE
+1D165:\K\oSTEM
+1D166:\K\oSPRECHGESANG STEM
+1D167:\K\oTREMOLO-1
+1D168:\K\oTREMOLO-2
+1D169:\K\oTREMOLO-3
+1D16A:\KF\ôER\ÂTREMOLO-1
+1D16B:\KF\ôER\ÂTREMOLO-2
+1D16C:\KF\ôER\ÂTREMOLO-3
+1D16D:\K\oAUGMENT\” DOT
+1D16E:\K\oFLAG-1
+1D16F:\K\oFLAG-2
+1D170:\K\oFLAG-3
+1D171:\K\oFLAG-4
+1D172:\K\oFLAG-5
+1D173:\KBEGIN BEAM
+1D174:\KEND BEAM
+1D175:\KBEGIN TIE
+1D176:\KEND TIE
+1D177:\KBEGIN SLUR
+1D178:\KEND SLUR
+1D179:\KBEGIN PHRASE
+1D17A:\KEND PHRASE
+1D17B:\K\oACCENT
+1D17C:\K\oSTACCATO
+1D17D:\K\oTENUTO
+1D17E:\K\oSTACCATISSIMO
+1D17F:\K\oMARCATO
+1D180:\K\oMARCATO-STACCATO
+1D181:\K\oACCENT-STACCATO
+1D182:\K\oLOURE
+1D183:\KARPEGGIATO UP
+1D184:\KARPEGGIATO \Ë
+1D185:\K\oDOIT
+1D186:\K\oRIP
+1D187:\K\oFLIP
+1D188:\K\oSMEAR
+1D189:\K\oBEND
+1D18A:\K\o\0 TONGUE
+1D18B:\K\oTRIPLE TONGUE
+1D18C:\KRINFORZANDO
+1D18D:\KSUBITO
+1D18E:\KZ
+1D18F:\KPIANO
+1D190:\KMEZZO
+1D191:\KFORTE
+1D192:\KCRESCENDO
+1D193:\KDECRESCENDO
+1D194:\KGRACE NOTE SLASH
+1D195:\KGRACE NOTE NO SLASH
+1D196:\KTR
+1D197:\KTURN
+1D198:\KINVERT\ÂTURN
+1D199:\KTURN SLASH
+1D19A:\KTURN UP
+1D19B:\KORNAMENT \Á-1
+1D19C:\KORNAMENT \Á-2
+1D19D:\KORNAMENT \Á-3
+1D19E:\KORNAMENT \Á-4
+1D19F:\KORNAMENT \Á-5
+1D1A0:\KORNAMENT \Á-6
+1D1A1:\KORNAMENT \Á-7
+1D1A2:\KORNAMENT \Á-8
+1D1A3:\KORNAMENT \Á-9
+1D1A4:\KORNAMENT \Á-10
+1D1A5:\KORNAMENT \Á-11
+1D1A6:\KHAUPTSTIMME
+1D1A7:\KNEBENSTIMME
+1D1A8:\KEND OF STIMME
+1D1A9:\KDEGREE SLASH
+1D1AA:\K\o\Ë BOW
+1D1AB:\K\oUP BOW
+1D1AC:\K\oHARMONIC
+1D1AD:\K\oSNAP PIZZICATO
+1D1AE:\KPEDAL\¥
+1D1AF:\KPEDAL UP\¥
+1D1B0:\KHALF PEDAL\¥
+1D1B1:\KGLISSANDO UP
+1D1B2:\KGLISSANDO \Ë
+1D1B3:\KWITH F\ôERNAILS
+1D1B4:\KDAMP
+1D1B5:\KDAMP ALL
+1D1B6:\KMAXIMA
+1D1B7:\KLONGA
+1D1B8:\KBREVIS
+1D1B9:\KSEMIBREVIS WHITE
+1D1BA:\KSEMIBREVIS \¬
+1D1BB:\KMINIMA
+1D1BC:\KMINIMA \¬
+1D1BD:\KSEMIMINIMA WHITE
+1D1BE:\KSEMIMINIMA \¬
+1D1BF:\KFUSA WHITE
+1D1C0:\KFUSA \¬
+1D1C1:\KLONGA PERFECTA REST
+1D1C2:\KLONGA IMPERFECTA REST
+1D1C3:\KBREVIS REST
+1D1C4:\KSEMIBREVIS REST
+1D1C5:\KMINIMA REST
+1D1C6:\KSEMIMINIMA REST
+1D1C7:\KTEMPUS PERFECTUM CUM PROL\”E PERFECTA
+1D1C8:\KTEMPUS PERFECTUM CUM PROL\”E IMPERFECTA
+1D1C9:\KTEMPUS PERFECTUM CUM PROL\”E PERFECTA DIMINUTION-1
+1D1CA:\KTEMPUS IMPERFECTUM CUM PROL\”E PERFECTA
+1D1CB:\KTEMPUS IMPERFECTUM CUM PROL\”E IMPERFECTA
+1D1CC:\KTEMPUS IMPERFECTUM CUM PROL\”E IMPERFECTA DIMINUTION-1
+1D1CD:\KTEMPUS IMPERFECTUM CUM PROL\”E IMPERFECTA DIMINUTION-2
+1D1CE:\KTEMPUS IMPERFECTUM CUM PROL\”E IMPERFECTA DIMINUTION-3
+1D1CF:\KCROIX
+1D1D0:\KGREGORIAN C CLEF
+1D1D1:\KGREGORIAN F CLEF
+1D1D2:\K\rB
+1D1D3:\KVIRGA
+1D1D4:\KPODATUS
+1D1D5:\KCLIVIS
+1D1D6:\KSCANDICUS
+1D1D7:\KCLIMACUS
+1D1D8:\KTORCULUS
+1D1D9:\KPORRECTUS
+1D1DA:\KPORRECTUS FLEXUS
+1D1DB:\KSCANDICUS FLEXUS
+1D1DC:\KTORCULUS RESUPINUS
+1D1DD:\KPES SUBPUNCTIS
+1D400:\îCAPITAL A
+1D401:\îCAPITAL B
+1D402:\îCAPITAL C
+1D403:\îCAPITAL D
+1D404:\îCAPITAL E
+1D405:\îCAPITAL F
+1D406:\îCAPITAL G
+1D407:\îCAPITAL H
+1D408:\îCAPITAL I
+1D409:\îCAPITAL J
+1D40A:\îCAPITAL K
+1D40B:\îCAPITAL L
+1D40C:\îCAPITAL M
+1D40D:\îCAPITAL N
+1D40E:\îCAPITAL O
+1D40F:\îCAPITAL P
+1D410:\îCAPITAL Q
+1D411:\îCAPITAL R
+1D412:\îCAPITAL S
+1D413:\îCAPITAL T
+1D414:\îCAPITAL U
+1D415:\îCAPITAL V
+1D416:\îCAPITAL W
+1D417:\îCAPITAL X
+1D418:\îCAPITAL Y
+1D419:\îCAPITAL Z
+1D41A:\î\§A
+1D41B:\î\§B
+1D41C:\î\§C
+1D41D:\î\§D
+1D41E:\î\§E
+1D41F:\î\§F
+1D420:\î\§G
+1D421:\î\§H
+1D422:\î\§I
+1D423:\î\§J
+1D424:\î\§K
+1D425:\î\§L
+1D426:\î\§M
+1D427:\î\§N
+1D428:\î\§O
+1D429:\î\§P
+1D42A:\î\§Q
+1D42B:\î\§R
+1D42C:\î\§S
+1D42D:\î\§T
+1D42E:\î\§U
+1D42F:\î\§V
+1D430:\î\§W
+1D431:\î\§X
+1D432:\î\§Y
+1D433:\î\§Z
+1D434:\E\›A
+1D435:\E\›B
+1D436:\E\›C
+1D437:\E\›D
+1D438:\E\›E
+1D439:\E\›F
+1D43A:\E\›G
+1D43B:\E\›H
+1D43C:\E\›I
+1D43D:\E\›J
+1D43E:\E\›K
+1D43F:\E\›L
+1D440:\E\›M
+1D441:\E\›N
+1D442:\E\›O
+1D443:\E\›P
+1D444:\E\›Q
+1D445:\E\›R
+1D446:\E\›S
+1D447:\E\›T
+1D448:\E\›U
+1D449:\E\›V
+1D44A:\E\›W
+1D44B:\E\›X
+1D44C:\E\›Y
+1D44D:\E\›Z
+1D44E:\E\—A
+1D44F:\E\—B
+1D450:\E\—C
+1D451:\E\—D
+1D452:\E\—E
+1D453:\E\—F
+1D454:\E\—G
+1D456:\E\—I
+1D457:\E\—J
+1D458:\E\—K
+1D459:\E\—L
+1D45A:\E\—M
+1D45B:\E\—N
+1D45C:\E\—O
+1D45D:\E\—P
+1D45E:\E\—Q
+1D45F:\E\—R
+1D460:\E\—S
+1D461:\E\—T
+1D462:\E\—U
+1D463:\E\—V
+1D464:\E\—W
+1D465:\E\—X
+1D466:\E\—Y
+1D467:\E\—Z
+1D468:\î\›A
+1D469:\î\›B
+1D46A:\î\›C
+1D46B:\î\›D
+1D46C:\î\›E
+1D46D:\î\›F
+1D46E:\î\›G
+1D46F:\î\›H
+1D470:\î\›I
+1D471:\î\›J
+1D472:\î\›K
+1D473:\î\›L
+1D474:\î\›M
+1D475:\î\›N
+1D476:\î\›O
+1D477:\î\›P
+1D478:\î\›Q
+1D479:\î\›R
+1D47A:\î\›S
+1D47B:\î\›T
+1D47C:\î\›U
+1D47D:\î\›V
+1D47E:\î\›W
+1D47F:\î\›X
+1D480:\î\›Y
+1D481:\î\›Z
+1D482:\î\—A
+1D483:\î\—B
+1D484:\î\—C
+1D485:\î\—D
+1D486:\î\—E
+1D487:\î\—F
+1D488:\î\—G
+1D489:\î\—H
+1D48A:\î\—I
+1D48B:\î\—J
+1D48C:\î\—K
+1D48D:\î\—L
+1D48E:\î\—M
+1D48F:\î\—N
+1D490:\î\—O
+1D491:\î\—P
+1D492:\î\—Q
+1D493:\î\—R
+1D494:\î\—S
+1D495:\î\—T
+1D496:\î\—U
+1D497:\î\—V
+1D498:\î\—W
+1D499:\î\—X
+1D49A:\î\—Y
+1D49B:\î\—Z
+1D49C:\E\Ž\ÒA
+1D49E:\E\Ž\ÒC
+1D49F:\E\Ž\ÒD
+1D4A2:\E\Ž\ÒG
+1D4A5:\E\Ž\ÒJ
+1D4A6:\E\Ž\ÒK
+1D4A9:\E\Ž\ÒN
+1D4AA:\E\Ž\ÒO
+1D4AB:\E\Ž\ÒP
+1D4AC:\E\Ž\ÒQ
+1D4AE:\E\Ž\ÒS
+1D4AF:\E\Ž\ÒT
+1D4B0:\E\Ž\ÒU
+1D4B1:\E\Ž\ÒV
+1D4B2:\E\Ž\ÒW
+1D4B3:\E\Ž\ÒX
+1D4B4:\E\Ž\ÒY
+1D4B5:\E\Ž\ÒZ
+1D4B6:\E\Ž\ÇA
+1D4B7:\E\Ž\ÇB
+1D4B8:\E\Ž\ÇC
+1D4B9:\E\Ž\ÇD
+1D4BB:\E\Ž\ÇF
+1D4BD:\E\Ž\ÇH
+1D4BE:\E\Ž\ÇI
+1D4BF:\E\Ž\ÇJ
+1D4C0:\E\Ž\ÇK
+1D4C2:\E\Ž\ÇM
+1D4C3:\E\Ž\ÇN
+1D4C5:\E\Ž\ÇP
+1D4C6:\E\Ž\ÇQ
+1D4C7:\E\Ž\ÇR
+1D4C8:\E\Ž\ÇS
+1D4C9:\E\Ž\ÇT
+1D4CA:\E\Ž\ÇU
+1D4CB:\E\Ž\ÇV
+1D4CC:\E\Ž\ÇW
+1D4CD:\E\Ž\ÇX
+1D4CE:\E\Ž\ÇY
+1D4CF:\E\Ž\ÇZ
+1D4D0:\î\Ž\ÒA
+1D4D1:\î\Ž\ÒB
+1D4D2:\î\Ž\ÒC
+1D4D3:\î\Ž\ÒD
+1D4D4:\î\Ž\ÒE
+1D4D5:\î\Ž\ÒF
+1D4D6:\î\Ž\ÒG
+1D4D7:\î\Ž\ÒH
+1D4D8:\î\Ž\ÒI
+1D4D9:\î\Ž\ÒJ
+1D4DA:\î\Ž\ÒK
+1D4DB:\î\Ž\ÒL
+1D4DC:\î\Ž\ÒM
+1D4DD:\î\Ž\ÒN
+1D4DE:\î\Ž\ÒO
+1D4DF:\î\Ž\ÒP
+1D4E0:\î\Ž\ÒQ
+1D4E1:\î\Ž\ÒR
+1D4E2:\î\Ž\ÒS
+1D4E3:\î\Ž\ÒT
+1D4E4:\î\Ž\ÒU
+1D4E5:\î\Ž\ÒV
+1D4E6:\î\Ž\ÒW
+1D4E7:\î\Ž\ÒX
+1D4E8:\î\Ž\ÒY
+1D4E9:\î\Ž\ÒZ
+1D4EA:\î\Ž\ÇA
+1D4EB:\î\Ž\ÇB
+1D4EC:\î\Ž\ÇC
+1D4ED:\î\Ž\ÇD
+1D4EE:\î\Ž\ÇE
+1D4EF:\î\Ž\ÇF
+1D4F0:\î\Ž\ÇG
+1D4F1:\î\Ž\ÇH
+1D4F2:\î\Ž\ÇI
+1D4F3:\î\Ž\ÇJ
+1D4F4:\î\Ž\ÇK
+1D4F5:\î\Ž\ÇL
+1D4F6:\î\Ž\ÇM
+1D4F7:\î\Ž\ÇN
+1D4F8:\î\Ž\ÇO
+1D4F9:\î\Ž\ÇP
+1D4FA:\î\Ž\ÇQ
+1D4FB:\î\Ž\ÇR
+1D4FC:\î\Ž\ÇS
+1D4FD:\î\Ž\ÇT
+1D4FE:\î\Ž\ÇU
+1D4FF:\î\Ž\ÇV
+1D500:\î\Ž\ÇW
+1D501:\î\Ž\ÇX
+1D502:\î\Ž\ÇY
+1D503:\î\Ž\ÇZ
+1D504:\E\£\ÒA
+1D505:\E\£\ÒB
+1D507:\E\£\ÒD
+1D508:\E\£\ÒE
+1D509:\E\£\ÒF
+1D50A:\E\£\ÒG
+1D50D:\E\£\ÒJ
+1D50E:\E\£\ÒK
+1D50F:\E\£\ÒL
+1D510:\E\£\ÒM
+1D511:\E\£\ÒN
+1D512:\E\£\ÒO
+1D513:\E\£\ÒP
+1D514:\E\£\ÒQ
+1D516:\E\£\ÒS
+1D517:\E\£\ÒT
+1D518:\E\£\ÒU
+1D519:\E\£\ÒV
+1D51A:\E\£\ÒW
+1D51B:\E\£\ÒX
+1D51C:\E\£\ÒY
+1D51E:\E\£\ÇA
+1D51F:\E\£\ÇB
+1D520:\E\£\ÇC
+1D521:\E\£\ÇD
+1D522:\E\£\ÇE
+1D523:\E\£\ÇF
+1D524:\E\£\ÇG
+1D525:\E\£\ÇH
+1D526:\E\£\ÇI
+1D527:\E\£\ÇJ
+1D528:\E\£\ÇK
+1D529:\E\£\ÇL
+1D52A:\E\£\ÇM
+1D52B:\E\£\ÇN
+1D52C:\E\£\ÇO
+1D52D:\E\£\ÇP
+1D52E:\E\£\ÇQ
+1D52F:\E\£\ÇR
+1D530:\E\£\ÇS
+1D531:\E\£\ÇT
+1D532:\E\£\ÇU
+1D533:\E\£\ÇV
+1D534:\E\£\ÇW
+1D535:\E\£\ÇX
+1D536:\E\£\ÇY
+1D537:\E\£\ÇZ
+1D538:\E\¤\ÒA
+1D539:\E\¤\ÒB
+1D53B:\E\¤\ÒD
+1D53C:\E\¤\ÒE
+1D53D:\E\¤\ÒF
+1D53E:\E\¤\ÒG
+1D540:\E\¤\ÒI
+1D541:\E\¤\ÒJ
+1D542:\E\¤\ÒK
+1D543:\E\¤\ÒL
+1D544:\E\¤\ÒM
+1D546:\E\¤\ÒO
+1D54A:\E\¤\ÒS
+1D54B:\E\¤\ÒT
+1D54C:\E\¤\ÒU
+1D54D:\E\¤\ÒV
+1D54E:\E\¤\ÒW
+1D54F:\E\¤\ÒX
+1D550:\E\¤\ÒY
+1D552:\E\¤\ÇA
+1D553:\E\¤\ÇB
+1D554:\E\¤\ÇC
+1D555:\E\¤\ÇD
+1D556:\E\¤\ÇE
+1D557:\E\¤\ÇF
+1D558:\E\¤\ÇG
+1D559:\E\¤\ÇH
+1D55A:\E\¤\ÇI
+1D55B:\E\¤\ÇJ
+1D55C:\E\¤\ÇK
+1D55D:\E\¤\ÇL
+1D55E:\E\¤\ÇM
+1D55F:\E\¤\ÇN
+1D560:\E\¤\ÇO
+1D561:\E\¤\ÇP
+1D562:\E\¤\ÇQ
+1D563:\E\¤\ÇR
+1D564:\E\¤\ÇS
+1D565:\E\¤\ÇT
+1D566:\E\¤\ÇU
+1D567:\E\¤\ÇV
+1D568:\E\¤\ÇW
+1D569:\E\¤\ÇX
+1D56A:\E\¤\ÇY
+1D56B:\E\¤\ÇZ
+1D56C:\î\£\ÒA
+1D56D:\î\£\ÒB
+1D56E:\î\£\ÒC
+1D56F:\î\£\ÒD
+1D570:\î\£\ÒE
+1D571:\î\£\ÒF
+1D572:\î\£\ÒG
+1D573:\î\£\ÒH
+1D574:\î\£\ÒI
+1D575:\î\£\ÒJ
+1D576:\î\£\ÒK
+1D577:\î\£\ÒL
+1D578:\î\£\ÒM
+1D579:\î\£\ÒN
+1D57A:\î\£\ÒO
+1D57B:\î\£\ÒP
+1D57C:\î\£\ÒQ
+1D57D:\î\£\ÒR
+1D57E:\î\£\ÒS
+1D57F:\î\£\ÒT
+1D580:\î\£\ÒU
+1D581:\î\£\ÒV
+1D582:\î\£\ÒW
+1D583:\î\£\ÒX
+1D584:\î\£\ÒY
+1D585:\î\£\ÒZ
+1D586:\î\£\ÇA
+1D587:\î\£\ÇB
+1D588:\î\£\ÇC
+1D589:\î\£\ÇD
+1D58A:\î\£\ÇE
+1D58B:\î\£\ÇF
+1D58C:\î\£\ÇG
+1D58D:\î\£\ÇH
+1D58E:\î\£\ÇI
+1D58F:\î\£\ÇJ
+1D590:\î\£\ÇK
+1D591:\î\£\ÇL
+1D592:\î\£\ÇM
+1D593:\î\£\ÇN
+1D594:\î\£\ÇO
+1D595:\î\£\ÇP
+1D596:\î\£\ÇQ
+1D597:\î\£\ÇR
+1D598:\î\£\ÇS
+1D599:\î\£\ÇT
+1D59A:\î\£\ÇU
+1D59B:\î\£\ÇV
+1D59C:\î\£\ÇW
+1D59D:\î\£\ÇX
+1D59E:\î\£\ÇY
+1D59F:\î\£\ÇZ
+1D5A0:\z\ÒA
+1D5A1:\z\ÒB
+1D5A2:\z\ÒC
+1D5A3:\z\ÒD
+1D5A4:\z\ÒE
+1D5A5:\z\ÒF
+1D5A6:\z\ÒG
+1D5A7:\z\ÒH
+1D5A8:\z\ÒI
+1D5A9:\z\ÒJ
+1D5AA:\z\ÒK
+1D5AB:\z\ÒL
+1D5AC:\z\ÒM
+1D5AD:\z\ÒN
+1D5AE:\z\ÒO
+1D5AF:\z\ÒP
+1D5B0:\z\ÒQ
+1D5B1:\z\ÒR
+1D5B2:\z\ÒS
+1D5B3:\z\ÒT
+1D5B4:\z\ÒU
+1D5B5:\z\ÒV
+1D5B6:\z\ÒW
+1D5B7:\z\ÒX
+1D5B8:\z\ÒY
+1D5B9:\z\ÒZ
+1D5BA:\z\ÇA
+1D5BB:\z\ÇB
+1D5BC:\z\ÇC
+1D5BD:\z\ÇD
+1D5BE:\z\ÇE
+1D5BF:\z\ÇF
+1D5C0:\z\ÇG
+1D5C1:\z\ÇH
+1D5C2:\z\ÇI
+1D5C3:\z\ÇJ
+1D5C4:\z\ÇK
+1D5C5:\z\ÇL
+1D5C6:\z\ÇM
+1D5C7:\z\ÇN
+1D5C8:\z\ÇO
+1D5C9:\z\ÇP
+1D5CA:\z\ÇQ
+1D5CB:\z\ÇR
+1D5CC:\z\ÇS
+1D5CD:\z\ÇT
+1D5CE:\z\ÇU
+1D5CF:\z\ÇV
+1D5D0:\z\ÇW
+1D5D1:\z\ÇX
+1D5D2:\z\ÇY
+1D5D3:\z\ÇZ
+1D5D4:\O\ÒA
+1D5D5:\O\ÒB
+1D5D6:\O\ÒC
+1D5D7:\O\ÒD
+1D5D8:\O\ÒE
+1D5D9:\O\ÒF
+1D5DA:\O\ÒG
+1D5DB:\O\ÒH
+1D5DC:\O\ÒI
+1D5DD:\O\ÒJ
+1D5DE:\O\ÒK
+1D5DF:\O\ÒL
+1D5E0:\O\ÒM
+1D5E1:\O\ÒN
+1D5E2:\O\ÒO
+1D5E3:\O\ÒP
+1D5E4:\O\ÒQ
+1D5E5:\O\ÒR
+1D5E6:\O\ÒS
+1D5E7:\O\ÒT
+1D5E8:\O\ÒU
+1D5E9:\O\ÒV
+1D5EA:\O\ÒW
+1D5EB:\O\ÒX
+1D5EC:\O\ÒY
+1D5ED:\O\ÒZ
+1D5EE:\O\ÇA
+1D5EF:\O\ÇB
+1D5F0:\O\ÇC
+1D5F1:\O\ÇD
+1D5F2:\O\ÇE
+1D5F3:\O\ÇF
+1D5F4:\O\ÇG
+1D5F5:\O\ÇH
+1D5F6:\O\ÇI
+1D5F7:\O\ÇJ
+1D5F8:\O\ÇK
+1D5F9:\O\ÇL
+1D5FA:\O\ÇM
+1D5FB:\O\ÇN
+1D5FC:\O\ÇO
+1D5FD:\O\ÇP
+1D5FE:\O\ÇQ
+1D5FF:\O\ÇR
+1D600:\O\ÇS
+1D601:\O\ÇT
+1D602:\O\ÇU
+1D603:\O\ÇV
+1D604:\O\ÇW
+1D605:\O\ÇX
+1D606:\O\ÇY
+1D607:\O\ÇZ
+1D608:\z \›A
+1D609:\z \›B
+1D60A:\z \›C
+1D60B:\z \›D
+1D60C:\z \›E
+1D60D:\z \›F
+1D60E:\z \›G
+1D60F:\z \›H
+1D610:\z \›I
+1D611:\z \›J
+1D612:\z \›K
+1D613:\z \›L
+1D614:\z \›M
+1D615:\z \›N
+1D616:\z \›O
+1D617:\z \›P
+1D618:\z \›Q
+1D619:\z \›R
+1D61A:\z \›S
+1D61B:\z \›T
+1D61C:\z \›U
+1D61D:\z \›V
+1D61E:\z \›W
+1D61F:\z \›X
+1D620:\z \›Y
+1D621:\z \›Z
+1D622:\z \—A
+1D623:\z \—B
+1D624:\z \—C
+1D625:\z \—D
+1D626:\z \—E
+1D627:\z \—F
+1D628:\z \—G
+1D629:\z \—H
+1D62A:\z \—I
+1D62B:\z \—J
+1D62C:\z \—K
+1D62D:\z \—L
+1D62E:\z \—M
+1D62F:\z \—N
+1D630:\z \—O
+1D631:\z \—P
+1D632:\z \—Q
+1D633:\z \—R
+1D634:\z \—S
+1D635:\z \—T
+1D636:\z \—U
+1D637:\z \—V
+1D638:\z \—W
+1D639:\z \—X
+1D63A:\z \—Y
+1D63B:\z \—Z
+1D63C:\O \›A
+1D63D:\O \›B
+1D63E:\O \›C
+1D63F:\O \›D
+1D640:\O \›E
+1D641:\O \›F
+1D642:\O \›G
+1D643:\O \›H
+1D644:\O \›I
+1D645:\O \›J
+1D646:\O \›K
+1D647:\O \›L
+1D648:\O \›M
+1D649:\O \›N
+1D64A:\O \›O
+1D64B:\O \›P
+1D64C:\O \›Q
+1D64D:\O \›R
+1D64E:\O \›S
+1D64F:\O \›T
+1D650:\O \›U
+1D651:\O \›V
+1D652:\O \›W
+1D653:\O \›X
+1D654:\O \›Y
+1D655:\O \›Z
+1D656:\O \—A
+1D657:\O \—B
+1D658:\O \—C
+1D659:\O \—D
+1D65A:\O \—E
+1D65B:\O \—F
+1D65C:\O \—G
+1D65D:\O \—H
+1D65E:\O \—I
+1D65F:\O \—J
+1D660:\O \—K
+1D661:\O \—L
+1D662:\O \—M
+1D663:\O \—N
+1D664:\O \—O
+1D665:\O \—P
+1D666:\O \—Q
+1D667:\O \—R
+1D668:\O \—S
+1D669:\O \—T
+1D66A:\O \—U
+1D66B:\O \—V
+1D66C:\O \—W
+1D66D:\O \—X
+1D66E:\O \—Y
+1D66F:\O \—Z
+1D670:\•\ÒA
+1D671:\•\ÒB
+1D672:\•\ÒC
+1D673:\•\ÒD
+1D674:\•\ÒE
+1D675:\•\ÒF
+1D676:\•\ÒG
+1D677:\•\ÒH
+1D678:\•\ÒI
+1D679:\•\ÒJ
+1D67A:\•\ÒK
+1D67B:\•\ÒL
+1D67C:\•\ÒM
+1D67D:\•\ÒN
+1D67E:\•\ÒO
+1D67F:\•\ÒP
+1D680:\•\ÒQ
+1D681:\•\ÒR
+1D682:\•\ÒS
+1D683:\•\ÒT
+1D684:\•\ÒU
+1D685:\•\ÒV
+1D686:\•\ÒW
+1D687:\•\ÒX
+1D688:\•\ÒY
+1D689:\•\ÒZ
+1D68A:\•\ÇA
+1D68B:\•\ÇB
+1D68C:\•\ÇC
+1D68D:\•\ÇD
+1D68E:\•\ÇE
+1D68F:\•\ÇF
+1D690:\•\ÇG
+1D691:\•\ÇH
+1D692:\•\ÇI
+1D693:\•\ÇJ
+1D694:\•\ÇK
+1D695:\•\ÇL
+1D696:\•\ÇM
+1D697:\•\ÇN
+1D698:\•\ÇO
+1D699:\•\ÇP
+1D69A:\•\ÇQ
+1D69B:\•\ÇR
+1D69C:\•\ÇS
+1D69D:\•\ÇT
+1D69E:\•\ÇU
+1D69F:\•\ÇV
+1D6A0:\•\ÇW
+1D6A1:\•\ÇX
+1D6A2:\•\ÇY
+1D6A3:\•\ÇZ
+1D6A8:\îCAPITAL \þ
+1D6A9:\îCAPITAL BETA
+1D6AA:\îCAPITAL GAMMA
+1D6AB:\îCAPITAL DELTA
+1D6AC:\îCAPITAL E\É
+1D6AD:\îCAPITAL ZETA
+1D6AE:\îCAPITAL ETA
+1D6AF:\îCAPITAL THETA
+1D6B0:\îCAPITAL IOTA
+1D6B1:\îCAPITAL KAPPA
+1D6B2:\îCAPITAL LAMDA
+1D6B3:\îCAPITAL MU
+1D6B4:\îCAPITAL NU
+1D6B5:\îCAPITAL XI
+1D6B6:\îCAPITAL OMICRON
+1D6B7:\îCAPITAL PI
+1D6B8:\îCAPITAL RHO
+1D6B9:\îCAPITAL THETA \
+1D6BA:\îCAPITAL SIGMA
+1D6BB:\îCAPITAL TAU
+1D6BC:\îCAPITAL U\É
+1D6BD:\îCAPITAL PHI
+1D6BE:\îCAPITAL CHI
+1D6BF:\îCAPITAL PSI
+1D6C0:\îCAPITAL \ü
+1D6C1:\îNABLA
+1D6C2:\î\§\þ
+1D6C3:\î\§BETA
+1D6C4:\î\§GAMMA
+1D6C5:\î\§DELTA
+1D6C6:\î\§E\É
+1D6C7:\î\§ZETA
+1D6C8:\î\§ETA
+1D6C9:\î\§THETA
+1D6CA:\î\§IOTA
+1D6CB:\î\§KAPPA
+1D6CC:\î\§LAMDA
+1D6CD:\î\§MU
+1D6CE:\î\§NU
+1D6CF:\î\§XI
+1D6D0:\î\§OMICRON
+1D6D1:\î\§PI
+1D6D2:\î\§RHO
+1D6D3:\î\§FINAL SIGMA
+1D6D4:\î\§SIGMA
+1D6D5:\î\§TAU
+1D6D6:\î\§U\É
+1D6D7:\î\§PHI
+1D6D8:\î\§CHI
+1D6D9:\î\§PSI
+1D6DA:\î\§\ü
+1D6DB:\îPARTIAL DIFFERENTIAL
+1D6DC:\îE\É \
+1D6DD:\îTHETA \
+1D6DE:\îKAPPA \
+1D6DF:\îPHI \
+1D6E0:\îRHO \
+1D6E1:\îPI \
+1D6E2:\E\›\þ
+1D6E3:\E\›BETA
+1D6E4:\E\›GAMMA
+1D6E5:\E\›DELTA
+1D6E6:\E\›E\É
+1D6E7:\E\›ZETA
+1D6E8:\E\›ETA
+1D6E9:\E\›THETA
+1D6EA:\E\›IOTA
+1D6EB:\E\›KAPPA
+1D6EC:\E\›LAMDA
+1D6ED:\E\›MU
+1D6EE:\E\›NU
+1D6EF:\E\›XI
+1D6F0:\E\›OMICRON
+1D6F1:\E\›PI
+1D6F2:\E\›RHO
+1D6F3:\E\›THETA \
+1D6F4:\E\›SIGMA
+1D6F5:\E\›TAU
+1D6F6:\E\›U\É
+1D6F7:\E\›PHI
+1D6F8:\E\›CHI
+1D6F9:\E\›PSI
+1D6FA:\E\›\ü
+1D6FB:\E\f NABLA
+1D6FC:\E\—\þ
+1D6FD:\E\—BETA
+1D6FE:\E\—GAMMA
+1D6FF:\E\—DELTA
+1D700:\E\—E\É
+1D701:\E\—ZETA
+1D702:\E\—ETA
+1D703:\E\—THETA
+1D704:\E\—IOTA
+1D705:\E\—KAPPA
+1D706:\E\—LAMDA
+1D707:\E\—MU
+1D708:\E\—NU
+1D709:\E\—XI
+1D70A:\E\—OMICRON
+1D70B:\E\—PI
+1D70C:\E\—RHO
+1D70D:\E\—FINAL SIGMA
+1D70E:\E\—SIGMA
+1D70F:\E\—TAU
+1D710:\E\—U\É
+1D711:\E\—PHI
+1D712:\E\—CHI
+1D713:\E\—PSI
+1D714:\E\—\ü
+1D715:\E\f PARTIAL DIFFERENTIAL
+1D716:\E\f E\É \
+1D717:\E\f THETA \
+1D718:\E\f KAPPA \
+1D719:\E\f PHI \
+1D71A:\E\f RHO \
+1D71B:\E\f PI \
+1D71C:\î\›\þ
+1D71D:\î\›BETA
+1D71E:\î\›GAMMA
+1D71F:\î\›DELTA
+1D720:\î\›E\É
+1D721:\î\›ZETA
+1D722:\î\›ETA
+1D723:\î\›THETA
+1D724:\î\›IOTA
+1D725:\î\›KAPPA
+1D726:\î\›LAMDA
+1D727:\î\›MU
+1D728:\î\›NU
+1D729:\î\›XI
+1D72A:\î\›OMICRON
+1D72B:\î\›PI
+1D72C:\î\›RHO
+1D72D:\î\›THETA \
+1D72E:\î\›SIGMA
+1D72F:\î\›TAU
+1D730:\î\›U\É
+1D731:\î\›PHI
+1D732:\î\›CHI
+1D733:\î\›PSI
+1D734:\î\›\ü
+1D735:\î\f NABLA
+1D736:\î\—\þ
+1D737:\î\—BETA
+1D738:\î\—GAMMA
+1D739:\î\—DELTA
+1D73A:\î\—E\É
+1D73B:\î\—ZETA
+1D73C:\î\—ETA
+1D73D:\î\—THETA
+1D73E:\î\—IOTA
+1D73F:\î\—KAPPA
+1D740:\î\—LAMDA
+1D741:\î\—MU
+1D742:\î\—NU
+1D743:\î\—XI
+1D744:\î\—OMICRON
+1D745:\î\—PI
+1D746:\î\—RHO
+1D747:\î\—FINAL SIGMA
+1D748:\î\—SIGMA
+1D749:\î\—TAU
+1D74A:\î\—U\É
+1D74B:\î\—PHI
+1D74C:\î\—CHI
+1D74D:\î\—PSI
+1D74E:\î\—\ü
+1D74F:\î\f PARTIAL DIFFERENTIAL
+1D750:\î\f E\É \
+1D751:\î\f THETA \
+1D752:\î\f KAPPA \
+1D753:\î\f PHI \
+1D754:\î\f RHO \
+1D755:\î\f PI \
+1D756:\O\Ò\þ
+1D757:\O\ÒBETA
+1D758:\O\ÒGAMMA
+1D759:\O\ÒDELTA
+1D75A:\O\ÒE\É
+1D75B:\O\ÒZETA
+1D75C:\O\ÒETA
+1D75D:\O\ÒTHETA
+1D75E:\O\ÒIOTA
+1D75F:\O\ÒKAPPA
+1D760:\O\ÒLAMDA
+1D761:\O\ÒMU
+1D762:\O\ÒNU
+1D763:\O\ÒXI
+1D764:\O\ÒOMICRON
+1D765:\O\ÒPI
+1D766:\O\ÒRHO
+1D767:\O\ÒTHETA \
+1D768:\O\ÒSIGMA
+1D769:\O\ÒTAU
+1D76A:\O\ÒU\É
+1D76B:\O\ÒPHI
+1D76C:\O\ÒCHI
+1D76D:\O\ÒPSI
+1D76E:\O\Ò\ü
+1D76F:\O NABLA
+1D770:\O\Ç\þ
+1D771:\O\ÇBETA
+1D772:\O\ÇGAMMA
+1D773:\O\ÇDELTA
+1D774:\O\ÇE\É
+1D775:\O\ÇZETA
+1D776:\O\ÇETA
+1D777:\O\ÇTHETA
+1D778:\O\ÇIOTA
+1D779:\O\ÇKAPPA
+1D77A:\O\ÇLAMDA
+1D77B:\O\ÇMU
+1D77C:\O\ÇNU
+1D77D:\O\ÇXI
+1D77E:\O\ÇOMICRON
+1D77F:\O\ÇPI
+1D780:\O\ÇRHO
+1D781:\O\ÇFINAL SIGMA
+1D782:\O\ÇSIGMA
+1D783:\O\ÇTAU
+1D784:\O\ÇU\É
+1D785:\O\ÇPHI
+1D786:\O\ÇCHI
+1D787:\O\ÇPSI
+1D788:\O\Ç\ü
+1D789:\O PARTIAL DIFFERENTIAL
+1D78A:\O E\É \
+1D78B:\O THETA \
+1D78C:\O KAPPA \
+1D78D:\O PHI \
+1D78E:\O RHO \
+1D78F:\O PI \
+1D790:\O \›\þ
+1D791:\O \›BETA
+1D792:\O \›GAMMA
+1D793:\O \›DELTA
+1D794:\O \›E\É
+1D795:\O \›ZETA
+1D796:\O \›ETA
+1D797:\O \›THETA
+1D798:\O \›IOTA
+1D799:\O \›KAPPA
+1D79A:\O \›LAMDA
+1D79B:\O \›MU
+1D79C:\O \›NU
+1D79D:\O \›XI
+1D79E:\O \›OMICRON
+1D79F:\O \›PI
+1D7A0:\O \›RHO
+1D7A1:\O \›THETA \
+1D7A2:\O \›SIGMA
+1D7A3:\O \›TAU
+1D7A4:\O \›U\É
+1D7A5:\O \›PHI
+1D7A6:\O \›CHI
+1D7A7:\O \›PSI
+1D7A8:\O \›\ü
+1D7A9:\O \f NABLA
+1D7AA:\O \—\þ
+1D7AB:\O \—BETA
+1D7AC:\O \—GAMMA
+1D7AD:\O \—DELTA
+1D7AE:\O \—E\É
+1D7AF:\O \—ZETA
+1D7B0:\O \—ETA
+1D7B1:\O \—THETA
+1D7B2:\O \—IOTA
+1D7B3:\O \—KAPPA
+1D7B4:\O \—LAMDA
+1D7B5:\O \—MU
+1D7B6:\O \—NU
+1D7B7:\O \—XI
+1D7B8:\O \—OMICRON
+1D7B9:\O \—PI
+1D7BA:\O \—RHO
+1D7BB:\O \—FINAL SIGMA
+1D7BC:\O \—SIGMA
+1D7BD:\O \—TAU
+1D7BE:\O \—U\É
+1D7BF:\O \—PHI
+1D7C0:\O \—CHI
+1D7C1:\O \—PSI
+1D7C2:\O \—\ü
+1D7C3:\O \f PARTIAL DIFFERENTIAL
+1D7C4:\O \f E\É \
+1D7C5:\O \f THETA \
+1D7C6:\O \f KAPPA \
+1D7C7:\O \f PHI \
+1D7C8:\O \f RHO \
+1D7C9:\O \f PI \
+1D7CE:\îDIGIT ZERO
+1D7CF:\îDIGIT ONE
+1D7D0:\îDIGIT TWO
+1D7D1:\îDIGIT THREE
+1D7D2:\îDIGIT FOUR
+1D7D3:\îDIGIT FIVE
+1D7D4:\îDIGIT SIX
+1D7D5:\îDIGIT SEVEN
+1D7D6:\îDIGIT E\¼
+1D7D7:\îDIGIT NINE
+1D7D8:\E\¤\hZERO
+1D7D9:\E\¤\hONE
+1D7DA:\E\¤\hTWO
+1D7DB:\E\¤\hTHREE
+1D7DC:\E\¤\hFOUR
+1D7DD:\E\¤\hFIVE
+1D7DE:\E\¤\hSIX
+1D7DF:\E\¤\hSEVEN
+1D7E0:\E\¤\hE\¼
+1D7E1:\E\¤\hNINE
+1D7E2:\z\hZERO
+1D7E3:\z\hONE
+1D7E4:\z\hTWO
+1D7E5:\z\hTHREE
+1D7E6:\z\hFOUR
+1D7E7:\z\hFIVE
+1D7E8:\z\hSIX
+1D7E9:\z\hSEVEN
+1D7EA:\z\hE\¼
+1D7EB:\z\hNINE
+1D7EC:\O\hZERO
+1D7ED:\O\hONE
+1D7EE:\O\hTWO
+1D7EF:\O\hTHREE
+1D7F0:\O\hFOUR
+1D7F1:\O\hFIVE
+1D7F2:\O\hSIX
+1D7F3:\O\hSEVEN
+1D7F4:\O\hE\¼
+1D7F5:\O\hNINE
+1D7F6:\•\hZERO
+1D7F7:\•\hONE
+1D7F8:\•\hTWO
+1D7F9:\•\hTHREE
+1D7FA:\•\hFOUR
+1D7FB:\•\hFIVE
+1D7FC:\•\hSIX
+1D7FD:\•\hSEVEN
+1D7FE:\•\hE\¼
+1D7FF:\•\hNINE
+20000-2A6D6:<CJK Ideograph Extension B>
+2F800:\Þ00
+2F801:\Þ01
+2F802:\Þ02
+2F803:\Þ03
+2F804:\Þ04
+2F805:\Þ05
+2F806:\Þ06
+2F807:\Þ07
+2F808:\Þ08
+2F809:\Þ09
+2F80A:\Þ0A
+2F80B:\Þ0B
+2F80C:\Þ0C
+2F80D:\Þ0D
+2F80E:\Þ0E
+2F80F:\Þ0F
+2F810:\Þ10
+2F811:\Þ11
+2F812:\Þ12
+2F813:\Þ13
+2F814:\Þ14
+2F815:\Þ15
+2F816:\Þ16
+2F817:\Þ17
+2F818:\Þ18
+2F819:\Þ19
+2F81A:\Þ1A
+2F81B:\Þ1B
+2F81C:\Þ1C
+2F81D:\Þ1D
+2F81E:\Þ1E
+2F81F:\Þ1F
+2F820:\Þ20
+2F821:\Þ21
+2F822:\Þ22
+2F823:\Þ23
+2F824:\Þ24
+2F825:\Þ25
+2F826:\Þ26
+2F827:\Þ27
+2F828:\Þ28
+2F829:\Þ29
+2F82A:\Þ2A
+2F82B:\Þ2B
+2F82C:\Þ2C
+2F82D:\Þ2D
+2F82E:\Þ2E
+2F82F:\Þ2F
+2F830:\Þ30
+2F831:\Þ31
+2F832:\Þ32
+2F833:\Þ33
+2F834:\Þ34
+2F835:\Þ35
+2F836:\Þ36
+2F837:\Þ37
+2F838:\Þ38
+2F839:\Þ39
+2F83A:\Þ3A
+2F83B:\Þ3B
+2F83C:\Þ3C
+2F83D:\Þ3D
+2F83E:\Þ3E
+2F83F:\Þ3F
+2F840:\Þ40
+2F841:\Þ41
+2F842:\Þ42
+2F843:\Þ43
+2F844:\Þ44
+2F845:\Þ45
+2F846:\Þ46
+2F847:\Þ47
+2F848:\Þ48
+2F849:\Þ49
+2F84A:\Þ4A
+2F84B:\Þ4B
+2F84C:\Þ4C
+2F84D:\Þ4D
+2F84E:\Þ4E
+2F84F:\Þ4F
+2F850:\Þ50
+2F851:\Þ51
+2F852:\Þ52
+2F853:\Þ53
+2F854:\Þ54
+2F855:\Þ55
+2F856:\Þ56
+2F857:\Þ57
+2F858:\Þ58
+2F859:\Þ59
+2F85A:\Þ5A
+2F85B:\Þ5B
+2F85C:\Þ5C
+2F85D:\Þ5D
+2F85E:\Þ5E
+2F85F:\Þ5F
+2F860:\Þ60
+2F861:\Þ61
+2F862:\Þ62
+2F863:\Þ63
+2F864:\Þ64
+2F865:\Þ65
+2F866:\Þ66
+2F867:\Þ67
+2F868:\Þ68
+2F869:\Þ69
+2F86A:\Þ6A
+2F86B:\Þ6B
+2F86C:\Þ6C
+2F86D:\Þ6D
+2F86E:\Þ6E
+2F86F:\Þ6F
+2F870:\Þ70
+2F871:\Þ71
+2F872:\Þ72
+2F873:\Þ73
+2F874:\Þ74
+2F875:\Þ75
+2F876:\Þ76
+2F877:\Þ77
+2F878:\Þ78
+2F879:\Þ79
+2F87A:\Þ7A
+2F87B:\Þ7B
+2F87C:\Þ7C
+2F87D:\Þ7D
+2F87E:\Þ7E
+2F87F:\Þ7F
+2F880:\Þ80
+2F881:\Þ81
+2F882:\Þ82
+2F883:\Þ83
+2F884:\Þ84
+2F885:\Þ85
+2F886:\Þ86
+2F887:\Þ87
+2F888:\Þ88
+2F889:\Þ89
+2F88A:\Þ8A
+2F88B:\Þ8B
+2F88C:\Þ8C
+2F88D:\Þ8D
+2F88E:\Þ8E
+2F88F:\Þ8F
+2F890:\Þ90
+2F891:\Þ91
+2F892:\Þ92
+2F893:\Þ93
+2F894:\Þ94
+2F895:\Þ95
+2F896:\Þ96
+2F897:\Þ97
+2F898:\Þ98
+2F899:\Þ99
+2F89A:\Þ9A
+2F89B:\Þ9B
+2F89C:\Þ9C
+2F89D:\Þ9D
+2F89E:\Þ9E
+2F89F:\Þ9F
+2F8A0:\ÞA0
+2F8A1:\ÞA1
+2F8A2:\ÞA2
+2F8A3:\ÞA3
+2F8A4:\ÞA4
+2F8A5:\ÞA5
+2F8A6:\ÞA6
+2F8A7:\ÞA7
+2F8A8:\ÞA8
+2F8A9:\ÞA9
+2F8AA:\ÞAA
+2F8AB:\ÞAB
+2F8AC:\ÞAC
+2F8AD:\ÞAD
+2F8AE:\ÞAE
+2F8AF:\ÞAF
+2F8B0:\ÞB0
+2F8B1:\ÞB1
+2F8B2:\ÞB2
+2F8B3:\ÞB3
+2F8B4:\ÞB4
+2F8B5:\ÞB5
+2F8B6:\ÞB6
+2F8B7:\ÞB7
+2F8B8:\ÞB8
+2F8B9:\ÞB9
+2F8BA:\ÞBA
+2F8BB:\ÞBB
+2F8BC:\ÞBC
+2F8BD:\ÞBD
+2F8BE:\ÞBE
+2F8BF:\ÞBF
+2F8C0:\ÞC0
+2F8C1:\ÞC1
+2F8C2:\ÞC2
+2F8C3:\ÞC3
+2F8C4:\ÞC4
+2F8C5:\ÞC5
+2F8C6:\ÞC6
+2F8C7:\ÞC7
+2F8C8:\ÞC8
+2F8C9:\ÞC9
+2F8CA:\ÞCA
+2F8CB:\ÞCB
+2F8CC:\ÞCC
+2F8CD:\ÞCD
+2F8CE:\ÞCE
+2F8CF:\ÞCF
+2F8D0:\ÞD0
+2F8D1:\ÞD1
+2F8D2:\ÞD2
+2F8D3:\ÞD3
+2F8D4:\ÞD4
+2F8D5:\ÞD5
+2F8D6:\ÞD6
+2F8D7:\ÞD7
+2F8D8:\ÞD8
+2F8D9:\ÞD9
+2F8DA:\ÞDA
+2F8DB:\ÞDB
+2F8DC:\ÞDC
+2F8DD:\ÞDD
+2F8DE:\ÞDE
+2F8DF:\ÞDF
+2F8E0:\ÞE0
+2F8E1:\ÞE1
+2F8E2:\ÞE2
+2F8E3:\ÞE3
+2F8E4:\ÞE4
+2F8E5:\ÞE5
+2F8E6:\ÞE6
+2F8E7:\ÞE7
+2F8E8:\ÞE8
+2F8E9:\ÞE9
+2F8EA:\ÞEA
+2F8EB:\ÞEB
+2F8EC:\ÞEC
+2F8ED:\ÞED
+2F8EE:\ÞEE
+2F8EF:\ÞEF
+2F8F0:\ÞF0
+2F8F1:\ÞF1
+2F8F2:\ÞF2
+2F8F3:\ÞF3
+2F8F4:\ÞF4
+2F8F5:\ÞF5
+2F8F6:\ÞF6
+2F8F7:\ÞF7
+2F8F8:\ÞF8
+2F8F9:\ÞF9
+2F8FA:\ÞFA
+2F8FB:\ÞFB
+2F8FC:\ÞFC
+2F8FD:\ÞFD
+2F8FE:\ÞFE
+2F8FF:\ÞFF
+2F900:\ß00
+2F901:\ß01
+2F902:\ß02
+2F903:\ß03
+2F904:\ß04
+2F905:\ß05
+2F906:\ß06
+2F907:\ß07
+2F908:\ß08
+2F909:\ß09
+2F90A:\ß0A
+2F90B:\ß0B
+2F90C:\ß0C
+2F90D:\ß0D
+2F90E:\ß0E
+2F90F:\ß0F
+2F910:\ß10
+2F911:\ß11
+2F912:\ß12
+2F913:\ß13
+2F914:\ß14
+2F915:\ß15
+2F916:\ß16
+2F917:\ß17
+2F918:\ß18
+2F919:\ß19
+2F91A:\ß1A
+2F91B:\ß1B
+2F91C:\ß1C
+2F91D:\ß1D
+2F91E:\ß1E
+2F91F:\ß1F
+2F920:\ß20
+2F921:\ß21
+2F922:\ß22
+2F923:\ß23
+2F924:\ß24
+2F925:\ß25
+2F926:\ß26
+2F927:\ß27
+2F928:\ß28
+2F929:\ß29
+2F92A:\ß2A
+2F92B:\ß2B
+2F92C:\ß2C
+2F92D:\ß2D
+2F92E:\ß2E
+2F92F:\ß2F
+2F930:\ß30
+2F931:\ß31
+2F932:\ß32
+2F933:\ß33
+2F934:\ß34
+2F935:\ß35
+2F936:\ß36
+2F937:\ß37
+2F938:\ß38
+2F939:\ß39
+2F93A:\ß3A
+2F93B:\ß3B
+2F93C:\ß3C
+2F93D:\ß3D
+2F93E:\ß3E
+2F93F:\ß3F
+2F940:\ß40
+2F941:\ß41
+2F942:\ß42
+2F943:\ß43
+2F944:\ß44
+2F945:\ß45
+2F946:\ß46
+2F947:\ß47
+2F948:\ß48
+2F949:\ß49
+2F94A:\ß4A
+2F94B:\ß4B
+2F94C:\ß4C
+2F94D:\ß4D
+2F94E:\ß4E
+2F94F:\ß4F
+2F950:\ß50
+2F951:\ß51
+2F952:\ß52
+2F953:\ß53
+2F954:\ß54
+2F955:\ß55
+2F956:\ß56
+2F957:\ß57
+2F958:\ß58
+2F959:\ß59
+2F95A:\ß5A
+2F95B:\ß5B
+2F95C:\ß5C
+2F95D:\ß5D
+2F95E:\ß5E
+2F95F:\ß5F
+2F960:\ß60
+2F961:\ß61
+2F962:\ß62
+2F963:\ß63
+2F964:\ß64
+2F965:\ß65
+2F966:\ß66
+2F967:\ß67
+2F968:\ß68
+2F969:\ß69
+2F96A:\ß6A
+2F96B:\ß6B
+2F96C:\ß6C
+2F96D:\ß6D
+2F96E:\ß6E
+2F96F:\ß6F
+2F970:\ß70
+2F971:\ß71
+2F972:\ß72
+2F973:\ß73
+2F974:\ß74
+2F975:\ß75
+2F976:\ß76
+2F977:\ß77
+2F978:\ß78
+2F979:\ß79
+2F97A:\ß7A
+2F97B:\ß7B
+2F97C:\ß7C
+2F97D:\ß7D
+2F97E:\ß7E
+2F97F:\ß7F
+2F980:\ß80
+2F981:\ß81
+2F982:\ß82
+2F983:\ß83
+2F984:\ß84
+2F985:\ß85
+2F986:\ß86
+2F987:\ß87
+2F988:\ß88
+2F989:\ß89
+2F98A:\ß8A
+2F98B:\ß8B
+2F98C:\ß8C
+2F98D:\ß8D
+2F98E:\ß8E
+2F98F:\ß8F
+2F990:\ß90
+2F991:\ß91
+2F992:\ß92
+2F993:\ß93
+2F994:\ß94
+2F995:\ß95
+2F996:\ß96
+2F997:\ß97
+2F998:\ß98
+2F999:\ß99
+2F99A:\ß9A
+2F99B:\ß9B
+2F99C:\ß9C
+2F99D:\ß9D
+2F99E:\ß9E
+2F99F:\ß9F
+2F9A0:\ßA0
+2F9A1:\ßA1
+2F9A2:\ßA2
+2F9A3:\ßA3
+2F9A4:\ßA4
+2F9A5:\ßA5
+2F9A6:\ßA6
+2F9A7:\ßA7
+2F9A8:\ßA8
+2F9A9:\ßA9
+2F9AA:\ßAA
+2F9AB:\ßAB
+2F9AC:\ßAC
+2F9AD:\ßAD
+2F9AE:\ßAE
+2F9AF:\ßAF
+2F9B0:\ßB0
+2F9B1:\ßB1
+2F9B2:\ßB2
+2F9B3:\ßB3
+2F9B4:\ßB4
+2F9B5:\ßB5
+2F9B6:\ßB6
+2F9B7:\ßB7
+2F9B8:\ßB8
+2F9B9:\ßB9
+2F9BA:\ßBA
+2F9BB:\ßBB
+2F9BC:\ßBC
+2F9BD:\ßBD
+2F9BE:\ßBE
+2F9BF:\ßBF
+2F9C0:\ßC0
+2F9C1:\ßC1
+2F9C2:\ßC2
+2F9C3:\ßC3
+2F9C4:\ßC4
+2F9C5:\ßC5
+2F9C6:\ßC6
+2F9C7:\ßC7
+2F9C8:\ßC8
+2F9C9:\ßC9
+2F9CA:\ßCA
+2F9CB:\ßCB
+2F9CC:\ßCC
+2F9CD:\ßCD
+2F9CE:\ßCE
+2F9CF:\ßCF
+2F9D0:\ßD0
+2F9D1:\ßD1
+2F9D2:\ßD2
+2F9D3:\ßD3
+2F9D4:\ßD4
+2F9D5:\ßD5
+2F9D6:\ßD6
+2F9D7:\ßD7
+2F9D8:\ßD8
+2F9D9:\ßD9
+2F9DA:\ßDA
+2F9DB:\ßDB
+2F9DC:\ßDC
+2F9DD:\ßDD
+2F9DE:\ßDE
+2F9DF:\ßDF
+2F9E0:\ßE0
+2F9E1:\ßE1
+2F9E2:\ßE2
+2F9E3:\ßE3
+2F9E4:\ßE4
+2F9E5:\ßE5
+2F9E6:\ßE6
+2F9E7:\ßE7
+2F9E8:\ßE8
+2F9E9:\ßE9
+2F9EA:\ßEA
+2F9EB:\ßEB
+2F9EC:\ßEC
+2F9ED:\ßED
+2F9EE:\ßEE
+2F9EF:\ßEF
+2F9F0:\ßF0
+2F9F1:\ßF1
+2F9F2:\ßF2
+2F9F3:\ßF3
+2F9F4:\ßF4
+2F9F5:\ßF5
+2F9F6:\ßF6
+2F9F7:\ßF7
+2F9F8:\ßF8
+2F9F9:\ßF9
+2F9FA:\ßFA
+2F9FB:\ßFB
+2F9FC:\ßFC
+2F9FD:\ßFD
+2F9FE:\ßFE
+2F9FF:\ßFF
+2FA00:\1A00
+2FA01:\1A01
+2FA02:\1A02
+2FA03:\1A03
+2FA04:\1A04
+2FA05:\1A05
+2FA06:\1A06
+2FA07:\1A07
+2FA08:\1A08
+2FA09:\1A09
+2FA0A:\1A0A
+2FA0B:\1A0B
+2FA0C:\1A0C
+2FA0D:\1A0D
+2FA0E:\1A0E
+2FA0F:\1A0F
+2FA10:\1A10
+2FA11:\1A11
+2FA12:\1A12
+2FA13:\1A13
+2FA14:\1A14
+2FA15:\1A15
+2FA16:\1A16
+2FA17:\1A17
+2FA18:\1A18
+2FA19:\1A19
+2FA1A:\1A1A
+2FA1B:\1A1B
+2FA1C:\1A1C
+2FA1D:\1A1D
+E0001:LANGUAGE TAG
+E0020:TAG SPACE
+E0021:TAG EXCLAM\”\¥
+E0022:TAG QUOT\”\¥
+E0023:TAG \­SIGN
+E0024:TAG DOLLAR\‚
+E0025:TAG PERCENT\‚
+E0026:TAG AMPERSAND
+E0027:TAG APOSTROPHE
+E0028:TAG \‰ \ÑS
+E0029:TAG \ù\ÑS
+E002A:TAG ASTERISK
+E002B:TAG PLUS\‚
+E002C:TAG COMMA
+E002D:TAG HYPHEN-MINUS
+E002E:TAG\é
+E002F:TAG SOLIDUS
+E0030:TAG\hZERO
+E0031:TAG\hONE
+E0032:TAG\hTWO
+E0033:TAG\hTHREE
+E0034:TAG\hFOUR
+E0035:TAG\hFIVE
+E0036:TAG\hSIX
+E0037:TAG\hSEVEN
+E0038:TAG\hE\¼
+E0039:TAG\hNINE
+E003A:TAG COLON
+E003B:TAG SEMICOLON
+E003C:TAG \µ\‚
+E003D:TAG EQUALS\‚
+E003E:TAG \’\‚
+E003F:TAG QUESTION\¥
+E0040:TAG COMMERCIAL AT
+E0041:TAG \PA
+E0042:TAG \PB
+E0043:TAG \PC
+E0044:TAG \PD
+E0045:TAG \PE
+E0046:TAG \PF
+E0047:TAG \PG
+E0048:TAG \PH
+E0049:TAG \PI
+E004A:TAG \PJ
+E004B:TAG \PK
+E004C:TAG \PL
+E004D:TAG \PM
+E004E:TAG \PN
+E004F:TAG \PO
+E0050:TAG \PP
+E0051:TAG \PQ
+E0052:TAG \PR
+E0053:TAG \PS
+E0054:TAG \PT
+E0055:TAG \PU
+E0056:TAG \PV
+E0057:TAG \PW
+E0058:TAG \PX
+E0059:TAG \PY
+E005A:TAG \PZ
+E005B:TAG \‰ \r\–
+E005C:TAG REVERSE SOLIDUS
+E005D:TAG \ù\r\–
+E005E:TAG CIRCUMFLEX\×
+E005F:TAG LOW \ä
+E0060:TAG GRAVE\×
+E0061:TAG \LA
+E0062:TAG \LB
+E0063:TAG \LC
+E0064:TAG \LD
+E0065:TAG \LE
+E0066:TAG \LF
+E0067:TAG \LG
+E0068:TAG \LH
+E0069:TAG \LI
+E006A:TAG \LJ
+E006B:TAG \LK
+E006C:TAG \LL
+E006D:TAG \LM
+E006E:TAG \LN
+E006F:TAG \LO
+E0070:TAG \LP
+E0071:TAG \LQ
+E0072:TAG \LR
+E0073:TAG \LS
+E0074:TAG \LT
+E0075:TAG \LU
+E0076:TAG \LV
+E0077:TAG \LW
+E0078:TAG \LX
+E0079:TAG \LY
+E007A:TAG \LZ
+E007B:TAG \‰ CURLY \–
+E007C:TAG \€ \ä
+E007D:TAG \ùCURLY \–
+E007E:TAG \æ
+E007F:CANCEL TAG
+F0000-FFFFD:<Plane 15 Private Use>
+100000-10FFFD:<Plane 16 Private Use>
+T0:DOUBLE
+T1:CJK COMPATIBILITY IDEOGRAPH-2F
+T2: INITIAL FORM
+T3:THAI CHARACTER
+T4:HALFWIDTH
+T5:TIBETAN
+T6: FINAL FORM
+T7:SEONG
+T8:IDEOGRAPH
+T9:GREEK CAPITAL LETTER
+T@: LETTER
+TB:CJK COMPATIBILITY IDEOGRAPH-
+TC: SYLLABLE
+TE:MATHEMATICAL
+TF:CANADIAN SYLLABICS
+TH: WITH
+TI: CAPITAL
+TJ:ARABIC LIGATURE
+TK:MUSICAL SYMBOL
+TL:LATIN SMALL LETTER
+TM:BRAILLE PATTERN DOTS-
+TN: SMALL
+TO:MATHEMATICAL SANS-SERIF BOLD
+TP:LATIN CAPITAL LETTER
+TQ: ISOLATED FORM
+TU:KANGXI RADICAL
+TV:ETHIOPIC SYLLABLE
+TX:AL FORM
+TY:BYZANTINE MUSICAL SYMBOL
+TZ:YI SYLLABLE
+T^:ARABIC LETTER
+T_:IDEOGRAPHIC TELEGRAPH SYMBOL FOR
+Tb: VOWEL SIGN
+Tc:CIRCLED
+Te:HANGUL
+Tf:ITALIC
+Tg:CYRILLIC
+Th: DIGIT
+Ti: AND
+Tj:BOX DRAWINGS
+Tk:CANADIAN SYLLABICS CARRIER
+Tl:APL FUNCTIONAL SYMBOL
+Tm:MATHEMATICAL BOLD
+Tn:KATAKANA
+To:COMBINING
+Tp: ABOVE
+Tq:RIGHT
+Tr:SQUARE
+Tt:PARENTHESIZED
+Tu: ARROW
+Tv: RADICAL
+Tx:MONGOLIAN LETTER
+Ty:GREEK SMALL LETTER
+Tz:MATHEMATICAL SANS-SERIF
+T€:VERTICAL
+T:CANADIAN SYLLABICS WEST-CREE
+T‚: SIGN
+Tƒ:WARDS HARPOON WITH BARB
+T„:DEVANAGARI
+T…: BELOW
+T†:FULLWIDTH
+T‡: WITH ALEF MAKSURA
+Tˆ: WITH CIRCUMFLEX
+T‰:LEFT
+TŠ:WARDS
+T‹:HIRAGANA LETTER
+TŒ:CHEROKEE LETTER
+T:SYMBOL
+TŽ:SCRIPT
+T: WITH MEEM
+T:HORIZONTAL
+T‘: EQUAL TO
+T’:GREATER-THAN
+T“:HANGUL JONGSEONG
+T”:ATION
+T•:MATHEMATICAL MONOSPACE
+T–:BRACKET
+T—:ITALIC SMALL
+T™:HANGUL CHOSEONG
+Tš:MALAYALAM
+T›:ITALIC CAPITAL
+Tœ:GEGRAMMENI
+T:TIBETAN SUBJOINED LETTER
+Tž: WITH DIAERESIS
+TŸ:HEBREW
+T :CJK COMPATIBILITY IDEOGRAPH-F9
+T¡:CYRILLIC CAPITAL LETTER
+T¢:CYRILLIC SMALL LETTER
+T£:FRAKTUR
+T¤:DOUBLE-STRUCK
+T¥: MARK
+T¦:WHITE
+T§:SMALL
+T©:BOPOMOFO LETTER
+Tª:GUJARATI
+T«:HANGUL JUNGSEONG
+T¬:BLACK
+T­:NUMBER
+T®:MODIFIER LETTER
+T¯:GURMUKHI
+T°:BENGALI
+T±: WITH DASIA AND
+T²:ROMAN NUMERAL
+T³: WITH DOT
+T´:PERISPOMENI
+Tµ:LESS-THAN
+T¶:SINHALA LETTER
+T·: WITH PSILI AND
+T¹:PRESENTATION FORM FOR VERTICAL
+Tº:YEH WITH HAMZA ABOVE
+T»:KANNADA
+T¼:IGHT
+T½:MYANMAR
+T¾:TRIANGLE
+T¿:DESERET
+TÀ:RUNIC LETTER
+TÁ:STROKE
+TÂ:ED
+TÃ:KHMER INDEPENDENT VOWEL
+TÄ:POINTING
+TÅ:HEAVY
+TÆ:IEU
+TÇ: SMALL
+TÉ:PSILON
+TÊ:ARABIC
+TË:DOWN
+TÌ:DINGBAT NEGATIVE CIRCLED
+TÍ:KATAKANA LETTER
+TÎ:VOCALIC
+TÏ:TELUGU
+TÐ:CIRCLE
+TÑ:PARENTHESI
+TÒ: CAPITAL
+TÓ:SYRIAC
+TÔ: WITH JEEM
+TÕ:ALI GALI
+TÖ:HANGUL LETTER
+T×: ACCENT
+TÙ:RIGHTWARDS ARROW
+TÚ: OPERATOR
+TÛ: WITH YEH FINAL FORM
+TÜ:ACUTE
+TÝ:KHMER
+TÞ:CJK COMPATIBILITY IDEOGRAPH-2F8
+Tß:CJK COMPATIBILITY IDEOGRAPH-2F9
+Tà:MEASURED ANGLE WITH OPEN ARM ENDING IN ARROW POINTING
+Tá:DINGBAT NEGATIVE CIRCLED C-SIMPLIFIED
+Tâ:ORIYA LETTER
+Tã: CAPITAL LETTER
+Tä:LINE
+Tå:MACRON
+Tæ:TILDE
+Tç:VARIATION SELECTOR
+Té: FULL STOP
+Tê:<control>
+Të:THAANA LETTER
+Tì: BAR
+Tí: WITH HOOK
+Tî:MATHEMATICAL BOLD
+Tï:LOWER
+Tð:IDEOGRAPHIC DESCRIPTION CHARACTER
+Tñ:SYMBOL FOR
+Tò:LIGATURE
+Tó:DENTISTRY SYMBOL LIGHT
+Tô:ING
+Tõ:CJK COMPATIBILITY IDEOGRAPH-FA
+Tö:REVERSED
+T÷:UPPER
+Tù:RIGHT
+Tú:VULGAR FRACTION
+Tû: WITH CARON
+Tü:OMEGA
+Tý:SQUARE
+Tþ:ALPHA
+Tÿ:YI SYLLABLE N
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/!Sprites,ff9 b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Themes/!Sprites,ff9
index 3eb5b44b7..3eb5b44b7 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/!Sprites,ff9
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Themes/!Sprites,ff9
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/!Sprites11,ff9 b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Themes/!Sprites11,ff9
index 48986b41e..48986b41e 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/!Sprites11,ff9
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Themes/!Sprites11,ff9
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/!Sprites22,ff9 b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Themes/!Sprites22,ff9
index 63a6e6122..63a6e6122 100644
--- a/frontends/riscos/distribution/!Boot/Resources/!Unicode/!Sprites22,ff9
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Themes/!Sprites22,ff9
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Themes/Morris4/!Sprites,ff9 b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Themes/Morris4/!Sprites,ff9
new file mode 100644
index 000000000..096f2f22a
--- /dev/null
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Themes/Morris4/!Sprites,ff9
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Themes/Morris4/!Sprites22,ff9 b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Themes/Morris4/!Sprites22,ff9
new file mode 100644
index 000000000..3bf5d53b4
--- /dev/null
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Themes/Morris4/!Sprites22,ff9
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Themes/Ursula/!Sprites,ff9 b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Themes/Ursula/!Sprites,ff9
new file mode 100644
index 000000000..29a67dd3c
--- /dev/null
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Themes/Ursula/!Sprites,ff9
Binary files differ
diff --git a/frontends/riscos/distribution/!Boot/Resources/!Unicode/Themes/Ursula/!Sprites22,ff9 b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Themes/Ursula/!Sprites22,ff9
new file mode 100644
index 000000000..0c866df39
--- /dev/null
+++ b/frontends/riscos/distribution/!Boot/Resources/!Unicode/Themes/Ursula/!Sprites22,ff9
Binary files differ
diff --git a/frontends/riscos/distribution/!System/310/Modules/Network/URI,ffa b/frontends/riscos/distribution/!System/310/Modules/Network/URI,ffa
index 431535e21..d6dafd212 100644
--- a/frontends/riscos/distribution/!System/310/Modules/Network/URI,ffa
+++ b/frontends/riscos/distribution/!System/310/Modules/Network/URI,ffa
Binary files differ
diff --git a/frontends/riscos/distribution/!System/310/Modules/SharedULib,ffa b/frontends/riscos/distribution/!System/310/Modules/SharedULib,ffa
index 8dd0dd2c9..045d6a3af 100755..100644
--- a/frontends/riscos/distribution/!System/310/Modules/SharedULib,ffa
+++ b/frontends/riscos/distribution/!System/310/Modules/SharedULib,ffa
Binary files differ
diff --git a/frontends/riscos/distribution/!System/400/Modules/ARMEABISupport,ffa b/frontends/riscos/distribution/!System/400/Modules/ARMEABISupport,ffa
new file mode 100644
index 000000000..bfcc3ef63
--- /dev/null
+++ b/frontends/riscos/distribution/!System/400/Modules/ARMEABISupport,ffa
Binary files differ
diff --git a/frontends/riscos/distribution/3rdParty/ARMEABISupport/Copyright b/frontends/riscos/distribution/3rdParty/ARMEABISupport/Copyright
new file mode 100644
index 000000000..8bb7d7eb0
--- /dev/null
+++ b/frontends/riscos/distribution/3rdParty/ARMEABISupport/Copyright
@@ -0,0 +1,20 @@
+Copyright (c) 2019-2022 Lee Noar
+Copyright (c) 2019-2022 GCCSDK Developers
+
+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.
diff --git a/frontends/riscos/distribution/3rdParty/ARMEABISupport/Origin,b28 b/frontends/riscos/distribution/3rdParty/ARMEABISupport/Origin,b28
new file mode 100644
index 000000000..246443e2c
--- /dev/null
+++ b/frontends/riscos/distribution/3rdParty/ARMEABISupport/Origin,b28
@@ -0,0 +1 @@
+https://www.riscos.info/downloads/gccsdk/sharedunixlib/
diff --git a/frontends/riscos/distribution/3rdParty/AcornURI/!ReadMe b/frontends/riscos/distribution/3rdParty/AcornURI/!ReadMe
deleted file mode 100644
index 4f4ca1e24..000000000
--- a/frontends/riscos/distribution/3rdParty/AcornURI/!ReadMe
+++ /dev/null
@@ -1,34 +0,0 @@
-AcornURI 1.04
--------------
-
-Hi. This is a complete reimplementation of Acorn's URI module such that it
-works on Iyonix. This allows simple URI / URL launching from applications.
-Merge this !System with your own, then (re)launch your favourite browser to
-ensure it's running.
-
-This has a few advantages over the official offering: it's smaller,
-compatible with more browsers and more tolerant of errors.
-
-This is released under the terms of the LGPL, which is included in this
-archive as the file Copying. Previous versions of this module were released
-under the GPL, and are still available from sudden.recoil.org.
-
-Source is available from the same place you downloaded this archive, ie
-<http://sudden.recoil.org/others/acornuri/acornuri104src.zip>
-
-
-Changelog
----------
-
-v1.04 20-May-06 Relicensed under the LGPL (rather than GPL)
-
-v1.03 11-May-04 Changed the order of things to try, so it now
- always prefers browsers which are already loaded
-
-v1.02 19-Feb-04 Fixed claiming of URIs where I'd misread the spec
- Added automatic fall-back to the ANT protocol
- Removed some service calls to improve reliability
-
---
-Christian Ludlam
-chris@recoil.org \ No newline at end of file
diff --git a/frontends/riscos/distribution/3rdParty/AcornURI/Apache-2.0 b/frontends/riscos/distribution/3rdParty/AcornURI/Apache-2.0
new file mode 100644
index 000000000..d64569567
--- /dev/null
+++ b/frontends/riscos/distribution/3rdParty/AcornURI/Apache-2.0
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/frontends/riscos/distribution/3rdParty/AcornURI/Copying b/frontends/riscos/distribution/3rdParty/AcornURI/Copying
index 5ab7695ab..4c1b077bf 100644
--- a/frontends/riscos/distribution/3rdParty/AcornURI/Copying
+++ b/frontends/riscos/distribution/3rdParty/AcornURI/Copying
@@ -1,504 +1,22 @@
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL. It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
- This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it. You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
- When we speak of free software, we are referring to freedom of use,
-not price. Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
- To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights. These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
- For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you. You must make sure that they, too, receive or can get the source
-code. If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it. And you must show them these terms so they know their rights.
-
- We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
- To protect each distributor, we want to make it very clear that
-there is no warranty for the free library. Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
- Finally, software patents pose a constant threat to the existence of
-any free program. We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder. Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
- Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License. This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License. We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
- When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library. The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom. The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
- We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License. It also provides other free software developers Less
-of an advantage over competing non-free programs. These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries. However, the Lesser license provides advantages in certain
-special circumstances.
-
- For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard. To achieve this, non-free programs must be
-allowed to use the library. A more frequent case is that a free
-library does the same job as widely used non-free libraries. In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
- In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software. For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
- Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
- The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
- GNU LESSER GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
- A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
- The "Library", below, refers to any such software library or work
-which has been distributed under these terms. A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language. (Hereinafter, translation is
-included without limitation in the term "modification".)
-
- "Source code" for a work means the preferred form of the work for
-making modifications to it. For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
- Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it). Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
- 1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
- You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
- 2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) The modified work must itself be a software library.
-
- b) You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
-
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License. (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.) Do not make any other change in
-these notices.
-
- Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
- This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
- 4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
- If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library". Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
- However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library". The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
- When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library. The
-threshold for this to be true is not precisely defined by law.
-
- If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work. (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
- Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
- 6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
- You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License. Also, you must do one
-of these things:
-
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
-
- b) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (1) uses at run time a
- copy of the library already present on the user's computer system,
- rather than copying library functions into the executable, and (2)
- will operate properly with a modified version of the library, if
- the user installs one, as long as the modified version is
- interface-compatible with the version that the work was made with.
-
- c) Accompany the work with a written offer, valid for at
- least three years, to give the same user the materials
- specified in Subsection 6a, above, for a charge no more
- than the cost of performing this distribution.
-
- d) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
- e) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
- For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
- It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
- 7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
-
- 8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License. However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
- 9. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Library or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
- 10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
- 11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all. For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded. In such case, this License incorporates the limitation as if
-written in the body of this License.
-
- 13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
- 14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission. For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this. Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
- NO WARRANTY
-
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Libraries
-
- If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change. You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
- To apply these terms, attach the following notices to the library. It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
- <one line to give the library's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the
- library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
- <signature of Ty Coon>, 1 April 1990
- Ty Coon, President of Vice
-
-That's all there is to it!
-
-
+Files: URI
+Copyright:
+ 1995, 1998 Acorn Computers Ltd
+ 2000 Pace Micro Technology plc
+ 2007, 2008, 2013 Castle Technology Ltd
+License: Apache-2.0
+
+License: Apache-2.0
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ .
+ http://www.apache.org/licenses/LICENSE-2.0
+ .
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ .
+ The complete text of the Apache License Version 2.0 can be found in
+ in the file 'Apache-2.0'.
diff --git a/frontends/riscos/distribution/3rdParty/AcornURI/Origin,b28 b/frontends/riscos/distribution/3rdParty/AcornURI/Origin,b28
new file mode 100644
index 000000000..573a74db2
--- /dev/null
+++ b/frontends/riscos/distribution/3rdParty/AcornURI/Origin,b28
@@ -0,0 +1 @@
+https://www.riscosopen.org/
diff --git a/frontends/riscos/distribution/3rdParty/Cache/Copyright b/frontends/riscos/distribution/3rdParty/Cache/Copyright
new file mode 100644
index 000000000..61d82856d
--- /dev/null
+++ b/frontends/riscos/distribution/3rdParty/Cache/Copyright
@@ -0,0 +1,20 @@
+Copyright 2007 Adam Richardson
+
+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.
diff --git a/frontends/riscos/distribution/3rdParty/Cache/Origin,b28 b/frontends/riscos/distribution/3rdParty/Cache/Origin,b28
new file mode 100644
index 000000000..ad677d3c9
--- /dev/null
+++ b/frontends/riscos/distribution/3rdParty/Cache/Origin,b28
@@ -0,0 +1 @@
+https://www.snowstone.org.uk/riscos/
diff --git a/frontends/riscos/distribution/3rdParty/CryptRand/Origin,b28 b/frontends/riscos/distribution/3rdParty/CryptRand/Origin,b28
new file mode 100644
index 000000000..f56f9d600
--- /dev/null
+++ b/frontends/riscos/distribution/3rdParty/CryptRand/Origin,b28
@@ -0,0 +1 @@
+https://www.riscos.info/packages/arm/System
diff --git a/frontends/riscos/distribution/3rdParty/Iconv/COPYING b/frontends/riscos/distribution/3rdParty/Iconv/COPYING
new file mode 100644
index 000000000..266d65eb1
--- /dev/null
+++ b/frontends/riscos/distribution/3rdParty/Iconv/COPYING
@@ -0,0 +1,140 @@
+Files: *
+Copyright: 2004-13 J-M Bell
+License: MIT-like
+
+Files: src/transtab
+Copyright: 2000 Markus Kuhn
+License: transtab
+
+Files: test/GNU/*
+Copyright: 2000-2002, 2004-2005 Free Software Foundation, Inc.
+License: LGPL-2+
+
+Files: unicode/Unicode/*
+Copyright:
+ 1997 Acorn Computers Ltd
+ 1999, 2001 Pace Micro Technology plc
+License: Apache-2.0
+
+Files: unicode/Unicode/c/makealiases
+Copyright: 2008 John-Mark Bell
+License: MIT-like
+
+Files: unicode/Unicode/data/CharNames
+Copyright: 2002 Unicode, Inc
+License: Unicode
+
+Files: unicode/UnicodeLib/*
+Copyright:
+ 1997, 1998 Acorn Computers Ltd
+ 1997-2000 Pace Micro Technology PLC.
+ 1999 Element 14 Ltd
+ 2005, 2009, 2015 Castle Technology Ltd
+License: Apache-2.0
+
+Files: unicode/UnicodeLib/data/*
+Copyright:
+ 1991-2002 Unicode, Inc.
+License: Unicode
+
+License: Apache-2.0
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ .
+ http://www.apache.org/licenses/LICENSE-2.0
+ .
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ .
+ The complete text of the Apache License Version 2.0 can be found in
+ in the file 'licenses/Apache-2.0'.
+
+License: LGPL-2+
+ The GNU LIBICONV Library is free software; you can redistribute it
+ and/or modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+ .
+ The GNU LIBICONV Library 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
+ Library General Public License for more details.
+ .
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU LIBICONV Library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation, Inc., 51 Franklin Street,
+ Fifth Floor, Boston, MA 02110-1301, USA.
+ .
+ The full text of the GNU Library General Public License version 2 can be
+ found in the file 'licenses/LGPL-2'.
+
+License: MIT-like
+ 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.
+
+License: transtab
+ This package contains a table for transliterating ISO 10646 texts into
+ best-effort representations using smaller coded character sets (ASCII,
+ ISO 8859, etc.). It is primarily intended for inclusion into the GNU C
+ library, but might be of use for other applications as well. The table
+ is freely available to anyone.
+
+License: Unicode
+ UNICODE LICENSE V3
+ .
+ COPYRIGHT AND PERMISSION NOTICE
+ .
+ Copyright © 1991-2023 Unicode, Inc.
+ .
+ NOTICE TO USER: Carefully read the following legal agreement. BY
+ DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING DATA FILES, AND/OR
+ SOFTWARE, YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE
+ TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE, DO NOT
+ DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA FILES OR SOFTWARE.
+ .
+ Permission is hereby granted, free of charge, to any person obtaining a
+ copy of data files and any associated documentation (the "Data Files") or
+ software and any associated documentation (the "Software") to deal in the
+ Data Files or Software without restriction, including without limitation
+ the rights to use, copy, modify, merge, publish, distribute, and/or sell
+ copies of the Data Files or Software, and to permit persons to whom the
+ Data Files or Software are furnished to do so, provided that either (a)
+ this copyright and permission notice appear with all copies of the Data
+ Files or Software, or (b) this copyright and permission notice appear in
+ associated Documentation.
+ .
+ THE DATA FILES AND SOFTWARE ARE 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 OF
+ THIRD PARTY RIGHTS.
+ .
+ IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE
+ BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES,
+ OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA
+ FILES OR SOFTWARE.
+ .
+ Except as contained in this notice, the name of a copyright holder shall
+ not be used in advertising or otherwise to promote the sale, use or other
+ dealings in these Data Files or Software without prior written
+ authorization of the copyright holder.
diff --git a/frontends/riscos/distribution/3rdParty/Iconv/Origin,b28 b/frontends/riscos/distribution/3rdParty/Iconv/Origin,b28
new file mode 100644
index 000000000..547a62896
--- /dev/null
+++ b/frontends/riscos/distribution/3rdParty/Iconv/Origin,b28
@@ -0,0 +1 @@
+https://www.netsurf-browser.org/iconv/
diff --git a/frontends/riscos/distribution/3rdParty/Iconv/ReadMe b/frontends/riscos/distribution/3rdParty/Iconv/ReadMe
index 907c2c7c8..f49a1b0b2 100644
--- a/frontends/riscos/distribution/3rdParty/Iconv/ReadMe
+++ b/frontends/riscos/distribution/3rdParty/Iconv/ReadMe
@@ -24,22 +24,5 @@ See the ReadMe file in that directory for further information.
Licence
=======
-Iconv is Copyright © 2004-13 J-M Bell
-
-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.
+Please see the COPYING file for full licensing information. No part of the
+test suite is included in this binary distribution.
diff --git a/frontends/riscos/distribution/3rdParty/Iconv/licenses/Apache-2.0 b/frontends/riscos/distribution/3rdParty/Iconv/licenses/Apache-2.0
new file mode 100644
index 000000000..d64569567
--- /dev/null
+++ b/frontends/riscos/distribution/3rdParty/Iconv/licenses/Apache-2.0
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/frontends/riscos/distribution/3rdParty/Iconv/licenses/LGPL-2 b/frontends/riscos/distribution/3rdParty/Iconv/licenses/LGPL-2
new file mode 100644
index 000000000..5bc8fb2c8
--- /dev/null
+++ b/frontends/riscos/distribution/3rdParty/Iconv/licenses/LGPL-2
@@ -0,0 +1,481 @@
+ GNU LIBRARY GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1991 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the library GPL. It is
+ numbered 2 because it goes with version 2 of the ordinary GPL.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Library General Public License, applies to some
+specially designated Free Software Foundation software, and to any
+other libraries whose authors decide to use it. You can use it for
+your libraries, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if
+you distribute copies of the library, or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link a program with the library, you must provide
+complete object files to the recipients so that they can relink them
+with the library, after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ Our method of protecting your rights has two steps: (1) copyright
+the library, and (2) offer you this license which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ Also, for each distributor's protection, we want to make certain
+that everyone understands that there is no warranty for this free
+library. If the library is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original
+version, so that any problems introduced by others will not reflect on
+the original authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that companies distributing free
+software will individually obtain patent licenses, thus in effect
+transforming the program into proprietary software. To prevent this,
+we have made it clear that any patent must be licensed for everyone's
+free use or not licensed at all.
+
+ Most GNU software, including some libraries, is covered by the ordinary
+GNU General Public License, which was designed for utility programs. This
+license, the GNU Library General Public License, applies to certain
+designated libraries. This license is quite different from the ordinary
+one; be sure to read it in full, and don't assume that anything in it is
+the same as in the ordinary license.
+
+ The reason we have a separate public license for some libraries is that
+they blur the distinction we usually make between modifying or adding to a
+program and simply using it. Linking a program with a library, without
+changing the library, is in some sense simply using the library, and is
+analogous to running a utility program or application program. However, in
+a textual and legal sense, the linked executable is a combined work, a
+derivative of the original library, and the ordinary General Public License
+treats it as such.
+
+ Because of this blurred distinction, using the ordinary General
+Public License for libraries did not effectively promote software
+sharing, because most developers did not use the libraries. We
+concluded that weaker conditions might promote sharing better.
+
+ However, unrestricted linking of non-free programs would deprive the
+users of those programs of all benefit from the free status of the
+libraries themselves. This Library General Public License is intended to
+permit developers of non-free programs to use free libraries, while
+preserving your freedom as a user of such programs to change the free
+libraries that are incorporated in them. (We have not seen how to achieve
+this as regards changes in header files, but we have achieved it as regards
+changes in the actual functions of the Library.) The hope is that this
+will lead to faster development of free libraries.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, while the latter only
+works together with the library.
+
+ Note that it is possible for a library to be covered by the ordinary
+General Public License rather than by this special one.
+
+ GNU LIBRARY GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library which
+contains a notice placed by the copyright holder or other authorized
+party saying it may be distributed under the terms of this Library
+General Public License (also called "this License"). Each licensee is
+addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also compile or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ c) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ d) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the source code distributed need not include anything that is normally
+distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Library General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library. It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the library's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+ <signature of Ty Coon>, 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
diff --git a/frontends/riscos/distribution/3rdParty/SharedULib/Copyright b/frontends/riscos/distribution/3rdParty/SharedULib/Copyright
index b6784ed06..4939ec36e 100644
--- a/frontends/riscos/distribution/3rdParty/SharedULib/Copyright
+++ b/frontends/riscos/distribution/3rdParty/SharedULib/Copyright
@@ -7,9 +7,9 @@ Nicholas Clark and Peter Burwood.
These contributors have expressed "no interest" in any further licensing or
copyright in regards to UnixLib.
-Other sections are (c) 1999-2006 Nick Burrett, John Tytgat, Peter Naulls,
-Peter Teichmann, Alex Waugh, Christian Ludlam, Theo Markettos, Graham Shaw,
-James Bursa and John-Mark Bell.
+Other sections are (c) 1999-2011 Nick Burrett, John Tytgat, Peter Naulls,
+Lee Noar, Peter Teichmann, Alex Waugh, Christian Ludlam, Theo Markettos,
+Graham Shaw, James Bursa and John-Mark Bell.
In January 2005, permission was obtained from all relevant contributors
by Peter Naulls to license all past and present contributions to UnixLib
@@ -86,7 +86,7 @@ http://www.fsf.org/licenses/why-not-lgpl.html
===========================================================================
- Copyright (c) 1995-2005 UnixLib Developers
+ Copyright (c) 1995-2009 UnixLib Developers
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -280,7 +280,6 @@ works together with the library.
Note that it is possible for a library to be covered by the ordinary
General Public License rather than by this special one.
-
GNU LIBRARY GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
@@ -631,8 +630,8 @@ safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
- <one line to give the library's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
+ <one line to give the library's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -658,7 +657,7 @@ necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
- <signature of Ty Coon>, 1 April 1990
+ <signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!
diff --git a/frontends/riscos/distribution/3rdParty/SharedULib/Origin,b28 b/frontends/riscos/distribution/3rdParty/SharedULib/Origin,b28
new file mode 100644
index 000000000..246443e2c
--- /dev/null
+++ b/frontends/riscos/distribution/3rdParty/SharedULib/Origin,b28
@@ -0,0 +1 @@
+https://www.riscos.info/downloads/gccsdk/sharedunixlib/
diff --git a/frontends/riscos/distribution/3rdParty/Tinct/Origin,b28 b/frontends/riscos/distribution/3rdParty/Tinct/Origin,b28
new file mode 100644
index 000000000..3081d9159
--- /dev/null
+++ b/frontends/riscos/distribution/3rdParty/Tinct/Origin,b28
@@ -0,0 +1 @@
+http://www.tinct.net/tinct.asp
diff --git a/frontends/riscos/distribution/3rdParty/Unicode/Apache-2.0 b/frontends/riscos/distribution/3rdParty/Unicode/Apache-2.0
new file mode 100644
index 000000000..d64569567
--- /dev/null
+++ b/frontends/riscos/distribution/3rdParty/Unicode/Apache-2.0
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/frontends/riscos/distribution/3rdParty/Unicode/Copyright b/frontends/riscos/distribution/3rdParty/Unicode/Copyright
new file mode 100644
index 000000000..f1a33a5d0
--- /dev/null
+++ b/frontends/riscos/distribution/3rdParty/Unicode/Copyright
@@ -0,0 +1,66 @@
+Files: !Unicode.*
+Copyright:
+ 1997 Acorn Computers Ltd
+ 1999, 2001 Pace Micro Technology plc
+License: Apache-2.0
+
+Files: !Unicode.Files.CharNames
+Copyright: 2002 Unicode, Inc
+License: Unicode
+
+License: Apache-2.0
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ .
+ http://www.apache.org/licenses/LICENSE-2.0
+ .
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ .
+ The complete text of the Apache License Version 2.0 can be found in
+ in the file 'Apache-2.0'.
+
+License: Unicode
+ UNICODE LICENSE V3
+ .
+ COPYRIGHT AND PERMISSION NOTICE
+ .
+ Copyright © 1991-2023 Unicode, Inc.
+ .
+ NOTICE TO USER: Carefully read the following legal agreement. BY
+ DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING DATA FILES, AND/OR
+ SOFTWARE, YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE
+ TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE, DO NOT
+ DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA FILES OR SOFTWARE.
+ .
+ Permission is hereby granted, free of charge, to any person obtaining a
+ copy of data files and any associated documentation (the "Data Files") or
+ software and any associated documentation (the "Software") to deal in the
+ Data Files or Software without restriction, including without limitation
+ the rights to use, copy, modify, merge, publish, distribute, and/or sell
+ copies of the Data Files or Software, and to permit persons to whom the
+ Data Files or Software are furnished to do so, provided that either (a)
+ this copyright and permission notice appear with all copies of the Data
+ Files or Software, or (b) this copyright and permission notice appear in
+ associated Documentation.
+ .
+ THE DATA FILES AND SOFTWARE ARE 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 OF
+ THIRD PARTY RIGHTS.
+ .
+ IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE
+ BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES,
+ OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA
+ FILES OR SOFTWARE.
+ .
+ Except as contained in this notice, the name of a copyright holder shall
+ not be used in advertising or otherwise to promote the sale, use or other
+ dealings in these Data Files or Software without prior written
+ authorization of the copyright holder.
diff --git a/frontends/riscos/distribution/3rdParty/Unicode/Origin,b28 b/frontends/riscos/distribution/3rdParty/Unicode/Origin,b28
new file mode 100644
index 000000000..573a74db2
--- /dev/null
+++ b/frontends/riscos/distribution/3rdParty/Unicode/Origin,b28
@@ -0,0 +1 @@
+https://www.riscosopen.org/
diff --git a/frontends/riscos/distribution/LeesMij b/frontends/riscos/distribution/LeesMij
index a0d3ff41f..3a48b77ec 100644
--- a/frontends/riscos/distribution/LeesMij
+++ b/frontends/riscos/distribution/LeesMij
@@ -6,7 +6,7 @@ broncode.
De nieuwste versie van NetSurf is verkrijgbaar via:
- http://www.netsurf-browser.org/
+ https://www.netsurf-browser.org/
Installatie
@@ -59,15 +59,3 @@ voor meer informatie.
De meegeleverde !Boot- en !System-mappen bevatten items die door
derden zijn geproduceerd. De bijbehorende licenties zijn meegeleverd
in de map '3rdParty'.
-
-AcornURI
- http://sudden.recoil.org/others/
-
-Iconv
- http://www.netsurf-browser.org/iconv/
-
-SharedUnixLibrary
- http://www.riscos.info/downloads/gccsdk/sharedunixlib/system.zip
-
-Tinct
- http://www.tinct.net/tinct.asp
diff --git a/frontends/riscos/distribution/ReadMe b/frontends/riscos/distribution/ReadMe
index eec39d6ab..6a4429b12 100644
--- a/frontends/riscos/distribution/ReadMe
+++ b/frontends/riscos/distribution/ReadMe
@@ -5,7 +5,7 @@ This is a development build of NetSurf, an open source web browser.
The latest version of NetSurf is available from:
- http://www.netsurf-browser.org/
+ https://www.netsurf-browser.org/
Installation
@@ -31,7 +31,10 @@ Double click on !NetSurf in your chosen location to launch NetSurf.
Note NetSurf requires WindowManager 3.80 or later. This comes
with RISC OS 4 and above. RISC OS 3 users should install
the Universal Boot Sequence from:
- http://acorn.riscos.com/riscos/releases/UniBoot/
+ http://www.riscos.com/ftp_space/generic/uniboot/ or,
+ alternatively, use the HardDisc4 and associated System
+ resources provided by RISC OS Open:
+ https://www.riscosopen.org/content/downloads/common
Note RISC OS 3.1 and earlier are not supported.
@@ -45,17 +48,5 @@ for details.
The !Boot and !System directories contain items provided produced
-by third parties. Their licences are provided in the 3rd Party
-directory.
-
-AcornURI
- http://sudden.recoil.org/others/
-
-Iconv
- http://www.netsurf-browser.org/iconv/
-
-SharedUnixLibrary
- http://www.riscos.info/downloads/gccsdk/sharedunixlib/system.zip
-
-Tinct
- http://www.tinct.net/tinct.asp
+by third parties. Their licences, associated documentation, and
+origin are provided in the 3rd Party directory.
diff --git a/frontends/riscos/download.c b/frontends/riscos/download.c
index bdc705426..216f5750c 100644
--- a/frontends/riscos/download.c
+++ b/frontends/riscos/download.c
@@ -313,8 +313,8 @@ gui_download_window_create(download_context *ctx, struct gui_window *gui)
/** @todo change this to take a reference to the nsurl and use
* that value directly rather than using a fixed buffer.
*/
- strncpy(dw->url, nsurl_access(url), sizeof dw->url);
- dw->url[sizeof dw->url - 1] = 0;
+ strncpy(dw->url, nsurl_access(url), sizeof(dw->url) - 1);
+ dw->url[sizeof(dw->url) - 1] = 0;
dw->status[0] = 0;
gettimeofday(&dw->start_time, 0);
@@ -414,7 +414,8 @@ gui_download_window_create(download_context *ctx, struct gui_window *gui)
return 0;
}
else {
- strncpy(dw->path, local_path, sizeof dw->path);
+ strncpy(dw->path, local_path, sizeof(dw->path) - 1);
+ dw->path[sizeof(dw->path)-1] = 0;
free(local_path);
}
@@ -484,7 +485,8 @@ static void gui_download_window_error(struct gui_download_window *dw,
riscos_schedule(-1, ro_gui_download_update_status_wrapper, dw);
/* place error message in status icon in red */
- strncpy(dw->status, error_msg, sizeof dw->status);
+ strncpy(dw->status, error_msg, sizeof(dw->status) - 1);
+ dw->status[sizeof(dw->status)-1] = 0;
error = xwimp_set_icon_state(dw->window,
ICON_DOWNLOAD_STATUS,
wimp_COLOUR_RED << wimp_ICON_FG_COLOUR_SHIFT,
@@ -872,11 +874,11 @@ bool ro_gui_download_click(wimp_pointer *pointer)
ro_gui_drag_icon(x, y, sprite);
} else if (pointer->i == ICON_DOWNLOAD_DESTINATION) {
- char command[256] = "Filer_OpenDir ";
+ char command[sizeof(dw->path) + 14 + 1] = "Filer_OpenDir ";
char *dot;
- strncpy(command + 14, dw->path, 242);
- command[255] = 0;
+ strncpy(command + 14, dw->path, sizeof(command) - 14 - 1);
+ command[sizeof(command) - 1] = 0;
dot = strrchr(command, '.');
if (dot) {
os_error *error;
@@ -1384,7 +1386,8 @@ bool ro_gui_download_save(struct gui_download_window *dw,
}
dw->saved = true;
- strncpy(dw->path, file_name, sizeof dw->path);
+ strncpy(dw->path, file_name, sizeof(dw->path) - 1);
+ dw->path[sizeof(dw->path)-1] = 0;
if (!dw->send_dataload || dw->save_message.data.data_xfer.est_size != -1)
ro_gui_download_remember_dir(file_name);
diff --git a/frontends/riscos/filetype.c b/frontends/riscos/filetype.c
index 73651cd63..b0dc949f8 100644
--- a/frontends/riscos/filetype.c
+++ b/frontends/riscos/filetype.c
@@ -39,6 +39,7 @@ static const struct type_entry type_map[] = {
{0x188, "application/x-shockwave-flash"},
{0x695, "image/gif"},
{0x69c, "image/x-ms-bmp"},
+ {0xa66, "image/webp"},
{0xaad, "image/svg+xml"},
{0xaff, "image/x-drawfile"},
{0xb60, "image/png"},
@@ -269,6 +270,7 @@ int ro_content_native_type(struct hlcache_handle *c)
case FILETYPE_BMP: /* bmp */
case FILETYPE_ICO: /* ico */
case FILETYPE_PNG: /* png */
+ case FILETYPE_WEBP: /* webp */
case 0xff9: /* sprite */
return osfile_TYPE_SPRITE;
case FILETYPE_SVG: /* svg */
diff --git a/frontends/riscos/filetype.h b/frontends/riscos/filetype.h
index 4c45e7bd0..b9fca4d49 100644
--- a/frontends/riscos/filetype.h
+++ b/frontends/riscos/filetype.h
@@ -67,6 +67,9 @@
#ifndef FILETYPE_SVG
#define FILETYPE_SVG 0xaad
#endif
+#ifndef FILETYPE_WEBP
+#define FILETYPE_WEBP 0xa66
+#endif
/**
* Determine the MIME type of a local file.
diff --git a/frontends/riscos/font.c b/frontends/riscos/font.c
index 8913efeeb..2ff309043 100644
--- a/frontends/riscos/font.c
+++ b/frontends/riscos/font.c
@@ -469,7 +469,7 @@ void nsfont_read_style(const plot_font_style_t *fstyle,
rufl_WEIGHT_900
};
- *font_size = (fstyle->size * 16) / FONT_SIZE_SCALE;
+ *font_size = (fstyle->size * 16) / PLOT_STYLE_SCALE;
if (1600 < *font_size)
*font_size = 1600;
diff --git a/frontends/riscos/font.h b/frontends/riscos/font.h
index a29bad83a..5a82f63ee 100644
--- a/frontends/riscos/font.h
+++ b/frontends/riscos/font.h
@@ -26,7 +26,7 @@
#include <rufl.h>
struct plot_font_style;
-struct gui_layout_table *riscos_layout_table;
+extern struct gui_layout_table *riscos_layout_table;
/** desktop font, size and style being used */
extern char ro_gui_desktop_font_family[];
diff --git a/frontends/riscos/global_history.c b/frontends/riscos/global_history.c
index 7dfc58317..51f5390cb 100644
--- a/frontends/riscos/global_history.c
+++ b/frontends/riscos/global_history.c
@@ -367,6 +367,7 @@ global_history_menu_select(wimp_w w,
*/
static nserror ro_global_history_init(void)
{
+ os_error *error;
struct ro_global_history_window *ncwin;
nserror res;
static const struct ns_menu global_history_menu_def = {
@@ -411,7 +412,15 @@ static nserror ro_global_history_init(void)
}
/* create window from template */
- ncwin->core.wh = wimp_create_window(dialog_global_history_template);
+ error = xwimp_create_window(dialog_global_history_template,
+ &ncwin->core.wh);
+ if (error) {
+ NSLOG(netsurf, INFO, "xwimp_create_window: 0x%x: %s",
+ error->errnum, error->errmess);
+ ro_warn_user("WimpError", error->errmess);
+ free(ncwin);
+ return NSERROR_NOMEM;
+ }
ro_gui_set_window_title(ncwin->core.wh, messages_get("GlobalHistory"));
@@ -435,6 +444,9 @@ static nserror ro_global_history_init(void)
return res;
}
+ NSLOG(netsurf, INFO, "Created global history corewindow: %p",
+ &ncwin->core);
+
res = global_history_init(ncwin->core.cb_table,
(struct core_window *)ncwin);
if (res != NSERROR_OK) {
diff --git a/frontends/riscos/gui.c b/frontends/riscos/gui.c
index cfc513f72..1a2b944a8 100644
--- a/frontends/riscos/gui.c
+++ b/frontends/riscos/gui.c
@@ -73,10 +73,10 @@
#include "riscos/query.h"
#include "riscos/window.h"
#include "riscos/iconbar.h"
-#include "riscos/sslcert.h"
#include "riscos/local_history.h"
#include "riscos/global_history.h"
#include "riscos/cookies.h"
+#include "riscos/pageinfo.h"
#include "riscos/wimp_event.h"
#include "riscos/uri.h"
#include "riscos/url_protocol.h"
@@ -94,6 +94,7 @@ bool riscos_done = false;
extern bool ro_plot_patterned_lines;
int os_version = 0;
+bool os_alpha_sprite_supported = false;
const char * const __dynamic_da_name = "NetSurf"; /**< For UnixLib. */
int __dynamic_da_max_size = 128 * 1024 * 1024; /**< For UnixLib. */
@@ -143,27 +144,6 @@ static ns_wimp_message_list task_messages = {
message_URI_PROCESS,
message_URI_RETURN_RESULT,
message_INET_SUITE_OPEN_URL,
-#ifdef WITH_PLUGIN
- message_PLUG_IN_OPENING,
- message_PLUG_IN_CLOSED,
- message_PLUG_IN_RESHAPE_REQUEST,
- message_PLUG_IN_FOCUS,
- message_PLUG_IN_URL_ACCESS,
- message_PLUG_IN_STATUS,
- message_PLUG_IN_BUSY,
- message_PLUG_IN_STREAM_NEW,
- message_PLUG_IN_STREAM_WRITE,
- message_PLUG_IN_STREAM_WRITTEN,
- message_PLUG_IN_STREAM_DESTROY,
- message_PLUG_IN_OPEN,
- message_PLUG_IN_CLOSE,
- message_PLUG_IN_RESHAPE,
- message_PLUG_IN_STREAM_AS_FILE,
- message_PLUG_IN_NOTIFY,
- message_PLUG_IN_ABORT,
- message_PLUG_IN_ACTION,
- /* message_PLUG_IN_INFORMED, (not provided by oslib) */
-#endif
message_PRINT_SAVE,
message_PRINT_ERROR,
message_PRINT_TYPE_ODD,
@@ -195,6 +175,7 @@ static struct
static nsurl *gui_get_resource_url(const char *path)
{
static const char base_url[] = "file:///NetSurf:/Resources/";
+ const char *lang;
size_t path_len, length;
char *raw;
nsurl *url = NULL;
@@ -220,8 +201,12 @@ static nsurl *gui_get_resource_url(const char *path)
path_len = strlen(path);
+ lang = ro_gui_default_language();
+
/* Find max URL length */
- length = SLEN(base_url) + SLEN("xx/") + path_len + 1;
+ length = SLEN(base_url) +
+ strlen(lang) + 1 + /* <lang> + / */
+ path_len + 1; /* + NUL */
raw = malloc(length);
if (raw != NULL) {
@@ -230,13 +215,11 @@ static nsurl *gui_get_resource_url(const char *path)
ptr += SLEN(base_url);
/* Add language directory to URL, for translated files */
- /* TODO: handle non-en langauages
- * handle non-html translated files */
+ /* TODO: handle non-html translated files */
if (path_len > SLEN(".html") &&
strncmp(path + path_len - SLEN(".html"),
".html", SLEN(".html")) == 0) {
- memcpy(ptr, "en/", SLEN("en/"));
- ptr += SLEN("en/");
+ ptr += sprintf(ptr, "%s/", lang);
}
/* Add filename to URL */
@@ -302,7 +285,7 @@ set_colour_from_wimp(struct nsoption_s *opts,
static nserror set_defaults(struct nsoption_s *defaults)
{
/* Set defaults for absent option strings */
- nsoption_setnull_charp(ca_bundle, strdup("NetSurf:Resources.ca-bundle"));
+ nsoption_setnull_charp(ca_bundle, strdup("<NetSurf$CABundle>"));
nsoption_setnull_charp(cookie_file, strdup("NetSurf:Cookies"));
nsoption_setnull_charp(cookie_jar, strdup(CHOICES_PREFIX "Cookies"));
@@ -824,6 +807,7 @@ static void ro_msg_dataload(wimp_message *message)
case osfile_TYPE_TEXT:
case FILETYPE_ARTWORKS:
case FILETYPE_SVG:
+ case FILETYPE_WEBP:
/* display the actual file */
error = netsurf_path_to_nsurl(message->data.data_xfer.file_name, &url);
break;
@@ -926,7 +910,8 @@ static void ro_msg_datasave(wimp_message *message)
case osfile_TYPE_SPRITE:
case osfile_TYPE_TEXT:
case FILETYPE_ARTWORKS:
- case FILETYPE_SVG: {
+ case FILETYPE_SVG:
+ case FILETYPE_WEBP: {
os_error *error;
dataxfer->your_ref = dataxfer->my_ref;
@@ -1105,6 +1090,28 @@ static void ro_gui_check_resolvers(void)
}
}
+/**
+ * Determine whether the OS version supports alpha channels.
+ *
+ * \return true iff alpha channels are supported, false otherwise.
+ */
+static bool ro_gui__os_alpha_sprites_supported(void)
+{
+ os_error *error;
+ int var_val;
+ bits psr;
+
+ psr = 0;
+ error = xos_read_mode_variable(alpha_SPRITE_MODE,
+ os_MODEVAR_MODE_FLAGS, &var_val, &psr);
+ if (error) {
+ NSLOG(netsurf, ERROR, "xos_read_mode_variable: 0x%x: %s",
+ error->errnum, error->errmess);
+ return false;
+ }
+
+ return (var_val == (1 << 15));
+}
/**
* Initialise the RISC OS specific GUI.
@@ -1147,6 +1154,10 @@ static nserror gui_init(int argc, char** argv)
* being present) */
xos_byte(osbyte_IN_KEY, 0, 0xff, &os_version, NULL);
+ os_alpha_sprite_supported = ro_gui__os_alpha_sprites_supported();
+ NSLOG(netsurf, INFO, "OS supports alpha sprites: %s",
+ os_alpha_sprite_supported ? "yes" : "no");
+
/* the first release version of the A9home OS is incapable of
plotting patterned lines (presumably a fault in the hw acceleration) */
if (!xosmodule_lookup("VideoHWSMI", NULL, NULL, &base, NULL, NULL)) {
@@ -1199,16 +1210,9 @@ static nserror gui_init(int argc, char** argv)
/* Initialise save complete functionality */
save_complete_init();
- /* Initialise the font subsystem */
- nsfont_init();
-
- /* Load in visited URLs, Cookies, and hostlist */
+ /* Load in visited URLs and Cookies */
urldb_load(nsoption_charp(url_path));
urldb_load_cookies(nsoption_charp(cookie_file));
- hotlist_init(nsoption_charp(hotlist_path),
- nsoption_bool(external_hotlists) ?
- NULL :
- nsoption_charp(hotlist_save));
/* Initialise with the wimp */
error = xwimp_initialise(wimp_VERSION_RO38, task_name,
@@ -1239,6 +1243,15 @@ static nserror gui_init(int argc, char** argv)
ro_message_register_route(message_WINDOW_INFO,
ro_msg_window_info);
+ /* Initialise the font subsystem (must be after Wimp_Initialise) */
+ nsfont_init();
+
+ /* Initialise the hotlist (must be after fonts) */
+ hotlist_init(nsoption_charp(hotlist_path),
+ nsoption_bool(external_hotlists) ?
+ NULL :
+ nsoption_charp(hotlist_save));
+
/* Initialise global information */
ro_gui_get_screen_properties();
ro_gui_wimp_get_desktop_font();
@@ -1590,6 +1603,7 @@ static void gui_quit(void)
ro_gui_window_quit();
ro_gui_local_history_finalise();
ro_gui_global_history_finalise();
+ ro_gui_pageinfo_finalise();
ro_gui_hotlist_finalise();
ro_gui_cookies_finalise();
ro_gui_saveas_quit();
@@ -1744,51 +1758,6 @@ static void ro_gui_user_message(wimp_event_no event, wimp_message *message)
ro_url_message_received(message);
}
break;
-#ifdef WITH_PLUGIN
- case message_PLUG_IN_OPENING:
- plugin_opening(message);
- break;
- case message_PLUG_IN_CLOSED:
- plugin_closed(message);
- break;
- case message_PLUG_IN_RESHAPE_REQUEST:
- plugin_reshape_request(message);
- break;
- case message_PLUG_IN_FOCUS:
- break;
- case message_PLUG_IN_URL_ACCESS:
- plugin_url_access(message);
- break;
- case message_PLUG_IN_STATUS:
- plugin_status(message);
- break;
- case message_PLUG_IN_BUSY:
- break;
- case message_PLUG_IN_STREAM_NEW:
- plugin_stream_new(message);
- break;
- case message_PLUG_IN_STREAM_WRITE:
- break;
- case message_PLUG_IN_STREAM_WRITTEN:
- plugin_stream_written(message);
- break;
- case message_PLUG_IN_STREAM_DESTROY:
- break;
- case message_PLUG_IN_OPEN:
- if (event == wimp_USER_MESSAGE_ACKNOWLEDGE)
- plugin_open_msg(message);
- break;
- case message_PLUG_IN_CLOSE:
- if (event == wimp_USER_MESSAGE_ACKNOWLEDGE)
- plugin_close_msg(message);
- break;
- case message_PLUG_IN_RESHAPE:
- case message_PLUG_IN_STREAM_AS_FILE:
- case message_PLUG_IN_NOTIFY:
- case message_PLUG_IN_ABORT:
- case message_PLUG_IN_ACTION:
- break;
-#endif
case message_PRINT_SAVE:
if (event == wimp_USER_MESSAGE_ACKNOWLEDGE)
ro_print_save_bounce(message);
@@ -1977,8 +1946,8 @@ void ro_gui_view_source(struct hlcache_handle *c)
int objtype;
bool done = false;
- const char *source_data;
- unsigned long source_size;
+ const uint8_t *source_data;
+ size_t source_size;
if (!c) {
ro_warn_user("MiscError", "No document source");
@@ -2424,12 +2393,10 @@ static struct gui_fetch_table riscos_fetch_table = {
static struct gui_misc_table riscos_misc_table = {
.schedule = riscos_schedule,
- .warning = ro_warn_user,
.quit = gui_quit,
.launch_url = gui_launch_url,
- .cert_verify = gui_cert_verify,
- .login = gui_401login_open,
+ .present_cookies = ro_gui_cookies_present,
};
diff --git a/frontends/riscos/gui.h b/frontends/riscos/gui.h
index 49a8ba417..03989ae20 100644
--- a/frontends/riscos/gui.h
+++ b/frontends/riscos/gui.h
@@ -34,6 +34,8 @@
extern int os_version;
+extern bool os_alpha_sprite_supported;
+
extern const char * NETSURF_DIR;
struct toolbar;
@@ -44,7 +46,6 @@ struct tree;
struct node;
struct history;
struct css_style;
-struct ssl_cert_info;
struct nsurl;
struct hlcache_handle;
@@ -93,8 +94,6 @@ struct gui_window {
char validation[12]; /**< Validation string for colours */
- float scale; /**< Browser window scale */
-
/** Options. */
struct {
bool buffer_animations; /**< Use screen buffering for animations. */
@@ -134,11 +133,6 @@ void ro_gui_download_datasave_ack(wimp_message *message);
bool ro_gui_download_prequit(void);
extern struct gui_download_table *riscos_download_table;
-/* in 401login.c */
-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 schedule.c */
extern bool sched_active;
extern os_t sched_time;
@@ -163,7 +157,7 @@ nserror riscos_schedule(int t, void (*callback)(void *p), void *p);
/* in search.c */
void ro_gui_search_init(void);
void ro_gui_search_prepare(struct browser_window *g);
-struct gui_search_table *riscos_search_table;
+extern struct gui_search_table *riscos_search_table;
/* in print.c */
void ro_gui_print_init(void);
@@ -173,6 +167,7 @@ void ro_gui_print_prepare(struct gui_window *g);
extern const struct plotter_table ro_plotters;
extern int ro_plot_origin_x;
extern int ro_plot_origin_y;
+extern struct rect ro_plot_clip_rect;
/* in theme_install.c */
bool ro_gui_theme_install_apply(wimp_w w);
diff --git a/frontends/riscos/gui/button_bar.c b/frontends/riscos/gui/button_bar.c
index 34ae39ae5..50e1de3c1 100644
--- a/frontends/riscos/gui/button_bar.c
+++ b/frontends/riscos/gui/button_bar.c
@@ -189,7 +189,8 @@ struct button_bar *ro_gui_button_bar_create(struct theme_descriptor *theme,
icon->bar_next = NULL;
strncpy(icon->sprite, buttons[def].icon,
- BUTTONBAR_SPRITE_NAME_LENGTH);
+ BUTTONBAR_SPRITE_NAME_LENGTH - 1);
+ icon->sprite[BUTTONBAR_SPRITE_NAME_LENGTH-1] = 0;
snprintf(icon->validation, BUTTONBAR_VALIDATION_LENGTH,
"R5;S%s,p%s", icon->sprite, icon->sprite);
diff --git a/frontends/riscos/gui/throbber.c b/frontends/riscos/gui/throbber.c
index f3b79a68e..e3e4106cc 100644
--- a/frontends/riscos/gui/throbber.c
+++ b/frontends/riscos/gui/throbber.c
@@ -32,6 +32,7 @@
#include "oslib/wimp.h"
#include "utils/log.h"
+#include "utils/utils.h"
#include "riscos/gui.h"
#include "riscos/gui/throbber.h"
@@ -385,7 +386,8 @@ bool ro_gui_throbber_animate(struct throbber *throbber)
throbber->current_frame = 1;
snprintf(sprite_name, THROBBER_SPRITE_NAME_LENGTH,
- "throbber%i", throbber->current_frame);
+ "throbber%i",
+ min(max(throbber->current_frame, 0), 999));
ro_gui_set_icon_string(throbber->window, throbber->icon,
sprite_name, true);
diff --git a/frontends/riscos/gui/url_bar.c b/frontends/riscos/gui/url_bar.c
index ee5c689df..99a90f58a 100644
--- a/frontends/riscos/gui/url_bar.c
+++ b/frontends/riscos/gui/url_bar.c
@@ -25,20 +25,11 @@
* the use of the hlcache content interface.
*/
-#include <alloca.h>
-#include <assert.h>
-#include <stdio.h>
-#include <stdbool.h>
-#include <stdlib.h>
-#include <string.h>
-#include "oslib/os.h"
-#include "oslib/osspriteop.h"
+#include <stddef.h>
#include "oslib/wimp.h"
#include "utils/log.h"
#include "utils/messages.h"
-#include "utils/utf8.h"
-#include "utils/nsurl.h"
#include "netsurf/browser_window.h"
#include "netsurf/plotters.h"
#include "netsurf/content.h"
@@ -46,21 +37,25 @@
#include "riscos/gui.h"
#include "riscos/hotlist.h"
-#include "riscos/gui/url_bar.h"
#include "riscos/url_suggest.h"
#include "riscos/wimp.h"
#include "riscos/wimp_event.h"
+#include "riscos/wimputils.h"
#include "riscos/window.h"
#include "riscos/ucstables.h"
#include "riscos/filetype.h"
+#include "riscos/gui/url_bar.h"
#define URLBAR_HEIGHT 52
#define URLBAR_FAVICON_SIZE 16
#define URLBAR_HOTLIST_SIZE 17
+#define URLBAR_PGINFO_WIDTH ((26) * 2)
#define URLBAR_FAVICON_WIDTH ((5 + URLBAR_FAVICON_SIZE + 5) * 2)
#define URLBAR_HOTLIST_WIDTH ((5 + URLBAR_HOTLIST_SIZE + 5) * 2)
#define URLBAR_MIN_WIDTH 52
#define URLBAR_GRIGHT_GUTTER 8
+
+#define URLBAR_PGINFO_NAME_LENGTH 12
#define URLBAR_FAVICON_NAME_LENGTH 12
struct url_bar {
@@ -73,29 +68,43 @@ struct url_bar {
/** The window and icon details. */
wimp_w window;
os_box extent;
+ osspriteop_area *sprites;
wimp_i container_icon;
- char favicon_sprite[URLBAR_FAVICON_NAME_LENGTH];
- int favicon_type;
- struct hlcache_handle *favicon_content;
- os_box favicon_extent;
- os_coord favicon_offset;
- int favicon_width, favicon_height;
-
- wimp_i text_icon;
- char *text_buffer;
- size_t text_size;
- char *text_buffer_utf8;
-
- wimp_i suggest_icon;
- int suggest_x, suggest_y;
-
bool hidden;
bool display;
bool shaded;
struct {
+ char sprite[URLBAR_PGINFO_NAME_LENGTH];
+ os_box extent;
+ } pginfo;
+
+ struct {
+ char sprite[URLBAR_FAVICON_NAME_LENGTH];
+ int type;
+ struct hlcache_handle *content;
+ os_box extent;
+ os_coord offset;
+ int width;
+ int height;
+ } favicon;
+
+ struct {
+ wimp_i icon;
+ char *buffer;
+ size_t size;
+ char *buffer_utf8;
+ } text;
+
+ struct {
+ wimp_i icon;
+ int x;
+ int y;
+ } suggest;
+
+ struct {
bool set;
os_box extent;
os_coord offset;
@@ -128,119 +137,50 @@ static struct url_bar_resource url_bar_res[URLBAR_RES_LAST] = {
};
-static void ro_gui_url_bar_set_hotlist(struct url_bar *url_bar, bool set);
-
-
-/* This is an exported interface documented in url_bar.h */
-struct url_bar *ro_gui_url_bar_create(struct theme_descriptor *theme)
-{
- struct url_bar *url_bar;
-
- /* Allocate memory. */
-
- url_bar = malloc(sizeof(struct url_bar));
- if (url_bar == NULL) {
- NSLOG(netsurf, INFO, "No memory for malloc()");
- return NULL;
- }
-
- /* Set up default parameters. */
-
- url_bar->theme = theme;
-
- url_bar->display = false;
- url_bar->shaded = false;
-
- url_bar->x_min = URLBAR_FAVICON_WIDTH + URLBAR_MIN_WIDTH +
- URLBAR_HOTLIST_WIDTH;
- url_bar->y_min = URLBAR_HEIGHT;
-
- url_bar->extent.x0 = 0;
- url_bar->extent.y0 = 0;
- url_bar->extent.x1 = 0;
- url_bar->extent.y1 = 0;
-
- url_bar->window = NULL;
- url_bar->container_icon = -1;
- url_bar->text_icon = -1;
- url_bar->suggest_icon = -1;
-
- url_bar->favicon_extent.x0 = 0;
- url_bar->favicon_extent.y0 = 0;
- url_bar->favicon_extent.x1 = 0;
- url_bar->favicon_extent.y1 = 0;
- url_bar->favicon_width = 0;
- url_bar->favicon_height = 0;
- url_bar->favicon_content = NULL;
- url_bar->favicon_type = 0;
- strncpy(url_bar->favicon_sprite, "Ssmall_xxx",
- URLBAR_FAVICON_NAME_LENGTH);
-
- url_bar->hotlist.set = false;
- url_bar->hotlist.extent.x0 = 0;
- url_bar->hotlist.extent.y0 = 0;
- url_bar->hotlist.extent.x1 = 0;
- url_bar->hotlist.extent.y1 = 0;
-
- url_bar->text_size = RO_GUI_MAX_URL_SIZE;
- url_bar->text_buffer = malloc(url_bar->text_size);
- if (url_bar->text_buffer == NULL) {
- free(url_bar);
- return NULL;
- }
- url_bar->text_buffer[0] = 0;
- url_bar->text_buffer_utf8 = NULL;
-
- url_bar->hidden = false;
-
- return url_bar;
-}
-
-
/**
* Position the icons in the URL bar to take account of the currently
* configured extent.
*
- * \param *url_bar The URL bar to update.
- * \param full true to resize everything; false to move only
- * the right-hand end of the bar.
- * \return true if successful; else false.
+ * \param *url_bar The URL bar to update.
+ * \param full true to resize everything;
+ * false to move only the right-hand end of the bar.
+ * \return true if successful; else false.
*/
-
static bool ro_gui_url_bar_icon_resize(struct url_bar *url_bar, bool full)
{
- int x0, y0, x1, y1;
- int centre;
- os_error *error;
- os_coord eig = {1, 1};
- wimp_caret caret;
-
- if (url_bar == NULL || url_bar->window == NULL)
+ int x0, y0, x1, y1;
+ int centre;
+ os_error *error;
+ os_coord eig = {1, 1};
+ wimp_caret caret;
+
+ if ((url_bar == NULL) ||
+ (url_bar->window == NULL)) {
return false;
+ }
/* calculate 1px in OS units */
ro_convert_pixels_to_os_units(&eig, (os_mode) -1);
/* The vertical centre line of the widget's extent. */
-
centre = url_bar->extent.y0 +
- (url_bar->extent.y1 - url_bar->extent.y0) / 2;
+ (url_bar->extent.y1 - url_bar->extent.y0) / 2;
/* Position the container icon. */
-
if (url_bar->container_icon != -1) {
x0 = url_bar->extent.x0;
x1 = url_bar->extent.x1 -
- url_bar->suggest_x - URLBAR_GRIGHT_GUTTER;
+ url_bar->suggest.x - URLBAR_GRIGHT_GUTTER;
y0 = centre - (URLBAR_HEIGHT / 2);
y1 = y0 + URLBAR_HEIGHT;
error = xwimp_resize_icon(url_bar->window,
- url_bar->container_icon,
- x0, y0, x1, y1);
+ url_bar->container_icon,
+ x0, y0, x1, y1);
if (error != NULL) {
- NSLOG(netsurf, INFO, "xwimp_resize_icon: 0x%x: %s",
+ NSLOG(netsurf, INFO,
+ "xwimp_resize_icon: 0x%x: %s",
error->errnum, error->errmess);
ro_warn_user("WimpError", error->errmess);
url_bar->container_icon = -1;
@@ -249,82 +189,90 @@ static bool ro_gui_url_bar_icon_resize(struct url_bar *url_bar, bool full)
}
/* Position the URL Suggest icon. */
-
- if (url_bar->suggest_icon != -1) {
- x0 = url_bar->extent.x1 - url_bar->suggest_x;
+ if (url_bar->suggest.icon != -1) {
+ x0 = url_bar->extent.x1 - url_bar->suggest.x;
x1 = url_bar->extent.x1;
- y0 = centre - (url_bar->suggest_y / 2);
- y1 = y0 + url_bar->suggest_y;
+ y0 = centre - (url_bar->suggest.y / 2);
+ y1 = y0 + url_bar->suggest.y;
error = xwimp_resize_icon(url_bar->window,
- url_bar->suggest_icon,
- x0, y0, x1, y1);
+ url_bar->suggest.icon,
+ x0, y0, x1, y1);
if (error != NULL) {
- NSLOG(netsurf, INFO, "xwimp_resize_icon: 0x%x: %s",
+ NSLOG(netsurf, INFO,
+ "xwimp_resize_icon: 0x%x: %s",
error->errnum, error->errmess);
ro_warn_user("WimpError", error->errmess);
- url_bar->suggest_icon = -1;
+ url_bar->suggest.icon = -1;
return false;
}
}
/* Position the Text icon. */
-
- if (url_bar->text_icon != -1) {
- x0 = url_bar->extent.x0 + URLBAR_FAVICON_WIDTH;
+ if (url_bar->text.icon != -1) {
+ x0 = url_bar->extent.x0 + URLBAR_PGINFO_WIDTH + URLBAR_FAVICON_WIDTH;
x1 = url_bar->extent.x1 - eig.x - URLBAR_HOTLIST_WIDTH -
- url_bar->suggest_x - URLBAR_GRIGHT_GUTTER;
+ url_bar->suggest.x - URLBAR_GRIGHT_GUTTER;
y0 = centre - (URLBAR_HEIGHT / 2) + eig.y;
y1 = y0 + URLBAR_HEIGHT - 2 * eig.y;
error = xwimp_resize_icon(url_bar->window,
- url_bar->text_icon,
- x0, y0, x1, y1);
+ url_bar->text.icon,
+ x0, y0, x1, y1);
if (error != NULL) {
- NSLOG(netsurf, INFO, "xwimp_resize_icon: 0x%x: %s",
+ NSLOG(netsurf, INFO,
+ "xwimp_resize_icon: 0x%x: %s",
error->errnum, error->errmess);
ro_warn_user("WimpError", error->errmess);
- url_bar->text_icon = -1;
+ url_bar->text.icon = -1;
return false;
}
if (xwimp_get_caret_position(&caret) == NULL) {
if ((caret.w == url_bar->window) &&
- (caret.i == url_bar->text_icon)) {
+ (caret.i == url_bar->text.icon)) {
xwimp_set_caret_position(url_bar->window,
- url_bar->text_icon, caret.pos.x,
- caret.pos.y, -1, caret.index);
+ url_bar->text.icon,
+ caret.pos.x,
+ caret.pos.y,
+ -1,
+ caret.index);
}
}
}
- /* Position the Favicon icon. */
+ /* Position the page info icon. */
+ url_bar->pginfo.extent.x0 = url_bar->extent.x0 + eig.x;
+ url_bar->pginfo.extent.x1 = url_bar->extent.x0 + URLBAR_PGINFO_WIDTH;
+ url_bar->pginfo.extent.y0 = centre - (URLBAR_HEIGHT / 2) + eig.y;
+ url_bar->pginfo.extent.y1 = url_bar->pginfo.extent.y0 + URLBAR_HEIGHT
+ - 2 * eig.y;
- url_bar->favicon_extent.x0 = url_bar->extent.x0 + eig.x;
- url_bar->favicon_extent.x1 = url_bar->extent.x0 + URLBAR_FAVICON_WIDTH;
- url_bar->favicon_extent.y0 = centre - (URLBAR_HEIGHT / 2) + eig.y;
- url_bar->favicon_extent.y1 = url_bar->favicon_extent.y0 + URLBAR_HEIGHT
- - 2 * eig.y;
+ /* Position the Favicon icon. */
+ url_bar->favicon.extent.x0 = url_bar->extent.x0 + URLBAR_PGINFO_WIDTH ;
+ url_bar->favicon.extent.x1 = url_bar->extent.x0 + URLBAR_PGINFO_WIDTH + URLBAR_FAVICON_WIDTH;
+ url_bar->favicon.extent.y0 = centre - (URLBAR_HEIGHT / 2) + eig.y;
+ url_bar->favicon.extent.y1 = url_bar->favicon.extent.y0 + URLBAR_HEIGHT
+ - 2 * eig.y;
/* Position the Hotlist icon. */
-
url_bar->hotlist.extent.x0 = url_bar->extent.x1 - eig.x -
- URLBAR_HOTLIST_WIDTH - url_bar->suggest_x -
- URLBAR_GRIGHT_GUTTER;
+ URLBAR_HOTLIST_WIDTH - url_bar->suggest.x -
+ URLBAR_GRIGHT_GUTTER;
url_bar->hotlist.extent.x1 = url_bar->hotlist.extent.x0 +
- URLBAR_HOTLIST_WIDTH;
+ URLBAR_HOTLIST_WIDTH;
url_bar->hotlist.extent.y0 = centre - (URLBAR_HEIGHT / 2) + eig.y;
url_bar->hotlist.extent.y1 = url_bar->hotlist.extent.y0 + URLBAR_HEIGHT
- - 2 * eig.y;
+ - 2 * eig.y;
url_bar->hotlist.offset.x = ((url_bar->hotlist.extent.x1 -
- url_bar->hotlist.extent.x0) -
- (URLBAR_HOTLIST_SIZE * 2)) / 2;
+ url_bar->hotlist.extent.x0) -
+ (URLBAR_HOTLIST_SIZE * 2)) / 2;
url_bar->hotlist.offset.y = ((url_bar->hotlist.extent.y1 -
- url_bar->hotlist.extent.y0) -
- (URLBAR_HOTLIST_SIZE * 2)) / 2 - 1;
+ url_bar->hotlist.extent.y0) -
+ (URLBAR_HOTLIST_SIZE * 2)) / 2 - 1;
return true;
}
@@ -334,18 +282,19 @@ static bool ro_gui_url_bar_icon_resize(struct url_bar *url_bar, bool full)
* Create or delete a URL bar's icons if required to bring it into sync with
* the current hidden setting.
*
- * \param *url_bar The URL bar to update.
- * \return true if successful; else false.
+ * \param *url_bar The URL bar to update.
+ * \return true if successful; else false.
*/
-
static bool ro_gui_url_bar_icon_update(struct url_bar *url_bar)
{
- wimp_icon_create icon;
- os_error *error;
- bool resize;
+ wimp_icon_create icon;
+ os_error *error;
+ bool resize;
- if (url_bar == NULL || url_bar->window == NULL)
+ if ((url_bar == NULL) ||
+ (url_bar->window == NULL)) {
return false;
+ }
icon.w = url_bar->window;
icon.icon.extent.x0 = 0;
@@ -359,13 +308,12 @@ static bool ro_gui_url_bar_icon_update(struct url_bar *url_bar)
if (!url_bar->hidden && url_bar->container_icon == -1) {
icon.icon.flags = wimp_ICON_BORDER |
- (wimp_COLOUR_BLACK <<
- wimp_ICON_FG_COLOUR_SHIFT) |
- (wimp_BUTTON_DOUBLE_CLICK_DRAG <<
- wimp_ICON_BUTTON_TYPE_SHIFT);
+ (wimp_COLOUR_BLACK << wimp_ICON_FG_COLOUR_SHIFT) |
+ (wimp_BUTTON_DOUBLE_CLICK_DRAG << wimp_ICON_BUTTON_TYPE_SHIFT);
error = xwimp_create_icon(&icon, &url_bar->container_icon);
if (error != NULL) {
- NSLOG(netsurf, INFO, "xwimp_create_icon: 0x%x: %s",
+ NSLOG(netsurf, INFO,
+ "xwimp_create_icon: 0x%x: %s",
error->errnum, error->errmess);
ro_warn_user("WimpError", error->errmess);
url_bar->container_icon = -1;
@@ -373,11 +321,13 @@ static bool ro_gui_url_bar_icon_update(struct url_bar *url_bar)
}
resize = true;
- } else if (url_bar->hidden && url_bar->container_icon != -1){
+ } else if ((url_bar->hidden) &&
+ (url_bar->container_icon != -1)) {
error = xwimp_delete_icon(url_bar->window,
- url_bar->container_icon);
+ url_bar->container_icon);
if (error != NULL) {
- NSLOG(netsurf, INFO, "xwimp_delete_icon: 0x%x: %s",
+ NSLOG(netsurf, INFO,
+ "xwimp_delete_icon: 0x%x: %s",
error->errnum, error->errmess);
ro_warn_user("WimpError", error->errmess);
return false;
@@ -387,55 +337,68 @@ static bool ro_gui_url_bar_icon_update(struct url_bar *url_bar)
}
/* Create or delete the text icon. */
-
- if (!url_bar->hidden && url_bar->text_icon == -1) {
- icon.icon.data.indirected_text.text = url_bar->text_buffer;
+ if (!url_bar->hidden &&
+ url_bar->text.icon == -1) {
+ icon.icon.data.indirected_text.text = url_bar->text.buffer;
icon.icon.data.indirected_text.validation = text_validation;
- icon.icon.data.indirected_text.size = url_bar->text_size;
- icon.icon.flags = wimp_ICON_TEXT | wimp_ICON_INDIRECTED |
- wimp_ICON_VCENTRED | wimp_ICON_FILLED |
- (wimp_COLOUR_BLACK <<
- wimp_ICON_FG_COLOUR_SHIFT);
- if (url_bar->display)
+ icon.icon.data.indirected_text.size = url_bar->text.size;
+ icon.icon.flags = wimp_ICON_TEXT |
+ wimp_ICON_INDIRECTED |
+ wimp_ICON_VCENTRED |
+ wimp_ICON_FILLED |
+ (wimp_COLOUR_BLACK << wimp_ICON_FG_COLOUR_SHIFT);
+
+ if (url_bar->display) {
icon.icon.flags |= (wimp_BUTTON_NEVER <<
- wimp_ICON_BUTTON_TYPE_SHIFT);
- else
+ wimp_ICON_BUTTON_TYPE_SHIFT);
+ } else if (!ns_wimp_has_text_selection()) {
icon.icon.flags |= (wimp_BUTTON_WRITE_CLICK_DRAG <<
- wimp_ICON_BUTTON_TYPE_SHIFT);
- error = xwimp_create_icon(&icon, &url_bar->text_icon);
+ wimp_ICON_BUTTON_TYPE_SHIFT);
+ } else {
+ icon.icon.flags |= (wimp_BUTTON_WRITABLE <<
+ wimp_ICON_BUTTON_TYPE_SHIFT);
+ }
+ error = xwimp_create_icon(&icon, &url_bar->text.icon);
if (error) {
- NSLOG(netsurf, INFO, "xwimp_create_icon: 0x%x: %s",
+ NSLOG(netsurf, INFO,
+ "xwimp_create_icon: 0x%x: %s",
error->errnum, error->errmess);
ro_warn_user("WimpError", error->errmess);
- url_bar->text_icon = -1;
+ url_bar->text.icon = -1;
return false;
}
resize = true;
- } else if (url_bar->hidden && url_bar->text_icon != -1) {
+
+ } else if (url_bar->hidden &&
+ url_bar->text.icon != -1) {
error = xwimp_delete_icon(url_bar->window,
- url_bar->text_icon);
+ url_bar->text.icon);
if (error != NULL) {
- NSLOG(netsurf, INFO, "xwimp_delete_icon: 0x%x: %s",
+ NSLOG(netsurf, INFO,
+ "xwimp_delete_icon: 0x%x: %s",
error->errnum, error->errmess);
ro_warn_user("WimpError", error->errmess);
return false;
}
- url_bar->text_icon = -1;
+ url_bar->text.icon = -1;
}
/* Create or delete the suggest icon. */
-
- if (!url_bar->hidden && url_bar->suggest_icon == -1) {
+ if (!url_bar->hidden &&
+ url_bar->suggest.icon == -1) {
icon.icon.data.indirected_text.text = null_text_string;
icon.icon.data.indirected_text.size = 1;
icon.icon.data.indirected_text.validation = suggest_validation;
- icon.icon.flags = wimp_ICON_TEXT | wimp_ICON_SPRITE |
- wimp_ICON_INDIRECTED | wimp_ICON_HCENTRED |
- wimp_ICON_VCENTRED | (wimp_BUTTON_CLICK <<
- wimp_ICON_BUTTON_TYPE_SHIFT);
- error = xwimp_create_icon(&icon, &url_bar->suggest_icon);
+ icon.icon.flags = wimp_ICON_TEXT |
+ wimp_ICON_SPRITE |
+ wimp_ICON_INDIRECTED |
+ wimp_ICON_HCENTRED |
+ wimp_ICON_VCENTRED |
+ (wimp_BUTTON_CLICK << wimp_ICON_BUTTON_TYPE_SHIFT);
+
+ error = xwimp_create_icon(&icon, &url_bar->suggest.icon);
if (error) {
NSLOG(netsurf, INFO, "xwimp_create_icon: 0x%x: %s",
error->errnum, error->errmess);
@@ -445,59 +408,198 @@ static bool ro_gui_url_bar_icon_update(struct url_bar *url_bar)
if (!url_bar->display)
ro_gui_wimp_event_register_menu_gright(url_bar->window,
- wimp_ICON_WINDOW, url_bar->suggest_icon,
- ro_gui_url_suggest_menu);
+ wimp_ICON_WINDOW,
+ url_bar->suggest.icon,
+ ro_gui_url_suggest_menu);
- if (!ro_gui_url_bar_update_urlsuggest(url_bar))
+ if (!ro_gui_url_bar_update_urlsuggest(url_bar)) {
return false;
+ }
resize = true;
- } else if (url_bar->hidden && url_bar->suggest_icon != -1) {
+
+ } else if (url_bar->hidden &&
+ url_bar->suggest.icon != -1) {
ro_gui_wimp_event_deregister(url_bar->window,
- url_bar->suggest_icon);
+ url_bar->suggest.icon);
error = xwimp_delete_icon(url_bar->window,
- url_bar->suggest_icon);
+ url_bar->suggest.icon);
if (error != NULL) {
- NSLOG(netsurf, INFO, "xwimp_delete_icon: 0x%x: %s",
+ NSLOG(netsurf, INFO,
+ "xwimp_delete_icon: 0x%x: %s",
error->errnum, error->errmess);
ro_warn_user("WimpError", error->errmess);
return false;
}
- url_bar->suggest_icon = -1;
+ url_bar->suggest.icon = -1;
}
/* If any icons were created, resize the bar. */
-
- if (resize && !ro_gui_url_bar_icon_resize(url_bar, true))
+ if (resize && !ro_gui_url_bar_icon_resize(url_bar, true)) {
return false;
+ }
/* If there are any icons, apply shading as necessary. */
-
- if (url_bar->container_icon != -1)
+ if (url_bar->container_icon != -1) {
ro_gui_set_icon_shaded_state(url_bar->window,
- url_bar->container_icon, url_bar->shaded);
+ url_bar->container_icon,
+ url_bar->shaded);
+ }
- if (url_bar->text_icon != -1)
+ if (url_bar->text.icon != -1) {
ro_gui_set_icon_shaded_state(url_bar->window,
- url_bar->text_icon, url_bar->shaded);
+ url_bar->text.icon,
+ url_bar->shaded);
+ }
- if (url_bar->suggest_icon != -1)
+ if (url_bar->suggest.icon != -1) {
ro_gui_set_icon_shaded_state(url_bar->window,
- url_bar->suggest_icon, url_bar->shaded);
+ url_bar->suggest.icon,
+ url_bar->shaded);
+ }
return true;
}
+/**
+ * Set the state of a URL Bar's hotlist icon.
+ *
+ * \param *url_bar The URL Bar to update.
+ * \param set TRUE to set the hotlist icon; FALSE to clear it.
+ */
+static void ro_gui_url_bar_set_hotlist(struct url_bar *url_bar, bool set)
+{
+ if (url_bar == NULL ||
+ set == url_bar->hotlist.set) {
+ return;
+ }
+
+ url_bar->hotlist.set = set;
+
+ if (!url_bar->hidden) {
+ xwimp_force_redraw(url_bar->window,
+ url_bar->hotlist.extent.x0,
+ url_bar->hotlist.extent.y0,
+ url_bar->hotlist.extent.x1,
+ url_bar->hotlist.extent.y1);
+ }
+}
+
+
+/**
+ * Callback for hlcache.
+ */
+static nserror
+ro_gui_url_bar_res_cb(hlcache_handle *handle,
+ const hlcache_event *event, void *pw)
+{
+ struct url_bar_resource *r = pw;
+
+ switch (event->type) {
+ case CONTENT_MSG_READY:
+ case CONTENT_MSG_DONE:
+ r->ready = true;
+ r->height = content_get_height(handle);
+ break;
+
+ default:
+ break;
+ }
+
+ return NSERROR_OK;
+}
+
+
/* This is an exported interface documented in url_bar.h */
+struct url_bar *ro_gui_url_bar_create(struct theme_descriptor *theme)
+{
+ struct url_bar *url_bar;
-bool ro_gui_url_bar_rebuild(struct url_bar *url_bar,
- struct theme_descriptor *theme, theme_style style,
- wimp_w window, bool display, bool shaded)
+ /* Allocate memory. */
+
+ url_bar = malloc(sizeof(struct url_bar));
+ if (url_bar == NULL) {
+ NSLOG(netsurf, INFO, "No memory for malloc()");
+ return NULL;
+ }
+
+ /* Set up default parameters. */
+
+ url_bar->theme = theme;
+ url_bar->sprites = ro_gui_theme_get_sprites(theme);
+
+ url_bar->display = false;
+ url_bar->shaded = false;
+
+ url_bar->x_min = URLBAR_FAVICON_WIDTH + URLBAR_MIN_WIDTH +
+ URLBAR_HOTLIST_WIDTH;
+ url_bar->y_min = URLBAR_HEIGHT;
+
+ url_bar->extent.x0 = 0;
+ url_bar->extent.y0 = 0;
+ url_bar->extent.x1 = 0;
+ url_bar->extent.y1 = 0;
+
+ url_bar->window = NULL;
+ url_bar->container_icon = -1;
+ url_bar->text.icon = -1;
+ url_bar->suggest.icon = -1;
+
+ url_bar->pginfo.extent.x0 = 0;
+ url_bar->pginfo.extent.y0 = 0;
+ url_bar->pginfo.extent.x1 = 0;
+ url_bar->pginfo.extent.y1 = 0;
+ strncpy(url_bar->pginfo.sprite,
+ "pgiinternal",
+ URLBAR_PGINFO_NAME_LENGTH);
+
+ url_bar->favicon.extent.x0 = 0;
+ url_bar->favicon.extent.y0 = 0;
+ url_bar->favicon.extent.x1 = 0;
+ url_bar->favicon.extent.y1 = 0;
+ url_bar->favicon.width = 0;
+ url_bar->favicon.height = 0;
+ url_bar->favicon.content = NULL;
+ url_bar->favicon.type = 0;
+ strncpy(url_bar->favicon.sprite,
+ "Ssmall_xxx",
+ URLBAR_FAVICON_NAME_LENGTH);
+
+ url_bar->hotlist.set = false;
+ url_bar->hotlist.extent.x0 = 0;
+ url_bar->hotlist.extent.y0 = 0;
+ url_bar->hotlist.extent.x1 = 0;
+ url_bar->hotlist.extent.y1 = 0;
+
+ url_bar->text.size = RO_GUI_MAX_URL_SIZE;
+ url_bar->text.buffer = malloc(url_bar->text.size);
+ if (url_bar->text.buffer == NULL) {
+ free(url_bar);
+ return NULL;
+ }
+ url_bar->text.buffer[0] = 0;
+ url_bar->text.buffer_utf8 = NULL;
+
+ url_bar->hidden = false;
+
+ return url_bar;
+}
+
+
+/* This is an exported interface documented in url_bar.h */
+bool
+ro_gui_url_bar_rebuild(struct url_bar *url_bar,
+ struct theme_descriptor *theme,
+ theme_style style,
+ wimp_w window,
+ bool display,
+ bool shaded)
{
- if (url_bar == NULL)
+ if (url_bar == NULL) {
return false;
+ }
url_bar->theme = theme;
url_bar->window = window;
@@ -506,52 +608,62 @@ bool ro_gui_url_bar_rebuild(struct url_bar *url_bar,
url_bar->shaded = shaded;
url_bar->container_icon = -1;
- url_bar->text_icon = -1;
- url_bar->suggest_icon = -1;
+ url_bar->text.icon = -1;
+ url_bar->suggest.icon = -1;
ro_gui_wimp_get_sprite_dimensions((osspriteop_area *) -1,
- suggest_icon, &url_bar->suggest_x, &url_bar->suggest_y);
+ suggest_icon,
+ &url_bar->suggest.x,
+ &url_bar->suggest.y);
- url_bar->x_min = URLBAR_FAVICON_WIDTH + URLBAR_MIN_WIDTH +
- URLBAR_HOTLIST_WIDTH + URLBAR_GRIGHT_GUTTER +
- url_bar->suggest_x;
- url_bar->y_min = (url_bar->suggest_y > URLBAR_HEIGHT) ?
- url_bar->suggest_y : URLBAR_HEIGHT;
+ url_bar->x_min = URLBAR_PGINFO_WIDTH +
+ URLBAR_FAVICON_WIDTH +
+ URLBAR_MIN_WIDTH +
+ URLBAR_HOTLIST_WIDTH +
+ URLBAR_GRIGHT_GUTTER +
+ url_bar->suggest.x;
+
+ url_bar->y_min = (url_bar->suggest.y > URLBAR_HEIGHT) ?
+ url_bar->suggest.y : URLBAR_HEIGHT;
return ro_gui_url_bar_icon_update(url_bar);
}
/* This is an exported interface documented in url_bar.h */
-
void ro_gui_url_bar_destroy(struct url_bar *url_bar)
{
- if (url_bar == NULL)
+ if (url_bar == NULL) {
return;
+ }
- if (url_bar->text_buffer_utf8 != NULL)
- free(url_bar->text_buffer_utf8);
+ if (url_bar->text.buffer_utf8 != NULL) {
+ free(url_bar->text.buffer_utf8);
+ }
- if (url_bar->text_buffer != NULL)
- free(url_bar->text_buffer);
+ if (url_bar->text.buffer != NULL) {
+ free(url_bar->text.buffer);
+ }
free(url_bar);
}
/* This is an exported interface documented in url_bar.h */
-
-bool ro_gui_url_bar_get_dims(struct url_bar *url_bar,
- int *width, int *height)
+bool ro_gui_url_bar_get_dims(struct url_bar *url_bar, int *width, int *height)
{
- if (url_bar == NULL)
+ if (url_bar == NULL) {
return false;
+ }
- if (url_bar->x_min != -1 && url_bar->y_min != -1) {
- if (width != NULL)
+ if (url_bar->x_min != -1 &&
+ url_bar->y_min != -1) {
+ if (width != NULL) {
*width = url_bar->x_min;
- if (height != NULL)
+ }
+ if (height != NULL) {
*height = url_bar->y_min;
+ }
return true;
}
@@ -561,46 +673,52 @@ bool ro_gui_url_bar_get_dims(struct url_bar *url_bar,
/* This is an exported interface documented in url_bar.h */
-
-bool ro_gui_url_bar_set_extent(struct url_bar *url_bar,
- int x0, int y0, int x1, int y1)
+bool
+ro_gui_url_bar_set_extent(struct url_bar *url_bar,
+ int x0, int y0, int x1, int y1)
{
- bool stretch;
+ bool stretch;
- if (url_bar == NULL)
+ if (url_bar == NULL) {
return false;
+ }
- if ((x1 - x0) < url_bar->x_min || (y1 - y0) < url_bar->y_min)
+ if ((x1 - x0) < url_bar->x_min ||
+ (y1 - y0) < url_bar->y_min) {
return false;
+ }
- if (url_bar->extent.x0 == x0 && url_bar->extent.y0 == y0 &&
- url_bar->extent.x1 == x1 &&
- url_bar->extent.y1 == y1)
+ if (url_bar->extent.x0 == x0 &&
+ url_bar->extent.y0 == y0 &&
+ url_bar->extent.x1 == x1 &&
+ url_bar->extent.y1 == y1) {
return true;
+ }
/* If it's only the length that changes, less needs to be updated. */
-
- stretch = (url_bar->extent.x0 == x0 && url_bar->extent.y0 == y0 &&
- url_bar->extent.y1 == y1) ? true : false;
+ stretch = (url_bar->extent.x0 == x0 &&
+ url_bar->extent.y0 == y0 &&
+ url_bar->extent.y1 == y1) ? true : false;
/* Redraw the relevant bits of the toolbar. */
-
- if (url_bar->window != NULL && !url_bar->hidden) {
+ if (url_bar->window != NULL &&
+ !url_bar->hidden) {
if (stretch) {
xwimp_force_redraw(url_bar->window,
- x0 + URLBAR_FAVICON_WIDTH, y0,
- (x1 > url_bar->extent.x1) ?
- x1 : url_bar->extent.x1, y1);
+ x0 + URLBAR_PGINFO_WIDTH + URLBAR_FAVICON_WIDTH, y0,
+ (x1 > url_bar->extent.x1) ?
+ x1 : url_bar->extent.x1, y1);
} else {
xwimp_force_redraw(url_bar->window,
- url_bar->extent.x0, url_bar->extent.y0,
- url_bar->extent.x1, url_bar->extent.y1);
+ url_bar->extent.x0,
+ url_bar->extent.y0,
+ url_bar->extent.x1,
+ url_bar->extent.y1);
xwimp_force_redraw(url_bar->window, x0, y0, x1, y1);
}
}
/* Reposition the URL bar icons. */
-
url_bar->extent.x0 = x0;
url_bar->extent.y0 = y0;
url_bar->extent.x1 = x1;
@@ -611,7 +729,6 @@ bool ro_gui_url_bar_set_extent(struct url_bar *url_bar,
/* This is an exported interface documented in url_bar.h */
-
bool ro_gui_url_bar_hide(struct url_bar *url_bar, bool hide)
{
if (url_bar == NULL || url_bar->hidden == hide)
@@ -624,11 +741,11 @@ bool ro_gui_url_bar_hide(struct url_bar *url_bar, bool hide)
/* This is an exported interface documented in url_bar.h */
-
void ro_gui_url_bar_redraw(struct url_bar *url_bar, wimp_draw *redraw)
{
wimp_icon icon;
struct rect clip;
+ bool draw_pginfo = true;
bool draw_favicon = true;
bool draw_hotlist = true;
@@ -637,44 +754,75 @@ void ro_gui_url_bar_redraw(struct url_bar *url_bar, wimp_draw *redraw)
return;
if ((redraw->clip.x0 - (redraw->box.x0 - redraw->xscroll)) >
- (url_bar->favicon_extent.x1) ||
- (redraw->clip.y0 - (redraw->box.y1 - redraw->yscroll)) >
- (url_bar->favicon_extent.y1) ||
- (redraw->clip.x1 - (redraw->box.x0 - redraw->xscroll)) <
- (url_bar->favicon_extent.x0) ||
- (redraw->clip.y1 - (redraw->box.y1 - redraw->yscroll)) <
- (url_bar->favicon_extent.y0)) {
+ (url_bar->pginfo.extent.x1) ||
+ (redraw->clip.y0 - (redraw->box.y1 - redraw->yscroll)) >
+ (url_bar->pginfo.extent.y1) ||
+ (redraw->clip.x1 - (redraw->box.x0 - redraw->xscroll)) <
+ (url_bar->pginfo.extent.x0) ||
+ (redraw->clip.y1 - (redraw->box.y1 - redraw->yscroll)) <
+ (url_bar->pginfo.extent.y0)) {
+ /* page info not in redraw area */
+ draw_pginfo = false;
+ }
+
+ if ((redraw->clip.x0 - (redraw->box.x0 - redraw->xscroll)) >
+ (url_bar->favicon.extent.x1) ||
+ (redraw->clip.y0 - (redraw->box.y1 - redraw->yscroll)) >
+ (url_bar->favicon.extent.y1) ||
+ (redraw->clip.x1 - (redraw->box.x0 - redraw->xscroll)) <
+ (url_bar->favicon.extent.x0) ||
+ (redraw->clip.y1 - (redraw->box.y1 - redraw->yscroll)) <
+ (url_bar->favicon.extent.y0)) {
/* Favicon not in redraw area */
draw_favicon = false;
}
if ((redraw->clip.x0 - (redraw->box.x0 - redraw->xscroll)) >
- (url_bar->hotlist.extent.x1) ||
- (redraw->clip.y0 - (redraw->box.y1 - redraw->yscroll)) >
- (url_bar->hotlist.extent.y1) ||
- (redraw->clip.x1 - (redraw->box.x0 - redraw->xscroll)) <
- (url_bar->hotlist.extent.x0) ||
- (redraw->clip.y1 - (redraw->box.y1 - redraw->yscroll)) <
- (url_bar->hotlist.extent.y0)) {
+ (url_bar->hotlist.extent.x1) ||
+ (redraw->clip.y0 - (redraw->box.y1 - redraw->yscroll)) >
+ (url_bar->hotlist.extent.y1) ||
+ (redraw->clip.x1 - (redraw->box.x0 - redraw->xscroll)) <
+ (url_bar->hotlist.extent.x0) ||
+ (redraw->clip.y1 - (redraw->box.y1 - redraw->yscroll)) <
+ (url_bar->hotlist.extent.y0)) {
/* Hotlist icon not in redraw area */
draw_hotlist = false;
}
+ if (draw_pginfo) {
+ icon.flags = wimp_ICON_SPRITE |
+ wimp_ICON_INDIRECTED |
+ wimp_ICON_FILLED |
+ wimp_ICON_HCENTRED |
+ wimp_ICON_VCENTRED |
+ (wimp_COLOUR_WHITE << wimp_ICON_BG_COLOUR_SHIFT);
+ icon.data.indirected_sprite.id = (osspriteop_id)url_bar->pginfo.sprite;
+ icon.data.indirected_sprite.area = url_bar->sprites;
+ icon.data.indirected_sprite.size = 12;
+
+ icon.extent.x0 = url_bar->pginfo.extent.x0;
+ icon.extent.x1 = url_bar->pginfo.extent.x1;
+ icon.extent.y0 = url_bar->pginfo.extent.y0;
+ icon.extent.y1 = url_bar->pginfo.extent.y1;
+
+ xwimp_plot_icon(&icon);
+ }
+
if (draw_favicon) {
- if (url_bar->favicon_content == NULL) {
+ if (url_bar->favicon.content == NULL) {
icon.data.indirected_text.text = null_text_string;
icon.data.indirected_text.validation =
- url_bar->favicon_sprite;
+ url_bar->favicon.sprite;
icon.data.indirected_text.size = 1;
icon.flags = wimp_ICON_TEXT | wimp_ICON_SPRITE |
- wimp_ICON_INDIRECTED |
- wimp_ICON_FILLED |
- wimp_ICON_HCENTRED |
- wimp_ICON_VCENTRED;
- icon.extent.x0 = url_bar->favicon_extent.x0;
- icon.extent.x1 = url_bar->favicon_extent.x1;
- icon.extent.y0 = url_bar->favicon_extent.y0;
- icon.extent.y1 = url_bar->favicon_extent.y1;
+ wimp_ICON_INDIRECTED |
+ wimp_ICON_FILLED |
+ wimp_ICON_HCENTRED |
+ wimp_ICON_VCENTRED;
+ icon.extent.x0 = url_bar->favicon.extent.x0;
+ icon.extent.x1 = url_bar->favicon.extent.x1;
+ icon.extent.y0 = url_bar->favicon.extent.y0;
+ icon.extent.y1 = url_bar->favicon.extent.y1;
xwimp_plot_icon(&icon);
} else {
@@ -687,34 +835,34 @@ void ro_gui_url_bar_redraw(struct url_bar *url_bar, wimp_draw *redraw)
xwimp_set_colour(wimp_COLOUR_WHITE);
xos_plot(os_MOVE_TO,
- (redraw->box.x0 - redraw->xscroll) +
- url_bar->favicon_extent.x0,
- (redraw->box.y1 - redraw->yscroll) +
- url_bar->favicon_extent.y0);
+ (redraw->box.x0 - redraw->xscroll) +
+ url_bar->favicon.extent.x0,
+ (redraw->box.y1 - redraw->yscroll) +
+ url_bar->favicon.extent.y0);
xos_plot(os_PLOT_TO | os_PLOT_RECTANGLE,
- (redraw->box.x0 - redraw->xscroll) +
- url_bar->favicon_extent.x1,
- (redraw->box.y1 - redraw->yscroll) +
- url_bar->favicon_extent.y1);
+ (redraw->box.x0 - redraw->xscroll) +
+ url_bar->favicon.extent.x1,
+ (redraw->box.y1 - redraw->yscroll) +
+ url_bar->favicon.extent.y1);
clip.x0 = (redraw->clip.x0 - ro_plot_origin_x) / 2;
clip.y0 = (ro_plot_origin_y - redraw->clip.y0) / 2;
clip.x1 = (redraw->clip.x1 - ro_plot_origin_x) / 2;
clip.y1 = (ro_plot_origin_y - redraw->clip.y1) / 2;
- data.x = (url_bar->favicon_extent.x0 +
- url_bar->favicon_offset.x) / 2;
- data.y = (url_bar->favicon_offset.y -
- url_bar->favicon_extent.y1) / 2;
- data.width = url_bar->favicon_width;
- data.height = url_bar->favicon_height;
+ data.x = (url_bar->favicon.extent.x0 +
+ url_bar->favicon.offset.x) / 2;
+ data.y = (url_bar->favicon.offset.y -
+ url_bar->favicon.extent.y1) / 2;
+ data.width = url_bar->favicon.width;
+ data.height = url_bar->favicon.height;
data.background_colour = 0xFFFFFF;
data.scale = 1;
data.repeat_x = false;
data.repeat_y = false;
- content_redraw(url_bar->favicon_content,
- &data, &clip, &ctx);
+ content_redraw(url_bar->favicon.content,
+ &data, &clip, &ctx);
}
}
@@ -726,20 +874,20 @@ void ro_gui_url_bar_redraw(struct url_bar *url_bar, wimp_draw *redraw)
.plot = &ro_plotters
};
struct url_bar_resource *hotlist_icon = url_bar->hotlist.set ?
- &(url_bar_res[URLBAR_RES_HOTLIST_REMOVE]) :
- &(url_bar_res[URLBAR_RES_HOTLIST_ADD]);
+ &(url_bar_res[URLBAR_RES_HOTLIST_REMOVE]) :
+ &(url_bar_res[URLBAR_RES_HOTLIST_ADD]);
xwimp_set_colour(wimp_COLOUR_WHITE);
xos_plot(os_MOVE_TO,
- (redraw->box.x0 - redraw->xscroll) +
- url_bar->hotlist.extent.x0,
- (redraw->box.y1 - redraw->yscroll) +
- url_bar->hotlist.extent.y0);
+ (redraw->box.x0 - redraw->xscroll) +
+ url_bar->hotlist.extent.x0,
+ (redraw->box.y1 - redraw->yscroll) +
+ url_bar->hotlist.extent.y0);
xos_plot(os_PLOT_TO | os_PLOT_RECTANGLE,
- (redraw->box.x0 - redraw->xscroll) +
- url_bar->hotlist.extent.x1,
- (redraw->box.y1 - redraw->yscroll) +
- url_bar->hotlist.extent.y1);
+ (redraw->box.x0 - redraw->xscroll) +
+ url_bar->hotlist.extent.x1,
+ (redraw->box.y1 - redraw->yscroll) +
+ url_bar->hotlist.extent.y1);
if (hotlist_icon->ready == false) {
return;
@@ -751,9 +899,9 @@ void ro_gui_url_bar_redraw(struct url_bar *url_bar, wimp_draw *redraw)
clip.y1 = (ro_plot_origin_y - redraw->clip.y1) / 2;
data.x = (url_bar->hotlist.extent.x0 +
- url_bar->hotlist.offset.x) / 2;
+ url_bar->hotlist.offset.x) / 2;
data.y = (url_bar->hotlist.offset.y -
- url_bar->hotlist.extent.y1) / 2;
+ url_bar->hotlist.extent.y1) / 2;
data.width = URLBAR_HOTLIST_SIZE;
data.height = URLBAR_HOTLIST_SIZE;
data.background_colour = 0xFFFFFF;
@@ -765,67 +913,93 @@ void ro_gui_url_bar_redraw(struct url_bar *url_bar, wimp_draw *redraw)
}
}
+/**
+ * check if os point is inside an os box
+ *
+ * \param pos The coordinate of the point
+ * \param box The box to check against
+ * \return true if point is inside the box else false
+ */
+static inline bool is_point_in_box(os_coord *pos, os_box *box)
+{
+ if (pos->x < box->x0 ||
+ pos->x > box->x1 ||
+ pos->y < box->y0 ||
+ pos->y > box->y1) {
+ return false;
+ }
+ return true;
+}
/* This is an exported interface documented in url_bar.h */
-
-bool ro_gui_url_bar_click(struct url_bar *url_bar,
- wimp_pointer *pointer, wimp_window_state *state,
- url_bar_action *action)
+bool
+ro_gui_url_bar_click(struct url_bar *url_bar,
+ wimp_pointer *pointer,
+ wimp_window_state *state,
+ url_bar_action *action)
{
os_coord pos;
if (url_bar == NULL || url_bar->hidden ||
- url_bar->display || url_bar->shaded)
+ url_bar->display || url_bar->shaded) {
return false;
+ }
/* Check that the click was within our part of the window. */
-
pos.x = pointer->pos.x - state->visible.x0 + state->xscroll;
pos.y = pointer->pos.y - state->visible.y1 + state->yscroll;
- if (pos.x < url_bar->extent.x0 || pos.x > url_bar->extent.x1 ||
- pos.y < url_bar->extent.y0 ||
- pos.y > url_bar->extent.y1)
+ if (!is_point_in_box(&pos, &url_bar->extent)) {
return false;
+ }
/* If we have a Select or Adjust click, check if it originated on the
* hotlist icon; if it did, return an event.
*/
-
if (pointer->buttons == wimp_SINGLE_SELECT ||
- pointer->buttons == wimp_SINGLE_ADJUST) {
- if (pos.x >= url_bar->hotlist.extent.x0 &&
- pos.x <= url_bar->hotlist.extent.x1 &&
- pos.y >= url_bar->hotlist.extent.y0 &&
- pos.y <= url_bar->hotlist.extent.y1) {
+ pointer->buttons == wimp_SINGLE_ADJUST) {
+ if (is_point_in_box(&pos, &url_bar->hotlist.extent)) {
if (pointer->buttons == wimp_SINGLE_SELECT &&
- action != NULL)
+ action != NULL) {
*action = TOOLBAR_URL_SELECT_HOTLIST;
- else if (pointer->buttons == wimp_SINGLE_ADJUST &&
- action != NULL)
+ } else if (pointer->buttons == wimp_SINGLE_ADJUST &&
+ action != NULL) {
*action = TOOLBAR_URL_ADJUST_HOTLIST;
+ }
+ return true;
+ }
+
+ if (is_point_in_box(&pos, &url_bar->pginfo.extent)) {
+ if (pointer->buttons == wimp_SINGLE_SELECT &&
+ action != NULL) {
+ *action = TOOLBAR_URL_SELECT_PGINFO;
+ } else if (pointer->buttons == wimp_SINGLE_ADJUST &&
+ action != NULL) {
+ *action = TOOLBAR_URL_ADJUST_PGINFO;
+ }
return true;
}
+
}
/* If we find a Select or Adjust drag, check if it originated on the
* URL bar or over the favicon. If either, then return an event.
*/
-
if (pointer->buttons == wimp_DRAG_SELECT ||
- pointer->buttons == wimp_DRAG_ADJUST) {
- if (pointer->i == url_bar->text_icon) {
- if (action != NULL)
- *action = TOOLBAR_URL_DRAG_URL;
- return true;
+ pointer->buttons == wimp_DRAG_ADJUST) {
+ if (!ns_wimp_has_text_selection()) {
+ if (pointer->i == url_bar->text.icon) {
+ if (action != NULL) {
+ *action = TOOLBAR_URL_DRAG_URL;
+ }
+ return true;
+ }
}
- if (pos.x >= url_bar->favicon_extent.x0 &&
- pos.x <= url_bar->favicon_extent.x1 &&
- pos.y >= url_bar->favicon_extent.y0 &&
- pos.y <= url_bar->favicon_extent.y1) {
- if (action != NULL)
+ if (is_point_in_box(&pos, &url_bar->favicon.extent)) {
+ if (action != NULL) {
*action = TOOLBAR_URL_DRAG_FAVICON;
+ }
return true;
}
}
@@ -835,37 +1009,49 @@ bool ro_gui_url_bar_click(struct url_bar *url_bar,
/* This is an exported interface documented in url_bar.h */
-
-bool ro_gui_url_bar_menu_prepare(struct url_bar *url_bar, wimp_i i,
- wimp_menu *menu, wimp_pointer *pointer)
+bool
+ro_gui_url_bar_menu_prepare(struct url_bar *url_bar,
+ wimp_i i,
+ wimp_menu *menu,
+ wimp_pointer *pointer)
{
- if (url_bar == NULL || url_bar->suggest_icon != i ||
- menu != ro_gui_url_suggest_menu)
+ if (url_bar == NULL ||
+ url_bar->suggest.icon != i ||
+ menu != ro_gui_url_suggest_menu) {
return false;
+ }
- if (pointer != NULL)
+ if (pointer != NULL) {
return ro_gui_url_suggest_prepare_menu();
+ }
return true;
}
/* This is an exported interface documented in url_bar.h */
-
-bool ro_gui_url_bar_menu_select(struct url_bar *url_bar, wimp_i i,
- wimp_menu *menu, wimp_selection *selection, menu_action action)
+bool
+ro_gui_url_bar_menu_select(struct url_bar *url_bar,
+ wimp_i i,
+ wimp_menu *menu,
+ wimp_selection *selection,
+ menu_action action)
{
const char *urltxt;
struct gui_window *g;
- if (url_bar == NULL || url_bar->suggest_icon != i ||
- menu != ro_gui_url_suggest_menu)
+ if (url_bar == NULL ||
+ url_bar->suggest.icon != i ||
+ menu != ro_gui_url_suggest_menu) {
return false;
+ }
urltxt = ro_gui_url_suggest_get_selection(selection);
g = ro_gui_toolbar_lookup(url_bar->window);
- if (urltxt != NULL && g != NULL && g->bw != NULL) {
+ if (urltxt != NULL &&
+ g != NULL &&
+ g->bw != NULL) {
nsurl *url;
nserror error;
@@ -876,12 +1062,12 @@ bool ro_gui_url_bar_menu_select(struct url_bar *url_bar, wimp_i i,
ro_gui_window_set_url(g, url);
browser_window_navigate(g->bw,
- url,
- NULL,
- BW_NAVIGATE_HISTORY,
- NULL,
- NULL,
- NULL);
+ url,
+ NULL,
+ BW_NAVIGATE_HISTORY,
+ NULL,
+ NULL,
+ NULL);
nsurl_unref(url);
}
}
@@ -891,65 +1077,74 @@ bool ro_gui_url_bar_menu_select(struct url_bar *url_bar, wimp_i i,
/* This is an exported interface documented in url_bar.h */
-
-bool ro_gui_url_bar_help_suffix(struct url_bar *url_bar, wimp_i i,
- os_coord *mouse, wimp_window_state *state,
- wimp_mouse_state buttons, const char **suffix)
+bool
+ro_gui_url_bar_help_suffix(struct url_bar *url_bar,
+ wimp_i i,
+ os_coord *mouse,
+ wimp_window_state *state,
+ wimp_mouse_state buttons,
+ const char **suffix)
{
- os_coord pos;
+ os_coord pos;
- if (url_bar == NULL || url_bar->hidden)
+ if (url_bar == NULL || url_bar->hidden) {
return false;
+ }
/* Check that the click was within our part of the window. */
pos.x = mouse->x - state->visible.x0 + state->xscroll;
pos.y = mouse->y - state->visible.y1 + state->yscroll;
- if (pos.x < url_bar->extent.x0 || pos.x > url_bar->extent.x1 ||
- pos.y < url_bar->extent.y0 ||
- pos.y > url_bar->extent.y1)
+ if (pos.x < url_bar->extent.x0 ||
+ pos.x > url_bar->extent.x1 ||
+ pos.y < url_bar->extent.y0 ||
+ pos.y > url_bar->extent.y1) {
return false;
+ }
/* Return hard-coded icon numbers that match the ones that were
* always allocated to the URL bar in a previous implementation.
* If Messages can be updated, this could be changed.
*/
- if (i == url_bar->text_icon)
+ if (i == url_bar->text.icon) {
*suffix = "14";
- else if (i == url_bar->suggest_icon)
+ } else if (i == url_bar->suggest.icon) {
*suffix = "15";
- else if (pos.x >= url_bar->hotlist.extent.x0 &&
- pos.x <= url_bar->hotlist.extent.x1 &&
- pos.y >= url_bar->hotlist.extent.y0 &&
- pos.y <= url_bar->hotlist.extent.y1)
+ } else if (pos.x >= url_bar->hotlist.extent.x0 &&
+ pos.x <= url_bar->hotlist.extent.x1 &&
+ pos.y >= url_bar->hotlist.extent.y0 &&
+ pos.y <= url_bar->hotlist.extent.y1) {
*suffix = "Hot";
- else if (pos.x >= url_bar->favicon_extent.x0 &&
- pos.x <= url_bar->favicon_extent.x1 &&
- pos.y >= url_bar->favicon_extent.y0 &&
- pos.y <= url_bar->favicon_extent.y1)
+ } else if (pos.x >= url_bar->favicon.extent.x0 &&
+ pos.x <= url_bar->favicon.extent.x1 &&
+ pos.y >= url_bar->favicon.extent.y0 &&
+ pos.y <= url_bar->favicon.extent.y1) {
*suffix = "Fav";
- else
+ } else {
*suffix = "";
+ }
return true;
}
/* This is an exported interface documented in url_bar.h */
-
bool ro_gui_url_bar_take_caret(struct url_bar *url_bar)
{
- os_error *error;
+ os_error *error;
- if (url_bar == NULL || url_bar->hidden)
+ if (url_bar == NULL || url_bar->hidden) {
return false;
+ }
- error = xwimp_set_caret_position(url_bar->window, url_bar->text_icon,
- -1, -1, -1, 0);
+ error = xwimp_set_caret_position(url_bar->window,
+ url_bar->text.icon,
+ -1, -1, -1, 0);
if (error) {
- NSLOG(netsurf, INFO, "xwimp_set_caret_position: 0x%x: %s",
+ NSLOG(netsurf, INFO,
+ "xwimp_set_caret_position: 0x%x: %s",
error->errnum, error->errmess);
ro_warn_user("WimpError", error->errmess);
@@ -961,18 +1156,23 @@ bool ro_gui_url_bar_take_caret(struct url_bar *url_bar)
/* This is an exported interface documented in url_bar.h */
-
-void ro_gui_url_bar_set_url(struct url_bar *url_bar, const char *url,
- bool is_utf8, bool set_caret)
+void
+ro_gui_url_bar_set_url(struct url_bar *url_bar,
+ const char *url,
+ bool is_utf8,
+ bool set_caret)
{
- wimp_caret caret;
- os_error *error;
- char *local_text = NULL;
- const char *local_url;
+ wimp_caret caret;
+ os_error *error;
+ char *local_text = NULL;
+ const char *local_url;
nsurl *n;
- if (url_bar == NULL || url_bar->text_buffer == NULL || url == NULL)
+ if (url_bar == NULL ||
+ url_bar->text.buffer == NULL ||
+ url == NULL) {
return;
+ }
/* Before we do anything with the URL, get it into local encoding so
* that behaviour is consistent with the rest of the URL Bar module
@@ -996,55 +1196,56 @@ void ro_gui_url_bar_set_url(struct url_bar *url_bar, const char *url,
local_url = url;
}
- /* Copy the text into the icon buffer. If the text is too long, blank
- * the buffer and warn the user.
+ /* Copy the text into the icon buffer. If the text is too long, truncate
+ * for URL bar and log the full URL.
*/
-
- if (strlen(local_url) >= url_bar->text_size) {
- url_bar->text_buffer[0] = '\0';
- ro_warn_user("LongURL", NULL);
- NSLOG(netsurf, INFO, "Long URL (%zu chars): %s", strlen(url),
- url);
- } else {
- strncpy(url_bar->text_buffer, local_url,
- url_bar->text_size - 1);
- url_bar->text_buffer[url_bar->text_size - 1] = '\0';
+ if (strlen(local_url) >= url_bar->text.size) {
+ NSLOG(netsurf, WARNING,
+ "URL too long to show in URL bar (%zu chars): %s",
+ strlen(url), url);
}
- if (local_text != NULL)
+ strncpy(url_bar->text.buffer, local_url, url_bar->text.size - 1);
+ url_bar->text.buffer[url_bar->text.size - 1] = '\0';
+
+ if (local_text != NULL) {
free(local_text);
+ }
/* Set the hotlist flag. */
-
- if (nsurl_create(url_bar->text_buffer, &n) == NSERROR_OK) {
+ if (nsurl_create(url, &n) == NSERROR_OK) {
ro_gui_url_bar_set_hotlist(url_bar, ro_gui_hotlist_has_page(n));
nsurl_unref(n);
}
/* If there's no icon, then there's nothing else to do... */
-
- if (url_bar->text_icon == -1)
+ if (url_bar->text.icon == -1) {
return;
+ }
/* ...if there is, redraw the icon and fix the caret's position. */
-
- ro_gui_redraw_icon(url_bar->window, url_bar->text_icon);
+ ro_gui_redraw_icon(url_bar->window, url_bar->text.icon);
error = xwimp_get_caret_position(&caret);
if (error) {
- NSLOG(netsurf, INFO, "xwimp_get_caret_position: 0x%x: %s",
+ NSLOG(netsurf, INFO,
+ "xwimp_get_caret_position: 0x%x: %s",
error->errnum, error->errmess);
ro_warn_user("WimpError", error->errmess);
return;
}
- if (set_caret || (caret.w == url_bar->window &&
- caret.i == url_bar->text_icon)) {
- const char *set_url = ro_gui_get_icon_string(url_bar->window,
- url_bar->text_icon);
+ if (set_caret ||
+ (caret.w == url_bar->window &&
+ caret.i == url_bar->text.icon)) {
+ const char *set_url;
+ set_url = ro_gui_get_icon_string(url_bar->window,
+ url_bar->text.icon);
error = xwimp_set_caret_position(url_bar->window,
- url_bar->text_icon, 0, 0, -1, strlen(set_url));
+ url_bar->text.icon,
+ 0, 0, -1,
+ strlen(set_url));
if (error) {
NSLOG(netsurf, INFO,
"xwimp_set_caret_position: 0x%x: %s",
@@ -1057,88 +1258,73 @@ void ro_gui_url_bar_set_url(struct url_bar *url_bar, const char *url,
/* This is an exported interface documented in url_bar.h */
-
void ro_gui_url_bar_update_hotlist(struct url_bar *url_bar)
{
const char *url;
nsurl *n;
- if (url_bar == NULL)
+ if (url_bar == NULL) {
return;
+ }
- url = (const char *) url_bar->text_buffer;
- if (url != NULL && nsurl_create(url, &n) == NSERROR_OK) {
+ url = (const char *) url_bar->text.buffer;
+ if (url != NULL &&
+ nsurl_create(url, &n) == NSERROR_OK) {
ro_gui_url_bar_set_hotlist(url_bar, ro_gui_hotlist_has_page(n));
nsurl_unref(n);
}
}
-/**
- * Set the state of a URL Bar's hotlist icon.
- *
- * \param *url_bar The URL Bar to update.
- * \param set TRUE to set the hotlist icon; FALSE to clear it.
- */
-
-static void ro_gui_url_bar_set_hotlist(struct url_bar *url_bar, bool set)
-{
- if (url_bar == NULL || set == url_bar->hotlist.set)
- return;
-
- url_bar->hotlist.set = set;
-
- if (!url_bar->hidden) {
- xwimp_force_redraw(url_bar->window,
- url_bar->hotlist.extent.x0,
- url_bar->hotlist.extent.y0,
- url_bar->hotlist.extent.x1,
- url_bar->hotlist.extent.y1);
- }
-}
-
-
/* This is an exported interface documented in url_bar.h */
-
const char *ro_gui_url_bar_get_url(struct url_bar *url_bar)
{
- if ((url_bar == NULL) || (url_bar->text_buffer == NULL))
+ nserror res;
+
+ if ((url_bar == NULL) ||
+ (url_bar->text.buffer == NULL)) {
return NULL;
+ }
- if (url_bar->text_buffer_utf8 != NULL) {
- free(url_bar->text_buffer_utf8);
- url_bar->text_buffer_utf8 = NULL;
+ if (url_bar->text.buffer_utf8 != NULL) {
+ free(url_bar->text.buffer_utf8);
+ url_bar->text.buffer_utf8 = NULL;
}
- if (url_bar->text_buffer[0] == '\0')
- return (const char *) url_bar->text_buffer;
+ if (url_bar->text.buffer[0] == '\0') {
+ return (const char *) url_bar->text.buffer;
+ }
- if (utf8_from_local_encoding(url_bar->text_buffer, 0, &url_bar->text_buffer_utf8) == NSERROR_OK) {
- return (const char *) url_bar->text_buffer_utf8;
+ res = utf8_from_local_encoding(url_bar->text.buffer, 0,
+ &url_bar->text.buffer_utf8);
+ if (res == NSERROR_OK) {
+ return (const char *)url_bar->text.buffer_utf8;
}
- return (const char *) url_bar->text_buffer;
+ return (const char *) url_bar->text.buffer;
}
/* This is an exported interface documented in url_bar.h */
-
bool ro_gui_url_bar_get_url_extent(struct url_bar *url_bar, os_box *extent)
{
- wimp_icon_state state;
- os_error *error;
+ wimp_icon_state state;
+ os_error *error;
- if (url_bar == NULL || url_bar->hidden)
+ if (url_bar == NULL || url_bar->hidden) {
return false;
+ }
- if (extent == NULL)
+ if (extent == NULL) {
return true;
+ }
state.w = url_bar->window;
state.i = url_bar->container_icon;
error = xwimp_get_icon_state(&state);
if (error) {
- NSLOG(netsurf, INFO, "xwimp_get_icon_state: 0x%x: %s",
+ NSLOG(netsurf, INFO,
+ "xwimp_get_icon_state: 0x%x: %s",
error->errnum, error->errmess);
ro_warn_user("WimpError", error->errmess);
return false;
@@ -1154,36 +1340,45 @@ bool ro_gui_url_bar_get_url_extent(struct url_bar *url_bar, os_box *extent)
/* This is an exported interface documented in url_bar.h */
-
-bool ro_gui_url_bar_test_for_text_field_click(struct url_bar *url_bar,
- wimp_pointer *pointer)
+bool
+ro_gui_url_bar_test_for_text_field_click(struct url_bar *url_bar,
+ wimp_pointer *pointer)
{
- if (url_bar == NULL || url_bar->hidden || pointer == NULL)
+ if (url_bar == NULL ||
+ url_bar->hidden ||
+ pointer == NULL) {
return false;
+ }
return (pointer->w == url_bar->window &&
- pointer->i == url_bar->text_icon) ? true : false;
+ pointer->i == url_bar->text.icon) ? true : false;
}
/* This is an exported interface documented in url_bar.h */
-
-bool ro_gui_url_bar_test_for_text_field_keypress(struct url_bar *url_bar,
- wimp_key *key)
+bool
+ro_gui_url_bar_test_for_text_field_keypress(struct url_bar *url_bar,
+ wimp_key *key)
{
const char *url;
nsurl *n;
- if (url_bar == NULL || url_bar->hidden || key == NULL)
+ if (url_bar == NULL ||
+ url_bar->hidden ||
+ key == NULL) {
return false;
+ }
- if (key->w != url_bar->window || key->i != url_bar->text_icon)
+ if (key->w != url_bar->window ||
+ key->i != url_bar->text.icon) {
return false;
+ }
/* Update hotlist indicator */
- url = (const char *) url_bar->text_buffer;
- if (url != NULL && nsurl_create(url, &n) == NSERROR_OK) {
+ url = (const char *) url_bar->text.buffer;
+ if (url != NULL &&
+ nsurl_create(url, &n) == NSERROR_OK) {
ro_gui_url_bar_set_hotlist(url_bar, ro_gui_hotlist_has_page(n));
nsurl_unref(n);
} else if (url_bar->hotlist.set) {
@@ -1195,101 +1390,165 @@ bool ro_gui_url_bar_test_for_text_field_keypress(struct url_bar *url_bar,
/* This is an exported interface documented in url_bar.h */
-
-bool ro_gui_url_bar_set_site_favicon(struct url_bar *url_bar,
- struct hlcache_handle *h)
+bool
+ro_gui_url_bar_set_site_favicon(struct url_bar *url_bar,
+ struct hlcache_handle *h)
{
- content_type type = CONTENT_NONE;
+ content_type type = CONTENT_NONE;
- if (url_bar == NULL)
+ if (url_bar == NULL) {
return false;
+ }
- if (h != NULL)
+ if (h != NULL) {
type = content_get_type(h);
+ }
// \TODO -- Maybe test for CONTENT_ICO ???
if (type == CONTENT_IMAGE) {
- url_bar->favicon_content = h;
- url_bar->favicon_width = content_get_width(h);
- url_bar->favicon_height = content_get_height(h);
-
- if (url_bar->favicon_width > URLBAR_FAVICON_SIZE)
- url_bar->favicon_width = URLBAR_FAVICON_SIZE;
-
- if (url_bar->favicon_height > URLBAR_FAVICON_SIZE)
- url_bar->favicon_height = URLBAR_FAVICON_SIZE;
-
- url_bar->favicon_offset.x = ((url_bar->favicon_extent.x1 -
- url_bar->favicon_extent.x0) -
- (url_bar->favicon_width * 2)) / 2;
- url_bar->favicon_offset.y = ((url_bar->favicon_extent.y1 -
- url_bar->favicon_extent.y0) -
- (url_bar->favicon_height * 2)) / 2;
+ url_bar->favicon.content = h;
+ url_bar->favicon.width = content_get_width(h);
+ url_bar->favicon.height = content_get_height(h);
+
+ if (url_bar->favicon.width > URLBAR_FAVICON_SIZE) {
+ url_bar->favicon.width = URLBAR_FAVICON_SIZE;
+ }
+
+ if (url_bar->favicon.height > URLBAR_FAVICON_SIZE) {
+ url_bar->favicon.height = URLBAR_FAVICON_SIZE;
+ }
+
+ url_bar->favicon.offset.x = ((url_bar->favicon.extent.x1 -
+ url_bar->favicon.extent.x0) -
+ (url_bar->favicon.width * 2)) / 2;
+ url_bar->favicon.offset.y = ((url_bar->favicon.extent.y1 -
+ url_bar->favicon.extent.y0) -
+ (url_bar->favicon.height * 2)) / 2;
} else {
- url_bar->favicon_content = NULL;
+ url_bar->favicon.content = NULL;
- if (url_bar->favicon_type != 0)
- snprintf(url_bar->favicon_sprite,
- URLBAR_FAVICON_NAME_LENGTH,
- "Ssmall_%.3x", url_bar->favicon_type);
- else
- snprintf(url_bar->favicon_sprite,
- URLBAR_FAVICON_NAME_LENGTH,
- "Ssmall_xxx");
+ if (url_bar->favicon.type != 0) {
+ snprintf(url_bar->favicon.sprite,
+ URLBAR_FAVICON_NAME_LENGTH,
+ "Ssmall_%.3x", url_bar->favicon.type);
+ } else {
+ snprintf(url_bar->favicon.sprite,
+ URLBAR_FAVICON_NAME_LENGTH,
+ "Ssmall_xxx");
+ }
}
- if (!url_bar->hidden)
+ if (!url_bar->hidden) {
xwimp_force_redraw(url_bar->window,
- url_bar->favicon_extent.x0,
- url_bar->favicon_extent.y0,
- url_bar->favicon_extent.x1,
- url_bar->favicon_extent.y1);
+ url_bar->favicon.extent.x0,
+ url_bar->favicon.extent.y0,
+ url_bar->favicon.extent.x1,
+ url_bar->favicon.extent.y1);
+ }
return true;
}
/* This is an exported interface documented in url_bar.h */
+bool ro_gui_url_bar_page_info_change(struct url_bar *url_bar)
+{
+ browser_window_page_info_state pistate;
+ const char *icon_name;
+ struct gui_window *g;
+
+ g = ro_gui_toolbar_lookup(url_bar->window);
+
+ pistate = browser_window_get_page_info_state(g->bw);
+
+ switch (pistate) {
+ case PAGE_STATE_LOCAL:
+ icon_name = "pgilocal";
+ break;
+
+ case PAGE_STATE_INSECURE:
+ icon_name = "pgiinsecure";
+ break;
+
+ case PAGE_STATE_SECURE_OVERRIDE:
+ icon_name = "pgiwarning";
+ break;
+
+ case PAGE_STATE_SECURE_ISSUES:
+ icon_name = "pgiwarning";
+ break;
+
+ case PAGE_STATE_SECURE:
+ icon_name = "pgisecure";
+ break;
-bool ro_gui_url_bar_set_content_favicon(struct url_bar *url_bar,
- struct gui_window *g)
+ case PAGE_STATE_INTERNAL:
+ default:
+ icon_name = "pgiinternal";
+ break;
+ }
+
+ strncpy(url_bar->pginfo.sprite, icon_name, URLBAR_PGINFO_NAME_LENGTH);
+
+ if (!url_bar->hidden) {
+ xwimp_force_redraw(url_bar->window,
+ url_bar->pginfo.extent.x0,
+ url_bar->pginfo.extent.y0,
+ url_bar->pginfo.extent.x1,
+ url_bar->pginfo.extent.y1);
+ }
+
+ return true;
+}
+
+
+/* This is an exported interface documented in url_bar.h */
+bool
+ro_gui_url_bar_set_content_favicon(struct url_bar *url_bar,
+ struct gui_window *g)
{
int type = 0;
- char sprite[URLBAR_FAVICON_NAME_LENGTH];
+ char sprite[URLBAR_FAVICON_NAME_LENGTH-1];
struct hlcache_handle *h;
- if (url_bar == NULL || g == NULL)
+ if (url_bar == NULL ||
+ g == NULL) {
return false;
+ }
h = browser_window_get_content(g->bw);
- if (h != NULL)
+ if (h != NULL) {
type = ro_content_filetype(h);
+ }
if (type != 0) {
snprintf(sprite, URLBAR_FAVICON_NAME_LENGTH,
- "small_%.3x", type);
+ "small_%.3x", type);
- if (!ro_gui_wimp_sprite_exists(sprite))
+ if (!ro_gui_wimp_sprite_exists(sprite)) {
type = 0;
+ }
}
- url_bar->favicon_type = type;
+ url_bar->favicon.type = type;
- if (url_bar->favicon_content == NULL) {
- if (type == 0)
- snprintf(url_bar->favicon_sprite,
- URLBAR_FAVICON_NAME_LENGTH, "Ssmall_xxx");
- else
- snprintf(url_bar->favicon_sprite,
- URLBAR_FAVICON_NAME_LENGTH, "S%s", sprite);
+ if (url_bar->favicon.content == NULL) {
+ if (type == 0) {
+ snprintf(url_bar->favicon.sprite,
+ URLBAR_FAVICON_NAME_LENGTH, "Ssmall_xxx");
+ } else {
+ snprintf(url_bar->favicon.sprite,
+ URLBAR_FAVICON_NAME_LENGTH, "S%s", sprite);
+ }
- if (!url_bar->hidden)
+ if (!url_bar->hidden) {
xwimp_force_redraw(url_bar->window,
- url_bar->favicon_extent.x0,
- url_bar->favicon_extent.y0,
- url_bar->favicon_extent.x1,
- url_bar->favicon_extent.y1);
+ url_bar->favicon.extent.x0,
+ url_bar->favicon.extent.y0,
+ url_bar->favicon.extent.x1,
+ url_bar->favicon.extent.y1);
+ }
}
return true;
@@ -1297,41 +1556,21 @@ bool ro_gui_url_bar_set_content_favicon(struct url_bar *url_bar,
/* This is an exported interface documented in url_bar.h */
-
bool ro_gui_url_bar_update_urlsuggest(struct url_bar *url_bar)
{
- if (url_bar == NULL || url_bar->hidden)
+ if (url_bar == NULL ||
+ url_bar->hidden) {
return (url_bar == NULL) ? false : true;
+ }
- if (url_bar->window != NULL && url_bar->suggest_icon != -1)
+ if (url_bar->window != NULL &&
+ url_bar->suggest.icon != -1) {
ro_gui_set_icon_shaded_state(url_bar->window,
- url_bar->suggest_icon,
- !ro_gui_url_suggest_get_menu_available());
-
- return true;
-}
-
-
-/**
- * Callback for hlcache.
- */
-static nserror ro_gui_url_bar_res_cb(hlcache_handle *handle,
- const hlcache_event *event, void *pw)
-{
- struct url_bar_resource *r = pw;
-
- switch (event->type) {
- case CONTENT_MSG_READY:
- case CONTENT_MSG_DONE:
- r->ready = true;
- r->height = content_get_height(handle);
- break;
-
- default:
- break;
+ url_bar->suggest.icon,
+ !ro_gui_url_suggest_get_menu_available());
}
- return NSERROR_OK;
+ return true;
}
@@ -1343,10 +1582,15 @@ bool ro_gui_url_bar_init(void)
for (i = 0; i < URLBAR_RES_LAST; i++) {
nsurl *url;
if (nsurl_create(url_bar_res[i].url, &url) == NSERROR_OK) {
- hlcache_handle_retrieve(url, 0, NULL, NULL,
- ro_gui_url_bar_res_cb,
- &(url_bar_res[i]), NULL,
- CONTENT_IMAGE, &(url_bar_res[i].c));
+ hlcache_handle_retrieve(url,
+ 0,
+ NULL,
+ NULL,
+ ro_gui_url_bar_res_cb,
+ &(url_bar_res[i]),
+ NULL,
+ CONTENT_IMAGE,
+ &(url_bar_res[i].c));
nsurl_unref(url);
}
}
diff --git a/frontends/riscos/gui/url_bar.h b/frontends/riscos/gui/url_bar.h
index 9486e214d..fc210f503 100644
--- a/frontends/riscos/gui/url_bar.h
+++ b/frontends/riscos/gui/url_bar.h
@@ -35,7 +35,9 @@ typedef enum {
TOOLBAR_URL_DRAG_URL,
TOOLBAR_URL_DRAG_FAVICON,
TOOLBAR_URL_SELECT_HOTLIST,
- TOOLBAR_URL_ADJUST_HOTLIST
+ TOOLBAR_URL_ADJUST_HOTLIST,
+ TOOLBAR_URL_SELECT_PGINFO,
+ TOOLBAR_URL_ADJUST_PGINFO
} url_bar_action;
struct url_bar;
@@ -323,8 +325,17 @@ bool ro_gui_url_bar_set_content_favicon(struct url_bar *url_bar,
* \param *url_bar The URL bar to update.
* \return true if successful; else false.
*/
-
bool ro_gui_url_bar_update_urlsuggest(struct url_bar *url_bar);
+
+/**
+ * Update the page info icon
+ *
+ * \param url_bar The URL bar to update.
+ * \return true if successful; else false.
+ */
+bool ro_gui_url_bar_page_info_change(struct url_bar *url_bar);
+
+
#endif
diff --git a/frontends/riscos/hotlist.c b/frontends/riscos/hotlist.c
index b0ed1e2f4..7e18ce88e 100644
--- a/frontends/riscos/hotlist.c
+++ b/frontends/riscos/hotlist.c
@@ -423,6 +423,7 @@ hotlist_menu_select(wimp_w w,
*/
static nserror ro_hotlist_init(void)
{
+ os_error *error;
struct ro_hotlist_window *ncwin;
nserror res;
static const struct ns_menu hotlist_menu_def = {
@@ -472,7 +473,14 @@ static nserror ro_hotlist_init(void)
}
/* create window from template */
- ncwin->core.wh = wimp_create_window(dialog_hotlist_template);
+ error = xwimp_create_window(dialog_hotlist_template, &ncwin->core.wh);
+ if (error) {
+ NSLOG(netsurf, INFO, "xwimp_create_window: 0x%x: %s",
+ error->errnum, error->errmess);
+ ro_warn_user("WimpError", error->errmess);
+ free(ncwin);
+ return NSERROR_NOMEM;
+ }
ro_gui_set_window_title(ncwin->core.wh, messages_get("Hotlist"));
diff --git a/frontends/riscos/iconbar.c b/frontends/riscos/iconbar.c
index 23f97258b..c85827030 100644
--- a/frontends/riscos/iconbar.c
+++ b/frontends/riscos/iconbar.c
@@ -207,7 +207,7 @@ bool ro_gui_iconbar_menu_select(wimp_w w, wimp_i i, wimp_menu *menu,
switch (action) {
case HELP_OPEN_CONTENTS:
- error = nsurl_create("http://www.netsurf-browser.org/documentation/", &url);
+ error = nsurl_create("https://www.netsurf-browser.org/documentation/", &url);
if (error == NSERROR_OK) {
error = browser_window_create(BW_CREATE_HISTORY,
url,
@@ -232,7 +232,7 @@ bool ro_gui_iconbar_menu_select(wimp_w w, wimp_i i, wimp_menu *menu,
ro_gui_global_history_present();
return true;
case COOKIES_SHOW:
- ro_gui_cookies_present();
+ ro_gui_cookies_present(NULL);
return true;
case CHOICES_SHOW:
ro_gui_configure_show();
diff --git a/frontends/riscos/image.c b/frontends/riscos/image.c
index 30cb30096..5c90b05ba 100644
--- a/frontends/riscos/image.c
+++ b/frontends/riscos/image.c
@@ -27,76 +27,9 @@
#include "riscos/image.h"
#include "riscos/gui.h"
+#include "riscos/wimp.h"
#include "riscos/tinct.h"
-static bool image_redraw_tinct(osspriteop_id header, int x, int y,
- int req_width, int req_height, int width, int height,
- colour background_colour, bool repeatx, bool repeaty,
- bool alpha, unsigned int tinct_options);
-static bool image_redraw_os(osspriteop_id header, int x, int y,
- int req_width, int req_height, int width, int height);
-
-/**
- * Plot an image at the given coordinates using the method specified
- *
- * \param area The sprite area containing the sprite
- * \param x Left edge of sprite
- * \param y Top edge of sprite
- * \param req_width The requested width of the sprite
- * \param req_height The requested height of the sprite
- * \param width The actual width of the sprite
- * \param height The actual height of the sprite
- * \param background_colour The background colour to blend to
- * \param repeatx Repeat the image in the x direction
- * \param repeaty Repeat the image in the y direction
- * \param background Use background image settings (otherwise foreground)
- * \param type The plot method to use
- * \return true on success, false otherwise
- */
-bool image_redraw(osspriteop_area *area, int x, int y, int req_width,
- int req_height, int width, int height,
- colour background_colour,
- bool repeatx, bool repeaty, bool background, image_type type)
-{
- unsigned int tinct_options;
-
- /* failed decompression/loading can result in no image being present */
- if (!area)
- return false;
-
- osspriteop_id header = (osspriteop_id)
- ((char*) area + area->first);
- req_width *= 2;
- req_height *= 2;
- width *= 2;
- height *= 2;
- tinct_options = background ? nsoption_int(plot_bg_quality) :
- nsoption_int(plot_fg_quality);
- switch (type) {
- case IMAGE_PLOT_TINCT_ALPHA:
- return image_redraw_tinct(header, x, y,
- req_width, req_height,
- width, height,
- background_colour,
- repeatx, repeaty, true,
- tinct_options);
- case IMAGE_PLOT_TINCT_OPAQUE:
- return image_redraw_tinct(header, x, y,
- req_width, req_height,
- width, height,
- background_colour,
- repeatx, repeaty, false,
- tinct_options);
- case IMAGE_PLOT_OS:
- return image_redraw_os(header, x, y, req_width,
- req_height, width, height);
- default:
- break;
- }
-
- return false;
-}
-
/**
* Plot an image at the given coordinates using tinct
*
@@ -114,7 +47,7 @@ bool image_redraw(osspriteop_area *area, int x, int y, int req_width,
* \param tinct_options The base option set to use
* \return true on success, false otherwise
*/
-bool image_redraw_tinct(osspriteop_id header, int x, int y,
+static bool image_redraw_tinct(osspriteop_id header, int x, int y,
int req_width, int req_height, int width, int height,
colour background_colour, bool repeatx, bool repeaty,
bool alpha, unsigned int tinct_options)
@@ -133,11 +66,11 @@ bool image_redraw_tinct(osspriteop_id header, int x, int y,
if (alpha) {
error = _swix(Tinct_PlotScaledAlpha, _INR(2,7),
- header, x, y - req_height,
+ header, x, y,
req_width, req_height, tinct_options);
} else {
error = _swix(Tinct_PlotScaled, _INR(2,7),
- header, x, y - req_height,
+ header, x, y,
req_width, req_height, tinct_options);
}
@@ -150,7 +83,6 @@ bool image_redraw_tinct(osspriteop_id header, int x, int y,
return true;
}
-
/**
* Plot an image at the given coordinates using os_spriteop
*
@@ -161,10 +93,11 @@ bool image_redraw_tinct(osspriteop_id header, int x, int y,
* \param req_height The requested height of the sprite
* \param width The actual width of the sprite
* \param height The actual height of the sprite
+ * \param tile Whether to tile the sprite
* \return true on success, false otherwise
*/
-bool image_redraw_os(osspriteop_id header, int x, int y, int req_width,
- int req_height, int width, int height)
+static bool image_redraw_os(osspriteop_id header, int x, int y, int req_width,
+ int req_height, int width, int height, bool tile)
{
int size;
os_factors f;
@@ -172,7 +105,7 @@ bool image_redraw_os(osspriteop_id header, int x, int y, int req_width,
os_error *error;
error = xcolourtrans_generate_table_for_sprite(
- (osspriteop_area *)0x100, header,
+ osspriteop_UNSPECIFIED, header,
os_CURRENT_MODE,
colourtrans_CURRENT_PALETTE,
0, colourtrans_GIVEN_SPRITE, 0, 0, &size);
@@ -192,7 +125,7 @@ bool image_redraw_os(osspriteop_id header, int x, int y, int req_width,
}
error = xcolourtrans_generate_table_for_sprite(
- (osspriteop_area *)0x100, header,
+ osspriteop_UNSPECIFIED, header,
os_CURRENT_MODE,
colourtrans_CURRENT_PALETTE,
table, colourtrans_GIVEN_SPRITE, 0, 0, 0);
@@ -210,10 +143,15 @@ bool image_redraw_os(osspriteop_id header, int x, int y, int req_width,
f.xdiv = width;
f.ydiv = height;
- error = xosspriteop_put_sprite_scaled(osspriteop_PTR,
- (osspriteop_area *)0x100, header,
- x, (int)(y - req_height),
- 8, &f, table);
+ if (tile) {
+ error = xosspriteop_plot_tiled_sprite(osspriteop_PTR,
+ osspriteop_UNSPECIFIED, header, x, y,
+ osspriteop_USE_MASK, &f, table);
+ } else {
+ error = xosspriteop_put_sprite_scaled(osspriteop_PTR,
+ osspriteop_UNSPECIFIED, header, x, y,
+ osspriteop_USE_MASK, &f, table);
+ }
if (error) {
NSLOG(netsurf, INFO,
"xosspriteop_put_sprite_scaled: 0x%x: %s",
@@ -227,3 +165,135 @@ bool image_redraw_os(osspriteop_id header, int x, int y, int req_width,
return true;
}
+
+/**
+ * Override a sprite's mode.
+ *
+ * Only replaces mode if existing mode matches \ref old.
+ *
+ * \param[in] area The sprite area containing the sprite.
+ * \param[in] type Requested plot mode.
+ * \param[in] old Existing sprite mode to check for.
+ * \param[in] new Sprite mode to set if existing mode is expected.
+ */
+static inline void image__override_sprite_mode(
+ osspriteop_area *area,
+ image_type type,
+ os_mode old,
+ os_mode new)
+{
+ osspriteop_header *sprite = (osspriteop_header *)(area + 1);
+
+ if (sprite->mode == old && type == IMAGE_PLOT_TINCT_ALPHA) {
+ sprite->mode = new;
+ }
+}
+
+/**
+ * Plot an image at the given coordinates using the method specified
+ *
+ * \param area The sprite area containing the sprite
+ * \param x Left edge of sprite
+ * \param y Top edge of sprite
+ * \param req_width The requested width of the sprite
+ * \param req_height The requested height of the sprite
+ * \param width The actual width of the sprite
+ * \param height The actual height of the sprite
+ * \param background_colour The background colour to blend to
+ * \param repeatx Repeat the image in the x direction
+ * \param repeaty Repeat the image in the y direction
+ * \param background Use background image settings (otherwise foreground)
+ * \param type The plot method to use
+ * \return true on success, false otherwise
+ */
+bool image_redraw(osspriteop_area *area, int x, int y, int req_width,
+ int req_height, int width, int height,
+ colour background_colour,
+ bool repeatx, bool repeaty, bool background, image_type type)
+{
+ image_type used_type = type;
+ unsigned int tinct_options;
+ bool tinct_avoid = false;
+ bool res = false;
+
+ /* failed decompression/loading can result in no image being present */
+ if (!area)
+ return false;
+
+ osspriteop_id header = (osspriteop_id)
+ ((char*) area + area->first);
+
+ req_width *= 2;
+ req_height *= 2;
+ width *= 2;
+ height *= 2;
+ y -= req_height;
+
+ tinct_options = background ? nsoption_int(plot_bg_quality) :
+ nsoption_int(plot_fg_quality);
+
+ if (os_alpha_sprite_supported) {
+ /* Ideally Tinct would be updated to understand that modern OS
+ * versions can cope with alpha channels, and we could continue
+ * to pass to Tinct. The main drawback of fully avoiding Tinct
+ * is that we lose the optimisation for tiling tiny bitmaps.
+ */
+ if (tinct_options & tinct_USE_OS_SPRITE_OP) {
+ used_type = IMAGE_PLOT_OS;
+ tinct_avoid = true;
+ }
+ }
+
+ if (tinct_avoid) {
+ int xeig;
+ int yeig;
+
+ if (ro_gui_wimp_read_eig_factors(os_CURRENT_MODE,
+ &xeig, &yeig)) {
+
+ req_width = (req_width / 2) * (4 >> xeig);
+ req_height = (req_height / 2) * (4 >> yeig);
+ }
+ }
+
+ switch (used_type) {
+ case IMAGE_PLOT_TINCT_ALPHA:
+ res = image_redraw_tinct(header, x, y,
+ req_width, req_height,
+ width, height,
+ background_colour,
+ repeatx, repeaty, true,
+ tinct_options);
+ break;
+
+ case IMAGE_PLOT_TINCT_OPAQUE:
+ res = image_redraw_tinct(header, x, y,
+ req_width, req_height,
+ width, height,
+ background_colour,
+ repeatx, repeaty, false,
+ tinct_options);
+ break;
+
+ case IMAGE_PLOT_OS:
+ if (tinct_avoid) {
+ image__override_sprite_mode(area, type,
+ tinct_SPRITE_MODE,
+ alpha_SPRITE_MODE);
+ }
+ res = image_redraw_os(header, x, y, req_width,
+ req_height, width, height,
+ repeatx | repeaty);
+ if (tinct_avoid) {
+ image__override_sprite_mode(area, type,
+ alpha_SPRITE_MODE,
+ tinct_SPRITE_MODE);
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ return res;
+}
diff --git a/frontends/riscos/local_history.c b/frontends/riscos/local_history.c
index bbe6a1d12..03f1d8657 100644
--- a/frontends/riscos/local_history.c
+++ b/frontends/riscos/local_history.c
@@ -289,6 +289,7 @@ static nserror
ro_local_history_init(struct browser_window *bw,
struct ro_local_history_window **win_out)
{
+ os_error *error;
struct ro_local_history_window *ncwin;
nserror res;
@@ -306,7 +307,15 @@ ro_local_history_init(struct browser_window *bw,
}
/* create window from template */
- ncwin->core.wh = wimp_create_window(dialog_local_history_template);
+ error = xwimp_create_window(dialog_local_history_template,
+ &ncwin->core.wh);
+ if (error) {
+ NSLOG(netsurf, INFO, "xwimp_create_window: 0x%x: %s",
+ error->errnum, error->errmess);
+ ro_warn_user("WimpError", error->errmess);
+ free(ncwin);
+ return NSERROR_NOMEM;
+ }
/* initialise callbacks */
ncwin->core.draw = ro_local_history_draw;
@@ -394,6 +403,17 @@ ro_local_history_open(struct ro_local_history_window *lhw, wimp_w parent)
ro_gui_dialog_open_persistent(parent, lhw->core.wh, true);
+ /* Give the window focus. */
+ error = xwimp_set_caret_position(lhw->core.wh, -1, 0, 0, -1, 0);
+ if (error) {
+ NSLOG(netsurf, INFO,
+ "xwimp_set_caret_position: 0x%x : %s",
+ error->errnum,
+ error->errmess);
+ }
+
+ local_history_scroll_to_cursor(lhw->session);
+
return NSERROR_OK;
}
diff --git a/frontends/riscos/options.h b/frontends/riscos/options.h
index cb2b78bd8..bf85f07c2 100644
--- a/frontends/riscos/options.h
+++ b/frontends/riscos/options.h
@@ -16,12 +16,20 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/** \file
- * RISC OS specific options.
+/**
+ * \file
+ * Option specific to RISC OS
+ *
+ * Platform specific options for RISC OS can be added by editing this file
+ *
+ * Global optionsshould be added in the desktop options.h.
+ *
+ * This header is specificaly intented to be included multiple times
+ * with different macro definitions so there is no guard
*/
-#ifndef _NETSURF_RISCOS_OPTIONS_H_
-#define _NETSURF_RISCOS_OPTIONS_H_
+#ifndef NETSURF_RISCOS_OPTIONS_H_
+#define NETSURF_RISCOS_OPTIONS_H_
#include "riscos/tinct.h"
@@ -66,3 +74,13 @@ NSOPTION_BOOL(thumbnail_iconise, true)
NSOPTION_BOOL(interactive_help, true)
NSOPTION_BOOL(external_hotlists, false)
NSOPTION_STRING(external_hotlist_app, NULL)
+
+/**
+ * width of screen when window_width option was saved
+ */
+NSOPTION_INTEGER(window_screen_width, 0)
+
+/**
+ * height of screen when window_heigh option was saved
+ */
+NSOPTION_INTEGER(window_screen_height, 0)
diff --git a/frontends/riscos/pageinfo.c b/frontends/riscos/pageinfo.c
new file mode 100644
index 000000000..7ce09591b
--- /dev/null
+++ b/frontends/riscos/pageinfo.c
@@ -0,0 +1,325 @@
+/*
+ * Copyright 2020 Vincent Sanders <vince@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 RISC OS page info core window.
+ */
+
+#include <stdint.h>
+#include <stdlib.h>
+#include <oslib/wimp.h>
+
+#include "utils/log.h"
+#include "netsurf/mouse.h"
+#include "netsurf/plotters.h"
+#include "desktop/page-info.h"
+
+#include "riscos/gui.h"
+#include "riscos/dialog.h"
+#include "riscos/toolbar.h"
+#include "riscos/wimputils.h"
+#include "riscos/corewindow.h"
+#include "riscos/pageinfo.h"
+
+
+/**
+ * Page info window container for RISC OS.
+ */
+struct ro_pageinfo_window {
+ struct ro_corewindow core;
+ /** Core page-info window */
+ struct page_info *pgi;
+};
+
+/** page info window is a singleton */
+static struct ro_pageinfo_window *pageinfo_window = NULL;
+
+/** riscos template for pageinfo window */
+static wimp_window *dialog_pageinfo_template;
+
+/**
+ * callback to draw on drawable area of ro page info window
+ *
+ * \param ro_cw The riscos core window structure.
+ * \param r The rectangle of the window that needs updating.
+ * \param originx The risc os plotter x origin.
+ * \param originy The risc os plotter y origin.
+ * \return NSERROR_OK on success otherwise apropriate error code
+ */
+static nserror
+ro_pageinfo_draw(struct ro_corewindow *ro_cw,
+ int originx,
+ int originy,
+ struct rect *r)
+{
+ struct redraw_context ctx = {
+ .interactive = true,
+ .background_images = true,
+ .plot = &ro_plotters
+ };
+ struct ro_pageinfo_window *lhw;
+
+ lhw = (struct ro_pageinfo_window *)ro_cw;
+
+ ro_plot_origin_x = originx;
+ ro_plot_origin_y = originy;
+ no_font_blending = true;
+ page_info_redraw(lhw->pgi, 0, 0, r, &ctx);
+ no_font_blending = false;
+
+ return NSERROR_OK;
+}
+
+
+/**
+ * callback for keypress on ro coookie window
+ *
+ * \param ro_cw The ro 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
+ */
+static nserror
+ro_pageinfo_key(struct ro_corewindow *ro_cw, uint32_t nskey)
+{
+ struct ro_pageinfo_window *lhw;
+
+ lhw = (struct ro_pageinfo_window *)ro_cw;
+
+ if (page_info_keypress(lhw->pgi, nskey)) {
+ return NSERROR_OK;
+ }
+ return NSERROR_NOT_IMPLEMENTED;
+}
+
+
+/**
+ * callback for mouse event on ro page info window
+ *
+ * \param ro_cw The ro 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.
+ */
+static nserror
+ro_pageinfo_mouse(struct ro_corewindow *ro_cw,
+ browser_mouse_state mouse_state,
+ int x, int y)
+{
+ struct ro_pageinfo_window *pgiw;
+
+ pgiw = (struct ro_pageinfo_window *)ro_cw;
+ bool did_something = false;
+
+ if (page_info_mouse_action(pgiw->pgi, mouse_state, x, y, &did_something) == NSERROR_OK) {
+ if (did_something == true) {
+ /* Something happened so we need to close ourselves */
+ ro_gui_dialog_close(ro_cw->wh);
+ }
+ }
+
+ if ((mouse_state & BROWSER_MOUSE_LEAVE) != 0) {
+ ro_gui_dialog_close(ro_cw->wh);
+ }
+
+ return NSERROR_OK;
+}
+
+
+/**
+ * Creates the window for the page info tree.
+ *
+ * \return NSERROR_OK on success else appropriate error code on faliure.
+ */
+static nserror
+ro_pageinfo_init(struct browser_window *bw,
+ struct ro_pageinfo_window **win_out)
+{
+ os_error *error;
+ struct ro_pageinfo_window *ncwin;
+ nserror res;
+
+ /* memoise window so it can be represented when necessary
+ * instead of recreating every time.
+ */
+ if ((*win_out) != NULL) {
+ res = page_info_set((*win_out)->pgi, bw);
+ return res;
+ }
+
+ ncwin = calloc(1, sizeof(*ncwin));
+ if (ncwin == NULL) {
+ return NSERROR_NOMEM;
+ }
+
+ /* create window from template */
+ error = xwimp_create_window(dialog_pageinfo_template,
+ &ncwin->core.wh);
+ if (error) {
+ NSLOG(netsurf, INFO, "xwimp_create_window: 0x%x: %s",
+ error->errnum, error->errmess);
+ ro_warn_user("WimpError", error->errmess);
+ free(ncwin);
+ return NSERROR_NOMEM;
+ }
+
+ /* initialise callbacks */
+ ncwin->core.draw = ro_pageinfo_draw;
+ ncwin->core.key = ro_pageinfo_key;
+ ncwin->core.mouse = ro_pageinfo_mouse;
+
+ /* initialise core window */
+ res = ro_corewindow_init(&ncwin->core,
+ NULL,
+ NULL,
+ 0,
+ NULL);
+ if (res != NSERROR_OK) {
+ free(ncwin);
+ return res;
+ }
+
+ res = page_info_create(ncwin->core.cb_table,
+ (struct core_window *)ncwin,
+ bw,
+ &ncwin->pgi);
+ if (res != NSERROR_OK) {
+ free(ncwin);
+ return res;
+ }
+
+ *win_out = ncwin;
+
+ return NSERROR_OK;
+}
+
+
+/**
+ * open RISC OS page info window at the correct size
+ */
+static nserror
+ro_pageinfo_open(struct ro_pageinfo_window *lhw, wimp_w parent)
+{
+ nserror res;
+ int width, height;
+ os_box box = {0, 0, 0, 0};
+ wimp_window_state state;
+ os_error *error;
+
+ res = page_info_get_size(lhw->pgi, &width, &height);
+ if (res != NSERROR_OK) {
+ return res;
+ }
+
+ width *= 2;
+ height *= 2;
+
+ /* set extent */
+ box.x1 = width;
+ box.y0 = -height;
+ error = xwimp_set_extent(lhw->core.wh, &box);
+ if (error) {
+ NSLOG(netsurf, INFO, "xwimp_set_extent: 0x%x: %s",
+ error->errnum, error->errmess);
+ ro_warn_user("WimpError", error->errmess);
+ return NSERROR_NOMEM;
+ }
+
+ /* open full size */
+ state.w = lhw->core.wh;
+ error = xwimp_get_window_state(&state);
+ if (error) {
+ NSLOG(netsurf, INFO, "xwimp_get_window_state: 0x%x: %s",
+ error->errnum, error->errmess);
+ ro_warn_user("WimpError", error->errmess);
+ return NSERROR_NOMEM;
+ }
+ state.visible.x0 = 0;
+ state.visible.y0 = 0;
+ state.visible.x1 = width;
+ state.visible.y1 = height;
+ state.next = wimp_HIDDEN;
+ error = xwimp_open_window(PTR_WIMP_OPEN(&state));
+ if (error) {
+ NSLOG(netsurf, INFO, "xwimp_open_window: 0x%x: %s",
+ error->errnum, error->errmess);
+ ro_warn_user("WimpError", error->errmess);
+ return NSERROR_NOMEM;
+ }
+
+ ro_gui_dialog_open_persistent(parent, lhw->core.wh, true);
+
+ /* Give the window focus. */
+ error = xwimp_set_caret_position(lhw->core.wh, -1, 0, 0, -1, 0);
+ if (error) {
+ NSLOG(netsurf, INFO,
+ "xwimp_set_caret_position: 0x%x : %s",
+ error->errnum,
+ error->errmess);
+ }
+
+ return NSERROR_OK;
+}
+
+
+/* exported interface documented in riscos/pageinfo.h */
+nserror ro_gui_pageinfo_initialise(void)
+{
+ dialog_pageinfo_template = ro_gui_dialog_load_template("corepginfo");
+
+ return NSERROR_OK;
+}
+
+/* exported interface documented in riscos/pageinfo.h */
+nserror ro_gui_pageinfo_present(struct gui_window *gw)
+{
+ nserror res;
+
+ res = ro_pageinfo_init(gw->bw, &pageinfo_window);
+ if (res == NSERROR_OK) {
+ NSLOG(netsurf, INFO, "Presenting");
+ res = ro_pageinfo_open(pageinfo_window, gw->window);
+ } else {
+ NSLOG(netsurf, INFO, "Failed presenting error code %d", res);
+ }
+
+ return res;
+}
+
+/* exported interface documented in riscos/pageinfo.h */
+nserror ro_gui_pageinfo_finalise(void)
+{
+ nserror res;
+
+ if (pageinfo_window == NULL) {
+ return NSERROR_OK;
+ }
+
+ res = page_info_destroy(pageinfo_window->pgi);
+ if (res == NSERROR_OK) {
+ res = ro_corewindow_fini(&pageinfo_window->core);
+
+ free(pageinfo_window);
+ pageinfo_window = NULL;
+ }
+
+ return res;
+}
diff --git a/frontends/riscos/pageinfo.h b/frontends/riscos/pageinfo.h
new file mode 100644
index 000000000..e5581c27e
--- /dev/null
+++ b/frontends/riscos/pageinfo.h
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2020 Vincent Sanders <vince@nesurf-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
+ * Interface to page info core window for RISC OS
+ */
+
+#ifndef NETSURF_RISCOS_PAGEINFO_H_
+#define NETSURF_RISCOS_PAGEINFO_H_
+
+struct gui_window;
+
+/**
+ * initialise the pageinfo window template ready for subsequent use.
+ */
+nserror ro_gui_pageinfo_initialise(void);
+
+/**
+ * make the pageinfo window visible.
+ *
+ * \return NSERROR_OK on success else appropriate error code on faliure.
+ */
+nserror ro_gui_pageinfo_present(struct gui_window *gw);
+
+/**
+ * Free any resources allocated for the page info window.
+ *
+ * \return NSERROR_OK on success else appropriate error code on faliure.
+ */
+nserror ro_gui_pageinfo_finalise(void);
+
+#endif
diff --git a/frontends/riscos/plotters.c b/frontends/riscos/plotters.c
index 2fbd12aeb..e38e746cd 100644
--- a/frontends/riscos/plotters.c
+++ b/frontends/riscos/plotters.c
@@ -39,6 +39,7 @@
int ro_plot_origin_x = 0;
int ro_plot_origin_y = 0;
+struct rect ro_plot_clip_rect;
/** One version of the A9home OS is incapable of drawing patterned lines */
bool ro_plot_patterned_lines = true;
@@ -110,12 +111,25 @@ ro_plot_clip(const struct redraw_context *ctx, const struct rect *clip)
os_error *error;
char buf[12];
- int clip_x0 = ro_plot_origin_x + clip->x0 * 2;
- int clip_y0 = ro_plot_origin_y - clip->y0 * 2 - 1;
- int clip_x1 = ro_plot_origin_x + clip->x1 * 2 - 1;
- int clip_y1 = ro_plot_origin_y - clip->y1 * 2;
-
- if (clip_x1 < clip_x0 || clip_y0 < clip_y1) {
+ int clip_x0 = clip->x0 * 2;
+ int clip_y0 = clip->y1 * 2;
+ int clip_x1 = clip->x1 * 2;
+ int clip_y1 = clip->y0 * 2;
+
+ /* Avoid artefacts due to clip rectangle offsetting in EX0 EY0 modes.
+ * The area the WIMP asked us to draw might have dimensions that are
+ * not a multiple of 2. */
+ if (clip_x0 < ro_plot_clip_rect.x0) clip_x0 = ro_plot_clip_rect.x0;
+ if (clip_x1 > ro_plot_clip_rect.x1) clip_x1 = ro_plot_clip_rect.x1;
+ if (clip_y0 > ro_plot_clip_rect.y0) clip_y0 = ro_plot_clip_rect.y0;
+ if (clip_y1 < ro_plot_clip_rect.y1) clip_y1 = ro_plot_clip_rect.y1;
+
+ clip_x0 = ro_plot_origin_x + clip_x0;
+ clip_y0 = ro_plot_origin_y - clip_y0;
+ clip_x1 = ro_plot_origin_x + clip_x1 - 1;
+ clip_y1 = ro_plot_origin_y - clip_y1 - 1;
+
+ if (clip_x1 < clip_x0 || clip_y1 < clip_y0) {
NSLOG(netsurf, INFO, "bad clip rectangle %i %i %i %i",
clip_x0, clip_y0, clip_x1, clip_y1);
return NSERROR_BAD_SIZE;
@@ -124,12 +138,12 @@ ro_plot_clip(const struct redraw_context *ctx, const struct rect *clip)
buf[0] = os_VDU_SET_GRAPHICS_WINDOW;
buf[1] = clip_x0;
buf[2] = clip_x0 >> 8;
- buf[3] = clip_y1;
- buf[4] = clip_y1 >> 8;
+ buf[3] = clip_y0;
+ buf[4] = clip_y0 >> 8;
buf[5] = clip_x1;
buf[6] = clip_x1 >> 8;
- buf[7] = clip_y0;
- buf[8] = clip_y0 >> 8;
+ buf[7] = clip_y1;
+ buf[8] = clip_y1 >> 8;
error = xos_writen(buf, 9);
if (error) {
@@ -324,9 +338,9 @@ ro_plot_line(const struct redraw_context *ctx,
dashed = true;
return ro_plot_draw_path((const draw_path *)path,
- style->stroke_width,
- style->stroke_colour,
- dotted, dashed);
+ plot_style_fixed_to_int(style->stroke_width),
+ style->stroke_colour,
+ dotted, dashed);
}
return NSERROR_OK;
}
@@ -365,7 +379,7 @@ ro_plot_rectangle(const struct redraw_context *ctx,
error = xos_plot(os_MOVE_TO,
ro_plot_origin_x + rect->x0 * 2,
- ro_plot_origin_y - rect->y0 * 2 - 1);
+ ro_plot_origin_y - rect->y1 * 2);
if (error) {
NSLOG(netsurf, INFO, "xos_plot: 0x%x: %s",
error->errnum, error->errmess);
@@ -374,7 +388,7 @@ ro_plot_rectangle(const struct redraw_context *ctx,
error = xos_plot(os_PLOT_RECTANGLE | os_PLOT_TO,
ro_plot_origin_x + rect->x1 * 2 - 1,
- ro_plot_origin_y - rect->y1 * 2);
+ ro_plot_origin_y - rect->y0 * 2 - 1);
if (error) {
NSLOG(netsurf, INFO, "xos_plot: 0x%x: %s",
error->errnum, error->errmess);
@@ -412,10 +426,10 @@ ro_plot_rectangle(const struct redraw_context *ctx,
dashed = true;
ro_plot_draw_path((const draw_path *)path,
- style->stroke_width,
- style->stroke_colour,
- dotted,
- dashed);
+ plot_style_fixed_to_int(style->stroke_width),
+ style->stroke_colour,
+ dotted,
+ dashed);
}
return NSERROR_OK;
@@ -483,7 +497,6 @@ ro_plot_polygon(const struct redraw_context *ctx,
* \param pstyle Style controlling the path plot.
* \param p elements of path
* \param n nunber of elements on path
- * \param width The width of the path
* \param transform A transform to apply to the path.
* \return NSERROR_OK on success else error code.
*/
@@ -492,7 +505,6 @@ ro_plot_path(const struct redraw_context *ctx,
const plot_style_t *pstyle,
const float *p,
unsigned int n,
- float width,
const float transform[6])
{
static const draw_line_style line_style = {
@@ -591,7 +603,9 @@ ro_plot_path(const struct redraw_context *ctx,
}
error = xdraw_stroke((draw_path *) path, 0, &trfm, 0,
- width * 2 * 256, &line_style, 0);
+ plot_style_fixed_to_int(
+ pstyle->stroke_width) * 2 * 256,
+ &line_style, 0);
if (error) {
NSLOG(netsurf, INFO, "xdraw_stroke: 0x%x: %s",
error->errnum, error->errmess);
diff --git a/frontends/riscos/print.c b/frontends/riscos/print.c
index d965baff4..e87f47857 100644
--- a/frontends/riscos/print.c
+++ b/frontends/riscos/print.c
@@ -106,7 +106,7 @@ static bool print_document(struct gui_window *g, const char *filename);
static const char *print_declare_fonts(struct hlcache_handle *h);
static void print_fonts_callback(void *context,
const char *font_name, unsigned int font_size,
- const char *s8, unsigned short *s16, unsigned int n,
+ const uint8_t *s8, const uint32_t *s32, unsigned int n,
int x, int y);
@@ -831,7 +831,6 @@ print_fonts_plot_path(const struct redraw_context *ctx,
const plot_style_t *pstyle,
const float *p,
unsigned int n,
- float width,
const float transform[6])
{
return NSERROR_OK;
@@ -999,7 +998,7 @@ end:
void print_fonts_callback(void *context,
const char *font_name, unsigned int font_size,
- const char *s8, unsigned short *s16, unsigned int n,
+ const uint8_t *s8, const uint32_t *s32, unsigned int n,
int x, int y)
{
unsigned int i;
@@ -1010,7 +1009,7 @@ void print_fonts_callback(void *context,
(void) x; /* unused */
(void) y; /* unused */
- assert(s8 || s16);
+ assert(s8 || s32);
/* check if the font name is new */
for (i = 0; i != print_fonts_count &&
diff --git a/frontends/riscos/save.c b/frontends/riscos/save.c
index 76ce6d3e5..b435787b0 100644
--- a/frontends/riscos/save.c
+++ b/frontends/riscos/save.c
@@ -40,8 +40,10 @@
#include "utils/config.h"
#include "utils/log.h"
#include "utils/messages.h"
-#include "utils/utf8.h"
+#include "utils/nsoption.h"
#include "utils/nsurl.h"
+#include "utils/utf8.h"
+#include "utils/utils.h"
#include "netsurf/browser_window.h"
#include "netsurf/window.h"
#include "netsurf/bitmap.h"
@@ -60,7 +62,6 @@
#include "riscos/menus.h"
#include "riscos/message.h"
#include "riscos/mouse.h"
-#include "utils/nsoption.h"
#include "riscos/query.h"
#include "riscos/save.h"
#include "riscos/save_draw.h"
@@ -243,7 +244,7 @@ ro_gui_save_create_thumbnail(struct hlcache_handle *h, const char *name)
struct bitmap *bitmap;
osspriteop_area *area;
- bitmap = riscos_bitmap_create(34, 34, BITMAP_NEW | BITMAP_OPAQUE | BITMAP_CLEAR_MEMORY);
+ bitmap = riscos_bitmap_create(34, 34, BITMAP_OPAQUE | BITMAP_CLEAR);
if (!bitmap) {
NSLOG(netsurf, INFO, "Thumbnail initialisation failed.");
return false;
@@ -257,7 +258,8 @@ ro_gui_save_create_thumbnail(struct hlcache_handle *h, const char *name)
}
sprite_header = (osspriteop_header *)(area + 1);
- strncpy(sprite_header->name, name, 12);
+ memset(sprite_header->name, 0, 12);
+ memcpy(sprite_header->name, name, min(strlen(name), 12));
/* we can't resize the saveas sprite area because it may move
@@ -908,8 +910,8 @@ static bool ro_gui_save_object_native(struct hlcache_handle *h, char *path)
if (file_type == osfile_TYPE_SPRITE || file_type == osfile_TYPE_DRAW) {
/* Native sprite or drawfile */
- const char *source_data;
- unsigned long source_size;
+ const uint8_t *source_data;
+ size_t source_size;
os_error *error;
source_data = content_get_source_data(h, &source_size);
@@ -960,8 +962,8 @@ static bool
ro_gui_save_content(struct hlcache_handle *h, char *path, bool force_overwrite)
{
os_error *error;
- const char *source_data;
- unsigned long source_size;
+ const uint8_t *source_data;
+ size_t source_size;
/* does the user want to check for collisions when saving? */
if (!force_overwrite) {
@@ -1018,7 +1020,7 @@ ro_gui_save_content(struct hlcache_handle *h, char *path, bool force_overwrite)
}
else
gui_save_current_type = GUI_SAVE_OBJECT_ORIG; /** \todo do this earlier? */
- /* no break */
+ fallthrough;
case GUI_SAVE_SOURCE:
case GUI_SAVE_OBJECT_ORIG:
source_data = content_get_source_data(h, &source_size);
diff --git a/frontends/riscos/save_draw.c b/frontends/riscos/save_draw.c
index 9ee730434..1e67d2d8d 100644
--- a/frontends/riscos/save_draw.c
+++ b/frontends/riscos/save_draw.c
@@ -168,7 +168,7 @@ ro_save_draw_line(const struct redraw_context *ctx,
sizeof path / sizeof path[0],
pencil_TRANSPARENT,
style->stroke_colour << 8,
- style->stroke_width,
+ plot_style_fixed_to_int(style->stroke_width),
pencil_JOIN_MITRED,
pencil_CAP_BUTT,
pencil_CAP_BUTT,
@@ -235,7 +235,7 @@ ro_save_draw_rectangle(const struct redraw_context *ctx,
sizeof path / sizeof path[0],
pencil_TRANSPARENT,
style->stroke_colour << 8,
- style->stroke_width,
+ plot_style_fixed_to_int(style->stroke_width),
pencil_JOIN_MITRED,
pencil_CAP_BUTT,
pencil_CAP_BUTT,
@@ -312,7 +312,6 @@ ro_save_draw_polygon(const struct redraw_context *ctx,
* \param pstyle Style controlling the path plot.
* \param p elements of path
* \param n nunber of elements on path
- * \param width The width of the path
* \param transform A transform to apply to the path.
* \return NSERROR_OK on success else error code.
*/
@@ -321,7 +320,6 @@ ro_save_draw_path(const struct redraw_context *ctx,
const plot_style_t *pstyle,
const float *p,
unsigned int n,
- float width,
const float transform[6])
{
pencil_code code;
@@ -409,7 +407,8 @@ ro_save_draw_path(const struct redraw_context *ctx,
pstyle->stroke_colour == NS_TRANSPARENT ?
pencil_TRANSPARENT :
pstyle->stroke_colour << 8,
- width, pencil_JOIN_MITRED,
+ plot_style_fixed_to_int(pstyle->stroke_width),
+ pencil_JOIN_MITRED,
pencil_CAP_BUTT,
pencil_CAP_BUTT,
0,
diff --git a/frontends/riscos/scripts/Run b/frontends/riscos/scripts/Run
index 4a51d7838..3368140d2 100644
--- a/frontends/riscos/scripts/Run
+++ b/frontends/riscos/scripts/Run
@@ -33,16 +33,19 @@ SetMacro NetSurf$ChoicesSave <Choices$Write>.WWW.NetSurf.Choices
RMEnsure UtilityModule 3.00 Error NetSurf needs RISC OS 3 or later
| Ensure Nested WIMP is installed
-| http://acorn.riscos.com/ (in the universal boot archive)
-RMEnsure WindowManager 3.80 Error NetSurf requires the Nested Window Manager. This can be obtained by downloading the Universal Boot sequence from http://acorn.riscos.com/
+| http://www.riscos.com/ftp_space/generic/uniboot/ (i.e. install universal boot)
+RMEnsure WindowManager 3.80 Error NetSurf requires the Nested Window Manager. This can be obtained by downloading the Universal Boot sequence from http://www.riscos.com/ftp_space/generic/uniboot/
| Check for various key resources - can't do much if they don't exist
If "<System$Path>" = "" Then Set System$Path_Message System resources not found.
If "<Wimp$ScrapDir>" = "" Then Error Scrap resource not found.
If "<InetDBase$Path>" = "" Then Error Internet resources can not be found
-If "<Unicode$Path>" = "" Then Error NetSurf requires the !Unicode resource. This can be found, along with the Iconv module, at http://www.netsurf-browser.org/projects/iconv/
+If "<Unicode$Path>" = "" Then Error NetSurf requires the !Unicode resource. This can be found, along with the Iconv module, at https://www.netsurf-browser.org/projects/iconv/
If "<Inet$MimeMappings>" = "" Then Set Inet$MimeMappings InetDBase:MimeMap
+| Use OS copy of root CA bundle, if present
+IfThere InetDBase:CertData Then Set NetSurf$CABundle InetDBase:CertData Else Set NetSurf$CABundle NetSurf:Resources.ca-bundle
+
| Define this alias for clarity
| Syntax: NetSurfRMLoad <Path to module>
Set Alias$NetSurfRMLoad IfThere %%*0 Then RMLoad %%*0
@@ -65,6 +68,10 @@ RMEnsure DrawFile 1.30 Error NetSurf requires the DrawFile module. This can be d
RMEnsure SharedUnixLibrary 1.07 NetSurfRMLoad System:Modules.SharedULib
RMEnsure SharedUnixLibrary 1.07 Error NetSurf requires SharedUnixLibrary 1.07 or later. Please use the RISC OS Configure app to update the computer's !System directory from the NetSurf archive.
+| Ensure ARMEABISupport is installed
+|RMEnsure ARMEABISupport 1.04 NetSurfRMLoad System:Modules.ARMEABISupport
+|RMEnsure ARMEABISupport 1.04 Error NetSurf requires ARMEABISupport 1.04 or later. Please use the RISC OS Configure app to update the computer's !System directory from the NetSurf archive.
+
| Load AcornURI if it isn't already
Unset NetSurf$Start_URI_Handler
RMEnsure AcornURI 0.12 Set NetSurf$Start_URI_Handler 1
diff --git a/frontends/riscos/sslcert.c b/frontends/riscos/sslcert.c
deleted file mode 100644
index 4d81268f4..000000000
--- a/frontends/riscos/sslcert.c
+++ /dev/null
@@ -1,415 +0,0 @@
-/*
- * Copyright 2006 John M Bell <jmb202@ecs.soton.ac.uk>
- * Copyright 2016 Vincent Sanders <vince@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 RISC OS certificate verification UI.
- */
-
-#include <oslib/wimp.h>
-
-#include "utils/log.h"
-#include "netsurf/plotters.h"
-#include "desktop/sslcert_viewer.h"
-
-#include "riscos/dialog.h"
-#include "riscos/wimp.h"
-#include "riscos/wimp_event.h"
-#include "riscos/wimputils.h"
-#include "riscos/gui.h"
-#include "riscos/toolbar.h"
-#include "riscos/corewindow.h"
-#include "riscos/sslcert.h"
-
-/* widget ID */
-#define ICON_SSL_PANE 1
-#define ICON_SSL_REJECT 3
-#define ICON_SSL_ACCEPT 4
-
-/**
- * RISC OS certificate viewer context.
- */
-struct ro_cert_window {
- struct ro_corewindow core;
-
- /** certificate view window handle */
- wimp_w wh;
-
- /** SSL certificate viewer context data */
- struct sslcert_session_data *ssl_data;
-
-};
-
-/** riscos dialog template for certificate viewer window. */
-static wimp_window *dialog_cert_template;
-
-/** riscos template for certificate tree pane. */
-static wimp_window *cert_tree_template;
-
-
-/**
- * Handle closing of the RISC OS certificate verification dialog
- *
- * Deleting wimp windows, freeing up the core window and ssl data block.
- *
- * \param certw The context associated with the dialogue.
- */
-static void ro_gui_cert_release_window(struct ro_cert_window *certw)
-{
- os_error *error;
-
- ro_gui_wimp_event_finalise(certw->wh);
-
- sslcert_viewer_fini(certw->ssl_data);
-
- ro_corewindow_fini(&certw->core);
-
- error = xwimp_delete_window(certw->wh);
- if (error) {
- NSLOG(netsurf, INFO, "xwimp_delete_window: 0x%x:%s",
- error->errnum, error->errmess);
- }
-
- error = xwimp_delete_window(certw->core.wh);
- if (error) {
- NSLOG(netsurf, INFO, "xwimp_delete_window: 0x%x:%s",
- error->errnum, error->errmess);
- }
-
- free(certw);
-}
-
-/**
- * Handle acceptance of certificate via event callback.
- *
- * \param pointer The wimp pointer event.
- */
-static void ro_gui_cert_accept(wimp_pointer *pointer)
-{
- struct ro_cert_window *certw;
- certw = (struct ro_cert_window *)ro_gui_wimp_event_get_user_data(pointer->w);
-
- sslcert_viewer_accept(certw->ssl_data);
- ro_gui_dialog_close(certw->wh);
- ro_gui_cert_release_window(certw);
-}
-
-
-/**
- * Handle rejection of certificate via event callback.
- *
- * \param pointer The wimp pointer block.
- */
-static void ro_gui_cert_reject(wimp_pointer *pointer)
-{
- struct ro_cert_window *certw;
- certw = (struct ro_cert_window *)ro_gui_wimp_event_get_user_data(pointer->w);
-
- sslcert_viewer_reject(certw->ssl_data);
- ro_gui_dialog_close(certw->wh);
- ro_gui_cert_release_window(certw);
-}
-
-
-/**
- * Callback to handle the closure of the SSL dialogue by other means.
- *
- * \param w The window handle being closed.
- */
-static void ro_gui_cert_close_window(wimp_w w)
-{
- struct ro_cert_window *certw;
- certw = (struct ro_cert_window *)ro_gui_wimp_event_get_user_data(w);
-
- ro_gui_cert_release_window(certw);
-}
-
-
-/**
- * Attach tree window as a pane to ssl window.
- *
- * Nest the tree window inside the pane window. To do this, we:
- * - Get the current pane extent,
- * - Get the parent window position and the location of the pane-
- * locating icon inside it,
- * - Set the visible area of the pane to suit,
- * - Check that the pane extents are OK for this visible area, and
- * increase them if necessary,
- * - Before finally opening the pane as a nested part of the parent.
- *
- */
-static nserror cert_attach_pane(wimp_w parent, wimp_w pane)
-{
- os_error *error;
- wimp_window_state wstate;
- wimp_window_info winfo;
- wimp_icon_state istate;
- bool set_extent;
-
- winfo.w = pane;
- error = xwimp_get_window_info_header_only(&winfo);
- if (error) {
- NSLOG(netsurf, INFO, "xwimp_get_window_info: 0x%x: %s",
- error->errnum, error->errmess);
- return NSERROR_INIT_FAILED;
- }
-
- wstate.w = parent;
- error = xwimp_get_window_state(&wstate);
- if (error) {
- NSLOG(netsurf, INFO, "xwimp_get_window_state: 0x%x: %s",
- error->errnum, error->errmess);
- return NSERROR_INIT_FAILED;
- }
-
- istate.w = parent;
- istate.i = ICON_SSL_PANE;
- error = xwimp_get_icon_state(&istate);
- if (error) {
- NSLOG(netsurf, INFO, "xwimp_get_icon_state: 0x%x: %s",
- error->errnum, error->errmess);
- return NSERROR_INIT_FAILED;
- }
-
- wstate.w = pane;
- wstate.visible.x1 = wstate.visible.x0 + istate.icon.extent.x1 - 20 - ro_get_vscroll_width(pane);
- wstate.visible.x0 += istate.icon.extent.x0 + 20;
- wstate.visible.y0 = wstate.visible.y1 + istate.icon.extent.y0 + 20 + ro_get_hscroll_height(pane);
- wstate.visible.y1 += istate.icon.extent.y1 - 32;
-
- set_extent = false;
-
- if ((winfo.extent.x1 - winfo.extent.x0) <
- (wstate.visible.x1 - wstate.visible.x0)) {
- winfo.extent.x0 = 0;
- winfo.extent.x1 = wstate.visible.x1 - wstate.visible.x0;
- set_extent = true;
- }
- if ((winfo.extent.y1 - winfo.extent.y0) <
- (wstate.visible.y1 - wstate.visible.y0)) {
- winfo.extent.y1 = 0;
- winfo.extent.x1 = wstate.visible.y0 - wstate.visible.y1;
- set_extent = true;
- }
-
- if (set_extent) {
- error = xwimp_set_extent(pane, &(winfo.extent));
- if (error) {
- NSLOG(netsurf, INFO, "xwimp_set_extent: 0x%x: %s",
- error->errnum, error->errmess);
- return NSERROR_INIT_FAILED;
- }
- }
-
- error = xwimp_open_window_nested(
- PTR_WIMP_OPEN(&wstate),
- parent,
- wimp_CHILD_LINKS_PARENT_VISIBLE_BOTTOM_OR_LEFT << wimp_CHILD_XORIGIN_SHIFT |
- wimp_CHILD_LINKS_PARENT_VISIBLE_TOP_OR_RIGHT << wimp_CHILD_YORIGIN_SHIFT |
- wimp_CHILD_LINKS_PARENT_VISIBLE_BOTTOM_OR_LEFT << wimp_CHILD_LS_EDGE_SHIFT |
- wimp_CHILD_LINKS_PARENT_VISIBLE_BOTTOM_OR_LEFT << wimp_CHILD_RS_EDGE_SHIFT);
- if (error) {
- NSLOG(netsurf, INFO, "xwimp_open_window_nested: 0x%x: %s",
- error->errnum, error->errmess);
- return NSERROR_INIT_FAILED;
- }
-
- return NSERROR_OK;
-}
-
-
-/**
- * Callback to draw on drawable area of ro certificate viewer window.
- *
- * \param ro_cw The riscos core window structure.
- * \param originx The risc os plotter x origin.
- * \param originy The risc os plotter y origin.
- * \param r The rectangle of the window that needs updating.
- * \return NSERROR_OK on success otherwise apropriate error code
- */
-static nserror
-cert_draw(struct ro_corewindow *ro_cw, int originx, int originy, struct rect *r)
-{
- struct ro_cert_window *certw;
- struct redraw_context ctx = {
- .interactive = true,
- .background_images = true,
- .plot = &ro_plotters
- };
-
- certw = (struct ro_cert_window *)ro_cw;
-
- ro_plot_origin_x = originx;
- ro_plot_origin_y = originy;
- no_font_blending = true;
- sslcert_viewer_redraw(certw->ssl_data, 0, 0, r, &ctx);
- no_font_blending = false;
-
- return NSERROR_OK;
-}
-
-
-/**
- * callback for keypress on ro certificate viewer window
- *
- * \param ro_cw The ro 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
- */
-static nserror cert_key(struct ro_corewindow *ro_cw, uint32_t nskey)
-{
- struct ro_cert_window *certw;
- certw = (struct ro_cert_window *)ro_cw;
-
- if (sslcert_viewer_keypress(certw->ssl_data, nskey)) {
- return NSERROR_OK;
- }
- return NSERROR_NOT_IMPLEMENTED;
-}
-
-
-/**
- * callback for mouse event on ro certificate viewer window
- *
- * \param ro_cw The ro 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.
- */
-static nserror
-cert_mouse(struct ro_corewindow *ro_cw,
- browser_mouse_state mouse_state,
- int x, int y)
-{
- struct ro_cert_window *certw;
- certw = (struct ro_cert_window *)ro_cw;
-
- sslcert_viewer_mouse_action(certw->ssl_data, mouse_state, x, y);
-
- return NSERROR_OK;
-}
-
-/* exported interface documented in riscos/sslcert.h */
-nserror
-gui_cert_verify(nsurl *url,
- const struct ssl_cert_info *certs,
- unsigned long num,
- nserror (*cb)(bool proceed, void *pw),
- void *cbpw)
-{
- os_error *error;
- struct ro_cert_window *ncwin; /* new certificate window */
- nserror res;
-
- ncwin = malloc(sizeof(struct ro_cert_window));
- if (ncwin == NULL) {
- return NSERROR_NOMEM;
- }
-
- /* 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;
- }
-
- /* Create the SSL window */
- error = xwimp_create_window(dialog_cert_template, &ncwin->wh);
- if (error) {
- NSLOG(netsurf, INFO, "xwimp_create_window: 0x%x: %s",
- error->errnum, error->errmess);
- free(ncwin);
- return NSERROR_INIT_FAILED;
- }
-
- /* create ssl viewer pane window */
- error = xwimp_create_window(cert_tree_template, &ncwin->core.wh);
- if (error) {
- NSLOG(netsurf, INFO, "xwimp_create_window: 0x%x: %s",
- error->errnum, error->errmess);
- free(ncwin);
- return NSERROR_INIT_FAILED;
- }
-
- /* setup callbacks */
- ncwin->core.draw = cert_draw;
- ncwin->core.key = cert_key;
- ncwin->core.mouse = cert_mouse;
-
- /* initialise core window */
- res = ro_corewindow_init(&ncwin->core, NULL, NULL, 0, NULL);
- 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;
- }
-
- /* Set up the certificate window event handling.
- *
- * (The action buttons are registered as button events, not OK and
- * Cancel, as both need to carry out actions.)
- */
- ro_gui_wimp_event_set_user_data(ncwin->wh, ncwin);
- ro_gui_wimp_event_register_close_window(ncwin->wh,
- ro_gui_cert_close_window);
- ro_gui_wimp_event_register_button(ncwin->wh,
- ICON_SSL_REJECT,
- ro_gui_cert_reject);
- ro_gui_wimp_event_register_button(ncwin->wh,
- ICON_SSL_ACCEPT,
- ro_gui_cert_accept);
-
- ro_gui_dialog_open_persistent(NULL, ncwin->wh, false);
-
- res = cert_attach_pane(ncwin->wh, ncwin->core.wh);
- if (res != NSERROR_OK) {
- ro_gui_cert_release_window(ncwin);
- }
-
- return res;
-}
-
-
-/* exported interface documented in riscos/sslcert.h */
-void ro_gui_cert_initialise(void)
-{
- /* Load template for the SSL certificate window */
- dialog_cert_template = ro_gui_dialog_load_template("sslcert");
-
- /* load template for ssl treeview pane and adjust the window flags. */
- cert_tree_template = ro_gui_dialog_load_template("tree");
-
- cert_tree_template->flags &= ~(wimp_WINDOW_MOVEABLE |
- wimp_WINDOW_BACK_ICON |
- wimp_WINDOW_CLOSE_ICON |
- wimp_WINDOW_TITLE_ICON |
- wimp_WINDOW_SIZE_ICON |
- wimp_WINDOW_TOGGLE_ICON);
-}
diff --git a/frontends/riscos/sslcert.h b/frontends/riscos/sslcert.h
deleted file mode 100644
index 09607f04c..000000000
--- a/frontends/riscos/sslcert.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright 2006 Richard Wilson <info@tinct.net>
- * Copyright 2010 Stephen Fryatt <stevef@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
- * RISC OS SSL certificate viewer interface.
- */
-
-#ifndef NETSURF_RISCOS_SSLCERT_H
-#define NETSURF_RISCOS_SSLCERT_H
-
-struct node;
-
-/**
- * Load and initialise the certificate window template.
- */
-void ro_gui_cert_initialise(void);
-
-/**
- * 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
- */
-nserror gui_cert_verify(struct nsurl *url, const struct ssl_cert_info *certs, unsigned long num, nserror (*cb)(bool proceed, void *pw), void *cbpw);
-
-#endif
-
diff --git a/frontends/riscos/templates/de b/frontends/riscos/templates/de
index a4ec1f4ad..b5710d467 100644
--- a/frontends/riscos/templates/de
+++ b/frontends/riscos/templates/de
@@ -858,56 +858,6 @@ wimp_window {
text_and_sprite.validation:""
}
wimp_icon {
- extent:20,-404,208,-360
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"Speedlimit"
- text.size:12
- text.validation:""
- }
- wimp_icon {
- extent:212,-408,380,-356
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | wimp_BUTTON_WRITABLE
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_WHITE
- text.text:"12.34"
- text.size:*
- text.validation:"Pptr_write;Kta"
- }
- wimp_icon {
- extent:396,-400,428,-368
- icon_flags:wimp_ICON_TEXT | wimp_ICON_SPRITE | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED | wimp_BUTTON_REPEAT
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_and_sprite.text:""
- text_and_sprite.size:*
- text_and_sprite.validation:"r5;sdown,pdown"
- }
- wimp_icon {
- extent:428,-400,460,-368
- icon_flags:wimp_ICON_TEXT | wimp_ICON_SPRITE | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED | wimp_BUTTON_REPEAT
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_and_sprite.text:""
- text_and_sprite.size:*
- text_and_sprite.validation:"r5;sup,pup"
- }
- wimp_icon {
- extent:468,-404,612,-360
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"Sekunden"
- text.size:*
- text.validation:""
- }
- wimp_icon {
extent:212,-460,640,-416
icon_flags:wimp_ICON_TEXT | wimp_ICON_SPRITE | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED | wimp_BUTTON_RADIO
icon_esg:0
@@ -1195,7 +1145,7 @@ wimp_window {
icon_esg:0
icon_fg:wimp_COLOUR_BLACK
icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"http://netsurf.sourceforge.net/netsurf.zip"
+ text.text:"https://netsurf.sourceforge.net/netsurf.zip"
text.size:*
text.validation:"R2"
}
@@ -1291,6 +1241,32 @@ wimp_window {
}
wimp_window {
+ template_name:"corepginfo"
+ visible:252,388,1152,808
+ xscroll:0
+ yscroll:0
+ next:wimp_TOP
+ window_flags:wimp_WINDOW_MOVEABLE | wimp_WINDOW_SCROLL_REPEAT | wimp_WINDOW_NEW_FORMAT
+ title_fg:wimp_COLOUR_BLACK
+ title_bg:wimp_COLOUR_LIGHT_GREY
+ work_fg:wimp_COLOUR_BLACK
+ work_bg:wimp_COLOUR_WHITE
+ scroll_outer:wimp_COLOUR_MID_LIGHT_GREY
+ scroll_inner:wimp_COLOUR_VERY_LIGHT_GREY
+ highlight_bg:wimp_COLOUR_CREAM
+ extra_flags:
+ extent:0,-880,1236,0
+ title_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | 0x27000000
+ work_flags:wimp_BUTTON_CLICK
+ sprite_area:&1
+ xmin:0
+ ymin:0
+ text.text:"Page Info"
+ text.size:*
+ text.validation:""
+}
+
+wimp_window {
template_name:"info"
visible:268,838,888,1086
xscroll:0
@@ -1397,124 +1373,6 @@ wimp_window {
}
wimp_window {
- template_name:"login"
- visible:710,422,1386,758
- xscroll:0
- yscroll:-8
- next:wimp_TOP
- window_flags:wimp_WINDOW_MOVEABLE | wimp_WINDOW_AUTO_REDRAW | wimp_WINDOW_FULL_SIZE | wimp_WINDOW_TITLE_ICON | wimp_WINDOW_NEW_FORMAT
- title_fg:wimp_COLOUR_BLACK
- title_bg:wimp_COLOUR_LIGHT_GREY
- work_fg:wimp_COLOUR_BLACK
- work_bg:wimp_COLOUR_VERY_LIGHT_GREY
- scroll_outer:wimp_COLOUR_MID_LIGHT_GREY
- scroll_inner:wimp_COLOUR_VERY_LIGHT_GREY
- highlight_bg:wimp_COLOUR_CREAM
- extra_flags:
- extent:0,-344,676,-8
- title_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | 0x27000000
- work_flags:
- sprite_area:&1
- xmin:676
- ymin:336
- text.text:"Authentifizierung"
- text.size:20
- text.validation:""
- wimp_icon {
- extent:532,-332,664,-264
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | wimp_BUTTON_CLICK
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"Login"
- text.size:8
- text.validation:"R6,3;Nok"
- }
- wimp_icon {
- extent:376,-324,508,-272
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | wimp_BUTTON_CLICK
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"Abbruch"
- text.size:*
- text.validation:"R5,3;Ncancel"
- }
- wimp_icon {
- extent:168,-68,668,-16
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"moo.yoo.com"
- text.size:255
- text.validation:"R2"
- }
- wimp_icon {
- extent:168,-128,668,-76
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"my sekr3t area"
- text.size:255
- text.validation:"R2"
- }
- wimp_icon {
- extent:168,-188,668,-136
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | wimp_BUTTON_WRITABLE
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_WHITE
- text.text:""
- text.size:255
- text.validation:"Pptr_write;Kta;N401username"
- }
- wimp_icon {
- extent:168,-248,668,-196
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | wimp_BUTTON_WRITABLE
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_WHITE
- text.text:""
- text.size:255
- text.validation:"Pptr_write;Kta;D*"
- }
- wimp_icon {
- extent:88,-64,164,-20
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Host"
- }
- wimp_icon {
- extent:16,-184,164,-140
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Username"
- }
- wimp_icon {
- extent:24,-244,164,-200
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Passwort"
- }
- wimp_icon {
- extent:68,-124,164,-80
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Realm"
- }
-}
-
-wimp_window {
template_name:"new_entry"
visible:1120,590,1720,810
xscroll:0
@@ -3449,254 +3307,6 @@ wimp_window {
}
wimp_window {
- template_name:"ssldisplay"
- visible:212,142,1172,682
- xscroll:0
- yscroll:0
- next:wimp_TOP
- window_flags:wimp_WINDOW_MOVEABLE | wimp_WINDOW_AUTO_REDRAW | wimp_WINDOW_FULL_SIZE | wimp_WINDOW_CLOSE_ICON | wimp_WINDOW_TITLE_ICON | wimp_WINDOW_NEW_FORMAT
- title_fg:wimp_COLOUR_BLACK
- title_bg:wimp_COLOUR_LIGHT_GREY
- work_fg:wimp_COLOUR_BLACK
- work_bg:wimp_COLOUR_VERY_LIGHT_GREY
- scroll_outer:wimp_COLOUR_MID_LIGHT_GREY
- scroll_inner:wimp_COLOUR_VERY_LIGHT_GREY
- highlight_bg:wimp_COLOUR_CREAM
- extra_flags:
- extent:0,-540,960,0
- title_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | 0x27000000
- work_flags:
- sprite_area:&1
- xmin:960
- ymin:76
- text.text:"SSL Zertifikat"
- text.size:16
- text.validation:""
- wimp_icon {
- extent:432,-168,928,-116
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:*
- text.validation:"R2"
- }
- wimp_icon {
- extent:16,-520,944,-24
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:*
- text.validation:"R4"
- }
- wimp_icon {
- extent:24,-108,148,-64
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Version"
- }
- wimp_icon {
- extent:152,-108,264,-56
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:*
- text.validation:"R2"
- }
- wimp_icon {
- extent:260,-104,432,-60
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"gültig von"
- }
- wimp_icon {
- extent:432,-108,928,-56
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:*
- text.validation:"R2"
- }
- wimp_icon {
- extent:68,-168,148,-124
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Typ"
- }
- wimp_icon {
- extent:152,-168,264,-116
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:*
- text.validation:"R2"
- }
- wimp_icon {
- extent:244,-164,432,-120
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"gültig bis"
- }
- wimp_icon {
- extent:32,-52,380,-8
- icon_flags:wimp_ICON_TEXT | wimp_ICON_SPRITE | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_and_sprite.text:" Certificate details "
- text_and_sprite.size:*
- text_and_sprite.validation:""
- }
- wimp_icon {
- extent:40,-228,148,-184
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Serial"
- }
- wimp_icon {
- extent:152,-228,928,-176
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:*
- text.validation:"R2"
- }
- wimp_icon {
- extent:40,-288,148,-244
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Issuer"
- }
- wimp_icon {
- extent:152,-376,928,-236
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:*
- text.validation:"R2;L"
- }
- wimp_icon {
- extent:24,-432,148,-388
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Subject"
- }
- wimp_icon {
- extent:152,-504,928,-384
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:*
- text.validation:"R2;L"
- }
-}
-
-wimp_window {
- template_name:"sslcert"
- visible:348,306,1136,898
- xscroll:0
- yscroll:0
- next:wimp_TOP
- window_flags:wimp_WINDOW_MOVEABLE | wimp_WINDOW_AUTO_REDRAW | wimp_WINDOW_FULL_SIZE | wimp_WINDOW_TITLE_ICON | wimp_WINDOW_NEW_FORMAT
- title_fg:wimp_COLOUR_BLACK
- title_bg:wimp_COLOUR_LIGHT_GREY
- work_fg:wimp_COLOUR_BLACK
- work_bg:wimp_COLOUR_VERY_LIGHT_GREY
- scroll_outer:wimp_COLOUR_MID_LIGHT_GREY
- scroll_inner:wimp_COLOUR_VERY_LIGHT_GREY
- highlight_bg:wimp_COLOUR_CREAM
- extra_flags:
- extent:0,-592,788,0
- title_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | 0x27000000
- work_flags:
- sprite_area:&1
- xmin:788
- ymin:592
- text.text:"SSL Zertifizierungsproblem"
- text.size:*
- text.validation:""
- wimp_icon {
- extent:16,-108,772,-16
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"NetSurf konnte ein SSL Zertifikat nicht prüfen. Bitte die Details unten beachten."
- text.size:150
- text.validation:"R2;L"
- }
- wimp_icon {
- extent:16,-484,772,-136
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:*
- text.validation:"R4"
- }
- wimp_icon {
- extent:32,-164,380,-120
- icon_flags:wimp_ICON_TEXT | wimp_ICON_SPRITE | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_and_sprite.text:" Certificate chain "
- text_and_sprite.size:22
- text_and_sprite.validation:""
- }
- wimp_icon {
- extent:404,-564,568,-512
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | wimp_BUTTON_CLICK
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"Ablehnen"
- text.size:*
- text.validation:"R5,3"
- }
- wimp_icon {
- extent:588,-572,772,-504
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | wimp_BUTTON_CLICK
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"Annehmen"
- text.size:12
- text.validation:"R6,3"
- }
-}
-
-wimp_window {
template_name:"con_content"
visible:1404,424,2044,924
xscroll:0
@@ -3760,15 +3370,11 @@ wimp_window {
}
wimp_icon {
extent:32,-256,496,-212
-#ifdef WITH_PLUGIN
icon_flags:wimp_ICON_TEXT | wimp_ICON_SPRITE | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED | wimp_BUTTON_RADIO
-#else
- icon_flags:wimp_ICON_TEXT | wimp_ICON_SPRITE | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED | wimp_ICON_DELETED | wimp_BUTTON_RADIO
-#endif
icon_esg:0
icon_fg:wimp_COLOUR_BLACK
icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_and_sprite.text:"Plugins nicht benutzen"
+ text_and_sprite.text:"CSS nicht benutzen"
text_and_sprite.size:42
text_and_sprite.validation:"Soptoff,opton"
}
diff --git a/frontends/riscos/templates/en b/frontends/riscos/templates/en
index 25be55f5a..6ea18a859 100644
--- a/frontends/riscos/templates/en
+++ b/frontends/riscos/templates/en
@@ -856,56 +856,6 @@ wimp_window {
text_and_sprite.validation:""
}
wimp_icon {
- extent:20,-404,208,-360
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"Speed limit"
- text.size:*
- text.validation:""
- }
- wimp_icon {
- extent:212,-408,380,-356
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | wimp_BUTTON_WRITABLE
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_WHITE
- text.text:"12.34"
- text.size:*
- text.validation:"Pptr_write;Kta;A0-9."
- }
- wimp_icon {
- extent:396,-400,428,-368
- icon_flags:wimp_ICON_TEXT | wimp_ICON_SPRITE | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED | wimp_BUTTON_REPEAT
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_and_sprite.text:""
- text_and_sprite.size:*
- text_and_sprite.validation:"r5;sdown,pdown"
- }
- wimp_icon {
- extent:428,-400,460,-368
- icon_flags:wimp_ICON_TEXT | wimp_ICON_SPRITE | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED | wimp_BUTTON_REPEAT
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_and_sprite.text:""
- text_and_sprite.size:*
- text_and_sprite.validation:"r5;sup,pup"
- }
- wimp_icon {
- extent:468,-404,592,-360
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"seconds"
- text.size:*
- text.validation:""
- }
- wimp_icon {
extent:212,-460,556,-416
icon_flags:wimp_ICON_TEXT | wimp_ICON_SPRITE | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED | wimp_BUTTON_RADIO
icon_esg:0
@@ -1405,7 +1355,7 @@ wimp_window {
icon_esg:0
icon_fg:wimp_COLOUR_BLACK
icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"http://netsurf.sourceforge.net/netsurf.zip"
+ text.text:"https://netsurf.sourceforge.net/netsurf.zip"
text.size:*
text.validation:"R2"
}
@@ -1501,6 +1451,32 @@ wimp_window {
}
wimp_window {
+ template_name:"corepginfo"
+ visible:252,388,1152,808
+ xscroll:0
+ yscroll:0
+ next:wimp_TOP
+ window_flags:wimp_WINDOW_MOVEABLE | wimp_WINDOW_SCROLL_REPEAT | wimp_WINDOW_NEW_FORMAT
+ title_fg:wimp_COLOUR_BLACK
+ title_bg:wimp_COLOUR_LIGHT_GREY
+ work_fg:wimp_COLOUR_BLACK
+ work_bg:wimp_COLOUR_WHITE
+ scroll_outer:wimp_COLOUR_MID_LIGHT_GREY
+ scroll_inner:wimp_COLOUR_VERY_LIGHT_GREY
+ highlight_bg:wimp_COLOUR_CREAM
+ extra_flags:
+ extent:0,-880,1236,0
+ title_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | 0x27000000
+ work_flags:wimp_BUTTON_CLICK
+ sprite_area:&1
+ xmin:0
+ ymin:0
+ text.text:"Page Info"
+ text.size:*
+ text.validation:""
+}
+
+wimp_window {
template_name:"info"
visible:752,452,1372,700
xscroll:0
@@ -1607,124 +1583,6 @@ wimp_window {
}
wimp_window {
- template_name:"login"
- visible:582,400,1258,736
- xscroll:0
- yscroll:0
- next:wimp_TOP
- window_flags:wimp_WINDOW_MOVEABLE | wimp_WINDOW_AUTO_REDRAW | wimp_WINDOW_TITLE_ICON | wimp_WINDOW_NEW_FORMAT
- title_fg:wimp_COLOUR_BLACK
- title_bg:wimp_COLOUR_LIGHT_GREY
- work_fg:wimp_COLOUR_BLACK
- work_bg:wimp_COLOUR_VERY_LIGHT_GREY
- scroll_outer:wimp_COLOUR_MID_LIGHT_GREY
- scroll_inner:wimp_COLOUR_VERY_LIGHT_GREY
- highlight_bg:wimp_COLOUR_CREAM
- extra_flags:
- extent:0,-336,676,0
- title_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | 0x27000000
- work_flags:
- sprite_area:&1
- xmin:676
- ymin:336
- text.text:"Site Authentication"
- text.size:*
- text.validation:""
- wimp_icon {
- extent:532,-324,664,-256
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | wimp_BUTTON_CLICK
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"Login"
- text.size:8
- text.validation:"R6,3;Nok"
- }
- wimp_icon {
- extent:380,-316,508,-264
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | wimp_BUTTON_CLICK
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"Cancel"
- text.size:*
- text.validation:"R5,3;Ncancel"
- }
- wimp_icon {
- extent:168,-60,668,-8
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"moo.yoo.com"
- text.size:255
- text.validation:"R2"
- }
- wimp_icon {
- extent:168,-120,668,-68
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"my sekr3t area"
- text.size:255
- text.validation:"R2"
- }
- wimp_icon {
- extent:168,-180,668,-128
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | wimp_BUTTON_WRITABLE
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_WHITE
- text.text:""
- text.size:255
- text.validation:"Pptr_write;Kta;N401username"
- }
- wimp_icon {
- extent:168,-240,668,-188
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | wimp_BUTTON_WRITABLE
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_WHITE
- text.text:""
- text.size:255
- text.validation:"Pptr_write;Kta;D*"
- }
- wimp_icon {
- extent:84,-56,164,-12
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Host"
- }
- wimp_icon {
- extent:8,-176,164,-132
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Username"
- }
- wimp_icon {
- extent:20,-236,164,-192
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Password"
- }
- wimp_icon {
- extent:64,-116,164,-72
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Realm"
- }
-}
-
-wimp_window {
template_name:"new_entry"
visible:480,660,1080,880
xscroll:0
@@ -2969,178 +2827,6 @@ wimp_window {
}
wimp_window {
- template_name:"ssldisplay"
- visible:862,768,1822,1308
- xscroll:0
- yscroll:0
- next:wimp_TOP
- window_flags:wimp_WINDOW_MOVEABLE | wimp_WINDOW_AUTO_REDRAW | wimp_WINDOW_BOUNDED_ONCE | wimp_WINDOW_CLOSE_ICON | wimp_WINDOW_TITLE_ICON | wimp_WINDOW_NEW_FORMAT
- title_fg:wimp_COLOUR_BLACK
- title_bg:wimp_COLOUR_LIGHT_GREY
- work_fg:wimp_COLOUR_BLACK
- work_bg:wimp_COLOUR_VERY_LIGHT_GREY
- scroll_outer:wimp_COLOUR_MID_LIGHT_GREY
- scroll_inner:wimp_COLOUR_VERY_LIGHT_GREY
- highlight_bg:wimp_COLOUR_CREAM
- extra_flags:
- extent:0,-540,960,0
- title_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | 0x27000000
- work_flags:
- sprite_area:&1
- xmin:960
- ymin:76
- text.text:"SSL certificate"
- text.size:*
- text.validation:""
- wimp_icon {
- extent:16,-520,944,-24
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:*
- text.validation:"R4"
- }
- wimp_icon {
- extent:32,-52,380,-8
- icon_flags:wimp_ICON_TEXT | wimp_ICON_SPRITE | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_and_sprite.text:" Certificate details "
- text_and_sprite.size:*
- text_and_sprite.validation:""
- }
- wimp_icon {
- extent:24,-108,148,-64
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Version"
- }
- wimp_icon {
- extent:152,-108,264,-56
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:*
- text.validation:"R2"
- }
- wimp_icon {
- extent:284,-104,456,-60
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Valid from"
- }
- wimp_icon {
- extent:460,-108,928,-56
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:*
- text.validation:"R2"
- }
- wimp_icon {
- extent:68,-168,148,-124
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Type"
- }
- wimp_icon {
- extent:152,-168,264,-116
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:*
- text.validation:"R2"
- }
- wimp_icon {
- extent:268,-164,456,-120
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Valid until"
- }
- wimp_icon {
- extent:460,-168,928,-116
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:*
- text.validation:"R2"
- }
- wimp_icon {
- extent:40,-228,148,-184
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Serial"
- }
- wimp_icon {
- extent:152,-228,928,-176
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:*
- text.validation:"R2"
- }
- wimp_icon {
- extent:40,-288,148,-244
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Issuer"
- }
- wimp_icon {
- extent:152,-376,928,-236
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:*
- text.validation:"R2;L"
- }
- wimp_icon {
- extent:24,-432,148,-388
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Subject"
- }
- wimp_icon {
- extent:152,-504,928,-384
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:*
- text.validation:"R2;L"
- }
-}
-
-wimp_window {
template_name:"con_secure"
visible:1590,788,2182,1152
xscroll:0
@@ -3354,15 +3040,11 @@ wimp_window {
}
wimp_icon {
extent:32,-256,344,-212
-#ifdef WITH_PLUGIN
icon_flags:wimp_ICON_TEXT | wimp_ICON_SPRITE | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED | wimp_BUTTON_RADIO
-#else
- icon_flags:wimp_ICON_TEXT | wimp_ICON_SPRITE | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED | wimp_ICON_DELETED | wimp_BUTTON_RADIO
-#endif
icon_esg:0
icon_fg:wimp_COLOUR_BLACK
icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_and_sprite.text:"Disable plug-ins"
+ text_and_sprite.text:"Disable CSS"
text_and_sprite.size:42
text_and_sprite.validation:"Soptoff,opton"
}
@@ -3760,78 +3442,3 @@ wimp_window {
}
}
-wimp_window {
- template_name:"sslcert"
- visible:348,306,1136,898
- xscroll:0
- yscroll:0
- next:wimp_TOP
- window_flags:wimp_WINDOW_MOVEABLE | wimp_WINDOW_AUTO_REDRAW | wimp_WINDOW_BOUNDED_ONCE | wimp_WINDOW_TITLE_ICON | wimp_WINDOW_NEW_FORMAT
- title_fg:wimp_COLOUR_BLACK
- title_bg:wimp_COLOUR_LIGHT_GREY
- work_fg:wimp_COLOUR_BLACK
- work_bg:wimp_COLOUR_VERY_LIGHT_GREY
- scroll_outer:wimp_COLOUR_MID_LIGHT_GREY
- scroll_inner:wimp_COLOUR_VERY_LIGHT_GREY
- highlight_bg:wimp_COLOUR_CREAM
- extra_flags:
- extent:0,-592,788,0
- title_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | 0x27000000
- work_flags:
- sprite_area:&1
- xmin:788
- ymin:592
- text.text:"SSL certificate problem"
- text.size:*
- text.validation:""
- wimp_icon {
- extent:16,-108,772,-16
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"NetSurf failed to verify the authenticity of an SSL certificate. Please verify the details presented below."
- text.size:150
- text.validation:"R2;L"
- }
- wimp_icon {
- extent:16,-484,772,-136
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:*
- text.validation:"R4"
- }
- wimp_icon {
- extent:32,-164,380,-120
- icon_flags:wimp_ICON_TEXT | wimp_ICON_SPRITE | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_and_sprite.text:" Certificate chain "
- text_and_sprite.size:22
- text_and_sprite.validation:""
- }
- wimp_icon {
- extent:404,-564,568,-512
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | wimp_BUTTON_CLICK
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"Reject"
- text.size:*
- text.validation:"R5,3"
- }
- wimp_icon {
- extent:588,-572,772,-504
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | wimp_BUTTON_CLICK
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"Accept"
- text.size:8
- text.validation:"R6,3"
- }
-}
diff --git a/frontends/riscos/templates/fr b/frontends/riscos/templates/fr
index fafe0cec1..e2741df4a 100644
--- a/frontends/riscos/templates/fr
+++ b/frontends/riscos/templates/fr
@@ -860,56 +860,6 @@ wimp_window {
text_and_sprite.validation:""
}
wimp_icon {
- extent:20,-404,208,-360
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"Vitesse limite"
- text.size:*
- text.validation:""
- }
- wimp_icon {
- extent:212,-408,380,-356
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | wimp_BUTTON_WRITABLE
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_WHITE
- text.text:"12.34"
- text.size:*
- text.validation:"Pptr_write;Kta"
- }
- wimp_icon {
- extent:396,-400,428,-368
- icon_flags:wimp_ICON_TEXT | wimp_ICON_SPRITE | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED | wimp_BUTTON_REPEAT
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_and_sprite.text:""
- text_and_sprite.size:*
- text_and_sprite.validation:"r5;sdown,pdown"
- }
- wimp_icon {
- extent:428,-400,460,-368
- icon_flags:wimp_ICON_TEXT | wimp_ICON_SPRITE | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED | wimp_BUTTON_REPEAT
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_and_sprite.text:""
- text_and_sprite.size:*
- text_and_sprite.validation:"r5;sup,pup"
- }
- wimp_icon {
- extent:468,-404,592,-360
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"secondes"
- text.size:*
- text.validation:""
- }
- wimp_icon {
extent:212,-460,628,-416
icon_flags:wimp_ICON_TEXT | wimp_ICON_SPRITE | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED | wimp_BUTTON_RADIO
icon_esg:0
@@ -1195,7 +1145,7 @@ wimp_window {
icon_esg:0
icon_fg:wimp_COLOUR_BLACK
icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"http://netsurf.sourceforge.net/netsurf.zip"
+ text.text:"https://netsurf.sourceforge.net/netsurf.zip"
text.size:*
text.validation:"R2"
}
@@ -1291,6 +1241,32 @@ wimp_window {
}
wimp_window {
+ template_name:"corepginfo"
+ visible:252,388,1152,808
+ xscroll:0
+ yscroll:0
+ next:wimp_TOP
+ window_flags:wimp_WINDOW_MOVEABLE | wimp_WINDOW_SCROLL_REPEAT | wimp_WINDOW_NEW_FORMAT
+ title_fg:wimp_COLOUR_BLACK
+ title_bg:wimp_COLOUR_LIGHT_GREY
+ work_fg:wimp_COLOUR_BLACK
+ work_bg:wimp_COLOUR_WHITE
+ scroll_outer:wimp_COLOUR_MID_LIGHT_GREY
+ scroll_inner:wimp_COLOUR_VERY_LIGHT_GREY
+ highlight_bg:wimp_COLOUR_CREAM
+ extra_flags:
+ extent:0,-880,1236,0
+ title_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | 0x27000000
+ work_flags:wimp_BUTTON_CLICK
+ sprite_area:&1
+ xmin:0
+ ymin:0
+ text.text:"Page Info"
+ text.size:*
+ text.validation:""
+}
+
+wimp_window {
template_name:"info"
visible:506,58,1126,306
xscroll:0
@@ -1405,128 +1381,6 @@ wimp_window {
}
wimp_window {
- template_name:"login"
- visible:566,258,1242,594
- xscroll:0
- yscroll:0
- next:wimp_TOP
- window_flags:wimp_WINDOW_MOVEABLE | wimp_WINDOW_AUTO_REDRAW | wimp_WINDOW_BOUNDED_ONCE | wimp_WINDOW_TITLE_ICON | wimp_WINDOW_NEW_FORMAT
- title_fg:wimp_COLOUR_BLACK
- title_bg:wimp_COLOUR_LIGHT_GREY
- work_fg:wimp_COLOUR_BLACK
- work_bg:wimp_COLOUR_VERY_LIGHT_GREY
- scroll_outer:wimp_COLOUR_MID_LIGHT_GREY
- scroll_inner:wimp_COLOUR_VERY_LIGHT_GREY
- highlight_bg:wimp_COLOUR_CREAM
- extra_flags:
- extent:0,-336,676,0
- title_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | 0x27000000
- work_flags:
- sprite_area:&1
- xmin:676
- ymin:336
- text.text:"Authentification du Site"
- text.size:*
- text.validation:""
- wimp_icon {
- extent:532,-324,664,-256
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | wimp_BUTTON_CLICK
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"Entrer"
- text.size:8
- text.validation:"R6,3;Nok"
- }
- wimp_icon {
- extent:376,-316,508,-264
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | wimp_BUTTON_CLICK
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"Annuler"
- text.size:*
- text.validation:"R5,3;Ncancel"
- }
- wimp_icon {
- extent:200,-60,668,-8
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"moo.yoo.com"
- text.size:255
- text.validation:"R2"
- }
- wimp_icon {
- extent:200,-120,668,-68
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"my sekr3t area"
- text.size:255
- text.validation:"R2"
- }
- wimp_icon {
- extent:200,-180,668,-128
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | wimp_BUTTON_WRITABLE
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_WHITE
- text.text:""
- text.size:255
- text.validation:"Pptr_write;Kta;N401username"
- }
- wimp_icon {
- extent:200,-240,668,-188
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | wimp_BUTTON_WRITABLE
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_WHITE
- text.text:""
- text.size:255
- text.validation:"Pptr_write;Kta;D*"
- }
- wimp_icon {
- extent:120,-56,196,-12
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Hôte"
- }
- wimp_icon {
- extent:8,-176,196,-132
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"Identifiant"
- text.size:*
- text.validation:""
- }
- wimp_icon {
- extent:8,-236,196,-192
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"Code secret"
- text.size:*
- text.validation:""
- }
- wimp_icon {
- extent:68,-116,196,-72
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Domaine"
- }
-}
-
-wimp_window {
template_name:"new_entry"
visible:1120,590,1720,810
xscroll:0
@@ -2988,15 +2842,11 @@ wimp_window {
}
wimp_icon {
extent:32,-256,404,-212
-#ifdef WITH_PLUGIN
icon_flags:wimp_ICON_TEXT | wimp_ICON_SPRITE | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED | wimp_BUTTON_RADIO
-#else
- icon_flags:wimp_ICON_TEXT | wimp_ICON_SPRITE | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED | wimp_ICON_DELETED | wimp_BUTTON_RADIO
-#endif
icon_esg:0
icon_fg:wimp_COLOUR_BLACK
icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_and_sprite.text:"Désactiver les plug-ins"
+ text_and_sprite.text:"Désactiver les CSS"
text_and_sprite.size:42
text_and_sprite.validation:"Soptoff,opton"
}
@@ -3610,253 +3460,3 @@ wimp_window {
}
}
-
-wimp_window {
- template_name:"ssldisplay"
- visible:282,178,1242,718
- xscroll:0
- yscroll:0
- next:wimp_TOP
- window_flags:wimp_WINDOW_MOVEABLE | wimp_WINDOW_AUTO_REDRAW | wimp_WINDOW_CLOSE_ICON | wimp_WINDOW_TITLE_ICON | wimp_WINDOW_NEW_FORMAT
- title_fg:wimp_COLOUR_BLACK
- title_bg:wimp_COLOUR_LIGHT_GREY
- work_fg:wimp_COLOUR_BLACK
- work_bg:wimp_COLOUR_VERY_LIGHT_GREY
- scroll_outer:wimp_COLOUR_MID_LIGHT_GREY
- scroll_inner:wimp_COLOUR_VERY_LIGHT_GREY
- highlight_bg:wimp_COLOUR_CREAM
- extra_flags:
- extent:0,-540,960,0
- title_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | 0x27000000
- work_flags:
- sprite_area:&1
- xmin:960
- ymin:76
- text.text:"Certificat SSL"
- text.size:16
- text.validation:""
- wimp_icon {
- extent:16,-520,944,-24
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:*
- text.validation:"R4"
- }
- wimp_icon {
- extent:32,-52,412,-8
- icon_flags:wimp_ICON_TEXT | wimp_ICON_SPRITE | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_and_sprite.text:" Détails de certificat "
- text_and_sprite.size:*
- text_and_sprite.validation:""
- }
- wimp_icon {
- extent:68,-108,192,-64
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Version"
- }
- wimp_icon {
- extent:200,-108,312,-56
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:*
- text.validation:"R2"
- }
- wimp_icon {
- extent:384,-104,524,-60
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Valide de"
- }
- wimp_icon {
- extent:524,-108,928,-56
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:*
- text.validation:"R2"
- }
- wimp_icon {
- extent:112,-168,192,-124
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Type"
- }
- wimp_icon {
- extent:200,-168,312,-116
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:*
- text.validation:"R2"
- }
- wimp_icon {
- extent:328,-164,524,-120
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"Valide jusqu'à"
- text.size:*
- text.validation:""
- }
- wimp_icon {
- extent:524,-168,928,-116
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:*
- text.validation:"R2"
- }
- wimp_icon {
- extent:84,-228,192,-184
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Série"
- }
- wimp_icon {
- extent:200,-228,928,-176
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:*
- text.validation:"R2"
- }
- wimp_icon {
- extent:32,-288,200,-244
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Fournisseur"
- }
- wimp_icon {
- extent:200,-376,928,-236
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:*
- text.validation:"R2;L"
- }
- wimp_icon {
- extent:68,-432,192,-388
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Sujet"
- }
- wimp_icon {
- extent:200,-504,928,-384
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:*
- text.validation:"R2;L"
- }
-}
-
-wimp_window {
- template_name:"sslcert"
- visible:348,306,1136,898
- xscroll:0
- yscroll:0
- next:wimp_TOP
- window_flags:wimp_WINDOW_MOVEABLE | wimp_WINDOW_AUTO_REDRAW | wimp_WINDOW_TITLE_ICON | wimp_WINDOW_NEW_FORMAT
- title_fg:wimp_COLOUR_BLACK
- title_bg:wimp_COLOUR_LIGHT_GREY
- work_fg:wimp_COLOUR_BLACK
- work_bg:wimp_COLOUR_VERY_LIGHT_GREY
- scroll_outer:wimp_COLOUR_MID_LIGHT_GREY
- scroll_inner:wimp_COLOUR_VERY_LIGHT_GREY
- highlight_bg:wimp_COLOUR_CREAM
- extra_flags:
- extent:0,-592,788,0
- title_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | 0x27000000
- work_flags:
- sprite_area:&1
- xmin:788
- ymin:592
- text.text:"Problème de certificat SSL"
- text.size:*
- text.validation:""
- wimp_icon {
- extent:16,-108,772,-16
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"NetSurf n'a pas pu vérifier l'authenticité d'un certificat SSL. Vérifiez SVP les détails présentés ci-dessous."
- text.size:150
- text.validation:"R2;L"
- }
- wimp_icon {
- extent:16,-484,772,-136
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:*
- text.validation:"R4"
- }
- wimp_icon {
- extent:32,-164,380,-120
- icon_flags:wimp_ICON_TEXT | wimp_ICON_SPRITE | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_and_sprite.text:"Chaîne de certificat "
- text_and_sprite.size:*
- text_and_sprite.validation:""
- }
- wimp_icon {
- extent:404,-564,568,-512
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | wimp_BUTTON_CLICK
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"Rejeter"
- text.size:*
- text.validation:"R5,3"
- }
- wimp_icon {
- extent:588,-572,772,-504
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | wimp_BUTTON_CLICK
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"Accepter"
- text.size:*
- text.validation:"R6,3"
- }
-}
diff --git a/frontends/riscos/templates/nl b/frontends/riscos/templates/nl
index 5ed9cac1b..24b176891 100644
--- a/frontends/riscos/templates/nl
+++ b/frontends/riscos/templates/nl
@@ -858,56 +858,6 @@ wimp_window {
text_and_sprite.validation:""
}
wimp_icon {
- extent:20,-404,232,-360
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"Animatietijd"
- text.size:15
- text.validation:""
- }
- wimp_icon {
- extent:236,-408,404,-356
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | wimp_BUTTON_WRITABLE
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_WHITE
- text.text:"12.34"
- text.size:6
- text.validation:"Pptr_write;Kta;A0-9."
- }
- wimp_icon {
- extent:420,-400,452,-368
- icon_flags:wimp_ICON_TEXT | wimp_ICON_SPRITE | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED | wimp_BUTTON_REPEAT
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_and_sprite.text:""
- text_and_sprite.size:1
- text_and_sprite.validation:"r5;sdown,pdown"
- }
- wimp_icon {
- extent:452,-400,484,-368
- icon_flags:wimp_ICON_TEXT | wimp_ICON_SPRITE | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED | wimp_BUTTON_REPEAT
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_and_sprite.text:""
- text_and_sprite.size:1
- text_and_sprite.validation:"r5;sup,pup"
- }
- wimp_icon {
- extent:492,-404,644,-360
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"seconden"
- text.size:9
- text.validation:""
- }
- wimp_icon {
extent:236,-460,616,-416
icon_flags:wimp_ICON_TEXT | wimp_ICON_SPRITE | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED | wimp_BUTTON_RADIO
icon_esg:0
@@ -1409,8 +1359,8 @@ wimp_window {
icon_esg:0
icon_fg:wimp_COLOUR_BLACK
icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"http://netsurf.sourceforge.net/netsurf.zip"
- text.size:43
+ text.text:"https://netsurf.sourceforge.net/netsurf.zip"
+ text.size:*
text.validation:"R2"
}
wimp_icon {
@@ -1505,6 +1455,32 @@ wimp_window {
}
wimp_window {
+ template_name:"corepginfo"
+ visible:252,388,1152,808
+ xscroll:0
+ yscroll:0
+ next:wimp_TOP
+ window_flags:wimp_WINDOW_MOVEABLE | wimp_WINDOW_SCROLL_REPEAT | wimp_WINDOW_NEW_FORMAT
+ title_fg:wimp_COLOUR_BLACK
+ title_bg:wimp_COLOUR_LIGHT_GREY
+ work_fg:wimp_COLOUR_BLACK
+ work_bg:wimp_COLOUR_WHITE
+ scroll_outer:wimp_COLOUR_MID_LIGHT_GREY
+ scroll_inner:wimp_COLOUR_VERY_LIGHT_GREY
+ highlight_bg:wimp_COLOUR_CREAM
+ extra_flags:
+ extent:0,-880,1236,0
+ title_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | 0x27000000
+ work_flags:wimp_BUTTON_CLICK
+ sprite_area:&1
+ xmin:0
+ ymin:0
+ text.text:"Page Info"
+ text.size:*
+ text.validation:""
+}
+
+wimp_window {
template_name:"info"
visible:752,332,1412,700
xscroll:0
@@ -1649,126 +1625,6 @@ wimp_window {
}
wimp_window {
- template_name:"login"
- visible:582,400,1322,736
- xscroll:0
- yscroll:0
- next:wimp_TOP
- window_flags:wimp_WINDOW_MOVEABLE | wimp_WINDOW_AUTO_REDRAW | wimp_WINDOW_TITLE_ICON | wimp_WINDOW_NEW_FORMAT
- title_fg:wimp_COLOUR_BLACK
- title_bg:wimp_COLOUR_LIGHT_GREY
- work_fg:wimp_COLOUR_BLACK
- work_bg:wimp_COLOUR_VERY_LIGHT_GREY
- scroll_outer:wimp_COLOUR_MID_LIGHT_GREY
- scroll_inner:wimp_COLOUR_VERY_LIGHT_GREY
- highlight_bg:wimp_COLOUR_CREAM
- extra_flags:
- extent:0,-336,740,0
- title_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | 0x27000000
- work_flags:
- sprite_area:&1
- xmin:740
- ymin:336
- text.text:"Website-authenticatie"
- text.size:22
- text.validation:""
- wimp_icon {
- extent:596,-324,728,-256
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | wimp_BUTTON_CLICK
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"Login"
- text.size:8
- text.validation:"R6,3;Nok"
- }
- wimp_icon {
- extent:408,-316,572,-264
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | wimp_BUTTON_CLICK
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"Annuleer"
- text.size:9
- text.validation:"R5,3;Ncancel"
- }
- wimp_icon {
- extent:252,-60,732,-8
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"moo.yoo.com"
- text.size:255
- text.validation:"R2"
- }
- wimp_icon {
- extent:252,-120,732,-68
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"my sekr3t area"
- text.size:255
- text.validation:"R2"
- }
- wimp_icon {
- extent:252,-180,732,-128
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | wimp_BUTTON_WRITABLE
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_WHITE
- text.text:""
- text.size:255
- text.validation:"Pptr_write;Kta;N401username"
- }
- wimp_icon {
- extent:252,-240,732,-188
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | wimp_BUTTON_WRITABLE
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_WHITE
- text.text:""
- text.size:255
- text.validation:"Pptr_write;Kta;D*"
- }
- wimp_icon {
- extent:100,-56,248,-12
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Website"
- }
- wimp_icon {
- extent:4,-176,248,-132
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"Gebruikersnaam"
- text.size:15
- text.validation:""
- }
- wimp_icon {
- extent:16,-236,248,-192
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Wachtwoord"
- }
- wimp_icon {
- extent:108,-116,248,-72
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Gebied"
- }
-}
-
-wimp_window {
template_name:"new_entry"
visible:480,660,1080,880
xscroll:0
@@ -3017,180 +2873,6 @@ wimp_window {
}
wimp_window {
- template_name:"ssldisplay"
- visible:862,768,1870,1308
- xscroll:0
- yscroll:0
- next:wimp_TOP
- window_flags:wimp_WINDOW_MOVEABLE | wimp_WINDOW_AUTO_REDRAW | wimp_WINDOW_BOUNDED_ONCE | wimp_WINDOW_CLOSE_ICON | wimp_WINDOW_TITLE_ICON | wimp_WINDOW_NEW_FORMAT
- title_fg:wimp_COLOUR_BLACK
- title_bg:wimp_COLOUR_LIGHT_GREY
- work_fg:wimp_COLOUR_BLACK
- work_bg:wimp_COLOUR_VERY_LIGHT_GREY
- scroll_outer:wimp_COLOUR_MID_LIGHT_GREY
- scroll_inner:wimp_COLOUR_VERY_LIGHT_GREY
- highlight_bg:wimp_COLOUR_CREAM
- extra_flags:
- extent:0,-540,1008,0
- title_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | 0x27000000
- work_flags:
- sprite_area:&1
- xmin:1008
- ymin:76
- text.text:"SSL-certificaat"
- text.size:16
- text.validation:""
- wimp_icon {
- extent:16,-520,992,-24
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:1
- text.validation:"R4"
- }
- wimp_icon {
- extent:32,-52,380,-8
- icon_flags:wimp_ICON_TEXT | wimp_ICON_SPRITE | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_and_sprite.text:" Certificaatedetails "
- text_and_sprite.size:22
- text_and_sprite.validation:""
- }
- wimp_icon {
- extent:72,-108,196,-64
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Versie"
- }
- wimp_icon {
- extent:200,-108,312,-56
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:1
- text.validation:"R2"
- }
- wimp_icon {
- extent:320,-104,528,-60
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"Geldig vanaf"
- text.size:13
- text.validation:""
- }
- wimp_icon {
- extent:532,-108,976,-56
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:1
- text.validation:"R2"
- }
- wimp_icon {
- extent:116,-168,196,-124
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Type"
- }
- wimp_icon {
- extent:200,-168,312,-116
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:1
- text.validation:"R2"
- }
- wimp_icon {
- extent:340,-164,528,-120
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Geldig tot"
- }
- wimp_icon {
- extent:532,-168,976,-116
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:1
- text.validation:"R2"
- }
- wimp_icon {
- extent:68,-228,196,-184
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Serienr"
- }
- wimp_icon {
- extent:200,-228,976,-176
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:1
- text.validation:"R2"
- }
- wimp_icon {
- extent:56,-288,196,-244
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Uitgever"
- }
- wimp_icon {
- extent:200,-376,976,-236
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:1
- text.validation:"R2;L"
- }
- wimp_icon {
- extent:24,-432,196,-388
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Onderwerp"
- }
- wimp_icon {
- extent:200,-504,976,-384
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:1
- text.validation:"R2;L"
- }
-}
-
-wimp_window {
template_name:"con_secure"
visible:1590,788,2206,1152
xscroll:0
@@ -3408,11 +3090,11 @@ wimp_window {
}
wimp_icon {
extent:32,-256,540,-212
- icon_flags:wimp_ICON_TEXT | wimp_ICON_SPRITE | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED | wimp_ICON_DELETED | wimp_BUTTON_RADIO
+ icon_flags:wimp_ICON_TEXT | wimp_ICON_SPRITE | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED | wimp_BUTTON_RADIO
icon_esg:0
icon_fg:wimp_COLOUR_BLACK
icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_and_sprite.text:"Plug-ins uitschakelen"
+ text_and_sprite.text:"CSS uitschakelen"
text_and_sprite.size:42
text_and_sprite.validation:"Soptoff,opton"
}
@@ -3810,78 +3492,3 @@ wimp_window {
}
}
-wimp_window {
- template_name:"sslcert"
- visible:348,250,1136,898
- xscroll:0
- yscroll:0
- next:wimp_TOP
- window_flags:wimp_WINDOW_MOVEABLE | wimp_WINDOW_AUTO_REDRAW | wimp_WINDOW_BOUNDED_ONCE | wimp_WINDOW_TITLE_ICON | wimp_WINDOW_NEW_FORMAT
- title_fg:wimp_COLOUR_BLACK
- title_bg:wimp_COLOUR_LIGHT_GREY
- work_fg:wimp_COLOUR_BLACK
- work_bg:wimp_COLOUR_VERY_LIGHT_GREY
- scroll_outer:wimp_COLOUR_MID_LIGHT_GREY
- scroll_inner:wimp_COLOUR_VERY_LIGHT_GREY
- highlight_bg:wimp_COLOUR_CREAM
- extra_flags:
- extent:0,-648,788,0
- title_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | 0x27000000
- work_flags:
- sprite_area:&1
- xmin:788
- ymin:648
- text.text:"SSL-certificaatprobleem"
- text.size:24
- text.validation:""
- wimp_icon {
- extent:16,-148,772,-16
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"NetSurf kan de rechtmatigheid van een SSL-certificaat niet verifiëren. Verifieer de details hieronder."
- text.size:150
- text.validation:"R2;L"
- }
- wimp_icon {
- extent:16,-548,772,-176
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:1
- text.validation:"R4"
- }
- wimp_icon {
- extent:32,-204,380,-160
- icon_flags:wimp_ICON_TEXT | wimp_ICON_SPRITE | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_and_sprite.text:" Certificaatketen "
- text_and_sprite.size:22
- text_and_sprite.validation:""
- }
- wimp_icon {
- extent:404,-624,568,-572
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | wimp_BUTTON_CLICK
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"Verwerp"
- text.size:8
- text.validation:"R5,3"
- }
- wimp_icon {
- extent:588,-632,772,-564
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | wimp_BUTTON_CLICK
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"Accepteer"
- text.size:10
- text.validation:"R6,3"
- }
-}
diff --git a/frontends/riscos/textarea.c b/frontends/riscos/textarea.c
index 6f41c640b..69b7eede1 100644
--- a/frontends/riscos/textarea.c
+++ b/frontends/riscos/textarea.c
@@ -33,6 +33,7 @@
#include "utils/log.h"
#include "utils/utf8.h"
+#include "utils/utils.h"
#include "riscos/gui.h"
#include "riscos/oslib_pre7.h"
@@ -1023,7 +1024,7 @@ bool ro_textarea_key_press(wimp_key *key)
break;
}
- /* fall through */
+ fallthrough;
case wimp_KEY_ESCAPE:
keypress = *key;
keypress.w = ta->parent;
diff --git a/frontends/riscos/textselection.c b/frontends/riscos/textselection.c
index e5be27791..2300330db 100644
--- a/frontends/riscos/textselection.c
+++ b/frontends/riscos/textselection.c
@@ -188,8 +188,9 @@ static void ro_gui_selection_drag_end(wimp_dragged *drag, void *data)
return;
}
- if (ro_gui_window_to_window_pos(g, drag->final.x0, drag->final.y0, &pos))
+ if (ro_gui_window_to_window_pos(g, drag->final.x0, drag->final.y0, &pos)) {
browser_window_mouse_track(g->bw, 0, pos.x, pos.y);
+ }
}
/**
diff --git a/frontends/riscos/textselection.h b/frontends/riscos/textselection.h
index 400e3dd26..0d7cc169b 100644
--- a/frontends/riscos/textselection.h
+++ b/frontends/riscos/textselection.h
@@ -25,7 +25,7 @@
#include "oslib/wimp.h"
-struct gui_clipboard_table *riscos_clipboard_table;
+extern struct gui_clipboard_table *riscos_clipboard_table;
void gui_start_selection(struct gui_window *g);
diff --git a/frontends/riscos/theme_install.c b/frontends/riscos/theme_install.c
index fbca9e4fa..1e1af6c9a 100644
--- a/frontends/riscos/theme_install.c
+++ b/frontends/riscos/theme_install.c
@@ -47,8 +47,6 @@ wimp_w dialog_theme_install;
static void theme_install_close(wimp_w w);
static nserror theme_install_callback(struct hlcache_handle *handle,
const hlcache_event *event, void *pw);
-static bool theme_install_read(const char *source_data,
- unsigned long source_size);
/**
@@ -80,6 +78,33 @@ void theme_install_start(struct hlcache_handle *c)
/**
+ * Fill in theme_install_descriptor from received theme data.
+ *
+ * \param source_data received data
+ * \param source_size size of data
+ * \return true if data is a correct theme, false on error
+ *
+ * If the data is a correct theme, theme_install_descriptor is filled in.
+ */
+
+static bool
+theme_install_read(const uint8_t *source_data, size_t source_size)
+{
+ const void *data = source_data;
+
+ if (source_size < sizeof(struct theme_file_header))
+ return false;
+ if (!ro_gui_theme_read_file_header(&theme_install_descriptor,
+ (struct theme_file_header *) data))
+ return false;
+ if (source_size - sizeof(struct theme_file_header) !=
+ theme_install_descriptor.compressed_size)
+ return false;
+ return true;
+}
+
+
+/**
* Callback for fetchcache() for theme install fetches.
*/
@@ -90,8 +115,8 @@ nserror theme_install_callback(struct hlcache_handle *handle,
case CONTENT_MSG_DONE:
{
- const char *source_data;
- unsigned long source_size;
+ const uint8_t *source_data;
+ size_t source_size;
int author_indent = 0;
char buffer[256];
@@ -124,7 +149,7 @@ nserror theme_install_callback(struct hlcache_handle *handle,
case CONTENT_MSG_ERROR:
theme_install_close(dialog_theme_install);
- ro_warn_user(event->data.error, 0);
+ ro_warn_user(event->data.errordata.errormsg, 0);
break;
default:
@@ -135,30 +160,6 @@ nserror theme_install_callback(struct hlcache_handle *handle,
}
-/**
- * Fill in theme_install_descriptor from received theme data.
- *
- * \param source_data received data
- * \param source_size size of data
- * \return true if data is a correct theme, false on error
- *
- * If the data is a correct theme, theme_install_descriptor is filled in.
- */
-
-bool theme_install_read(const char *source_data, unsigned long source_size)
-{
- const void *data = source_data;
-
- if (source_size < sizeof(struct theme_file_header))
- return false;
- if (!ro_gui_theme_read_file_header(&theme_install_descriptor,
- (struct theme_file_header *) data))
- return false;
- if (source_size - sizeof(struct theme_file_header) !=
- theme_install_descriptor.compressed_size)
- return false;
- return true;
-}
/**
@@ -174,8 +175,8 @@ bool ro_gui_theme_install_apply(wimp_w w)
struct theme_descriptor *theme_install;
os_error *error;
char *fix;
- const char *source_data;
- unsigned long source_size;
+ const uint8_t *source_data;
+ size_t source_size;
assert(theme_install_content);
diff --git a/frontends/riscos/tinct.h b/frontends/riscos/tinct.h
index e02dcdece..29313724e 100644
--- a/frontends/riscos/tinct.h
+++ b/frontends/riscos/tinct.h
@@ -148,7 +148,16 @@
*/
#define tinct_BACKGROUND_SHIFT 0x08
-/* Sprite mode
-*/
+/* Sprite mode tinct
+ *
+ * Mode is: 32bpp 8:8:8:8 XXBBGGRR mode (a RISC OS 3.5+ type)
+ * We put alpha in the unused XX channel and Tinct treats it as alpha.
+ */
#define tinct_SPRITE_MODE (os_mode)0x301680b5
+
+/* Sprite mode alpha
+ *
+ * Mode is: 32bpp 8:8:8:8 AABBGGRR mode (a RISC OS 5 type)
+ */
+#define alpha_SPRITE_MODE (os_mode)0x78608051
#endif
diff --git a/frontends/riscos/toolbar.c b/frontends/riscos/toolbar.c
index 758c90cc2..c6a882ab6 100644
--- a/frontends/riscos/toolbar.c
+++ b/frontends/riscos/toolbar.c
@@ -420,7 +420,7 @@ bool ro_toolbar_rebuild(struct toolbar *toolbar)
ro_gui_wimp_event_transfer(old_window, toolbar->toolbar_handle);
}
- /* The help prefix changes from edit to non-edit more. */
+ /* The help prefix changes from edit to non-edit mode. */
ro_gui_wimp_event_set_help_prefix(toolbar->toolbar_handle,
(toolbar->editing) ?
@@ -1115,18 +1115,20 @@ bool ro_toolbar_click(wimp_pointer *pointer)
return true;
}
- /* Nothing else has handled this, so try passing it to the
- * URL Complete module.
- *
- * \TODO -- This should really move into the URL Bar module, as
- * URL Complete is really an extension to that.
- */
-
- if (toolbar->url != NULL && toolbar->url_display &&
- ro_gui_url_bar_test_for_text_field_click(toolbar->url,
- pointer)) {
- ro_gui_url_complete_start(toolbar);
- return true;
+ if (pointer->buttons != wimp_DRAG_SELECT &&
+ pointer->buttons != wimp_DRAG_ADJUST) {
+ /* Nothing else has handled this click, so try passing it to
+ * the URL Complete module.
+ *
+ * \TODO -- This should really move into the URL Bar module, as
+ * URL Complete is really an extension to that.
+ */
+ if (toolbar->url != NULL && toolbar->url_display &&
+ ro_gui_url_bar_test_for_text_field_click(
+ toolbar->url, pointer)) {
+ ro_gui_url_complete_start(toolbar);
+ return true;
+ }
}
return false;
@@ -1538,7 +1540,6 @@ void ro_toolbar_start_throbbing(struct toolbar *toolbar)
/* This is an exported interface documented in toolbar.h */
-
void ro_toolbar_stop_throbbing(struct toolbar *toolbar)
{
if (toolbar != NULL && toolbar->throbber != NULL)
@@ -1547,7 +1548,16 @@ void ro_toolbar_stop_throbbing(struct toolbar *toolbar)
/* This is an exported interface documented in toolbar.h */
+void ro_toolbar_page_info_change(struct toolbar *toolbar)
+{
+ if (toolbar == NULL || toolbar->url == NULL)
+ return;
+
+ ro_gui_url_bar_page_info_change(toolbar->url);
+}
+
+/* This is an exported interface documented in toolbar.h */
void ro_toolbar_throb(struct toolbar *toolbar)
{
if (toolbar != NULL && toolbar->throbber != NULL)
@@ -1656,7 +1666,6 @@ bool ro_toolbar_get_url_field_extent(struct toolbar *toolbar, os_box *extent)
/* This is an exported interface documented in toolbar.h */
-
void ro_toolbar_set_site_favicon(struct toolbar *toolbar,
struct hlcache_handle *h)
{
@@ -1668,7 +1677,6 @@ void ro_toolbar_set_site_favicon(struct toolbar *toolbar,
/* This is an exported interface documented in toolbar.h */
-
void ro_toolbar_set_content_favicon(struct toolbar *toolbar,
struct gui_window *g)
{
diff --git a/frontends/riscos/toolbar.h b/frontends/riscos/toolbar.h
index 41f1af728..9bca44525 100644
--- a/frontends/riscos/toolbar.h
+++ b/frontends/riscos/toolbar.h
@@ -304,7 +304,6 @@ int ro_toolbar_full_height(struct toolbar *toolbar);
*
* \param *toolbar the toolbar to start throbbing.
*/
-
void ro_toolbar_start_throbbing(struct toolbar *toolbar);
@@ -538,5 +537,14 @@ bool ro_toolbar_get_editing(struct toolbar *toolbar);
bool ro_toolbar_toggle_edit(struct toolbar *toolbar);
+
+/**
+ * Update the page information indicator.
+ *
+ * \param toolbar the toolbar to update the page info in.
+ */
+void ro_toolbar_page_info_change(struct toolbar *toolbar);
+
+
#endif
diff --git a/frontends/riscos/ucstables.c b/frontends/riscos/ucstables.c
index 3e31c992e..a94e4348c 100644
--- a/frontends/riscos/ucstables.c
+++ b/frontends/riscos/ucstables.c
@@ -398,49 +398,47 @@ static const char *localencodings[] = {
"ISO-8859-10//TRANSLIT",
"ISO-8859-13//TRANSLIT",
"ISO-8859-14//TRANSLIT",
- "ISO-8859-16//TRANSLIT",
-#define CONT_ENC_END 116 /* RISC OS alphabet numbers lie in a
- * contiguous range [100,CONT_ENC_END]
- * _except_ for Cyrillic2, which doesn't.
- */
- "CP866//TRANSLIT" /* Cyrillic2 - 120 */
+ "ISO-8859-16//TRANSLIT", /* Latin10 - 116 */
+ NULL, /* UTF-16, if you believe HdrSrc (Unused) */
+ NULL, /* Unused */
+ NULL, /* Unused */
+ "CP866//TRANSLIT" /* Cyrillic2 - 120 */
};
-static const struct special {
- char local; /**< Local 8bit representation */
- char len; /**< Length (in bytes) of UTF-8 character */
- const char *utf; /**< UTF-8 representation */
-} special_chars[] = {
- { 0x80, 3, "\xE2\x82\xAC" }, /* EURO SIGN */
- { 0x81, 2, "\xC5\xB4" }, /* LATIN CAPITAL LETTER W WITH CIRCUMFLEX */
- { 0x82, 2, "\xC5\xB5" }, /* LATIN SMALL LETTER W WITH CIRCUMFLEX */
- { 0x84, 3, "\xE2\x9C\x98" }, /* HEAVY BALLOT X */
- { 0x85, 2, "\xC5\xB6" }, /* LATIN CAPITAL LETTER Y WITH CIRCUMFLEX */
- { 0x86, 2, "\xC5\xB7" }, /* LATIN SMALL LETTER Y WITH CIRCUMFLEX */
- { 0x88, 3, "\xE2\x87\x90" }, /* LEFTWARDS DOUBLE ARROW */
- { 0x89, 3, "\xE2\x87\x92" }, /* RIGHTWARDS DOUBLE ARROW */
- { 0x8a, 3, "\xE2\x87\x93" }, /* DOWNWARDS DOUBLE ARROW */
- { 0x8b, 3, "\xE2\x87\x91" }, /* UPWARDS DOUBLE ARROW */
- { 0x8c, 3, "\xE2\x80\xA6" }, /* HORIZONTAL ELLIPSIS */
- { 0x8d, 3, "\xE2\x84\xA2" }, /* TRADE MARK SIGN */
- { 0x8e, 3, "\xE2\x80\xB0" }, /* PER MILLE SIGN */
- { 0x8f, 3, "\xE2\x80\xA2" }, /* BULLET */
- { 0x90, 3, "\xE2\x80\x98" }, /* LEFT SINGLE QUOTATION MARK */
- { 0x91, 3, "\xE2\x80\x99" }, /* RIGHT SINGLE QUOTATION MARK */
- { 0x92, 3, "\xE2\x80\xB9" }, /* SINGLE LEFT-POINTING ANGLE QUOTATION MARK */
- { 0x93, 3, "\xE2\x80\xBA" }, /* SINGLE RIGHT-POINTING ANGLE QUOTATION MARK */
- { 0x94, 3, "\xE2\x80\x9C" }, /* LEFT DOUBLE QUOTATION MARK */
- { 0x95, 3, "\xE2\x80\x9D" }, /* RIGHT DOUBLE QUOTATION MARK */
- { 0x96, 3, "\xE2\x80\x9E" }, /* DOUBLE LOW-9 QUOTATION MARK */
- { 0x97, 3, "\xE2\x80\x93" }, /* EN DASH */
- { 0x98, 3, "\xE2\x80\x94" }, /* EM DASH */
- { 0x99, 3, "\xE2\x88\x92" }, /* MINUS SIGN */
- { 0x9a, 2, "\xC5\x92" }, /* LATIN CAPITAL LIGATURE OE */
- { 0x9b, 2, "\xC5\x93" }, /* LATIN SMALL LIGATURE OE */
- { 0x9c, 3, "\xE2\x80\xA0" }, /* DAGGER */
- { 0x9d, 3, "\xE2\x80\xA1" }, /* DOUBLE DAGGER */
- { 0x9e, 3, "\xEF\xAC\x81" }, /* LATIN SMALL LIGATURE FI */
- { 0x9f, 3, "\xEF\xAC\x82" } /* LATIN SMALL LIGATURE FL */
+/* These are the Acorn Latin1 C1 block between [0x80,0x9f] */
+static const char *special_chars[] = {
+ "\xE2\x82\xAC", /* EURO SIGN */
+ "\xC5\xB4", /* LATIN CAPITAL LETTER W WITH CIRCUMFLEX */
+ "\xC5\xB5", /* LATIN SMALL LETTER W WITH CIRCUMFLEX */
+ NULL, /* unused */
+ "\xE2\x9C\x98", /* HEAVY BALLOT X */
+ "\xC5\xB6", /* LATIN CAPITAL LETTER Y WITH CIRCUMFLEX */
+ "\xC5\xB7", /* LATIN SMALL LETTER Y WITH CIRCUMFLEX */
+ NULL, /* unused */
+ "\xE2\x87\x90", /* LEFTWARDS DOUBLE ARROW */
+ "\xE2\x87\x92", /* RIGHTWARDS DOUBLE ARROW */
+ "\xE2\x87\x93", /* DOWNWARDS DOUBLE ARROW */
+ "\xE2\x87\x91", /* UPWARDS DOUBLE ARROW */
+ "\xE2\x80\xA6", /* HORIZONTAL ELLIPSIS */
+ "\xE2\x84\xA2", /* TRADE MARK SIGN */
+ "\xE2\x80\xB0", /* PER MILLE SIGN */
+ "\xE2\x80\xA2", /* BULLET */
+ "\xE2\x80\x98", /* LEFT SINGLE QUOTATION MARK */
+ "\xE2\x80\x99", /* RIGHT SINGLE QUOTATION MARK */
+ "\xE2\x80\xB9", /* SINGLE LEFT-POINTING ANGLE QUOTATION MARK */
+ "\xE2\x80\xBA", /* SINGLE RIGHT-POINTING ANGLE QUOTATION MARK */
+ "\xE2\x80\x9C", /* LEFT DOUBLE QUOTATION MARK */
+ "\xE2\x80\x9D", /* RIGHT DOUBLE QUOTATION MARK */
+ "\xE2\x80\x9E", /* DOUBLE LOW-9 QUOTATION MARK */
+ "\xE2\x80\x93", /* EN DASH */
+ "\xE2\x80\x94", /* EM DASH */
+ "\xE2\x88\x92", /* MINUS SIGN */
+ "\xC5\x92", /* LATIN CAPITAL LIGATURE OE */
+ "\xC5\x93", /* LATIN SMALL LIGATURE OE */
+ "\xE2\x80\xA0", /* DAGGER */
+ "\xE2\x80\xA1", /* DOUBLE DAGGER */
+ "\xEF\xAC\x81", /* LATIN SMALL LIGATURE FI */
+ "\xEF\xAC\x82" /* LATIN SMALL LIGATURE FL */
};
@@ -470,20 +468,22 @@ nserror utf8_to_local_encoding(const char *string, size_t len, char **result)
/* read system alphabet */
error = xosbyte1(osbyte_ALPHABET_NUMBER, 127, 0, &alphabet);
- if (error)
+ /* Assume Latin1 for anything we know nothing about */
+ if (error || alphabet < territory_ALPHABET_BFONT ||
+ alphabet > territory_ALPHABET_CYRILLIC2)
alphabet = territory_ALPHABET_LATIN1;
/* UTF-8 -> simply copy string */
- if (alphabet == 111 /* UTF-8 */) {
+ if (alphabet == territory_ALPHABET_UTF8) {
*result = strndup(string, len);
return NSERROR_OK;
}
/* get encoding name */
- enc = (alphabet <= CONT_ENC_END ? localencodings[alphabet - 100]
- : (alphabet == 120 ?
- localencodings[CONT_ENC_END - 100 + 1]
- : localencodings[0]));
+ enc = localencodings[alphabet - territory_ALPHABET_BFONT];
+ /* Assume Latin1 for any that are unused */
+ if (enc == NULL)
+ enc = localencodings[0];
/* create output buffer */
*(result) = malloc(len + 1);
@@ -498,13 +498,32 @@ nserror utf8_to_local_encoding(const char *string, size_t len, char **result)
* characters and inserting appropriate output for characters
* that iconv can't handle. */
for (off = 0; off < len; off = utf8_next(string, len, off)) {
- if (string[off] != 0xE2 &&
- string[off] != 0xC5 && string[off] != 0xEF)
+ /* Specials only start with C5/E2/EF */
+ if (string[off] != 0xC5 &&
+ string[off] != 0xE2 && string[off] != 0xEF)
continue;
+ /* Ignore truncated input */
+ if (off + 2 + (string[off] == 0xC5 ? 0 : 1) >= len)
+ continue;
+
+ /* Search to see if this character is special */
for (i = 0; i != NOF_ELEMENTS(special_chars); i++) {
- if (strncmp(string + off, special_chars[i].utf,
- special_chars[i].len) != 0)
+ /* Skip unused special char */
+ if (special_chars[i] == NULL)
+ continue;
+
+ /* Skip 2-byte non-match */
+ if (string[off] == 0xC5 &&
+ (string[off] != special_chars[i][0] ||
+ string[off+1] != special_chars[i][1]))
+ continue;
+
+ /* Skip 3-byte non-match */
+ if (string[off] != 0xC5 &&
+ (string[off] != special_chars[i][0] ||
+ string[off+1] != special_chars[i][1] ||
+ string[off+2] != special_chars[i][2]))
continue;
/* 0 length has a special meaning to utf8_to_enc */
@@ -524,9 +543,13 @@ nserror utf8_to_local_encoding(const char *string, size_t len, char **result)
free(temp);
}
- *cur_pos = special_chars[i].local;
+ /* Emit conversion for this special character */
+ *cur_pos = 0x80 + i;
*(++cur_pos) = '\0';
- prev_off = off + special_chars[i].len;
+ prev_off = off + 2 + (string[off] == 0xC5 ? 0 : 1);
+
+ /* Return to outer loop to process remaining input */
+ break;
}
}
@@ -561,7 +584,7 @@ nserror utf8_to_local_encoding(const char *string, size_t len, char **result)
nserror utf8_from_local_encoding(const char *string, size_t len, char **result)
{
os_error *error;
- int alphabet, i, num_specials = 0, result_alloc;
+ int alphabet, num_specials = 0, result_alloc;
#define SPECIAL_CHUNK_SIZE 255
size_t off, prev_off, cur_off;
char *temp;
@@ -576,11 +599,13 @@ nserror utf8_from_local_encoding(const char *string, size_t len, char **result)
/* read system alphabet */
error = xosbyte1(osbyte_ALPHABET_NUMBER, 127, 0, &alphabet);
- if (error)
+ /* Assume Latin1 for anything we know nothing about */
+ if (error || alphabet < territory_ALPHABET_BFONT ||
+ alphabet > territory_ALPHABET_CYRILLIC2)
alphabet = territory_ALPHABET_LATIN1;
/* UTF-8 -> simply copy string */
- if (alphabet == 111 /* UTF-8 */) {
+ if (alphabet == territory_ALPHABET_UTF8) {
temp = strndup(string, len);
if (!temp)
return NSERROR_NOMEM;
@@ -590,10 +615,10 @@ nserror utf8_from_local_encoding(const char *string, size_t len, char **result)
}
/* get encoding name */
- enc = (alphabet <= CONT_ENC_END ? localencodings[alphabet - 100]
- : (alphabet == 120 ?
- localencodings[CONT_ENC_END - 100 + 1]
- : localencodings[0]));
+ enc = localencodings[alphabet - territory_ALPHABET_BFONT];
+ /* Assume Latin1 for any that are unused */
+ if (enc == NULL)
+ enc = localencodings[0];
/* create output buffer (oversized) */
result_alloc = (len * 4) + (3 * SPECIAL_CHUNK_SIZE) + 1;
@@ -610,52 +635,54 @@ nserror utf8_from_local_encoding(const char *string, size_t len, char **result)
* characters and inserting appropriate output for characters
* that iconv can't handle. */
for (off = 0; off < len; off++) {
+ /* Skip non-special characters */
if (string[off] < 0x80 || string[off] > 0x9f)
continue;
- for (i = 0; i != NOF_ELEMENTS(special_chars); i++) {
- if (string[off] != special_chars[i].local)
- continue;
-
- /* 0 length has a special meaning to utf8_from_enc */
- if (off - prev_off > 0) {
- err = utf8_from_enc(string + prev_off, enc,
- off - prev_off, &temp, NULL);
- if (err != NSERROR_OK) {
- assert(err != NSERROR_BAD_ENCODING);
- NSLOG(netsurf, INFO,
- "utf8_from_enc failed");
- free(*result);
- return NSERROR_NOMEM;
- }
-
- strcat((*result) + cur_off, temp);
-
- cur_off += strlen(temp);
-
- free(temp);
+ /* 0 length has a special meaning to utf8_from_enc */
+ if (off - prev_off > 0) {
+ err = utf8_from_enc(string + prev_off, enc,
+ off - prev_off, &temp, NULL);
+ if (err != NSERROR_OK) {
+ assert(err != NSERROR_BAD_ENCODING);
+ NSLOG(netsurf, INFO, "utf8_from_enc failed");
+ free(*result);
+ return NSERROR_NOMEM;
}
- strcat((*result) + cur_off, special_chars[i].utf);
+ strcat((*result) + cur_off, temp);
- cur_off += special_chars[i].len;
+ cur_off += strlen(temp);
- prev_off = off + 1;
+ free(temp);
+ }
- num_specials++;
- if (num_specials % SPECIAL_CHUNK_SIZE ==
- SPECIAL_CHUNK_SIZE - 1) {
- char *temp = realloc((*result),
- result_alloc +
- (3 * SPECIAL_CHUNK_SIZE));
- if (!temp) {
- free(*result);
- return NSERROR_NOMEM;
- }
+ /* Append UTF-8 encoded special character or U+FFFD if none */
+ if (special_chars[string[off]-0x80] != NULL) {
+ const char *special = special_chars[string[off]-0x80];
+ strcat((*result) + cur_off, special);
+ cur_off += 2 + (special[0] == 0xC5 ? 0 : 1);
+ } else {
+ strcat((*result) + cur_off, "\xef\xbf\xbd");
+ cur_off += 3;
+ }
- *result = temp;
- result_alloc += (3 * SPECIAL_CHUNK_SIZE);
+ prev_off = off + 1;
+
+ /* Resize output buffer if necessary */
+ num_specials++;
+ if (num_specials % SPECIAL_CHUNK_SIZE ==
+ SPECIAL_CHUNK_SIZE - 1) {
+ char *temp = realloc((*result),
+ result_alloc +
+ (3 * SPECIAL_CHUNK_SIZE));
+ if (!temp) {
+ free(*result);
+ return NSERROR_NOMEM;
}
+
+ *result = temp;
+ result_alloc += (3 * SPECIAL_CHUNK_SIZE);
}
}
diff --git a/frontends/riscos/ucstables.h b/frontends/riscos/ucstables.h
index e5d838249..31db5d882 100644
--- a/frontends/riscos/ucstables.h
+++ b/frontends/riscos/ucstables.h
@@ -21,7 +21,7 @@
* This is only used if nothing claims Service_International,8
*/
-struct gui_utf8_table *riscos_utf8_table;
+extern struct gui_utf8_table *riscos_utf8_table;
nserror utf8_to_local_encoding(const char *string, size_t len, char **result);
nserror utf8_from_local_encoding(const char *string, size_t len, char **result);
diff --git a/frontends/riscos/wimputils.h b/frontends/riscos/wimputils.h
index 5225a720e..b1bd88045 100644
--- a/frontends/riscos/wimputils.h
+++ b/frontends/riscos/wimputils.h
@@ -24,6 +24,9 @@
#define riscos_wimputils_h_
#include <oslib/wimp.h>
+#include <oslib/wimpreadsysinfo.h>
+
+#include "utils/log.h"
/* Magical union to permit aliasing of wimp_window_state and wimp_open
* Do not use this directly. Use the macros, instead. */
@@ -62,4 +65,27 @@ typedef union vdu_var_list {
#define PTR_OS_VDU_VAR_LIST(l) ((os_vdu_var_list *) (vdu_var_list *) (l))
+/**
+ * Check whether the OS supports text selection in writiable icons.
+ *
+ * \return true if text-selection is supported, false otherwise.
+ */
+static inline bool ns_wimp_has_text_selection(void)
+{
+ wimp_colour bg;
+ wimp_colour fg;
+ os_error *error;
+ wimpreadsysinfotextselection_flags flags;
+
+ error = xwimpreadsysinfo_text_selection(&bg, &fg, &flags);
+ if (error) {
+ NSLOG(netsurf, WARNING,
+ "xwimpreadsysinfo_text_selection: 0x%x: %s",
+ error->errnum, error->errmess);
+ return false;
+ }
+
+ return (flags & wimpreadsysinfotextselectionflags_ENABLED);
+}
+
#endif
diff --git a/frontends/riscos/window.c b/frontends/riscos/window.c
index 986e5c55d..4dcdcd734 100644
--- a/frontends/riscos/window.c
+++ b/frontends/riscos/window.c
@@ -64,6 +64,7 @@
#include "netsurf/keypress.h"
#include "desktop/browser_history.h"
#include "desktop/cookie_manager.h"
+#include "desktop/searchweb.h"
#include "riscos/bitmap.h"
#include "riscos/buffer.h"
@@ -71,6 +72,7 @@
#include "riscos/dialog.h"
#include "riscos/local_history.h"
#include "riscos/global_history.h"
+#include "riscos/pageinfo.h"
#include "riscos/gui.h"
#include "riscos/gui/status_bar.h"
#include "riscos/help.h"
@@ -390,15 +392,18 @@ static void ro_gui_window_open(wimp_open *open)
/* reformat or change extent if necessary */
if (have_content &&
- (g->old_width != width || g->old_height != height)) {
+ (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;
+ if ((g->old_width > 0) &&
+ (g->old_width != width) &&
+ (ro_gui_ctrl_pressed())) {
+ new_scale = (browser_window_get_scale(g->bw) * width) / g->old_width;
+ }
browser_window_schedule_reformat(g->bw);
}
- if (g->update_extent || g->old_width != width ||
- g->old_height != height) {
+ if (g->update_extent ||
+ g->old_width != width ||
+ g->old_height != height) {
g->old_width = width;
g->old_height = height;
g->update_extent = false;
@@ -583,7 +588,7 @@ static void ro_gui_window_action_add_bookmark(struct gui_window *g)
browser_window_has_content(g->bw) == false)
return;
- url = browser_window_get_url(g->bw);
+ url = browser_window_access_url(g->bw);
ro_gui_hotlist_add_page(url);
ro_toolbar_update_hotlist(g->toolbar);
@@ -603,7 +608,7 @@ static void ro_gui_window_action_remove_bookmark(struct gui_window *g)
browser_window_has_content(g->bw) == false)
return;
- url = browser_window_get_url(g->bw);
+ url = browser_window_access_url(g->bw);
ro_gui_hotlist_remove_page(url);
}
@@ -828,8 +833,11 @@ ro_gui_window_toolbar_click(void *data,
if (action_type == TOOLBAR_ACTION_URL) {
switch (action.url) {
case TOOLBAR_URL_DRAG_URL:
+ case TOOLBAR_URL_DRAG_FAVICON:
{
gui_save_type save_type;
+ nserror err;
+ nsurl *url;
if (!browser_window_has_content(g->bw))
break;
@@ -839,9 +847,17 @@ ro_gui_window_toolbar_click(void *data,
else
save_type = GUI_SAVE_LINK_TEXT;
- ro_gui_drag_save_link(save_type,
- browser_window_get_url(g->bw),
+ err = browser_window_get_url(g->bw, true, &url);
+ if (err != NSERROR_OK) {
+ /* Fall back to access (won't get fragment). */
+ url = nsurl_ref(
+ browser_window_access_url(g->bw));
+ }
+
+ ro_gui_drag_save_link(save_type, url,
browser_window_get_title(g->bw), g);
+
+ nsurl_unref(url);
}
break;
@@ -853,6 +869,10 @@ ro_gui_window_toolbar_click(void *data,
ro_gui_window_action_remove_bookmark(g);
break;
+ case TOOLBAR_URL_SELECT_PGINFO:
+ case TOOLBAR_URL_ADJUST_PGINFO:
+ ro_gui_pageinfo_present(g);
+
default:
break;
}
@@ -972,17 +992,18 @@ ro_gui_window_toolbar_click(void *data,
* \param g gui_window to update
* \param url1 url to be launched
*/
-static void ro_gui_window_launch_url(struct gui_window *g, const char *url1)
+static void ro_gui_window_launch_url(struct gui_window *g, const char *url_s)
{
nserror error;
nsurl *url;
- if (url1 == NULL)
+ if (url_s == NULL) {
return;
+ }
ro_gui_url_complete_close();
- error = nsurl_create(url1, &url);
+ error = search_web_omni(url_s, SEARCH_WEB_OMNI_NONE, &url);
if (error != NSERROR_OK) {
ro_warn_user(messages_get_errorcode(error), 0);
} else {
@@ -1009,7 +1030,7 @@ static void ro_gui_window_action_new_window(struct gui_window *g)
return;
error = browser_window_create(BW_CREATE_CLONE,
- browser_window_get_url(g->bw),
+ browser_window_access_url(g->bw),
NULL, g->bw, NULL);
if (error != NSERROR_OK) {
@@ -1102,7 +1123,7 @@ ro_gui_window_scroll_action(struct gui_window *g,
step_x = SCROLL_TOP;
break;
default:
- step_x = (visible_x * (scroll_x>>2)) >> 2;
+ step_x = (32 * (scroll_x / 4));
break;
}
@@ -1128,7 +1149,7 @@ ro_gui_window_scroll_action(struct gui_window *g,
step_y = SCROLL_TOP;
break;
default:
- step_y = -((visible_y * (scroll_y>>2)) >> 2);
+ step_y = -(32 * (scroll_y / 4));
break;
}
@@ -1142,10 +1163,12 @@ ro_gui_window_scroll_action(struct gui_window *g,
*/
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);
+ 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,
@@ -1197,6 +1220,52 @@ ro_gui_window_scroll_action(struct gui_window *g,
}
}
+/**
+ * handle scale kepresses within RISC OS
+ */
+static bool handle_local_keypress_scale(struct gui_window *gw, uint32_t c)
+{
+ float cscale; /* current scale */
+ float scale; /* new scale */
+
+ cscale = browser_window_get_scale(gw->bw);
+
+ scale = cscale;
+
+ if (ro_gui_shift_pressed() && c == 17) {
+ scale = cscale - 0.1;
+ } else if (ro_gui_shift_pressed() && c == 23) {
+ scale = cscale + 0.1;
+ } else if (c == 17) {
+ for (int i = SCALE_SNAP_TO_SIZE - 1; i >= 0; i--) {
+ if (scale_snap_to[i] < cscale) {
+ scale = scale_snap_to[i];
+ break;
+ }
+ }
+ } else {
+ for (unsigned int i = 0; i < SCALE_SNAP_TO_SIZE; i++) {
+ if (scale_snap_to[i] > cscale) {
+ scale = scale_snap_to[i];
+ break;
+ }
+ }
+ }
+
+ if (scale < scale_snap_to[0]) {
+ scale = scale_snap_to[0];
+ }
+
+ if (scale > scale_snap_to[SCALE_SNAP_TO_SIZE - 1]) {
+ scale = scale_snap_to[SCALE_SNAP_TO_SIZE - 1];
+ }
+
+ if (cscale != scale) {
+ ro_gui_window_set_scale(gw, scale);
+ }
+
+ return true;
+}
/**
* Handle keypresses within the RISC OS GUI
@@ -1219,7 +1288,6 @@ ro_gui_window_handle_local_keypress(struct gui_window *g,
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;
@@ -1245,7 +1313,7 @@ ro_gui_window_handle_local_keypress(struct gui_window *g,
case IS_WIMP_KEY + wimp_KEY_F1: /* Help. */
{
nserror error = nsurl_create(
- "http://www.netsurf-browser.org/documentation/",
+ "https://www.netsurf-browser.org/documentation/",
&url);
if (error == NSERROR_OK) {
error = browser_window_create(BW_CREATE_HISTORY,
@@ -1359,8 +1427,7 @@ ro_gui_window_handle_local_keypress(struct gui_window *g,
if (is_toolbar) {
const char *toolbar_url;
toolbar_url = ro_toolbar_get_url(g->toolbar);
- if (toolbar_url != NULL)
- ro_gui_window_launch_url(g, toolbar_url);
+ ro_gui_window_launch_url(g, toolbar_url);
}
return true;
@@ -1380,34 +1447,10 @@ ro_gui_window_handle_local_keypress(struct gui_window *g,
case 17: /* CTRL+Q (Zoom out) */
case 23: /* CTRL+W (Zoom in) */
- if (browser_window_has_content(g->bw) == false)
- break;
- scale = g->scale;
- if (ro_gui_shift_pressed() && c == 17)
- scale = g->scale - 0.1;
- else if (ro_gui_shift_pressed() && c == 23)
- scale = g->scale + 0.1;
- else if (c == 17) {
- for (int i = SCALE_SNAP_TO_SIZE - 1; i >= 0; i--)
- if (scale_snap_to[i] < g->scale) {
- scale = scale_snap_to[i];
- break;
- }
- } else {
- for (unsigned int i = 0; i < SCALE_SNAP_TO_SIZE; i++)
- if (scale_snap_to[i] > g->scale) {
- scale = scale_snap_to[i];
- break;
- }
- }
- if (scale < scale_snap_to[0])
- scale = scale_snap_to[0];
- if (scale > scale_snap_to[SCALE_SNAP_TO_SIZE - 1])
- scale = scale_snap_to[SCALE_SNAP_TO_SIZE - 1];
- if (g->scale != scale) {
- ro_gui_window_set_scale(g, scale);
+ if (browser_window_has_content(g->bw) == true) {
+ return handle_local_keypress_scale(g, c);
}
- return true;
+ break;
case IS_WIMP_KEY + wimp_KEY_PRINT:
ro_gui_window_action_print(g);
@@ -1552,7 +1595,7 @@ static void ro_gui_window_close(wimp_w w)
if (pointer.buttons & wimp_CLICK_ADJUST) {
destroy = !ro_gui_shift_pressed();
- url = browser_window_get_url(g->bw);
+ url = browser_window_access_url(g->bw);
if (url != NULL) {
netsurf_nsurl_to_path(url, &filename);
}
@@ -1597,6 +1640,57 @@ static void ro_gui_window_close(wimp_w w)
}
}
+/**
+ * Wrapper for calls to browser_window_redraw for a wimp_draw rectangle.
+ *
+ * \param[in] gui_win Window to render.
+ * \param[in] wimp_rect The area of gui_win to render into.
+ * \param[in] use_buffer Whether to use buffered rendering.
+ */
+static inline void ro_gui_window__redraw_rect(
+ const struct gui_window *gui_win,
+ const wimp_draw *wimp_rect,
+ bool use_buffer)
+{
+ struct redraw_context ctx = {
+ .interactive = true,
+ .background_images = true,
+ .plot = &ro_plotters
+ };
+ 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 = wimp_rect->box.x0 - wimp_rect->xscroll;
+ ro_plot_origin_y = wimp_rect->box.y1 - wimp_rect->yscroll;
+
+ /* Adjust clip rect for origin. */
+ ro_plot_clip_rect.x0 = wimp_rect->clip.x0 - ro_plot_origin_x;
+ ro_plot_clip_rect.y0 = ro_plot_origin_y - wimp_rect->clip.y0;
+ ro_plot_clip_rect.x1 = wimp_rect->clip.x1 - ro_plot_origin_x;
+ ro_plot_clip_rect.y1 = ro_plot_origin_y - wimp_rect->clip.y1;
+
+ /* 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 = (ro_plot_clip_rect.x0 ) / 2; /* left */
+ clip.y0 = (ro_plot_clip_rect.y1 ) / 2; /* top */
+ clip.x1 = (ro_plot_clip_rect.x1 + 1) / 2; /* right */
+ clip.y1 = (ro_plot_clip_rect.y0 + 1) / 2; /* bottom */
+
+ if (use_buffer) {
+ ro_gui_buffer_open(wimp_rect);
+ }
+
+ browser_window_redraw(gui_win->bw, 0, 0, &clip, &ctx);
+
+ if (use_buffer) {
+ ro_gui_buffer_close();
+ }
+}
/**
* Handle a Redraw_Window_Request for a browser window.
@@ -1608,11 +1702,6 @@ 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
- };
g = (struct gui_window *)ro_gui_wimp_event_get_user_data(redraw->w);
@@ -1633,31 +1722,8 @@ static void ro_gui_window_redraw(wimp_draw *redraw)
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;
-
- /* 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 */
-
- 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();
+ ro_gui_window__redraw_rect(g, redraw,
+ ro_gui_current_redraw_gui->option.buffer_everything);
/* Check to see if there are more rectangles to draw and
* get next one */
@@ -1688,37 +1754,48 @@ static void ro_gui_window_redraw(wimp_draw *redraw)
*/
static void ro_gui_window_scroll(wimp_scroll *scroll)
{
- struct gui_window *g = ro_gui_window_lookup(scroll->w);
-
- if (g && browser_window_has_content(g->bw) && ro_gui_shift_pressed()) {
- /* extended scroll request with shift held down; change zoom */
- float scale, inc;
-
- 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;
-
- 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) {
+ float cscale, scale, inc;
+ struct gui_window *g = ro_gui_window_lookup(scroll->w);
+
+ if (g == NULL) {
+ return;
+ }
+
+ if ((browser_window_has_content(g->bw) == false) ||
+ (ro_gui_shift_pressed() == false)) {
ro_gui_window_scroll_action(g, scroll->xmin, scroll->ymin);
+ return;
+ }
+
+ /* extended scroll request with shift held down; change zoom */
+ cscale = browser_window_get_scale(g->bw);
+
+ 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;
+ }
+
+ if (scroll->ymin > 0) {
+ scale = cscale + inc;
+ if (scale > scale_snap_to[SCALE_SNAP_TO_SIZE - 1]) {
+ scale = scale_snap_to[SCALE_SNAP_TO_SIZE - 1];
+ }
+ } else {
+ scale = cscale - inc;
+ if (scale < scale_snap_to[0]) {
+ scale = scale_snap_to[0];
+ }
+ }
+ if (scale != cscale) {
+ ro_gui_window_set_scale(g, scale);
}
}
@@ -2498,7 +2575,7 @@ ro_gui_window_menu_select(wimp_w w,
/* help actions */
case HELP_OPEN_CONTENTS:
- error = nsurl_create("http://www.netsurf-browser.org/documentation/", &url);
+ error = nsurl_create("https://www.netsurf-browser.org/documentation/", &url);
if (error == NSERROR_OK) {
error = browser_window_create(BW_CREATE_HISTORY,
url,
@@ -2510,7 +2587,7 @@ ro_gui_window_menu_select(wimp_w w,
break;
case HELP_OPEN_GUIDE:
- error = nsurl_create("http://www.netsurf-browser.org/documentation/guide", &url);
+ error = nsurl_create("https://www.netsurf-browser.org/documentation/guide", &url);
if (error == NSERROR_OK) {
error = browser_window_create(BW_CREATE_HISTORY,
url,
@@ -2522,7 +2599,7 @@ ro_gui_window_menu_select(wimp_w w,
break;
case HELP_OPEN_INFORMATION:
- error = nsurl_create("http://www.netsurf-browser.org/documentation/info", &url);
+ error = nsurl_create("https://www.netsurf-browser.org/documentation/info", &url);
if (error == NSERROR_OK) {
error = browser_window_create(BW_CREATE_HISTORY,
url,
@@ -2585,7 +2662,7 @@ ro_gui_window_menu_select(wimp_w w,
/* cookies actions */
case COOKIES_SHOW:
- ro_gui_cookies_present();
+ ro_gui_cookies_present(NULL);
break;
case COOKIES_DELETE:
@@ -2671,7 +2748,7 @@ ro_gui_window_menu_select(wimp_w w,
error = browser_window_navigate(
bw,
current_menu_url,
- browser_window_get_url(bw),
+ browser_window_access_url(bw),
BW_NAVIGATE_DOWNLOAD,
NULL,
NULL,
@@ -2684,7 +2761,7 @@ ro_gui_window_menu_select(wimp_w w,
error = browser_window_create(
BW_CREATE_HISTORY | BW_CREATE_CLONE,
current_menu_url,
- browser_window_get_url(bw),
+ browser_window_access_url(bw),
bw,
NULL);
}
@@ -3221,7 +3298,6 @@ static struct gui_window *gui_window_create(struct browser_window *bw,
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 &&
@@ -3502,20 +3578,25 @@ static void gui_window_destroy(struct gui_window *g)
*/
static void gui_window_set_title(struct gui_window *g, const char *title)
{
+ float scale;
assert(g);
assert(title);
- if (g->scale != 1.0) {
- int scale_disp = g->scale * 100;
+ scale = browser_window_get_scale(g->bw);
+
+ if (scale != 1.0) {
+ int scale_disp = scale * 100;
- if (ABS((float)scale_disp - g->scale * 100) >= 0.05)
+ if (ABS((float)scale_disp - scale * 100) >= 0.05) {
snprintf(g->title, sizeof g->title, "%s (%.1f%%)",
- title, g->scale * 100);
- else
+ title, scale * 100);
+ } else {
snprintf(g->title, sizeof g->title, "%s (%i%%)",
title, scale_disp);
+ }
} else {
- strncpy(g->title, title, sizeof g->title);
+ strncpy(g->title, title, sizeof(g->title) - 1);
+ g->title[sizeof(g->title)-1] = 0;
}
ro_gui_set_window_title(g->window, g->title);
@@ -3547,10 +3628,11 @@ static bool gui_window_get_scroll(struct gui_window *g, int *sx, int *sy)
return false;
}
- if (g->toolbar)
+ 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);
+ }
+ *sx = state.xscroll / 2;
+ *sy = -(state.yscroll - toolbar_height) / 2;
return true;
}
@@ -3589,8 +3671,8 @@ gui_window_set_scroll(struct gui_window *g, const struct rect *rect)
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;
+ state.xscroll = rect->x0 * 2;
+ state.yscroll = (-rect->y0 * 2) + toolbar_height;
} else {
/* scroll area into view with padding */
int x0, y0, x1, y1;
@@ -3598,10 +3680,10 @@ gui_window_set_scroll(struct gui_window *g, const struct rect *rect)
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;
+ x0 = rect->x0 * 2 ;
+ y0 = rect->y0 * 2 ;
+ x1 = rect->x1 * 2 ;
+ y1 = rect->y1 * 2 ;
cx0 = state.xscroll;
cy0 = -state.yscroll + toolbar_height;
@@ -3669,21 +3751,15 @@ gui_window_set_scroll(struct gui_window *g, const struct rect *rect)
* \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
+ * \return NSERROR_OK and width and height updated
*/
static nserror
-gui_window_get_dimensions(struct gui_window *gw,
- int *width, int *height,
- bool scaled)
+gui_window_get_dimensions(struct gui_window *gw, int *width, int *height)
{
/* use the cached window sizes */
*width = gw->old_width / 2;
*height = gw->old_height / 2;
- if (scaled) {
- *width /= gw->scale;
- *height /= gw->scale;
- }
return NSERROR_OK;
}
@@ -3717,7 +3793,6 @@ static void gui_window_start_throbber(struct gui_window *g)
}
-
/**
* Update the interface to reflect page loading stopped.
*
@@ -3732,6 +3807,20 @@ static void gui_window_stop_throbber(struct gui_window *g)
g->active = false;
}
+
+/**
+ * Update the interface to reflect change in page info status
+ *
+ * \param gw window with start of load
+ */
+static void gui_window_page_info_change(struct gui_window *gw)
+{
+ if (gw->toolbar != NULL) {
+ ro_toolbar_page_info_change(gw->toolbar);
+ }
+}
+
+
/**
* set favicon
*/
@@ -3745,7 +3834,6 @@ gui_window_set_icon(struct gui_window *g, struct hlcache_handle *icon)
}
-
/**
* Remove the caret, if present.
*
@@ -3825,8 +3913,9 @@ static void ro_gui_window_scroll_end(wimp_dragged *drag, void *data)
ro_warn_user("WimpError", error->errmess);
}
- if (ro_gui_window_to_window_pos(g, drag->final.x0, drag->final.y0, &pos))
+ if (ro_gui_window_to_window_pos(g, drag->final.x0, drag->final.y0, &pos)) {
browser_window_mouse_track(g->bw, 0, pos.x, pos.y);
+ }
}
@@ -3905,6 +3994,7 @@ gui_window_drag_start(struct gui_window *g,
{
wimp_pointer pointer;
wimp_drag drag;
+ float scale = browser_window_get_scale(g->bw);
if (rect != NULL) {
/* We have a box to constrain the pointer to, for the drag
@@ -3921,13 +4011,13 @@ gui_window_drag_start(struct gui_window *g,
drag.type = wimp_DRAG_USER_POINT;
drag.bbox.x0 = pointer.pos.x +
- (int)(rect->x0 * 2 * g->scale);
+ (int)(rect->x0 * 2 * scale);
drag.bbox.y0 = pointer.pos.y +
- (int)(rect->y0 * 2 * g->scale);
+ (int)(rect->y0 * 2 * scale);
drag.bbox.x1 = pointer.pos.x +
- (int)(rect->x1 * 2 * g->scale);
+ (int)(rect->x1 * 2 * scale);
drag.bbox.y1 = pointer.pos.y +
- (int)(rect->y1 * 2 * g->scale);
+ (int)(rect->y1 * 2 * scale);
error = xwimp_drag_box(&drag);
if (error) {
@@ -3941,8 +4031,9 @@ gui_window_drag_start(struct gui_window *g,
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);
+ ro_mouse_drag_start(ro_gui_window_scroll_end,
+ ro_gui_window_mouse_at,
+ NULL, g);
break;
default:
@@ -4087,6 +4178,57 @@ ro_gui_window_import_text(struct gui_window *g, const char *filename)
/**
+ * process miscellaneous window events
+ *
+ * \param gw The window receiving the event.
+ * \param event The event code.
+ * \return NSERROR_OK when processed ok
+ */
+static nserror
+ro_gui_window_event(struct gui_window *gw, enum gui_window_event event)
+{
+ switch (event) {
+ case GW_EVENT_UPDATE_EXTENT:
+ gui_window_update_extent(gw);
+ break;
+
+ case GW_EVENT_REMOVE_CARET:
+ gui_window_remove_caret(gw);
+ break;
+
+ case GW_EVENT_SCROLL_START:
+ gui_window_scroll_start(gw);
+ break;
+
+ case GW_EVENT_NEW_CONTENT:
+ gui_window_new_content(gw);
+ break;
+
+ case GW_EVENT_START_THROBBER:
+ gui_window_start_throbber(gw);
+ break;
+
+ case GW_EVENT_STOP_THROBBER:
+ gui_window_stop_throbber(gw);
+ break;
+
+ case GW_EVENT_START_SELECTION:
+ /* from textselection */
+ gui_start_selection(gw);
+ break;
+
+ case GW_EVENT_PAGE_INFO_CHANGE:
+ gui_window_page_info_change(gw);
+ break;
+
+ default:
+ break;
+ }
+ return NSERROR_OK;
+}
+
+
+/**
* RISC OS browser window operation table
*/
static struct gui_window_table window_table = {
@@ -4096,7 +4238,7 @@ static struct gui_window_table window_table = {
.get_scroll = gui_window_get_scroll,
.set_scroll = gui_window_set_scroll,
.get_dimensions = gui_window_get_dimensions,
- .update_extent = gui_window_update_extent,
+ .event = ro_gui_window_event,
.set_title = gui_window_set_title,
.set_url = ro_gui_window_set_url,
@@ -4104,21 +4246,13 @@ static struct gui_window_table window_table = {
.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,
/* from save */
.drag_save_object = gui_drag_save_object,
.drag_save_selection =gui_drag_save_selection,
-
- /* from textselection */
- .start_selection = gui_start_selection,
};
struct gui_window_table *riscos_window_table = &window_table;
@@ -4268,10 +4402,10 @@ ro_gui_window_invalidate_area(struct gui_window *g, const struct rect *rect)
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;
+ x0 = floorf(rect->x0 * 2 );
+ y0 = -ceilf(rect->y1 * 2 );
+ x1 = ceilf(rect->x1 * 2 ) + 1;
+ y1 = -floorf(rect->y0 * 2 ) + 1;
use_buffer =
(g->option.buffer_everything || g->option.buffer_animations);
@@ -4339,7 +4473,6 @@ nserror ro_gui_window_set_url(struct gui_window *g, nsurl *url)
/* exported interface documented in riscos/window.h */
void ro_gui_window_set_scale(struct gui_window *g, float scale)
{
- g->scale = scale;
browser_window_set_scale(g->bw, scale, true);
}
@@ -4382,11 +4515,14 @@ void ro_gui_window_mouse_at(wimp_pointer *pointer, void *data)
os_coord pos;
struct gui_window *g = (struct gui_window *) data;
- 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,
+ 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);
+ pos.x,
+ pos.y);
+ }
}
@@ -4434,7 +4570,7 @@ ro_gui_window_iconise(struct gui_window *g, wimp_full_message_window_info *wi)
/* create the thumbnail sprite */
bitmap = riscos_bitmap_create(width, height,
- BITMAP_NEW | BITMAP_OPAQUE | BITMAP_CLEAR_MEMORY);
+ BITMAP_OPAQUE | BITMAP_CLEAR);
if (!bitmap) {
NSLOG(netsurf, INFO, "Thumbnail initialisation failed.");
return;
@@ -4559,22 +4695,15 @@ void ro_gui_window_redraw_all(void)
}
}
-
/* exported interface documented in riscos/window.h */
void ro_gui_window_update_boxes(void)
{
osbool more;
bool use_buffer;
wimp_draw update;
- struct rect clip;
os_error *error;
struct update_box *cur;
struct gui_window *g;
- struct redraw_context ctx = {
- .interactive = true,
- .background_images = true,
- .plot = &ro_plotters
- };
for (cur = pending_updates; cur != NULL; cur = cur->next) {
g = cur->g;
@@ -4600,22 +4729,8 @@ void ro_gui_window_update_boxes(void)
/* Set the current redraw gui_window to get options from */
ro_gui_current_redraw_gui = g;
- ro_plot_origin_x = update.box.x0 - update.xscroll;
- ro_plot_origin_y = update.box.y1 - update.yscroll;
-
while (more) {
- clip.x0 = (update.clip.x0 - ro_plot_origin_x) / 2;
- clip.y0 = (ro_plot_origin_y - update.clip.y1) / 2;
- clip.x1 = (update.clip.x1 - ro_plot_origin_x) / 2;
- clip.y1 = (ro_plot_origin_y - update.clip.y0) / 2;
-
- if (use_buffer)
- ro_gui_buffer_open(&update);
-
- browser_window_redraw(g->bw, 0, 0, &clip, &ctx);
-
- if (use_buffer)
- ro_gui_buffer_close();
+ ro_gui_window__redraw_rect(g, &update, use_buffer);
error = xwimp_get_rectangle(&update, &more);
/* RISC OS 3.7 returns an error here if enough buffer
@@ -4676,17 +4791,19 @@ void ro_gui_throb(void)
/* exported interface documented in riscos/window.h */
void ro_gui_window_default_options(struct gui_window *gui)
{
+ float cscale;
+
if (gui == NULL)
return;
- /* Save the basic options
- */
- nsoption_set_int(scale, gui->scale * 100);
+ cscale = browser_window_get_scale(gui->bw);
+
+ /* Save the basic options */
+ nsoption_set_int(scale, cscale * 100);
nsoption_set_bool(buffer_animations, gui->option.buffer_animations);
nsoption_set_bool(buffer_everything, gui->option.buffer_everything);
- /* Set up the toolbar
- */
+ /* Set up the toolbar */
if (gui->toolbar != NULL) {
nsoption_set_bool(toolbar_show_buttons,
ro_toolbar_get_display_buttons(gui->toolbar));
@@ -4695,9 +4812,10 @@ void ro_gui_window_default_options(struct gui_window *gui)
nsoption_set_bool(toolbar_show_throbber,
ro_toolbar_get_display_throbber(gui->toolbar));
}
- if (gui->status_bar != NULL)
+ if (gui->status_bar != NULL) {
nsoption_set_int(toolbar_status_size,
ro_gui_status_bar_get_width(gui->status_bar));
+ }
}
@@ -4749,33 +4867,8 @@ ro_gui_window_to_window_pos(struct gui_window *g, int x, int y, os_coord *pos)
ro_warn_user("WimpError", error->errmess);
return false;
}
- pos->x = (x - (state.visible.x0 - state.xscroll)) / 2 / g->scale;
- pos->y = ((state.visible.y1 - state.yscroll) - y) / 2 / g->scale;
- return true;
-}
-
-
-/* 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;
-
- assert(g);
-
- state.w = g->window;
- error = xwimp_get_window_state(&state);
- if (error) {
- NSLOG(netsurf, INFO, "xwimp_get_window_state: 0x%x:%s",
- error->errnum, error->errmess);
- ro_warn_user("WimpError", error->errmess);
- return false;
- }
- pos->x = (x * 2 * g->scale) + (state.visible.x0 - state.xscroll);
- pos->y = (state.visible.y1 - state.yscroll) - (y * 2 * g->scale);
+ pos->x = (x - (state.visible.x0 - state.xscroll)) / 2 ;
+ pos->y = ((state.visible.y1 - state.yscroll) - y) / 2 ;
return true;
}
diff --git a/frontends/riscos/window.h b/frontends/riscos/window.h
index 0a5bd43c2..c3325a7a4 100644
--- a/frontends/riscos/window.h
+++ b/frontends/riscos/window.h
@@ -192,17 +192,6 @@ bool ro_gui_window_to_window_pos(struct gui_window *g, int x, int y, os_coord *p
/**
- * 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.
diff --git a/frontends/windows/Makefile b/frontends/windows/Makefile
index bd34b465e..524f716fe 100644
--- a/frontends/windows/Makefile
+++ b/frontends/windows/Makefile
@@ -15,7 +15,7 @@ $(eval $(call pkg_config_find_and_add,libcares,Cares))
$(eval $(call pkg_config_find_and_add,zlib,ZLib))
# libraries for windows API
-LDFLAGS += -lgnurx -lgdi32 -lcomctl32 -lws2_32 -lmsimg32 -lshlwapi -mwindows
+LDFLAGS += -lgnurx -lgdi32 -lcomctl32 -lws2_32 -lmsimg32 -lshlwapi -lcrypt32 -mwindows
CFLAGS += -U__STRICT_ANSI__ -mwin32
# only windows versions after XP are supported
@@ -33,11 +33,15 @@ WSCFLAGS := -std=c99 -Dnswin32 -DCURL_STATICLIB -DCARES_STATICLIB -g
CFLAGS += $(WSCFLAGS)
LDFLAGS += $(WSCFLAGS)
+# The filter and target for split messages
+MESSAGES_FILTER=win
+MESSAGES_TARGET=$(FRONTEND_RESOURCES_DIR)
+
# ----------------------------------------------------------------------------
# built-in resource setup
# ----------------------------------------------------------------------------
-$(OBJROOT)/windows_resource.o: $(FRONTEND_RESOURCES_DIR)/resource.rc
+$(OBJROOT)/windows_resource.o: $(FRONTEND_RESOURCES_DIR)/resource.rc $(addsuffix /Messages,$(addprefix $(MESSAGES_TARGET)/,$(MESSAGES_LANGUAGES)))
$(VQ)echo " WINDRES: compiling windows resources"
${Q}$(WINDRES) $< -O coff -o $@
@@ -48,10 +52,10 @@ S_RESOURCES := windows_resource.o
# ----------------------------------------------------------------------------
# sources purely for the windows build
-S_FRONTEND := main.c window.c gui.c drawable.c plot.c findfile.c \
- font.c bitmap.c about.c prefs.c download.c filetype.c file.c \
+S_FRONTEND := main.c window.c gui.c clipboard.c drawable.c plot.c findfile.c \
+ font.c bitmap.c about.c prefs.c download.c fetch.c file.c \
local_history.c schedule.c windbg.c pointers.c \
- corewindow.c hotlist.c cookies.c global_history.c ssl_cert.c
+ corewindow.c hotlist.c cookies.c global_history.c
# This is the final source build list
# Note this is deliberately *not* expanded here as common and image
@@ -82,11 +86,11 @@ NSIS_VERBOSE := 0
endif
# installer messages generation
-$(OBJROOT)/messages-en: resources/FatMessages
- $(VQ)echo "MSGSPLIT: Language: en Filter: win"
- $(Q)$(SPLIT_MESSAGES) -l en -p win -f messages -o $@ $<
+$(OBJROOT)/messages-en: $(MESSAGES_TARGET)/en/Messages
+ $(VQ)echo " MSGCP: $< $@"
+ $(Q)$(INSTALL) -m 644 -T $< $@
-netsurf-installer.exe: $(EXETARGET) $(WIN_RES_INS_OBJ)
+netsurf-installer.exe: $(EXETARGET) $(POSTEXES) $(WIN_RES_INS_OBJ)
$(VQ)echo "MAKENSIS: $@"
$(Q)makensis -V$(NSIS_VERBOSE) -NOCD -DOBJROOT=$(OBJROOT) -DRESDIR=$(FRONTEND_RESOURCES_DIR) -DVERSIONMAJOR=$(VERSION_MAJ) -DVERSIONMINOR=$(VERSION_MIN) -DOUTFNAME=$@ $(FRONTEND_RESOURCES_DIR)/installer.nsi
diff --git a/frontends/windows/Makefile.defaults b/frontends/windows/Makefile.defaults
index 1d844f112..51e71accb 100644
--- a/frontends/windows/Makefile.defaults
+++ b/frontends/windows/Makefile.defaults
@@ -3,8 +3,8 @@
# ----------------------------------------------------------------------------
# Where to search for NetSurf's resources after looking in ~/.netsurf and
-# $NETSURFRES. It must have a trailing backslash
-NETSURF_WINDOWS_RESPATH :=
+# ${APPDATA}\NetSurf. It must have a trailing backslash
+NETSURF_WINDOWS_RESPATH := $${NETSURFRES}
# Enable NetSurf's use of librosprite for displaying RISC OS Sprites
# Valid options: YES, NO, AUTO
diff --git a/frontends/windows/Makefile.tools b/frontends/windows/Makefile.tools
new file mode 100644
index 000000000..24f0f7fbd
--- /dev/null
+++ b/frontends/windows/Makefile.tools
@@ -0,0 +1,19 @@
+# -*- mode: makefile-gmake -*-
+##
+## windows (win32) target tool setup
+##
+
+ifneq ($(HOST),windows)
+ # Set Mingw defaults
+ GCCSDK_INSTALL_ENV ?= /opt/netsurf/i686-w64-mingw32/env
+ GCCSDK_INSTALL_CROSSBIN ?= /opt/netsurf/i686-w64-mingw32/cross/bin
+
+ CC := $(wildcard $(GCCSDK_INSTALL_CROSSBIN)/*gcc)
+ WINDRES := $(wildcard $(GCCSDK_INSTALL_CROSSBIN)/*windres)
+
+ PKG_CONFIG := PKG_CONFIG_LIBDIR="$(GCCSDK_INSTALL_ENV)/lib/pkgconfig" pkg-config
+else
+ # Building on Windows
+ CC := gcc
+ PKG_CONFIG := pkg-config
+endif
diff --git a/frontends/windows/about.c b/frontends/windows/about.c
index 2cd855b55..325587d8a 100644
--- a/frontends/windows/about.c
+++ b/frontends/windows/about.c
@@ -139,9 +139,9 @@ nsws_about_event_callback(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
return FALSE;
}
-void nsws_about_dialog_init(HINSTANCE hinst, HWND parent)
+void nsw32_about_dialog_init(HINSTANCE hinst, HWND parent)
{
- int ret = DialogBox(hinst, MAKEINTRESOURCE(IDD_DLG_ABOUT), parent,
+ int ret = DialogBox(hinst, MAKEINTRESOURCE(IDD_ABOUT), parent,
nsws_about_event_callback);
if (ret == -1) {
win32_warning(messages_get("NoMemory"), 0);
diff --git a/frontends/windows/about.h b/frontends/windows/about.h
index e0315b507..807c7b900 100644
--- a/frontends/windows/about.h
+++ b/frontends/windows/about.h
@@ -16,9 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef _NETSURF_WINDOWS_ABOUT_H_
-#define _NETSURF_WINDOWS_ABOUT_H_
+#ifndef NETSURF_WINDOWS_ABOUT_H
+#define NETSURF_WINDOWS_ABOUT_H
-void nsws_about_dialog_init(HINSTANCE hinst, HWND parent);
+void nsw32_about_dialog_init(HINSTANCE hinst, HWND parent);
#endif
diff --git a/frontends/windows/bitmap.c b/frontends/windows/bitmap.c
index 1266adb61..a52f29ad9 100644
--- a/frontends/windows/bitmap.c
+++ b/frontends/windows/bitmap.c
@@ -41,19 +41,19 @@
* Create a bitmap.
*
* \param width width of image in pixels
- * \param height width of image in pixels
- * \param state a flag word indicating the initial state
+ * \param height height of image in pixels
+ * \param state flags flags for bitmap creation
* \return an opaque struct bitmap, or NULL on memory exhaustion
*/
-void *win32_bitmap_create(int width, int height, unsigned int state)
+static void *win32_bitmap_create(int width, int height, enum gui_bitmap_flags flags)
{
struct bitmap *bitmap;
BITMAPV5HEADER *pbmi;
HBITMAP windib;
uint8_t *pixdata;
- NSLOG(netsurf, INFO, "width %d, height %d, state %u", width, height,
- state);
+ NSLOG(netsurf, INFO, "width %d, height %d, flags %u", width, height,
+ (unsigned)flags);
pbmi = calloc(1, sizeof(BITMAPV5HEADER));
if (pbmi == NULL) {
@@ -91,7 +91,7 @@ void *win32_bitmap_create(int width, int height, unsigned int state)
bitmap->windib = windib;
bitmap->pbmi = pbmi;
bitmap->pixdata = pixdata;
- if ((state & BITMAP_OPAQUE) != 0) {
+ if ((flags & BITMAP_OPAQUE) != 0) {
bitmap->opaque = true;
} else {
bitmap->opaque = false;
@@ -164,20 +164,6 @@ void win32_bitmap_destroy(void *bitmap)
/**
- * Save a bitmap in the platform's native format.
- *
- * \param bitmap a bitmap, as returned by bitmap_create()
- * \param path pathname for file
- * \param flags flags controlling how the bitmap is saved.
- * \return true on success, false on error and error reported
- */
-static bool bitmap_save(void *bitmap, const char *path, unsigned flags)
-{
- return true;
-}
-
-
-/**
* The bitmap image has changed, so flush any persistant cache.
*
* \param bitmap a bitmap, as returned by bitmap_create()
@@ -207,35 +193,6 @@ static void bitmap_set_opaque(void *bitmap, bool opaque)
/**
- * Tests whether a bitmap has an opaque alpha channel
- *
- * \param bitmap a bitmap, as returned by bitmap_create()
- * \return whether the bitmap is opaque
- */
-static bool bitmap_test_opaque(void *bitmap)
-{
- int tst;
- struct bitmap *bm = bitmap;
-
- if (bitmap == NULL) {
- NSLOG(netsurf, INFO, "NULL bitmap!");
- return false;
- }
-
- tst = bm->width * bm->height;
-
- while (tst-- > 0) {
- if (bm->pixdata[(tst << 2) + 3] != 0xff) {
- NSLOG(netsurf, INFO, "bitmap %p has transparency", bm);
- return false;
- }
- }
- NSLOG(netsurf, INFO, "bitmap %p is opaque", bm);
- return true;
-}
-
-
-/**
* Gets whether a bitmap should be plotted opaque
*
* \param bitmap a bitmap, as returned by bitmap_create()
@@ -276,11 +233,6 @@ static int bitmap_get_height(void *bitmap)
return(bm->height);
}
-static size_t bitmap_get_bpp(void *bitmap)
-{
- return 4;
-}
-
struct bitmap *bitmap_scale(struct bitmap *prescale, int width, int height)
{
struct bitmap *ret = malloc(sizeof(struct bitmap));
@@ -326,7 +278,7 @@ bitmap_render(struct bitmap *bitmap, struct hlcache_handle *content)
.plot = &win_plotters
};
- width = min(content_get_width(content), 1024);
+ width = min(max(content_get_width(content), bitmap->width), 1024);
height = ((width * bitmap->height) + (bitmap->width / 2)) /
bitmap->width;
@@ -346,7 +298,7 @@ bitmap_render(struct bitmap *bitmap, struct hlcache_handle *content)
}
/* create a full size bitmap and plot into it */
- fsbitmap = win32_bitmap_create(width, height, BITMAP_NEW | BITMAP_CLEAR_MEMORY | BITMAP_OPAQUE);
+ fsbitmap = win32_bitmap_create(width, height, BITMAP_CLEAR | BITMAP_OPAQUE);
SelectObject(bufferdc, fsbitmap->windib);
@@ -375,13 +327,10 @@ static struct gui_bitmap_table bitmap_table = {
.destroy = win32_bitmap_destroy,
.set_opaque = bitmap_set_opaque,
.get_opaque = bitmap_get_opaque,
- .test_opaque = bitmap_test_opaque,
.get_buffer = bitmap_get_buffer,
.get_rowstride = bitmap_get_rowstride,
.get_width = bitmap_get_width,
.get_height = bitmap_get_height,
- .get_bpp = bitmap_get_bpp,
- .save = bitmap_save,
.modified = bitmap_modified,
.render = bitmap_render,
};
diff --git a/frontends/windows/bitmap.h b/frontends/windows/bitmap.h
index c723159e1..a370dd619 100644
--- a/frontends/windows/bitmap.h
+++ b/frontends/windows/bitmap.h
@@ -20,7 +20,7 @@
#ifndef _NETSURF_WINDOWS_BITMAP_H_
#define _NETSURF_WINDOWS_BITMAP_H_
-struct gui_bitmap_table *win32_bitmap_table;
+extern struct gui_bitmap_table *win32_bitmap_table;
struct bitmap {
HBITMAP windib;
@@ -33,8 +33,6 @@ struct bitmap {
struct bitmap *bitmap_scale(struct bitmap *prescale, int width, int height);
-void *win32_bitmap_create(int width, int height, unsigned int state);
-
void win32_bitmap_destroy(void *bitmap);
#endif
diff --git a/frontends/windows/clipboard.c b/frontends/windows/clipboard.c
new file mode 100644
index 000000000..bc52a4594
--- /dev/null
+++ b/frontends/windows/clipboard.c
@@ -0,0 +1,131 @@
+/*
+ * Copyright 2019 Vincent Sanders <vince@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
+ * win32 clipboard implementation.
+ */
+
+#include <windows.h>
+
+#include "utils/log.h"
+#include "netsurf/clipboard.h"
+
+#include "windows/clipboard.h"
+
+/**
+ * Core asks front end for clipboard contents.
+ *
+ * \param buffer UTF-8 text, allocated by front end, ownership yeilded to core
+ * \param length Byte length of UTF-8 text in buffer
+ */
+static void gui_get_clipboard(char **buffer, size_t *length)
+{
+ HANDLE clipboard_handle;
+ wchar_t *content;
+
+ if (OpenClipboard(NULL)) {
+ clipboard_handle = GetClipboardData(CF_UNICODETEXT);
+ if (clipboard_handle != NULL) {
+ content = GlobalLock(clipboard_handle);
+ if (content != NULL) {
+ int required_len;
+ size_t content_len;
+
+ content_len = wcslen(content);
+
+ /* compute length */
+ required_len = WideCharToMultiByte(
+ CP_UTF8,
+ WC_NO_BEST_FIT_CHARS,
+ content,
+ content_len,
+ NULL,
+ 0,
+ NULL,
+ NULL);
+ /* allocate buffer and do conversion */
+ *buffer = malloc(required_len);
+ *length = WideCharToMultiByte(
+ CP_UTF8,
+ WC_NO_BEST_FIT_CHARS,
+ content,
+ content_len,
+ *buffer,
+ required_len,
+ NULL,
+ NULL);
+
+ GlobalUnlock(clipboard_handle);
+ }
+ }
+ CloseClipboard();
+ }
+}
+
+
+/**
+ * Core tells front end to put given text in clipboard
+ *
+ * \param buffer UTF-8 text, owned by core
+ * \param length Byte length of UTF-8 text in buffer
+ * \param styles Array of styles given to text runs, owned by core, or NULL
+ * \param n_styles Number of text run styles in array
+ */
+static void
+gui_set_clipboard(const char *buffer,
+ size_t length,
+ nsclipboard_styles styles[],
+ int n_styles)
+{
+ HGLOBAL hglbCopy;
+ wchar_t *content; /* clipboard content */
+ int content_len; /* characters in content */
+
+ if (OpenClipboard(NULL)) {
+ EmptyClipboard();
+ content_len = MultiByteToWideChar(CP_UTF8,
+ MB_PRECOMPOSED,
+ buffer, length,
+ NULL, 0);
+
+ hglbCopy = GlobalAlloc(GMEM_MOVEABLE,
+ ((content_len + 1) * sizeof(wchar_t)));
+ if (hglbCopy != NULL) {
+ content = GlobalLock(hglbCopy);
+ MultiByteToWideChar(CP_UTF8,
+ MB_PRECOMPOSED,
+ buffer, length,
+ content, content_len);
+ content[content_len] = 0; /* null terminate */
+
+ GlobalUnlock(hglbCopy);
+ SetClipboardData(CF_UNICODETEXT, hglbCopy);
+ }
+ CloseClipboard();
+ }
+}
+
+
+
+static struct gui_clipboard_table clipboard_table = {
+ .get = gui_get_clipboard,
+ .set = gui_set_clipboard,
+};
+
+struct gui_clipboard_table *win32_clipboard_table = &clipboard_table;
diff --git a/frontends/atari/verify_ssl.h b/frontends/windows/clipboard.h
index b69bc9cfb..92f096b8e 100644
--- a/frontends/atari/verify_ssl.h
+++ b/frontends/windows/clipboard.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2010 Ole Loots <ole@monochrom.net>
+ * Copyright 2019 Vincent Sanders <vince@netsurf-browser.org>
*
* This file is part of NetSurf, http://www.netsurf-browser.org/
*
@@ -16,9 +16,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef NS_VERIFY_SSL_H_INCLUDED
-#define NS_VERIFY_SSL_H_INCLUDED
+#ifndef NETSURF_WINDOWS_CLIPBOARD_H
+#define NETSURF_WINDOWS_CLIPBOARD_H
-bool verify_ssl_form_do( const char * url, const struct ssl_cert_info * cert_infos_n , unsigned long num_certs );
+/**
+ * The clipboard operation function table for win32
+ */
+extern struct gui_clipboard_table *win32_clipboard_table;
#endif
diff --git a/frontends/windows/cookies.c b/frontends/windows/cookies.c
index b3c56da8c..ee754bc3f 100644
--- a/frontends/windows/cookies.c
+++ b/frontends/windows/cookies.c
@@ -34,6 +34,7 @@
#include "windows/plot.h"
#include "windows/corewindow.h"
#include "windows/cookies.h"
+#include "windows/gui.h"
struct nsw32_cookie_window {
@@ -170,13 +171,16 @@ static nserror nsw32_cookie_init(HINSTANCE hInstance)
/* exported interface documented in windows/cookie.h */
-nserror nsw32_cookies_present(HINSTANCE hInstance)
+nserror nsw32_cookies_present(const char *search_term)
{
nserror res;
- res = nsw32_cookie_init(hInstance);
+ res = nsw32_cookie_init(hinst);
if (res == NSERROR_OK) {
ShowWindow(cookie_window->core.hWnd, SW_SHOWNORMAL);
+ if (search_term != NULL) {
+ res = cookie_manager_set_search_string(search_term);
+ }
}
return res;
}
diff --git a/frontends/windows/cookies.h b/frontends/windows/cookies.h
index 8500c7821..dd7ae4279 100644
--- a/frontends/windows/cookies.h
+++ b/frontends/windows/cookies.h
@@ -35,7 +35,7 @@
*
* \return NSERROR_OK on success else appropriate error code on faliure.
*/
-nserror nsw32_cookies_present(HINSTANCE hinstance);
+nserror nsw32_cookies_present(const char *search_term);
/**
* Free any resources allocated for the cookie window.
diff --git a/frontends/windows/corewindow.c b/frontends/windows/corewindow.c
index 7d88ce7c4..7d6dc69b0 100644
--- a/frontends/windows/corewindow.c
+++ b/frontends/windows/corewindow.c
@@ -443,7 +443,7 @@ nsw32_cw_invalidate_area(struct core_window *cw, const struct rect *rect)
/**
* Callback from the core to update the content area size
*/
-static void
+static nserror
nsw32_cw_update_size(struct core_window *cw, int width, int height)
{
struct nsw32_corewindow *nsw32_cw = (struct nsw32_corewindow *)cw;
@@ -453,13 +453,23 @@ nsw32_cw_update_size(struct core_window *cw, int width, int height)
NSLOG(netsurf, INFO, "new content size w:%d h:%d", width, height);
update_scrollbars(nsw32_cw);
+ return NSERROR_OK;
}
-static void
-nsw32_cw_scroll_visible(struct core_window *cw, const struct rect *r)
+static nserror
+nsw32_cw_set_scroll(struct core_window *cw, int x, int y)
{
/** /todo call setscroll apropriately */
+ return NSERROR_OK;
+}
+
+
+static nserror
+nsw32_cw_get_scroll(const struct core_window *cw, int *x, int *y)
+{
+ /** /todo call getscroll apropriately */
+ return NSERROR_NOT_IMPLEMENTED;
}
@@ -470,8 +480,9 @@ nsw32_cw_scroll_visible(struct core_window *cw, const struct rect *r)
* \param[out] width to be set to viewport width in px
* \param[out] height to be set to viewport height in px
*/
-static void
-nsw32_cw_get_window_dimensions(struct core_window *cw, int *width, int *height)
+static nserror
+nsw32_cw_get_window_dimensions(const struct core_window *cw,
+ int *width, int *height)
{
struct nsw32_corewindow *nsw32_cw = (struct nsw32_corewindow *)cw;
@@ -479,21 +490,24 @@ nsw32_cw_get_window_dimensions(struct core_window *cw, int *width, int *height)
GetClientRect(nsw32_cw->hWnd, &rc);
*width = rc.right;
*height = rc.bottom;
+ return NSERROR_OK;
}
-static void
+static nserror
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_status = ds;
+ return NSERROR_OK;
}
struct core_window_callback_table nsw32_cw_cb_table = {
.invalidate = nsw32_cw_invalidate_area,
.update_size = nsw32_cw_update_size,
- .scroll_visible = nsw32_cw_scroll_visible,
+ .set_scroll = nsw32_cw_set_scroll,
+ .get_scroll = nsw32_cw_get_scroll,
.get_window_dimensions = nsw32_cw_get_window_dimensions,
.drag_status = nsw32_cw_drag_status
};
diff --git a/frontends/windows/download.c b/frontends/windows/download.c
index dfcd2b5a4..cfd2bbbb7 100644
--- a/frontends/windows/download.c
+++ b/frontends/windows/download.c
@@ -169,6 +169,7 @@ nsws_download_event_callback(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
case IDOK:
if (download1->downloaded != download1->size)
return TRUE;
+ fallthrough;
case IDCANCEL:
nsws_download_clear_data(download1);
@@ -185,7 +186,7 @@ nsws_download_event_callback(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
static bool nsws_download_window_up(struct gui_download_window *w)
{
w->hwnd = CreateDialog(hinst,
- MAKEINTRESOURCE(IDD_DLG_DOWNLOAD),
+ MAKEINTRESOURCE(IDD_DOWNLOAD),
gui_window_main_window(w->window),
nsws_download_event_callback);
if (w->hwnd == NULL) {
diff --git a/frontends/windows/drawable.c b/frontends/windows/drawable.c
index f491e0a2a..84b11ed78 100644
--- a/frontends/windows/drawable.c
+++ b/frontends/windows/drawable.c
@@ -41,7 +41,7 @@
#include "windows/local_history.h"
#include "windows/drawable.h"
-static const char windowclassname_drawable[] = "nswsdrawablewindow";
+static const wchar_t *windowclassname_drawable = L"nswsdrawablewindow";
/**
@@ -223,19 +223,71 @@ nsws_drawable_resize(struct gui_window *gw)
return 0;
}
+/**
+ * Handle unicode character messages.
+ */
+static LRESULT
+nsws_drawable_unichar(struct gui_window *gw, HWND hwnd, WPARAM wparam)
+{
+ uint32_t nskey;
+
+ if (wparam == UNICODE_NOCHAR) {
+ return 1;
+ }
+
+ nskey = wparam;
+ browser_window_key_press(gw->bw, nskey);
+ return 0;
+}
/**
- * Handle key press messages.
+ * Handle character messages.
+ *
+ * WM_CHAR is generated when WM_KEYDOWN message are passed to
+ * TranslateMessage; wParam is UTF-16. If the codepoint is 4
+ * bytes, there are 2 WM_CHAR message, one with the high
+ * surrogate and one with the low surrogate.
*/
static LRESULT
-nsws_drawable_key(struct gui_window *gw, HWND hwnd, WPARAM wparam)
+nsws_drawable_char(struct gui_window *gw, HWND hwnd, WPARAM wparam)
{
- if (GetFocus() != hwnd)
- return 0 ;
+ uint32_t nskey;
+
+ nskey = wparam;
+
+ const uint32_t utf16_hi_surrogate_start = 0xD800;
+ const uint32_t utf16_lo_surrogate_start = 0xDC00;
+ const uint32_t utf16_surrogate_end = 0xDFFF;
+ static uint32_t highSurrogate = 0;
+
+ if ((nskey >= utf16_hi_surrogate_start) &&
+ (nskey < utf16_lo_surrogate_start) ) {
+ highSurrogate = nskey;
+ } else {
+ if ((nskey >= utf16_lo_surrogate_start) &&
+ (nskey <= utf16_surrogate_end)) {
+ uint32_t lowSurrogate = nskey;
+ nskey = (highSurrogate - utf16_hi_surrogate_start) << 10;
+ nskey |= ( lowSurrogate - utf16_lo_surrogate_start );
+ nskey += 0x10000;
+ }
+ highSurrogate = 0;
+
+ browser_window_key_press(gw->bw, nskey);
+ }
+
+ return 0;
+}
+
+/**
+ * Handle keydown messages.
+ */
+static LRESULT
+nsws_drawable_keydown(struct gui_window *gw, HWND hwnd, WPARAM wparam)
+{
uint32_t i;
bool shift = ((GetKeyState(VK_SHIFT) & 0x8000) == 0x8000);
- bool capslock = ((GetKeyState(VK_CAPITAL) & 1) == 1);
switch(wparam) {
case VK_LEFT:
@@ -285,30 +337,18 @@ nsws_drawable_key(struct gui_window *gw, HWND hwnd, WPARAM wparam)
break;
case VK_NEXT:
- i = wparam;
- SendMessage(hwnd, WM_VSCROLL, MAKELONG(SB_PAGEDOWN, 0),
- 0);
- break;
+ SendMessage(hwnd, WM_VSCROLL, MAKELONG(SB_PAGEDOWN, 0), 0);
+ return 1;
case VK_PRIOR:
- i = wparam;
- SendMessage(hwnd, WM_VSCROLL, MAKELONG(SB_PAGEUP, 0),
- 0);
- break;
+ SendMessage(hwnd, WM_VSCROLL, MAKELONG(SB_PAGEUP, 0), 0);
+ return 1;
default:
- i = wparam;
- break;
+ return 1;
}
- if ((i >= 'A') &&
- (i <= 'Z') &&
- (((!capslock) && (!shift)) || ((capslock) && (shift)))) {
- i += 'a' - 'A';
- }
-
- if (gw != NULL)
- browser_window_key_press(gw->bw, i);
+ browser_window_key_press(gw->bw, i);
return 0;
}
@@ -338,10 +378,15 @@ nsws_drawable_paint(struct gui_window *gw, HWND hwnd)
clip.x1 = ps.rcPaint.right;
clip.y1 = ps.rcPaint.bottom;
+ /**
+ * \todo work out why the heck scroll needs scaling
+ */
+
browser_window_redraw(gw->bw,
- -gw->scrollx / gw->scale,
- -gw->scrolly / gw->scale,
- &clip, &ctx);
+ -gw->scrollx,
+ -gw->scrolly,
+ &clip,
+ &ctx);
}
EndPaint(hwnd, &ps);
@@ -385,19 +430,21 @@ nsws_drawable_mouseup(struct gui_window *gw,
if ((gw->mouse->state & click) != 0) {
NSLOG(netsurf, INFO,
- "mouse click bw %p, state 0x%x, x %f, y %f", gw->bw,
- gw->mouse->state, (x + gw->scrollx) / gw->scale,
- (y + gw->scrolly) / gw->scale);
+ "mouse click bw %p, state 0x%x, x %d, y %d",
+ gw->bw,
+ gw->mouse->state,
+ x + gw->scrollx,
+ y + gw->scrolly);
browser_window_mouse_click(gw->bw,
gw->mouse->state,
- (x + gw->scrollx) / gw->scale,
- (y + gw->scrolly) / gw->scale);
+ x + gw->scrollx,
+ y + gw->scrolly);
} else {
browser_window_mouse_track(gw->bw,
0,
- (x + gw->scrollx) / gw->scale,
- (y + gw->scrolly) / gw->scale);
+ x + gw->scrollx,
+ y + gw->scrolly);
}
gw->mouse->state = 0;
@@ -428,16 +475,19 @@ nsws_drawable_mousedown(struct gui_window *gw,
if ((GetKeyState(VK_MENU) & 0x8000) == 0x8000)
gw->mouse->state |= BROWSER_MOUSE_MOD_3;
- gw->mouse->pressed_x = (x + gw->scrollx) / gw->scale;
- gw->mouse->pressed_y = (y + gw->scrolly) / gw->scale;
+ gw->mouse->pressed_x = x + gw->scrollx;
+ gw->mouse->pressed_y = y + gw->scrolly;
- NSLOG(netsurf, INFO, "mouse click bw %p, state %x, x %f, y %f",
- gw->bw, gw->mouse->state, (x + gw->scrollx) / gw->scale,
- (y + gw->scrolly) / gw->scale);
+ NSLOG(netsurf, INFO, "mouse click bw %p, state %x, x %d, y %d",
+ gw->bw,
+ gw->mouse->state,
+ x + gw->scrollx,
+ y + gw->scrolly);
- browser_window_mouse_click(gw->bw, gw->mouse->state,
- (x + gw->scrollx) / gw->scale,
- (y + gw->scrolly) / gw->scale);
+ browser_window_mouse_click(gw->bw,
+ gw->mouse->state,
+ x + gw->scrollx,
+ y + gw->scrolly);
return 0;
}
@@ -456,9 +506,9 @@ nsws_drawable_mousemove(struct gui_window *gw, int x, int y)
if ((gw == NULL) || (gw->mouse == NULL) || (gw->bw == NULL))
return 0;
- /* scale co-ordinates */
- x = (x + gw->scrollx) / gw->scale;
- y = (y + gw->scrolly) / gw->scale;
+ /* add scroll offsets */
+ x = x + gw->scrollx;
+ y = y + gw->scrolly;
/* if mouse button held down and pointer moved more than
* minimum distance drag is happening */
@@ -544,7 +594,6 @@ nsws_window_drawable_event_callback(HWND hwnd,
BROWSER_MOUSE_PRESS_2);
SetFocus(hwnd);
return 0;
- break;
case WM_LBUTTONUP:
return nsws_drawable_mouseup(gw,
@@ -567,7 +616,16 @@ nsws_window_drawable_event_callback(HWND hwnd,
return nsws_drawable_paint(gw, hwnd);
case WM_KEYDOWN:
- return nsws_drawable_key(gw, hwnd, wparam);
+ if (nsws_drawable_keydown(gw, hwnd, wparam) == 0) {
+ return 0;
+ }
+ break;
+
+ case WM_CHAR:
+ return nsws_drawable_char(gw, hwnd, wparam);
+
+ case WM_UNICHAR:
+ return nsws_drawable_unichar(gw, hwnd, wparam);
case WM_SIZE:
return nsws_drawable_resize(gw);
@@ -581,6 +639,29 @@ nsws_window_drawable_event_callback(HWND hwnd,
case WM_MOUSEWHEEL:
return nsws_drawable_wheel(gw, hwnd, wparam);
+ case WM_PASTE:
+ browser_window_key_press(gw->bw, NS_KEY_PASTE);
+ return 0;
+
+ case WM_COPY:
+ browser_window_key_press(gw->bw, NS_KEY_COPY_SELECTION);
+ return 0;
+
+ case WM_CUT:
+ browser_window_key_press(gw->bw, NS_KEY_CUT_SELECTION);
+ return 0;
+
+ case WM_CLEAR:
+ /**
+ * \todo win32 clear operation deletes the contents of
+ * the selection but ns clear selection only
+ * removes the highlight.
+ */
+ browser_window_key_press(gw->bw, NS_KEY_CLEAR_SELECTION);
+ return 0;
+
+
+
}
return DefWindowProc(hwnd, msg, wparam, lparam);
}
@@ -595,14 +676,16 @@ nsws_window_create_drawable(HINSTANCE hinstance,
struct gui_window *gw)
{
HWND hwnd;
- hwnd = CreateWindow(windowclassname_drawable,
- NULL,
- WS_VISIBLE | WS_CHILD,
- 0, 0, 0, 0,
- hparent,
- NULL,
- hinstance,
- NULL);
+ hwnd = CreateWindowExW(0,
+ windowclassname_drawable,
+ NULL,
+ WS_VISIBLE | WS_CHILD,
+ 0, 0,
+ 0, 0,
+ hparent,
+ NULL,
+ hinstance,
+ NULL);
if (hwnd == NULL) {
win_perror("WindowCreateDrawable");
@@ -623,7 +706,7 @@ nsws_window_create_drawable(HINSTANCE hinstance,
nserror
nsws_create_drawable_class(HINSTANCE hinstance) {
nserror ret = NSERROR_OK;
- WNDCLASSEX w;
+ WNDCLASSEXW w;
/* drawable area */
w.cbSize = sizeof(WNDCLASSEX);
@@ -639,7 +722,7 @@ nsws_create_drawable_class(HINSTANCE hinstance) {
w.lpszClassName = windowclassname_drawable;
w.hIconSm = NULL;
- if (RegisterClassEx(&w) == 0) {
+ if (RegisterClassExW(&w) == 0) {
win_perror("DrawableClass");
ret = NSERROR_INIT_FAILED;
}
diff --git a/frontends/windows/filetype.c b/frontends/windows/fetch.c
index a5fd9e95e..287f20f6c 100644
--- a/frontends/windows/filetype.c
+++ b/frontends/windows/fetch.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2003 James Bursa <bursa@users.sourceforge.net>
+ * Copyright 2018 Vincent Sanders <vince@netsurf-browser.org>
*
* This file is part of NetSurf, http://www.netsurf-browser.org/
*
@@ -25,10 +25,13 @@
#include <string.h>
#include "utils/log.h"
+#include "utils/file.h"
+#include "utils/filepath.h"
#include "content/fetch.h"
#include "netsurf/fetch.h"
-#include "windows/filetype.h"
+#include "windows/fetch.h"
+#include "windows/gui.h"
/**
* determine the MIME type of a local file.
@@ -60,9 +63,71 @@ static const char *fetch_filetype(const char *unix_path)
return "text/html";
}
+/**
+ * Translate resource to full win32 url.
+ *
+ * Transforms a resource: path into a full URL. The returned URL
+ * is used as the target for a redirect. The caller takes ownership of
+ * the returned nsurl including unrefing it when finished with it.
+ *
+ * \param path The path of the resource to locate.
+ * \return A string containing the full URL of the target object or
+ * NULL if no suitable resource can be found.
+ */
+static nsurl *nsw32_get_resource_url(const char *path)
+{
+ char buf[PATH_MAX];
+ nsurl *url = NULL;
+
+ netsurf_path_to_nsurl(filepath_sfind(G_resource_pathv, buf, path), &url);
+
+ return url;
+}
+
+
+/* exported interface documented in windows/fetch.h */
+nserror
+nsw32_get_resource_data(const char *path,
+ const uint8_t **data_out,
+ size_t *data_len_out)
+{
+ HRSRC reshandle;
+ HGLOBAL datahandle;
+ uint8_t *data;
+ DWORD data_len;
+
+ reshandle = FindResource(NULL, path, "USER");
+ if (reshandle == NULL) {
+ return NSERROR_NOT_FOUND;
+ }
+
+ data_len = SizeofResource(NULL, reshandle);
+ if (data_len == 0) {
+ return NSERROR_NOT_FOUND;
+ }
+
+ datahandle = LoadResource(NULL, reshandle);
+ if (datahandle == NULL) {
+ return NSERROR_NOT_FOUND;
+ }
+ data = LockResource(datahandle);
+ if (data == NULL) {
+ return NSERROR_NOT_FOUND;
+ }
+
+ *data_out = data;
+ *data_len_out = data_len;
+
+ return NSERROR_OK;
+}
+
+
/** win32 fetch operation table */
static struct gui_fetch_table fetch_table = {
.filetype = fetch_filetype,
+
+ .get_resource_url = nsw32_get_resource_url,
+ .get_resource_data = nsw32_get_resource_data,
};
struct gui_fetch_table *win32_fetch_table = &fetch_table;
diff --git a/frontends/amiga/sslcert.h b/frontends/windows/fetch.h
index 392989f02..e85402ac3 100644
--- a/frontends/amiga/sslcert.h
+++ b/frontends/windows/fetch.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2017 Chris Young <chris@unsatisfactorysoftware.co.uk>
+ * Copyright 2014 Vincent Sanders <vince@netsurf-browser.org>
*
* This file is part of NetSurf, http://www.netsurf-browser.org/
*
@@ -16,23 +16,25 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef AMIGA_SSLCERT_H
-#define AMIGA_SSLCERT_H
-struct nsurl;
-struct ssl_cert_info;
+#ifndef _NETSURF_WINDOWS_FILETYPE_H_
+#define _NETSURF_WINDOWS_FILETYPE_H_
/**
- * Prompt the user to verify a certificate with issues.
+ * win32 API fetch operation table
+ */
+extern struct gui_fetch_table *win32_fetch_table;
+
+/**
+ * Translate resource to win32 resource data.
*
- * \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.
+ * Obtains the data for a resource directly
+ *
+ * \param path The path of the resource to locate.
+ * \param data Pointer to recive data into
+ * \param data_len Pointer to length of returned data
+ * \return NSERROR_OK and the data and length values updated
+ * else appropriate error code.
*/
-nserror ami_cert_verify(struct nsurl *url,
- const struct ssl_cert_info *certs, unsigned long num,
- nserror (*cb)(bool proceed, void *pw), void *cbpw);
-#endif
+nserror nsw32_get_resource_data(const char *path, const uint8_t **data_out, size_t *data_len_out);
+#endif
diff --git a/frontends/windows/file.h b/frontends/windows/file.h
index 5262dde2c..19dfba3b1 100644
--- a/frontends/windows/file.h
+++ b/frontends/windows/file.h
@@ -24,6 +24,6 @@
#ifndef _NETSURF_WINDOWS_FILE_H_
#define _NETSURF_WINDOWS_FILE_H_
-struct gui_file_table *win32_file_table;
+extern struct gui_file_table *win32_file_table;
#endif
diff --git a/frontends/windows/font.c b/frontends/windows/font.c
index 37ccf23fe..3e81a80a1 100644
--- a/frontends/windows/font.c
+++ b/frontends/windows/font.c
@@ -93,23 +93,31 @@ HFONT get_font(const plot_font_style_t *style)
{
char *face = NULL;
DWORD family;
+ int nHeight;
+ HDC hdc;
+ HFONT font;
+
switch(style->family) {
case PLOT_FONT_FAMILY_SERIF:
face = strdup(nsoption_charp(font_serif));
family = FF_ROMAN | DEFAULT_PITCH;
break;
+
case PLOT_FONT_FAMILY_MONOSPACE:
face = strdup(nsoption_charp(font_mono));
family = FF_MODERN | DEFAULT_PITCH;
break;
+
case PLOT_FONT_FAMILY_CURSIVE:
face = strdup(nsoption_charp(font_cursive));
family = FF_SCRIPT | DEFAULT_PITCH;
break;
+
case PLOT_FONT_FAMILY_FANTASY:
face = strdup(nsoption_charp(font_fantasy));
family = FF_DECORATIVE | DEFAULT_PITCH;
break;
+
case PLOT_FONT_FAMILY_SANS_SERIF:
default:
face = strdup(nsoption_charp(font_sans));
@@ -117,30 +125,30 @@ HFONT get_font(const plot_font_style_t *style)
break;
}
- int nHeight = -10;
+ nHeight = -10;
- HDC hdc = GetDC(font_hwnd);
- nHeight = -MulDiv(style->size, GetDeviceCaps(hdc, LOGPIXELSY), 72 * FONT_SIZE_SCALE);
+ hdc = GetDC(font_hwnd);
+ nHeight = -MulDiv(style->size, GetDeviceCaps(hdc, LOGPIXELSY), 72 * PLOT_STYLE_SCALE);
ReleaseDC(font_hwnd, hdc);
- HFONT font = CreateFont(
- nHeight, /* height */
- 0, /* width */
- 0, /* escapement*/
- 0, /* orientation */
- style->weight,
- (style->flags & FONTF_ITALIC) ? TRUE : FALSE,
- FALSE, /* underline */
- FALSE, /* strike */
- DEFAULT_CHARSET, /* for locale */
- OUT_DEFAULT_PRECIS, /* general 'best match' */
- CLIP_DEFAULT_PRECIS,
- DEFAULT_QUALITY,
- family,
- face /* name of font face */
- );
- if (face != NULL)
+ font = CreateFont(nHeight, /* height */
+ 0, /* width */
+ 0, /* escapement*/
+ 0, /* orientation */
+ style->weight,
+ (style->flags & FONTF_ITALIC) ? TRUE : FALSE,
+ FALSE, /* underline */
+ FALSE, /* strike */
+ DEFAULT_CHARSET, /* for locale */
+ OUT_DEFAULT_PRECIS, /* general 'best match' */
+ CLIP_DEFAULT_PRECIS,
+ DEFAULT_QUALITY,
+ family,
+ face); /* name of font face */
+
+ if (face != NULL) {
free(face);
+ }
if (font == NULL) {
if (style->family == PLOT_FONT_FAMILY_MONOSPACE) {
@@ -149,50 +157,67 @@ HFONT get_font(const plot_font_style_t *style)
font = (HFONT) GetStockObject(ANSI_VAR_FONT);
}
}
- if (font == NULL)
+
+ if (font == NULL) {
font = (HFONT) GetStockObject(SYSTEM_FONT);
+ }
+
return font;
}
+/* size of temporary wide character string for computing string width */
+#define WSTRLEN 4096
+
/**
* Measure the width of a string.
*
* \param[in] style plot style for this text
- * \param[in] string UTF-8 string to measure
- * \param[in] length length of string, in bytes
+ * \param[in] utf8str string encoded in UTF-8 to measure
+ * \param[in] utf8len length of string, in bytes
* \param[out] width updated to width of string[0..length)
* \return NSERROR_OK on success otherwise appropriate error code
*/
static nserror
win32_font_width(const plot_font_style_t *style,
- const char *string,
- size_t length,
+ const char *utf8str,
+ size_t utf8len,
int *width)
{
+ nserror ret = NSERROR_OK;
HDC hdc;
HFONT font;
HFONT fontbak;
- SIZE s;
- nserror ret = NSERROR_OK;
+ SIZE sizl; /* size in logical units */
+ BOOL wres;
+ int wclen; /* wide char length */
+ static WCHAR wstr[WSTRLEN]; /* temporary wide char string */
- if (length == 0) {
+ if (utf8len == 0) {
*width = 0;
- } else {
- hdc = GetDC(NULL);
- font = get_font(style);
- fontbak = SelectObject(hdc, font);
+ return ret;
+ }
- /* may well need to convert utf-8 to lpctstr */
- if (GetTextExtentPoint32A(hdc, string, length, &s) != 0) {
- *width = s.cx;
+ hdc = GetDC(NULL);
+ font = get_font(style);
+ fontbak = SelectObject(hdc, font);
+
+ wclen = MultiByteToWideChar(CP_UTF8, 0, utf8str, utf8len, wstr, WSTRLEN);
+ if (wclen != 0) {
+ wres = GetTextExtentPoint32W(hdc, wstr, wclen, &sizl);
+ if (wres == FALSE) {
+ ret = NSERROR_INVALID;
} else {
- ret = NSERROR_UNKNOWN;
+ *width = sizl.cx;
}
- font = SelectObject(hdc, fontbak);
- DeleteObject(font);
- ReleaseDC(NULL, hdc);
+ } else {
+ ret = NSERROR_NOSPACE;
}
+
+ font = SelectObject(hdc, fontbak);
+ DeleteObject(font);
+ ReleaseDC(NULL, hdc);
+
return ret;
}
@@ -200,19 +225,19 @@ win32_font_width(const plot_font_style_t *style,
/**
* Find the position in a string where an x coordinate falls.
*
- * \param style css_style for this text, with style->font_size.size ==
+ * \param style css_style for this text, with style->font_size.size ==
* CSS_FONT_SIZE_LENGTH
- * \param string UTF-8 string to measure
- * \param length length of string
- * \param x x coordinate to search for
- * \param char_offset updated to offset in string of actual_x, [0..length]
- * \param actual_x updated to x coordinate of character closest to x
+ * \param utf8str string to measure encoded in UTF-8
+ * \param utf8len length of string
+ * \param x coordinate to search for
+ * \param char_offset updated to offset in string of actual_x, [0..length]
+ * \param actual_x updated to x coordinate of character closest to x
* \return NSERROR_OK on success otherwise appropriate error code
*/
static nserror
win32_font_position(const plot_font_style_t *style,
- const char *string,
- size_t length,
+ const char *utf8str,
+ size_t utf8len,
int x,
size_t *char_offset,
int *actual_x)
@@ -224,26 +249,29 @@ win32_font_position(const plot_font_style_t *style,
int offset;
nserror ret = NSERROR_OK;
- if ((length == 0) || (x < 1)) {
+ /* deal with zero length input or invalid search co-ordiate */
+ if ((utf8len == 0) || (x < 1)) {
*char_offset = 0;
*actual_x = 0;
+ return ret;
+ }
+
+ hdc = GetDC(NULL);
+ font = get_font(style);
+ fontbak = SelectObject(hdc, font);
+
+ if ((GetTextExtentExPointA(hdc, utf8str, utf8len, x, &offset, NULL, &s) != 0) &&
+ (GetTextExtentPoint32A(hdc, utf8str, offset, &s) != 0)) {
+ *char_offset = (size_t)offset;
+ *actual_x = s.cx;
} else {
- hdc = GetDC(NULL);
- font = get_font(style);
- fontbak = SelectObject(hdc, font);
-
- if ((GetTextExtentExPointA(hdc, string, length, x, &offset, NULL,&s) != 0) &&
- (GetTextExtentPoint32A(hdc, string, offset, &s) != 0)) {
- *char_offset = (size_t)offset;
- *actual_x = s.cx;
- } else {
- ret = NSERROR_UNKNOWN;
- }
- font = SelectObject(hdc, fontbak);
- DeleteObject(font);
- ReleaseDC(NULL, hdc);
+ ret = NSERROR_UNKNOWN;
}
+ font = SelectObject(hdc, fontbak);
+ DeleteObject(font);
+ ReleaseDC(NULL, hdc);
+
return ret;
}
@@ -256,7 +284,7 @@ win32_font_position(const plot_font_style_t *style,
* \param string UTF-8 string to measure
* \param length length of string
* \param x width available
- * \param char_offset updated to offset in string of actual_x, [0..length]
+ * \param[out] offset updated to offset in string of actual_x, [0..length]
* \param actual_x updated to x coordinate of character closest to x
* \return NSERROR_OK on success otherwise appropriate error code
*
@@ -269,52 +297,48 @@ win32_font_split(const plot_font_style_t *style,
const char *string,
size_t length,
int x,
- size_t *char_offset,
+ size_t *offset,
int *actual_x)
{
+ nserror res;
int c_off;
- nserror ret = NSERROR_UNKNOWN;
-
- if (win32_font_position(style,
- string,
- length,
- x,
- char_offset,
- actual_x) == NSERROR_OK) {
- c_off = *char_offset;
- if (*char_offset == length) {
- ret = NSERROR_OK;
- } else {
- bool success;
- while ((string[*char_offset] != ' ') &&
- (*char_offset > 0)) {
- (*char_offset)--;
- }
-
- if (*char_offset == 0) {
- *char_offset = c_off;
- while ((*char_offset < length) &&
- (string[*char_offset] != ' ')) {
- (*char_offset)++;
- }
- }
-
- success = win32_font_width(style,
- string,
- *char_offset,
- actual_x);
- if (success) {
- ret = NSERROR_OK;
- }
+
+ /* get the offset into teh string on the proposed position */
+ res = win32_font_position(style, string, length, x, offset, actual_x);
+ if (res != NSERROR_OK) {
+ return res;
+ }
+
+ /* return the whole string fits in the proposed length */
+ if (*offset == length) {
+ return NSERROR_OK;
+ }
+
+ c_off = *offset;
+
+ /* walk backwards through string looking for space to break on */
+ while ((string[*offset] != ' ') &&
+ (*offset > 0)) {
+ (*offset)--;
+ }
+
+ /* walk forwards through string looking for space if back failed */
+ if (*offset == 0) {
+ *offset = c_off;
+ while ((*offset < length) &&
+ (string[*offset] != ' ')) {
+ (*offset)++;
}
}
+ /* find the actual string width of the break */
+ res = win32_font_width(style, string, *offset, actual_x);
NSLOG(netsurf, DEEPDEBUG,
"ret %d Split %u chars at %ipx: Split at char %i (%ipx) - %.*s",
- ret, length, x, *char_offset, *actual_x, *char_offset, string);
+ res, length, x, *offset, *actual_x, *offset, string);
- return ret;
+ return res;
}
diff --git a/frontends/windows/font.h b/frontends/windows/font.h
index ec2c262ff..8219e4c76 100644
--- a/frontends/windows/font.h
+++ b/frontends/windows/font.h
@@ -35,8 +35,8 @@ struct font_desc {
const char *encoding;
};
-struct gui_layout_table *win32_layout_table;
-struct gui_utf8_table *win32_utf8_table;
+extern struct gui_layout_table *win32_layout_table;
+extern struct gui_utf8_table *win32_utf8_table;
/**
* convert from utf-8 to win32 font encoding.
diff --git a/frontends/windows/gui.c b/frontends/windows/gui.c
index 890bfae42..9a2c13b23 100644
--- a/frontends/windows/gui.c
+++ b/frontends/windows/gui.c
@@ -36,22 +36,90 @@
#include "utils/file.h"
#include "utils/messages.h"
#include "netsurf/browser_window.h"
-#include "netsurf/clipboard.h"
#include "windows/schedule.h"
#include "windows/window.h"
-#include "windows/filetype.h"
#include "windows/gui.h"
-/**
- * win32 application instance handle.
- *
- * This handle is set in the main windows entry point.
- */
+/* exported global defined in windows/gui.h */
HINSTANCE hinst;
+/* exported global defined in windows/gui.h */
+char **G_resource_pathv;
+
+/* exported global defined in windows/gui.h */
+char *G_config_path;
+
static bool win32_quit = false;
+struct dialog_list_entry {
+ struct dialog_list_entry *next;
+ HWND hwnd;
+};
+
+static struct dialog_list_entry *dlglist = NULL;
+
+/* exported interface documented in gui.h */
+nserror nsw32_add_dialog(HWND hwndDlg)
+{
+ struct dialog_list_entry *nentry;
+ nentry = malloc(sizeof(struct dialog_list_entry));
+ if (nentry == NULL) {
+ return NSERROR_NOMEM;
+ }
+
+ nentry->hwnd = hwndDlg;
+ nentry->next = dlglist;
+ dlglist = nentry;
+
+ return NSERROR_OK;
+}
+
+/* exported interface documented in gui.h */
+nserror nsw32_del_dialog(HWND hwndDlg)
+{
+ struct dialog_list_entry **prev;
+ struct dialog_list_entry *cur;
+
+ prev = &dlglist;
+ cur = *prev;
+
+ while (cur != NULL) {
+ if (cur->hwnd == hwndDlg) {
+ /* found match */
+ *prev = cur->next;
+ NSLOG(netsurf, DEBUG,
+ "removed hwnd %p entry %p", cur->hwnd, cur);
+ free(cur);
+ return NSERROR_OK;
+ }
+ prev = &cur->next;
+ cur = *prev;
+ }
+ NSLOG(netsurf, INFO, "did not find hwnd %p", hwndDlg);
+
+ return NSERROR_NOT_FOUND;
+}
+
+/**
+ * walks dialog list and attempts to process any messages for them
+ */
+static nserror handle_dialog_message(LPMSG lpMsg)
+{
+ struct dialog_list_entry *cur;
+ cur = dlglist;
+ while (cur != NULL) {
+ if (IsDialogMessage(cur->hwnd, lpMsg)) {
+ NSLOG(netsurf, DEBUG,
+ "dispatched dialog hwnd %p", cur->hwnd);
+ return NSERROR_OK;
+ }
+ cur = cur->next;
+ }
+
+ return NSERROR_NOT_FOUND;
+}
+
/* exported interface documented in gui.h */
void win32_set_quit(bool q)
{
@@ -92,7 +160,8 @@ void win32_run(void)
}
}
- if (bRet > 0) {
+ if ((bRet > 0) &&
+ (handle_dialog_message(&Msg) != NSERROR_OK)) {
TranslateMessage(&Msg);
DispatchMessage(&Msg);
}
@@ -113,65 +182,17 @@ nserror win32_warning(const char *warning, const char *detail)
}
-/**
- * Core asks front end for clipboard contents.
- *
- * \param buffer UTF-8 text, allocated by front end, ownership yeilded to core
- * \param length Byte length of UTF-8 text in buffer
- */
-static void gui_get_clipboard(char **buffer, size_t *length)
+/* exported function documented in windows/gui.h */
+nserror
+win32_report_nserror(nserror error, const char *detail)
{
- /* TODO: Implement this */
- HANDLE clipboard_handle;
- char *content;
-
- clipboard_handle = GetClipboardData(CF_TEXT);
- if (clipboard_handle != NULL) {
- content = GlobalLock(clipboard_handle);
- NSLOG(netsurf, INFO, "pasting %s", content);
- GlobalUnlock(clipboard_handle);
- }
-}
-
+ size_t len = 1 +
+ strlen(messages_get_errorcode(error)) +
+ ((detail != 0) ? strlen(detail) : 0);
+ char message[len];
+ snprintf(message, len, messages_get_errorcode(error), detail);
+ MessageBox(NULL, message, "Warning", MB_ICONWARNING);
-/**
- * Core tells front end to put given text in clipboard
- *
- * \param buffer UTF-8 text, owned by core
- * \param length Byte length of UTF-8 text in buffer
- * \param styles Array of styles given to text runs, owned by core, or NULL
- * \param n_styles Number of text run styles in array
- */
-static void gui_set_clipboard(const char *buffer, size_t length,
- nsclipboard_styles styles[], int n_styles)
-{
- /* TODO: Implement this */
- HANDLE hnew;
- char *new, *original;
- HANDLE h = GetClipboardData(CF_TEXT);
- if (h == NULL)
- original = (char *)"";
- else
- original = GlobalLock(h);
-
- size_t len = strlen(original) + 1;
- hnew = GlobalAlloc(GHND, length + len);
- new = (char *)GlobalLock(hnew);
- snprintf(new, length + len, "%s%s", original, buffer);
-
- if (h != NULL) {
- GlobalUnlock(h);
- EmptyClipboard();
- }
- GlobalUnlock(hnew);
- SetClipboardData(CF_TEXT, hnew);
+ return NSERROR_OK;
}
-
-
-static struct gui_clipboard_table clipboard_table = {
- .get = gui_get_clipboard,
- .set = gui_set_clipboard,
-};
-
-struct gui_clipboard_table *win32_clipboard_table = &clipboard_table;
diff --git a/frontends/windows/gui.h b/frontends/windows/gui.h
index efbf02924..957280ae4 100644
--- a/frontends/windows/gui.h
+++ b/frontends/windows/gui.h
@@ -17,16 +17,27 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef _NETSURF_WINDOWS_GUI_H_
-#define _NETSURF_WINDOWS_GUI_H_
+#ifndef NETSURF_WINDOWS_GUI_H
+#define NETSURF_WINDOWS_GUI_H
struct gui_window;
-struct gui_clipboard_table *win32_clipboard_table;
+/**
+ * win32 application instance handle.
+ *
+ * This handle is set in the main windows entry point.
+ */
extern HINSTANCE hinst;
-/** Directory where all configuration files are held. */
-extern char *nsw32_config_home;
+/**
+ * path to where all user config files are held.
+ */
+extern char *G_config_path;
+
+/**
+ * resource search path vector.
+ */
+extern char **G_resource_pathv;
/* bounding box */
typedef struct bbox_s {
@@ -56,4 +67,25 @@ void win32_set_quit(bool q);
*/
nserror win32_warning(const char *warning, const char *detail);
+/**
+ * Warn the user of an unexpected nserror.
+ *
+ * \param[in] error The nserror to report
+ * \param[in] detail Additional text to be displayed or NULL.
+ * \return NSERROR_OK on success or error code if there was a
+ * faliure displaying the message to the user.
+ */
+nserror win32_report_nserror(nserror error, const char *detail);
+
+/**
+ * add a modeless dialog to the special handling list
+ */
+nserror nsw32_add_dialog(HWND hwndDlg);
+
+/**
+ * remove a modeless dialog from the special handling list
+ */
+nserror nsw32_del_dialog(HWND hwndDlg);
+
+
#endif
diff --git a/frontends/windows/local_history.c b/frontends/windows/local_history.c
index 722d365e7..823901b69 100644
--- a/frontends/windows/local_history.c
+++ b/frontends/windows/local_history.c
@@ -215,6 +215,7 @@ nsw32_local_history_present(HWND hWndParent, struct browser_window *bw)
width,
height,
SWP_SHOWWINDOW);
+ local_history_scroll_to_cursor(local_history_window->session);
}
return res;
}
diff --git a/frontends/windows/main.c b/frontends/windows/main.c
index a3a7c2b39..c051f446c 100644
--- a/frontends/windows/main.c
+++ b/frontends/windows/main.c
@@ -34,6 +34,7 @@
#include "utils/nsoption.h"
#include "netsurf/url_db.h"
#include "netsurf/cookie_db.h"
+#include "netsurf/browser.h"
#include "netsurf/browser_window.h"
#include "netsurf/fetch.h"
#include "netsurf/misc.h"
@@ -42,22 +43,40 @@
#include "windows/findfile.h"
#include "windows/file.h"
+#include "windows/cookies.h"
#include "windows/drawable.h"
#include "windows/corewindow.h"
-#include "windows/ssl_cert.h"
#include "windows/download.h"
#include "windows/local_history.h"
#include "windows/window.h"
#include "windows/schedule.h"
#include "windows/font.h"
-#include "windows/filetype.h"
+#include "windows/fetch.h"
#include "windows/pointers.h"
#include "windows/bitmap.h"
+#include "windows/clipboard.h"
#include "windows/gui.h"
-static char **respaths; /** resource search path vector. */
-char *nsw32_config_home; /* exported global defined in windows/gui.h */
+/**
+ * Obtain the DPI of the display.
+ *
+ * \return The DPI of the device the window is displayed on.
+ */
+static int get_screen_dpi(void)
+{
+ HDC screendc = GetDC(0);
+ int dpi = GetDeviceCaps(screendc, LOGPIXELSY);
+ ReleaseDC(0, screendc);
+
+ if (dpi <= 10) {
+ dpi = 96; /* 96DPI is the default */
+ }
+
+ NSLOG(netsurf, INFO, "FIX DPI %d", dpi);
+
+ return dpi;
+}
/**
* Get the path to the config directory.
@@ -118,15 +137,6 @@ static void die(const char *error)
}
-static nsurl *gui_get_resource_url(const char *path)
-{
- char buf[PATH_MAX];
- nsurl *url = NULL;
-
- netsurf_path_to_nsurl(filepath_sfind(respaths, buf, path), &url);
-
- return url;
-}
/**
* Ensures output logging stream is available
@@ -134,7 +144,7 @@ static nsurl *gui_get_resource_url(const char *path)
static bool nslog_ensure(FILE *fptr)
{
/* mwindows compile flag normally invalidates standard io unless
- * already redirected
+ * already redirected
*/
if (_get_osfhandle(fileno(fptr)) == -1) {
AllocConsole();
@@ -180,6 +190,11 @@ static nserror set_defaults(struct nsoption_s *defaults)
&ptr);
if (res_len > 0) {
nsoption_setnull_charp(ca_bundle, strdup(buf));
+ } else {
+ ptr = filepath_sfind(G_resource_pathv, buf, "ca-bundle.crt");
+ if (ptr != NULL) {
+ nsoption_setnull_charp(ca_bundle, strdup(buf));
+ }
}
@@ -205,34 +220,34 @@ static nserror set_defaults(struct nsoption_s *defaults)
}
free(buf);
-
+
/* ensure homepage option has a default */
nsoption_setnull_charp(homepage_url, strdup(NETSURF_HOMEPAGE));
/* cookie file default */
fname = NULL;
- netsurf_mkpath(&fname, NULL, 2, nsw32_config_home, "Cookies");
+ netsurf_mkpath(&fname, NULL, 2, G_config_path, "Cookies");
if (fname != NULL) {
nsoption_setnull_charp(cookie_file, fname);
}
/* cookie jar default */
fname = NULL;
- netsurf_mkpath(&fname, NULL, 2, nsw32_config_home, "Cookies");
+ netsurf_mkpath(&fname, NULL, 2, G_config_path, "Cookies");
if (fname != NULL) {
nsoption_setnull_charp(cookie_jar, fname);
}
/* url database default */
fname = NULL;
- netsurf_mkpath(&fname, NULL, 2, nsw32_config_home, "URLs");
+ netsurf_mkpath(&fname, NULL, 2, G_config_path, "URLs");
if (fname != NULL) {
nsoption_setnull_charp(url_file, fname);
}
/* bookmark database default */
fname = NULL;
- netsurf_mkpath(&fname, NULL, 2, nsw32_config_home, "Hotlist");
+ netsurf_mkpath(&fname, NULL, 2, G_config_path, "Hotlist");
if (fname != NULL) {
nsoption_setnull_charp(hotlist_path, fname);
}
@@ -244,11 +259,16 @@ static nserror set_defaults(struct nsoption_s *defaults)
/**
* Initialise user options location and contents
*/
-static nserror nsw32_option_init(int *pargc, char** argv)
+static nserror
+nsw32_option_init(int *pargc, char** argv, char **respaths, char *config_path)
{
nserror ret;
char *choices = NULL;
+ /* set the globals that will be used in the set_defaults() callback */
+ G_resource_pathv = respaths;
+ G_config_path = config_path;
+
/* user options setup */
ret = nsoption_init(set_defaults, &nsoptions, &nsoptions_default);
if (ret != NSERROR_OK) {
@@ -256,7 +276,7 @@ static nserror nsw32_option_init(int *pargc, char** argv)
}
/* Attempt to load the user choices */
- ret = netsurf_mkpath(&choices, NULL, 2, nsw32_config_home, "Choices");
+ ret = netsurf_mkpath(&choices, NULL, 2, config_path, "Choices");
if (ret == NSERROR_OK) {
nsoption_read(choices, nsoptions);
free(choices);
@@ -268,11 +288,90 @@ static nserror nsw32_option_init(int *pargc, char** argv)
return NSERROR_OK;
}
+/**
+ * Initialise messages
+ */
+static nserror nsw32_messages_init(char **respaths)
+{
+ char *messages;
+ nserror res;
+ const uint8_t *data;
+ size_t data_size;
+
+ res = nsw32_get_resource_data("messages", &data, &data_size);
+ if (res == NSERROR_OK) {
+ res = messages_add_from_inline(data, data_size);
+ } else {
+ /* Obtain path to messages */
+ messages = filepath_find(respaths, "messages");
+ if (messages == NULL) {
+ res = NSERROR_NOT_FOUND;
+ } else {
+ res = messages_add_from_file(messages);
+ free(messages);
+ }
+ }
+
+ return res;
+}
+
+
+/**
+ * Construct a unix style argc/argv
+ *
+ * \param argc_out number of commandline arguments
+ * \param argv_out string vector of command line arguments
+ * \return NSERROR_OK on success else error code
+ */
+static nserror win32_to_unix_commandline(int *argc_out, char ***argv_out)
+{
+ int argc = 0;
+ char **argv;
+ int cura;
+ LPWSTR *argvw;
+ size_t len;
+
+ argvw = CommandLineToArgvW(GetCommandLineW(), &argc);
+ if (argvw == NULL) {
+ return NSERROR_INVALID;
+ }
+
+ argv = malloc(sizeof(char *) * argc);
+ if (argv == NULL) {
+ return NSERROR_NOMEM;
+ }
+
+ for (cura = 0; cura < argc; cura++) {
+
+ len = wcstombs(NULL, argvw[cura], 0) + 1;
+ if (len > 0) {
+ argv[cura] = malloc(len);
+ if (argv[cura] == NULL) {
+ free(argv);
+ return NSERROR_NOMEM;
+ }
+ } else {
+ free(argv);
+ return NSERROR_INVALID;
+ }
+
+ wcstombs(argv[cura], argvw[cura], len);
+ /* alter windows-style forward slash flags to hyphen flags. */
+ if (argv[cura][0] == '/') {
+ argv[cura][0] = '-';
+ }
+ }
+
+ *argc_out = argc;
+ *argv_out = argv;
+
+ return NSERROR_OK;
+}
+
static struct gui_misc_table win32_misc_table = {
.schedule = win32_schedule,
- .warning = win32_warning,
- .cert_verify = nsw32_cert_verify,
+ .present_cookies = nsw32_cookies_present,
};
/**
@@ -281,11 +380,10 @@ static struct gui_misc_table win32_misc_table = {
int WINAPI
WinMain(HINSTANCE hInstance, HINSTANCE hLastInstance, LPSTR lpcli, int ncmd)
{
- char **argv = NULL;
- int argc = 0, argctemp = 0;
- size_t len;
- LPWSTR *argvw;
- char *messages;
+ int argc;
+ char **argv;
+ char **respaths;
+ char *nsw32_config_home = NULL;
nserror ret;
const char *addr;
nsurl *url;
@@ -300,7 +398,6 @@ WinMain(HINSTANCE hInstance, HINSTANCE hLastInstance, LPSTR lpcli, int ncmd)
.bitmap = win32_bitmap_table,
.layout = win32_layout_table,
};
- win32_fetch_table->get_resource_url = gui_get_resource_url;
ret = netsurf_register(&win32_table);
if (ret != NSERROR_OK) {
@@ -312,56 +409,43 @@ WinMain(HINSTANCE hInstance, HINSTANCE hLastInstance, LPSTR lpcli, int ncmd)
setbuf(stderr, NULL);
- /* Construct a unix style argc/argv */
- if (SLEN(lpcli) > 0) {
- argvw = CommandLineToArgvW(GetCommandLineW(), &argc);
- }
-
- argv = malloc(sizeof(char *) * argc);
- while (argctemp < argc) {
- len = wcstombs(NULL, argvw[argctemp], 0) + 1;
- if (len > 0) {
- argv[argctemp] = malloc(len);
- }
-
- if (argv[argctemp] != NULL) {
- wcstombs(argv[argctemp], argvw[argctemp], len);
- /* alter windows-style forward slash flags to
- * hyphen flags.
- */
- if (argv[argctemp][0] == '/')
- argv[argctemp][0] = '-';
- }
- argctemp++;
+ ret = win32_to_unix_commandline(&argc, &argv);
+ if (ret != NSERROR_OK) {
+ /* no log as logging requires this for initialisation */
+ return 1;
}
/* initialise logging - not fatal if it fails but not much we
- * can do about it
+ * can do about it
*/
nslog_init(nslog_ensure, &argc, argv);
+ /* build resource path string vector */
+ respaths = nsws_init_resource("${APPDATA}\\NetSurf:${PROGRAMFILES}\\NetSurf\\NetSurf\\:"NETSURF_WINDOWS_RESPATH);
+
/* Locate the correct user configuration directory path */
ret = get_config_home(&nsw32_config_home);
if (ret != NSERROR_OK) {
NSLOG(netsurf, INFO,
"Unable to locate a configuration directory.");
- nsw32_config_home = NULL;
}
/* Initialise user options */
- ret = nsw32_option_init(&argc, argv);
+ ret = nsw32_option_init(&argc, argv, respaths, nsw32_config_home);
if (ret != NSERROR_OK) {
- NSLOG(netsurf, INFO, "Options failed to initialise (%s)\n",
+ NSLOG(netsurf, ERROR, "Options failed to initialise (%s)\n",
messages_get_errorcode(ret));
return 1;
}
- respaths = nsws_init_resource("${APPDATA}\\NetSurf:${HOME}\\.netsurf:${NETSURFRES}:${PROGRAMFILES}\\NetSurf\\NetSurf\\:"NETSURF_WINDOWS_RESPATH);
-
- /* message init */
- messages = filepath_find(respaths, "messages");
- messages_add_from_file(messages);
- free(messages);
+ /* Initialise translated messages */
+ ret = nsw32_messages_init(respaths);
+ if (ret != NSERROR_OK) {
+ fprintf(stderr, "Unable to load translated messages (%s)\n",
+ messages_get_errorcode(ret));
+ NSLOG(netsurf, INFO, "Unable to load translated messages");
+ /** \todo decide if message load faliure should be fatal */
+ }
/* common initialisation */
ret = netsurf_init(NULL);
@@ -370,6 +454,8 @@ WinMain(HINSTANCE hInstance, HINSTANCE hLastInstance, LPSTR lpcli, int ncmd)
return 1;
}
+ browser_set_dpi(get_screen_dpi());
+
urldb_load(nsoption_charp(url_file));
urldb_load_cookies(nsoption_charp(cookie_file));
hotlist_init(nsoption_charp(hotlist_path),
@@ -378,7 +464,6 @@ WinMain(HINSTANCE hInstance, HINSTANCE hLastInstance, LPSTR lpcli, int ncmd)
ret = nsws_create_main_class(hInstance);
ret = nsws_create_drawable_class(hInstance);
ret = nsw32_create_corewindow_class(hInstance);
- ret = nsws_create_cert_verify_class(hInstance);
nsoption_set_bool(target_blank, false);
diff --git a/frontends/windows/plot.c b/frontends/windows/plot.c
index 3668e4bb6..4d9096d75 100644
--- a/frontends/windows/plot.c
+++ b/frontends/windows/plot.c
@@ -601,7 +601,9 @@ line(const struct redraw_context *ctx,
(style->stroke_type == PLOT_OP_TYPE_DASH) ? PS_DASH:
0);
LOGBRUSH lb = {BS_SOLID, col, 0};
- HPEN pen = ExtCreatePen(penstyle, style->stroke_width, &lb, 0, NULL);
+ HPEN pen = ExtCreatePen(penstyle,
+ plot_style_fixed_to_int(style->stroke_width),
+ &lb, 0, NULL);
if (pen == NULL) {
DeleteObject(clipregion);
return NSERROR_INVALID;
@@ -672,7 +674,9 @@ rectangle(const struct redraw_context *ctx,
if (style->fill_type == PLOT_OP_TYPE_NONE)
lb1.lbStyle = BS_HOLLOW;
- HPEN pen = ExtCreatePen(penstyle, style->stroke_width, &lb, 0, NULL);
+ HPEN pen = ExtCreatePen(penstyle,
+ plot_style_fixed_to_int(style->stroke_width),
+ &lb, 0, NULL);
if (pen == NULL) {
return NSERROR_INVALID;
}
@@ -810,7 +814,6 @@ polygon(const struct redraw_context *ctx,
* \param pstyle Style controlling the path plot.
* \param p elements of path
* \param n nunber of elements on path
- * \param width The width of the path
* \param transform A transform to apply to the path.
* \return NSERROR_OK on success else error code.
*/
@@ -819,7 +822,6 @@ path(const struct redraw_context *ctx,
const plot_style_t *pstyle,
const float *p,
unsigned int n,
- float width,
const float transform[6])
{
NSLOG(plot, DEEPDEBUG, "path unimplemented");
diff --git a/frontends/windows/pointers.c b/frontends/windows/pointers.c
index a730e4bd2..333ef1a9a 100644
--- a/frontends/windows/pointers.c
+++ b/frontends/windows/pointers.c
@@ -33,7 +33,6 @@
#include "windows/schedule.h"
#include "windows/window.h"
-#include "windows/filetype.h"
#include "windows/pointers.h"
struct nsws_pointers {
diff --git a/frontends/windows/prefs.c b/frontends/windows/prefs.c
index 591b57426..d6855f5da 100644
--- a/frontends/windows/prefs.c
+++ b/frontends/windows/prefs.c
@@ -230,13 +230,6 @@ static BOOL CALLBACK options_appearance_dialog_handler(HWND hwnd,
sub = GetDlgItem(hwnd, IDC_PREFS_NOANIMATION);
SendMessage(sub, BM_SETCHECK, (WPARAM)((nsoption_bool(animate_images))
? BST_UNCHECKED : BST_CHECKED), 0);
-
- if (nsoption_int(minimum_gif_delay) != 0) {
- sub = GetDlgItem(hwnd, IDC_PREFS_ANIMATIONDELAY);
- snprintf(number, 6, "%.1f", nsoption_int(minimum_gif_delay) /
- 100.0);
- SendMessage(sub, WM_SETTEXT, 0, (LPARAM)number);
- }
break;
case WM_NOTIFY:
@@ -268,18 +261,6 @@ static BOOL CALLBACK options_appearance_dialog_handler(HWND hwnd,
nsoption_set_bool(animate_images,
(IsDlgButtonChecked(hwnd, IDC_PREFS_NOANIMATION) == BST_CHECKED) ? true : false);
-
- sub = GetDlgItem(hwnd, IDC_PREFS_ANIMATIONDELAY);
- len = SendMessage(sub, WM_GETTEXTLENGTH, 0, 0);
- temp = malloc(len + 1);
- if (temp != NULL) {
- SendMessage(sub, WM_GETTEXT, (WPARAM)
- (len + 1), (LPARAM) temp);
- nsoption_set_int(minimum_gif_delay,
- (int)(100 * strtod(temp, NULL)));
- free(temp);
- }
-
break;
case UDN_DELTAPOS: {
@@ -292,15 +273,11 @@ static BOOL CALLBACK options_appearance_dialog_handler(HWND hwnd,
case IDC_PREFS_FONT_MINSIZE_SPIN:
change_spinner(GetDlgItem(hwnd, IDC_PREFS_FONT_MINSIZE), 0.1 * ud->iDelta, 1.0, 50.0);
return TRUE;
-
- case IDC_PREFS_ANIMATIONDELAY_SPIN:
- change_spinner(GetDlgItem(hwnd, IDC_PREFS_ANIMATIONDELAY), 0.1 * ud->iDelta, 0.1, 100.0);
- return TRUE;
-
}
}
break;
}
+ break;
case WM_COMMAND:
@@ -699,7 +676,7 @@ nserror nsws_prefs_save(void)
char *choices = NULL;
nserror res;
- res = netsurf_mkpath(&choices, NULL, 2, nsw32_config_home, "Choices");
+ res = netsurf_mkpath(&choices, NULL, 2, G_config_path, "Choices");
if (res == NSERROR_OK) {
nsoption_write(choices, NULL, NULL);
free(choices);
@@ -718,7 +695,7 @@ void nsws_prefs_dialog_init(HINSTANCE hinst, HWND parent)
psp[0].dwSize = sizeof(PROPSHEETPAGE);
psp[0].dwFlags = 0;/*PSP_USEICONID*/
psp[0].hInstance = hinst;
- psp[0].pszTemplate = MAKEINTRESOURCE(IDD_DLG_OPTIONS_GENERAL);
+ psp[0].pszTemplate = MAKEINTRESOURCE(IDD_OPTIONS_GENERAL);
psp[0].pfnDlgProc = options_general_dialog_handler;
psp[0].lParam = 0;
psp[0].pfnCallback = NULL;
@@ -726,7 +703,7 @@ void nsws_prefs_dialog_init(HINSTANCE hinst, HWND parent)
psp[1].dwSize = sizeof(PROPSHEETPAGE);
psp[1].dwFlags = 0;/*PSP_USEICONID*/
psp[1].hInstance = hinst;
- psp[1].pszTemplate = MAKEINTRESOURCE(IDD_DLG_OPTIONS_CONNECTIONS);
+ psp[1].pszTemplate = MAKEINTRESOURCE(IDD_OPTIONS_CONNECTIONS);
psp[1].pfnDlgProc = options_connections_dialog_handler;
psp[1].lParam = 0;
psp[1].pfnCallback = NULL;
@@ -734,7 +711,7 @@ void nsws_prefs_dialog_init(HINSTANCE hinst, HWND parent)
psp[2].dwSize = sizeof(PROPSHEETPAGE);
psp[2].dwFlags = 0;/*PSP_USEICONID*/
psp[2].hInstance = hinst;
- psp[2].pszTemplate = MAKEINTRESOURCE(IDD_DLG_OPTIONS_APPERANCE);
+ psp[2].pszTemplate = MAKEINTRESOURCE(IDD_OPTIONS_APPERANCE);
psp[2].pfnDlgProc = options_appearance_dialog_handler;
psp[2].lParam = 0;
psp[2].pfnCallback = NULL;
diff --git a/frontends/windows/res/adblock.css b/frontends/windows/res/adblock.css
index ff2485622..0d12aaa7c 120000
--- a/frontends/windows/res/adblock.css
+++ b/frontends/windows/res/adblock.css
@@ -1 +1 @@
-../../../!NetSurf/Resources/AdBlock,f79 \ No newline at end of file
+../../../resources/adblock.css \ No newline at end of file
diff --git a/frontends/windows/res/ca-bundle.crt b/frontends/windows/res/ca-bundle.crt
index 0b0e416ad..1187fa51a 120000
--- a/frontends/windows/res/ca-bundle.crt
+++ b/frontends/windows/res/ca-bundle.crt
@@ -1 +1 @@
-../../../!NetSurf/Resources/ca-bundle \ No newline at end of file
+../../../resources/ca-bundle \ No newline at end of file
diff --git a/frontends/windows/res/credits.html b/frontends/windows/res/credits.html
index 1ba17392b..b43a1a06c 120000
--- a/frontends/windows/res/credits.html
+++ b/frontends/windows/res/credits.html
@@ -1 +1 @@
-../../../!NetSurf/Resources/en/credits.html,faf \ No newline at end of file
+../../../resources/en/credits.html \ No newline at end of file
diff --git a/frontends/windows/res/default.css b/frontends/windows/res/default.css
index a8579eb7c..fa3ae6c26 120000
--- a/frontends/windows/res/default.css
+++ b/frontends/windows/res/default.css
@@ -1 +1 @@
-../../../!NetSurf/Resources/CSS,f79 \ No newline at end of file
+../../../resources/default.css \ No newline at end of file
diff --git a/frontends/windows/res/icons/arrow-l.png b/frontends/windows/res/icons/arrow-l.png
new file mode 120000
index 000000000..6e580c561
--- /dev/null
+++ b/frontends/windows/res/icons/arrow-l.png
@@ -0,0 +1 @@
+../../../../resources/icons/arrow-l.png \ No newline at end of file
diff --git a/frontends/windows/res/icons/content.png b/frontends/windows/res/icons/content.png
new file mode 120000
index 000000000..dd71532dc
--- /dev/null
+++ b/frontends/windows/res/icons/content.png
@@ -0,0 +1 @@
+../../../../resources/icons/content.png \ No newline at end of file
diff --git a/frontends/windows/res/icons/directory.png b/frontends/windows/res/icons/directory.png
new file mode 120000
index 000000000..71aee69d5
--- /dev/null
+++ b/frontends/windows/res/icons/directory.png
@@ -0,0 +1 @@
+../../../../resources/icons/directory.png \ No newline at end of file
diff --git a/frontends/windows/res/icons/directory2.png b/frontends/windows/res/icons/directory2.png
new file mode 120000
index 000000000..4daa093d0
--- /dev/null
+++ b/frontends/windows/res/icons/directory2.png
@@ -0,0 +1 @@
+../../../../resources/icons/directory2.png \ No newline at end of file
diff --git a/frontends/windows/res/icons/hotlist-add.png b/frontends/windows/res/icons/hotlist-add.png
new file mode 120000
index 000000000..5039509fc
--- /dev/null
+++ b/frontends/windows/res/icons/hotlist-add.png
@@ -0,0 +1 @@
+../../../../resources/icons/hotlist-add.png \ No newline at end of file
diff --git a/frontends/windows/res/icons/hotlist-rmv.png b/frontends/windows/res/icons/hotlist-rmv.png
new file mode 120000
index 000000000..2b592cd13
--- /dev/null
+++ b/frontends/windows/res/icons/hotlist-rmv.png
@@ -0,0 +1 @@
+../../../../resources/icons/hotlist-rmv.png \ No newline at end of file
diff --git a/frontends/windows/res/icons/search.png b/frontends/windows/res/icons/search.png
new file mode 120000
index 000000000..e30f7bee8
--- /dev/null
+++ b/frontends/windows/res/icons/search.png
@@ -0,0 +1 @@
+../../../../resources/icons/search.png \ No newline at end of file
diff --git a/frontends/windows/res/installer.nsi b/frontends/windows/res/installer.nsi
index 17afee26d..2f8b757d8 100644
--- a/frontends/windows/res/installer.nsi
+++ b/frontends/windows/res/installer.nsi
@@ -13,16 +13,16 @@
!define VERSIONMAJOR 3
!endif
!ifndef VERSIONMINOR
- !define VERSIONMINOR 7
+ !define VERSIONMINOR 11
!endif
!ifndef VERSIONBUILD
!define VERSIONBUILD 0
!endif
# These will be displayed by the "Click here for support information" link in "Add/Remove Programs"
-!define HELPURL "http://www.netsurf-browser.org/" # "Support Information" link
-!define UPDATEURL "http://www.netsurf-browser.org/" # "Product Updates" link
-!define ABOUTURL "http://www.netsurf-browser.org/" # "Publisher" link
+!define HELPURL "https://www.netsurf-browser.org/" # "Support Information" link
+!define UPDATEURL "https://www.netsurf-browser.org/" # "Product Updates" link
+!define ABOUTURL "https://www.netsurf-browser.org/" # "Publisher" link
# This is the size (in kB) of all the files copied into "Program Files"
!define INSTALLSIZE 9000
diff --git a/frontends/windows/res/internal.css b/frontends/windows/res/internal.css
index 17f9f1504..5583a9811 120000
--- a/frontends/windows/res/internal.css
+++ b/frontends/windows/res/internal.css
@@ -1 +1 @@
-../../../!NetSurf/Resources/internal.css,f79 \ No newline at end of file
+../../../resources/internal.css \ No newline at end of file
diff --git a/frontends/windows/res/licence.html b/frontends/windows/res/licence.html
index 147dd6db2..c0c1e6630 120000
--- a/frontends/windows/res/licence.html
+++ b/frontends/windows/res/licence.html
@@ -1 +1 @@
-../../../!NetSurf/Resources/en/licence.html,faf \ No newline at end of file
+../../../resources/en/licence.html \ No newline at end of file
diff --git a/frontends/windows/res/netsurf.png b/frontends/windows/res/netsurf.png
index 905512c25..d0ab72a5e 120000
--- a/frontends/windows/res/netsurf.png
+++ b/frontends/windows/res/netsurf.png
@@ -1 +1 @@
-../../../!NetSurf/Resources/netsurf.png,b60 \ No newline at end of file
+../../../resources/netsurf.png \ No newline at end of file
diff --git a/frontends/windows/res/page-info-insecure.bmp b/frontends/windows/res/page-info-insecure.bmp
new file mode 100644
index 000000000..d8e15c318
--- /dev/null
+++ b/frontends/windows/res/page-info-insecure.bmp
Binary files differ
diff --git a/frontends/windows/res/page-info-internal.bmp b/frontends/windows/res/page-info-internal.bmp
new file mode 100644
index 000000000..b9b4eabd5
--- /dev/null
+++ b/frontends/windows/res/page-info-internal.bmp
Binary files differ
diff --git a/frontends/windows/res/page-info-local.bmp b/frontends/windows/res/page-info-local.bmp
new file mode 100644
index 000000000..51cd5964b
--- /dev/null
+++ b/frontends/windows/res/page-info-local.bmp
Binary files differ
diff --git a/frontends/windows/res/page-info-secure.bmp b/frontends/windows/res/page-info-secure.bmp
new file mode 100644
index 000000000..b08809c66
--- /dev/null
+++ b/frontends/windows/res/page-info-secure.bmp
Binary files differ
diff --git a/frontends/windows/res/page-info-warning.bmp b/frontends/windows/res/page-info-warning.bmp
new file mode 100644
index 000000000..8e6b3afeb
--- /dev/null
+++ b/frontends/windows/res/page-info-warning.bmp
Binary files differ
diff --git a/frontends/windows/res/quirks.css b/frontends/windows/res/quirks.css
index 88aabe48c..1e752cb9e 120000
--- a/frontends/windows/res/quirks.css
+++ b/frontends/windows/res/quirks.css
@@ -1 +1 @@
-../../../!NetSurf/Resources/Quirks,f79 \ No newline at end of file
+../../../resources/quirks.css \ No newline at end of file
diff --git a/frontends/windows/res/resource.rc b/frontends/windows/res/resource.rc
index 192cd57c7..9e9927b0c 100644
--- a/frontends/windows/res/resource.rc
+++ b/frontends/windows/res/resource.rc
@@ -1,269 +1,345 @@
+// Generated by ResEdit 1.6.6
+
#include <windows.h>
#include <commctrl.h>
#include <richedit.h>
#include "../resourceid.h"
+//
+// Bitmap resources
+//
+LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
+IDR_HOME_BITMAP BITMAP "home.bmp"
-IDR_NETSURF_ICON ICON DISCARDABLE "NetSurf.ico"
-IDR_TOOLBAR_BITMAP BITMAP DISCARDABLE "toolbar.bmp"
-IDR_TOOLBAR_BITMAP_GREY BITMAP DISCARDABLE "toolbarg.bmp"
-IDR_TOOLBAR_BITMAP_HOT BITMAP DISCARDABLE "toolbarh.bmp"
-IDR_NETSURF_BANNER BITMAP DISCARDABLE "banner.bmp"
-IDR_HOME_BITMAP BITMAP DISCARDABLE "home.bmp"
-
-IDR_THROBBER_FRAME0_BITMAP BITMAP DISCARDABLE "throbber/throbber0.bmp"
-IDR_THROBBER_FRAME1_BITMAP BITMAP DISCARDABLE "throbber/throbber1.bmp"
-IDR_THROBBER_FRAME2_BITMAP BITMAP DISCARDABLE "throbber/throbber2.bmp"
-IDR_THROBBER_FRAME3_BITMAP BITMAP DISCARDABLE "throbber/throbber3.bmp"
-IDR_THROBBER_FRAME4_BITMAP BITMAP DISCARDABLE "throbber/throbber4.bmp"
-IDR_THROBBER_FRAME5_BITMAP BITMAP DISCARDABLE "throbber/throbber5.bmp"
-IDR_THROBBER_FRAME6_BITMAP BITMAP DISCARDABLE "throbber/throbber6.bmp"
-IDR_THROBBER_FRAME7_BITMAP BITMAP DISCARDABLE "throbber/throbber7.bmp"
-
-IDR_MENU_MAIN MENU
-BEGIN
- POPUP "&File"
- BEGIN
- MENUITEM "&New Window",IDM_FILE_OPEN_WINDOW
- MENUITEM "Open &Location",IDM_FILE_OPEN_LOCATION
- MENUITEM "&Close",IDM_FILE_CLOSE_WINDOW
- MENUITEM SEPARATOR
- MENUITEM "&Save Page",IDM_FILE_SAVE_PAGE,GRAYED,HELP
- POPUP "Save Page &As"
- BEGIN
- MENUITEM "Text",IDM_FILE_SAVEAS_TEXT,GRAYED
- MENUITEM "PDF",IDM_FILE_SAVEAS_PDF,GRAYED
- MENUITEM "Postscript",IDM_FILE_SAVEAS_POSTSCRIPT,GRAYED
- END
- MENUITEM SEPARATOR
- MENUITEM "Print Pre&view",IDM_FILE_PRINT_PREVIEW
- MENUITEM "&Print",IDM_FILE_PRINT
- MENUITEM SEPARATOR
- MENUITEM "E&xit",IDM_FILE_QUIT
- END
- POPUP "&Edit"
- BEGIN
- MENUITEM "Cu&t",IDM_EDIT_CUT
- MENUITEM "&Copy",IDM_EDIT_COPY
- MENUITEM "&Paste",IDM_EDIT_PASTE
- MENUITEM "&Delete",IDM_EDIT_DELETE
- MENUITEM SEPARATOR
- MENUITEM "Select &All",IDM_EDIT_SELECT_ALL
- MENUITEM SEPARATOR
- MENUITEM "&Find",IDM_EDIT_SEARCH
- END
- POPUP "&View"
- BEGIN
- MENUITEM "Stop",IDM_NAV_STOP
- MENUITEM "Reload",IDM_NAV_RELOAD
- MENUITEM SEPARATOR
- POPUP "&Zoom"
- BEGIN
- MENUITEM "Zoom &In",IDM_VIEW_ZOOMPLUS
- MENUITEM "Zoom &Out",IDM_VIEW_ZOOMMINUS
- MENUITEM "&Reset",IDM_VIEW_ZOOMNORMAL
- END
- MENUITEM SEPARATOR
- MENUITEM "Page S&ource",IDM_VIEW_SOURCE
- MENUITEM "&Full Screen",IDM_VIEW_FULLSCREEN
- MENUITEM SEPARATOR
- MENUITEM "Save size and location",IDM_VIEW_SAVE_WIN_METRICS
- END
- POPUP "&Navigate"
- BEGIN
- MENUITEM "Back",IDM_NAV_BACK
- MENUITEM "Forward",IDM_NAV_FORWARD
- MENUITEM "Home",IDM_NAV_HOME
- MENUITEM SEPARATOR
- MENUITEM "Local History",IDM_NAV_LOCALHISTORY
- MENUITEM "Global History",IDM_NAV_GLOBALHISTORY
- MENUITEM SEPARATOR
- MENUITEM "Show Bookmarks",IDM_NAV_BOOKMARKS
- END
- POPUP "&Tools"
- BEGIN
- MENUITEM "&Downloads",IDM_TOOLS_DOWNLOADS
- MENUITEM "&Show Cookies",IDM_TOOLS_COOKIES
- POPUP "Debugging"
- BEGIN
- MENUITEM "Debug rendering",IDM_VIEW_TOGGLE_DEBUG_RENDERING
- MENUITEM "Save Box Tree",IDM_VIEW_DEBUGGING_SAVE_BOXTREE,GRAYED
- MENUITEM "Save DOM Tree",IDM_VIEW_DEBUGGING_SAVE_DOMTREE,GRAYED
- END
- MENUITEM SEPARATOR
- MENUITEM "Options...",IDM_EDIT_PREFERENCES
- END
- POPUP "&Help"
- BEGIN
- MENUITEM "&Contents",IDM_HELP_CONTENTS
- MENUITEM "G&uide",IDM_HELP_GUIDE
- MENUITEM "&Info",IDM_HELP_INFO
- MENUITEM SEPARATOR
- MENUITEM "&About NetSurf",IDM_HELP_ABOUT
- END
-END
-
-IDR_MENU_CONTEXT MENU
-BEGIN
- POPUP "Context"
- BEGIN
- MENUITEM "&Back",IDM_NAV_BACK
- MENUITEM "F&orward",IDM_NAV_FORWARD
- MENUITEM "&Home",IDM_NAV_HOME
- MENUITEM "&Stop",IDM_NAV_STOP
- MENUITEM "&Reload",IDM_NAV_RELOAD
- MENUITEM SEPARATOR
- MENUITEM "C&ut",IDM_EDIT_CUT,GRAYED
- MENUITEM "&Copy",IDM_EDIT_COPY,GRAYED
- MENUITEM "&Paste",IDM_EDIT_PASTE,GRAYED
- MENUITEM "&Delete",IDM_EDIT_DELETE,GRAYED
- END
-END
-
-IDD_DLG_ABOUT DIALOGEX 10,10,206,133
-CAPTION "About NetSurf"
-FONT 8,"MS Sans Serif",0,0,0
-STYLE WS_VISIBLE|WS_CAPTION|WS_SYSMENU
-EXSTYLE WS_EX_DLGMODALFRAME
-BEGIN
- CONTROL IDR_NETSURF_BANNER,IDC_IMG1,"Static",SS_BITMAP|0x40L /*SS_REALSIZECONTROL*/,0,0,205,53
- CONTROL "NetSurf",IDC_ABOUT_VERSION,"Static",SS_LEFT,10,60,185,16
- CONTROL "NetSurf is a small fast browser",IDC_ABOUT_TEXT,"Static",SS_LEFT,10,83,185,8
- CONTROL "Copyright 2003-2011 The NetSurf Developers",IDC_ABOUT_COPYRIGHT,"Static",SS_LEFT,10,96,185,8
- CONTROL "&OK",IDOK,"Button",WS_CHILDWINDOW|WS_VISIBLE|WS_TABSTOP,143,111,54,15
- CONTROL "&Credits",IDC_BTN_CREDITS,"Button",WS_CHILDWINDOW|WS_VISIBLE|WS_TABSTOP,10,111,54,15
- CONTROL "&Licence",IDC_BTN_LICENCE,"Button",WS_CHILDWINDOW|WS_VISIBLE|WS_TABSTOP,70,111,54,15
-END
-
-IDD_DLG_DOWNLOAD DIALOGEX 0,0,201,84
-CAPTION "Download"
-FONT 8,"MS Sans Serif",0,0,0
-STYLE WS_POPUP|WS_VISIBLE|WS_CAPTION|WS_SYSMENU|DS_MODALFRAME|DS_SETFONT
-EXSTYLE WS_EX_DLGMODALFRAME
-BEGIN
- CONTROL "downloading [file] [size] from [domain] to [destination]",IDC_DOWNLOAD_LABEL,"Static",WS_CHILDWINDOW|WS_VISIBLE|WS_GROUP|SS_CENTER,6,6,189,35
- CONTROL "progress",IDC_DOWNLOAD_PROGRESS,PROGRESS_CLASS,WS_VISIBLE,6,50,189,10
- CONTROL "&OK",IDOK,"Button",WS_CHILDWINDOW|WS_VISIBLE|WS_TABSTOP,141,66,54,15
- CONTROL "&Cancel",IDCANCEL,"Button",WS_CHILDWINDOW|WS_VISIBLE|WS_TABSTOP,81,66,54,15
-END
-
-
-IDD_DLG_OPTIONS_GENERAL DIALOGEX 0,0,220,200
-CAPTION "General"
-FONT 8,"MS Shell Dlg"
-STYLE DS_CONTROL|DS_SHELLFONT
-BEGIN
- /* home page entry */
- CONTROL "Home Page",IDC_STATIC,"Static",SS_LEFT,7,7,40,8
- CONTROL "",IDC_STATIC,"Static",SS_ETCHEDFRAME,47,11,166,1
- CONTROL IDR_HOME_BITMAP,IDC_STATIC,"Static",SS_BITMAP,15,19,24,24
- CONTROL "",IDC_PREFS_HOMEPAGE,"Edit",WS_TABSTOP|ES_OEMCONVERT|ES_AUTOHSCROLL,43,19,170,14,WS_EX_CLIENTEDGE
-
-
- /* Content control */
- CONTROL "Content Control",IDC_STATIC,"Static",SS_LEFT,7,40,60,8
- CONTROL "",IDC_STATIC,"Static",SS_ETCHEDFRAME,67,44,146,1
-
- CONTROL "Hide Images",IDC_PREFS_IMAGES,"Button",WS_CHILDWINDOW|WS_VISIBLE|WS_TABSTOP|BS_AUTOCHECKBOX,43,52,67,10
- CONTROL "Hide Advertisements",IDC_PREFS_ADVERTS,"Button",WS_CHILDWINDOW|WS_VISIBLE|WS_TABSTOP|BS_AUTOCHECKBOX,43,66,81,10
- CONTROL "Send referer",IDC_PREFS_REFERER,"Button",WS_CHILDWINDOW|WS_VISIBLE|WS_TABSTOP|BS_AUTOCHECKBOX,43,80,55,10
-
-END
-
-IDD_DLG_OPTIONS_CONNECTIONS DIALOGEX 0,0,220,200
-CAPTION "Connections"
-FONT 8,"MS Shell Dlg"
-STYLE DS_CONTROL|DS_SHELLFONT
-BEGIN
- /* proxy divider */
- CONTROL "Proxy",IDC_STATIC,"Static",SS_LEFT,7,7,30,8
- CONTROL "",IDC_STATIC,"Static",SS_ETCHEDFRAME,37,11,176,1
-
- /* proxy controls */
- CONTROL "Type:",IDC_STATIC,"Static",WS_CHILDWINDOW|WS_VISIBLE|WS_GROUP|SS_LEFT,43,22,40,8
- CONTROL "",IDC_PREFS_PROXYTYPE,"ComboBox",WS_CHILDWINDOW|WS_VISIBLE|WS_TABSTOP|CBS_DROPDOWNLIST,80,19,60,60
-
- CONTROL "Server:",IDC_STATIC,"Static",WS_CHILDWINDOW|WS_VISIBLE|WS_GROUP|SS_LEFT,43,39,28,8
- CONTROL "",IDC_PREFS_PROXYHOST,"Edit",WS_CHILDWINDOW|WS_VISIBLE|WS_TABSTOP|ES_OEMCONVERT|ES_AUTOHSCROLL,80,36,80,14,WS_EX_CLIENTEDGE
-
- CONTROL "Port:",IDC_STATIC,"Static",WS_CHILDWINDOW|WS_VISIBLE|WS_GROUP|SS_LEFT,164,39,16,8
- CONTROL "",IDC_PREFS_PROXYPORT,"Edit",WS_CHILDWINDOW|WS_VISIBLE|WS_TABSTOP|ES_OEMCONVERT|ES_AUTOHSCROLL,182,36,24,14,WS_EX_CLIENTEDGE
- CONTROL "Username:",IDC_STATIC,"Static",WS_CHILDWINDOW|WS_VISIBLE|WS_GROUP|SS_LEFT,43,60,35,8
- CONTROL "",IDC_PREFS_PROXYNAME,"Edit",WS_CHILDWINDOW|WS_VISIBLE|WS_TABSTOP|ES_OEMCONVERT|ES_AUTOHSCROLL,80,57,45,14,WS_EX_CLIENTEDGE
+LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
+IDR_NETSURF_BANNER BITMAP "banner.bmp"
- CONTROL "Password:",IDC_STATIC,"Static",WS_CHILDWINDOW|WS_VISIBLE|WS_GROUP|SS_LEFT,132,60,34,8
- CONTROL "",IDC_PREFS_PROXYPASS,"Edit",WS_CHILDWINDOW|WS_VISIBLE|WS_TABSTOP|ES_OEMCONVERT|ES_AUTOHSCROLL|ES_PASSWORD,168,57,45,14,WS_EX_CLIENTEDGE
+LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
+IDR_TOOLBAR_BITMAP BITMAP "toolbar.bmp"
- /* fetcher divider */
- CONTROL "Fetchers",IDC_STATIC,"Static",SS_LEFT,7,78,40,8
- CONTROL "",IDC_STATIC,"Static",SS_ETCHEDFRAME,42,82,171,1
- /* max fetchers */
- CONTROL "Max Fetchers:",IDC_STATIC,"Static",WS_CHILDWINDOW|WS_VISIBLE|WS_GROUP,43,96,64,8
- CONTROL "",IDC_PREFS_FETCHERS,"Edit",ES_NUMBER|ES_RIGHT|WS_CHILDWINDOW|WS_VISIBLE|WS_TABSTOP|WS_BORDER,111,93,30,14
- CONTROL "Max Fetchers",IDC_PREFS_FETCHERS_SPIN,UPDOWN_CLASS,UDS_AUTOBUDDY|UDS_ALIGNRIGHT|WS_VISIBLE,341,122,11,15
+LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
+IDR_TOOLBAR_BITMAP_GREY BITMAP "toolbarg.bmp"
- /* fetchers per host */
- CONTROL "Fetches per host:",IDC_STATIC,"Static",WS_CHILDWINDOW|WS_VISIBLE|WS_GROUP,43,118,64,8
- CONTROL "",IDC_PREFS_FETCH_HOST,"Edit",ES_NUMBER|ES_RIGHT|WS_CHILDWINDOW|WS_VISIBLE|WS_TABSTOP|WS_BORDER,111,114,30,14
- CONTROL "Fetches per host",IDC_PREFS_FETCH_HOST_SPIN,UPDOWN_CLASS,UDS_AUTOBUDDY|UDS_ALIGNRIGHT|WS_VISIBLE,341,140,11,15
- /* cached fetchers */
- CONTROL "Cached Fetches:",IDC_STATIC,"Static",WS_CHILDWINDOW|WS_VISIBLE|WS_GROUP,43,138,64,8
- CONTROL "",IDC_PREFS_FETCH_HANDLES,"Edit",ES_NUMBER|ES_RIGHT|WS_CHILDWINDOW|WS_VISIBLE|WS_TABSTOP|WS_BORDER,111,135,30,14
- CONTROL "Cached Fetches",IDC_PREFS_FETCH_HANDLES_SPIN,UPDOWN_CLASS,UDS_AUTOBUDDY|UDS_ALIGNRIGHT|WS_VISIBLE,341,158,11,15
-
-END
-
-IDD_DLG_OPTIONS_APPERANCE DIALOGEX 10,10,220,200
-CAPTION "Apperance"
-FONT 8,"MS Shell Dlg"
-STYLE DS_CONTROL|DS_SHELLFONT
-BEGIN
- /* proxy separator */
- CONTROL "Fonts",IDC_STATIC,"Static",SS_LEFT,7,7,20,8
- CONTROL "",IDC_STATIC,"Static",SS_ETCHEDFRAME,27,11,186,1
+LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
+IDR_TOOLBAR_BITMAP_HOT BITMAP "toolbarh.bmp"
- /* font controls */
- CONTROL "Sans-serif:",IDC_STATIC,"Static",WS_CHILDWINDOW|WS_VISIBLE|WS_GROUP|SS_LEFT,43,22,44,8
- CONTROL "Sans-serif",IDC_PREFS_SANS,"Button",WS_CHILDWINDOW|WS_VISIBLE|WS_TABSTOP,89,19,50,14
- CONTROL "Serif:",IDC_STATIC,"Static",WS_CHILDWINDOW|WS_VISIBLE|WS_GROUP|SS_LEFT,43,40,24,8
- CONTROL "Serif",IDC_PREFS_SERIF,"Button",WS_CHILDWINDOW|WS_VISIBLE|WS_TABSTOP,89,37,50,14
+LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
+IDR_THROBBER_AVI AVI "throbber.avi"
- CONTROL "Monospace:",IDC_STATIC,"Static",WS_CHILDWINDOW|WS_VISIBLE|WS_GROUP|SS_LEFT,43,58,40,8
- CONTROL "Monospace",IDC_PREFS_MONO,"Button",WS_CHILDWINDOW|WS_VISIBLE|WS_TABSTOP,89,55,50,14
- CONTROL "Cursive:",IDC_STATIC,"Static",WS_CHILDWINDOW|WS_VISIBLE|WS_GROUP|SS_LEFT,43,76,32,8
- CONTROL "Cursive",IDC_PREFS_CURSIVE,"Button",WS_CHILDWINDOW|WS_VISIBLE|WS_TABSTOP,89,73,50,14
+LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
+IDB_PAGEINFO_INSECURE BITMAP "page-info-insecure.bmp"
- CONTROL "Fantasy:",IDC_STATIC,"Static",WS_CHILDWINDOW|WS_VISIBLE|WS_GROUP|SS_LEFT,43,94,32,8
- CONTROL "Fantasy",IDC_PREFS_FANTASY,"Button",WS_CHILDWINDOW|WS_VISIBLE|WS_TABSTOP,89,91,50,14
+LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
+IDB_PAGEINFO_SECURE BITMAP "page-info-secure.bmp"
- CONTROL "Default:",IDC_STATIC,"Static",WS_CHILDWINDOW|WS_VISIBLE|WS_GROUP|SS_LEFT,43,112,38,8
- CONTROL "",IDC_PREFS_FONTDEF,"ComboBox",WS_CHILDWINDOW|WS_VISIBLE|WS_TABSTOP|CBS_DROPDOWNLIST,89,109,50,60
- CONTROL "Size:",IDC_STATIC,"Static",WS_CHILDWINDOW|WS_VISIBLE|WS_GROUP|SS_LEFT,147,112,16,8
- CONTROL "",IDC_PREFS_FONT_SIZE,"Edit",ES_NUMBER|WS_CHILDWINDOW|WS_VISIBLE|WS_TABSTOP,165,109,35,14,WS_EX_CLIENTEDGE
- CONTROL "Font Size",IDC_PREFS_FONT_SIZE_SPIN,UPDOWN_CLASS,UDS_AUTOBUDDY|UDS_ALIGNRIGHT|WS_VISIBLE,75,137,11,15
+LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
+IDB_PAGEINFO_INTERNAL BITMAP "page-info-internal.bmp"
- CONTROL "Minimum Size:",IDC_STATIC,"Static",WS_CHILDWINDOW|WS_VISIBLE|WS_GROUP|SS_LEFT,43,130,52,8
- CONTROL "",IDC_PREFS_FONT_MINSIZE,"Edit",WS_CHILDWINDOW|WS_VISIBLE|WS_TABSTOP,97,127,35,14,WS_EX_CLIENTEDGE
- CONTROL "Minimum Font Size",IDC_PREFS_FONT_MINSIZE_SPIN,UPDOWN_CLASS,UDS_AUTOBUDDY|UDS_ALIGNRIGHT|WS_VISIBLE,76,159,11,15
- /* animation separator */
- CONTROL "Animation",IDC_STATIC,"Static",SS_LEFT,7,148,36,8
- CONTROL "",IDC_STATIC,"Static",SS_ETCHEDFRAME,43,152,170,1
+LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
+IDB_PAGEINFO_WARNING BITMAP "page-info-warning.bmp"
- CONTROL "Disable",IDC_PREFS_NOANIMATION,"Button",WS_CHILDWINDOW|WS_VISIBLE|WS_TABSTOP|BS_AUTOCHECKBOX,43,163,39,10
- CONTROL "Minimum delay:",IDC_STATIC,"Static",WS_CHILDWINDOW|WS_VISIBLE|WS_GROUP|SS_LEFT,55,180,56,8
- CONTROL "",IDC_PREFS_ANIMATIONDELAY,"Edit",WS_CHILDWINDOW|WS_VISIBLE|WS_TABSTOP,113,177,35,14,WS_EX_CLIENTEDGE
- CONTROL "Min delay",IDC_PREFS_ANIMATIONDELAY_SPIN,UPDOWN_CLASS,UDS_AUTOBUDDY|UDS_ALIGNRIGHT|WS_VISIBLE,43,210,11,15
+LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
+IDB_PAGEINFO_LOCAL BITMAP "page-info-local.bmp"
-END
+//
+// Menu resources
+//
+LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
+IDR_MENU_CONTEXT MENU
+{
+ POPUP "Context"
+ {
+ MENUITEM "&Back", IDM_NAV_BACK
+ MENUITEM "F&orward", IDM_NAV_FORWARD
+ MENUITEM "&Home", IDM_NAV_HOME
+ MENUITEM "&Stop", IDM_NAV_STOP
+ MENUITEM "&Reload", IDM_NAV_RELOAD
+ MENUITEM SEPARATOR
+ MENUITEM "C&ut", IDM_EDIT_CUT, GRAYED
+ MENUITEM "&Copy", IDM_EDIT_COPY, GRAYED
+ MENUITEM "&Paste", IDM_EDIT_PASTE, GRAYED
+ MENUITEM "&Delete", IDM_EDIT_DELETE, GRAYED
+ }
+}
+
+
+
+LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
+IDR_MENU_MAIN MENU
+{
+ POPUP "&File"
+ {
+ MENUITEM "&New Window", IDM_FILE_OPEN_WINDOW
+ MENUITEM "Open &Location", IDM_FILE_OPEN_LOCATION
+ MENUITEM "&Close", IDM_FILE_CLOSE_WINDOW
+ MENUITEM SEPARATOR
+ MENUITEM "&Save Page", IDM_FILE_SAVE_PAGE, HELP, GRAYED
+ POPUP "Save Page &As"
+ {
+ MENUITEM "Text", IDM_FILE_SAVEAS_TEXT, GRAYED
+ MENUITEM "PDF", IDM_FILE_SAVEAS_PDF, GRAYED
+ MENUITEM "Postscript", IDM_FILE_SAVEAS_POSTSCRIPT, GRAYED
+ }
+ MENUITEM SEPARATOR
+ MENUITEM "Print Pre&view", IDM_FILE_PRINT_PREVIEW
+ MENUITEM "&Print", IDM_FILE_PRINT
+ MENUITEM SEPARATOR
+ MENUITEM "E&xit", IDM_FILE_QUIT
+ }
+ POPUP "&Edit"
+ {
+ MENUITEM "Cu&t", IDM_EDIT_CUT
+ MENUITEM "&Copy", IDM_EDIT_COPY
+ MENUITEM "&Paste", IDM_EDIT_PASTE
+ MENUITEM "&Delete", IDM_EDIT_DELETE
+ MENUITEM SEPARATOR
+ MENUITEM "Select &All", IDM_EDIT_SELECT_ALL
+ MENUITEM SEPARATOR
+ MENUITEM "&Find", IDM_EDIT_SEARCH
+ }
+ POPUP "&View"
+ {
+ MENUITEM "Stop", IDM_NAV_STOP
+ MENUITEM "Reload", IDM_NAV_RELOAD
+ MENUITEM SEPARATOR
+ POPUP "&Zoom"
+ {
+ MENUITEM "Zoom &In", IDM_VIEW_ZOOMPLUS
+ MENUITEM "Zoom &Out", IDM_VIEW_ZOOMMINUS
+ MENUITEM "&Reset", IDM_VIEW_ZOOMNORMAL
+ }
+ MENUITEM SEPARATOR
+ MENUITEM "Page S&ource", IDM_VIEW_SOURCE
+ MENUITEM "&Full Screen", IDM_VIEW_FULLSCREEN
+ MENUITEM SEPARATOR
+ MENUITEM "Save size and location", IDM_VIEW_SAVE_WIN_METRICS
+ }
+ POPUP "&Navigate"
+ {
+ MENUITEM "Back", IDM_NAV_BACK
+ MENUITEM "Forward", IDM_NAV_FORWARD
+ MENUITEM "Home", IDM_NAV_HOME
+ MENUITEM SEPARATOR
+ MENUITEM "Local History", IDM_NAV_LOCALHISTORY
+ MENUITEM "Global History", IDM_NAV_GLOBALHISTORY
+ MENUITEM SEPARATOR
+ MENUITEM "Show Bookmarks", IDM_NAV_BOOKMARKS
+ }
+ POPUP "&Tools"
+ {
+ MENUITEM "&Downloads", IDM_TOOLS_DOWNLOADS
+ MENUITEM "&Show Cookies", IDM_TOOLS_COOKIES
+ POPUP "Debugging"
+ {
+ MENUITEM "Debug rendering", IDM_VIEW_TOGGLE_DEBUG_RENDERING
+ MENUITEM "Save Box Tree", IDM_VIEW_DEBUGGING_SAVE_BOXTREE, GRAYED
+ MENUITEM "Save DOM Tree", IDM_VIEW_DEBUGGING_SAVE_DOMTREE, GRAYED
+ }
+ MENUITEM SEPARATOR
+ MENUITEM "Options...", IDM_EDIT_PREFERENCES
+ }
+ POPUP "&Help"
+ {
+ MENUITEM "&Contents", IDM_HELP_CONTENTS
+ MENUITEM "G&uide", IDM_HELP_GUIDE
+ MENUITEM "&Info", IDM_HELP_INFO
+ MENUITEM SEPARATOR
+ MENUITEM "&About NetSurf", IDM_HELP_ABOUT
+ }
+}
+
+
+
+//
+// Dialog resources
+//
+LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
+IDD_ABOUT DIALOGEX 10, 10, 206, 133
+STYLE DS_SHELLFONT | WS_CAPTION | WS_VISIBLE | WS_SYSMENU
+CAPTION "About NetSurf"
+FONT 8, "Ms Shell Dlg"
+{
+ CONTROL IDR_NETSURF_BANNER, IDC_IMG1, WC_STATIC, SS_BITMAP | SS_REALSIZECONTROL, 0, 0, 205, 53, WS_EX_LEFT
+ LTEXT "NetSurf", IDC_ABOUT_VERSION, 10, 60, 185, 16, NOT WS_GROUP | SS_LEFT, WS_EX_LEFT
+ LTEXT "NetSurf is a small fast browser", IDC_ABOUT_TEXT, 10, 83, 185, 8, NOT WS_GROUP | SS_LEFT, WS_EX_LEFT
+ LTEXT "Copyright 2003-2011 The NetSurf Developers", IDC_ABOUT_COPYRIGHT, 10, 96, 185, 8, NOT WS_GROUP | SS_LEFT, WS_EX_LEFT
+ PUSHBUTTON "&OK", IDOK, 143, 111, 54, 15, 0, WS_EX_LEFT
+ PUSHBUTTON "&Credits", IDC_BTN_CREDITS, 10, 111, 54, 15, 0, WS_EX_LEFT
+ PUSHBUTTON "&Licence", IDC_BTN_LICENCE, 70, 111, 54, 15, 0, WS_EX_LEFT
+}
+
+
+
+LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
+IDD_DOWNLOAD DIALOGEX 0, 0, 201, 84
+STYLE DS_MODALFRAME | DS_SHELLFONT | WS_CAPTION | WS_VISIBLE | WS_POPUP | WS_SYSMENU
+CAPTION "Download"
+FONT 8, "Ms Shell Dlg"
+{
+ CTEXT "downloading [file] [size] from [domain] to [destination]", IDC_DOWNLOAD_LABEL, 6, 6, 189, 35, SS_CENTER, WS_EX_LEFT
+ CONTROL "progress", IDC_DOWNLOAD_PROGRESS, PROGRESS_CLASS, 0, 6, 50, 189, 10, WS_EX_LEFT
+ PUSHBUTTON "&OK", IDOK, 141, 66, 54, 15, 0, WS_EX_LEFT
+ PUSHBUTTON "&Cancel", IDCANCEL, 81, 66, 54, 15, 0, WS_EX_LEFT
+}
+
+
+
+LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
+IDD_LOGIN DIALOGEX 0, 0, 280, 93
+STYLE DS_3DLOOK | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_CAPTION | WS_VISIBLE | WS_POPUP | WS_SYSMENU
+CAPTION "Log In"
+FONT 8, "Ms Shell Dlg"
+{
+ LTEXT "Password:", 0, 7, 53, 35, 9, SS_LEFT, WS_EX_LEFT
+ LTEXT "User name:", 0, 7, 35, 40, 9, SS_LEFT, WS_EX_LEFT
+ LTEXT "The site foo.bar requires authorization for a realm", IDC_LOGIN_DESCRIPTION, 49, 7, 224, 18, SS_LEFT, WS_EX_LEFT
+ EDITTEXT IDC_LOGIN_USERNAME, 49, 32, 224, 14, ES_AUTOHSCROLL, WS_EX_LEFT
+ EDITTEXT IDC_LOGIN_PASSWORD, 49, 50, 224, 14, ES_AUTOHSCROLL | ES_PASSWORD, WS_EX_LEFT
+ DEFPUSHBUTTON "Log in", IDOK, 169, 71, 50, 14, 0, WS_EX_LEFT
+ PUSHBUTTON "Cancel", IDCANCEL, 223, 71, 50, 14, 0, WS_EX_LEFT
+}
+
+
+
+LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
+IDD_OPTIONS_APPERANCE DIALOGEX 10, 10, 220, 200
+STYLE DS_CONTROL | DS_SHELLFONT
+CAPTION "Apperance"
+FONT 8, "MS Shell Dlg", 0, 0, 1
+{
+ LTEXT "Fonts", IDC_STATIC, 7, 7, 20, 8, NOT WS_GROUP | SS_LEFT, WS_EX_LEFT
+ CONTROL "", IDC_STATIC, WC_STATIC, SS_ETCHEDFRAME, 27, 11, 186, 1, WS_EX_LEFT
+ LTEXT "Sans-serif:", IDC_STATIC, 43, 22, 44, 8, SS_LEFT, WS_EX_LEFT
+ PUSHBUTTON "Sans-serif", IDC_PREFS_SANS, 89, 19, 50, 14, 0, WS_EX_LEFT
+ LTEXT "Serif:", IDC_STATIC, 43, 40, 24, 8, SS_LEFT, WS_EX_LEFT
+ PUSHBUTTON "Serif", IDC_PREFS_SERIF, 89, 37, 50, 14, 0, WS_EX_LEFT
+ LTEXT "Monospace:", IDC_STATIC, 43, 58, 40, 8, SS_LEFT, WS_EX_LEFT
+ PUSHBUTTON "Monospace", IDC_PREFS_MONO, 89, 55, 50, 14, 0, WS_EX_LEFT
+ LTEXT "Cursive:", IDC_STATIC, 43, 76, 32, 8, SS_LEFT, WS_EX_LEFT
+ PUSHBUTTON "Cursive", IDC_PREFS_CURSIVE, 89, 73, 50, 14, 0, WS_EX_LEFT
+ LTEXT "Fantasy:", IDC_STATIC, 43, 94, 32, 8, SS_LEFT, WS_EX_LEFT
+ PUSHBUTTON "Fantasy", IDC_PREFS_FANTASY, 89, 91, 50, 14, 0, WS_EX_LEFT
+ LTEXT "Default:", IDC_STATIC, 43, 112, 38, 8, SS_LEFT, WS_EX_LEFT
+ COMBOBOX IDC_PREFS_FONTDEF, 89, 109, 50, 60, WS_TABSTOP | CBS_DROPDOWNLIST, WS_EX_LEFT
+ LTEXT "Size:", IDC_STATIC, 147, 112, 16, 8, SS_LEFT, WS_EX_LEFT
+ EDITTEXT IDC_PREFS_FONT_SIZE, 165, 109, 35, 14, NOT WS_BORDER | ES_NUMBER, WS_EX_CLIENTEDGE
+ CONTROL "Font Size", IDC_PREFS_FONT_SIZE_SPIN, UPDOWN_CLASS, UDS_ALIGNRIGHT | UDS_AUTOBUDDY, 75, 137, 11, 15, WS_EX_LEFT
+ LTEXT "Minimum Size:", IDC_STATIC, 43, 130, 52, 8, SS_LEFT, WS_EX_LEFT
+ EDITTEXT IDC_PREFS_FONT_MINSIZE, 97, 127, 35, 14, NOT WS_BORDER, WS_EX_CLIENTEDGE
+ CONTROL "Minimum Font Size", IDC_PREFS_FONT_MINSIZE_SPIN, UPDOWN_CLASS, UDS_ALIGNRIGHT | UDS_AUTOBUDDY, 76, 159, 11, 15, WS_EX_LEFT
+ LTEXT "Animation", IDC_STATIC, 7, 148, 36, 8, NOT WS_GROUP | SS_LEFT, WS_EX_LEFT
+ CONTROL "", IDC_STATIC, WC_STATIC, SS_ETCHEDFRAME, 43, 152, 170, 1, WS_EX_LEFT
+ AUTOCHECKBOX "Disable", IDC_PREFS_NOANIMATION, 43, 163, 39, 10, 0, WS_EX_LEFT
+}
+
+
+
+LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
+IDD_OPTIONS_CONNECTIONS DIALOGEX 0, 0, 220, 200
+STYLE DS_CONTROL | DS_SHELLFONT
+CAPTION "Connections"
+FONT 8, "MS Shell Dlg", 0, 0, 1
+{
+ LTEXT "Proxy", IDC_STATIC, 7, 7, 30, 8, NOT WS_GROUP | SS_LEFT, WS_EX_LEFT
+ CONTROL "", IDC_STATIC, WC_STATIC, SS_ETCHEDFRAME, 37, 11, 176, 1, WS_EX_LEFT
+ LTEXT "Type:", IDC_STATIC, 43, 22, 40, 8, SS_LEFT, WS_EX_LEFT
+ COMBOBOX IDC_PREFS_PROXYTYPE, 80, 19, 60, 60, WS_TABSTOP | CBS_DROPDOWNLIST, WS_EX_LEFT
+ LTEXT "Server:", IDC_STATIC, 43, 39, 28, 8, SS_LEFT, WS_EX_LEFT
+ EDITTEXT IDC_PREFS_PROXYHOST, 80, 36, 80, 14, NOT WS_BORDER | ES_AUTOHSCROLL | ES_OEMCONVERT, WS_EX_CLIENTEDGE
+ LTEXT "Port:", IDC_STATIC, 164, 39, 16, 8, SS_LEFT, WS_EX_LEFT
+ EDITTEXT IDC_PREFS_PROXYPORT, 182, 36, 24, 14, NOT WS_BORDER | ES_AUTOHSCROLL | ES_OEMCONVERT, WS_EX_CLIENTEDGE
+ LTEXT "Username:", IDC_STATIC, 43, 60, 35, 8, SS_LEFT, WS_EX_LEFT
+ EDITTEXT IDC_PREFS_PROXYNAME, 80, 57, 45, 14, NOT WS_BORDER | ES_AUTOHSCROLL | ES_OEMCONVERT, WS_EX_CLIENTEDGE
+ LTEXT "Password:", IDC_STATIC, 132, 60, 34, 8, SS_LEFT, WS_EX_LEFT
+ EDITTEXT IDC_PREFS_PROXYPASS, 168, 57, 45, 14, NOT WS_BORDER | ES_AUTOHSCROLL | ES_OEMCONVERT | ES_PASSWORD, WS_EX_CLIENTEDGE
+ LTEXT "Fetchers", IDC_STATIC, 7, 78, 40, 8, NOT WS_GROUP | SS_LEFT, WS_EX_LEFT
+ CONTROL "", IDC_STATIC, WC_STATIC, SS_ETCHEDFRAME, 42, 82, 171, 1, WS_EX_LEFT
+ LTEXT "Max Fetchers:", IDC_STATIC, 43, 96, 64, 8, SS_LEFT, WS_EX_LEFT
+ EDITTEXT IDC_PREFS_FETCHERS, 111, 93, 30, 14, ES_RIGHT | ES_NUMBER, WS_EX_LEFT
+ CONTROL "Max Fetchers", IDC_PREFS_FETCHERS_SPIN, UPDOWN_CLASS, UDS_ALIGNRIGHT | UDS_AUTOBUDDY, 341, 122, 11, 15, WS_EX_LEFT
+ LTEXT "Fetches per host:", IDC_STATIC, 43, 118, 64, 8, SS_LEFT, WS_EX_LEFT
+ EDITTEXT IDC_PREFS_FETCH_HOST, 111, 114, 30, 14, ES_RIGHT | ES_NUMBER, WS_EX_LEFT
+ CONTROL "Fetches per host", IDC_PREFS_FETCH_HOST_SPIN, UPDOWN_CLASS, UDS_ALIGNRIGHT | UDS_AUTOBUDDY, 341, 140, 11, 15, WS_EX_LEFT
+ LTEXT "Cached Fetches:", IDC_STATIC, 43, 138, 64, 8, SS_LEFT, WS_EX_LEFT
+ EDITTEXT IDC_PREFS_FETCH_HANDLES, 111, 135, 30, 14, ES_RIGHT | ES_NUMBER, WS_EX_LEFT
+ CONTROL "Cached Fetches", IDC_PREFS_FETCH_HANDLES_SPIN, UPDOWN_CLASS, UDS_ALIGNRIGHT | UDS_AUTOBUDDY, 341, 158, 11, 15, WS_EX_LEFT
+}
+
+
+
+LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
+IDD_OPTIONS_GENERAL DIALOGEX 0, 0, 220, 200
+STYLE DS_CONTROL | DS_SHELLFONT
+CAPTION "General"
+FONT 8, "MS Shell Dlg", 0, 0, 1
+{
+ LTEXT "Home Page", IDC_STATIC, 7, 7, 40, 8, NOT WS_GROUP | SS_LEFT, WS_EX_LEFT
+ CONTROL "", IDC_STATIC, WC_STATIC, SS_ETCHEDFRAME, 47, 11, 166, 1, WS_EX_LEFT
+ CONTROL IDR_HOME_BITMAP, IDC_STATIC, WC_STATIC, SS_BITMAP, 15, 19, 24, 24, WS_EX_LEFT
+ EDITTEXT IDC_PREFS_HOMEPAGE, 43, 19, 170, 14, NOT WS_BORDER | ES_AUTOHSCROLL | ES_OEMCONVERT, WS_EX_CLIENTEDGE
+ LTEXT "Content Control", IDC_STATIC, 7, 40, 60, 8, NOT WS_GROUP | SS_LEFT, WS_EX_LEFT
+ CONTROL "", IDC_STATIC, WC_STATIC, SS_ETCHEDFRAME, 67, 44, 146, 1, WS_EX_LEFT
+ AUTOCHECKBOX "Hide Images", IDC_PREFS_IMAGES, 43, 52, 67, 10, 0, WS_EX_LEFT
+ AUTOCHECKBOX "Hide Advertisements", IDC_PREFS_ADVERTS, 43, 66, 81, 10, 0, WS_EX_LEFT
+ AUTOCHECKBOX "Send referer", IDC_PREFS_REFERER, 43, 80, 55, 10, 0, WS_EX_LEFT
+}
+
+
+
+//
+// Icon resources
+//
+LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
+IDR_NETSURF_ICON ICON "NetSurf.ico"
+
+
+//
+// User resources
+//
+
+LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
+default.css USER "default.css"
+adblock.css USER "adblock.css"
+internal.css USER "internal.css"
+quirks.css USER "quirks.css"
+welcome.html USER "welcome.html"
+licence.html USER "licence.html"
+credits.html USER "credits.html"
+netsurf.png USER "netsurf.png"
+icons/arrow-l.png USER "icons/arrow-l.png"
+icons/content.png USER "icons/content.png"
+icons/directory.png USER "icons/directory.png"
+icons/directory2.png USER "icons/directory2.png"
+icons/hotlist-add.png USER "icons/hotlist-add.png"
+icons/hotlist-rmv.png USER "icons/hotlist-rmv.png"
+icons/search.png USER "icons/search.png"
+
+/* translated messages */
+
+/* english is the fallback */
+LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
+messages USER "en/Messages"
+
+LANGUAGE LANG_FRENCH, SUBLANG_DEFAULT
+messages USER "fr/Messages"
+
+LANGUAGE LANG_GERMAN, SUBLANG_DEFAULT
+messages USER "de/Messages"
+
+LANGUAGE LANG_ITALIAN, SUBLANG_DEFAULT
+messages USER "it/Messages"
+
+LANGUAGE LANG_DUTCH, SUBLANG_DEFAULT
+messages USER "nl/Messages"
diff --git a/frontends/windows/res/welcome.html b/frontends/windows/res/welcome.html
index 28362130a..d5220f90a 120000
--- a/frontends/windows/res/welcome.html
+++ b/frontends/windows/res/welcome.html
@@ -1 +1 @@
-../../../!NetSurf/Resources/en/welcome.html,faf \ No newline at end of file
+../../../resources/en/welcome.html \ No newline at end of file
diff --git a/frontends/windows/resourceid.h b/frontends/windows/resourceid.h
index 605a77cb1..db275913b 100644
--- a/frontends/windows/resourceid.h
+++ b/frontends/windows/resourceid.h
@@ -16,30 +16,28 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef _NETSURF_WINDOWS_RESOURCEID_H_
-#define _NETSURF_WINDOWS_RESOURCEID_H_
+#ifndef NETSURF_WINDOWS_RESOURCEID_H
+#define NETSURF_WINDOWS_RESOURCEID_H
#ifndef IDC_STATIC
#define IDC_STATIC (-1)
#endif
#define IDR_NETSURF_ICON 100
+#define IDR_THROBBER_AVI 101
#define IDR_TOOLBAR_BITMAP 102
#define IDR_TOOLBAR_BITMAP_GREY 103
#define IDR_TOOLBAR_BITMAP_HOT 104
#define IDR_NETSURF_BANNER 105
-#define IDR_HOME_BITMAP 114
+#define IDR_HOME_BITMAP 106
+#define IDC_PAGEINFO 107
+#define IDB_PAGEINFO_INSECURE 108
+#define IDB_PAGEINFO_SECURE 109
+#define IDB_PAGEINFO_INTERNAL 110
+#define IDB_PAGEINFO_WARNING 111
+#define IDB_PAGEINFO_LOCAL 112
-#define IDR_THROBBER_FRAME0_BITMAP 106
-#define IDR_THROBBER_FRAME1_BITMAP 107
-#define IDR_THROBBER_FRAME2_BITMAP 108
-#define IDR_THROBBER_FRAME3_BITMAP 109
-#define IDR_THROBBER_FRAME4_BITMAP 110
-#define IDR_THROBBER_FRAME5_BITMAP 111
-#define IDR_THROBBER_FRAME6_BITMAP 112
-#define IDR_THROBBER_FRAME7_BITMAP 113
-
-#define IDD_DLG_ABOUT 1000
+#define IDD_ABOUT 1000
#define IDC_IMG1 1001
#define IDC_ABOUT_VERSION 1002
#define IDC_ABOUT_TEXT 1003
@@ -47,11 +45,11 @@
#define IDC_BTN_CREDITS 1005
#define IDC_BTN_LICENCE 1006
-#define IDD_DLG_DOWNLOAD 1100
+#define IDD_DOWNLOAD 1100
#define IDC_DOWNLOAD_LABEL 1101
#define IDC_DOWNLOAD_PROGRESS 1102
-#define IDD_DLG_MAIN 1300
+#define IDD_MAIN 1300
#define IDC_MAIN_TOOLBAR 1301
#define IDC_MAIN_URLBAR 1302
#define IDC_MAIN_THROBBER 1303
@@ -59,13 +57,13 @@
#define IDC_MAIN_STATUSBAR 1305
#define IDC_MAIN_LAUNCH_URL 1306
-#define IDD_DLG_OPTIONS_GENERAL 1400
+#define IDD_OPTIONS_GENERAL 1400
#define IDC_PREFS_HOMEPAGE 1401
#define IDC_PREFS_IMAGES 1402
#define IDC_PREFS_ADVERTS 1403
#define IDC_PREFS_REFERER 1404
-#define IDD_DLG_OPTIONS_CONNECTIONS 1500
+#define IDD_OPTIONS_CONNECTIONS 1500
#define IDC_PREFS_FETCHERS 1501
#define IDC_PREFS_FETCHERS_SPIN 1502
#define IDC_PREFS_FETCH_HOST 1503
@@ -73,7 +71,7 @@
#define IDC_PREFS_FETCH_HANDLES 1505
#define IDC_PREFS_FETCH_HANDLES_SPIN 1506
-#define IDD_DLG_OPTIONS_APPERANCE 1200
+#define IDD_OPTIONS_APPERANCE 1200
#define IDC_PREFS_PROXYTYPE 1206
#define IDC_PREFS_PROXYHOST 1207
#define IDC_PREFS_PROXYPORT 1208
@@ -90,14 +88,11 @@
#define IDC_PREFS_FANTASY 1219
#define IDC_PREFS_FONTDEF 1220
#define IDC_PREFS_NOANIMATION 1227
-#define IDC_PREFS_ANIMATIONDELAY 1228
-#define IDC_PREFS_ANIMATIONDELAY_SPIN 1229
-
-#define IDD_DLG_SSLCERT 1600
-#define IDC_SSLCERT_IMG1 1601
-#define IDC_SSLCERT_BTN_ACCEPT 1602
-#define IDC_SSLCERT_BTN_REJECT 1603
+#define IDD_LOGIN 1700
+#define IDC_LOGIN_USERNAME 1701
+#define IDC_LOGIN_PASSWORD 1702
+#define IDC_LOGIN_DESCRIPTION 1703
#define IDR_MENU_MAIN 10000
#define IDM_FILE_OPEN_WINDOW 10101
diff --git a/frontends/windows/ssl_cert.c b/frontends/windows/ssl_cert.c
deleted file mode 100644
index 4db061626..000000000
--- a/frontends/windows/ssl_cert.c
+++ /dev/null
@@ -1,471 +0,0 @@
-/*
- * Copyright 2016 Vincent Sanders <vince@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 win32 certificate viewing using nsw32 core windows.
- */
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <windows.h>
-
-#include "utils/log.h"
-#include "utils/nsoption.h"
-#include "netsurf/keypress.h"
-#include "netsurf/plotters.h"
-#include "desktop/sslcert_viewer.h"
-
-#include "windows/windbg.h"
-#include "windows/plot.h"
-#include "windows/corewindow.h"
-#include "windows/gui.h"
-#include "windows/resourceid.h"
-#include "windows/ssl_cert.h"
-
-/* spacing and sizes for dialog elements from
- * https://msdn.microsoft.com/en-us/library/windows/desktop/dn742486(v=vs.85).aspx#sizingandspacing
- */
-/** dialog margin */
-#define DLG_MRGN 11
-/** warning icon height */
-#define WRN_ICO_H 32
-/** comand button width */
-#define CMD_BTN_W 75
-/** command button height */
-#define CMD_BTN_H 23
-
-static const char windowclassname_sslcert[] = "nswssslcertwindow";
-
-/** win32 ssl certificate view context */
-struct nsw32_sslcert_window {
- struct nsw32_corewindow core;
-
- /** SSL certificate viewer context data */
- struct sslcert_session_data *ssl_data;
-
- /** dialog window handle */
- HWND hWnd;
-
- /** accept button handle */
- HWND hAccept;
-
- /** reject button handle */
- HWND hReject;
-
- /** warning text handle */
- HWND hTxt;
-};
-
-
-/**
- * callback for keypress on ssl certificate window
- *
- * \param nsw32_cw The nsw32 core window structure.
- * \param nskey The netsurf key code
- * \return NSERROR_OK on success otherwise appropriate error code
- */
-static nserror
-nsw32_sslcert_viewer_key(struct nsw32_corewindow *nsw32_cw, uint32_t nskey)
-{
- struct nsw32_sslcert_window *crtvrfy_win;
-
- /* technically degenerate container of */
- crtvrfy_win = (struct nsw32_sslcert_window *)nsw32_cw;
-
- if (sslcert_viewer_keypress(crtvrfy_win->ssl_data, nskey)) {
- return NSERROR_OK;
- }
- return NSERROR_NOT_IMPLEMENTED;
-}
-
-
-/**
- * callback for mouse action on ssl certificate window
- *
- * \param nsw32_cw The nsw32 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 appropriate error code
- */
-static nserror
-nsw32_sslcert_viewer_mouse(struct nsw32_corewindow *nsw32_cw,
- browser_mouse_state mouse_state,
- int x, int y)
-{
- struct nsw32_sslcert_window *crtvrfy_win;
-
- /* technically degenerate container of */
- crtvrfy_win = (struct nsw32_sslcert_window *)nsw32_cw;
-
- sslcert_viewer_mouse_action(crtvrfy_win->ssl_data, mouse_state, x, y);
-
- return NSERROR_OK;
-}
-
-
-/**
- * callback on draw event for ssl certificate window
- *
- * \param nsw32_cw The nsw32 core window structure.
- * \param scrollx The horizontal scroll offset.
- * \param scrolly The vertical scroll offset.
- * \param r The rectangle of the window that needs updating.
- * \return NSERROR_OK on success otherwise appropriate error code
- */
-static nserror
-nsw32_sslcert_viewer_draw(struct nsw32_corewindow *nsw32_cw,
- int scrollx,
- int scrolly,
- struct rect *r)
-{
- struct nsw32_sslcert_window *crtvrfy_win;
- struct redraw_context ctx = {
- .interactive = true,
- .background_images = true,
- .plot = &win_plotters
- };
-
- /* technically degenerate container of */
- crtvrfy_win = (struct nsw32_sslcert_window *)nsw32_cw;
-
- sslcert_viewer_redraw(crtvrfy_win->ssl_data,
- -scrollx, -scrolly,
- r, &ctx);
-
- return NSERROR_OK;
-}
-
-
-/**
- * callback on close event for ssl certificate window
- *
- * \param nsw32_cw The nsw32 core window structure.
- * \return NSERROR_OK on success otherwise appropriate error code
- */
-static nserror
-nsw32_sslcert_viewer_close(struct nsw32_corewindow *nsw32_cw)
-{
- DestroyWindow(nsw32_cw->hWnd);
-
- return NSERROR_OK;
-}
-
-
-/* exported interface documented in nsw32/ssl_cert.h */
-nserror nsw32_cert_verify(struct nsurl *url,
- const struct ssl_cert_info *certs,
- unsigned long num,
- nserror (*cb)(bool proceed, void *pw),
- void *cbpw)
-{
- struct nsw32_sslcert_window *ncwin;
- nserror res;
-
- ncwin = malloc(sizeof(struct nsw32_sslcert_window));
- if (ncwin == NULL) {
- return NSERROR_NOMEM;
- }
-
- /* 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;
- }
-
- NSLOG(netsurf, INFO, "creating hInstance %p SSL window", hinst);
- ncwin->hWnd = CreateWindowEx(0,
- windowclassname_sslcert,
- "SSL Certificate viewer",
- WS_OVERLAPPEDWINDOW |
- WS_CLIPSIBLINGS |
- WS_CLIPCHILDREN |
- CS_DBLCLKS,
- CW_USEDEFAULT,
- CW_USEDEFAULT,
- 500,
- 400,
- NULL,
- NULL,
- hinst,
- NULL);
- if (ncwin->hWnd == NULL) {
- NSLOG(netsurf, INFO, "Window create failed");
- return NSERROR_NOMEM;
- }
-
- ncwin->core.title = NULL;
- ncwin->core.draw = nsw32_sslcert_viewer_draw;
- ncwin->core.key = nsw32_sslcert_viewer_key;
- ncwin->core.mouse = nsw32_sslcert_viewer_mouse;
- ncwin->core.close = nsw32_sslcert_viewer_close;
-
- res = nsw32_corewindow_init(hinst, ncwin->hWnd, &ncwin->core);
- 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;
- }
-
- ncwin->hAccept = CreateWindowEx(0,
- "BUTTON",
- "Accept",
- WS_TABSTOP|WS_VISIBLE|
- WS_CHILD|BS_DEFPUSHBUTTON,
- CW_USEDEFAULT,
- CW_USEDEFAULT,
- CMD_BTN_W,
- CMD_BTN_H,
- ncwin->hWnd,
- (HMENU)IDC_SSLCERT_BTN_ACCEPT,
- hinst,
- NULL);
- HGDIOBJ hfDefault=GetStockObject(DEFAULT_GUI_FONT);
- SendMessage(ncwin->hAccept, WM_SETFONT, (WPARAM)hfDefault, MAKELPARAM(FALSE,0));
- ncwin->hReject = CreateWindowEx(0,
- "BUTTON",
- "Reject",
- WS_TABSTOP|WS_VISIBLE|
- WS_CHILD|BS_DEFPUSHBUTTON,
- CW_USEDEFAULT,
- CW_USEDEFAULT,
- CMD_BTN_W,
- CMD_BTN_H,
- ncwin->hWnd,
- (HMENU)IDC_SSLCERT_BTN_REJECT,
- hinst,
- NULL);
- SendMessage(ncwin->hReject, WM_SETFONT, (WPARAM)hfDefault, MAKELPARAM(FALSE,0));
-
- CreateWindowEx(0,
- "STATIC",
- IDI_WARNING,
- WS_VISIBLE | WS_CHILD | SS_ICON,
- DLG_MRGN,
- DLG_MRGN,
- CMD_BTN_W,
- CMD_BTN_H,
- ncwin->hWnd,
- NULL,
- NULL,
- NULL);
- ncwin->hTxt = CreateWindowEx(0,
- "STATIC",
- "NetSurf failed to verify the authenticity of an SSL certificate. Verify the certificate details",
- WS_VISIBLE | WS_CHILD | SS_LEFT,
- DLG_MRGN + WRN_ICO_H + DLG_MRGN,
- DLG_MRGN + 5,
- 400,
- WRN_ICO_H - 5,
- ncwin->hWnd,
- NULL,
- NULL,
- NULL);
- SendMessage(ncwin->hTxt, WM_SETFONT, (WPARAM)hfDefault, MAKELPARAM(FALSE,0));
-
- SetProp(ncwin->hWnd, TEXT("CertWnd"), (HANDLE)ncwin);
-
- ShowWindow(ncwin->hWnd, SW_SHOWNORMAL);
-
- return NSERROR_OK;
-}
-
-
-/**
- * position and size ssl cert window widgets.
- *
- * \param hwnd The win32 handle of the window
- * \param certwin The certificate viewer context
- */
-static void
-nsw32_window_ssl_cert_size(HWND hwnd, struct nsw32_sslcert_window *certwin)
-{
- RECT rc;
- GetClientRect(hwnd, &rc);
- /* position certificate drawable */
- MoveWindow(certwin->core.hWnd,
- DLG_MRGN,
- DLG_MRGN + WRN_ICO_H + DLG_MRGN,
- rc.right - (DLG_MRGN + DLG_MRGN),
- rc.bottom - (DLG_MRGN + WRN_ICO_H + DLG_MRGN + DLG_MRGN + CMD_BTN_H + DLG_MRGN),
- TRUE);
- /* position accept button */
- MoveWindow(certwin->hAccept,
- rc.right - (DLG_MRGN + CMD_BTN_W),
- rc.bottom - (DLG_MRGN + CMD_BTN_H),
- CMD_BTN_W,
- CMD_BTN_H,
- TRUE);
- /* position reject button */
- MoveWindow(certwin->hReject,
- rc.right - (DLG_MRGN + CMD_BTN_W + 7 + CMD_BTN_W),
- rc.bottom - (DLG_MRGN + CMD_BTN_H),
- CMD_BTN_W,
- CMD_BTN_H,
- TRUE);
- /* position text */
- MoveWindow(certwin->hTxt,
- DLG_MRGN + WRN_ICO_H + DLG_MRGN,
- DLG_MRGN + 5,
- rc.right - (DLG_MRGN + WRN_ICO_H + DLG_MRGN + DLG_MRGN),
- WRN_ICO_H - 5,
- TRUE);
-}
-
-
-/**
- * Destroy a certificate viewing window
- *
- * \param crtwin The certificate viewer context
- * \return NSERROR_OK on success otherwise appropriate error code
- */
-static nserror nsw32_crtvrfy_destroy(struct nsw32_sslcert_window *crtwin)
-{
- nserror res;
-
- res = sslcert_viewer_fini(crtwin->ssl_data);
- if (res == NSERROR_OK) {
- res = nsw32_corewindow_fini(&crtwin->core);
- DestroyWindow(crtwin->hWnd);
- free(crtwin);
- }
- return res;
-}
-
-
-/**
- * handle command message on ssl certificate viewing window.
- *
- * \param hwnd The win32 window handle.
- * \param crtwin certificate window context.
- * \param notification_code notifiction code
- * \param identifier notification identifier
- * \param ctrl_window The win32 control window handle
- * \return appropriate response for command
- */
-static LRESULT
-nsw32_window_ssl_cert_command(HWND hwnd,
- struct nsw32_sslcert_window *crtwin,
- int notification_code,
- int identifier,
- HWND ctrl_window)
-{
- NSLOG(netsurf, INFO,
- "notification_code %x identifier %x ctrl_window %p",
- notification_code,
- identifier,
- ctrl_window);
-
- switch(identifier) {
- case IDC_SSLCERT_BTN_ACCEPT:
- sslcert_viewer_accept(crtwin->ssl_data);
- nsw32_crtvrfy_destroy(crtwin);
- break;
-
- case IDC_SSLCERT_BTN_REJECT:
- sslcert_viewer_reject(crtwin->ssl_data);
- nsw32_crtvrfy_destroy(crtwin);
- break;
-
- default:
- return 1; /* unhandled */
- }
- return 0; /* control message handled */
-}
-
-
-/**
- * callback for SSL certificate window win32 events
- *
- * \param hwnd The win32 window handle
- * \param msg The win32 message identifier
- * \param wparam The w win32 parameter
- * \param lparam The l win32 parameter
- */
-static LRESULT CALLBACK
-nsw32_window_ssl_cert_event_callback(HWND hwnd,
- UINT msg,
- WPARAM wparam,
- LPARAM lparam)
-{
- struct nsw32_sslcert_window *crtwin;
- crtwin = GetProp(hwnd, TEXT("CertWnd"));
- if (crtwin != NULL) {
- switch (msg) {
- case WM_SIZE:
- nsw32_window_ssl_cert_size(hwnd, crtwin);
- break;
-
- case WM_COMMAND:
- if (nsw32_window_ssl_cert_command(hwnd,
- crtwin,
- HIWORD(wparam),
- LOWORD(wparam),
- (HWND)lparam) == 0) {
- return 0;
- }
- break;
-
- case WM_CLOSE:
- sslcert_viewer_reject(crtwin->ssl_data);
- nsw32_crtvrfy_destroy(crtwin);
- return 0;
- }
- }
-
- return DefWindowProc(hwnd, msg, wparam, lparam);
-}
-
-
-/* exported interface documented in nsw32/ssl_cert.h */
-nserror nsws_create_cert_verify_class(HINSTANCE hInstance)
-{
- nserror ret = NSERROR_OK;
- WNDCLASSEX wc;
-
- /* drawable area */
- wc.cbSize = sizeof(WNDCLASSEX);
- wc.style = 0;
- wc.lpfnWndProc = nsw32_window_ssl_cert_event_callback;
- wc.cbClsExtra = 0;
- wc.cbWndExtra = 0;
- wc.hInstance = hInstance;
- wc.hIcon = NULL;
- wc.hCursor = NULL;
- wc.hbrBackground = (HBRUSH)(COLOR_MENU + 1);
- wc.lpszMenuName = NULL;
- wc.lpszClassName = windowclassname_sslcert;
- wc.hIconSm = NULL;
-
- if (RegisterClassEx(&wc) == 0) {
- win_perror("CertVerifyClass");
- ret = NSERROR_INIT_FAILED;
- }
-
- return ret;
-}
diff --git a/frontends/windows/ssl_cert.h b/frontends/windows/ssl_cert.h
deleted file mode 100644
index 6c1f0415a..000000000
--- a/frontends/windows/ssl_cert.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright 2016 Vincent Sanders <vince@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
- * Interface to win32 certificate viewing using nsw32 core windows.
- */
-
-#ifndef NETSURF_WINDOWS_SSL_CERT_H
-#define NETSURF_WINDOWS_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 nsw32_cert_verify(struct nsurl *url, const struct ssl_cert_info *certs, unsigned long num, nserror (*cb)(bool proceed, void *pw), void *cbpw);
-
-/**
- * Create the ssl viewer window class.
- *
- * \param hinstance The application instance
- * \return NSERROR_OK on success or NSERROR_INIT_FAILED if the class
- * creation failed.
- */
-nserror nsws_create_cert_verify_class(HINSTANCE hinstance);
-
-#endif
diff --git a/frontends/windows/windbg.h b/frontends/windows/windbg.h
index 6cd9f97f8..f09cea9e6 100644
--- a/frontends/windows/windbg.h
+++ b/frontends/windows/windbg.h
@@ -16,20 +16,25 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef _NETSURF_WINDOWS_WINDBG_H_
-#define _NETSURF_WINDOWS_WINDBG_H_
+#ifndef NETSURF_WINDOWS_WINDBG_H
+#define NETSURF_WINDOWS_WINDBG_H
#include "utils/log.h"
const char *msg_num_to_name(int msg);
void win_perror(const char *lpszFunction);
+/**
+ * log windows message
+ *
+ * log a windows message with symbols converted to human redable
+ */
#define LOG_WIN_MSG(h, m, w, l) \
if (((m) != WM_SETCURSOR) && \
((m) != WM_MOUSEMOVE) && \
((m) != WM_NCHITTEST) && \
((m) != WM_ENTERIDLE)) \
- NSLOG(netsurf, INFO, \
+ NSLOG(netsurf, DEBUG, \
"%s, hwnd %p, w 0x%x, l 0x%Ix", \
msg_num_to_name(m), h, w, l)
diff --git a/frontends/windows/window.c b/frontends/windows/window.c
index 90d076812..00e5a7e05 100644
--- a/frontends/windows/window.c
+++ b/frontends/windows/window.c
@@ -55,43 +55,35 @@
#include "windows/global_history.h"
#include "windows/window.h"
-/** List of all our gui windows */
+/**
+ * List of all gui windows
+ */
static struct gui_window *window_list = NULL;
-/** The main window class name */
-static const char windowclassname_main[] = "nswsmainwindow";
+/**
+ * The main window class name
+ */
+static const LPCWSTR windowclassname_main = L"nswsmainwindow";
-/** width of the throbber element */
+/**
+ * width of the throbber element
+ */
#define NSWS_THROBBER_WIDTH 24
-/** height of the url entry box */
+/**
+ * height of the url entry box
+ */
#define NSWS_URLBAR_HEIGHT 23
-/** Number of open windows */
-static int open_windows = 0;
-
-
/**
- * Obtain the DPI of the display.
- *
- * \param hwnd A win32 window handle to get the DPI for
- * \return The DPI of the device the window is displayed on.
+ * height of the Page Information bitmap button
*/
-static int get_window_dpi(HWND hwnd)
-{
- HDC hdc = GetDC(hwnd);
- int dpi = GetDeviceCaps(hdc, LOGPIXELSY);
-
- if (dpi <= 10) {
- dpi = 96; /* 96DPI is the default */
- }
+#define NSW32_PGIBUTTON_HEIGHT 16
- ReleaseDC(hwnd, hdc);
-
- NSLOG(netsurf, INFO, "FIX DPI %d", dpi);
-
- return dpi;
-}
+/**
+ * Number of open windows
+ */
+static int open_windows = 0;
/**
@@ -152,6 +144,23 @@ static HWND nsws_window_create(HINSTANCE hInstance, struct gui_window *gw)
{
HWND hwnd;
INITCOMMONCONTROLSEX icc;
+ int xpos = CW_USEDEFAULT;
+ int ypos = CW_USEDEFAULT;
+ int width = CW_USEDEFAULT;
+ int height = CW_USEDEFAULT;
+
+ if ((nsoption_int(window_width) >= 100) &&
+ (nsoption_int(window_height) >= 100) &&
+ (nsoption_int(window_x) >= 0) &&
+ (nsoption_int(window_y) >= 0)) {
+ xpos = nsoption_int(window_x);
+ ypos = nsoption_int(window_y);
+ width = nsoption_int(window_width);
+ height = nsoption_int(window_height);
+
+ NSLOG(netsurf, DEBUG, "Setting Window position %d,%d %d,%d",
+ xpos, ypos, width, height);
+ }
icc.dwSize = sizeof(icc);
icc.dwICC = ICC_BAR_CLASSES | ICC_WIN95_CLASSES;
@@ -163,53 +172,28 @@ static HWND nsws_window_create(HINSTANCE hInstance, struct gui_window *gw)
gw->mainmenu = LoadMenu(hInstance, MAKEINTRESOURCE(IDR_MENU_MAIN));
gw->rclick = LoadMenu(hInstance, MAKEINTRESOURCE(IDR_MENU_CONTEXT));
- NSLOG(netsurf, INFO,
- "creating hInstance %p GUI window %p",
- hInstance, gw);
- hwnd = CreateWindowEx(0,
- windowclassname_main,
- "NetSurf Browser",
- WS_OVERLAPPEDWINDOW |
- WS_CLIPCHILDREN |
- WS_CLIPSIBLINGS |
- CS_DBLCLKS,
- CW_USEDEFAULT,
- CW_USEDEFAULT,
- gw->width,
- gw->height,
- NULL,
- gw->mainmenu,
- hInstance,
- NULL);
+ hwnd = CreateWindowExW(0,
+ windowclassname_main,
+ L"NetSurf Browser",
+ WS_OVERLAPPEDWINDOW |
+ WS_CLIPCHILDREN |
+ WS_CLIPSIBLINGS |
+ CS_DBLCLKS,
+ xpos,
+ ypos,
+ width,
+ height,
+ NULL,
+ gw->mainmenu,
+ hInstance,
+ (LPVOID)gw);
if (hwnd == NULL) {
NSLOG(netsurf, INFO, "Window create failed");
- return NULL;
- }
-
- /* set the gui window associated with this browser */
- SetProp(hwnd, TEXT("GuiWnd"), (HANDLE)gw);
-
- browser_set_dpi(get_window_dpi(hwnd));
-
- if ((nsoption_int(window_width) >= 100) &&
- (nsoption_int(window_height) >= 100) &&
- (nsoption_int(window_x) >= 0) &&
- (nsoption_int(window_y) >= 0)) {
- NSLOG(netsurf, INFO,
- "Setting Window position %d,%d %d,%d",
- nsoption_int(window_x), nsoption_int(window_y),
- nsoption_int(window_width), nsoption_int(window_height));
- SetWindowPos(hwnd, HWND_TOP,
- nsoption_int(window_x),
- nsoption_int(window_y),
- nsoption_int(window_width),
- nsoption_int(window_height),
- SWP_SHOWWINDOW);
+ } else {
+ nsws_window_set_accels(gw);
}
- nsws_window_set_accels(gw);
-
return hwnd;
}
@@ -230,7 +214,7 @@ nsws_window_toolbar_command(struct gui_window *gw,
int identifier,
HWND ctrl_window)
{
- NSLOG(netsurf, INFO,
+ NSLOG(netsurf, DEBUG,
"notification_code %d identifier %d ctrl_window %p",
notification_code,
identifier,
@@ -241,39 +225,39 @@ nsws_window_toolbar_command(struct gui_window *gw,
case IDC_MAIN_URLBAR:
switch (notification_code) {
case EN_CHANGE:
- NSLOG(netsurf, INFO, "EN_CHANGE");
+ NSLOG(netsurf, DEBUG, "EN_CHANGE");
break;
case EN_ERRSPACE:
- NSLOG(netsurf, INFO, "EN_ERRSPACE");
+ NSLOG(netsurf, DEBUG, "EN_ERRSPACE");
break;
case EN_HSCROLL:
- NSLOG(netsurf, INFO, "EN_HSCROLL");
+ NSLOG(netsurf, DEBUG, "EN_HSCROLL");
break;
case EN_KILLFOCUS:
- NSLOG(netsurf, INFO, "EN_KILLFOCUS");
+ NSLOG(netsurf, DEBUG, "EN_KILLFOCUS");
break;
case EN_MAXTEXT:
- NSLOG(netsurf, INFO, "EN_MAXTEXT");
+ NSLOG(netsurf, DEBUG, "EN_MAXTEXT");
break;
case EN_SETFOCUS:
- NSLOG(netsurf, INFO, "EN_SETFOCUS");
+ NSLOG(netsurf, DEBUG, "EN_SETFOCUS");
break;
case EN_UPDATE:
- NSLOG(netsurf, INFO, "EN_UPDATE");
+ NSLOG(netsurf, DEBUG, "EN_UPDATE");
break;
case EN_VSCROLL:
- NSLOG(netsurf, INFO, "EN_VSCROLL");
+ NSLOG(netsurf, DEBUG, "EN_VSCROLL");
break;
default:
- NSLOG(netsurf, INFO, "Unknown notification_code");
+ NSLOG(netsurf, DEBUG, "Unknown notification_code");
break;
}
break;
@@ -320,7 +304,7 @@ urlbar_dimensions(HWND hWndParent,
/**
* callback for toolbar events
*
- * message handler for toolbar window
+ * subclass message handler for toolbar window
*
* \param hwnd win32 window handle message arrived for
* \param msg The message ID
@@ -336,7 +320,11 @@ nsws_window_toolbar_callback(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
LOG_WIN_MSG(hwnd, msg, wparam, lparam);
+ toolproc = (WNDPROC)GetProp(hwnd, TEXT("OrigMsgProc"));
+ assert(toolproc != NULL);
+
gw = nsws_get_gui_window(hwnd);
+ assert(gw != NULL);
switch (msg) {
case WM_SIZE:
@@ -372,19 +360,15 @@ nsws_window_toolbar_callback(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
return 0;
}
break;
- }
- /* remove properties if window is being destroyed */
- if (msg == WM_NCDESTROY) {
+ case WM_NCDESTROY:
+ /* remove properties if window is being destroyed */
RemoveProp(hwnd, TEXT("GuiWnd"));
- toolproc = (WNDPROC)RemoveProp(hwnd, TEXT("OrigMsgProc"));
- } else {
- toolproc = (WNDPROC)GetProp(hwnd, TEXT("OrigMsgProc"));
- }
+ RemoveProp(hwnd, TEXT("OrigMsgProc"));
+ /* put the original message handler back */
+ SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR)toolproc);
+ break;
- if (toolproc == NULL) {
- /* the original toolbar procedure is not available */
- return DefWindowProc(hwnd, msg, wparam, lparam);
}
/* chain to the next handler */
@@ -392,10 +376,21 @@ nsws_window_toolbar_callback(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
}
+static void set_urlbar_edit_size(HWND hwnd)
+{
+ RECT rc;
+ GetClientRect(hwnd, &rc);
+ rc.left += NSW32_PGIBUTTON_HEIGHT;
+ SendMessage(hwnd, EM_SETRECT, 0, (LPARAM)&rc);
+ NSLOG(netsurf, DEBUG, "left:%ld right:%ld top:%ld bot:%ld",
+ rc.left,rc.right,rc.top,rc.bottom);
+}
+
+
/**
* callback for url bar events
*
- * message handler for urlbar window
+ * subclass message handler for urlbar window
*
* \param hwnd win32 window handle message arrived for
* \param msg The message ID
@@ -408,17 +403,24 @@ nsws_window_urlbar_callback(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
struct gui_window *gw;
WNDPROC urlproc;
HFONT hFont;
+ LRESULT result;
LOG_WIN_MSG(hwnd, msg, wparam, lparam);
- gw = nsws_get_gui_window(hwnd);
-
urlproc = (WNDPROC)GetProp(hwnd, TEXT("OrigMsgProc"));
+ assert(urlproc != NULL);
+
+ gw = nsws_get_gui_window(hwnd);
+ assert(gw != NULL);
/* override messages */
switch (msg) {
case WM_CHAR:
- if (wparam == 13) {
+ if (wparam == 1) {
+ /* handle ^A */
+ SendMessage(hwnd, EM_SETSEL, 0, -1);
+ return 1;
+ } else if (wparam == 13) {
SendMessage(gw->main, WM_COMMAND, IDC_MAIN_LAUNCH_URL, 0);
return 0;
}
@@ -430,25 +432,27 @@ nsws_window_urlbar_callback(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
NSLOG(netsurf, INFO, "Destroyed font object");
DeleteObject(hFont);
}
-
+ fallthrough;
case WM_NCDESTROY:
/* remove properties if window is being destroyed */
RemoveProp(hwnd, TEXT("GuiWnd"));
RemoveProp(hwnd, TEXT("OrigMsgProc"));
+ /* put the original message handler back */
+ SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR)urlproc);
break;
- }
- if (urlproc == NULL) {
- /* the original toolbar procedure is not available */
- return DefWindowProc(hwnd, msg, wparam, lparam);
+ case WM_SIZE:
+ result = CallWindowProc(urlproc, hwnd, msg, wparam, lparam);
+ set_urlbar_edit_size(hwnd);
+ return result;
+
}
/* chain to the next handler */
return CallWindowProc(urlproc, hwnd, msg, wparam, lparam);
}
-
/**
* create a urlbar and message handler
*
@@ -466,6 +470,7 @@ nsws_window_urlbar_create(HINSTANCE hInstance,
{
int urlx, urly, urlwidth, urlheight;
HWND hwnd;
+ HWND hbutton;
WNDPROC urlproc;
HFONT hFont;
@@ -478,7 +483,8 @@ nsws_window_urlbar_create(HINSTANCE hInstance,
hwnd = CreateWindowEx(0L,
TEXT("Edit"),
NULL,
- WS_CHILD | WS_BORDER | WS_VISIBLE | ES_LEFT | ES_AUTOHSCROLL,
+ WS_CHILD | WS_BORDER | WS_VISIBLE |
+ ES_LEFT | ES_AUTOHSCROLL | ES_MULTILINE,
urlx,
urly,
urlwidth,
@@ -486,7 +492,7 @@ nsws_window_urlbar_create(HINSTANCE hInstance,
hWndParent,
(HMENU)IDC_MAIN_URLBAR,
hInstance,
- 0);
+ NULL);
if (hwnd == NULL) {
return NULL;
@@ -512,6 +518,28 @@ nsws_window_urlbar_create(HINSTANCE hInstance,
SendMessage(hwnd, WM_SETFONT, (WPARAM)hFont, 0);
}
+
+ /* Create the page info button */
+ hbutton = CreateWindowEx(0L,
+ TEXT("BUTTON"),
+ NULL,
+ WS_CHILD | WS_VISIBLE | BS_BITMAP | BS_FLAT,
+ (NSWS_URLBAR_HEIGHT - NSW32_PGIBUTTON_HEIGHT) /2,
+ (NSWS_URLBAR_HEIGHT - NSW32_PGIBUTTON_HEIGHT) /2,
+ NSW32_PGIBUTTON_HEIGHT,
+ NSW32_PGIBUTTON_HEIGHT,
+ hwnd,
+ (HMENU)IDC_PAGEINFO,
+ hInstance,
+ NULL);
+
+ /* put a property on the parent toolbar so it can set the page info */
+ SetProp(hWndParent, TEXT("hPGIbutton"), (HANDLE)hbutton);
+
+ SendMessageW(hbutton, BM_SETIMAGE, IMAGE_BITMAP, (LPARAM)gw->hPageInfo[PAGE_STATE_UNKNOWN]);
+
+ set_urlbar_edit_size(hwnd);
+
NSLOG(netsurf, INFO,
"Created url bar hwnd:%p, x:%d, y:%d, w:%d, h:%d", hwnd, urlx,
urly, urlwidth, urlheight);
@@ -534,7 +562,6 @@ nsws_window_throbber_create(HINSTANCE hInstance,
struct gui_window *gw)
{
HWND hwnd;
- char avi[PATH_MAX];
int urlx, urly, urlwidth, urlheight;
urlbar_dimensions(hWndParent,
@@ -554,9 +581,8 @@ nsws_window_throbber_create(HINSTANCE hInstance,
hInstance,
NULL);
- nsws_find_resource(avi, "throbber.avi", "windows/res/throbber.avi");
- NSLOG(netsurf, INFO, "setting throbber avi as %s", avi);
- Animate_Open(hwnd, avi);
+ Animate_Open(hwnd, MAKEINTRESOURCE(IDR_THROBBER_AVI));
+
if (gw->throbbing) {
Animate_Play(hwnd, 0, -1, -1);
} else {
@@ -647,7 +673,7 @@ nsws_window_create_toolbar(HINSTANCE hInstance,
hWndToolbar = CreateWindowEx(0,
TOOLBARCLASSNAME,
"Toolbar",
- WS_CHILD | WS_VISIBLE | TBSTYLE_FLAT,
+ WS_CHILD | TBSTYLE_FLAT,
0, 0, 0, 0,
hWndParent,
NULL,
@@ -712,15 +738,21 @@ nsws_window_create_toolbar(HINSTANCE hInstance,
TB_BUTTONSTRUCTSIZE,
(WPARAM)sizeof(TBBUTTON),
0);
+
SendMessage(hWndToolbar,
TB_ADDBUTTONS,
(WPARAM)gw->toolbuttonc,
(LPARAM)&tbButtons);
+ /* create url widget */
gw->urlbar = nsws_window_urlbar_create(hInstance, hWndToolbar, gw);
+ /* create throbber widget */
gw->throbber = nsws_window_throbber_create(hInstance, hWndToolbar, gw);
+ SendMessage(hWndToolbar, TB_AUTOSIZE, 0, 0);
+ ShowWindow(hWndToolbar, TRUE);
+
return hWndToolbar;
}
@@ -909,8 +941,8 @@ win32_window_invalidate_area(struct gui_window *gw, const struct rect *rect)
if (rect != NULL) {
redrawrectp = &redrawrect;
- redrawrect.left = (long)rect->x0 - (gw->scrollx / gw->scale);
- redrawrect.top = (long)rect->y0 - (gw->scrolly / gw->scale);
+ redrawrect.left = (long)rect->x0 - gw->scrollx;
+ redrawrect.top = (long)rect->y0 - gw->scrolly;
redrawrect.right =(long)rect->x1;
redrawrect.bottom = (long)rect->y1;
@@ -925,36 +957,6 @@ win32_window_invalidate_area(struct gui_window *gw, const struct rect *rect)
/**
- * Set scale of a win32 browser window
- *
- * \param gw win32 frontend window context
- * \param scale The new scale
- */
-static void nsws_set_scale(struct gui_window *gw, float scale)
-{
- struct rect rect;
-
- assert(gw != NULL);
-
- if (gw->scale == scale) {
- return;
- }
-
- rect.x0 = rect.x1 = gw->scrollx;
- rect.y0 = rect.y1 = gw->scrolly;
-
- gw->scale = scale;
-
- if (gw->bw != NULL) {
- browser_window_set_scale(gw->bw, scale, true);
- }
-
- win32_window_invalidate_area(gw, NULL);
- win32_window_set_scroll(gw, &rect);
-}
-
-
-/**
* Create a new window due to menu selection
*
* \param gw frontends graphical window.
@@ -1058,48 +1060,35 @@ nsws_window_command(HWND hwnd,
break;
case IDM_EDIT_CUT:
- OpenClipboard(gw->main);
- EmptyClipboard();
- CloseClipboard();
if (GetFocus() == gw->urlbar) {
SendMessage(gw->urlbar, WM_CUT, 0, 0);
- } else if (gw->bw != NULL) {
- browser_window_key_press(gw->bw, NS_KEY_CUT_SELECTION);
+ } else {
+ SendMessage(gw->drawingarea, WM_CUT, 0, 0);
}
break;
case IDM_EDIT_COPY:
- OpenClipboard(gw->main);
- EmptyClipboard();
- CloseClipboard();
if (GetFocus() == gw->urlbar) {
SendMessage(gw->urlbar, WM_COPY, 0, 0);
- } else if (gw->bw != NULL) {
- browser_window_key_press(gw->bw, NS_KEY_COPY_SELECTION);
+ } else {
+ SendMessage(gw->drawingarea, WM_COPY, 0, 0);
}
break;
case IDM_EDIT_PASTE: {
- OpenClipboard(gw->main);
- HANDLE h = GetClipboardData(CF_TEXT);
- if (h != NULL) {
- char *content = GlobalLock(h);
- NSLOG(netsurf, INFO, "pasting %s\n", content);
- GlobalUnlock(h);
- }
- CloseClipboard();
- if (GetFocus() == gw->urlbar)
+ if (GetFocus() == gw->urlbar) {
SendMessage(gw->urlbar, WM_PASTE, 0, 0);
- else
- browser_window_key_press(gw->bw, NS_KEY_PASTE);
+ } else {
+ SendMessage(gw->drawingarea, WM_PASTE, 0, 0);
+ }
break;
}
case IDM_EDIT_DELETE:
if (GetFocus() == gw->urlbar)
- SendMessage(gw->urlbar, WM_CUT, 0, 0);
+ SendMessage(gw->urlbar, WM_CLEAR, 0, 0);
else
- browser_window_key_press(gw->bw, NS_KEY_DELETE_RIGHT);
+ SendMessage(gw->drawingarea, WM_CLEAR, 0, 0);
break;
case IDM_EDIT_SELECT_ALL:
@@ -1135,9 +1124,10 @@ nsws_window_command(HWND hwnd,
case IDM_NAV_HOME:
{
nsurl *url;
+ ret = nsurl_create(nsoption_charp(homepage_url), &url);
- if (nsurl_create(nsoption_charp(homepage_url), &url) != NSERROR_OK) {
- win32_warning("NoMemory", 0);
+ if (ret != NSERROR_OK) {
+ win32_report_nserror(ret, 0);
} else {
browser_window_navigate(gw->bw,
url,
@@ -1168,7 +1158,7 @@ nsws_window_command(HWND hwnd,
break;
case IDM_TOOLS_COOKIES:
- nsw32_cookies_present(hinst);
+ nsw32_cookies_present(NULL);
break;
case IDM_NAV_BOOKMARKS:
@@ -1176,15 +1166,15 @@ nsws_window_command(HWND hwnd,
break;
case IDM_VIEW_ZOOMPLUS:
- nsws_set_scale(gw, gw->scale * 1.1);
+ browser_window_set_scale(gw->bw, 0.1, false);
break;
case IDM_VIEW_ZOOMMINUS:
- nsws_set_scale(gw, gw->scale * 0.9);
+ browser_window_set_scale(gw->bw, -0.1, false);
break;
case IDM_VIEW_ZOOMNORMAL:
- nsws_set_scale(gw, 1.0);
+ browser_window_set_scale(gw->bw, 1.0, true);
break;
case IDM_VIEW_SOURCE:
@@ -1260,26 +1250,27 @@ nsws_window_command(HWND hwnd,
case IDM_HELP_CONTENTS:
nsws_window_go(hwnd,
- "http://www.netsurf-browser.org/documentation/");
+ "https://www.netsurf-browser.org/documentation/");
break;
case IDM_HELP_GUIDE:
nsws_window_go(hwnd,
- "http://www.netsurf-browser.org/documentation/guide");
+ "https://www.netsurf-browser.org/documentation/guide");
break;
case IDM_HELP_INFO:
nsws_window_go(hwnd,
- "http://www.netsurf-browser.org/documentation/info");
+ "https://www.netsurf-browser.org/documentation/info");
break;
case IDM_HELP_ABOUT:
- nsws_about_dialog_init(hinst, gw->main);
+ nsw32_about_dialog_init(hinst, gw->main);
break;
case IDC_MAIN_LAUNCH_URL:
{
nsurl *url;
+ nserror err;
if (GetFocus() != gw->urlbar)
break;
@@ -1289,8 +1280,10 @@ nsws_window_command(HWND hwnd,
SendMessage(gw->urlbar, WM_GETTEXT, (WPARAM)(len + 1), (LPARAM)addr);
NSLOG(netsurf, INFO, "launching %s\n", addr);
- if (nsurl_create(addr, &url) != NSERROR_OK) {
- win32_warning("NoMemory", 0);
+ err = nsurl_create(addr, &url);
+
+ if (err != NSERROR_OK) {
+ win32_report_nserror(err, 0);
} else {
browser_window_navigate(gw->bw,
url,
@@ -1375,8 +1368,6 @@ nsws_window_resize(struct gui_window *gw,
}
nsws_window_update_forward_back(gw);
- browser_window_update(gw->bw, false);
-
if (gw->toolbar != NULL) {
SendMessage(gw->toolbar, TB_SETSTATE,
(WPARAM) IDM_NAV_STOP,
@@ -1400,12 +1391,30 @@ nsws_window_event_callback(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
{
struct gui_window *gw;
RECT rmain;
+ LPCREATESTRUCTW createstruct;
LOG_WIN_MSG(hwnd, msg, wparam, lparam);
- /* deal with window creation as a special case */
- if (msg == WM_CREATE) {
- /* To cause all the component child windows to be
+ gw = nsws_get_gui_window(hwnd);
+
+ switch (msg) {
+ case WM_NCCREATE: /* non client area create */
+ /* gw is passed as the lpParam from createwindowex() */
+ createstruct = (LPCREATESTRUCTW)lparam;
+ gw = (struct gui_window *)createstruct->lpCreateParams;
+
+ /* set the gui window associated with this window handle */
+ SetProp(hwnd, TEXT("GuiWnd"), (HANDLE)gw);
+
+ NSLOG(netsurf, INFO,
+ "created hWnd:%p hInstance %p GUI window %p",
+ hwnd, createstruct->hInstance, gw);
+
+ break;
+
+ case WM_CREATE:
+ /*
+ * To cause all the component child windows to be
* re-sized correctly a WM_SIZE message of the actual
* created size must be sent.
*
@@ -1414,19 +1423,9 @@ nsws_window_event_callback(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
* until after the WM_CREATE message is dispatched.
*/
GetClientRect(hwnd, &rmain);
- PostMessage(hwnd, WM_SIZE, 0, MAKELPARAM(rmain.right, rmain.bottom));
- return DefWindowProc(hwnd, msg, wparam, lparam);
- }
-
-
- gw = nsws_get_gui_window(hwnd);
- if (gw == NULL) {
- NSLOG(netsurf, INFO,
- "Unable to find gui window structure for hwnd %p", hwnd);
- return DefWindowProc(hwnd, msg, wparam, lparam);
- }
-
- switch (msg) {
+ PostMessage(hwnd, WM_SIZE, 0,
+ MAKELPARAM(rmain.right, rmain.bottom));
+ break;
case WM_CONTEXTMENU:
if (nsws_ctx_menu(gw, hwnd, GET_X_LPARAM(lparam),
@@ -1456,7 +1455,64 @@ nsws_window_event_callback(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
}
- return DefWindowProc(hwnd, msg, wparam, lparam);
+ return DefWindowProcW(hwnd, msg, wparam, lparam);
+}
+
+static void destroy_page_info_bitmaps(struct gui_window *gw)
+{
+ DeleteObject(gw->hPageInfo[PAGE_STATE_UNKNOWN]);
+ DeleteObject(gw->hPageInfo[PAGE_STATE_INTERNAL]);
+ DeleteObject(gw->hPageInfo[PAGE_STATE_LOCAL]);
+ DeleteObject(gw->hPageInfo[PAGE_STATE_INSECURE]);
+ DeleteObject(gw->hPageInfo[PAGE_STATE_SECURE_OVERRIDE]);
+ DeleteObject(gw->hPageInfo[PAGE_STATE_SECURE_ISSUES]);
+ DeleteObject(gw->hPageInfo[PAGE_STATE_SECURE]);
+}
+
+static void load_page_info_bitmaps(HINSTANCE hInstance, struct gui_window *gw)
+{
+ gw->hPageInfo[PAGE_STATE_UNKNOWN] = LoadImage(hInstance,
+ MAKEINTRESOURCE(IDB_PAGEINFO_INTERNAL),
+ IMAGE_BITMAP,
+ 0,
+ 0,
+ LR_DEFAULTCOLOR);
+ gw->hPageInfo[PAGE_STATE_INTERNAL] = LoadImage(hInstance,
+ MAKEINTRESOURCE(IDB_PAGEINFO_INTERNAL),
+ IMAGE_BITMAP,
+ 0,
+ 0,
+ LR_DEFAULTCOLOR);
+ gw->hPageInfo[PAGE_STATE_LOCAL] = LoadImage(hInstance,
+ MAKEINTRESOURCE(IDB_PAGEINFO_LOCAL),
+ IMAGE_BITMAP,
+ 0,
+ 0,
+ LR_DEFAULTCOLOR);
+ gw->hPageInfo[PAGE_STATE_INSECURE] = LoadImage(hInstance,
+ MAKEINTRESOURCE(IDB_PAGEINFO_INSECURE),
+ IMAGE_BITMAP,
+ 0,
+ 0,
+ LR_DEFAULTCOLOR);
+ gw->hPageInfo[PAGE_STATE_SECURE_OVERRIDE] = LoadImage(hInstance,
+ MAKEINTRESOURCE(IDB_PAGEINFO_WARNING),
+ IMAGE_BITMAP,
+ 0,
+ 0,
+ LR_DEFAULTCOLOR);
+ gw->hPageInfo[PAGE_STATE_SECURE_ISSUES] = LoadImage(hInstance,
+ MAKEINTRESOURCE(IDB_PAGEINFO_WARNING),
+ IMAGE_BITMAP,
+ 0,
+ 0,
+ LR_DEFAULTCOLOR);
+ gw->hPageInfo[PAGE_STATE_SECURE] = LoadImage(hInstance,
+ MAKEINTRESOURCE(IDB_PAGEINFO_SECURE),
+ IMAGE_BITMAP,
+ 0,
+ 0,
+ LR_DEFAULTCOLOR);
}
@@ -1487,12 +1543,13 @@ win32_window_create(struct browser_window *bw,
gw->width = 800;
gw->height = 600;
- gw->scale = 1.0;
gw->toolbuttonsize = 24;
gw->requestscrollx = 0;
gw->requestscrolly = 0;
gw->localhistory = NULL;
+ load_page_info_bitmaps(hinst, gw);
+
gw->mouse = malloc(sizeof(struct browser_mouse));
if (gw->mouse == NULL) {
free(gw);
@@ -1551,6 +1608,8 @@ static void win32_window_destroy(struct gui_window *w)
DestroyAcceleratorTable(w->acceltable);
+ destroy_page_info_bitmaps(w);
+
free(w);
w = NULL;
}
@@ -1562,12 +1621,10 @@ static void win32_window_destroy(struct gui_window *w)
* \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
+ * \return NSERROR_OK and width and height updated
*/
static nserror
-win32_window_get_dimensions(struct gui_window *gw,
- int *width, int *height,
- bool scaled)
+win32_window_get_dimensions(struct gui_window *gw, int *width, int *height)
{
*width = gw->width;
*height = gw->height;
@@ -1584,9 +1641,12 @@ win32_window_get_dimensions(struct gui_window *gw,
*
* \param w gui_window to update the extent of
*/
-static void win32_window_update_extent(struct gui_window *w)
+static void win32_window_update_extent(struct gui_window *gw)
{
-
+ struct rect rect;
+ rect.x0 = rect.x1 = gw->scrollx;
+ rect.y0 = rect.y1 = gw->scrolly;
+ win32_window_set_scroll(gw, &rect);
}
@@ -1599,6 +1659,8 @@ static void win32_window_update_extent(struct gui_window *w)
static void win32_window_set_title(struct gui_window *w, const char *title)
{
char *fulltitle;
+ int wlen;
+ LPWSTR enctitle;
if (w == NULL) {
return;
@@ -1607,14 +1669,32 @@ static void win32_window_set_title(struct gui_window *w, const char *title)
NSLOG(netsurf, INFO, "%p, title %s", w, title);
fulltitle = malloc(strlen(title) + SLEN(" - NetSurf") + 1);
if (fulltitle == NULL) {
- win32_warning("NoMemory", 0);
+ NSLOG(netsurf, ERROR, "%s",
+ messages_get_errorcode(NSERROR_NOMEM));
return;
}
strcpy(fulltitle, title);
strcat(fulltitle, " - NetSurf");
- SendMessage(w->main, WM_SETTEXT, 0, (LPARAM)fulltitle);
+ wlen = MultiByteToWideChar(CP_UTF8, 0, fulltitle, -1, NULL, 0);
+ if (wlen == 0) {
+ NSLOG(netsurf, ERROR, "failed encoding \"%s\"", fulltitle);
+ free(fulltitle);
+ return;
+ }
+
+ enctitle = malloc(2 * (wlen + 1));
+ if (enctitle == NULL) {
+ NSLOG(netsurf, ERROR, "%s encoding \"%s\" len %d",
+ messages_get_errorcode(NSERROR_NOMEM), fulltitle, wlen);
+ free(fulltitle);
+ return;
+ }
+
+ MultiByteToWideChar(CP_UTF8, 0, fulltitle, -1, enctitle, wlen);
+ SetWindowTextW(w->main, enctitle);
+ free(enctitle);
free(fulltitle);
}
@@ -1678,9 +1758,8 @@ win32_window_place_caret(struct gui_window *w, int x, int y,
return;
}
- CreateCaret(w->drawingarea, (HBITMAP)NULL, 1, height * w->scale);
- SetCaretPos(x * w->scale - w->scrollx,
- y * w->scale - w->scrolly);
+ CreateCaret(w->drawingarea, (HBITMAP)NULL, 1, height );
+ SetCaretPos(x - w->scrollx, y - w->scrolly);
ShowCaret(w->drawingarea);
}
@@ -1765,6 +1844,62 @@ static void win32_window_stop_throbber(struct gui_window *w)
/**
+ * win32 page info change.
+ *
+ * \param gw window to chnage info on
+ */
+static void win32_window_page_info_change(struct gui_window *gw)
+{
+ HWND hbutton;
+ browser_window_page_info_state pistate;
+
+ hbutton = GetProp(gw->toolbar, TEXT("hPGIbutton"));
+
+ pistate = browser_window_get_page_info_state(gw->bw);
+
+ SendMessageW(hbutton, BM_SETIMAGE, IMAGE_BITMAP,
+ (LPARAM)gw->hPageInfo[pistate]);
+}
+
+
+/**
+ * process miscellaneous window events
+ *
+ * \param gw The window receiving the event.
+ * \param event The event code.
+ * \return NSERROR_OK when processed ok
+ */
+static nserror
+win32_window_event(struct gui_window *gw, enum gui_window_event event)
+{
+ switch (event) {
+ case GW_EVENT_UPDATE_EXTENT:
+ win32_window_update_extent(gw);
+ break;
+
+ case GW_EVENT_REMOVE_CARET:
+ win32_window_remove_caret(gw);
+ break;
+
+ case GW_EVENT_START_THROBBER:
+ win32_window_start_throbber(gw);
+ break;
+
+ case GW_EVENT_STOP_THROBBER:
+ win32_window_stop_throbber(gw);
+ break;
+
+ case GW_EVENT_PAGE_INFO_CHANGE:
+ win32_window_page_info_change(gw);
+ break;
+
+ default:
+ break;
+ }
+ return NSERROR_OK;
+}
+
+/**
* win32 frontend browser window handling operation table
*/
static struct gui_window_table window_table = {
@@ -1774,16 +1909,13 @@ static struct gui_window_table window_table = {
.get_scroll = win32_window_get_scroll,
.set_scroll = win32_window_set_scroll,
.get_dimensions = win32_window_get_dimensions,
- .update_extent = win32_window_update_extent,
+ .event = win32_window_event,
.set_title = win32_window_set_title,
.set_url = win32_window_set_url,
.set_status = win32_window_set_status,
.set_pointer = win32_window_set_pointer,
.place_caret = win32_window_place_caret,
- .remove_caret = win32_window_remove_caret,
- .start_throbber = win32_window_start_throbber,
- .stop_throbber = win32_window_stop_throbber,
};
struct gui_window_table *win32_window_table = &window_table;
@@ -1823,13 +1955,15 @@ bool nsws_window_go(HWND hwnd, const char *urltxt)
{
struct gui_window *gw;
nsurl *url;
+ nserror ret;
gw = nsws_get_gui_window(hwnd);
if (gw == NULL)
return false;
+ ret = nsurl_create(urltxt, &url);
- if (nsurl_create(urltxt, &url) != NSERROR_OK) {
- win32_warning("NoMemory", 0);
+ if (ret != NSERROR_OK) {
+ win32_report_nserror(ret, 0);
} else {
browser_window_navigate(gw->bw,
url,
@@ -1949,7 +2083,7 @@ nserror
nsws_create_main_class(HINSTANCE hinstance)
{
nserror ret = NSERROR_OK;
- WNDCLASSEX wc;
+ WNDCLASSEXW wc;
/* main window */
wc.cbSize = sizeof(WNDCLASSEX);
@@ -1965,7 +2099,7 @@ nsws_create_main_class(HINSTANCE hinstance)
wc.lpszClassName = windowclassname_main;
wc.hIconSm = LoadIcon(hinstance, MAKEINTRESOURCE(IDR_NETSURF_ICON));
- if (RegisterClassEx(&wc) == 0) {
+ if (RegisterClassExW(&wc) == 0) {
win_perror("MainWindowClass");
ret = NSERROR_INIT_FAILED;
}
diff --git a/frontends/windows/window.h b/frontends/windows/window.h
index 3cdb9aefe..97be710f3 100644
--- a/frontends/windows/window.h
+++ b/frontends/windows/window.h
@@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef _NETSURF_WINDOWS_WINDOW_H_
-#define _NETSURF_WINDOWS_WINDOW_H_
+#ifndef NETSURF_WINDOWS_WINDOW_H_
+#define NETSURF_WINDOWS_WINDOW_H_
/** The window operation function table for win32 */
extern struct gui_window_table *win32_window_table;
@@ -26,8 +26,7 @@ extern struct gui_window_table *win32_window_table;
struct browser_mouse {
struct gui_window *gui;
- struct box *box;
-
+
double pressed_x;
double pressed_y;
bool waiting;
@@ -62,7 +61,7 @@ struct gui_window {
HACCEL acceltable; /**< accelerators */
- float scale; /**< scale of content */
+ HBITMAP hPageInfo[8]; /**< page info handles */
int scrollx; /**< current scroll location */
int scrolly; /**< current scroll location */