本文整理汇总了C++中G_OBJECT_TYPE_NAME函数的典型用法代码示例。如果您正苦于以下问题:C++ G_OBJECT_TYPE_NAME函数的具体用法?C++ G_OBJECT_TYPE_NAME怎么用?C++ G_OBJECT_TYPE_NAME使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了G_OBJECT_TYPE_NAME函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例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);
}
示例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));
}
示例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);
}
示例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 */
}
}
示例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));
}
示例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));
}
示例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);
}
示例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);
}
示例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;
}
}
示例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);
}
示例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);
}
示例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;
}
示例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);
}
示例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));
}