1 module webkit2webextension.DOMUIEvent; 2 3 private import glib.Str; 4 private import gobject.ObjectG; 5 private import webkit2webextension.DOMDOMWindow; 6 private import webkit2webextension.DOMEvent; 7 private import webkit2webextension.c.functions; 8 public import webkit2webextension.c.types; 9 10 11 /** */ 12 public class DOMUIEvent : DOMEvent 13 { 14 /** the main Gtk struct */ 15 protected WebKitDOMUIEvent* webKitDOMUIEvent; 16 17 /** Get the main Gtk struct */ 18 public WebKitDOMUIEvent* getDOMUIEventStruct(bool transferOwnership = false) 19 { 20 if (transferOwnership) 21 ownedRef = false; 22 return webKitDOMUIEvent; 23 } 24 25 /** the main Gtk struct as a void* */ 26 protected override void* getStruct() 27 { 28 return cast(void*)webKitDOMUIEvent; 29 } 30 31 /** 32 * Sets our main struct and passes it to the parent class. 33 */ 34 public this (WebKitDOMUIEvent* webKitDOMUIEvent, bool ownedRef = false) 35 { 36 this.webKitDOMUIEvent = webKitDOMUIEvent; 37 super(cast(WebKitDOMEvent*)webKitDOMUIEvent, ownedRef); 38 } 39 40 41 /** */ 42 public static GType getType() 43 { 44 return webkit_dom_ui_event_get_type(); 45 } 46 47 /** 48 * 49 * 50 * Deprecated: Use JavaScriptCore API instead 51 * 52 * Returns: A #glong 53 */ 54 public glong getCharCode() 55 { 56 return webkit_dom_ui_event_get_char_code(webKitDOMUIEvent); 57 } 58 59 /** 60 * 61 * 62 * Deprecated: Use JavaScriptCore API instead 63 * 64 * Returns: A #glong 65 */ 66 public glong getDetail() 67 { 68 return webkit_dom_ui_event_get_detail(webKitDOMUIEvent); 69 } 70 71 /** 72 * 73 * 74 * Deprecated: Use JavaScriptCore API instead 75 * 76 * Returns: A #glong 77 */ 78 public glong getKeyCode() 79 { 80 return webkit_dom_ui_event_get_key_code(webKitDOMUIEvent); 81 } 82 83 /** 84 * 85 * 86 * Deprecated: Use JavaScriptCore API instead 87 * 88 * Returns: A #glong 89 */ 90 public glong getLayerX() 91 { 92 return webkit_dom_ui_event_get_layer_x(webKitDOMUIEvent); 93 } 94 95 /** 96 * 97 * 98 * Deprecated: Use JavaScriptCore API instead 99 * 100 * Returns: A #glong 101 */ 102 public glong getLayerY() 103 { 104 return webkit_dom_ui_event_get_layer_y(webKitDOMUIEvent); 105 } 106 107 /** 108 * 109 * 110 * Deprecated: Use JavaScriptCore API instead 111 * 112 * Returns: A #glong 113 */ 114 public glong getPageX() 115 { 116 return webkit_dom_ui_event_get_page_x(webKitDOMUIEvent); 117 } 118 119 /** 120 * 121 * 122 * Deprecated: Use JavaScriptCore API instead 123 * 124 * Returns: A #glong 125 */ 126 public glong getPageY() 127 { 128 return webkit_dom_ui_event_get_page_y(webKitDOMUIEvent); 129 } 130 131 /** 132 * 133 * 134 * Deprecated: Use JavaScriptCore API instead 135 * 136 * Returns: A #WebKitDOMDOMWindow 137 */ 138 public DOMDOMWindow getView() 139 { 140 auto __p = webkit_dom_ui_event_get_view(webKitDOMUIEvent); 141 142 if(__p is null) 143 { 144 return null; 145 } 146 147 return ObjectG.getDObject!(DOMDOMWindow)(cast(WebKitDOMDOMWindow*) __p, true); 148 } 149 150 /** 151 * 152 * 153 * Deprecated: Use JavaScriptCore API instead 154 * 155 * Params: 156 * type = A #gchar 157 * canBubble = A #gboolean 158 * cancelable = A #gboolean 159 * view = A #WebKitDOMDOMWindow 160 * detail = A #glong 161 */ 162 public void initUiEvent(string type, bool canBubble, bool cancelable, DOMDOMWindow view, glong detail) 163 { 164 webkit_dom_ui_event_init_ui_event(webKitDOMUIEvent, Str.toStringz(type), canBubble, cancelable, (view is null) ? null : view.getDOMDOMWindowStruct(), detail); 165 } 166 }