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

C++ G_APPLICATION_CLASS函数代码示例

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

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



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

示例1: cem_application_class_init

static void
cem_application_class_init(CemApplicationClass *klass)
{
  G_APPLICATION_CLASS(klass)->startup = cem_application_startup;
  G_APPLICATION_CLASS(klass)->activate = cem_application_activate;
  G_APPLICATION_CLASS(klass)->open = cem_application_open;
}
开发者ID:bandari-sciences,项目名称:cem,代码行数:7,代码来源:bs_gui_application.c


示例2: oregano_class_init

static void
oregano_class_init (OreganoClass *klass)
{ 
	G_APPLICATION_CLASS (klass)->activate = oregano_activate;
	G_APPLICATION_CLASS (klass)->open = oregano_open;
	G_OBJECT_CLASS (klass)->finalize = oregano_finalize;
}
开发者ID:manasdas17,项目名称:oregano-1,代码行数:7,代码来源:oregano.c


示例3: main

int
main (int argc, char *argv[])
{
  GtkApplication *app;
  GObjectClass *app_class;
  gint retval;

  g_type_init ();

#ifdef HAVE_CHEESE
  /* Used by the avatar chooser */
  g_return_val_if_fail (cheese_gtk_init (&argc, &argv), 1);
#endif

  empathy_init ();

  g_set_application_name (_("Empathy Accounts"));

  /* Make empathy and empathy-accounts appear as the same app in gnome-shell */
  gdk_set_program_class ("Empathy");
  gtk_window_set_default_icon_name ("empathy");

  app = gtk_application_new (EMPATHY_ACCOUNTS_DBUS_NAME, G_APPLICATION_FLAGS_NONE);
  app_class = G_OBJECT_GET_CLASS (app);
  G_APPLICATION_CLASS (app_class)->local_command_line = local_cmdline;
  G_APPLICATION_CLASS (app_class)->activate = app_activate;

  retval = g_application_run (G_APPLICATION (app), argc, argv);

  g_object_unref (app);

  return retval;
}
开发者ID:glassrose,项目名称:Empathy,代码行数:33,代码来源:empathy-accounts.c


示例4: sereneplayer_class_init

static void
sereneplayer_class_init (SereneplayerClass *klass)
{
	G_APPLICATION_CLASS (klass)->activate = sereneplayer_activate;
	G_APPLICATION_CLASS (klass)->open = sereneplayer_open;

	g_type_class_add_private (klass, sizeof (SereneplayerPrivate));

	G_OBJECT_CLASS (klass)->finalize = sereneplayer_finalize;
}
开发者ID:caesarhao,项目名称:sereneplayer,代码行数:10,代码来源:sereneplayer.c


示例5: shabdarth_class_init

static void
shabdarth_class_init (ShabdarthClass *klass)
{
	G_APPLICATION_CLASS (klass)->activate = shabdarth_activate;
	G_APPLICATION_CLASS (klass)->open = shabdarth_open;

	g_type_class_add_private (klass, sizeof (ShabdarthPrivate));

	G_OBJECT_CLASS (klass)->finalize = shabdarth_finalize;
}
开发者ID:dpk22dev,项目名称:shabdarth,代码行数:10,代码来源:shabdarth.c


示例6: brio_application_class_init

static void
brio_application_class_init (BrioApplicationClass *klass)
{
  G_APPLICATION_CLASS (klass)->activate = brio_application_activate;
  G_APPLICATION_CLASS (klass)->startup = brio_application_startup;

  G_OBJECT_CLASS (klass)->finalize = brio_application_finalize;

  g_type_class_add_private ((gpointer) klass, sizeof(BrioApplicationPrivate));
}
开发者ID:bpepple,项目名称:brio,代码行数:10,代码来源:brio-application.c


示例7: gom_application_dbus_register

static gboolean
gom_application_dbus_register (GApplication *application,
                               GDBusConnection *connection,
                               const gchar *object_path,
                               GError **error)
{
  GomApplication *self = GOM_APPLICATION (application);
  gboolean retval = FALSE;

  if (!G_APPLICATION_CLASS (gom_application_parent_class)->dbus_register (application,
                                                                          connection,
                                                                          object_path,
                                                                          error))
    goto out;

  if (!g_dbus_interface_skeleton_export (G_DBUS_INTERFACE_SKELETON (self->skeleton),
                                         connection,
                                         object_path,
                                         error))
    goto out;

  retval = TRUE;

 out:
  return retval;
}
开发者ID:GNOME,项目名称:gnome-online-miners,代码行数:26,代码来源:gom-application.c


示例8: cem_application_startup

static void
cem_application_startup(GApplication * app)
{
  GtkBuilder *builder;
  GMenuModel *app_menu;

  const gchar *quit_accels[2] ={"<Ctrl >Q", NULL};


  G_APPLICATION_CLASS(cem_application_parent_class)->startup(app);

  g_action_map_add_action_entries (G_ACTION_MAP(app),
    app_entries, G_N_ELEMENTS(app_entries), app);


  gtk_application_set_accels_for_action(GTK_APPLICATION(app), "app.quit", quit_accels);

  builder = gtk_builder_new_from_resource("/org/bandari/cem/glade/cem_menu.glade");

//  app_menu = G_MENU_MODEL (gtk_builder_get_object(builder, "appmenu"));

//  gtk_application_set_app_menu(GTK_APPLICATION(app), app_menu);

  g_object_unref(builder);
}
开发者ID:bandari-sciences,项目名称:cem,代码行数:25,代码来源:bs_gui_application.c


示例9: terminal_app_dbus_register

static gboolean
terminal_app_dbus_register (GApplication    *application,
                            GDBusConnection *connection,
                            const gchar     *object_path,
                            GError         **error)
{
  TerminalApp *app = TERMINAL_APP (application);
  gs_unref_object TerminalObjectSkeleton *object = NULL;
  gs_unref_object TerminalFactory *factory = NULL;

  if (!G_APPLICATION_CLASS (terminal_app_parent_class)->dbus_register (application,
                                                                       connection,
                                                                       object_path,
                                                                       error))
    return FALSE;

  object = terminal_object_skeleton_new (TERMINAL_FACTORY_OBJECT_PATH);
  factory = terminal_factory_impl_new ();
  terminal_object_skeleton_set_factory (object, factory);

  app->object_manager = g_dbus_object_manager_server_new (TERMINAL_OBJECT_PATH_PREFIX);
  g_dbus_object_manager_server_export (app->object_manager, G_DBUS_OBJECT_SKELETON (object));

  /* And export the object */
  g_dbus_object_manager_server_set_connection (app->object_manager, connection);
  return TRUE;
}
开发者ID:NitikaAgarwal,项目名称:gnome-terminal,代码行数:27,代码来源:terminal-app.c


示例10: terminal_app_startup

static void
terminal_app_startup (GApplication *application)
{
  const GActionEntry app_menu_actions[] = {
    { "preferences", app_menu_preferences_cb,   NULL, NULL, NULL },
    { "help",        app_menu_help_cb,          NULL, NULL, NULL },
    { "about",       app_menu_about_cb,         NULL, NULL, NULL },
    { "quit",        app_menu_quit_cb,          NULL, NULL, NULL }
  };

  gs_unref_object GtkBuilder *builder;
  GError *error = NULL;

  G_APPLICATION_CLASS (terminal_app_parent_class)->startup (application);

  /* Need to set the WM class (bug #685742) */
  gdk_set_program_class("Gnome-terminal");

  g_action_map_add_action_entries (G_ACTION_MAP (application),
                                   app_menu_actions, G_N_ELEMENTS (app_menu_actions),
                                   application);

  builder = gtk_builder_new ();
  gtk_builder_add_from_resource (builder,
                                 TERMINAL_RESOURCES_PATH_PREFIX "ui/terminal-appmenu.ui",
                                 &error);
  g_assert_no_error (error);

  gtk_application_set_app_menu (GTK_APPLICATION (application),
                                G_MENU_MODEL (gtk_builder_get_object (builder, "appmenu")));

  _terminal_debug_print (TERMINAL_DEBUG_SERVER, "Startup complete\n");
}
开发者ID:NitikaAgarwal,项目名称:gnome-terminal,代码行数:33,代码来源:terminal-app.c


示例11: photos_application_dbus_register

static gboolean
photos_application_dbus_register (GApplication *application,
                                  GDBusConnection *connection,
                                  const gchar *object_path,
                                  GError **error)
{
  PhotosApplication *self = PHOTOS_APPLICATION (application);
  gboolean ret_val = FALSE;
  gchar *search_provider_path = NULL;

  if (!G_APPLICATION_CLASS (photos_application_parent_class)->dbus_register (application,
                                                                             connection,
                                                                             object_path,
                                                                             error))
    goto out;

  search_provider_path = g_strconcat (object_path, PHOTOS_SEARCH_PROVIDER_PATH_SUFFIX, NULL);
  if (!photos_search_provider_dbus_export (self->priv->search_provider, connection, search_provider_path, error))
    goto out;

  ret_val = TRUE;

 out:
  g_free (search_provider_path);
  return ret_val;
}
开发者ID:UIKit0,项目名称:gnome-photos,代码行数:26,代码来源:photos-application.c


示例12: gedit_app_class_init

static void
gedit_app_class_init (GeditAppClass *klass)
{
	GObjectClass *object_class = G_OBJECT_CLASS (klass);
	GApplicationClass *app_class = G_APPLICATION_CLASS (klass);

	object_class->dispose = gedit_app_dispose;
	object_class->get_property = gedit_app_get_property;

	app_class->startup = gedit_app_startup;
	app_class->activate = gedit_app_activate;
	app_class->command_line = gedit_app_command_line;
	app_class->handle_local_options = gedit_app_handle_local_options;
	app_class->open = gedit_app_open;
	app_class->shutdown = gedit_app_shutdown;

	klass->show_help = gedit_app_show_help_impl;
	klass->help_link_id = gedit_app_help_link_id_impl;
	klass->set_window_title = gedit_app_set_window_title_impl;
	klass->create_window = gedit_app_create_window_impl;

	g_object_class_install_property (object_class,
					 PROP_LOCKDOWN,
					 g_param_spec_flags ("lockdown",
							     "Lockdown",
							     "The lockdown mask",
							     GEDIT_TYPE_LOCKDOWN_MASK,
							     0,
							     G_PARAM_READABLE |
							     G_PARAM_STATIC_STRINGS));
}
开发者ID:TheLazyPerson,项目名称:gedit,代码行数:31,代码来源:gedit-app.c


示例13: screenshot_application_startup

static void
screenshot_application_startup (GApplication *app)
{
  ScreenshotApplication *self = SCREENSHOT_APPLICATION (app);
  GtkBuilder *builder;
  GMenuModel *menu;

  G_APPLICATION_CLASS (screenshot_application_parent_class)->startup (app);

  gtk_window_set_default_icon_name (SCREENSHOOTER_ICON);
  screenshooter_init_stock_icons ();

  g_action_map_add_action_entries (G_ACTION_MAP (self), action_entries,
                                   G_N_ELEMENTS (action_entries), self);

  builder = gtk_builder_new ();
  gtk_builder_add_from_resource (builder, "/org/gnome/screenshot/screenshot-app-menu.ui", NULL);
  menu = G_MENU_MODEL (gtk_builder_get_object (builder, "app-menu"));
  gtk_application_set_app_menu (GTK_APPLICATION (self), menu);

  g_object_unref (builder);
  g_object_unref (menu);

  /* interactive mode: trigger the dialog and wait for the response */
  if (screenshot_config->interactive)
    screenshot_show_interactive_dialog (self);
  else
    screenshot_start (self);
}
开发者ID:3dfxmadscientist,项目名称:gnome-apps,代码行数:29,代码来源:screenshot-application.c


示例14: refimpl_app_startup

static void refimpl_app_startup(GApplication* application) {
    RefImplApp* app = REFIMPL_APP(application);

    G_APPLICATION_CLASS(refimpl_app_parent_class)->startup(application);

    g_action_map_add_action_entries(G_ACTION_MAP(app), app_entries, G_N_ELEMENTS(app_entries), app);

    if (refimpl_app_has_app_menu(app)) {
	GtkBuilder* builder;
	GError* error = NULL;

	builder = gtk_builder_new();
	if (!gtk_builder_add_from_resource(builder,
					   "/com/bobtacoindustries/N3888_RefImpl/refimpl_menu.ui",
					   &error)) {
	    g_warning("Loading menu builder file failed. Message: %s", error->message);
	    g_error_free(error);
	}
	else {
	    GMenuModel* appMenu;
	    appMenu = G_MENU_MODEL(gtk_builder_get_object(builder, "app_menu"));
	    gtk_application_set_app_menu(GTK_APPLICATION(application), appMenu);
	}

	g_object_unref(builder);
    }

    //setup_accelerators(app);
}
开发者ID:cristianadam,项目名称:io2d,代码行数:29,代码来源:RefImplApp.c


示例15: terminal_app_dbus_unregister

static void
terminal_app_dbus_unregister (GApplication    *application,
                              GDBusConnection *connection,
                              const gchar     *object_path)
{
  TerminalApp *app = TERMINAL_APP (application);

  if (app->object_manager) {
    g_dbus_object_manager_server_unexport (app->object_manager, TERMINAL_FACTORY_OBJECT_PATH);
    g_object_unref (app->object_manager);
    app->object_manager = NULL;
  }

#ifdef ENABLE_SEARCH_PROVIDER
  if (app->search_provider) {
    terminal_search_provider_dbus_unregister (app->search_provider, connection, TERMINAL_SEARCH_PROVIDER_PATH);
    g_object_unref (app->search_provider);
    app->search_provider = NULL;
  }
#endif /* ENABLE_SEARCH_PROVIDER */

  G_APPLICATION_CLASS (terminal_app_parent_class)->dbus_unregister (application,
                                                                    connection,
                                                                    object_path);
}
开发者ID:pledges,项目名称:gnome-terminal,代码行数:25,代码来源:terminal-app.c


示例16: fcitx_config_app_class_init

static void
fcitx_config_app_class_init (FcitxConfigAppClass *klass)
{
    G_OBJECT_CLASS (klass)->finalize= fcitx_config_app_finalize;

    G_APPLICATION_CLASS (klass)->activate = fcitx_config_app_activate;
}
开发者ID:fcitx,项目名称:fcitx-configtool,代码行数:7,代码来源:main.c


示例17: pragha_application_shutdown

static void
pragha_application_shutdown (GApplication *application)
{
	PraghaApplication *pragha = PRAGHA_APPLICATION (application);

	CDEBUG(DBG_INFO, "Pragha shutdown: Saving curret state.");

	if (pragha_preferences_get_restore_playlist (pragha->preferences))
		pragha_playlist_save_playlist_state (pragha->playlist);

	pragha_window_save_settings (pragha);

	pragha_playback_stop (pragha);

	/* Shutdown plugins can hide sidebar before save settings. */
	if (pragha->sidebar2_binding) {
		g_object_unref (pragha->sidebar2_binding);
		pragha->sidebar2_binding = NULL;
	}

#ifdef HAVE_LIBPEAS
	pragha_plugins_engine_shutdown (pragha->plugins_engine);
#endif

	gtk_widget_destroy (pragha->mainwindow);

	G_APPLICATION_CLASS (pragha_application_parent_class)->shutdown (application);
}
开发者ID:pragha-music-player,项目名称:pragha,代码行数:28,代码来源:pragha.c


示例18: nemo_main_application_quit_mainloop

static void
nemo_main_application_quit_mainloop (GApplication *app)
{
    nemo_main_application_notify_unmount_done (NEMO_APPLICATION (app), NULL);

    G_APPLICATION_CLASS (nemo_main_application_parent_class)->quit_mainloop (app);
}
开发者ID:RavetcoFX,项目名称:nemo,代码行数:7,代码来源:nemo-main-application.c


示例19: gcal_application_startup

static void
gcal_application_startup (GApplication *app)
{
  GcalApplicationPrivate *priv;
  GError *error;
  priv = GCAL_APPLICATION (app)->priv;

  G_APPLICATION_CLASS (gcal_application_parent_class)->startup (app);

  if (gtk_clutter_init (NULL, NULL) < 0)
   {
     g_error (_("Unable to initialize GtkClutter"));
     g_application_quit (app);
   }

  if (priv->provider == NULL)
   {
     priv->provider = gtk_css_provider_new ();
     gtk_style_context_add_provider_for_screen (gdk_screen_get_default (),
                                                GTK_STYLE_PROVIDER (priv->provider),
                                                G_MAXUINT);

     error = NULL;
     gtk_css_provider_load_from_path (priv->provider, CSS_FILE, &error);
     if (error != NULL)
       g_warning ("Error loading stylesheet from file %s. %s", CSS_FILE, error->message);
   }

  priv->manager = gcal_manager_new ();

  gcal_application_set_app_menu (app);
}
开发者ID:erick2red,项目名称:gnome-calendar,代码行数:32,代码来源:gcal-application.c


示例20: photos_thumbnailer_shutdown

static void
photos_thumbnailer_shutdown (GApplication *application)
{
  photos_debug (PHOTOS_DEBUG_THUMBNAILER, "Thumbnailer exiting");

  G_APPLICATION_CLASS (photos_thumbnailer_parent_class)->shutdown (application);
}
开发者ID:GNOME,项目名称:gnome-photos,代码行数:7,代码来源:photos-thumbnailer.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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