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

C++ G_OBJECT_TYPE_NAME函数代码示例

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

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



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

示例1: G_OBJECT_TYPE_NAME

    //________________________________________________________________________________
    gboolean ToolBarStateData::childEnterNotifyEvent( GtkWidget* widget, GdkEventCrossing*, gpointer data )
    {

        #if OXYGEN_DEBUG
        std::cerr
            << "Oxygen::ToolBarStateData::childEnterNotifyEvent -"
            << " " << widget << " (" << G_OBJECT_TYPE_NAME( widget ) << ")"
            << std::endl;
        #endif

        static_cast<ToolBarStateData*>( data )->updateState( widget, true, false );
        return FALSE;
    }
开发者ID:KDE,项目名称:oxygen-gtk,代码行数:14,代码来源:oxygentoolbarstatedata.cpp


示例2: extension_subclass_get_property

static void
extension_subclass_get_property (GObject    *object,
                                 guint       prop_id,
                                 GValue     *value,
                                 GParamSpec *pspec)
{
  g_debug ("Getting '%s:%s'",
           G_OBJECT_TYPE_NAME (object),
           g_param_spec_get_name (pspec));

  G_OBJECT_CLASS (get_parent_class (object))->get_property (object, prop_id,
                                                            value, pspec);
}
开发者ID:DESTROYING,项目名称:libpeas,代码行数:13,代码来源:peas-extension-subclasses.c


示例3: log_new_element_stats

static void
log_new_element_stats (GstElementStats * stats, GstElement * element,
    GstClockTime elapsed)
{
  gst_tracer_log_trace (gst_structure_new ("new-element",
          "thread-id", G_TYPE_UINT, GPOINTER_TO_UINT (g_thread_self ()),
          "ts", G_TYPE_UINT64, elapsed,
          "ix", G_TYPE_UINT, stats->index,
          "parent-ix", G_TYPE_UINT, stats->parent_ix,
          "name", G_TYPE_STRING, GST_OBJECT_NAME (element),
          "type", G_TYPE_STRING, G_OBJECT_TYPE_NAME (element),
          "is-bin", G_TYPE_BOOLEAN, GST_IS_BIN (element), NULL));
}
开发者ID:carlo0815,项目名称:gstreamer1.7.1,代码行数:13,代码来源:gststats.c


示例4: unit_abandon

void
unit_abandon (Unit *unit)
{
  g_return_if_fail (unit != NULL);

  if (!UNIT_GET_CLASS (unit)->start_transient)
    {
      g_warning ("%s does not implement StartTransient", G_OBJECT_TYPE_NAME (unit));
      return;
    }

  return UNIT_GET_CLASS (unit)->abandon (unit);
}
开发者ID:desrt,项目名称:systemd-shim,代码行数:13,代码来源:unit.c


示例5: cb_child_added

static void cb_child_added(GstChildProxy *child_proxy, GObject *object, TSMFGstreamerDecoder* mdecoder)
{
	DEBUG_TSMF("NAME: %s", G_OBJECT_TYPE_NAME(object));

	if (!g_strcmp0(G_OBJECT_TYPE_NAME(object), "GstXvImageSink") || !g_strcmp0(G_OBJECT_TYPE_NAME(object), "GstXImageSink") || !g_strcmp0(G_OBJECT_TYPE_NAME(object), "GstFluVAAutoSink"))
	{
		gst_base_sink_set_max_lateness((GstBaseSink *) object, 10000000); /* nanoseconds */
		g_object_set(G_OBJECT(object), "sync", TRUE, NULL); /* synchronize on the clock */
		g_object_set(G_OBJECT(object), "async", TRUE, NULL); /* no async state changes */
	}

	else if (!g_strcmp0(G_OBJECT_TYPE_NAME(object), "GstAlsaSink") || !g_strcmp0(G_OBJECT_TYPE_NAME(object), "GstPulseSink"))
	{
		gst_base_sink_set_max_lateness((GstBaseSink *) object, 10000000); /* nanoseconds */
		g_object_set(G_OBJECT(object), "slave-method", 1, NULL);
		g_object_set(G_OBJECT(object), "buffer-time", (gint64) 20000, NULL); /* microseconds */
		g_object_set(G_OBJECT(object), "drift-tolerance", (gint64) 20000, NULL); /* microseconds */
		g_object_set(G_OBJECT(object), "latency-time", (gint64) 10000, NULL); /* microseconds */
		g_object_set(G_OBJECT(object), "sync", TRUE, NULL); /* synchronize on the clock */
		g_object_set(G_OBJECT(object), "async", TRUE, NULL); /* no async state changes */
	}
}
开发者ID:JunaidLoonat,项目名称:FreeRDP,代码行数:22,代码来源:tsmf_gstreamer.c


示例6: ide_device_provider_real_load_async

static void
ide_device_provider_real_load_async (IdeDeviceProvider   *self,
                                     GCancellable        *cancellable,
                                     GAsyncReadyCallback  callback,
                                     gpointer             user_data)
{
  g_task_report_new_error (self, callback, user_data,
                           ide_device_provider_real_load_async,
                           G_IO_ERROR,
                           G_IO_ERROR_NOT_SUPPORTED,
                           "%s does not implement load_async",
                           G_OBJECT_TYPE_NAME (self));
}
开发者ID:GNOME,项目名称:gnome-builder,代码行数:13,代码来源:ide-device-provider.c


示例7: log_new_pad_stats

static void
log_new_pad_stats (GstPadStats * stats, GstPad * pad)
{
  gst_tracer_log_trace (gst_structure_new ("new-pad",
          "thread-id", G_TYPE_UINT, GPOINTER_TO_UINT (g_thread_self ()),
          "ix", G_TYPE_UINT, stats->index,
          "parent-ix", G_TYPE_UINT, stats->parent_ix,
          "name", G_TYPE_STRING, GST_OBJECT_NAME (pad),
          "type", G_TYPE_STRING, G_OBJECT_TYPE_NAME (pad),
          "is-ghostpad", G_TYPE_BOOLEAN, GST_IS_GHOST_PAD (pad),
          "pad-direction", GST_TYPE_PAD_DIRECTION, GST_PAD_DIRECTION (pad),
          NULL));
}
开发者ID:carlo0815,项目名称:gstreamer1.7.1,代码行数:13,代码来源:gststats.c


示例8: chooser_file_activated_cb

static void
chooser_file_activated_cb (GtkFileChooser *chooser,
			   gpointer        user_data)
{
  gchar *folder, *filename;

  folder = gtk_file_chooser_get_current_folder_uri (chooser);
  filename = gtk_file_chooser_get_uri (chooser);
  g_message ("%s::file-activated\n\tFolder: `%s'\n\tFilename: `%s'\nDone.\n",
	     G_OBJECT_TYPE_NAME (chooser), folder, filename);
  g_free (folder);
  g_free (filename);
}
开发者ID:sam-m888,项目名称:gtk,代码行数:13,代码来源:testfilechooserbutton.c


示例9: _xfdashboard_workspace_selector_on_scroll_event

/* A scroll event occured in workspace selector (e.g. by mouse-wheel) */
static gboolean _xfdashboard_workspace_selector_on_scroll_event(ClutterActor *inActor,
																ClutterEvent *inEvent,
																gpointer inUserData)
{
	XfdashboardWorkspaceSelector			*self;
	XfdashboardWorkspaceSelectorPrivate		*priv;
	gint									direction;
	gint									currentWorkspace;
	gint									maxWorkspace;
	XfdashboardWindowTrackerWorkspace		*workspace;

	g_return_val_if_fail(XFDASHBOARD_IS_WORKSPACE_SELECTOR(inActor), CLUTTER_EVENT_PROPAGATE);
	g_return_val_if_fail(inEvent, CLUTTER_EVENT_PROPAGATE);

	self=XFDASHBOARD_WORKSPACE_SELECTOR(inActor);
	priv=self->priv;

	/* Get direction of scroll event */
	switch(clutter_event_get_scroll_direction(inEvent))
	{
		case CLUTTER_SCROLL_UP:
		case CLUTTER_SCROLL_LEFT:
			direction=-1;
			break;

		case CLUTTER_SCROLL_DOWN:
		case CLUTTER_SCROLL_RIGHT:
			direction=1;
			break;

		/* Unhandled directions */
		default:
			g_debug("Cannot handle scroll direction %d in %s",
						clutter_event_get_scroll_direction(inEvent),
						G_OBJECT_TYPE_NAME(self));
			return(CLUTTER_EVENT_PROPAGATE);
	}

	/* Get next workspace in scroll direction */
	currentWorkspace=xfdashboard_window_tracker_workspace_get_number(priv->activeWorkspace);
	maxWorkspace=xfdashboard_window_tracker_get_workspaces_count(priv->windowTracker);

	currentWorkspace+=direction;
	if(currentWorkspace<0 || currentWorkspace>=maxWorkspace) return(CLUTTER_EVENT_STOP);

	/* Activate new workspace */
	workspace=xfdashboard_window_tracker_get_workspace_by_number(priv->windowTracker, currentWorkspace);
	xfdashboard_window_tracker_workspace_activate(workspace);

	return(CLUTTER_EVENT_STOP);
}
开发者ID:paulmadore,项目名称:luckyde,代码行数:52,代码来源:workspace-selector.c


示例10: gtk_recent_action_set_property

static void
gtk_recent_action_set_property (GObject      *gobject,
                                guint         prop_id,
                                const GValue *value,
                                GParamSpec   *pspec)
{
  GtkRecentAction *action = GTK_RECENT_ACTION (gobject);
  GtkRecentActionPrivate *priv = action->priv;

  switch (prop_id)
    {
    case PROP_SHOW_NUMBERS:
      priv->show_numbers = g_value_get_boolean (value);
      break;
    case GTK_RECENT_CHOOSER_PROP_SHOW_PRIVATE:
      priv->show_private = g_value_get_boolean (value);
      break;
    case GTK_RECENT_CHOOSER_PROP_SHOW_NOT_FOUND:
      priv->show_not_found = g_value_get_boolean (value);
      break;
    case GTK_RECENT_CHOOSER_PROP_SHOW_TIPS:
      priv->show_tips = g_value_get_boolean (value);
      break;
    case GTK_RECENT_CHOOSER_PROP_SHOW_ICONS:
      priv->show_icons = g_value_get_boolean (value);
      break;
    case GTK_RECENT_CHOOSER_PROP_LIMIT:
      priv->limit = g_value_get_int (value);
      break;
    case GTK_RECENT_CHOOSER_PROP_LOCAL_ONLY:
      priv->local_only = g_value_get_boolean (value);
      break;
    case GTK_RECENT_CHOOSER_PROP_SORT_TYPE:
      priv->sort_type = g_value_get_enum (value);
      break;
    case GTK_RECENT_CHOOSER_PROP_FILTER:
      set_current_filter (action, g_value_get_object (value));
      break;
    case GTK_RECENT_CHOOSER_PROP_SELECT_MULTIPLE:
      g_warning ("%s: Choosers of type `%s' do not support selecting multiple items.",
                 G_STRFUNC,
                 G_OBJECT_TYPE_NAME (gobject));
      return;
    case GTK_RECENT_CHOOSER_PROP_RECENT_MANAGER:
      set_recent_manager (action, g_value_get_object (value));
      break;
    default:
      G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
      return;
    }
}
开发者ID:3dfxmadscientist,项目名称:gtk,代码行数:51,代码来源:gtkrecentaction.c


示例11: draw_flat_box

static void
draw_flat_box (GtkStyle     *style,
	       GdkWindow    *window,
	       GtkStateType  state,
	       GtkShadowType shadow,
	       GdkRectangle *area,
	       GtkWidget    *widget,
	       const gchar  *detail,
	       gint          x,
	       gint          y,
	       gint          width,
	       gint          height)
{
  ThemeMatchData match_data;

  g_return_if_fail (style != NULL);
  g_return_if_fail (window != NULL);

  /* FIXME: memory leak */
  LOG ("widget=%s, primitive=flat_box, state=%s, shadow=%s, detail='%s', name='%s'",
        G_OBJECT_TYPE_NAME (widget),
        enum_value_to_string (gtk_state_type_get_type (), state),
        enum_value_to_string (gtk_shadow_type_get_type (), shadow),
        detail,
        gtk_widget_get_name (widget));

  /* Hack because Gtk doesn't give us the correct widget state */
  if (widget && GTK_IS_ENTRY(widget))
  {
    if (!gtk_widget_is_sensitive (widget))
      state = GTK_STATE_INSENSITIVE;

    if (gtk_widget_has_focus (widget))
      state = GTK_STATE_ACTIVE;
  }

  match_data.function = TOKEN_D_FLAT_BOX;
  match_data.detail = (gchar *)detail;
  match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE;
  match_data.shadow = shadow;
  match_data.state = state;

  /* Special handling for treeview cursor row */
  if (GTK_IS_TREE_VIEW (widget))
    maybe_check_cursor_position (GTK_TREE_VIEW (widget), x, y, width, height, &match_data);

  if (!draw_simple_image (style, window, area, widget, &match_data, TRUE,
			  x, y, width, height))
    GTK_STYLE_CLASS (sapwood_style_parent_class)->draw_flat_box (
      style, window, state, shadow, area, widget, detail, x, y, width, height);
}
开发者ID:GNOME,项目名称:sapwood,代码行数:51,代码来源:sapwood-style.c


示例12: get_xml_class_name

static char *
get_xml_class_name (GObject * object)
{
  const char *class_name = G_OBJECT_TYPE_NAME (object);

  if (strncmp (class_name, "Gst", 3) == 0) {
    class_name += 3;
  } else if (strncmp (class_name, "Gss", 3) == 0) {
    class_name += 3;
  } else if (strncmp (class_name, "Ew", 2) == 0) {
    class_name += 2;
  }
  return g_ascii_strdown (class_name, -1);
}
开发者ID:SuchangKo,项目名称:gst-stream-server,代码行数:14,代码来源:gss-config.c


示例13: assert

    //________________________________________________________________________________
    void ComboBoxEntryData::setEntry( GtkWidget* widget )
    {
        if( _entry._widget == widget ) return;
        assert( !_entry._widget );

        #if OXYGEN_DEBUG
        std::cerr << "Oxygen::ComboBoxEntryData::setEntry - " << widget << " (" << G_OBJECT_TYPE_NAME( widget ) << ")" << std::endl;
        #endif

        _entry._destroyId.connect( G_OBJECT(widget), "destroy", G_CALLBACK( childDestroyNotifyEvent ), this );
        _entry._enterId.connect( G_OBJECT(widget), "enter-notify-event", (GCallback)enterNotifyEvent, this );
        _entry._leaveId.connect( G_OBJECT(widget), "leave-notify-event", (GCallback)leaveNotifyEvent, this );
        _entry._widget = widget;
    }
开发者ID:KDE,项目名称:oxygen-gtk,代码行数:15,代码来源:oxygencomboboxentrydata.cpp


示例14: _gdk_win32_drawable_description

gchar *
_gdk_win32_drawable_description (GdkDrawable *d)
{
  gint width, height, depth;

  gdk_drawable_get_size (d, &width, &height);
  depth = gdk_drawable_get_depth (d);

  return static_printf
    ("%s:%p:%dx%dx%d",
     G_OBJECT_TYPE_NAME (d),
     GDK_DRAWABLE_HANDLE (d),
     width, height, depth);
}
开发者ID:batman52,项目名称:dingux-code,代码行数:14,代码来源:gdkmain-win32.c


示例15: ags_recall_resolve_dependencies

/**
 * ags_recall_resolve_dependencies:
 * @recall an #AgsRecall
 *
 * A signal indicating that the inheriting object should resolve
 * it's dependencies.
 */
void
ags_recall_resolve_dependencies(AgsRecall *recall)
{
  g_return_if_fail(AGS_IS_RECALL(recall));

#ifdef AGS_DEBUG
  g_message("resolving %s\0", G_OBJECT_TYPE_NAME(recall));
#endif
  
  g_object_ref(G_OBJECT(recall));
  g_signal_emit(G_OBJECT(recall),
		recall_signals[RESOLVE_DEPENDENCIES], 0);
  g_object_unref(G_OBJECT(recall));
}
开发者ID:weedlight,项目名称:ags,代码行数:21,代码来源:ags_recall.c


示例16: start_source

static gboolean
start_source (GClueLocationSource *source)
{
        source->priv->active_counter++;
        if (source->priv->active_counter > 1) {
                g_debug ("%s already active, not starting.",
                         G_OBJECT_TYPE_NAME (source));
                return FALSE;
        }

        if (source->priv->compute_movement) {
                source->priv->compass = gclue_compass_get_singleton ();
                source->priv->heading_changed_id = g_signal_connect
                        (G_OBJECT (source->priv->compass),
                         "notify::heading",
                         G_CALLBACK (on_compass_heading_changed),
                         source);
        }

        g_object_notify (G_OBJECT (source), "active");
        g_debug ("%s now active", G_OBJECT_TYPE_NAME (source));
        return TRUE;
}
开发者ID:zeenix,项目名称:Geoclue,代码行数:23,代码来源:gclue-location-source.c


示例17: nagp_reader_read_start

void
nagp_reader_read_start( const NAIFactoryProvider *provider, void *reader_data, const NAIFactoryObject *object, GSList **messages  )
{
	static const gchar *thisfn = "nagp_reader_read_start";

	g_return_if_fail( NA_IS_IFACTORY_PROVIDER( provider ));
	g_return_if_fail( NAGP_IS_GCONF_PROVIDER( provider ));
	g_return_if_fail( NA_IS_IFACTORY_OBJECT( object ));

	if( !NAGP_GCONF_PROVIDER( provider )->private->dispose_has_run ){

		g_debug( "%s: provider=%p (%s), reader_data=%p, object=%p (%s), messages=%p",
				thisfn,
				( void * ) provider, G_OBJECT_TYPE_NAME( provider ),
				( void * ) reader_data,
				( void * ) object, G_OBJECT_TYPE_NAME( object ),
				( void * ) messages );

		if( NA_IS_OBJECT_PROFILE( object )){
			read_start_profile_attach_profile( provider, NA_OBJECT_PROFILE( object ), ( ReaderData * ) reader_data, messages );
		}
	}
}
开发者ID:GNOME,项目名称:nautilus-actions,代码行数:23,代码来源:nagp-reader.c


示例18: ar_card_theme_sliced_prerender_scalable

static gboolean
ar_card_theme_sliced_prerender_scalable (ArCardThemeSliced *theme)
{
  ArCardThemePreimage *preimage_card_theme = (ArCardThemePreimage *) theme;

  g_assert (theme->source == NULL);

  _games_profile_start ("prerendering source pixbuf for %s card theme %s", G_OBJECT_TYPE_NAME (theme), ((ArCardTheme*)theme)->theme_info->display_name);

  theme->source = games_preimage_render (preimage_card_theme->cards_preimage,
                                         preimage_card_theme->card_size.width * 13,
                                         preimage_card_theme->card_size.height * 5);

  _games_profile_end ("prerendering source pixbuf for %s card theme %s", G_OBJECT_TYPE_NAME (theme), ((ArCardTheme*)theme)->theme_info->display_name);

  if (!theme->source)
    return FALSE;

  theme->subsize.width = gdk_pixbuf_get_width (theme->source) / 13;
  theme->subsize.height = gdk_pixbuf_get_height (theme->source) / 5;

  return TRUE;
}
开发者ID:gfunkmonk2,项目名称:mate-games,代码行数:23,代码来源:ar-card-theme-sliced.c


示例19: _clutter_meta_group_remove_meta

/*
 * _clutter_meta_group_remove_meta:
 * @group: a #ClutterMetaGroup
 * @meta: a #ClutterActorMeta to remove
 *
 * Removes @meta from @group and releases the reference being held on it
 */
void
_clutter_meta_group_remove_meta (ClutterMetaGroup *group,
                                 ClutterActorMeta *meta)
{
  if (meta->priv->actor != group->actor)
    {
      g_warning ("The meta of type '%s' with name '%s' is not "
                 "attached to the actor '%s'",
                 G_OBJECT_TYPE_NAME (meta),
                 meta->priv->name != NULL
                   ? meta->priv->name
                   : "<unknown>",
                 clutter_actor_get_name (group->actor) != NULL
                   ? clutter_actor_get_name (group->actor)
                   : G_OBJECT_TYPE_NAME (group->actor));
      return;
    }

  _clutter_actor_meta_set_actor (meta, NULL);

  group->meta = g_list_remove (group->meta, meta);
  g_object_unref (meta);
}
开发者ID:nobled,项目名称:clutter,代码行数:30,代码来源:clutter-actor-meta.c


示例20: _object_finalized

static void
_object_finalized (gpointer data,
    GObject *obj)
{
  G_LOCK (gobject_list);

  if (display_filter (DISPLAY_FLAG_CREATE))
    {
      g_print (" -- Finalized object %p, %s\n", obj, G_OBJECT_TYPE_NAME (obj));
      print_trace();

      /* Only care about the object which were already existing during last
       * check point. */
      if (g_hash_table_lookup (gobject_list_state.added, obj) == NULL)
        g_hash_table_insert (gobject_list_state.removed, obj,
            g_strdup (G_OBJECT_TYPE_NAME (obj)));
    }

  g_hash_table_remove (gobject_list_state.objects, obj);
  g_hash_table_remove (gobject_list_state.added, obj);

  G_UNLOCK (gobject_list);
}
开发者ID:matze,项目名称:gobject-list,代码行数:23,代码来源:gobject-list.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ G_OBJECT_WARN_INVALID_PROPERTY_ID函数代码示例发布时间:2022-05-30
下一篇:
C++ G_OBJECT_TYPE函数代码示例发布时间: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