diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2017-01-14 19:58:54 +0000 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2017-01-14 19:58:54 +0000 |
commit | 9f10babe645fe67b02fae90f852d5e4cdfcbb70e (patch) | |
tree | 909b77e3c48418204a23ac4723684ca0bc76a081 /frontends | |
parent | 0d9023148d2a34bd908aac38e44d449359b03438 (diff) | |
parent | 7dab7cb43d4091648ceb40684ff70aff7091c648 (diff) | |
download | netsurf-9f10babe645fe67b02fae90f852d5e4cdfcbb70e.tar.gz netsurf-9f10babe645fe67b02fae90f852d5e4cdfcbb70e.tar.bz2 |
Merge branch 'master' of git://git.netsurf-browser.org/netsurf into chris/menuclass
Diffstat (limited to 'frontends')
30 files changed, 30 insertions, 26 deletions
diff --git a/frontends/amiga/corewindow.c b/frontends/amiga/corewindow.c index d2bfbf982..0ed16d1ee 100644 --- a/frontends/amiga/corewindow.c +++ b/frontends/amiga/corewindow.c @@ -44,7 +44,7 @@ #include "utils/utf8.h" #include "netsurf/keypress.h" #include "netsurf/mouse.h" -#include "desktop/plot_style.h" +#include "netsurf/plot_style.h" #include <proto/exec.h> #include <proto/intuition.h> diff --git a/frontends/amiga/menu.c b/frontends/amiga/menu.c index 97debb686..3595f9606 100644 --- a/frontends/amiga/menu.c +++ b/frontends/amiga/menu.c @@ -978,7 +978,7 @@ static struct Menu *ami_menu_layout_gt(struct ami_menu_data **md, int max) TextLength(rp, md[i]->menulab, strlen(md[i]->menulab)) - icon_width - space_width; - if((md[i]->menutype == NM_ITEM) && (md[i+1]->menutype == NM_SUB)) { + if((md[i]->menutype == NM_ITEM) && md[i+1] && (md[i+1]->menutype == NM_SUB)) { left_posn -= menu_glyph_width[NSA_GLYPH_SUBMENU]; submenuarrow = NewObject(NULL, "sysiclass", diff --git a/frontends/atari/plot/font_freetype.c b/frontends/atari/plot/font_freetype.c index 602820704..8b535e3a3 100644 --- a/frontends/atari/plot/font_freetype.c +++ b/frontends/atari/plot/font_freetype.c @@ -25,7 +25,7 @@ #include "utils/log.h" #include "utils/nsoption.h" #include "netsurf/mouse.h" -#include "desktop/plot_style.h" +#include "netsurf/plot_style.h" #include "atari/gui.h" #include "atari/bitmap.h" diff --git a/frontends/atari/plot/font_internal.c b/frontends/atari/plot/font_internal.c index b96f4c773..6a811e38b 100644 --- a/frontends/atari/plot/font_internal.c +++ b/frontends/atari/plot/font_internal.c @@ -25,7 +25,7 @@ #include "utils/utf8.h" #include "utils/log.h" #include "netsurf/mouse.h" -#include "desktop/plot_style.h" +#include "netsurf/plot_style.h" #include "atari/gui.h" #include "atari/bitmap.h" diff --git a/frontends/atari/plot/fontplot.c b/frontends/atari/plot/fontplot.c index d0a1fe16f..2e02b50b4 100644 --- a/frontends/atari/plot/fontplot.c +++ b/frontends/atari/plot/fontplot.c @@ -22,7 +22,7 @@ #include <mt_gem.h> #include "netsurf/mouse.h" -#include "desktop/plot_style.h" +#include "netsurf/plot_style.h" #include "atari/bitmap.h" #include "atari/plot/fontplot.h" diff --git a/frontends/atari/settings.c b/frontends/atari/settings.c index b6df12760..5759a894a 100644 --- a/frontends/atari/settings.c +++ b/frontends/atari/settings.c @@ -32,7 +32,7 @@ #include "utils/dirent.h" #include "utils/nsoption.h" #include "utils/log.h" -#include "desktop/plot_style.h" +#include "netsurf/plot_style.h" #include "atari/gui.h" #include "atari/res/netsurf.rsh" diff --git a/frontends/atari/toolbar.c b/frontends/atari/toolbar.c index 66bd44b98..9ed87849c 100644 --- a/frontends/atari/toolbar.c +++ b/frontends/atari/toolbar.c @@ -35,7 +35,6 @@ #include "netsurf/mouse.h" #include "netsurf/plotters.h" #include "netsurf/keypress.h" -#include "desktop/plot_style.h" #include "desktop/browser_history.h" #include "desktop/hotlist.h" #include "desktop/textarea.h" diff --git a/frontends/beos/font.h b/frontends/beos/font.h index 63909efcf..285ba9c40 100644 --- a/frontends/beos/font.h +++ b/frontends/beos/font.h @@ -24,7 +24,7 @@ #ifndef NS_BEOS_FONT_H #define NS_BEOS_FONT_H -#include "desktop/plot_style.h" +#include "netsurf/plot_style.h" bool nsfont_paint(const plot_font_style_t *fstyle, const char *string, size_t length, diff --git a/frontends/cocoa/font.h b/frontends/cocoa/font.h index cabd2b933..ed0479765 100644 --- a/frontends/cocoa/font.h +++ b/frontends/cocoa/font.h @@ -19,7 +19,7 @@ #ifndef COCOA_FONT_H #define COCOA_FONT_H -#import "desktop/plot_style.h" +#import "netsurf/plot_style.h" void cocoa_draw_string( CGFloat x, CGFloat y, const char *bytes, size_t length, const struct plot_font_style *style ); diff --git a/frontends/cocoa/plotter.h b/frontends/cocoa/plotter.h index 88f9fcab6..ce4865336 100644 --- a/frontends/cocoa/plotter.h +++ b/frontends/cocoa/plotter.h @@ -20,7 +20,7 @@ #define COCOA_PLOTTER_H #import <Cocoa/Cocoa.h> -#import "desktop/plot_style.h" +#import "netsurf/plot_style.h" extern const struct plotter_table cocoa_plotters; diff --git a/frontends/cocoa/plotter.m b/frontends/cocoa/plotter.m index 20b688414..dea3245bb 100644 --- a/frontends/cocoa/plotter.m +++ b/frontends/cocoa/plotter.m @@ -22,7 +22,6 @@ #import "utils/utils.h" #import "netsurf/browser_window.h" #import "netsurf/plotters.h" -#import "desktop/plot_style.h" #import "cocoa/font.h" #import "cocoa/coordinates.h" diff --git a/frontends/framebuffer/convert_image.c b/frontends/framebuffer/convert_image.c index 2608328ff..de772fc29 100644 --- a/frontends/framebuffer/convert_image.c +++ b/frontends/framebuffer/convert_image.c @@ -262,7 +262,7 @@ main(int argc, char **argv) fprintf(f, "#include <stdint.h>\n\n"); fprintf(f, "#include <stdbool.h>\n\n"); fprintf(f, "#include <libnsfb.h>\n\n"); - fprintf(f, "#include \"desktop/plot_style.h\"\n"); + fprintf(f, "#include \"netsurf/plot_style.h\"\n"); fprintf(f, "#include \"framebuffer/gui.h\"\n"); fprintf(f, "#include \"framebuffer/fbtk.h\"\n\n"); diff --git a/frontends/framebuffer/fbtk.h b/frontends/framebuffer/fbtk.h index fe4f5a564..3cc326cef 100644 --- a/frontends/framebuffer/fbtk.h +++ b/frontends/framebuffer/fbtk.h @@ -19,7 +19,7 @@ #ifndef NETSURF_FB_FBTK_H #define NETSURF_FB_FBTK_H -#include "desktop/plot_style.h" +#include "netsurf/types.h" #ifdef FBTK_LOGGING #define FBTK_LOG(x) LOG(x) diff --git a/frontends/framebuffer/fbtk/user.c b/frontends/framebuffer/fbtk/user.c index 2b9cc8768..de547ab46 100644 --- a/frontends/framebuffer/fbtk/user.c +++ b/frontends/framebuffer/fbtk/user.c @@ -22,7 +22,6 @@ #include <stdbool.h> #include <libnsfb.h> -#include "desktop/plot_style.h" #include "framebuffer/gui.h" #include "framebuffer/fbtk.h" diff --git a/frontends/framebuffer/font_freetype.c b/frontends/framebuffer/font_freetype.c index 323982014..ccc60ea47 100644 --- a/frontends/framebuffer/font_freetype.c +++ b/frontends/framebuffer/font_freetype.c @@ -30,6 +30,7 @@ #include "netsurf/utf8.h" #include "netsurf/layout.h" #include "netsurf/browser_window.h" +#include "netsurf/plot_style.h" #include "framebuffer/gui.h" #include "framebuffer/font.h" diff --git a/frontends/framebuffer/font_internal.c b/frontends/framebuffer/font_internal.c index 3fd3ac6ef..3b8a1c43f 100644 --- a/frontends/framebuffer/font_internal.c +++ b/frontends/framebuffer/font_internal.c @@ -26,6 +26,7 @@ #include "utils/utf8.h" #include "netsurf/utf8.h" #include "netsurf/layout.h" +#include "netsurf/plot_style.h" #include "framebuffer/gui.h" #include "framebuffer/font.h" diff --git a/frontends/gtk/corewindow.c b/frontends/gtk/corewindow.c index 9f66ef1ca..8af19588f 100644 --- a/frontends/gtk/corewindow.c +++ b/frontends/gtk/corewindow.c @@ -42,9 +42,9 @@ #include "utils/utils.h" #include "utils/messages.h" #include "utils/utf8.h" +#include "netsurf/types.h" #include "netsurf/keypress.h" #include "netsurf/mouse.h" -#include "desktop/plot_style.h" #include "gtk/compat.h" #include "gtk/gui.h" /* just for gtk_gui_gdkkey_to_nskey */ diff --git a/frontends/gtk/layout_pango.c b/frontends/gtk/layout_pango.c index a0196df9b..7c7190982 100644 --- a/frontends/gtk/layout_pango.c +++ b/frontends/gtk/layout_pango.c @@ -31,6 +31,7 @@ #include "utils/log.h" #include "utils/nsoption.h" #include "netsurf/layout.h" +#include "netsurf/plot_style.h" #include "gtk/layout_pango.h" #include "gtk/plotters.h" diff --git a/frontends/monkey/layout.c b/frontends/monkey/layout.c index 00ed9dff3..4bcc51b68 100644 --- a/frontends/monkey/layout.c +++ b/frontends/monkey/layout.c @@ -24,7 +24,7 @@ #include <stddef.h> #include "utils/utf8.h" -#include "desktop/plot_style.h" +#include "netsurf/plot_style.h" #include "netsurf/layout.h" #include "monkey/layout.h" diff --git a/frontends/riscos/configure/con_fonts.c b/frontends/riscos/configure/con_fonts.c index 280312843..ecbf396c2 100644 --- a/frontends/riscos/configure/con_fonts.c +++ b/frontends/riscos/configure/con_fonts.c @@ -21,7 +21,7 @@ #include "utils/nsoption.h" #include "utils/messages.h" -#include "desktop/plot_style.h" +#include "netsurf/plot_style.h" #include "riscos/gui.h" #include "riscos/font.h" diff --git a/frontends/riscos/font.c b/frontends/riscos/font.c index a7a394e2d..560afc785 100644 --- a/frontends/riscos/font.c +++ b/frontends/riscos/font.c @@ -35,6 +35,7 @@ #include "utils/messages.h" #include "utils/utils.h" #include "netsurf/layout.h" +#include "netsurf/plot_style.h" #include "riscos/gui.h" #include "riscos/font.h" diff --git a/frontends/riscos/font.h b/frontends/riscos/font.h index 0319a7ee3..a29bad83a 100644 --- a/frontends/riscos/font.h +++ b/frontends/riscos/font.h @@ -25,6 +25,7 @@ #include <rufl.h> +struct plot_font_style; struct gui_layout_table *riscos_layout_table; /** desktop font, size and style being used */ @@ -35,9 +36,9 @@ extern rufl_style ro_gui_desktop_font_style; void nsfont_init(void); bool nsfont_exists(const char *font_family); const char *nsfont_fallback_font(void); -bool nsfont_paint(const plot_font_style_t *fstyle, const char *string, +bool nsfont_paint(const struct plot_font_style *fstyle, const char *string, size_t length, int x, int y); -void nsfont_read_style(const plot_font_style_t *fstyle, +void nsfont_read_style(const struct plot_font_style *fstyle, const char **font_family, unsigned int *font_size, rufl_style *font_style); void ro_gui_wimp_get_desktop_font(void); diff --git a/frontends/riscos/image.h b/frontends/riscos/image.h index a11388c13..2ed3e180d 100644 --- a/frontends/riscos/image.h +++ b/frontends/riscos/image.h @@ -20,7 +20,7 @@ #define _NETSURF_RISCOS_IMAGE_H_ #include <stdbool.h> -#include "desktop/plot_style.h" +#include "netsurf/types.h" #include "oslib/osspriteop.h" struct osspriteop_area; diff --git a/frontends/riscos/templates/de b/frontends/riscos/templates/de index 0fb4a9de7..a4ec1f4ad 100644 --- a/frontends/riscos/templates/de +++ b/frontends/riscos/templates/de @@ -2542,7 +2542,7 @@ wimp_window { xscroll:0 yscroll:0 next:wimp_TOP - window_flags:wimp_WINDOW_MOVEABLE | wimp_WINDOW_SCROLL_REPEAT | wimp_WINDOW_IGNORE_XEXTENT | wimp_WINDOW_IGNORE_YEXTENT | wimp_WINDOW_BACK_ICON | wimp_WINDOW_CLOSE_ICON | wimp_WINDOW_TITLE_ICON | wimp_WINDOW_TOGGLE_ICON | wimp_WINDOW_VSCROLL | wimp_WINDOW_SIZE_ICON | wimp_WINDOW_HSCROLL | wimp_WINDOW_NEW_FORMAT + window_flags:wimp_WINDOW_MOVEABLE | wimp_WINDOW_SCROLL_REPEAT | wimp_WINDOW_IGNORE_XEXTENT | wimp_WINDOW_IGNORE_YEXTENT | wimp_WINDOW_BACK_ICON | wimp_WINDOW_CLOSE_ICON | wimp_WINDOW_TITLE_ICON | wimp_WINDOW_TOGGLE_ICON | wimp_WINDOW_VSCROLL | wimp_WINDOW_SIZE_ICON | wimp_WINDOW_HSCROLL | wimp_WINDOW_NEW_FORMAT | wimp_WINDOW_NO_BOUNDS title_fg:wimp_COLOUR_BLACK title_bg:wimp_COLOUR_LIGHT_GREY work_fg:wimp_COLOUR_BLACK diff --git a/frontends/riscos/templates/en b/frontends/riscos/templates/en index 7746b86cc..25be55f5a 100644 --- a/frontends/riscos/templates/en +++ b/frontends/riscos/templates/en @@ -2750,7 +2750,7 @@ wimp_window { xscroll:0 yscroll:0 next:wimp_TOP - window_flags:wimp_WINDOW_MOVEABLE | wimp_WINDOW_SCROLL_REPEAT | wimp_WINDOW_IGNORE_XEXTENT | wimp_WINDOW_IGNORE_YEXTENT | wimp_WINDOW_BOUNDED_ONCE | wimp_WINDOW_BACK_ICON | wimp_WINDOW_CLOSE_ICON | wimp_WINDOW_TITLE_ICON | wimp_WINDOW_TOGGLE_ICON | wimp_WINDOW_VSCROLL | wimp_WINDOW_SIZE_ICON | wimp_WINDOW_HSCROLL | wimp_WINDOW_NEW_FORMAT + window_flags:wimp_WINDOW_MOVEABLE | wimp_WINDOW_SCROLL_REPEAT | wimp_WINDOW_IGNORE_XEXTENT | wimp_WINDOW_IGNORE_YEXTENT | wimp_WINDOW_BOUNDED_ONCE | wimp_WINDOW_BACK_ICON | wimp_WINDOW_CLOSE_ICON | wimp_WINDOW_TITLE_ICON | wimp_WINDOW_TOGGLE_ICON | wimp_WINDOW_VSCROLL | wimp_WINDOW_SIZE_ICON | wimp_WINDOW_HSCROLL | wimp_WINDOW_NEW_FORMAT | wimp_WINDOW_NO_BOUNDS title_fg:wimp_COLOUR_BLACK title_bg:wimp_COLOUR_LIGHT_GREY work_fg:wimp_COLOUR_BLACK diff --git a/frontends/riscos/templates/fr b/frontends/riscos/templates/fr index 67792642c..fafe0cec1 100644 --- a/frontends/riscos/templates/fr +++ b/frontends/riscos/templates/fr @@ -2554,7 +2554,7 @@ wimp_window { xscroll:0 yscroll:0 next:wimp_TOP - window_flags:wimp_WINDOW_MOVEABLE | wimp_WINDOW_SCROLL_REPEAT | wimp_WINDOW_IGNORE_XEXTENT | wimp_WINDOW_IGNORE_YEXTENT | wimp_WINDOW_BOUNDED_ONCE | wimp_WINDOW_BACK_ICON | wimp_WINDOW_CLOSE_ICON | wimp_WINDOW_TITLE_ICON | wimp_WINDOW_TOGGLE_ICON | wimp_WINDOW_VSCROLL | wimp_WINDOW_SIZE_ICON | wimp_WINDOW_HSCROLL | wimp_WINDOW_NEW_FORMAT + window_flags:wimp_WINDOW_MOVEABLE | wimp_WINDOW_SCROLL_REPEAT | wimp_WINDOW_IGNORE_XEXTENT | wimp_WINDOW_IGNORE_YEXTENT | wimp_WINDOW_BOUNDED_ONCE | wimp_WINDOW_BACK_ICON | wimp_WINDOW_CLOSE_ICON | wimp_WINDOW_TITLE_ICON | wimp_WINDOW_TOGGLE_ICON | wimp_WINDOW_VSCROLL | wimp_WINDOW_SIZE_ICON | wimp_WINDOW_HSCROLL | wimp_WINDOW_NEW_FORMAT | wimp_WINDOW_NO_BOUNDS title_fg:wimp_COLOUR_BLACK title_bg:wimp_COLOUR_LIGHT_GREY work_fg:wimp_COLOUR_BLACK diff --git a/frontends/riscos/templates/nl b/frontends/riscos/templates/nl index 704206fbd..5ed9cac1b 100644 --- a/frontends/riscos/templates/nl +++ b/frontends/riscos/templates/nl @@ -2796,7 +2796,7 @@ wimp_window { xscroll:0 yscroll:0 next:wimp_TOP - window_flags:wimp_WINDOW_MOVEABLE | wimp_WINDOW_SCROLL_REPEAT | wimp_WINDOW_IGNORE_XEXTENT | wimp_WINDOW_IGNORE_YEXTENT | wimp_WINDOW_BOUNDED_ONCE | wimp_WINDOW_BACK_ICON | wimp_WINDOW_CLOSE_ICON | wimp_WINDOW_TITLE_ICON | wimp_WINDOW_TOGGLE_ICON | wimp_WINDOW_VSCROLL | wimp_WINDOW_SIZE_ICON | wimp_WINDOW_HSCROLL | wimp_WINDOW_NEW_FORMAT + window_flags:wimp_WINDOW_MOVEABLE | wimp_WINDOW_SCROLL_REPEAT | wimp_WINDOW_IGNORE_XEXTENT | wimp_WINDOW_IGNORE_YEXTENT | wimp_WINDOW_BOUNDED_ONCE | wimp_WINDOW_BACK_ICON | wimp_WINDOW_CLOSE_ICON | wimp_WINDOW_TITLE_ICON | wimp_WINDOW_TOGGLE_ICON | wimp_WINDOW_VSCROLL | wimp_WINDOW_SIZE_ICON | wimp_WINDOW_HSCROLL | wimp_WINDOW_NEW_FORMAT | wimp_WINDOW_NO_BOUNDS title_fg:wimp_COLOUR_BLACK title_bg:wimp_COLOUR_LIGHT_GREY work_fg:wimp_COLOUR_BLACK diff --git a/frontends/windows/corewindow.c b/frontends/windows/corewindow.c index 8d853fb23..ff89d9271 100644 --- a/frontends/windows/corewindow.c +++ b/frontends/windows/corewindow.c @@ -43,7 +43,6 @@ #include "utils/utf8.h" #include "netsurf/keypress.h" #include "netsurf/mouse.h" -#include "desktop/plot_style.h" #include "windows/windbg.h" #include "windows/corewindow.h" diff --git a/frontends/windows/font.c b/frontends/windows/font.c index 1e99a78d6..791b8cd5c 100644 --- a/frontends/windows/font.c +++ b/frontends/windows/font.c @@ -32,6 +32,7 @@ #include "utils/utf8.h" #include "netsurf/layout.h" #include "netsurf/utf8.h" +#include "netsurf/plot_style.h" #include "windows/font.h" diff --git a/frontends/windows/font.h b/frontends/windows/font.h index 0e867554a..a1077e041 100644 --- a/frontends/windows/font.h +++ b/frontends/windows/font.h @@ -25,6 +25,8 @@ #ifndef NETSURF_WINDOWS_FONT_H #define NETSURF_WINDOWS_FONT_H +struct plot_font_style; + extern HWND font_hwnd; struct font_desc { @@ -47,7 +49,7 @@ extern nserror utf8_to_font_encoding(const struct font_desc* font, * \param style The font style. * \return The win32 font handle */ -HFONT get_font(const plot_font_style_t *style); +HFONT get_font(const struct plot_font_style *style); #endif /* NETSURF_WINDOWS_FONT_H */ |