From c853ffb5b2f75f5a889ed2e3ef89b818a736e87a Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 13 Apr 2024 13:50:49 +0200 Subject: Adding upstream version 1.3+ds. Signed-off-by: Daniel Baumann --- src/3rdparty/libcroco/docs/usage.txt | 47 ++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 src/3rdparty/libcroco/docs/usage.txt (limited to 'src/3rdparty/libcroco/docs/usage.txt') diff --git a/src/3rdparty/libcroco/docs/usage.txt b/src/3rdparty/libcroco/docs/usage.txt new file mode 100644 index 0000000..a061116 --- /dev/null +++ b/src/3rdparty/libcroco/docs/usage.txt @@ -0,0 +1,47 @@ +initial author: Dodji Seketeli + +Note: +---- +Users can generate an html doc of all the functions of libcroco. +This is documentation is an unvaluable tool to master the libcroco +usage and internals. +To generate the documentation, just cd into the libcroco project +directory and type 'make apidoc' ; +This will generate the documentation in the docs/api directory. + + +Usage of the libcroco css2 parsing library +=========================================== + +libcroco has two main user programming interfaces: +the SAC parser, and the CSSOM parser. + + +The SAC parser +'''''''''''''''' + +The SAC (Simple Api for CSS) is the lowest level parsing api +provided by libcroco. +It is an event driven api in which the parser notifies the +caller whenever it encounters a remarquable css construction. + +The SAC parser is implemented in the CRParser class. +To use it, one must first instantiate a CRParser. + +I said earlier the the SAC parser notifies it caller +whenever it encounters certain css language constructions during +the parsing. "Notifies" actually means that it calls a subset of given +callback function pointers set. This set of function pointers is +called a "Document Handler". So, by overriding some function pointers +of the document handler, the user can define the actions to be +performed when a given css language construction is encountered. + +The SAC parser's api is defined in cr-parser.h and +the document handler's api is defined in cr-doc-handler.h . + + +The CSSOM parser +''''''''''''''''' + + + -- cgit v1.2.3