本文整理汇总了C++中G_ADD_PRIVATE函数的典型用法代码示例。如果您正苦于以下问题:C++ G_ADD_PRIVATE函数的具体用法?C++ G_ADD_PRIVATE怎么用?C++ G_ADD_PRIVATE使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了G_ADD_PRIVATE函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: glade_action_bar_editor_editable_init
static void glade_action_bar_editor_editable_init (GladeEditableIface * iface);
static void glade_action_bar_editor_grab_focus (GtkWidget * widget);
static void use_center_child_toggled (GtkWidget *widget, GladeActionBarEditor * box_editor);
struct _GladeActionBarEditorPrivate
{
GtkWidget *embed;
GtkWidget *use_center_child;
};
static GladeEditableIface *parent_editable_iface;
G_DEFINE_TYPE_WITH_CODE (GladeActionBarEditor, glade_action_bar_editor, GLADE_TYPE_EDITOR_SKELETON,
G_ADD_PRIVATE (GladeActionBarEditor)
G_IMPLEMENT_INTERFACE (GLADE_TYPE_EDITABLE,
glade_action_bar_editor_editable_init));
static void
glade_action_bar_editor_class_init (GladeActionBarEditorClass * klass)
{
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
widget_class->grab_focus = glade_action_bar_editor_grab_focus;
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/gladegtk/glade-action-bar-editor.ui");
gtk_widget_class_bind_template_child_private (widget_class, GladeActionBarEditor, embed);
gtk_widget_class_bind_template_child_private (widget_class, GladeActionBarEditor, use_center_child);
gtk_widget_class_bind_template_callback (widget_class, use_center_child_toggled);
开发者ID:GNOME,项目名称:glade,代码行数:30,代码来源:glade-action-bar-editor.c
示例2: GARROW_OUTPUT_STREAM
{
auto output_stream = GARROW_OUTPUT_STREAM(writeable);
auto arrow_output_stream = garrow_output_stream_get_raw(output_stream);
return arrow_output_stream;
}
static void
garrow_output_stream_writeable_interface_init(GArrowWriteableInterface *iface)
{
iface->get_raw = garrow_output_stream_get_raw_writeable_interface;
}
G_DEFINE_TYPE_WITH_CODE(GArrowOutputStream,
garrow_output_stream,
G_TYPE_OBJECT,
G_ADD_PRIVATE(GArrowOutputStream)
G_IMPLEMENT_INTERFACE(GARROW_TYPE_FILE,
garrow_output_stream_file_interface_init)
G_IMPLEMENT_INTERFACE(GARROW_TYPE_WRITEABLE,
garrow_output_stream_writeable_interface_init));
#define GARROW_OUTPUT_STREAM_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE((obj), \
GARROW_TYPE_OUTPUT_STREAM, \
GArrowOutputStreamPrivate))
static void
garrow_output_stream_finalize(GObject *object)
{
GArrowOutputStreamPrivate *priv;
开发者ID:CodingCat,项目名称:arrow,代码行数:30,代码来源:output-stream.cpp
示例3: gtk_image_menu_item_activatable_interface_init
GParamSpec *pspec);
static void gtk_image_menu_item_screen_changed (GtkWidget *widget,
GdkScreen *previous_screen);
static void gtk_image_menu_item_recalculate (GtkImageMenuItem *image_menu_item);
static void gtk_image_menu_item_activatable_interface_init (GtkActivatableIface *iface);
static void gtk_image_menu_item_update (GtkActivatable *activatable,
GtkAction *action,
const gchar *property_name);
static void gtk_image_menu_item_sync_action_properties (GtkActivatable *activatable,
GtkAction *action);
G_DEFINE_TYPE_WITH_CODE (GtkImageMenuItem, gtk_image_menu_item, GTK_TYPE_MENU_ITEM,
G_ADD_PRIVATE (GtkImageMenuItem)
G_IMPLEMENT_INTERFACE (GTK_TYPE_ACTIVATABLE,
gtk_image_menu_item_activatable_interface_init))
static void
gtk_image_menu_item_class_init (GtkImageMenuItemClass *klass)
{
GObjectClass *gobject_class = (GObjectClass*) klass;
GtkWidgetClass *widget_class = (GtkWidgetClass*) klass;
GtkMenuItemClass *menu_item_class = (GtkMenuItemClass*) klass;
GtkContainerClass *container_class = (GtkContainerClass*) klass;
widget_class->destroy = gtk_image_menu_item_destroy;
widget_class->screen_changed = gtk_image_menu_item_screen_changed;
widget_class->get_preferred_width = gtk_image_menu_item_get_preferred_width;
开发者ID:raja651,项目名称:gtk,代码行数:31,代码来源:gtkimagemenuitem.c
示例4: gtk_layout_get_child_property
static void gtk_layout_get_child_property (GtkContainer *container,
GtkWidget *child,
guint property_id,
GValue *value,
GParamSpec *pspec);
static void gtk_layout_allocate_child (GtkLayout *layout,
GtkLayoutChild *child);
static void gtk_layout_adjustment_changed (GtkAdjustment *adjustment,
GtkLayout *layout);
static void gtk_layout_style_updated (GtkWidget *widget);
static void gtk_layout_set_hadjustment_values (GtkLayout *layout);
static void gtk_layout_set_vadjustment_values (GtkLayout *layout);
G_DEFINE_TYPE_WITH_CODE (GtkLayout, gtk_layout, GTK_TYPE_CONTAINER,
G_ADD_PRIVATE (GtkLayout)
G_IMPLEMENT_INTERFACE (GTK_TYPE_SCROLLABLE, NULL))
/* Public interface
*/
/**
* gtk_layout_new:
* @hadjustment: (allow-none): horizontal scroll adjustment, or %NULL
* @vadjustment: (allow-none): vertical scroll adjustment, or %NULL
*
* Creates a new #GtkLayout. Unless you have a specific adjustment
* you’d like the layout to use for scrolling, pass %NULL for
* @hadjustment and @vadjustment.
*
* Returns: a new #GtkLayout
**/
开发者ID:Distrotech,项目名称:gtk,代码行数:31,代码来源:gtklayout.c
示例5: reset_sidebar
};
enum
{
EVENT_ACTIVATED,
NUM_SIGNALS
};
static guint signals[NUM_SIGNALS] = { 0, };
static void reset_sidebar (GcalYearView *year_view);
static void gcal_view_interface_init (GcalViewIface *iface);
static void gcal_data_model_subscriber_interface_init (ECalDataModelSubscriberInterface *iface);
G_DEFINE_TYPE_WITH_CODE (GcalYearView, gcal_year_view, GTK_TYPE_BOX,
G_ADD_PRIVATE (GcalYearView)
G_IMPLEMENT_INTERFACE (GCAL_TYPE_VIEW, gcal_view_interface_init)
G_IMPLEMENT_INTERFACE (E_TYPE_CAL_DATA_MODEL_SUBSCRIBER,
gcal_data_model_subscriber_interface_init));
static void
update_date (GcalYearView *year_view,
icaltimetype *new_date)
{
GcalYearViewPrivate *priv = year_view->priv;
if (priv->date != NULL && priv->date->year != new_date->year && priv->start_selected_date->day != 0)
reset_sidebar (year_view);
if (priv->date != NULL)
g_free (priv->date);
开发者ID:C4jk,项目名称:gnome-calendar,代码行数:31,代码来源:gcal-year-view.c
示例6: gtk_recent_chooser_iface_init
GtkRecentChooser *current_chooser;
};
enum
{
PROP_0,
PROP_SHOW_NUMBERS
};
static void gtk_recent_chooser_iface_init (GtkRecentChooserIface *iface);
G_DEFINE_TYPE_WITH_CODE (GtkRecentAction,
gtk_recent_action,
GTK_TYPE_ACTION,
G_ADD_PRIVATE (GtkRecentAction)
G_IMPLEMENT_INTERFACE (GTK_TYPE_RECENT_CHOOSER,
gtk_recent_chooser_iface_init));
static gboolean
gtk_recent_action_set_current_uri (GtkRecentChooser *chooser,
const gchar *uri,
GError **error)
{
GtkRecentAction *action = GTK_RECENT_ACTION (chooser);
GtkRecentActionPrivate *priv = action->priv;
GSList *l;
for (l = priv->choosers; l; l = l->next)
{
GtkRecentChooser *recent_chooser = l->data;
开发者ID:3v1n0,项目名称:gtk,代码行数:31,代码来源:gtkrecentaction.c
示例7: formatter_iface_init
typedef struct
{
IdeLspClient *client;
} IdeLspFormatterPrivate;
enum {
PROP_0,
PROP_CLIENT,
N_PROPS
};
static void formatter_iface_init (IdeFormatterInterface *iface);
G_DEFINE_TYPE_WITH_CODE (IdeLspFormatter, ide_lsp_formatter, IDE_TYPE_OBJECT,
G_ADD_PRIVATE (IdeLspFormatter)
G_IMPLEMENT_INTERFACE (IDE_TYPE_FORMATTER, formatter_iface_init))
static GParamSpec *properties [N_PROPS];
/**
* ide_lsp_formatter_get_client:
* @self: a #IdeLspFormatter
*
* Gets the client to use for the formatter.
*
* Returns: (transfer none): An #IdeLspClient or %NULL.
*/
IdeLspClient *
ide_lsp_formatter_get_client (IdeLspFormatter *self)
{
开发者ID:GNOME,项目名称:gnome-builder,代码行数:30,代码来源:ide-lsp-formatter.c
示例8: INF_CHAT_BUFFER_PRIVATE
enum {
ADD_MESSAGE,
LAST_SIGNAL
};
#define INF_CHAT_BUFFER_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), INF_TYPE_CHAT_BUFFER, InfChatBufferPrivate))
static guint chat_buffer_signals[LAST_SIGNAL];
static void inf_chat_buffer_buffer_iface_init(InfBufferInterface* iface);
INF_DEFINE_ENUM_TYPE(InfChatBufferMessageType, inf_chat_buffer_message_type, inf_chat_buffer_message_type_values)
INF_DEFINE_FLAGS_TYPE(InfChatBufferMessageFlags, inf_chat_buffer_message_flags, inf_chat_buffer_message_flags_values)
G_DEFINE_BOXED_TYPE(InfChatBufferMessage, inf_chat_buffer_message, inf_chat_buffer_message_copy, inf_chat_buffer_message_free)
G_DEFINE_TYPE_WITH_CODE(InfChatBuffer, inf_chat_buffer, G_TYPE_OBJECT,
G_ADD_PRIVATE(InfChatBuffer)
G_IMPLEMENT_INTERFACE(INF_TYPE_BUFFER, inf_chat_buffer_buffer_iface_init))
/*
* Message handling functions
*/
/* Allocate a new InfChatMessage for the given time, possibly removing an
* old one if the buffer is full. Messages are ordered according to their time,
* if there are multiple messages with the time, the new message is inserted
* after the messages with the same time. */
/* The function returns NULL if the new message is older than all other
* messages in the buffer. Make sure to initalize all fields of the new
* message to sensible values after having called this function. */
static InfChatBufferMessage*
inf_chat_buffer_reserve_message(InfChatBuffer* buffer,
开发者ID:1uks,项目名称:libinfinity,代码行数:31,代码来源:inf-chat-buffer.c
示例9: g_tls_database_openssl_initable_interface_init
typedef struct
{
/*
* This class is protected by mutex because the default GTlsDatabase
* is a global singleton, accessible via the default GTlsBackend.
*/
GMutex mutex;
/* read-only after construct */
X509_STORE *store;
} GTlsDatabaseOpensslPrivate;
static void g_tls_database_openssl_initable_interface_init (GInitableIface *iface);
G_DEFINE_TYPE_WITH_CODE (GTlsDatabaseOpenssl, g_tls_database_openssl, G_TYPE_TLS_DATABASE,
G_ADD_PRIVATE (GTlsDatabaseOpenssl)
G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE,
g_tls_database_openssl_initable_interface_init))
static void
g_tls_database_openssl_finalize (GObject *object)
{
GTlsDatabaseOpenssl *self = G_TLS_DATABASE_OPENSSL (object);
GTlsDatabaseOpensslPrivate *priv;
priv = g_tls_database_openssl_get_instance_private (self);
if (priv->store != NULL)
X509_STORE_free (priv->store);
g_mutex_clear (&priv->mutex);
开发者ID:GNOME,项目名称:glib-networking,代码行数:31,代码来源:gtlsdatabase-openssl.c
示例10: cally_stage_deactivate_cb
gpointer data);
static void cally_stage_deactivate_cb (ClutterStage *stage,
gpointer data);
struct _CallyStagePrivate
{
/* NULL means that the stage will receive the focus */
ClutterActor *key_focus;
gboolean active;
};
G_DEFINE_TYPE_WITH_CODE (CallyStage,
cally_stage,
CALLY_TYPE_GROUP,
G_ADD_PRIVATE (CallyStage)
G_IMPLEMENT_INTERFACE (ATK_TYPE_WINDOW,
cally_stage_window_interface_init));
static void
cally_stage_class_init (CallyStageClass *klass)
{
AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
/* AtkObject */
class->initialize = cally_stage_real_initialize;
class->ref_state_set = cally_stage_ref_state_set;
}
static void
cally_stage_init (CallyStage *cally_stage)
开发者ID:GNOME,项目名称:mutter,代码行数:31,代码来源:cally-stage.c
示例11: photos_base_item_filterable_iface_init
PROP_ID,
};
enum
{
INFO_UPDATED,
LAST_SIGNAL
};
static guint signals[LAST_SIGNAL] = { 0 };
static void photos_base_item_filterable_iface_init (PhotosFilterableInterface *iface);
G_DEFINE_ABSTRACT_TYPE_WITH_CODE (PhotosBaseItem, photos_base_item, G_TYPE_OBJECT,
G_ADD_PRIVATE (PhotosBaseItem)
G_IMPLEMENT_INTERFACE (PHOTOS_TYPE_FILTERABLE,
photos_base_item_filterable_iface_init));
static GdkPixbuf *failed_icon;
static GdkPixbuf *thumbnailing_icon;
static GThreadPool *create_thumbnail_pool;
static void photos_base_item_populate_from_cursor (PhotosBaseItem *self, TrackerSparqlCursor *cursor);
static GdkPixbuf *
photos_base_item_create_placeholder_icon (const gchar *icon_name)
{
开发者ID:pranavk,项目名称:gnome-photos,代码行数:31,代码来源:photos-base-item.c
示例12: G_DEFINE_TYPE_WITH_CODE
static void gtk_message_dialog_buildable_interface_init (GtkBuildableIface *iface);
enum {
PROP_0,
PROP_MESSAGE_TYPE,
PROP_BUTTONS,
PROP_TEXT,
PROP_USE_MARKUP,
PROP_SECONDARY_TEXT,
PROP_SECONDARY_USE_MARKUP,
PROP_IMAGE,
PROP_MESSAGE_AREA
};
G_DEFINE_TYPE_WITH_CODE (GtkMessageDialog, gtk_message_dialog, GTK_TYPE_DIALOG,
G_ADD_PRIVATE (GtkMessageDialog)
G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE,
gtk_message_dialog_buildable_interface_init))
static GtkBuildableIface *parent_buildable_iface;
static void
gtk_message_dialog_buildable_interface_init (GtkBuildableIface *iface)
{
parent_buildable_iface = g_type_interface_peek_parent (iface);
iface->custom_tag_start = parent_buildable_iface->custom_tag_start;
iface->custom_finished = parent_buildable_iface->custom_finished;
}
static void
gtk_message_dialog_class_init (GtkMessageDialogClass *class)
开发者ID:rightpeter,项目名称:gtk-1,代码行数:31,代码来源:gtkmessagedialog.c
示例13: gtk_app_chooser_dialog_iface_init
GtkWidget *show_more_button;
GtkWidget *software_button;
gboolean show_more_clicked;
gboolean dismissed;
};
enum {
PROP_GFILE = 1,
PROP_CONTENT_TYPE,
PROP_HEADING
};
static void gtk_app_chooser_dialog_iface_init (GtkAppChooserIface *iface);
G_DEFINE_TYPE_WITH_CODE (GtkAppChooserDialog, gtk_app_chooser_dialog, GTK_TYPE_DIALOG,
G_ADD_PRIVATE (GtkAppChooserDialog)
G_IMPLEMENT_INTERFACE (GTK_TYPE_APP_CHOOSER,
gtk_app_chooser_dialog_iface_init));
static void
add_or_find_application (GtkAppChooserDialog *self)
{
GAppInfo *app;
app = gtk_app_chooser_get_app_info (GTK_APP_CHOOSER (self));
if (app)
{
/* we don't care about reporting errors here */
if (self->priv->content_type)
开发者ID:RavikumarTulugu,项目名称:antkorp,代码行数:31,代码来源:gtkappchooserdialog.c
示例14: G_DEFINE_TYPE_WITH_CODE
if (doc) g_object_unref(doc);
}
};
enum
{
PROP_0,
// GtkScrollable interface:
PROP_HADJUSTMENT,
PROP_VADJUSTMENT,
PROP_HSCROLL_POLICY,
PROP_VSCROLL_POLICY,
};
G_DEFINE_TYPE_WITH_CODE(CainteoirDocumentView, cainteoir_document_view, GTK_TYPE_BIN,
G_ADD_PRIVATE(CainteoirDocumentView)
G_IMPLEMENT_INTERFACE(GTK_TYPE_SCROLLABLE, nullptr))
#define CAINTEOIR_DOCUMENT_VIEW_PRIVATE(object) \
((CainteoirDocumentViewPrivate *)cainteoir_document_view_get_instance_private(CAINTEOIR_DOCUMENT_VIEW(object)))
GXT_DEFINE_TYPE_CONSTRUCTION(CainteoirDocumentView, cainteoir_document_view, CAINTEOIR_DOCUMENT_VIEW)
static void
cainteoir_document_view_set_property(GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
{
CainteoirDocumentViewPrivate *priv = CAINTEOIR_DOCUMENT_VIEW_PRIVATE(object);
GtkScrollable *scroll = GTK_SCROLLABLE(priv->text_view);
switch (prop_id)
{
default:
开发者ID:happytcj,项目名称:cainteoir-gtk,代码行数:31,代码来源:cainteoir_document_view.cpp
示例15: G_DEFINE_TYPE_WITH_CODE
Gssim *ssim;
GList *converters;
GstVideoInfo out_info;
SSimConverterInfo outconverter_info;
gfloat min_avg_similarity;
gfloat min_lowest_similarity;
GHashTable *ref_frames_cache;
};
G_DEFINE_TYPE_WITH_CODE (GstValidateSsim, gst_validate_ssim,
GST_TYPE_OBJECT, G_ADD_PRIVATE (GstValidateSsim)
G_IMPLEMENT_INTERFACE (GST_TYPE_VALIDATE_REPORTER, NULL));
static void
ssim_convert_info_free (SSimConverterInfo * info)
{
if (info->converter)
gst_video_converter_free (info->converter);
g_slice_free (SSimConverterInfo, info);
}
static gboolean
gst_validate_ssim_convert (GstValidateSsim * self, SSimConverterInfo * info,
GstVideoFrame * frame, GstVideoFrame * converted_frame)
{
开发者ID:thiblahute,项目名称:gst-devtools,代码行数:30,代码来源:gstvalidatessim.c
示例16: G_DEFINE_TYPE_WITH_CODE
static void gtk_viewport_get_preferred_width (GtkWidget *widget,
gint *minimum_size,
gint *natural_size);
static void gtk_viewport_get_preferred_height (GtkWidget *widget,
gint *minimum_size,
gint *natural_size);
static void viewport_set_adjustment (GtkViewport *viewport,
GtkOrientation orientation,
GtkAdjustment *adjustment);
static void gtk_viewport_queue_draw_region (GtkWidget *widget,
const cairo_region_t *region);
G_DEFINE_TYPE_WITH_CODE (GtkViewport, gtk_viewport, GTK_TYPE_BIN,
G_ADD_PRIVATE (GtkViewport)
G_IMPLEMENT_INTERFACE (GTK_TYPE_SCROLLABLE, NULL))
static void
gtk_viewport_class_init (GtkViewportClass *class)
{
GObjectClass *gobject_class;
GtkWidgetClass *widget_class;
GtkContainerClass *container_class;
gobject_class = G_OBJECT_CLASS (class);
widget_class = (GtkWidgetClass*) class;
container_class = (GtkContainerClass*) class;
gobject_class->set_property = gtk_viewport_set_property;
gobject_class->get_property = gtk_viewport_get_property;
开发者ID:3dfxmadscientist,项目名称:gtk,代码行数:30,代码来源:gtkviewport.c
示例17: provider_iface_init
#include "ide-lsp-completion-provider.h"
#include "ide-lsp-completion-item.h"
#include "ide-lsp-completion-results.h"
#include "ide-lsp-util.h"
typedef struct
{
IdeLspClient *client;
gchar *word;
} IdeLspCompletionProviderPrivate;
static void provider_iface_init (IdeCompletionProviderInterface *iface);
G_DEFINE_ABSTRACT_TYPE_WITH_CODE (IdeLspCompletionProvider, ide_lsp_completion_provider, IDE_TYPE_OBJECT,
G_ADD_PRIVATE (IdeLspCompletionProvider)
G_IMPLEMENT_INTERFACE (IDE_TYPE_COMPLETION_PROVIDER, provider_iface_init))
enum {
PROP_0,
PROP_CLIENT,
N_PROPS
};
static GParamSpec *properties [N_PROPS];
static void
ide_lsp_completion_provider_finalize (GObject *object)
{
IdeLspCompletionProvider *self = (IdeLspCompletionProvider *)object;
IdeLspCompletionProviderPrivate *priv = ide_lsp_completion_provider_get_instance_private (self);
开发者ID:GNOME,项目名称:gnome-builder,代码行数:30,代码来源:ide-lsp-completion-provider.c
示例18: G_DEFINE_TYPE_WITH_CODE
gboolean keys_exported;
GMutex mutex;
GCond condition;
gpointer bio_buffer;
gint bio_buffer_len;
gint bio_buffer_offset;
GClosure *send_closure;
gboolean timeout_pending;
GThreadPool *thread_pool;
};
G_DEFINE_TYPE_WITH_CODE (GstDtlsConnection, gst_dtls_connection, G_TYPE_OBJECT,
G_ADD_PRIVATE (GstDtlsConnection)
GST_DEBUG_CATEGORY_INIT (gst_dtls_connection_debug, "dtlsconnection", 0,
"DTLS Connection"));
static void gst_dtls_connection_finalize (GObject * gobject);
static void gst_dtls_connection_set_property (GObject *, guint prop_id,
const GValue *, GParamSpec *);
static void log_state (GstDtlsConnection *, const gchar * str);
static void export_srtp_keys (GstDtlsConnection *);
static void openssl_poll (GstDtlsConnection *);
static int openssl_verify_callback (int preverify_ok,
X509_STORE_CTX * x509_ctx);
static BIO_METHOD *BIO_s_gst_dtls_connection (void);
static int bio_method_write (BIO *, const char *data, int size);
开发者ID:MaZderMind,项目名称:gst-plugins-bad,代码行数:31,代码来源:gstdtlsconnection.c
示例19: G_DEFINE_TYPE_WITH_CODE
if (data) g_object_unref(data);
}
};
enum
{
PROP_0,
// GtkScrollable interface:
PROP_HADJUSTMENT,
PROP_VADJUSTMENT,
PROP_HSCROLL_POLICY,
PROP_VSCROLL_POLICY,
};
G_DEFINE_TYPE_WITH_CODE(CainteoirWaveformView, cainteoir_waveform_view, GTK_TYPE_DRAWING_AREA,
G_ADD_PRIVATE(CainteoirWaveformView)
G_IMPLEMENT_INTERFACE(GTK_TYPE_SCROLLABLE, nullptr))
#define CAINTEOIR_WAVEFORM_VIEW_PRIVATE(object) \
((CainteoirWaveformViewPrivate *)cainteoir_waveform_view_get_instance_private(CAINTEOIR_WAVEFORM_VIEW(object)))
GXT_DEFINE_TYPE_CONSTRUCTION(CainteoirWaveformView, cainteoir_waveform_view, CAINTEOIR_WAVEFORM_VIEW)
static void
cainteoir_waveform_view_value_changed(GtkAdjustment *adjustment, CainteoirWaveformView *view)
{
CainteoirWaveformViewPrivate *priv = CAINTEOIR_WAVEFORM_VIEW_PRIVATE(view);
if (adjustment == priv->hadjustment)
{
uint16_t frequency = cainteoir_audio_data_s16_get_frequency(priv->data);
uint32_t sample_count = cainteoir_audio_data_s16_get_sample_count(priv->data);
开发者ID:happytcj,项目名称:cainteoir-gtk,代码行数:31,代码来源:cainteoir_waveform_view.cpp
示例20: gtk_level_bar_set_value_internal
gdouble min_value;
gdouble max_value;
gdouble cur_value;
GList *offsets;
guint inverted : 1;
};
static void gtk_level_bar_set_value_internal (GtkLevelBar *self,
gdouble value);
static void gtk_level_bar_buildable_init (GtkBuildableIface *iface);
G_DEFINE_TYPE_WITH_CODE (GtkLevelBar, gtk_level_bar, GTK_TYPE_WIDGET,
G_ADD_PRIVATE (GtkLevelBar)
G_IMPLEMENT_INTERFACE (GTK_TYPE_ORIENTABLE, NULL)
G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE,
gtk_level_bar_buildable_init))
static GtkLevelBarOffset *
gtk_level_bar_offset_new (const gchar *name,
gdouble value)
{
GtkLevelBarOffset *offset = g_slice_new0 (GtkLevelBarOffset);
offset->name = g_strdup (name);
offset->value = value;
return offset;
}
开发者ID:3dfxmadscientist,项目名称:gtk,代码行数:31,代码来源:gtklevelbar.c
注:本文中的G_ADD_PRIVATE函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论