• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ G_TYPE_CHECK_INSTANCE_TYPE函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中G_TYPE_CHECK_INSTANCE_TYPE函数的典型用法代码示例。如果您正苦于以下问题:C++ G_TYPE_CHECK_INSTANCE_TYPE函数的具体用法?C++ G_TYPE_CHECK_INSTANCE_TYPE怎么用?C++ G_TYPE_CHECK_INSTANCE_TYPE使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了G_TYPE_CHECK_INSTANCE_TYPE函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: storage_daemon_find_thing

gpointer
storage_daemon_find_thing (StorageDaemon *daemon,
                           const gchar *object_path,
                           GType type_of_thing)
{
  GDBusObject *object;
  GList *interfaces, *l;
  gpointer ret = NULL;

  object = g_dbus_object_manager_get_object (G_DBUS_OBJECT_MANAGER (daemon->object_manager), object_path);
  if (object == NULL ||
      type_of_thing == G_TYPE_INVALID ||
      G_TYPE_CHECK_INSTANCE_TYPE (object, type_of_thing))
    {
      return object;
    }

  interfaces = g_dbus_object_get_interfaces (object);
  for (l = interfaces; ret == NULL && l != NULL; l = g_list_next (l))
    {
      if (G_TYPE_CHECK_INSTANCE_TYPE (l->data, type_of_thing))
        ret = g_object_ref (l->data);
    }

  g_list_free_full (interfaces, g_object_unref);
  g_object_unref (object);
  return ret;
}
开发者ID:mvollmer,项目名称:storaged,代码行数:28,代码来源:daemon.c


示例2: update

void QtVideoSinkDelegate::update()
{
#ifndef GST_QT_VIDEO_SINK_NO_OPENGL
    if (G_TYPE_CHECK_INSTANCE_TYPE(m_sink, GST_TYPE_QT_GL_VIDEO_SINK)) {
        GstQtGLVideoSink::emit_update(m_sink);
    } else
#endif
    if (G_TYPE_CHECK_INSTANCE_TYPE(m_sink, GST_TYPE_QT_VIDEO_SINK)) {
        GstQtVideoSink::emit_update(m_sink);
    } else {
        Q_ASSERT(false);
    }
}
开发者ID:OBIGOGIT,项目名称:qt-gstreamer,代码行数:13,代码来源:qtvideosinkdelegate.cpp


示例3: soy_controllers_graph_value_take_edge

void soy_controllers_graph_value_take_edge (GValue* value, gpointer v_object) {
	soycontrollersgraphEdge* old;
#line 35 "/home/jeff/Documents/libraries/libsoy/src/controllers/graph/Graph.gs"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, SOY_CONTROLLERS_GRAPH_TYPE_EDGE));
#line 35 "/home/jeff/Documents/libraries/libsoy/src/controllers/graph/Graph.gs"
	old = value->data[0].v_pointer;
#line 35 "/home/jeff/Documents/libraries/libsoy/src/controllers/graph/Graph.gs"
	if (v_object) {
#line 35 "/home/jeff/Documents/libraries/libsoy/src/controllers/graph/Graph.gs"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, SOY_CONTROLLERS_GRAPH_TYPE_EDGE));
#line 35 "/home/jeff/Documents/libraries/libsoy/src/controllers/graph/Graph.gs"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 35 "/home/jeff/Documents/libraries/libsoy/src/controllers/graph/Graph.gs"
		value->data[0].v_pointer = v_object;
#line 374 "Graph.c"
	} else {
#line 35 "/home/jeff/Documents/libraries/libsoy/src/controllers/graph/Graph.gs"
		value->data[0].v_pointer = NULL;
#line 378 "Graph.c"
	}
#line 35 "/home/jeff/Documents/libraries/libsoy/src/controllers/graph/Graph.gs"
	if (old) {
#line 35 "/home/jeff/Documents/libraries/libsoy/src/controllers/graph/Graph.gs"
		soy_controllers_graph_edge_unref (old);
#line 384 "Graph.c"
	}
}
开发者ID:couchjd,项目名称:playground,代码行数:27,代码来源:Graph.c


示例4: system_collections_value_take_dictionary_entry

#line 341 "DictionaryEntry.c"
	}
}


void system_collections_value_take_dictionary_entry (GValue* value, gpointer v_object) {
	SystemCollectionsDictionaryEntry* old;
#line 24 "/home/developer/projects/Backup/LibDotNet/src/System/Collections/DictionaryEntry.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, SYSTEM_COLLECTIONS_TYPE_DICTIONARY_ENTRY));
#line 24 "/home/developer/projects/Backup/LibDotNet/src/System/Collections/DictionaryEntry.vala"
	old = value->data[0].v_pointer;
#line 24 "/home/developer/projects/Backup/LibDotNet/src/System/Collections/DictionaryEntry.vala"
	if (v_object) {
#line 24 "/home/developer/projects/Backup/LibDotNet/src/System/Collections/DictionaryEntry.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, SYSTEM_COLLECTIONS_TYPE_DICTIONARY_ENTRY));
#line 24 "/home/developer/projects/Backup/LibDotNet/src/System/Collections/DictionaryEntry.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 24 "/home/developer/projects/Backup/LibDotNet/src/System/Collections/DictionaryEntry.vala"
		value->data[0].v_pointer = v_object;
#line 360 "DictionaryEntry.c"
	} else {
#line 24 "/home/developer/projects/Backup/LibDotNet/src/System/Collections/DictionaryEntry.vala"
		value->data[0].v_pointer = NULL;
#line 364 "DictionaryEntry.c"
	}
#line 24 "/home/developer/projects/Backup/LibDotNet/src/System/Collections/DictionaryEntry.vala"
	if (old) {
开发者ID:chebizarro,项目名称:LibDotNet,代码行数:27,代码来源:DictionaryEntry.c


示例5: dup_channel_features_impl

static GArray *
dup_channel_features_impl (TpSimpleClientFactory *self,
    TpChannel *channel)
{
  GArray *features;
  GQuark standard_features[] = {
      TP_CHANNEL_FEATURE_GROUP,
      TP_CHANNEL_FEATURE_PASSWORD,
  };
  ChannelTypeMapping *m;

  /* Chainup to get desired features for all channel types */
  features = chainup->dup_channel_features (self, channel);

  g_array_append_vals (features, standard_features, G_N_ELEMENTS (standard_features));

  for (m = channel_type_mapping; m->channel_type != NULL; m++)
    {
      if (G_TYPE_CHECK_INSTANCE_TYPE (channel, m->gtype))
        {
          guint j;
          for (j = 0; m->features[j] != 0; j++)
            g_array_append_val (features, m->features[j]);
          break;
        }
    }

  return features;
}
开发者ID:Distrotech,项目名称:telepathy-glib,代码行数:29,代码来源:automatic-client-factory.c


示例6: system_text_regular_expressions_value_take_capture

void system_text_regular_expressions_value_take_capture (GValue* value, gpointer v_object) {
	SystemTextRegularExpressionsCapture* old;
#line 15 "/home/developer/projects/Backup/LibDotNet/src/System/Text/RegularExpressions/RegexCapture.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, SYSTEM_TEXT_REGULAR_EXPRESSIONS_TYPE_CAPTURE));
#line 15 "/home/developer/projects/Backup/LibDotNet/src/System/Text/RegularExpressions/RegexCapture.vala"
	old = value->data[0].v_pointer;
#line 15 "/home/developer/projects/Backup/LibDotNet/src/System/Text/RegularExpressions/RegexCapture.vala"
	if (v_object) {
#line 15 "/home/developer/projects/Backup/LibDotNet/src/System/Text/RegularExpressions/RegexCapture.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, SYSTEM_TEXT_REGULAR_EXPRESSIONS_TYPE_CAPTURE));
#line 15 "/home/developer/projects/Backup/LibDotNet/src/System/Text/RegularExpressions/RegexCapture.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 15 "/home/developer/projects/Backup/LibDotNet/src/System/Text/RegularExpressions/RegexCapture.vala"
		value->data[0].v_pointer = v_object;
#line 597 "RegexCapture.c"
	} else {
#line 15 "/home/developer/projects/Backup/LibDotNet/src/System/Text/RegularExpressions/RegexCapture.vala"
		value->data[0].v_pointer = NULL;
#line 601 "RegexCapture.c"
	}
#line 15 "/home/developer/projects/Backup/LibDotNet/src/System/Text/RegularExpressions/RegexCapture.vala"
	if (old) {
#line 15 "/home/developer/projects/Backup/LibDotNet/src/System/Text/RegularExpressions/RegexCapture.vala"
		system_text_regular_expressions_capture_unref (old);
#line 607 "RegexCapture.c"
	}
}
开发者ID:chebizarro,项目名称:LibDotNet,代码行数:27,代码来源:RegexCapture.c


示例7: Q_UNUSED

void QGtkStylePrivate::addAllSubWidgets(GtkWidget *widget, gpointer v)
{
    Q_UNUSED(v);
    addWidgetToMap(widget);
    if (G_TYPE_CHECK_INSTANCE_TYPE ((widget), gtk_container_get_type()))
        gtk_container_forall((GtkContainer*)widget, addAllSubWidgets, NULL);
}
开发者ID:MarianMMX,项目名称:MarianMMX,代码行数:7,代码来源:qgtkstyle_p.cpp


示例8: seahorse_predicate_match

/**
 * seahorse_predicate_match:
 * @self: the object to test
 * @obj: The predicate to match
 *
 * matches a seahorse object and a predicate
 *
 * Returns: FALSE if predicate does not match the #SeahorseObject, TRUE else
 */
gboolean
seahorse_predicate_match (SeahorsePredicate *pred,
                          GObject* obj)
{

	g_return_val_if_fail (G_IS_OBJECT (obj), FALSE);

	/* Check all the fields */
	if (pred->type != 0 && !G_TYPE_CHECK_INSTANCE_TYPE (obj, pred->type))
		return FALSE;

	if (pred->usage != 0) {
		SeahorseUsage usage = 0;
		g_object_get (obj, "usage", &usage, NULL);
		if (pred->usage != usage)
			return FALSE;
	}

	if (pred->flags != 0 || pred->nflags != 0) {
		SeahorseFlags flags = 0;
		g_object_get (obj, "object-flags", &flags, NULL);
		if (pred->flags != 0 && (pred->flags & flags) == 0)
			return FALSE;
		if (pred->nflags != 0 && (pred->nflags & flags) != 0)
			return FALSE;
	}

	/* And any custom stuff */
	if (pred->custom != NULL && !pred->custom (obj, pred->custom_target))
		return FALSE;

	return TRUE;
}
开发者ID:atulhjp,项目名称:seahorse,代码行数:42,代码来源:seahorse-predicate.c


示例9: system_linq_value_take_strings

void system_linq_value_take_strings (GValue* value, gpointer v_object) {
	SystemLinqstrings* old;
#line 29 "/home/developer/projects/Backup/LibDotNet/src/System/Linq/Errors.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, SYSTEM_LINQ_TYPE_STRINGS));
#line 29 "/home/developer/projects/Backup/LibDotNet/src/System/Linq/Errors.vala"
	old = value->data[0].v_pointer;
#line 29 "/home/developer/projects/Backup/LibDotNet/src/System/Linq/Errors.vala"
	if (v_object) {
#line 29 "/home/developer/projects/Backup/LibDotNet/src/System/Linq/Errors.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, SYSTEM_LINQ_TYPE_STRINGS));
#line 29 "/home/developer/projects/Backup/LibDotNet/src/System/Linq/Errors.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 29 "/home/developer/projects/Backup/LibDotNet/src/System/Linq/Errors.vala"
		value->data[0].v_pointer = v_object;
#line 600 "Errors.c"
	} else {
#line 29 "/home/developer/projects/Backup/LibDotNet/src/System/Linq/Errors.vala"
		value->data[0].v_pointer = NULL;
#line 604 "Errors.c"
	}
#line 29 "/home/developer/projects/Backup/LibDotNet/src/System/Linq/Errors.vala"
	if (old) {
#line 29 "/home/developer/projects/Backup/LibDotNet/src/System/Linq/Errors.vala"
		system_linq_strings_unref (old);
#line 610 "Errors.c"
	}
}
开发者ID:chebizarro,项目名称:LibDotNet,代码行数:27,代码来源:Errors.c


示例10: find_device_by_interface_name

static NMDevice *
find_device_by_interface_name (NmtDeviceEntry *deventry,
                               const char     *interface_name)
{
    NmtDeviceEntryPrivate *priv = NMT_DEVICE_ENTRY_GET_PRIVATE (deventry);
    const GPtrArray *devices;
    NMDevice *device = NULL;
    int i;

    devices = nm_client_get_devices (nm_client);
    for (i = 0; i < devices->len && !device; i++) {
        NMDevice *candidate = devices->pdata[i];

        if (   priv->hardware_type != G_TYPE_NONE
                && !G_TYPE_CHECK_INSTANCE_TYPE (candidate, priv->hardware_type))
            continue;

        if (   priv->device_filter
                && !priv->device_filter (deventry, candidate, priv->device_filter_data))
            continue;

        if (!g_strcmp0 (interface_name, nm_device_get_iface (candidate)))
            device = candidate;
    }

    return device;
}
开发者ID:gunchleoc,项目名称:NetworkManager,代码行数:27,代码来源:nmt-device-entry.c


示例11: gst_element_implements_interface

gboolean
gst_element_implements_interface (GstElement * element, GType iface_type)
{
  g_return_val_if_fail (GST_IS_ELEMENT (element), FALSE);

  if (G_TYPE_CHECK_INSTANCE_TYPE (G_OBJECT (element), iface_type)) {
    GstImplementsInterface *iface;
    GstImplementsInterfaceClass *ifclass;

    iface = G_TYPE_CHECK_INSTANCE_CAST (G_OBJECT (element),
        iface_type, GstImplementsInterface);
    ifclass = GST_IMPLEMENTS_INTERFACE_GET_CLASS (iface);

    /* element implements iface_type but not GstImplementsInterface, so
     * just assume the other interface is implemented unconditionally */
    if (ifclass == NULL)
      return TRUE;

    if (ifclass->supported != NULL &&
        ifclass->supported (iface, iface_type) == TRUE) {
      return TRUE;
    }
  }

  return FALSE;
}
开发者ID:WangCrystal,项目名称:gstreamer,代码行数:26,代码来源:gstinterface.c


示例12: gst_allocator_fast_malloc_alloc

static GstMemory* gst_allocator_fast_malloc_alloc(GstAllocator* allocator, gsize size, GstAllocationParams* params)
{
    ASSERT(G_TYPE_CHECK_INSTANCE_TYPE(allocator, gst_allocator_fast_malloc_get_type()));

    // alignment should be a (power-of-two - 1).
    gsize alignment = params->align | gst_memory_alignment;
    ASSERT(!((alignment + 1) & alignment));

    gsize headerSize = (sizeof(GstMemoryFastMalloc) + alignment) & ~alignment;
    gsize allocationSize = params->prefix + size + params->padding;

    GstMemoryFastMalloc* mem = static_cast<GstMemoryFastMalloc*>(fastAlignedMalloc(alignment + 1, headerSize + allocationSize));
    if (!mem)
        return nullptr;

    mem->data = reinterpret_cast<uint8_t*>(mem) + headerSize;

    if (params->prefix && (params->flags & GST_MEMORY_FLAG_ZERO_PREFIXED))
        std::memset(mem->data, 0, params->prefix);
    if (params->padding && (params->flags & GST_MEMORY_FLAG_ZERO_PADDED))
        std::memset(mem->data + params->prefix + size, 0, params->padding);

    gst_memory_init(GST_MEMORY_CAST(mem), params->flags, allocator, nullptr,
        allocationSize, alignment, params->prefix, size);

    return GST_MEMORY_CAST(mem);
}
开发者ID:Comcast,项目名称:WebKitForWayland,代码行数:27,代码来源:GstAllocatorFastMalloc.cpp


示例13: remmina_widget_pool_find

GtkWidget*
remmina_widget_pool_find(GType type, const gchar *tag)
{
	GtkWidget *widget;
	gint i;
	GdkScreen *screen;
	gint screen_number;
	guint workspace;

	screen = gdk_screen_get_default();
	screen_number = gdk_screen_get_number(screen);
	workspace = remmina_public_get_current_workspace(screen);

	if (remmina_widget_pool == NULL)
		return NULL;

	for (i = 0; i < remmina_widget_pool->len; i++)
	{
		widget = GTK_WIDGET(g_ptr_array_index(remmina_widget_pool, i));
		if (!G_TYPE_CHECK_INSTANCE_TYPE(widget, type))
			continue;
		if (screen_number != gdk_screen_get_number(gtk_window_get_screen(GTK_WINDOW(widget))))
			continue;
		if (workspace != remmina_public_get_window_workspace(GTK_WINDOW(widget)))
			continue;
		if (tag && g_strcmp0((const gchar*) g_object_get_data(G_OBJECT(widget), "tag"), tag) != 0)
			continue;
		return widget;
	}
	return NULL;
}
开发者ID:BillTheBest,项目名称:Remmina,代码行数:31,代码来源:remmina_widget_pool.c


示例14: system_linq_value_set_error

void system_linq_value_set_error (GValue* value, gpointer v_object) {
	SystemLinqError* old;
#line 10 "/home/developer/projects/Backup/LibDotNet/src/System/Linq/Errors.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, SYSTEM_LINQ_TYPE_ERROR));
#line 10 "/home/developer/projects/Backup/LibDotNet/src/System/Linq/Errors.vala"
	old = value->data[0].v_pointer;
#line 10 "/home/developer/projects/Backup/LibDotNet/src/System/Linq/Errors.vala"
	if (v_object) {
#line 10 "/home/developer/projects/Backup/LibDotNet/src/System/Linq/Errors.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, SYSTEM_LINQ_TYPE_ERROR));
#line 10 "/home/developer/projects/Backup/LibDotNet/src/System/Linq/Errors.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 10 "/home/developer/projects/Backup/LibDotNet/src/System/Linq/Errors.vala"
		value->data[0].v_pointer = v_object;
#line 10 "/home/developer/projects/Backup/LibDotNet/src/System/Linq/Errors.vala"
		system_linq_error_ref (value->data[0].v_pointer);
#line 259 "Errors.c"
	} else {
#line 10 "/home/developer/projects/Backup/LibDotNet/src/System/Linq/Errors.vala"
		value->data[0].v_pointer = NULL;
#line 263 "Errors.c"
	}
#line 10 "/home/developer/projects/Backup/LibDotNet/src/System/Linq/Errors.vala"
	if (old) {
#line 10 "/home/developer/projects/Backup/LibDotNet/src/System/Linq/Errors.vala"
		system_linq_error_unref (old);
#line 269 "Errors.c"
	}
}
开发者ID:chebizarro,项目名称:LibDotNet,代码行数:29,代码来源:Errors.c


示例15: list_stack_top

GreeterList* list_stack_top (ListStack* self) {
    GreeterList* result = NULL;
    GList* _tmp0_ = NULL;
    GList* children;
    GList* _tmp1_;
    g_return_val_if_fail (self != NULL, NULL);
    _tmp0_ = gtk_container_get_children ((GtkContainer*) self);
    children = _tmp0_;
    _tmp1_ = children;
    if (_tmp1_ == NULL) {
        result = NULL;
        _g_list_free0 (children);
        return result;
    } else {
        GList* _tmp2_;
        GList* _tmp3_ = NULL;
        gconstpointer _tmp4_;
        GtkWidget* _tmp5_;
        GreeterList* _tmp6_;
        _tmp2_ = children;
        _tmp3_ = g_list_last (_tmp2_);
        _tmp4_ = _tmp3_->data;
        _tmp5_ = (GtkWidget*) _tmp4_;
        _tmp6_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp5_, TYPE_GREETER_LIST) ? ((GreeterList*) _tmp5_) : NULL);
        result = _tmp6_;
        _g_list_free0 (children);
        return result;
    }
    _g_list_free0 (children);
}
开发者ID:fatman2021,项目名称:unity-greeter,代码行数:30,代码来源:list-stack.c


示例16: list_stack_pop

void list_stack_pop (ListStack* self) {
    GList* _tmp0_ = NULL;
    GList* children;
    GList* _tmp1_;
    GList* _tmp2_;
    GList* _tmp3_ = NULL;
    GList* _tmp4_;
    GList* prev;
    GList* _tmp5_;
    g_return_if_fail (self != NULL);
    _tmp0_ = gtk_container_get_children ((GtkContainer*) self);
    children = _tmp0_;
    _tmp1_ = children;
    g_return_if_fail (_tmp1_ != NULL);
    _tmp2_ = children;
    _tmp3_ = g_list_last (_tmp2_);
    _tmp4_ = _tmp3_->prev;
    prev = _tmp4_;
    _tmp5_ = prev;
    if (_tmp5_ != NULL) {
        GList* _tmp6_;
        gconstpointer _tmp7_;
        GtkWidget* _tmp8_;
        DashBox* _tmp9_;
        _tmp6_ = prev;
        _tmp7_ = _tmp6_->data;
        _tmp8_ = (GtkWidget*) _tmp7_;
        _tmp9_ = (G_TYPE_CHECK_INSTANCE_TYPE (_tmp8_, TYPE_GREETER_LIST) ? ((GreeterList*) _tmp8_) : NULL)->greeter_box;
        dash_box_pop (_tmp9_);
    }
    _g_list_free0 (children);
}
开发者ID:fatman2021,项目名称:unity-greeter,代码行数:32,代码来源:list-stack.c


示例17: segment_list_tests_test_properties

static void segment_list_tests_test_properties (SegmentListTests* self) {
	GObject* segments = NULL;
	KkcSegmentList* _tmp0_ = NULL;
	GObject* _tmp1_ = NULL;
	gint cursor_pos = 0;
	gint size = 0;
#line 8 "/home/ueno/devel/libkkc/tests/segment-list.vala"
	g_return_if_fail (self != NULL);
#line 9 "/home/ueno/devel/libkkc/tests/segment-list.vala"
	_tmp0_ = kkc_segment_list_new ();
#line 9 "/home/ueno/devel/libkkc/tests/segment-list.vala"
	_tmp1_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, G_TYPE_OBJECT) ? ((GObject*) _tmp0_) : NULL;
#line 9 "/home/ueno/devel/libkkc/tests/segment-list.vala"
	if (_tmp1_ == NULL) {
#line 9 "/home/ueno/devel/libkkc/tests/segment-list.vala"
		_g_object_unref0 (_tmp0_);
#line 91 "segment-list.c"
	}
#line 9 "/home/ueno/devel/libkkc/tests/segment-list.vala"
	segments = _tmp1_;
#line 12 "/home/ueno/devel/libkkc/tests/segment-list.vala"
	g_object_get (segments, "cursor-pos", &cursor_pos, "size", &size, NULL);
#line 14 "/home/ueno/devel/libkkc/tests/segment-list.vala"
	g_object_set (segments, "cursor-pos", cursor_pos, NULL);
#line 8 "/home/ueno/devel/libkkc/tests/segment-list.vala"
	_g_object_unref0 (segments);
#line 101 "segment-list.c"
}
开发者ID:m-shibata,项目名称:libkkc-dpkg,代码行数:28,代码来源:segment-list.c


示例18: soy_value_take_sg_k2_png_converter

void soy_value_take_sg_k2_png_converter (GValue* value, gpointer v_object) {
	soySGK2PNGConverter* old;
#line 22 "/home/jeff/Documents/libraries/libsoy/src/sgk2png.gs"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, SOY_TYPE_SG_K2_PNG_CONVERTER));
#line 22 "/home/jeff/Documents/libraries/libsoy/src/sgk2png.gs"
	old = value->data[0].v_pointer;
#line 22 "/home/jeff/Documents/libraries/libsoy/src/sgk2png.gs"
	if (v_object) {
#line 22 "/home/jeff/Documents/libraries/libsoy/src/sgk2png.gs"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, SOY_TYPE_SG_K2_PNG_CONVERTER));
#line 22 "/home/jeff/Documents/libraries/libsoy/src/sgk2png.gs"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 22 "/home/jeff/Documents/libraries/libsoy/src/sgk2png.gs"
		value->data[0].v_pointer = v_object;
#line 657 "sgk2png.c"
	} else {
#line 22 "/home/jeff/Documents/libraries/libsoy/src/sgk2png.gs"
		value->data[0].v_pointer = NULL;
#line 661 "sgk2png.c"
	}
#line 22 "/home/jeff/Documents/libraries/libsoy/src/sgk2png.gs"
	if (old) {
#line 22 "/home/jeff/Documents/libraries/libsoy/src/sgk2png.gs"
		soy_sg_k2_png_converter_unref (old);
#line 667 "sgk2png.c"
	}
}
开发者ID:couchjd,项目名称:playground,代码行数:27,代码来源:sgk2png.c


示例19: find_device_by_mac_address

static NMDevice *
find_device_by_mac_address (NmtDeviceEntry *deventry,
                            const char     *mac_address)
{
    NmtDeviceEntryPrivate *priv = NMT_DEVICE_ENTRY_GET_PRIVATE (deventry);
    const GPtrArray *devices;
    NMDevice *device = NULL;
    int i;

    devices = nm_client_get_devices (nm_client);
    for (i = 0; i < devices->len && !device; i++) {
        NMDevice *candidate = devices->pdata[i];
        char *hwaddr;

        if (   priv->hardware_type != G_TYPE_NONE
                && !G_TYPE_CHECK_INSTANCE_TYPE (candidate, priv->hardware_type))
            continue;

        if (   priv->device_filter
                && !priv->device_filter (deventry, candidate, priv->device_filter_data))
            continue;

        g_object_get (G_OBJECT (candidate), "hw-address", &hwaddr, NULL);
        if (hwaddr && !g_ascii_strcasecmp (mac_address, hwaddr))
            device = candidate;
        g_free (hwaddr);
    }

    return device;
}
开发者ID:gunchleoc,项目名称:NetworkManager,代码行数:30,代码来源:nmt-device-entry.c


示例20: vala_method_type_real_compatible

static gboolean vala_method_type_real_compatible (ValaDataType* base, ValaDataType* target_type) {
	ValaMethodType * self;
	gboolean result = FALSE;
	ValaDataType* _tmp0_;
	ValaDelegateType* _tmp1_;
	ValaDelegateType* dt;
	ValaDelegateType* _tmp2_;
	ValaDelegateType* _tmp3_;
	ValaDelegate* _tmp4_;
	ValaDelegate* _tmp5_;
	ValaMethod* _tmp6_;
	ValaDelegateType* _tmp7_;
	gboolean _tmp8_ = FALSE;
	self = (ValaMethodType*) base;
	g_return_val_if_fail (target_type != NULL, FALSE);
	_tmp0_ = target_type;
	_tmp1_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, VALA_TYPE_DELEGATE_TYPE) ? ((ValaDelegateType*) _tmp0_) : NULL);
	dt = _tmp1_;
	_tmp2_ = dt;
	if (_tmp2_ == NULL) {
		result = FALSE;
		_vala_code_node_unref0 (dt);
		return result;
	}
	_tmp3_ = dt;
	_tmp4_ = vala_delegate_type_get_delegate_symbol (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = self->priv->_method_symbol;
	_tmp7_ = dt;
	_tmp8_ = vala_delegate_matches_method (_tmp5_, _tmp6_, (ValaDataType*) _tmp7_);
	result = _tmp8_;
	_vala_code_node_unref0 (dt);
	return result;
}
开发者ID:tangentstorm,项目名称:saiwa,代码行数:34,代码来源:valamethodtype.c



注:本文中的G_TYPE_CHECK_INSTANCE_TYPE函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ G_TYPE_CHECK_VALUE_TYPE函数代码示例发布时间:2022-05-30
下一篇:
C++ G_THROW函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap