diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /gfx/thebes/gfxTypes.h | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'gfx/thebes/gfxTypes.h')
-rw-r--r-- | gfx/thebes/gfxTypes.h | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/gfx/thebes/gfxTypes.h b/gfx/thebes/gfxTypes.h new file mode 100644 index 000000000..976da1fef --- /dev/null +++ b/gfx/thebes/gfxTypes.h @@ -0,0 +1,82 @@ +/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*- + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#ifndef GFX_TYPES_H +#define GFX_TYPES_H + +#include <stdint.h> + +typedef struct _cairo_surface cairo_surface_t; +typedef struct _cairo_user_data_key cairo_user_data_key_t; + +typedef void (*thebes_destroy_func_t) (void *data); + +/** + * Currently needs to be 'double' for Cairo compatibility. Could + * become 'float', perhaps, in some configurations. + */ +typedef double gfxFloat; + +/** + * Priority of a line break opportunity. + * + * eNoBreak The line has no break opportunities + * eWordWrapBreak The line has a break opportunity only within a word. With + * overflow-wrap|word-wrap: break-word we will break at this point only if + * there are no other break opportunities in the line. + * eNormalBreak The line has a break opportunity determined by the standard + * line-breaking algorithm. + * + * Future expansion: split eNormalBreak into multiple priorities, e.g. + * punctuation break and whitespace break (bug 389710). + * As and when we implement it, text-wrap: unrestricted will + * mean that priorities are ignored and all line-break + * opportunities are equal. + * + * @see gfxTextRun::BreakAndMeasureText + * @see nsLineLayout::NotifyOptionalBreakPosition + */ +enum class gfxBreakPriority { + eNoBreak = 0, + eWordWrapBreak, + eNormalBreak +}; + +enum class gfxSurfaceType { + Image, + PDF, + PS, + Xlib, + Xcb, + Glitz, // unused, but needed for cairo parity + Quartz, + Win32, + BeOS, + DirectFB, // unused, but needed for cairo parity + SVG, + OS2, + Win32Printing, + QuartzImage, + Script, + QPainter, + Recording, + VG, + GL, + DRM, + Tee, + XML, + Skia, + Subsurface, + Max +}; + +enum class gfxContentType { + COLOR = 0x1000, + ALPHA = 0x2000, + COLOR_ALPHA = 0x3000, + SENTINEL = 0xffff +}; + +#endif /* GFX_TYPES_H */ |