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

C++ G_TYPE_INSTANCE_GET_PRIVATE函数代码示例

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

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



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

示例1: gcal_editable_init

static void gcal_editable_init (GcalEditable *self)
{
    self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
                 GCAL_TYPE_EDITABLE,
                 GcalEditablePrivate);
}
开发者ID:gcampax,项目名称:gnome-calendar,代码行数:6,代码来源:gcal-editable.c


示例2: gth_reorder_task_init

static void
gth_reorder_task_init (GthReorderTask *self)
{
	self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GTH_TYPE_REORDER_TASK, GthReorderTaskPrivate);
}
开发者ID:Peliadia,项目名称:gthumb,代码行数:5,代码来源:gth-reorder-task.c


示例3: cc_privacy_panel_init

static void
cc_privacy_panel_init (CcPrivacyPanel *self)
{
  GError    *error;
  GtkWidget *widget;
  GtkWidget *frame;
  guint res;

  self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, CC_TYPE_PRIVACY_PANEL, CcPrivacyPanelPrivate);
  g_resources_register (cc_privacy_get_resource ());

  self->priv->builder = gtk_builder_new ();

  error = NULL;
  res = gtk_builder_add_from_resource (self->priv->builder,
                                       "/org/gnome/control-center/privacy/privacy.ui",
                                       &error);

  if (res == 0)
    {
      g_warning ("Could not load interface file: %s",
                 (error != NULL) ? error->message : "unknown error");
      g_clear_error (&error);
      return;
    }

  self->priv->recent_dialog = GTK_WIDGET (gtk_builder_get_object (self->priv->builder, "recent_dialog"));
  self->priv->screen_lock_dialog = GTK_WIDGET (gtk_builder_get_object (self->priv->builder, "screen_lock_dialog"));
  self->priv->trash_dialog = GTK_WIDGET (gtk_builder_get_object (self->priv->builder, "trash_dialog"));
  self->priv->software_dialog = GTK_WIDGET (gtk_builder_get_object (self->priv->builder, "software_dialog"));
  self->priv->abrt_dialog = GTK_WIDGET (gtk_builder_get_object (self->priv->builder, "abrt_dialog"));

  frame = WID ("frame");
  widget = gtk_list_box_new ();
  gtk_list_box_set_selection_mode (GTK_LIST_BOX (widget), GTK_SELECTION_NONE);
  gtk_container_add (GTK_CONTAINER (frame), widget);
  self->priv->list_box = widget;
  gtk_widget_show (widget);

  g_signal_connect_swapped (widget, "row-activated",
                            G_CALLBACK (activate_row), self);

  gtk_list_box_set_header_func (GTK_LIST_BOX (widget),
                                cc_list_box_update_header_func,
                                NULL, NULL);

  self->priv->lockdown_settings = g_settings_new ("org.gnome.desktop.lockdown");
  self->priv->lock_settings = g_settings_new ("org.gnome.desktop.screensaver");
  self->priv->privacy_settings = g_settings_new ("org.gnome.desktop.privacy");
  self->priv->notification_settings = g_settings_new ("org.gnome.desktop.notifications");
  self->priv->location_settings = g_settings_new ("org.gnome.system.location");

  add_screen_lock (self);
  add_usage_history (self);
  add_trash_temp (self);
  add_software (self);
  add_abrt (self);

  g_signal_connect (self->priv->lockdown_settings, "changed",
                    G_CALLBACK (on_lockdown_settings_changed), self);
  update_lock_screen_sensitivity (self);

  widget = WID ("location_services_switch");
  gtk_switch_set_active (GTK_SWITCH (widget),
                         g_settings_get_boolean (self->priv->location_settings,
                                                 LOCATION_ENABLED));
  g_settings_bind (self->priv->location_settings,
                   LOCATION_ENABLED,
                   widget, "active",
                   G_SETTINGS_BIND_DEFAULT);

  widget = WID ("privacy_vbox");
  gtk_container_add (GTK_CONTAINER (self), widget);
}
开发者ID:Amphiboly,项目名称:gnome-control-center,代码行数:74,代码来源:cc-privacy-panel.c


示例4: is_sensor_dialog_init

static void
is_sensor_dialog_init(IsSensorDialog *self)
{
	IsSensorDialogPrivate *priv;
	GtkWidget *label, *low_label, *high_label, *grid;

	self->priv = priv =
		G_TYPE_INSTANCE_GET_PRIVATE(self, IS_TYPE_SENSOR_DIALOG,
					    IsSensorDialogPrivate);

	gtk_window_set_title(GTK_WINDOW(self), _(PACKAGE_NAME " Sensor Properties"));
	gtk_window_set_default_size(GTK_WINDOW(self), 250, 0);

	gtk_dialog_add_button(GTK_DIALOG(self),
			      GTK_STOCK_CLOSE, GTK_RESPONSE_ACCEPT);

	/* pack content into box */
	grid = gtk_grid_new();
	gtk_grid_set_column_spacing(GTK_GRID(grid), 6);
	gtk_grid_set_row_spacing(GTK_GRID(grid), 6);
	gtk_container_set_border_width(GTK_CONTAINER(grid), 6);

	priv->path_label = gtk_label_new(NULL);
	gtk_misc_set_alignment(GTK_MISC(priv->path_label), 0.0, 0.5);
	gtk_grid_attach(GTK_GRID(grid), priv->path_label,
			0, 0,
			4, 1);

	label = gtk_label_new(_("Label"));
	gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5);
	gtk_grid_attach(GTK_GRID(grid), label,
			0, 1,
			1, 1);
	priv->label_entry = gtk_entry_new();
	gtk_grid_attach(GTK_GRID(grid), priv->label_entry,
			1, 1,
			3, 1);
	label = gtk_label_new(_("Alarm"));
	gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5);
	gtk_grid_attach(GTK_GRID(grid), label,
			0, 2,
			1, 1);
	priv->alarm_mode_combo_box = gtk_combo_box_text_new();
	gtk_combo_box_text_insert_text(GTK_COMBO_BOX_TEXT(priv->alarm_mode_combo_box),
				       IS_SENSOR_ALARM_MODE_DISABLED,
				       _("Disabled"));
	gtk_combo_box_text_insert_text(GTK_COMBO_BOX_TEXT(priv->alarm_mode_combo_box),
				       IS_SENSOR_ALARM_MODE_LOW,
				       _("Below"));
	gtk_combo_box_text_insert_text(GTK_COMBO_BOX_TEXT(priv->alarm_mode_combo_box),
				       IS_SENSOR_ALARM_MODE_HIGH,
				       _("Above"));
	gtk_widget_set_sensitive(priv->alarm_mode_combo_box, FALSE);
	gtk_grid_attach(GTK_GRID(grid), priv->alarm_mode_combo_box,
			1, 2,
			1, 1);
	priv->alarm_value_spin_button = gtk_spin_button_new_with_range(-MAX_VALUE,
								       MAX_VALUE,
								       1.0f);
	gtk_widget_set_sensitive(priv->alarm_value_spin_button, FALSE);
	gtk_grid_attach(GTK_GRID(grid), priv->alarm_value_spin_button,
			2, 2,
			1, 1);
	priv->units_label = gtk_label_new(NULL);
	gtk_misc_set_alignment(GTK_MISC(priv->units_label), 0.0, 0.5);
	gtk_grid_attach(GTK_GRID(grid), priv->units_label,
			3, 2,
			1, 1);

	low_label = gtk_label_new(_("Low value"));
	gtk_misc_set_alignment(GTK_MISC(low_label), 0.0, 0.5);
	gtk_grid_attach(GTK_GRID(grid), low_label,
			0, 3,
			1, 1);

	priv->low_value = gtk_spin_button_new_with_range(-MAX_VALUE,
							 MAX_VALUE,
							 1.0f);
	gtk_grid_attach(GTK_GRID(grid), priv->low_value,
			1, 3,
			1, 1);

	priv->low_units_label = gtk_label_new(NULL);
	gtk_misc_set_alignment(GTK_MISC(priv->low_units_label), 0.0, 0.5);
	gtk_grid_attach(GTK_GRID(grid), priv->low_units_label,
			2, 3,
			1, 1);

	high_label = gtk_label_new(_("High value"));
	gtk_misc_set_alignment(GTK_MISC(high_label), 0.0, 0.5);
	gtk_grid_attach(GTK_GRID(grid), high_label,
			0, 4,
			1, 1);

	priv->high_value = gtk_spin_button_new_with_range(-MAX_VALUE,
							  MAX_VALUE,
							  1.0f);
	gtk_grid_attach(GTK_GRID(grid), priv->high_value,
			1, 4,
			1, 1);
//.........这里部分代码省略.........
开发者ID:VittGam,项目名称:indicator-sensors,代码行数:101,代码来源:is-sensor-dialog.c


示例5: gst_device_init

static void
gst_device_init (GstDevice * device)
{
  device->priv = G_TYPE_INSTANCE_GET_PRIVATE (device, GST_TYPE_DEVICE,
      GstDevicePrivate);
}
开发者ID:BigBrother-International,项目名称:gstreamer,代码行数:6,代码来源:gstdevice.c


示例6: ges_effect_init

static void
ges_effect_init (GESEffect * self)
{
  self->priv =
      G_TYPE_INSTANCE_GET_PRIVATE (self, GES_TYPE_EFFECT, GESEffectPrivate);
}
开发者ID:lubosz,项目名称:gst-editing-services,代码行数:6,代码来源:ges-effect.c


示例7: qq_chatwindow_init

static void qq_chatwindow_init(QQChatWindow *win)
{
    QQChatWindowPriv *priv = G_TYPE_INSTANCE_GET_PRIVATE(win
                                        , qq_chatwindow_get_type()
                                        , QQChatWindowPriv);
    gchar buf[500];
    priv -> body_vbox = gtk_vbox_new(FALSE, 0);

    GtkWidget *header_hbox = gtk_hbox_new(FALSE, 0);
    GtkWidget *vbox = gtk_vbox_new(FALSE, 0);

    QQBuddy *bdy = qq_info_lookup_buddy_by_uin(info, priv -> uin);
    GdkPixbuf *pb = NULL;
    g_snprintf(buf, 500, IMGDIR"%s", "avatar.gif");
    pb = gdk_pixbuf_new_from_file(buf, NULL);
    gtk_window_set_icon(GTK_WINDOW(win), pb);
    g_object_unref(pb);
    g_snprintf(buf, 500, "Talking with %s", bdy == NULL ? priv -> uin
                                                    : bdy -> nick -> str);
    gtk_window_set_title(GTK_WINDOW(win), buf);

    //create header
    g_snprintf(buf, 500, IMGDIR"%s", "avatar.gif");
    pb= gdk_pixbuf_new_from_file_at_size(buf, 35, 35, NULL);
    priv -> faceimage = gtk_image_new_from_pixbuf(pb);
    g_object_unref(pb);
    priv -> name_label = gtk_label_new("");
    priv -> lnick_label = gtk_label_new("");
    gtk_box_pack_start(GTK_BOX(header_hbox), priv -> faceimage
                                        , FALSE, FALSE, 5);
    gtk_box_pack_start(GTK_BOX(vbox), priv -> name_label, FALSE, FALSE, 0);
    gtk_box_pack_start(GTK_BOX(vbox), priv -> lnick_label, FALSE, FALSE, 0);
    gtk_box_pack_start(GTK_BOX(header_hbox), vbox, FALSE, FALSE, 5);
    gtk_box_pack_start(GTK_BOX(priv -> body_vbox), header_hbox
                                        , FALSE, FALSE, 5);

    // message text view
    priv -> chat_widget = qq_chatwidget_new();
    gtk_box_pack_start(GTK_BOX(priv -> body_vbox), priv -> chat_widget
                                                , TRUE, TRUE, 0);

    // buttons
    GtkWidget *buttonbox = gtk_hbutton_box_new();
    gtk_button_box_set_layout(GTK_BUTTON_BOX(buttonbox), GTK_BUTTONBOX_END);
    gtk_box_set_spacing(GTK_BOX(buttonbox), 5);
    priv -> close_btn = gtk_button_new_with_label("Close");
    g_signal_connect(G_OBJECT(priv -> close_btn), "clicked",
                             G_CALLBACK(qq_chatwindow_on_close_clicked), win);
    priv -> send_btn = gtk_button_new_with_label("Send");
    g_signal_connect(G_OBJECT(priv -> send_btn), "clicked",
                             G_CALLBACK(qq_chatwindow_on_send_clicked), win);
    gtk_container_add(GTK_CONTAINER(buttonbox), priv -> close_btn);
    gtk_container_add(GTK_CONTAINER(buttonbox), priv -> send_btn);
    gtk_box_pack_start(GTK_BOX(priv -> body_vbox), buttonbox, FALSE, FALSE, 3);

    GtkWidget *w = GTK_WIDGET(win);
    gtk_window_resize(GTK_WINDOW(w), 500, 450);
    gtk_container_add(GTK_CONTAINER(win), priv -> body_vbox);

    gtk_widget_show_all(priv -> body_vbox);
    gtk_widget_grab_focus(qq_chatwidget_get_input_textview(
                                priv -> chat_widget));

    g_signal_connect(G_OBJECT(win), "delete-event"
                                , G_CALLBACK(qq_chatwindow_delete_event)
                                , priv);
    g_signal_connect(G_OBJECT(win), "focus-in-event"
                                , G_CALLBACK(qq_chatwindow_focus_in_event)
                                , priv);
    g_signal_connect(G_OBJECT(win), "key-press-event"
                            , G_CALLBACK(qq_chatwindow_key_press), priv);

    g_signal_connect(G_OBJECT(qq_chatwidget_get_input_textview(
                                                priv -> chat_widget))
                            , "key-press-event"
                            , G_CALLBACK(qq_input_textview_key_press), win);
}
开发者ID:Coding-years,项目名称:gtkqq,代码行数:77,代码来源:chatwindow.c


示例8: qq_chatwindow_setter

/*
 * The setter.
 */
static void qq_chatwindow_setter(GObject *object, guint property_id,
                                 const GValue *value, GParamSpec *pspec)
{
    if(object == NULL || value == NULL || property_id < 0){
            return;
    }
    QQChatWindowPriv *priv = G_TYPE_INSTANCE_GET_PRIVATE(
                                    object, qq_chatwindow_get_type()
                                    , QQChatWindowPriv);
    gchar buf[500];
    GdkPixbuf *pb = NULL;
    switch (property_id)
    {
    case QQ_CHATWINDOW_PROPERTY_UIN:
        g_stpcpy(priv -> uin, g_value_get_string(value));
        break;
    default:
        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec);
        break;
    }

    QQBuddy *bdy = qq_info_lookup_buddy_by_uin(info, priv -> uin);
    gchar *name = priv -> uin;
    if(bdy == NULL){
        return;
    }
    // set lnick
    g_snprintf(buf, 500, "<b>%s</b>", bdy -> lnick -> str);
    gtk_label_set_markup(GTK_LABEL(priv -> lnick_label), buf);
    // set face image
	g_snprintf(buf, 500, "%s/%s", QQ_FACEDIR, bdy -> qqnumber -> str);
    pb= gdk_pixbuf_new_from_file_at_size(buf, 35, 35, NULL);
    if(pb == NULL){
        pb= gdk_pixbuf_new_from_file_at_size(IMGDIR"/avatar.gif"
                                        , 35, 35, NULL);
    }
    gtk_image_set_from_pixbuf(GTK_IMAGE(priv -> faceimage), pb);
    // window icon
    gtk_window_set_icon(GTK_WINDOW(object), pb);
    g_object_unref(pb);

    if(bdy -> markname == NULL || bdy -> markname -> len <= 0){
        name = bdy -> nick -> str;
    }else{
        name = bdy -> markname -> str;
    }
    // set status and name
    if(g_strcmp0("online", bdy -> status -> str) == 0
                    || g_strcmp0("away", bdy -> status -> str) == 0
                    || g_strcmp0("busy", bdy -> status -> str) == 0
                    || g_strcmp0("silent", bdy -> status -> str) == 0
                    || g_strcmp0("callme", bdy -> status -> str) == 0){
        gtk_widget_set_sensitive(priv -> faceimage, TRUE);
        g_snprintf(buf, 500, "<b>%s</b><span color='blue'>[%s]</span>"
                                            , name
                                            , bdy -> status -> str);
    }else{
        gtk_widget_set_sensitive(priv -> faceimage, FALSE);
        g_snprintf(buf, 500, "<b>%s</b>", name);
    }
    gtk_label_set_markup(GTK_LABEL(priv -> name_label), buf);

    // window title
    g_snprintf(buf, 500, "Talking with %s", name);
    gtk_window_set_title(GTK_WINDOW(object), buf);
}
开发者ID:Coding-years,项目名称:gtkqq,代码行数:69,代码来源:chatwindow.c


示例9: gkm_secret_key_init

static void
gkm_secret_key_init (GkmSecretKey *self)
{
	self->pv = G_TYPE_INSTANCE_GET_PRIVATE (self, GKM_TYPE_SECRET_KEY, GkmSecretKeyPrivate);
}
开发者ID:fatman2021,项目名称:mate-keyring,代码行数:5,代码来源:gkm-secret-key.c


示例10: facq_pipeline_monitor_init

static void facq_pipeline_monitor_init(FacqPipelineMonitor *mon)
{
	mon->priv = G_TYPE_INSTANCE_GET_PRIVATE(mon,FACQ_TYPE_PIPELINE_MONITOR,FacqPipelineMonitorPrivate);
	mon->priv->q = NULL;
	mon->priv->source_id = 0;
}
开发者ID:vquicksilver,项目名称:freeacq,代码行数:6,代码来源:facqpipelinemonitor.c


示例11: bastile_pgp_key_init

static void
bastile_pgp_key_init (BastilePgpKey *self)
{
	self->pv = G_TYPE_INSTANCE_GET_PRIVATE (self, BASTILE_TYPE_PGP_KEY, BastilePgpKeyPrivate);
}
开发者ID:gfunkmonk2,项目名称:bastile,代码行数:5,代码来源:bastile-pgp-key.c


示例12: axing_resolver_init

static void
axing_resolver_init (AxingResolver *resolver)
{
    resolver->priv = G_TYPE_INSTANCE_GET_PRIVATE (resolver, AXING_TYPE_RESOLVER,
                                                  AxingResolverPrivate);
}
开发者ID:shaunix,项目名称:axing,代码行数:6,代码来源:axing-resolver.c


示例13: math_preferences_init

static void
math_preferences_init(MathPreferencesDialog *dialog)
{
    dialog->priv = G_TYPE_INSTANCE_GET_PRIVATE(dialog, math_preferences_get_type(), MathPreferencesDialogPrivate);
}
开发者ID:ingeniumed,项目名称:gcalctool,代码行数:5,代码来源:math-preferences.c


示例14: gm_audio_profiles_edit_init

/* create a dialog widget from scratch */
static void
gm_audio_profiles_edit_init (GMAudioProfilesEdit *dialog)
{
  GtkDialog *gdialog = GTK_DIALOG (dialog);
  GtkWidget *vbox;
  GtkWidget *label;
  GtkWidget *sw;
  GtkWidget *hbox;
  GtkWidget *bbox;
  GtkWidget *button;
  GtkTreeSelection *selection;

  /*
  dialog =
    gtk_dialog_new_with_buttons (_("Edit Profiles"),
                                 NULL,
                                 GTK_DIALOG_DESTROY_WITH_PARENT,
                                 GTK_STOCK_HELP,
                                 GTK_RESPONSE_HELP,
                                 GTK_STOCK_CLOSE,
                                 GTK_RESPONSE_ACCEPT,
                                 NULL);
  */
                                 // FIXME: GTK_DIALOG_DESTROY_WITH_PARENT,
  dialog->priv = G_TYPE_INSTANCE_GET_PRIVATE (dialog, GM_AUDIO_TYPE_PROFILES_EDIT, GMAudioProfilesEditPrivate);

  gtk_window_set_title (GTK_WINDOW (dialog), _("Edit MATE Audio Profiles"));
  gtk_window_set_default_size (GTK_WINDOW (dialog), 320, 240);
  gtk_dialog_add_buttons (GTK_DIALOG (dialog),
                                 GTK_STOCK_HELP,
                                 GTK_RESPONSE_HELP,
                                 GTK_STOCK_CLOSE,
                                 GTK_RESPONSE_ACCEPT,
                                 NULL);

  gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
  gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (gdialog)), 2); /* 2 * 5 + 2 = 12 */
  gtk_container_set_border_width (GTK_CONTAINER (gtk_dialog_get_action_area (gdialog)), 5);
  gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_action_area (gdialog)), 6);

  g_signal_connect (GTK_DIALOG (dialog),
                    "response",
                    G_CALLBACK (on_gm_audio_profiles_edit_response),
                    NULL);

  g_signal_connect (G_OBJECT (dialog),
                    "destroy",
                    G_CALLBACK (on_gm_audio_profiles_edit_destroy),
                    NULL);

  vbox = gtk_vbox_new (FALSE, 6);
  gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
  gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (gdialog)),
                      vbox, TRUE, TRUE, 0);

  /* FIXME
  hbox = gtk_hbox_new (FALSE, PADDING);
  gtk_box_pack_end (GTK_BOX (vbox),
                    hbox, FALSE, FALSE, 0);

  app->manage_profiles_default_menu = profile_optionmenu_new ();
  g_signal_connect (G_OBJECT (app->manage_profiles_default_menu),
                    "changed", G_CALLBACK (default_menu_changed),
                    app);

  gtk_box_pack_start (GTK_BOX (hbox),
                      label, TRUE, TRUE, 0);

  gtk_box_pack_end (GTK_BOX (hbox),
                    app->manage_profiles_default_menu, FALSE, FALSE, 0);
  */

  hbox = gtk_hbox_new (FALSE, 6);

  label = gtk_label_new_with_mnemonic (_("_Profiles:"));
  gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
  gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);

  gtk_box_pack_start (GTK_BOX (vbox),
                      hbox, TRUE, TRUE, 0);

  dialog->priv->manage_profiles_list = create_profile_list ();

  g_signal_connect (G_OBJECT (dialog->priv->manage_profiles_list),
                    "row_activated",
                    G_CALLBACK (profile_activated_callback),
                    NULL);

  sw = gtk_scrolled_window_new (NULL, NULL);
  /* FIXME
  terminal_util_set_labelled_by (GTK_WIDGET (dialog->priv->manage_profiles_list),
                                 GTK_LABEL (label));
  */

  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
                                  GTK_POLICY_AUTOMATIC,
                                  GTK_POLICY_AUTOMATIC);
  gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw),
                                       GTK_SHADOW_IN);
//.........这里部分代码省略.........
开发者ID:benpicco,项目名称:libmate-media-profiles,代码行数:101,代码来源:audio-profiles-edit.c


示例15: session_config_init

static void
session_config_init (SessionConfig *config)
{
    config->priv = G_TYPE_INSTANCE_GET_PRIVATE (config, SESSION_CONFIG_TYPE, SessionConfigPrivate);
}
开发者ID:davvid,项目名称:lightdm,代码行数:5,代码来源:session-config.c


示例16: gcr_tree_selector_init

static void
gcr_tree_selector_init (GcrTreeSelector *self)
{
	self->pv = G_TYPE_INSTANCE_GET_PRIVATE (self, GCR_TYPE_TREE_SELECTOR, GcrTreeSelectorPrivate);
}
开发者ID:Distrotech,项目名称:gcr,代码行数:5,代码来源:gcr-tree-selector.c


示例17: gth_location_chooser_init

static void
gth_location_chooser_init (GthLocationChooser *self)
{
	GtkCellRenderer *renderer;

	gtk_widget_set_can_focus (GTK_WIDGET (self), TRUE);
	gtk_orientable_set_orientation (GTK_ORIENTABLE (self), GTK_ORIENTATION_HORIZONTAL);

	self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GTH_TYPE_LOCATION_CHOOSER, GthLocationChooserPrivate);
	self->priv->entry_points_changed_id = 0;
	self->priv->arrow = NULL;
	self->priv->show_entry_points = TRUE;
	self->priv->relief = GTK_RELIEF_NORMAL;

	self->priv->model = gtk_tree_store_new (N_COLUMNS,
						G_TYPE_ICON,
						G_TYPE_STRING,
						G_TYPE_STRING,
						G_TYPE_INT,
						PANGO_TYPE_ELLIPSIZE_MODE);
	self->priv->combo = gtk_combo_box_new_with_model (GTK_TREE_MODEL (self->priv->model));
	g_object_unref (self->priv->model);
	g_signal_connect (self->priv->combo,
			  "changed",
			  G_CALLBACK (combo_changed_cb),
			  self);
	gtk_combo_box_set_row_separator_func (GTK_COMBO_BOX (self->priv->combo),
					      row_separator_func,
					      self,
					      NULL);
	gtk_widget_set_size_request (self->priv->combo, MIN_WIDTH, -1);

	/* icon column */

	renderer = gtk_cell_renderer_pixbuf_new ();
	g_object_set (renderer,
		      "follow-state", TRUE,
		      NULL);
	gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (self->priv->combo),
				    renderer,
				    FALSE);
	gtk_cell_layout_set_attributes  (GTK_CELL_LAYOUT (self->priv->combo),
					 renderer,
					 "gicon", ICON_COLUMN,
					 NULL);

	/* path column */

	renderer = gtk_cell_renderer_text_new ();
	gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (self->priv->combo),
				    renderer,
				    TRUE);
	gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (self->priv->combo),
					renderer,
					"text", NAME_COLUMN,
					"ellipsize", ELLIPSIZE_COLUMN,
					NULL);

	/**/

	gtk_widget_show (self->priv->combo);
	gtk_box_pack_start (GTK_BOX (self), self->priv->combo, TRUE, TRUE, 0);
}
开发者ID:lplade,项目名称:gthumb,代码行数:63,代码来源:gth-location-chooser.c


示例18: rb_button_bar_init

static void
rb_button_bar_init (RBButtonBar *bar)
{
	bar->priv = G_TYPE_INSTANCE_GET_PRIVATE (bar, RB_TYPE_BUTTON_BAR, RBButtonBarPrivate);
}
开发者ID:bhushan23,项目名称:rhythmbox,代码行数:5,代码来源:rb-button-bar.c


示例19: arv_chunk_parser_init

static void
arv_chunk_parser_init (ArvChunkParser *chunk_parser)
{
	chunk_parser->priv = G_TYPE_INSTANCE_GET_PRIVATE (chunk_parser, ARV_TYPE_CHUNK_PARSER, ArvChunkParserPrivate);
}
开发者ID:Amomum,项目名称:aravis,代码行数:5,代码来源:arvchunkparser.c


示例20: vinagre_ssh_connection_init

static void
vinagre_ssh_connection_init (VinagreSshConnection *conn)
{
  conn->priv = G_TYPE_INSTANCE_GET_PRIVATE (conn, VINAGRE_TYPE_SSH_CONNECTION, VinagreSshConnectionPrivate);
}
开发者ID:GNOME,项目名称:vinagre,代码行数:5,代码来源:vinagre-ssh-connection.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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