32 #define PRIVATE(a_this) ((a_this)->priv) 69 result = g_try_malloc (
sizeof (
CRCascade));
116 g_return_val_if_fail (a_this
120 return PRIVATE (a_this)->sheets[a_origin];
138 g_return_val_if_fail (a_this
143 if (
PRIVATE (a_this)->sheets[a_origin])
145 PRIVATE (a_this)->sheets[a_origin] = a_sheet;
147 a_sheet->
origin = a_origin;
161 g_return_if_fail (a_this &&
PRIVATE (a_this));
179 g_return_if_fail (a_this &&
PRIVATE (a_this));
181 if (
PRIVATE (a_this)->ref_count)
183 if (!
PRIVATE (a_this)->ref_count) {
197 g_return_if_fail (a_this);
203 if (
PRIVATE (a_this)->sheets[i]) {
207 PRIVATE (a_this)->sheets[i] = NULL;
the declaration of the CRCascade class.
CRStyleSheet * cr_cascade_get_sheet(CRCascade *a_this, enum CRStyleOrigin a_origin)
cr_cascade_get_sheet: @a_this: the current instance of CRCascade.
void cr_cascade_destroy(CRCascade *a_this)
cr_cascade_destroy: @a_this: the current instance of CRCascade
enum CRStatus cr_cascade_set_sheet(CRCascade *a_this, CRStyleSheet *a_sheet, enum CRStyleOrigin a_origin)
cr_cascade_set_sheet: @a_this: the current instance of CRCascade.
An abstraction of a css stylesheet as defined by the css2 spec in chapter 4.
void cr_stylesheet_ref(CRStyleSheet *a_this)
CRStatus
The status type returned by the methods of the croco library.
enum CRStyleOrigin origin
gboolean cr_stylesheet_unref(CRStyleSheet *a_this)
CRCascade * cr_cascade_new(CRStyleSheet *a_author_sheet, CRStyleSheet *a_user_sheet, CRStyleSheet *a_ua_sheet)
cr_cascade_new: @a_author_sheet: the author origin style sheet.
CRStyleSheet * sheets[3]
the 3 style sheets of the cascade: author, user, and useragent sheet.
typedefG_BEGIN_DECLS struct _CRCascadePriv CRCascadePriv
void cr_cascade_ref(CRCascade *a_this)
cr_cascade_ref: @a_this: the current instance of CRCascade
void cr_cascade_unref(CRCascade *a_this)
cr_cascade_unref: @a_this: the current instance of CRCascade.
#define cr_utils_trace_info(a_msg)
Traces an info message.