1 [CCode (cprefix = "ccss_", lower_case_cprefix = "ccss_", cheader_filename = "ccss/ccss.h")]
4 [CCode (cprefix = "ccss_background_attachment_", cname = "ccss_background_attachment_t")]
5 public class BackgroundAttachment: Property {
6 [CCode (cprefix = "CCSS_BACKGROUND_", has_type_id = false, cname = "ccss_background_attachment_type_t")]
11 public Type attachment {
16 [CCode (cprefix = "ccss_background_image_", cname = "ccss_background_image_t")]
17 public class BackgroundImage: Property {
23 [CCode (cprefix = "ccss_background_position_", cname = "ccss_background_position_t")]
24 public class BackgroundPosition: Property {
25 public Position horizontal_position {
28 public Position vertical_position {
33 [CCode (cprefix = "ccss_background_repeat_", cname = "ccss_background_repeat_t")]
34 public class BackgroundRepeat: Property {
35 [CCode (cprefix = "CCSS_BACKGROUND_", has_type_id = false, cname = "ccss_background_repeat_type_t")]
47 [CCode (cprefix = "ccss_background_size_", cname = "ccss_background_size_t")]
48 public class BackgroundSize: Property {
49 public Position height {
52 public Position width {
57 [CCode (cprefix = "ccss_background_", cname = "ccss_background_t")]
58 public class Background: Property {
59 public BackgroundAttachment attachment {
65 public BackgroundImage image {
68 public BackgroundPosition position {
71 public BackgroundRepeat repeat {
74 public BackgroundSize size {
79 [CCode (cprefix = "ccss_block_", cname = "ccss_block_t")]
81 public void add_property (string property_name, Property property);
84 [CCode (cprefix = "ccss_border_image_", cname = "ccss_border_image_t")]
85 public class BorderImage: Property {
86 [CCode (cprefix = "CCSS_BORDER_IMAGE_TILING_", has_type_id = false, cname = "ccss_border_image_tiling_t")]
98 public Position right {
101 public Position bottom {
104 public Position left {
107 public Tiling top_middle_bottom_horizontal_tiling {
110 public Tiling left_middle_right_vertical_tiling {
115 [CCode (cprefix = "ccss_border_join_", cname = "ccss_border_join_t")]
116 public class BorderRadius: Property {
117 public double radius {
122 [CCode (cprefix = "ccss_border_spacing_", cname = "ccss_border_spacing_t")]
123 public class BorderSpacing: Property {
124 public double spacing {
129 [CCode (cprefix = "ccss_border_style_", cname = "ccss_border_style_t")]
130 public class BorderStyle: Property {
131 [CCode (cprefix = "CCSS_BORDER_STYLE_", has_type_id = false, cname = "ccss_border_style_type_t")]
148 [CCode (cprefix = "ccss_border_width_", cname = "ccss_border_width_t")]
149 public class BorderWidth: Property {
150 public double width {
155 [CCode (cprefix = "ccss_color_", cname = "ccss_color_t", free_function = "ccss_color_destroy")]
156 public class Color: Property {
157 public double alpha {
163 public double green {
171 [CCode (cprefix = "ccss_function_", cname = "ccss_function_t", ref_function = "ccss_function_reference", unref_function = "ccss_function_destroy")]
172 public class Function {
173 [CCode (cname = "ccss_function_create")]
174 public Function (string name, FunctionDelegate function);
176 [CCode (cname = "ccss_function_f", has_target = false)]
177 public delegate string? FunctionDelegate (GLib.SList<string> args, void* user_data);
180 [CCode (cprefix = "ccss_grammar_", cname = "ccss_grammar_t", ref_function = "ccss_grammar_reference", unref_function = "ccss_grammar_destroy")]
181 public class Grammar {
182 [CCode (cname = "ccss_grammar_create_generic")]
183 public Grammar.generic ();
184 [CCode (cname = "ccss_grammar_create_css")]
185 public Grammar.css ();
187 /*public void add_properties (PropertyClass properties);
188 public unowned PropertyClass lookup_property (string name);*/
190 public void add_function (Function function);
191 public unowned Function lookup_function (string name);
193 public Stylesheet create_stylesheet ();
194 public Stylesheet create_stylesheet_from_buffer (char[] buffer, void* user_data);
195 public Stylesheet create_stylesheet_from_file (string css_file, void* user_data);
197 [CCode (cname = "ccss_node_class_t")]
198 public struct NodeClass {
199 public Node.IsA is_a;
200 public Node.GetContainer get_container;
201 public Node.GetBaseStyle get_base_style;
202 public Node.GetInstance get_instance;
203 public Node.GetId get_id;
204 public Node.GetType get_type;
205 public Node.GetClasses get_classes;
206 public Node.GetPseudoClasses get_pseudo_classes;
207 public Node.GetAttribute get_attribute;
208 public Node.GetStyle get_style;
209 public Node.GetViewport get_viewport;
210 public Node.Release release;
214 [CCode (cprefix = "ccss_node_", cname = "ccss_node_t", free_function = "ccss_node_destroy")]
216 [CCode (cname = "ccss_node_create")]
217 public Node (NodeClass node_class, uint n_methods, void* user_data);
218 public void* get_user_data ();
220 [CCode (cname = "ccss_node_get_attribute_f", has_target = false)]
221 public delegate string? GetAttribute (Node node, string name);
222 [CCode (cname = "ccss_node_get_base_style_f", has_target = false)]
223 public delegate Node? GetBaseStyle (Node node);
224 [CCode (cname = "ccss_node_get_classes_f", array_length = false, array_null_terminated = true, has_target = false)]
225 public delegate string[]? GetClasses (Node node);
226 [CCode (cname = "ccss_node_get_container_f", has_target = false)]
227 public delegate Node? GetContainer (Node node);
228 [CCode (cname = "ccss_node_get_id_f", has_target = false)]
229 public delegate string? GetId (Node node);
230 [CCode (cname = "ccss_node_get_instance_f", has_target = false)]
231 public delegate long GetInstance (Node node);
232 [CCode (cname = "ccss_node_get_pseudo_classes_f", array_length = false, array_null_terminated = true, has_target = false)]
233 public delegate string[]? GetPseudoClasses (Node node);
234 [CCode (cname = "ccss_node_get_style_f", has_target = false)]
235 public delegate string? GetStyle (Node node, uint descriptor);
236 [CCode (cname = "ccss_node_get_type_f", has_target = false)]
237 public delegate string? GetType (Node node);
238 [CCode (cname = "ccss_node_get_viewport_f", has_target = false)]
239 public delegate bool GetViewport (Node node, double x, double y, double width, double height);
240 [CCode (cname = "ccss_node_is_a_f", has_target = false)]
241 public delegate bool IsA (Node node, string type_name);
242 [CCode (cname = "ccss_node_release_f", has_target = false)]
243 public delegate void Release (Node node);
246 [CCode (cname = "ccss_padding_t")]
247 public class Padding: Property {
248 public double padding {
253 [CCode (cprefix = "ccss_position_", cname = "ccss_position_t")]
254 public class Position: Property {
255 [CCode (cprefix = "CCSS_POSITION_", has_type_id = false, cname = "ccss_position_type_t")]
272 public double get_hsize (double extent_x, double extent_y, double width, double height);
273 public double get_pos (double extent, double size);
274 public double get_size (double extent);
275 public double get_vsize (double extent_x, double extent_y, double width, double height);
276 public string serialize ();
279 [CCode (cname = "ccss_property_class_t")]
280 public class PropertyClass {
282 public Property.Convert convert;
283 public Property.Create create;
284 public Property.Destroy destroy;
285 public Property.Factory factory;
286 public Property.Inherit inherit;
287 public Property.Serialize serialize;
291 [CCode (cname = "ccss_property_generic_t")]
292 public class PropertyGeneric: Property {
293 public weak string name;
298 [CCode (cprefix = "ccss_property_", cname = "ccss_property_t", free_function = "ccss_property_destroy")]
299 public class Property {
300 [CCode (cprefix = "CCSS_PROPERTY_STATE_", has_type_id = false, cname = "ccss_property_state_t")]
308 [CCode (cname = "ccss_property_parse_state")]
309 public static State parse (string value);
310 [CCode (cname = "ccss_property_state_serialize")]
311 public unowned string serialize ();
313 [CCode (cprefix = "CCSS_PROPERTY_TYPE_", has_type_id = false, cname = "ccss_property_type_t")]
321 public State get_state {
325 [CCode (cname = "ccss_property_create_f")]
326 public delegate Property Create (Grammar grammar, void* values);
327 [CCode (cname = "ccss_property_convert_f", has_target = false)]
328 public delegate bool Convert (Property property, Type target, void* value);
329 [CCode (cname = "ccss_property_destroy_f", has_target = false)]
330 public delegate void Destroy (Property property);
331 [CCode (cname = "ccss_property_factory_f")]
332 public delegate bool Factory (Grammar grammar, Block block, string name, void* values);
333 [CCode (cname = "ccss_property_inherit_f", has_target = false)]
334 public delegate bool Inherit (Style container_style, Style style);
335 [CCode (cname = "ccss_property_serialize_f", has_target = false)]
336 public delegate string Serialize (Property property);
339 [CCode (cprefix = "ccss_style_", cname = "ccss_style_t", free_function = "ccss_style_destroy")]
342 public void @foreach (Iterator func);
343 public bool get_double (string property_name, out double value);
344 public bool get_property (string property_name, out unowned Property value);
345 public bool get_string (string property_name, out unowned string value);
346 public Stylesheet stylesheet {
350 [CCode (cname = "ccss_style_iterator_f")]
351 public delegate void Iterator (Style style, string property_name);
353 public static GLib.HashFunc hash;
356 [CCode (cprefix = "ccss_stylesheet_", cname = "ccss_stylesheet_t", ref_function = "ccss_stylesheet_reference", unref_function = "ccss_stylesheet_destroy")]
357 public class Stylesheet {
358 [CCode (cprefix = "CCSS_STYLESHEET_", has_type_id = false, cname = "ccss_stylesheet_precedence_t")]
359 public enum Precedence {
364 public uint add_from_buffer (char[] buffer, Precedence precedence, void* user_data);
365 public uint add_from_file (string css_file, Precedence precedence, void* user_data);
367 public void @foreach (Iterator func);
368 public Grammar grammar {
371 public Style? query (Node node);
372 public Style? query_type (string type_name);
373 public bool unload (uint descriptor);
375 [CCode (cname = "ccss_stylesheet_iterator_f")]
376 public delegate void Iterator (Stylesheet stylesheet, string type_name);