Defines | Typedefs | Enumerations

gfxTypes.h File Reference

#include "prtypes.h"
#include "nsISupportsImpl.h"
#include "nsAutoPtr.h"
Include dependency graph for gfxTypes.h:
This graph shows which files directly or indirectly include this file:

Defines

#define THEBES_API   NS_IMPORT
#define NS_ERROR_GFX_GENERAL_BASE   (50)
 gfx errors
#define NS_ERROR_GFX_CMAP_MALFORMED   NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX,NS_ERROR_GFX_GENERAL_BASE+1)
#define THEBES_INLINE_DECL_REFCOUNTING(_class)
 Define refcounting for Thebes.

Typedefs

typedef double gfxFloat
 Currently needs to be 'double' for Cairo compatibility.

Enumerations

enum  gfxBreakPriority { eNoBreak = 0, eWordWrapBreak, eNormalBreak }
 

Priority of a line break opportunity.

More...

Define Documentation

#define NS_ERROR_GFX_CMAP_MALFORMED   NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX,NS_ERROR_GFX_GENERAL_BASE+1)
#define NS_ERROR_GFX_GENERAL_BASE   (50)

gfx errors

#define THEBES_API   NS_IMPORT
#define THEBES_INLINE_DECL_REFCOUNTING (   _class  ) 
Value:
public:                                                                       \
    nsrefcnt AddRef(void) {                                                   \
        NS_PRECONDITION(PRInt32(mRefCnt) >= 0, "illegal refcnt");             \
        ++mRefCnt;                                                            \
        NS_LOG_ADDREF(this, mRefCnt, #_class, sizeof(*this));                 \
        return mRefCnt;                                                       \
    }                                                                         \
    nsrefcnt Release(void) {                                                  \
        NS_PRECONDITION(0 != mRefCnt, "dup release");                         \
        --mRefCnt;                                                            \
        NS_LOG_RELEASE(this, mRefCnt, #_class);                               \
        if (mRefCnt == 0) {                                                   \
            mRefCnt = 1; /* stabilize */                                      \
            NS_DELETEXPCOM(this);                                             \
            return 0;                                                         \
        }                                                                     \
        return mRefCnt;                                                       \
    }                                                                         \
protected:                                                                    \
    nsAutoRefCnt mRefCnt;                                                     \
public:

Define refcounting for Thebes.

For now use the stuff from nsISupportsImpl even though it forces the functions to be virtual...


Typedef Documentation

typedef double gfxFloat

Currently needs to be 'double' for Cairo compatibility.

Could become 'float', perhaps, in some configurations.


Enumeration Type Documentation

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 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 also:
gfxTextRun::BreakAndMeasureText
nsLineLayout::NotifyOptionalBreakPosition
Enumerator:
eNoBreak 
eWordWrapBreak 
eNormalBreak