1 module webkit2webextension.DOMCSSValue;
2 
3 private import glib.ErrorG;
4 private import glib.GException;
5 private import glib.Str;
6 private import webkit2webextension.DOMObject;
7 private import webkit2webextension.c.functions;
8 public  import webkit2webextension.c.types;
9 
10 
11 /** */
12 public class DOMCSSValue : DOMObject
13 {
14 	/** the main Gtk struct */
15 	protected WebKitDOMCSSValue* webKitDOMCSSValue;
16 
17 	/** Get the main Gtk struct */
18 	public WebKitDOMCSSValue* getDOMCSSValueStruct(bool transferOwnership = false)
19 	{
20 		if (transferOwnership)
21 			ownedRef = false;
22 		return webKitDOMCSSValue;
23 	}
24 
25 	/** the main Gtk struct as a void* */
26 	protected override void* getStruct()
27 	{
28 		return cast(void*)webKitDOMCSSValue;
29 	}
30 
31 	/**
32 	 * Sets our main struct and passes it to the parent class.
33 	 */
34 	public this (WebKitDOMCSSValue* webKitDOMCSSValue, bool ownedRef = false)
35 	{
36 		this.webKitDOMCSSValue = webKitDOMCSSValue;
37 		super(cast(WebKitDOMObject*)webKitDOMCSSValue, ownedRef);
38 	}
39 
40 
41 	/** */
42 	public static GType getType()
43 	{
44 		return webkit_dom_css_value_get_type();
45 	}
46 
47 	/**
48 	 *
49 	 *
50 	 * Deprecated: Use JavaScriptCore API instead
51 	 *
52 	 * Returns: A #gchar
53 	 */
54 	public string getCssText()
55 	{
56 		auto retStr = webkit_dom_css_value_get_css_text(webKitDOMCSSValue);
57 
58 		scope(exit) Str.freeString(retStr);
59 		return Str.toString(retStr);
60 	}
61 
62 	/**
63 	 *
64 	 *
65 	 * Deprecated: Use JavaScriptCore API instead
66 	 *
67 	 * Returns: A #gushort
68 	 */
69 	public ushort getCssValueType()
70 	{
71 		return webkit_dom_css_value_get_css_value_type(webKitDOMCSSValue);
72 	}
73 
74 	/**
75 	 *
76 	 *
77 	 * Deprecated: Use JavaScriptCore API instead
78 	 *
79 	 * Params:
80 	 *     value = A #gchar
81 	 *
82 	 * Throws: GException on failure.
83 	 */
84 	public void setCssText(string value)
85 	{
86 		GError* err = null;
87 
88 		webkit_dom_css_value_set_css_text(webKitDOMCSSValue, Str.toStringz(value), &err);
89 
90 		if (err !is null)
91 		{
92 			throw new GException( new ErrorG(err) );
93 		}
94 	}
95 }