当前位置: 首页>>代码示例>>C++>>正文


C++ G_IS_OBJECT函数代码示例

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


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

示例1: feed_list_node_rename

void
feed_list_node_rename (nodePtr node)
{
	GtkWidget	*nameentry;
	
	if (!nodenamedialog || !G_IS_OBJECT (nodenamedialog))
		nodenamedialog = liferea_dialog_new (NULL, "nodenamedialog");

	nameentry = liferea_dialog_lookup (nodenamedialog, "nameentry");
	gtk_entry_set_text (GTK_ENTRY (nameentry), node_get_title (node));
	g_signal_connect (G_OBJECT (nodenamedialog), "response", 
	                  G_CALLBACK (on_nodenamedialog_response), node);
	gtk_widget_show (nodenamedialog);
}
开发者ID:Awkee,项目名称:liferea,代码行数:14,代码来源:feed_list_node.c

示例2: ide_settings_bind

void
ide_settings_bind (IdeSettings        *self,
                   const gchar        *key,
                   gpointer            object,
                   const gchar        *property,
                   GSettingsBindFlags  flags)
{
  g_return_if_fail (IDE_IS_SETTINGS (self));
  g_return_if_fail (key != NULL);
  g_return_if_fail (G_IS_OBJECT (object));
  g_return_if_fail (property != NULL);

  egg_settings_sandwich_bind (self->settings_sandwich, key, object, property, flags);
}
开发者ID:bhurtelashish,项目名称:gnome-builder,代码行数:14,代码来源:ide-settings.c

示例3: seahorse_object_model_get_row_key

GObject *
seahorse_object_model_get_row_key (SeahorseObjectModel *self, GtkTreeIter *iter)
{
    SeahorseObjectRow *skrow;

    g_return_val_if_fail (SEAHORSE_IS_OBJECT_MODEL (self), NULL);
    g_return_val_if_fail (self->data_column >= 0, NULL);

    gtk_tree_model_get (GTK_TREE_MODEL (self), iter, self->data_column, &skrow, -1);
    if (!skrow)
        return NULL;
    g_assert (G_IS_OBJECT (skrow->object));
    return skrow->object;
}
开发者ID:GNOME,项目名称:seahorse,代码行数:14,代码来源:seahorse-object-model.c

示例4: spice_foreign_menu_listener_accept_async

void
spice_foreign_menu_listener_accept_async (GObject *listener,
                                          GCancellable *cancellable,
                                          GAsyncReadyCallback callback,
                                          gpointer user_data)
{
    g_return_if_fail(G_IS_OBJECT(listener));

#ifdef G_OS_WIN32
    spice_named_pipe_listener_accept_async (SPICE_NAMED_PIPE_LISTENER (listener), cancellable, callback, user_data);
#else
    g_socket_listener_accept_async (G_SOCKET_LISTENER (listener), cancellable, callback, user_data);
#endif
}
开发者ID:hwc56,项目名称:spicy,代码行数:14,代码来源:spice-foreign-menu-listener.c

示例5: iface_print_string

static void
iface_print_string (TestIface   *tiobj,
		    const gchar *string)
{
  TestIfaceClass *iface;

  g_return_if_fail (TEST_IS_IFACE (tiobj));
  g_return_if_fail (G_IS_OBJECT (tiobj)); /* ensured through prerequisite */

  iface = TEST_IFACE_GET_CLASS (tiobj);
  g_object_ref (tiobj);
  iface->print_string (tiobj, string);
  g_object_unref (tiobj);
}
开发者ID:183amir,项目名称:glib,代码行数:14,代码来源:testgobject.c

示例6: _midgard_query_constraint_group_dispose

static void
_midgard_query_constraint_group_dispose (GObject *object)
{
	MidgardQueryConstraintGroup *self = MIDGARD_QUERY_CONSTRAINT_GROUP (object);
	GSList *self_constraints = MIDGARD_QUERY_CONSTRAINT_GROUP (self)->priv->constraints;
	GSList *l = NULL;
	for (l = self_constraints; l != NULL; l = l->next) {
		if (l->data && G_IS_OBJECT (l->data)) {
			g_object_unref(l->data);
			l->data = NULL;
		}
	}
	parent_class->dispose (object);
}
开发者ID:William-Wai,项目名称:midgard-core,代码行数:14,代码来源:midgard_query_constraint_group.c

示例7: gst_controller_new

/**
 * gst_controller_new:
 * @object: the object of which some properties should be controlled
 * @...: %NULL terminated list of property names that should be controlled
 *
 * Creates a new GstController for the given object's properties
 *
 * Returns: the new controller.
 */
GstController *
gst_controller_new (GObject * object, ...)
{
  GstController *self;
  va_list var_args;

  g_return_val_if_fail (G_IS_OBJECT (object), NULL);

  va_start (var_args, object);
  self = gst_controller_new_valist (object, var_args);
  va_end (var_args);

  return self;
}
开发者ID:genesi,项目名称:gstreamer,代码行数:23,代码来源:gstcontroller.c

示例8: gimp_config_dump

gboolean
gimp_config_dump (GObject              *gimp,
                  GimpConfigDumpFormat  format)
{
  GOutputStream    *output;
  GimpConfigWriter *writer;
  GimpConfig       *rc;

  g_return_val_if_fail (G_IS_OBJECT (gimp), FALSE);

  rc = g_object_new (GIMP_TYPE_RC,
                     "gimp", gimp,
                     NULL);

#ifdef G_OS_WIN32
  output = g_win32_output_stream_new ((gpointer) 1, FALSE);
#else
  output = g_unix_output_stream_new (1, FALSE);
#endif

  writer = gimp_config_writer_new_stream (output, NULL, NULL);

  switch (format)
    {
    case GIMP_CONFIG_DUMP_NONE:
      break;

    case GIMP_CONFIG_DUMP_GIMPRC:
      gimp_config_writer_comment (writer,
                                  "Dump of the GIMP default configuration");
      gimp_config_writer_linefeed (writer);
      gimp_config_serialize_properties (rc, writer);
      gimp_config_writer_linefeed (writer);
      break;

    case GIMP_CONFIG_DUMP_GIMPRC_SYSTEM:
      dump_gimprc_system (rc, writer, output);
      break;

    case GIMP_CONFIG_DUMP_GIMPRC_MANPAGE:
      dump_gimprc_manpage (rc, writer, output);
      break;
    }

  gimp_config_writer_finish (writer, NULL, NULL);
  g_object_unref (output);
  g_object_unref (rc);

  return TRUE;
}
开发者ID:LebedevRI,项目名称:gimp,代码行数:50,代码来源:gimpconfig-dump.c

示例9: g_value_init_from_instance

/**
 * g_value_init_from_instance:
 * @value: An uninitialized #GValue structure.
 * @instance: (type GObject.TypeInstance): the instance
 *
 * Initializes and sets @value from an instantiatable type via the
 * value_table's collect_value() function.
 *
 * Note: The @value will be initialised with the exact type of
 * @instance.  If you wish to set the @value's type to a different GType
 * (such as a parent class GType), you need to manually call
 * g_value_init() and g_value_set_instance().
 *
 * Since: 2.42
 */
void
g_value_init_from_instance (GValue  *value,
                            gpointer instance)
{
  g_return_if_fail (value != NULL && G_VALUE_TYPE(value) == 0);

  if (G_IS_OBJECT (instance))
    {
      /* Fast-path.
       * If G_IS_OBJECT() succeeds we know:
       * * that instance is present and valid
       * * that it is a GObject, and therefore we can directly
       *   use the collect implementation (g_object_ref) */
      value_meminit (value, G_TYPE_FROM_INSTANCE (instance));
      value->data[0].v_pointer = g_object_ref (instance);
    }
  else
    {  
      GType g_type;
      GTypeValueTable *value_table;
      GTypeCValue cvalue;
      gchar *error_msg;

      g_return_if_fail (G_TYPE_CHECK_INSTANCE (instance));

      g_type = G_TYPE_FROM_INSTANCE (instance);
      value_table = g_type_value_table_peek (g_type);
      g_return_if_fail (strcmp (value_table->collect_format, "p") == 0);

      memset (&cvalue, 0, sizeof (cvalue));
      cvalue.v_pointer = instance;

      /* setup and collect */
      value_meminit (value, g_type);
      value_table->value_init (value);
      error_msg = value_table->collect_value (value, 1, &cvalue, 0);
      if (error_msg)
        {
          g_warning ("%s: %s", G_STRLOC, error_msg);
          g_free (error_msg);

          /* we purposely leak the value here, it might not be
           * in a sane state if an error condition occoured
           */
          value_meminit (value, g_type);
          value_table->value_init (value);
        }
    }
}
开发者ID:DreaminginCodeZH,项目名称:glib,代码行数:64,代码来源:gvalue.c

示例10: rs_filter_param_set_object

/**
 * Set an object property
 * @param filter_param A RSFilterParam
 * @param name The name of the property
 * @param value An object to store. Refcount will be incremented by one
 */
void
rs_filter_param_set_object(RSFilterParam *filter_param, const gchar *name, gpointer object)
{
	GValue *val;

	g_return_if_fail(RS_IS_FILTER_PARAM(filter_param));
	g_return_if_fail(name != NULL);
	g_return_if_fail(name[0] != '\0');
	g_return_if_fail(G_IS_OBJECT(object));

	val = new_value(G_OBJECT_TYPE(object));
	g_value_set_object(val, object);

	rs_filter_param_set_gvalue(filter_param, name, val);
}
开发者ID:dmuktro,项目名称:rawstudio,代码行数:21,代码来源:rs-filter-param.c

示例11: gst_object_set_controller

EXPORT_C
#endif

gboolean
gst_object_set_controller (GObject * object, GstController * controller)
{
  g_return_val_if_fail (G_IS_OBJECT (object), FALSE);
  g_return_val_if_fail (controller, FALSE);

  if (!g_object_get_qdata (object, priv_gst_controller_key)) {
    g_object_set_qdata (object, priv_gst_controller_key, controller);
    return (TRUE);
  }
  return (FALSE);
}
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:15,代码来源:gsthelper.c

示例12: seahorse_object_list_remove

GList*
seahorse_object_list_remove (GList *original, gpointer object)
{
	GList *at;
	
	g_return_val_if_fail (G_IS_OBJECT (object), original);
	
	at = g_list_find (original, object);
	if (at != NULL) {
		g_object_unref (object);
		return g_list_delete_link (original, at); 
	}
	
	return original;
}
开发者ID:MagAdena,项目名称:libcryptui,代码行数:15,代码来源:seahorse-object-list.c

示例13: nautilus_undo_transaction_unregister_object

void
nautilus_undo_transaction_unregister_object (GObject *object)
{
	GList *list;

	g_return_if_fail (G_IS_OBJECT (object));

	/* Remove atoms from each transaction on the list. */
	list = g_object_get_data (object, NAUTILUS_UNDO_TRANSACTION_LIST_DATA);
	if (list != NULL) {
		g_list_foreach (list, remove_atoms_cover, object);	
		g_list_free (list);
		g_object_set_data (object, NAUTILUS_UNDO_TRANSACTION_LIST_DATA, NULL);
	}
}
开发者ID:kleopatra999,项目名称:nautilus,代码行数:15,代码来源:nautilus-undo-transaction.c

示例14: nautilus_undo_attach_undo_manager

void
nautilus_undo_attach_undo_manager (GObject *object,
				   NautilusUndoManager *manager)
{
	g_return_if_fail (G_IS_OBJECT (object));

	if (manager == NULL) {
		g_object_set_data (object, NAUTILUS_UNDO_MANAGER_DATA, NULL);
	} else {
		g_object_ref (manager);
		g_object_set_data_full
			(object, NAUTILUS_UNDO_MANAGER_DATA,
			 manager, g_object_unref);
	}
}
开发者ID:Spheerys,项目名称:nautilus,代码行数:15,代码来源:nautilus-undo.c

示例15: ui_folder_add

gboolean
ui_folder_add (void)
{
	GtkWidget	*foldernameentry;
	
	if (!newfolderdialog || !G_IS_OBJECT (newfolderdialog))
		newfolderdialog = liferea_dialog_new (NULL, "newfolderdialog");

	foldernameentry = liferea_dialog_lookup (newfolderdialog, "foldertitleentry");
	gtk_entry_set_text (GTK_ENTRY (foldernameentry), "");
		
	gtk_widget_show (newfolderdialog);
	
	return TRUE;
}
开发者ID:814ckf0x,项目名称:liferea,代码行数:15,代码来源:ui_folder.c


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