![]() |
![]() |
![]() |
Libcroco Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
CRCascadePriv; CRCascade; CRCascade * cr_cascade_new (CRStyleSheet *a_author_sheet
,CRStyleSheet *a_user_sheet
,CRStyleSheet *a_ua_sheet
); CRStyleSheet * cr_cascade_get_sheet (CRCascade *a_this
,enum CRStyleOrigin a_origin
); enum CRStatus cr_cascade_set_sheet (CRCascade *a_this
,CRStyleSheet *a_sheet
,enum CRStyleOrigin a_origin
); void cr_cascade_ref (CRCascade *a_this
); void cr_cascade_unref (CRCascade *a_this
); void cr_cascade_destroy (CRCascade *a_this
);
CRCascade * cr_cascade_new (CRStyleSheet *a_author_sheet
,CRStyleSheet *a_user_sheet
,CRStyleSheet *a_ua_sheet
);
Constructor of the CRCascade class. Note that all three parameters of this method are ref counted and their refcount is increased. Their refcount will be decreased at the destruction of the instance of CRCascade. So the caller should not call their destructor. The caller should call their ref/unref method instead if it wants
|
the author origin style sheet. May be NULL. |
|
the user origin style sheet. May be NULL. |
|
the user agent origin style sheet. May be NULL. |
Returns : |
the newly built instance of CRCascade or NULL if an error arose during constrution. |
CRStyleSheet * cr_cascade_get_sheet (CRCascade *a_this
,enum CRStyleOrigin a_origin
);
Gets a sheet, part of the cascade.
Note that the returned stylesheet
is refcounted so if the caller wants
to manage it's lifecycle, it must use
cr_stylesheet_ref()
/cr_stylesheet_unref()
instead
of the cr_stylesheet_destroy()
method.
|
the current instance of CRCascade. |
|
the origin of the style sheet as defined in the css2 spec in chapter 6.4. Gets a given origin sheet. |
Returns : |
the style sheet, or NULL if it does not exist. |
enum CRStatus cr_cascade_set_sheet (CRCascade *a_this
,CRStyleSheet *a_sheet
,enum CRStyleOrigin a_origin
);
Sets a stylesheet in the cascade
|
the current instance of CRCascade. |
|
the stylesheet to set. |
|
the origin of the stylesheet. |
Returns : |
CR_OK upon successfull completion, an error code otherwise. |
void cr_cascade_ref (CRCascade *a_this
);
Increases the reference counter of the current instance of CRCascade.
|
the current instance of CRCascade |
void cr_cascade_unref (CRCascade *a_this
);
Decrements the reference counter associated
to this instance of CRCascade. If the reference
counter reaches zero, the instance is destroyed
using cr_cascade_destroy()
|
the current instance of CRCascade. |