本文整理汇总了C++中WEBKIT_DOM_OBJECT函数的典型用法代码示例。如果您正苦于以下问题:C++ WEBKIT_DOM_OBJECT函数的具体用法?C++ WEBKIT_DOM_OBJECT怎么用?C++ WEBKIT_DOM_OBJECT使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了WEBKIT_DOM_OBJECT函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: core
WebCore::TestCallback* core(WebKitDOMTestCallback* request)
{
g_return_val_if_fail(request, 0);
WebCore::TestCallback* coreObject = static_cast<WebCore::TestCallback*>(WEBKIT_DOM_OBJECT(request)->coreObject);
g_return_val_if_fail(coreObject, 0);
return coreObject;
}
示例2: core
WebCore::EventTarget* core(WebKitDOMEventTarget* request)
{
g_return_val_if_fail(request, 0);
WebCore::EventTarget* coreObject = static_cast<WebCore::EventTarget*>(WEBKIT_DOM_OBJECT(request)->coreObject);
g_return_val_if_fail(coreObject, 0);
return coreObject;
}
示例3: webkit_dom_test_custom_named_getter_constructor
static GObject* webkit_dom_test_custom_named_getter_constructor(GType type, guint constructPropertiesCount, GObjectConstructParam* constructProperties)
{
GObject* object = G_OBJECT_CLASS(webkit_dom_test_custom_named_getter_parent_class)->constructor(type, constructPropertiesCount, constructProperties);
WebKitDOMTestCustomNamedGetterPrivate* priv = WEBKIT_DOM_TEST_CUSTOM_NAMED_GETTER_GET_PRIVATE(object);
priv->coreObject = static_cast<WebCore::TestCustomNamedGetter*>(WEBKIT_DOM_OBJECT(object)->coreObject);
WebKit::DOMObjectCache::put(priv->coreObject.get(), object);
return object;
}
示例4: webkit_dom_attribute_constructor
static GObject* webkit_dom_attribute_constructor(GType type, guint constructPropertiesCount, GObjectConstructParam* constructProperties)
{
GObject* object = G_OBJECT_CLASS(webkit_dom_attribute_parent_class)->constructor(type, constructPropertiesCount, constructProperties);
WebKitDOMattributePrivate* priv = WEBKIT_DOM_ATTRIBUTE_GET_PRIVATE(object);
priv->coreObject = static_cast<WebCore::attribute*>(WEBKIT_DOM_OBJECT(object)->coreObject);
WebKit::DOMObjectCache::put(priv->coreObject.get(), object);
return object;
}
示例5: webkit_dom_test_event_constructor_constructor
static GObject* webkit_dom_test_event_constructor_constructor(GType type, guint constructPropertiesCount, GObjectConstructParam* constructProperties)
{
GObject* object = G_OBJECT_CLASS(webkit_dom_test_event_constructor_parent_class)->constructor(type, constructPropertiesCount, constructProperties);
WebKitDOMTestEventConstructorPrivate* priv = WEBKIT_DOM_TEST_EVENT_CONSTRUCTOR_GET_PRIVATE(object);
priv->coreObject = static_cast<WebCore::TestEventConstructor*>(WEBKIT_DOM_OBJECT(object)->coreObject);
WebKit::DOMObjectCache::put(priv->coreObject.get(), object);
return object;
}
示例6: webkit_dom_test_generate_is_reachable_constructor
static GObject* webkit_dom_test_generate_is_reachable_constructor(GType type, guint constructPropertiesCount, GObjectConstructParam* constructProperties)
{
GObject* object = G_OBJECT_CLASS(webkit_dom_test_generate_is_reachable_parent_class)->constructor(type, constructPropertiesCount, constructProperties);
WebKitDOMTestGenerateIsReachablePrivate* priv = WEBKIT_DOM_TEST_GENERATE_IS_REACHABLE_GET_PRIVATE(object);
priv->coreObject = static_cast<WebCore::TestGenerateIsReachable*>(WEBKIT_DOM_OBJECT(object)->coreObject);
WebKit::DOMObjectCache::put(priv->coreObject.get(), object);
return object;
}
示例7: webkit_dom_test_media_query_list_listener_constructor
static GObject* webkit_dom_test_media_query_list_listener_constructor(GType type, guint constructPropertiesCount, GObjectConstructParam* constructProperties)
{
GObject* object = G_OBJECT_CLASS(webkit_dom_test_media_query_list_listener_parent_class)->constructor(type, constructPropertiesCount, constructProperties);
WebKitDOMTestMediaQueryListListenerPrivate* priv = WEBKIT_DOM_TEST_MEDIA_QUERY_LIST_LISTENER_GET_PRIVATE(object);
priv->coreObject = static_cast<WebCore::TestMediaQueryListListener*>(WEBKIT_DOM_OBJECT(object)->coreObject);
WebKit::DOMObjectCache::put(priv->coreObject.get(), object);
return object;
}
示例8: webkit_dom_style_sheet_constructor
static GObject* webkit_dom_style_sheet_constructor(GType type, guint constructPropertiesCount, GObjectConstructParam* constructProperties)
{
GObject* object = G_OBJECT_CLASS(webkit_dom_style_sheet_parent_class)->constructor(type, constructPropertiesCount, constructProperties);
WebKitDOMStyleSheetPrivate* priv = WEBKIT_DOM_STYLE_SHEET_GET_PRIVATE(object);
priv->coreObject = static_cast<WebCore::StyleSheet*>(WEBKIT_DOM_OBJECT(object)->coreObject);
WebKit::DOMObjectCache::put(priv->coreObject.get(), object);
return object;
}
示例9: webkit_dom_object_set_property
static void webkit_dom_object_set_property(GObject* object, guint prop_id, const GValue* value, GParamSpec* pspec)
{
switch (prop_id) {
case PROP_CORE_OBJECT:
WEBKIT_DOM_OBJECT(object)->coreObject = g_value_get_pointer(value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
break;
}
}
示例10: webkit_dom_test_event_target_dispatch_event
static void webkit_dom_test_event_target_dispatch_event(WebKitDOMEventTarget* target, WebKitDOMEvent* event, GError** error)
{
WebCore::Event* coreEvent = WebKit::core(event);
WebCore::TestEventTarget* coreTarget = static_cast<WebCore::TestEventTarget*>(WEBKIT_DOM_OBJECT(target)->coreObject);
WebCore::ExceptionCode ec = 0;
coreTarget->dispatchEvent(coreEvent, ec);
if (ec) {
WebCore::ExceptionCodeDescription description(ec);
g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), description.code, description.name);
}
}
示例11: webkit_dom_test_event_target_dispatch_event
static gboolean webkit_dom_test_event_target_dispatch_event(WebKitDOMEventTarget* target, WebKitDOMEvent* event, GError** error)
{
WebCore::Event* coreEvent = WebKit::core(event);
if (!coreEvent)
return false;
WebCore::TestEventTarget* coreTarget = static_cast<WebCore::TestEventTarget*>(WEBKIT_DOM_OBJECT(target)->coreObject);
WebCore::ExceptionCode ec = 0;
gboolean result = coreTarget->dispatchEventForBindings(*coreEvent, ec);
if (ec) {
WebCore::ExceptionCodeDescription description(ec);
g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), description.code, description.name);
}
return result;
}
示例12: webkit_dom_test_callback_finalize
static void webkit_dom_test_callback_finalize(GObject* object)
{
WebKitDOMObject* dom_object = WEBKIT_DOM_OBJECT(object);
if (dom_object->coreObject) {
WebCore::TestCallback* coreObject = static_cast<WebCore::TestCallback *>(dom_object->coreObject);
WebKit::DOMObjectCache::forget(coreObject);
coreObject->deref();
dom_object->coreObject = NULL;
}
G_OBJECT_CLASS(webkit_dom_test_callback_parent_class)->finalize(object);
}
示例13: webkit_dom_test_media_query_list_listener_finalize
static void webkit_dom_test_media_query_list_listener_finalize(GObject* object)
{
WebKitDOMObject* dom_object = WEBKIT_DOM_OBJECT(object);
if (dom_object->coreObject) {
WebCore::TestMediaQueryListListener* coreObject = static_cast<WebCore::TestMediaQueryListListener *>(dom_object->coreObject);
WebKit::DOMObjectCache::forget(coreObject);
coreObject->deref();
dom_object->coreObject = NULL;
}
G_OBJECT_CLASS(webkit_dom_test_media_query_list_listener_parent_class)->finalize(object);
}
示例14: webkit_dom_html_embed_element_dispatch_event
static gboolean webkit_dom_html_embed_element_dispatch_event(WebKitDOMEventTarget* target, WebKitDOMEvent* event, GError** error)
{
WebCore::Event* coreEvent = WebKit::core(event);
if (!coreEvent)
return false;
WebCore::HTMLEmbedElement* coreTarget = static_cast<WebCore::HTMLEmbedElement*>(WEBKIT_DOM_OBJECT(target)->coreObject);
auto result = coreTarget->dispatchEventForBindings(*coreEvent);
if (result.hasException()) {
WebCore::ExceptionCodeDescription description(result.releaseException().code());
g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), description.code, description.name);
return false;
}
return result.releaseReturnValue();
}
示例15: wrapTestCallback
WebKitDOMTestCallback* wrapTestCallback(WebCore::TestCallback* coreObject)
{
g_return_val_if_fail(coreObject != 0, 0);
WebKitDOMTestCallback* wrapper = WEBKIT_DOM_TEST_CALLBACK(g_object_new(WEBKIT_TYPE_DOM_TEST_CALLBACK, NULL));
g_return_val_if_fail(wrapper != 0, 0);
/* We call ref() rather than using a C++ smart pointer because we can't store a C++ object
* in a C-allocated GObject structure. See the finalize() code for the
* matching deref().
*/
coreObject->ref();
WEBKIT_DOM_OBJECT(wrapper)->coreObject = coreObject;
return wrapper;
}