| Top |
| bool | (*ccss_node_is_a_f) () |
| ccss_node_t * | (*ccss_node_get_container_f) () |
| ccss_node_t * | (*ccss_node_get_base_style_f) () |
| ptrdiff_t | (*ccss_node_get_instance_f) () |
| const char * | (*ccss_node_get_id_f) () |
| const char * | (*ccss_node_get_type_f) () |
| const char * | (*ccss_node_get_class_f) () |
| char * | (*ccss_node_get_attribute_f) () |
| const char * | (*ccss_node_get_style_f) () |
| bool | (*ccss_node_get_viewport_f) () |
| void | (*ccss_node_release_f) () |
| void | ccss_node_init () |
bool (*ccss_node_is_a_f) (ccss_node_t *self,char const *type_name);
Hook function to query whether a ccss_node_t is of a certain type.
ccss_node_t *
(*ccss_node_get_container_f) (ccss_node_t const *self);
Hook function to query the container of a ccss_node_t.
ccss_node_t *
(*ccss_node_get_base_style_f) (ccss_node_t const *self);
Hook function to query the name of the style a ccss_node_t derives from.
ptrdiff_t
(*ccss_node_get_instance_f) (ccss_node_t const *self);
Hook function to query for a unique numerical representation of a ccss_node_t.
const char *
(*ccss_node_get_id_f) (ccss_node_t const *self);
Hook function to query the ID of a ccss_node_t.
const char *
(*ccss_node_get_type_f) (ccss_node_t const *self);
Hook function to query the type name of a ccss_node_t.
const char *
(*ccss_node_get_class_f) (ccss_node_t const *self);
Hook function to query the class name of a ccss_node_t.
char * (*ccss_node_get_attribute_f) (ccss_node_t const *self,char const *name);
Hook function to query a ccss_node_t's attributes.
const char * (*ccss_node_get_style_f) (ccss_node_t const *self,unsigned int descriptor);
Hook function to query a ccss_node_t's inline CSS style.
See: ccss_stylesheet_unload().
bool (*ccss_node_get_viewport_f) (ccss_node_t const *self,double *x,double *y,double *width,double *height);
Hook function to determine the position of a node in the viewport.
self |
a ccss_node_t. |
|
x |
horizontal position. |
|
y |
vertical position. |
|
width |
width of viewport. |
|
height |
height of viewport. |
void
(*ccss_node_release_f) (ccss_node_t *self);
Hook function to deallocate a ccss_node_t instance.
void ccss_node_init (ccss_node_t *self,ccss_node_class_t *node_class);
Initializes node_class
by filling unset functions with the default
implementations and attaches it to self
.
typedef struct ccss_node_ ccss_node_t;
Stack-allocatable struct representing a document node. Used for querying the ccss_stylesheet_t.
Memory management: Unless specified otherwise, objects of this kind are under the responsibility of the libccss consumer.
typedef struct {
ccss_node_is_a_f is_a;
ccss_node_get_container_f get_container;
ccss_node_get_base_style_f get_base_style;
ccss_node_get_instance_f get_instance;
ccss_node_get_id_f get_id;
ccss_node_get_type_f get_type;
ccss_node_get_class_f get_class;
ccss_node_get_pseudo_classes_f get_pseudo_classes;
ccss_node_get_attribute_f get_attribute;
ccss_node_get_style_f get_style;
ccss_node_get_viewport_f get_viewport;
ccss_node_release_f release;
} ccss_node_class_t;
Dispatch table a CCSS consumer has to fill so the selection engine can retrieve information about the document the document.
The implemented dispatch table needs to be passed to ccss_node_init.
ccss_node_is_a_f |
||
ccss_node_get_container_f |
||
ccss_node_get_base_style_f |
||
ccss_node_get_instance_f |
||
ccss_node_get_id_f |
||
ccss_node_get_type_f |
||
ccss_node_get_class_f |
||
a ccss_node_get_pseudo_classes_f. |
||
ccss_node_get_attribute_f |
||
ccss_node_get_style_f |
||
ccss_node_get_viewport_f |
||
ccss_node_release_f |