您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ G_OBJECT_TYPE函数代码示例

51自学网 2021-06-01 21:01:41
  C++
这篇教程C++ G_OBJECT_TYPE函数代码示例写得很实用,希望能帮到您。

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

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

示例1: ges_project_try_updating_id

gchar *ges_project_try_updating_id (GESProject * project, GESAsset * asset,    GError * error){  gchar *new_id = NULL;  g_return_val_if_fail (GES_IS_PROJECT (project), NULL);  g_return_val_if_fail (GES_IS_ASSET (asset), NULL);  g_return_val_if_fail (error, NULL);  GST_DEBUG_OBJECT (project, "Try to proxy %s", ges_asset_get_id (asset));  if (ges_asset_request_id_update (asset, &new_id, error) == FALSE) {    GST_DEBUG_OBJECT (project, "Type: %s can not be proxied for id: %s",        g_type_name (G_OBJECT_TYPE (asset)), ges_asset_get_id (asset));    return NULL;  }  if (new_id == NULL)    g_signal_emit (project, _signals[MISSING_URI_SIGNAL], 0, error, asset,        &new_id);  if (new_id) {    if (!ges_asset_set_proxy (asset, new_id)) {      g_free (new_id);      new_id = NULL;    }  }  g_hash_table_remove (project->priv->loading_assets, ges_asset_get_id (asset));  return new_id;}
开发者ID:vliaskov,项目名称:PitiviGes,代码行数:33,


示例2: notify

static voidnotify (GObject *object, GParamSpec *pspec){	PropertiesChangedInfo *info;	GValue *value;	/* Ignore properties that shouldn't be exported */	if (pspec->flags & NM_PROPERTY_PARAM_NO_EXPORT)		return;	info = (PropertiesChangedInfo *) g_object_get_data (object, NM_DBUS_PROPERTY_CHANGED);	if (!info) {		info = properties_changed_info_new ();		g_object_set_data_full (object, NM_DBUS_PROPERTY_CHANGED, info, properties_changed_info_destroy);		info->signal_id = g_signal_lookup ("properties-changed", G_OBJECT_TYPE (object));		g_assert (info->signal_id);	}	value = g_slice_new0 (GValue);	g_value_init (value, pspec->value_type);	g_object_get_property (object, pspec->name, value);	g_hash_table_insert (info->hash, uscore_to_wincaps (pspec->name), value);	if (!info->idle_id)		info->idle_id = g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, properties_changed, object, idle_id_reset);}
开发者ID:T100012,项目名称:NetworkManager,代码行数:26,


示例3: e_extensible_list_extensions

/** * e_extensible_list_extensions: * @extensible: an #EExtensible * @extension_type: the type of extensions to list * * Returns a list of #EExtension objects bound to @extensible whose * types are ancestors of @extension_type.  For a complete list of * extension objects bound to @extensible, pass %E_TYPE_EXTENSION. * * The list itself should be freed with g_list_free().  The extension * objects are owned by @extensible and should not be unreferenced. * * Returns: a list of extension objects derived from @extension_type * * Since: 3.4 **/GList *e_extensible_list_extensions (EExtensible *extensible,                              GType extension_type){	GPtrArray *extensions;	GList *list = NULL;	guint ii;	g_return_val_if_fail (E_IS_EXTENSIBLE (extensible), NULL);	g_return_val_if_fail (IS_AN_EXTENSION_TYPE (extension_type), NULL);	e_extensible_load_extensions (extensible);	extensions = extensible_get_extensions (extensible);	g_return_val_if_fail (extensions != NULL, NULL);	for (ii = 0; ii < extensions->len; ii++) {		GObject *object;		object = g_ptr_array_index (extensions, ii);		if (g_type_is_a (G_OBJECT_TYPE (object), extension_type))			list = g_list_prepend (list, object);	}	return g_list_reverse (list);}
开发者ID:gcampax,项目名称:evolution-data-server,代码行数:42,


示例4: st_scroll_view_add

static voidst_scroll_view_add (ClutterContainer *container,                    ClutterActor     *actor){  StScrollView *self = ST_SCROLL_VIEW (container);  StScrollViewPrivate *priv = self->priv;  if (ST_IS_SCROLLABLE (actor))    {      priv->child = actor;      /* chain up to StBin::add() */      st_scroll_view_parent_iface->add (container, actor);      st_scrollable_set_adjustments (ST_SCROLLABLE (actor),                                     priv->hadjustment, priv->vadjustment);    }  else    {      g_warning ("Attempting to add an actor of type %s to "                 "a StScrollView, but the actor does "                 "not implement StScrollable.",                 g_type_name (G_OBJECT_TYPE (actor)));    }}
开发者ID:aldatsa,项目名称:Cinnamon,代码行数:25,


示例5: gtk_dialog_add_action_widget

/* Outputs source to add a child widget to a hbuttonbox. We need to check if   the hbuttonbox is a GtkDialog action area, and if it is we use the special   gtk_dialog_add_action_widget() function to add it. */voidgb_hbutton_box_write_add_child_source (GtkWidget * parent,                                       const gchar *parent_name,                                       GtkWidget *child,                                       GbWidgetWriteSourceData * data){    if (gb_hbutton_box_is_dialog_action_area (parent)            && G_OBJECT_TYPE (child) == GTK_TYPE_BUTTON)    {        gint response_id;        char *response_name, *dialog_name;        response_id = GPOINTER_TO_INT (gtk_object_get_data (GTK_OBJECT (child), GladeDialogResponseIDKey));        response_name = gb_dialog_response_id_to_string (response_id);        dialog_name = (char*) gtk_widget_get_name (parent->parent->parent);        dialog_name = source_create_valid_identifier (dialog_name);        source_add (data,                    "  gtk_dialog_add_action_widget (GTK_DIALOG (%s), %s, %s);/n",                    dialog_name, data->wname, response_name);        g_free (dialog_name);    }    else    {        /* Use the standard gtk_container_add(). */        source_add (data, "  gtk_container_add (GTK_CONTAINER (%s), %s);/n",                    parent_name, data->wname);    }}
开发者ID:jubalh,项目名称:deadbeef,代码行数:34,


示例6: gb_slider_add_child

static voidgb_slider_add_child (GtkBuildable *buildable,                     GtkBuilder   *builder,                     GObject      *child,                     const gchar  *type){  GbSliderPosition position = GB_SLIDER_NONE;  g_assert (GTK_IS_BUILDABLE (buildable));  g_assert (GTK_IS_BUILDER (builder));  g_assert (G_IS_OBJECT (child));  if (!GTK_IS_WIDGET (child))    {      g_warning ("Child /"%s/" must be of type GtkWidget.",                 g_type_name (G_OBJECT_TYPE (child)));      return;    }  if (ide_str_equal0 (type, "bottom"))    position = GB_SLIDER_BOTTOM;  else if (ide_str_equal0 (type, "top"))    position = GB_SLIDER_TOP;  else if (ide_str_equal0 (type, "left"))    position = GB_SLIDER_LEFT;  else if (ide_str_equal0 (type, "right"))    position = GB_SLIDER_RIGHT;  gtk_container_add_with_properties (GTK_CONTAINER (buildable), GTK_WIDGET (child),                                     "position", position,                                     NULL);}
开发者ID:MaX121,项目名称:gnome-builder,代码行数:32,


示例7: gfbgraph_connectable_default_parse_connected_data

/** * gfbgraph_connectable_default_parse_connected_data: * @self: a #GFBGraphConnectable. * @payload: a const #gchar with the response string from the Facebook Graph API. * @error: (allow-none): a #GError or %NULL. * * In most cases, #GFBGraphConnectable implementers can use this function in order to parse * the response when a gfbgraph_node_get_connection_nodes() is executed and the * gfbgraph_connectable_parse_connected_data() was called. * * Normally, Facebook Graph API returns the connections in the same way, using JSON objects, * with a root object called "data". * * Returns: (element-type GFBGraphNode) (transfer full): a newly-allocated #GList of #GFBGraphNode with the same #GType as @self. **/GList*gfbgraph_connectable_default_parse_connected_data (GFBGraphConnectable *self, const gchar *payload, GError **error){        GList *nodes_list = NULL;        JsonParser *jparser;        GType node_type;        node_type = G_OBJECT_TYPE (self);        jparser = json_parser_new ();        if (json_parser_load_from_data (jparser, payload, -1, error)) {                JsonNode *root_jnode;                JsonObject *main_jobject;                JsonArray *nodes_jarray;                int i = 0;                root_jnode = json_parser_get_root (jparser);                main_jobject = json_node_get_object (root_jnode);                nodes_jarray = json_object_get_array_member (main_jobject, "data");                for (i = 0; i < json_array_get_length (nodes_jarray); i++) {                        JsonNode *jnode;                        GFBGraphNode *node;                        jnode = json_array_get_element (nodes_jarray, i);                        node = GFBGRAPH_NODE (json_gobject_deserialize (node_type, jnode));                        nodes_list = g_list_append (nodes_list, node);                }        }        g_clear_object (&jparser);        return nodes_list;}
开发者ID:alvaropg,项目名称:gfbgraph,代码行数:48,


示例8: ATTR_PRINTF_FORMAT

ATTR_PRINTF_FORMAT (2,3) gchar *_lp_event_to_string (lp_Event *event, const gchar *fmt, ...){  va_list args;  gchar *suffix = NULL;  gchar *str;  gint n;  va_start (args, fmt);  n = g_vasprintf (&suffix, fmt, args);  g_assert_nonnull (suffix);  g_assert (n >= 0);  va_end (args);  str = g_strdup_printf ("/%s at %p/n/  source: %s at %p/n/  mask: 0x%x/n/%s/",                       G_OBJECT_TYPE_NAME (event),                         G_TYPE_CHECK_INSTANCE_CAST (event,                                                     G_OBJECT_TYPE (event),                                                     gpointer),                         LP_IS_SCENE (event->priv->source) ? "lp_Scene"                         : LP_IS_MEDIA (event->priv->source) ? "lp_Media"                         : "unknown",                         event->priv->source,                         (guint) event->priv->mask,                         suffix);  g_assert_nonnull (str);  g_free (suffix);  return str;}
开发者ID:TeleMidia,项目名称:LibPlay,代码行数:34,


示例9: get_ancestors

static gbooleanget_ancestors (GtkWidget  *widget,               GType       widget_type,               GtkWidget **ancestor,               GtkWidget **below){  GtkWidget *a, *b;  a = NULL;  b = widget;  while (b != NULL)    {      a = gtk_widget_get_parent (b);      if (!a)        return FALSE;      if (g_type_is_a (G_OBJECT_TYPE (a), widget_type))        break;      b = a;    }  *below = b;  *ancestor = a;  return TRUE;}
开发者ID:Sidnioulz,项目名称:SandboxGtk,代码行数:25,


示例10: netstatus_connect_signal_while_alive

voidnetstatus_connect_signal_while_alive (gpointer    object,                                      const char *detailed_signal,                                      GCallback   func,                                      gpointer    func_data,                                      gpointer    alive_object){  GClosure *closure;  GType     type;  guint     signal_id = 0;  GQuark    detail = 0;    type = G_OBJECT_TYPE (object);  if (!g_signal_parse_name (detailed_signal, type, &signal_id, &detail, FALSE))    {      g_warning (G_STRLOC ": unable to parse signal /"%s/" for type /"%s/"",                 detailed_signal, g_type_name (type));      return;    }  closure = g_cclosure_new (func, func_data, NULL);  g_object_watch_closure (G_OBJECT (alive_object), closure);  g_signal_connect_closure_by_id (object, signal_id, detail, closure, FALSE);}
开发者ID:geekless,项目名称:waterline,代码行数:25,


示例11: _bus_stop_stream_cb

static gboolean_bus_stop_stream_cb (GstBus *bus, GstMessage *message, gpointer user_data){  FsStreamTransmitter *st = user_data;  GstState oldstate, newstate, pending;  if (GST_MESSAGE_TYPE (message) != GST_MESSAGE_STATE_CHANGED ||      G_OBJECT_TYPE (GST_MESSAGE_SRC (message)) != GST_TYPE_PIPELINE)    return bus_error_callback (bus, message, user_data);  gst_message_parse_state_changed (message, &oldstate, &newstate, &pending);  if (newstate != GST_STATE_PLAYING)    return TRUE;  if (pending != GST_STATE_VOID_PENDING)    ts_fail ("New state playing, but pending is %d", pending);  GST_DEBUG ("Stopping stream transmitter");  fs_stream_transmitter_stop (st);  g_object_unref (st);  GST_DEBUG ("Stopped stream transmitter");  g_atomic_int_set(&running, FALSE);  g_main_loop_quit (loop);  return TRUE;}
开发者ID:pexip,项目名称:farstream,代码行数:30,


示例12: gst_is_gl_memory_pbo

/** * gst_is_gl_memory_pbo: * @mem:a #GstMemory *  * Returns: whether the memory at @mem is a #GstGLMemoryPBO * * Since: 1.8 */gbooleangst_is_gl_memory_pbo (GstMemory * mem){  return mem != NULL && mem->allocator != NULL      && g_type_is_a (G_OBJECT_TYPE (mem->allocator),      GST_TYPE_GL_MEMORY_PBO_ALLOCATOR);}
开发者ID:Haifen,项目名称:gst-plugins-bad,代码行数:15,


示例13: gtk_tool_button_create_menu_proxy

static gbooleangtk_tool_button_create_menu_proxy (GtkToolItem *item){  GtkToolButton *button = GTK_TOOL_BUTTON (item);  GtkWidget *menu_item;  GtkWidget *menu_image = NULL;  GtkStockItem stock_item;  gboolean use_mnemonic = TRUE;  const char *label;  if (_gtk_tool_item_create_menu_proxy (item))    return TRUE;   if (GTK_IS_LABEL (button->priv->label_widget))    {      label = gtk_label_get_label (GTK_LABEL (button->priv->label_widget));      use_mnemonic = gtk_label_get_use_underline (GTK_LABEL (button->priv->label_widget));    }  else if (button->priv->label_text)    {      label = button->priv->label_text;      use_mnemonic = button->priv->use_underline;    }  else if (button->priv->stock_id && gtk_stock_lookup (button->priv->stock_id, &stock_item))    {      label = stock_item.label;    }  else    {      label = "";    }    if (use_mnemonic)    menu_item = gtk_image_menu_item_new_with_mnemonic (label);  else    menu_item = gtk_image_menu_item_new_with_label (label);  if (GTK_IS_IMAGE (button->priv->icon_widget))    {      menu_image = clone_image_menu_size (GTK_IMAGE (button->priv->icon_widget),					  gtk_widget_get_settings (GTK_WIDGET (button)));    }  else if (button->priv->stock_id)    {      menu_image = gtk_image_new_from_stock (button->priv->stock_id, GTK_ICON_SIZE_MENU);    }  if (menu_image)    gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_item), menu_image);  g_signal_connect_closure_by_id (menu_item,				  g_signal_lookup ("activate", G_OBJECT_TYPE (menu_item)), 0,				  g_cclosure_new_object_swap (G_CALLBACK (gtk_button_clicked),							      G_OBJECT (GTK_TOOL_BUTTON (button)->priv->button)),				  FALSE);  gtk_tool_item_set_proxy_menu_item (GTK_TOOL_ITEM (button), MENU_ID, menu_item);    return TRUE;}
开发者ID:ystk,项目名称:debian-gtk-2.0,代码行数:60,


示例14: mcd_dbus_get_interfaces

voidmcd_dbus_get_interfaces (TpSvcDBusProperties *self, const gchar *name,			 GValue *value){    McdInterfaceData *iface_data, *id;    GPtrArray *a_ifaces;    GType type;    DEBUG ("called");    a_ifaces = g_ptr_array_new ();    for (type = G_OBJECT_TYPE (self); type != 0; type = g_type_parent (type))    {	iface_data = g_type_get_qdata (type, MCD_INTERFACES_QUARK);	if (!iface_data) continue;	for (id = iface_data; id->get_type; id++)        {            if (id->optional &&                !mcd_dbus_is_active_optional_interface (self,                                                        id->get_type ()))            {                DEBUG ("skipping inactive optional iface %s", id->interface);                continue;            }	    g_ptr_array_add (a_ifaces, g_strdup (id->interface));        }    }    g_ptr_array_add (a_ifaces, NULL);    g_value_init (value, G_TYPE_STRV);    g_value_take_boxed (value, g_ptr_array_free (a_ifaces, FALSE));}
开发者ID:freedesktop-unofficial-mirror,项目名称:telepathy__telepathy-mission-control,代码行数:35,


示例15: rg_m_get_style_by_paths

static VALUErg_m_get_style_by_paths(int argc, VALUE *argv, G_GNUC_UNUSED VALUE self){    VALUE settings, widget_path, class_path, klass;    GtkStyle* style;    GType gtype;    const gchar* name;    rb_scan_args(argc, argv, "13", &settings, &widget_path, &class_path, &klass);    style = gtk_rc_get_style_by_paths(GTK_SETTINGS(RVAL2GOBJ(settings)),                                      NIL_P(widget_path) ? NULL : RVAL2CSTR(widget_path),                                      NIL_P(class_path) ? NULL : RVAL2CSTR(class_path),                                      NIL_P(klass) ? G_TYPE_NONE : CLASS2GTYPE(klass));    if (style){        gtype = G_OBJECT_TYPE(style);        name = G_OBJECT_TYPE_NAME(style);        if (! rb_const_defined_at(mGtk, rb_intern(name))){            G_DEF_CLASS(gtype, (gchar*)name, mGtk);        }        return GOBJ2RVAL(style);    }    return Qnil;}
开发者ID:Vasfed,项目名称:ruby-gnome2,代码行数:25,


示例16: tp_properties_mixin_init

void tp_properties_mixin_init (GObject *obj, glong offset){  TpPropertiesMixinClass *mixin_cls;  TpPropertiesMixin *mixin;  TpPropertiesContext *ctx;  g_assert (G_IS_OBJECT (obj));  g_assert (TP_IS_SVC_PROPERTIES_INTERFACE (obj));  g_type_set_qdata (G_OBJECT_TYPE (obj),                    TP_PROPERTIES_MIXIN_OFFSET_QUARK,                    GINT_TO_POINTER (offset));  mixin = TP_PROPERTIES_MIXIN (obj);  mixin_cls = TP_PROPERTIES_MIXIN_CLASS (G_OBJECT_GET_CLASS (obj));  mixin->properties = g_new0 (TpProperty, mixin_cls->num_props);  mixin->priv = g_slice_new0 (TpPropertiesMixinPrivate);  mixin->priv->object = obj;  ctx = &mixin->priv->context;  ctx->mixin_cls = mixin_cls;  ctx->mixin = mixin;  ctx->values = g_new0 (GValue *, mixin_cls->num_props);}
开发者ID:psunkari,项目名称:spicebird,代码行数:27,


示例17: gst_is_vulkan_memory

/** * gst_is_vulkan_memory: * @mem:a #GstMemory *  * Returns: whether the memory at @mem is a #GstVulkanMemory */gbooleangst_is_vulkan_memory (GstMemory * mem){  return mem != NULL && mem->allocator != NULL &&      g_type_is_a (G_OBJECT_TYPE (mem->allocator),      GST_TYPE_VULKAN_MEMORY_ALLOCATOR);}
开发者ID:GrokImageCompression,项目名称:gst-plugins-bad,代码行数:13,


示例18: tidy_stylable_notify

voidtidy_stylable_notify (TidyStylable *stylable,                      const gchar  *property_name){  GParamSpec *pspec;      g_return_if_fail (TIDY_IS_STYLABLE (stylable));  g_return_if_fail (property_name != NULL);  g_object_ref (stylable);  pspec = g_param_spec_pool_lookup (style_property_spec_pool,                                    property_name,                                    G_OBJECT_TYPE (stylable),                                    TRUE);  if (!pspec)    g_warning ("%s: object class `%s' has no style property named `%s'",               G_STRFUNC,               G_OBJECT_TYPE_NAME (stylable),               property_name);  else    {      GObjectNotifyQueue *nqueue;            nqueue = g_object_notify_queue_freeze (G_OBJECT (stylable),                                              &property_notify_context);      g_object_notify_queue_add (G_OBJECT (stylable), nqueue, pspec);      g_object_notify_queue_thaw (G_OBJECT (stylable), nqueue);    }  g_object_unref (stylable);}
开发者ID:ak2consulting,项目名称:tweet,代码行数:33,


示例19: fs_session_new_stream

/** * fs_session_new_stream: * @session: a #FsSession * @participant: #FsParticipant of a participant for the new stream * @direction: #FsStreamDirection describing the direction of the new stream that will * be created for this participant * @transmitter: Name of the type of transmitter to use for this session * @stream_transmitter_n_parameters: Number of parametrs passed to the stream *  transmitter * @stream_transmitter_parameters: an array of n_parameters #GParameter struct *  that will be passed *   to the newly-create #FsStreamTransmitter * @error: location of a #GError, or %NULL if no error occured * * This function creates a stream for the given participant into the active session. * * Returns: the new #FsStream that has been created. User must unref the * #FsStream when the stream is ended. If an error occured, returns NULL. */FsStream *fs_session_new_stream (FsSession *session, FsParticipant *participant,                       FsStreamDirection direction, const gchar *transmitter,                       guint stream_transmitter_n_parameters,                       GParameter *stream_transmitter_parameters,                       GError **error){  FsSessionClass *klass = FS_SESSION_GET_CLASS (session);  FsStream *new_stream = NULL;  g_return_val_if_fail (g_type_is_a (G_OBJECT_TYPE (session),              FS_TYPE_SESSION), NULL);  if (klass->new_stream) {    new_stream = klass->new_stream (session, participant, direction,      transmitter, stream_transmitter_n_parameters,      stream_transmitter_parameters, error);    if (!new_stream)      return NULL;    /* Let's catch all stream errors and forward them */    g_signal_connect (new_stream, "error",        G_CALLBACK (fs_session_error_forward), session);  } else {    g_set_error (error, FS_ERROR, FS_ERROR_NOT_IMPLEMENTED,      "new_stream not defined for %s", G_OBJECT_TYPE_NAME (session));  }  return new_stream;}
开发者ID:dksaarth,项目名称:farsight2-msn-plugin,代码行数:49,


示例20: gst_is_gl_base_buffer

/** * gst_is_gl_base_buffer: * @mem:a #GstMemory *  * Returns: whether the memory at @mem is a #GstGLBaseBuffer */gbooleangst_is_gl_base_buffer (GstMemory * mem){  return mem != NULL && mem->allocator != NULL &&      g_type_is_a (G_OBJECT_TYPE (mem->allocator),      GST_TYPE_GL_BASE_BUFFER_ALLOCATOR);}
开发者ID:ikonst,项目名称:gst-plugins-bad,代码行数:13,


示例21: seed_gobject_signal_emit

static JSValueRefseed_gobject_signal_emit (JSContextRef ctx,			  JSObjectRef function,			  JSObjectRef thisObject,			  size_t argumentCount,			  const JSValueRef arguments[],			  JSValueRef * exception){  JSValueRef ret;  GValue *params;  GValue ret_value = { 0 };  GSignalQuery query;  signal_privates *privates;  guint i, signal_id;  privates = JSObjectGetPrivate (thisObject);  signal_id = g_signal_lookup (privates->signal_name,			       G_OBJECT_TYPE (privates->object));  g_signal_query (signal_id, &query);  if (argumentCount != query.n_params)    {      seed_make_exception (ctx, exception, "ArgumentError",			   "Signal: %s for type %s expected %u "			   "arguments, got %zd",			   query.signal_name,			   g_type_name (query.itype),			   query.n_params, argumentCount);      return JSValueMakeNull (ctx);    }  params = g_new0 (GValue, argumentCount + 1);  g_value_init (&params[0], G_TYPE_OBJECT);  g_value_set_object (&params[0], privates->object);  for (i = 0; i < argumentCount; i++)    seed_value_to_gvalue (ctx, arguments[i],			  query.param_types[i],			  &params[i + 1], exception);  if (query.return_type != G_TYPE_NONE)    g_value_init (&ret_value, query.return_type);  g_signal_emitv (params, signal_id, 0, &ret_value);  for (i = 0; i < argumentCount; i++)    g_value_unset (&params[i]);  g_free (params);  ret = seed_value_from_gvalue (ctx, &ret_value, exception);  if (query.return_type != G_TYPE_NONE)    g_value_unset (&ret_value);  return ret;}
开发者ID:dannote,项目名称:seed,代码行数:60,


示例22: paste_object

static voidpaste_object (GnmPasteTarget const *pt, SheetObject const *src, int left, int top){	SheetObject *dst;	SheetObjectAnchor tmp;	tmp = *sheet_object_get_anchor (src);	if (G_OBJECT_TYPE (src) == CELL_COMMENT_TYPE) {		if ((pt->paste_flags & PASTE_COMMENTS) &&		    (pt->paste_flags & PASTE_IGNORE_COMMENTS_AT_ORIGIN &&		     tmp.cell_bound.start.col == 0  &&		     tmp.cell_bound.start.row == 0))			return;	} else if (!(pt->paste_flags & PASTE_OBJECTS))		return;	if (NULL == (dst = sheet_object_dup (src)))		return;	if (pt->paste_flags & PASTE_TRANSPOSE) {		GnmCellPos origin;		origin.col = 0;		origin.row = 0;		range_transpose (&tmp.cell_bound, pt->sheet, &origin);	}	range_translate (&tmp.cell_bound, pt->sheet, left, top);	sheet_object_set_anchor (dst, &tmp);	sheet_object_set_sheet (dst, pt->sheet);	g_object_unref (dst);}
开发者ID:paulfitz,项目名称:gnumeric,代码行数:30,


示例23: _clutter_actor_set_default_paint_volume

/*<private> * _clutter_actor_set_default_paint_volume: * @self: a #ClutterActor * @check_gtype: if not %G_TYPE_INVALID, match the type of @self against *   this type * @volume: the #ClutterPaintVolume to set * * Sets the default paint volume for @self. * * This function should be called by #ClutterActor sub-classes that follow * the default assumption that their paint volume is defined by their * allocation. * * If @check_gtype is not %G_TYPE_INVALID, this function will check the * type of @self and only compute the paint volume if the type matches; * this can be used to avoid computing the paint volume for sub-classes * of an actor class * * Return value: %TRUE if the paint volume was set, and %FALSE otherwise */gboolean_clutter_actor_set_default_paint_volume (ClutterActor       *self,                                         GType               check_gtype,                                         ClutterPaintVolume *volume){  ClutterGeometry geometry = { 0, };  if (check_gtype != G_TYPE_INVALID)    {      if (G_OBJECT_TYPE (self) != check_gtype)        return FALSE;    }  /* calling clutter_actor_get_allocation_* can potentially be very   * expensive, as it can result in a synchronous full stage relayout   * and redraw   */  if (!clutter_actor_has_allocation (self))    return FALSE;  clutter_actor_get_allocation_geometry (self, &geometry);  clutter_paint_volume_set_width (volume, geometry.width);  clutter_paint_volume_set_height (volume, geometry.height);  return TRUE;}
开发者ID:nobled,项目名称:clutter,代码行数:47,


示例24: gdict_context_match_word

/** * gdict_context_match_word: * @context: a #GdictContext * @database: a database name to search into, or %NULL for the *    default database * @strategy: a strategy name to use for matching, or %NULL for *    the default strategy * @word: the word to match * @error: return location for a #GError, or %NULL * * Query @context for a list of word matching @word inside @database, * using @strategy as a matching strategy.  Each time a matching word * is found, the "match-found" signal is fired. * * Return value: %TRUE if the query was successfully started. * * Since: 1.0 */gbooleangdict_context_match_word (GdictContext  *context,			  const gchar   *database,			  const gchar   *strategy,			  const gchar   *word,			  GError       **error){  g_return_val_if_fail (GDICT_IS_CONTEXT (context), FALSE);  g_return_val_if_fail (word != NULL, FALSE);  if (!GDICT_CONTEXT_GET_IFACE (context)->match_word)    {      g_warning ("Object `%s' does not implement the match_word "                 "virtual function.",                 g_type_name (G_OBJECT_TYPE (context)));      return FALSE;    }  return GDICT_CONTEXT_GET_IFACE (context)->match_word (context,  							database,  							strategy,  							word,  							error);}
开发者ID:mate-desktop,项目名称:mate-utils,代码行数:43,


示例25: xfdashboard_viewpad_find_view_by_type

/* Find view by type */XfdashboardView* xfdashboard_viewpad_find_view_by_type(XfdashboardViewpad *self, GType inType){	ClutterActorIter			iter;	ClutterActor				*child;	XfdashboardView				*view;	g_return_val_if_fail(XFDASHBOARD_IS_VIEWPAD(self), NULL);	view=NULL;	/* Iterate through children and create list of views */	clutter_actor_iter_init(&iter, CLUTTER_ACTOR(self));	while(!view && clutter_actor_iter_next(&iter, &child))	{		/* Check if child is a view and of type looking for */		if(XFDASHBOARD_IS_VIEW(child)==TRUE &&			G_OBJECT_TYPE(child)==inType)		{			view=XFDASHBOARD_VIEW(child);		}	}	/* Return view found which may be NULL if no view of requested type was found */	return(view);}
开发者ID:tydaikho,项目名称:xfdashboard,代码行数:26,


示例26: gtk_recent_action_unselect_all

static voidgtk_recent_action_unselect_all (GtkRecentChooser *chooser){  g_warning ("This function is not implemented for "	     "widgets of class '%s'",             g_type_name (G_OBJECT_TYPE (chooser)));}
开发者ID:3v1n0,项目名称:gtk,代码行数:7,


示例27: _clutter_actor_set_default_paint_volume

/*<private> * _clutter_actor_set_default_paint_volume: * @self: a #ClutterActor * @check_gtype: if not %G_TYPE_INVALID, match the type of @self against *   this type * @volume: the #ClutterPaintVolume to set * * Sets the default paint volume for @self. * * This function should be called by #ClutterActor sub-classes that follow * the default assumption that their paint volume is defined by their * allocation. * * If @check_gtype is not %G_TYPE_INVALID, this function will check the * type of @self and only compute the paint volume if the type matches; * this can be used to avoid computing the paint volume for sub-classes * of an actor class * * Return value: %TRUE if the paint volume was set, and %FALSE otherwise */gboolean_clutter_actor_set_default_paint_volume (ClutterActor       *self,                                         GType               check_gtype,                                         ClutterPaintVolume *volume){  ClutterActorBox box;  if (check_gtype != G_TYPE_INVALID)    {      if (G_OBJECT_TYPE (self) != check_gtype)        return FALSE;    }  /* calling clutter_actor_get_allocation_* can potentially be very   * expensive, as it can result in a synchronous full stage relayout   * and redraw   */  if (!clutter_actor_has_allocation (self))    return FALSE;  clutter_actor_get_allocation_box (self, &box);  /* we only set the width and height, as the paint volume is defined   * to be relative to the actor's modelview, which means that the   * allocation's origin has already been applied   */  clutter_paint_volume_set_width (volume, box.x2 - box.x1);  clutter_paint_volume_set_height (volume, box.y2 - box.y1);  return TRUE;}
开发者ID:halfline,项目名称:mutter,代码行数:51,


示例28: extensible_load_extension

static voidextensible_load_extension (GType extension_type,                           EExtensible *extensible){	EExtensionClass *extension_class;	GType extensible_type;	GPtrArray *extensions;	EExtension *extension;	extensible_type = G_OBJECT_TYPE (extensible);	extension_class = g_type_class_ref (extension_type);	/* Only load extensions that extend the given extensible object. */	if (!g_type_is_a (extensible_type, extension_class->extensible_type))		goto exit;	extension = g_object_new (		extension_type, "extensible", extensible, NULL);	extensions = extensible_get_extensions (extensible);	g_ptr_array_add (extensions, extension);exit:	g_type_class_unref (extension_class);}
开发者ID:gcampax,项目名称:evolution-data-server,代码行数:25,


示例29: ToolsCoreRegisterSignal

static gbooleanToolsCoreRegisterSignal(ToolsAppCtx *ctx,                        ToolsAppProvider *prov,                        ToolsPluginData *plugin,                        gpointer reg){   gboolean valid;   guint sigId;   GQuark sigDetail;   ToolsPluginSignalCb *sig = reg;   valid = g_signal_parse_name(sig->signame,                               G_OBJECT_TYPE(ctx->serviceObj),                               &sigId,                               &sigDetail,                               FALSE);   if (valid) {      g_signal_connect(ctx->serviceObj,                       sig->signame,                       sig->callback,                       sig->clientData);      return TRUE;   }   g_debug("Plugin '%s' unable to connect to signal '%s'./n", plugin->name,           sig->signame);   return FALSE;}
开发者ID:AlissonGiron,项目名称:open-vm-tools,代码行数:28,



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


C++ G_OBJECT_TYPE_NAME函数代码示例
C++ G_OBJECT_CLASS_NAME函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。