1 module webkit2webextension.DOMStyleSheet; 2 3 private import glib.Str; 4 private import gobject.ObjectG; 5 private import webkit2webextension.DOMMediaList; 6 private import webkit2webextension.DOMNode; 7 private import webkit2webextension.DOMObject; 8 private import webkit2webextension.c.functions; 9 public import webkit2webextension.c.types; 10 11 12 /** */ 13 public class DOMStyleSheet : DOMObject 14 { 15 /** the main Gtk struct */ 16 protected WebKitDOMStyleSheet* webKitDOMStyleSheet; 17 18 /** Get the main Gtk struct */ 19 public WebKitDOMStyleSheet* getDOMStyleSheetStruct(bool transferOwnership = false) 20 { 21 if (transferOwnership) 22 ownedRef = false; 23 return webKitDOMStyleSheet; 24 } 25 26 /** the main Gtk struct as a void* */ 27 protected override void* getStruct() 28 { 29 return cast(void*)webKitDOMStyleSheet; 30 } 31 32 /** 33 * Sets our main struct and passes it to the parent class. 34 */ 35 public this (WebKitDOMStyleSheet* webKitDOMStyleSheet, bool ownedRef = false) 36 { 37 this.webKitDOMStyleSheet = webKitDOMStyleSheet; 38 super(cast(WebKitDOMObject*)webKitDOMStyleSheet, ownedRef); 39 } 40 41 42 /** */ 43 public static GType getType() 44 { 45 return webkit_dom_style_sheet_get_type(); 46 } 47 48 /** 49 * 50 * 51 * Deprecated: Use JavaScriptCore API instead 52 * 53 * Returns: A #gchar 54 */ 55 public string getContentType() 56 { 57 auto retStr = webkit_dom_style_sheet_get_content_type(webKitDOMStyleSheet); 58 59 scope(exit) Str.freeString(retStr); 60 return Str.toString(retStr); 61 } 62 63 /** 64 * 65 * 66 * Deprecated: Use JavaScriptCore API instead 67 * 68 * Returns: A #gboolean 69 */ 70 public bool getDisabled() 71 { 72 return webkit_dom_style_sheet_get_disabled(webKitDOMStyleSheet) != 0; 73 } 74 75 /** 76 * 77 * 78 * Deprecated: Use JavaScriptCore API instead 79 * 80 * Returns: A #gchar 81 */ 82 public string getHref() 83 { 84 auto retStr = webkit_dom_style_sheet_get_href(webKitDOMStyleSheet); 85 86 scope(exit) Str.freeString(retStr); 87 return Str.toString(retStr); 88 } 89 90 /** 91 * 92 * 93 * Deprecated: Use JavaScriptCore API instead 94 * 95 * Returns: A #WebKitDOMMediaList 96 */ 97 public DOMMediaList getMedia() 98 { 99 auto __p = webkit_dom_style_sheet_get_media(webKitDOMStyleSheet); 100 101 if(__p is null) 102 { 103 return null; 104 } 105 106 return ObjectG.getDObject!(DOMMediaList)(cast(WebKitDOMMediaList*) __p, true); 107 } 108 109 /** 110 * 111 * 112 * Deprecated: Use JavaScriptCore API instead 113 * 114 * Returns: A #WebKitDOMNode 115 */ 116 public DOMNode getOwnerNode() 117 { 118 auto __p = webkit_dom_style_sheet_get_owner_node(webKitDOMStyleSheet); 119 120 if(__p is null) 121 { 122 return null; 123 } 124 125 return ObjectG.getDObject!(DOMNode)(cast(WebKitDOMNode*) __p); 126 } 127 128 /** 129 * 130 * 131 * Deprecated: Use JavaScriptCore API instead 132 * 133 * Returns: A #WebKitDOMStyleSheet 134 */ 135 public DOMStyleSheet getParentStyleSheet() 136 { 137 auto __p = webkit_dom_style_sheet_get_parent_style_sheet(webKitDOMStyleSheet); 138 139 if(__p is null) 140 { 141 return null; 142 } 143 144 return ObjectG.getDObject!(DOMStyleSheet)(cast(WebKitDOMStyleSheet*) __p, true); 145 } 146 147 /** 148 * 149 * 150 * Deprecated: Use JavaScriptCore API instead 151 * 152 * Returns: A #gchar 153 */ 154 public string getTitle() 155 { 156 auto retStr = webkit_dom_style_sheet_get_title(webKitDOMStyleSheet); 157 158 scope(exit) Str.freeString(retStr); 159 return Str.toString(retStr); 160 } 161 162 /** 163 * 164 * 165 * Deprecated: Use JavaScriptCore API instead 166 * 167 * Params: 168 * value = A #gboolean 169 */ 170 public void setDisabled(bool value) 171 { 172 webkit_dom_style_sheet_set_disabled(webKitDOMStyleSheet, value); 173 } 174 }