summaryrefslogtreecommitdiff
path: root/desktop/plot_style.h
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2017-01-12 07:58:33 +0000
committerVincent Sanders <vince@kyllikki.org>2017-01-12 08:00:02 +0000
commit74e73a3b8b5ab3effd8e3d94c10463907d4c4ea9 (patch)
tree98fefc2e95a37cf408be0fcb34b5266fa3bc2036 /desktop/plot_style.h
parent9e037376276aaa042b529499f1978766b9535f7b (diff)
downloadnetsurf-74e73a3b8b5ab3effd8e3d94c10463907d4c4ea9.tar.gz
netsurf-74e73a3b8b5ab3effd8e3d94c10463907d4c4ea9.tar.bz2
make local history use system colours
Diffstat (limited to 'desktop/plot_style.h')
-rw-r--r--desktop/plot_style.h43
1 files changed, 18 insertions, 25 deletions
diff --git a/desktop/plot_style.h b/desktop/plot_style.h
index 347c6e836..15327f372 100644
--- a/desktop/plot_style.h
+++ b/desktop/plot_style.h
@@ -24,11 +24,20 @@
#define _NETSURF_DESKTOP_PLOT_STYLE_H_
#include <stdint.h>
+#include "netsurf/types.h"
/* html widget colours */
+/** light grey widget base colour */
#define WIDGET_BASEC 0xd9d9d9
+
+/** black blob colour */
#define WIDGET_BLOBC 0x000000
+/**
+ * Transparent value
+ */
+#define NS_TRANSPARENT 0x01000000
+
/* Darken a colour by taking three quarters of each channel's intensity */
#define darken_colour(c1) \
((((3 * (c1 & 0xff00ff)) >> 2) & 0xff00ff) | \
@@ -90,15 +99,6 @@
#define blue_from_colour(c) \
((c >> 16) & 0xff)
-/**
- * Colour type: XBGR
- */
-typedef uint32_t colour;
-
-/**
- * Magical transparent value
- */
-#define NS_TRANSPARENT 0x01000000
/**
* Type of plot operation
@@ -110,6 +110,7 @@ typedef enum {
PLOT_OP_TYPE_DASH, /**< Dashed plot */
} plot_operation_type_t;
+
/**
* Plot style for stroke/fill plotters
*/
@@ -121,6 +122,7 @@ typedef struct plot_style_s {
colour fill_colour; /**< Colour of fill */
} plot_style_t;
+
/**
* Generic font family type
*/
@@ -133,6 +135,7 @@ typedef enum {
PLOT_FONT_FAMILY_COUNT /**< Number of generic families */
} plot_font_generic_family_t;
+
/**
* Font plot flags
*/
@@ -142,11 +145,13 @@ typedef unsigned long plot_font_flags_t;
#define FONTF_OBLIQUE 2
#define FONTF_SMALLCAPS 4
+
/**
* Scaling factor for font sizes
*/
#define FONT_SIZE_SCALE 1024
+
/**
* Font style for plotting
*/
@@ -159,16 +164,19 @@ typedef struct plot_font_style {
colour foreground; /**< Colour of text */
} plot_font_style_t;
+
/* global fill styles */
extern plot_style_t *plot_style_fill_white;
extern plot_style_t *plot_style_fill_red;
extern plot_style_t *plot_style_fill_black;
+
/* Box model debug outline styles for content, padding and margin edges */
extern plot_style_t const * const plot_style_content_edge;
extern plot_style_t const * const plot_style_padding_edge;
extern plot_style_t const * const plot_style_margin_edge;
+
/* Broken object replacement styles */
extern plot_style_t const * const plot_style_broken_object;
extern plot_font_style_t const * const plot_fstyle_broken_object;
@@ -176,7 +184,6 @@ extern plot_font_style_t const * const plot_fstyle_broken_object;
/* other styles */
extern plot_style_t *plot_style_caret;
-extern plot_style_t *plot_style_stroke_history;
extern plot_style_t *plot_style_fill_wbasec;
extern plot_style_t *plot_style_fill_darkwbasec;
extern plot_style_t *plot_style_fill_lightwbasec;
@@ -185,23 +192,9 @@ extern plot_style_t *plot_style_stroke_wblobc;
extern plot_style_t *plot_style_stroke_darkwbasec;
extern plot_style_t *plot_style_stroke_lightwbasec;
+
/* Default font style */
extern plot_font_style_t const * const plot_style_font;
-#ifndef HISTORY_COLOUR_SELECTED
-#define HISTORY_COLOUR_SELECTED 0xFF0000
-#endif
-
-#ifndef HISTORY_COLOUR_FOREGROUND
-#define HISTORY_COLOUR_FOREGROUND 0x333333
-#endif
-
-#ifndef HISTORY_COLOUR_BACKGROUND
-#define HISTORY_COLOUR_BACKGROUND 0xFFFFFF
-#endif
-
-#ifndef HISTORY_COLOUR_LINES
-#define HISTORY_COLOUR_LINES HISTORY_COLOUR_FOREGROUND
-#endif
#endif