当前位置: 首页>>代码示例>>C++>>正文


C++ G_TYPE_MODULE函数代码示例

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


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

示例1: gegl_module_new

/**
 * gegl_module_new:
 * @filename:     The filename of a loadable module.
 * @load_inhibit: Pass %TRUE to exclude this module from auto-loading.
 * @verbose:      Pass %TRUE to enable debugging output.
 *
 * Creates a new #GeglModule instance.
 *
 * Return value: The new #GeglModule object.
 **/
GeglModule *
gegl_module_new (const gchar *filename,
                 gboolean     load_inhibit,
                 gboolean     verbose)
{
  GeglModule *module;

  g_return_val_if_fail (filename != NULL, NULL);

  module = g_object_new (GEGL_TYPE_MODULE, NULL);

  module->filename     = g_strdup (filename);
  module->load_inhibit = load_inhibit ? TRUE : FALSE;
  module->verbose      = verbose ? TRUE : FALSE;
  module->on_disk      = TRUE;

  if (! module->load_inhibit)
    {
      if (gegl_module_load (G_TYPE_MODULE (module)))
        gegl_module_unload (G_TYPE_MODULE (module));
    }
  else
    {
      if (verbose)
        g_print ("Skipping module '%s'\n",
                 gegl_filename_to_utf8 (filename));

      module->state = GEGL_MODULE_STATE_NOT_LOADED;
    }

  return module;
}
开发者ID:jcupitt,项目名称:gegl-vips,代码行数:42,代码来源:geglmodule.c

示例2: gnome_scan_module_init

G_MODULE_EXPORT void
gnome_scan_module_init (GnomeScanModule *module)
{
	SANE_Status status;
	SANE_Int version;
	/* TODO: version checking */
	status = sane_init(&version, NULL);
	bind_textdomain_codeset("sane-backends","UTF-8");

	g_message (G_STRLOC ": SANE version is %i.%i.%i for GSANE %s",
		   SANE_VERSION_MAJOR(version),
		   SANE_VERSION_MINOR(version),
		   SANE_VERSION_BUILD(version),
		   PACKAGE_VERSION);
	
	if (SANE_VERSION_MAJOR(version) != SANE_CURRENT_MAJOR) {
		g_warning (G_STRLOC ": SANE major version must be %i.",
			   SANE_CURRENT_MAJOR);
		return;
	}
	
	gsane_backend_register (G_TYPE_MODULE (module));
	gsane_scanner_register (G_TYPE_MODULE (module));

	/* GSane option handling */
	gsane_option_manager = gsane_option_manager_new();
	gsane_option_manager_add_rule_by_type(gsane_option_manager, SANE_TYPE_BOOL, GSANE_TYPE_OPTION_HANDLER_GENERIC);
	gsane_option_manager_add_rule_by_type(gsane_option_manager, SANE_TYPE_INT, GSANE_TYPE_OPTION_HANDLER_GENERIC);
	gsane_option_manager_add_rule_by_type(gsane_option_manager, SANE_TYPE_FIXED, GSANE_TYPE_OPTION_HANDLER_GENERIC);
	gsane_option_manager_add_rule_by_type(gsane_option_manager, SANE_TYPE_STRING, GSANE_TYPE_OPTION_HANDLER_GENERIC);
	gsane_option_manager_add_rules_by_name(gsane_option_manager, GSANE_TYPE_OPTION_SOURCE, "source", "doc-source", NULL);
	gsane_option_manager_add_rules_by_name(gsane_option_manager, GSANE_TYPE_OPTION_PRIMARY, "resolution", "mode", NULL);
	gsane_option_manager_add_rules_by_name(gsane_option_manager, GSANE_TYPE_OPTION_AREA, "tl-x", "tl-y", "br-x", "br-y", NULL);
}
开发者ID:GNOME,项目名称:gnome-scan,代码行数:34,代码来源:gsane-module.c

示例3: meta_plugin_manager_load

/*
 * Loads the given plugin.
 */
void
meta_plugin_manager_load (const gchar       *plugin_name)
{
  const gchar *dpath = MUTTER_PLUGIN_DIR "/";
  gchar       *path;
  MetaModule  *module;

  if (g_path_is_absolute (plugin_name))
    path = g_strdup (plugin_name);
  else
    path = g_strconcat (dpath, plugin_name, ".so", NULL);

  module = g_object_new (META_TYPE_MODULE, "path", path, NULL);
  if (!module || !g_type_module_use (G_TYPE_MODULE (module)))
    {
      /* This is fatal under the assumption that a monitoring
       * process like gnome-session will take over and handle
       * our untimely exit.
       */
      g_printerr ("Unable to load plugin module [%s]: %s",
                  path, g_module_error());
      exit (1);
    }

  meta_plugin_manager_set_plugin_type (meta_module_get_plugin_type (module));

  g_type_module_unuse (G_TYPE_MODULE (module));
  g_free (path);
}
开发者ID:darkxst,项目名称:mtest,代码行数:32,代码来源:meta-plugin-manager.c

示例4: peas_register_types

void
peas_register_types (PeasObjectModule *module)
{
  _ide_xml_highlighter_register_type (G_TYPE_MODULE (module));
  _ide_xml_indenter_register_type (G_TYPE_MODULE (module));

  peas_object_module_register_extension_type (module, IDE_TYPE_HIGHLIGHTER, IDE_TYPE_XML_HIGHLIGHTER);
  peas_object_module_register_extension_type (module, IDE_TYPE_INDENTER, IDE_TYPE_XML_INDENTER);
}
开发者ID:badwolfie,项目名称:gnome-builder,代码行数:9,代码来源:xml-pack-plugin.c

示例5: peas_register_types

G_MODULE_EXPORT void
peas_register_types (PeasObjectModule *module)
{
	rb_visualizer_plugin_register_type (G_TYPE_MODULE (module));
	_rb_visualizer_page_register_type (G_TYPE_MODULE (module));
	peas_object_module_register_extension_type (module,
						    PEAS_TYPE_ACTIVATABLE,
						    RB_TYPE_VISUALIZER_PLUGIN);
}
开发者ID:bilboed,项目名称:rhythmbox,代码行数:9,代码来源:rb-visualizer-plugin.c

示例6: peas_register_types

G_MODULE_EXPORT void
peas_register_types (PeasObjectModule *module)
{
	rb_grilo_plugin_register_type (G_TYPE_MODULE (module));
	_rb_grilo_source_register_type (G_TYPE_MODULE (module));
	peas_object_module_register_extension_type (module,
						    PEAS_TYPE_ACTIVATABLE,
						    RB_TYPE_GRILO_PLUGIN);
}
开发者ID:mssurajkaiga,项目名称:rhythmbox,代码行数:9,代码来源:rb-grilo-plugin.c

示例7: gnome_scan_module_init

G_MODULE_EXPORT void
gnome_scan_module_init (GnomeScanModule *module)
{
	gsfile_backend_register (G_TYPE_MODULE (module));
	gsfile_scanner_register (G_TYPE_MODULE (module));
	gsfile_option_filenames_register(G_TYPE_MODULE(module));
	gsfile_filenames_widget_register(G_TYPE_MODULE(module));

	gnome_scan_option_manager_register_rule_by_type(gnome_scan_option_manager, GSFILE_TYPE_OPTION_FILENAMES, GSFILE_TYPE_FILENAMES_WIDGET);
}
开发者ID:GNOME,项目名称:gnome-scan,代码行数:10,代码来源:gsfile-module.c

示例8: peas_register_types

G_MODULE_EXPORT void
peas_register_types (PeasObjectModule *module)
{
	gedit_spell_plugin_register_type (G_TYPE_MODULE (module));
	gedit_spell_app_activatable_register (G_TYPE_MODULE (module));

	peas_object_module_register_extension_type (module,
						    GEDIT_TYPE_WINDOW_ACTIVATABLE,
						    GEDIT_TYPE_SPELL_PLUGIN);
}
开发者ID:AqibAhmedJ,项目名称:gedit,代码行数:10,代码来源:gedit-spell-plugin.c

示例9: peas_register_types

G_MODULE_EXPORT void
peas_register_types (PeasObjectModule *module)
{
	rb_ipod_plugin_register_type (G_TYPE_MODULE (module));
	_rb_ipod_source_register_type (G_TYPE_MODULE (module));
	_rb_ipod_static_playlist_source_register_type (G_TYPE_MODULE (module));
	_rb_ipod_db_register_type (G_TYPE_MODULE (module));
	peas_object_module_register_extension_type (module,
						    PEAS_TYPE_ACTIVATABLE,
						    RB_TYPE_IPOD_PLUGIN);
}
开发者ID:wangd,项目名称:rhythmbox,代码行数:11,代码来源:rb-ipod-plugin.c

示例10: cedit_plugin_loader_iface_load

static CeditPlugin *
cedit_plugin_loader_iface_load (CeditPluginLoader *loader,
				CeditPluginInfo   *info,
				const gchar       *path)
{
	CeditPluginLoaderC *cloader = CEDIT_PLUGIN_LOADER_C (loader);
	CeditObjectModule *module;
	const gchar *module_name;
	CeditPlugin *result;

	module = (CeditObjectModule *)g_hash_table_lookup (cloader->priv->loaded_plugins, info);
	module_name = cedit_plugin_info_get_module_name (info);

	if (module == NULL)
	{
		/* For now we force all modules to be resident */
		module = cedit_object_module_new (module_name,
						  path,
						  "register_cedit_plugin",
						  TRUE);

		/* Infos are available for all the lifetime of the loader.
		 * If this changes, we should use weak refs or something */

		g_hash_table_insert (cloader->priv->loaded_plugins, info, module);
	}

	if (!g_type_module_use (G_TYPE_MODULE (module)))
	{
		g_warning ("Could not load plugin module: %s", cedit_plugin_info_get_name (info));

		return NULL;
	}

	/* TODO: for now we force data-dir-name = module-name... if needed we can
	 * add a datadir field to the plugin descriptor file.
	 */
	result = (CeditPlugin *)cedit_object_module_new_object (module,
								"install-dir", path,
								"data-dir-name", module_name,
								NULL);

	if (!result)
	{
		g_warning ("Could not create plugin object: %s", cedit_plugin_info_get_name (info));
		g_type_module_unuse (G_TYPE_MODULE (module));
		
		return NULL;
	}

	g_type_module_unuse (G_TYPE_MODULE (module));
	
	return result;
}
开发者ID:cranes-bill,项目名称:cedit,代码行数:54,代码来源:cedit-plugin-loader-c.c

示例11: peas_register_types

G_MODULE_EXPORT void
peas_register_types (PeasObjectModule *module)
{
  testing_callable_plugin_register (G_TYPE_MODULE (module));
  testing_properties_plugin_register (G_TYPE_MODULE (module));

  peas_object_module_register_extension_type (module,
                                              INTROSPECTION_TYPE_CALLABLE,
                                              TESTING_TYPE_CALLABLE_PLUGIN);
  peas_object_module_register_extension_type (module,
                                              INTROSPECTION_TYPE_PROPERTIES,
                                              TESTING_TYPE_PROPERTIES_PLUGIN);
}
开发者ID:Romeo93rus,项目名称:libpeas,代码行数:13,代码来源:extension-c-plugin.c

示例12: peas_register_types

G_MODULE_EXPORT void
peas_register_types (PeasObjectModule *module)
{
  peasdemo_hello_world_plugin_register_type (G_TYPE_MODULE (module));
  peasdemo_hello_world_configurable_register (G_TYPE_MODULE (module));

  peas_object_module_register_extension_type (module,
                                              PEAS_TYPE_ACTIVATABLE,
                                              PEASDEMO_TYPE_HELLO_WORLD_PLUGIN);
  peas_object_module_register_extension_type (module,
                                              PEAS_GTK_TYPE_CONFIGURABLE,
                                              PEASDEMO_TYPE_HELLO_WORLD_CONFIGURABLE);
}
开发者ID:DESTROYING,项目名称:libpeas,代码行数:13,代码来源:peasdemo-hello-world-plugin.c

示例13: peas_register_types

G_MODULE_EXPORT void
peas_register_types (PeasObjectModule *module)
{
	rb_generic_player_plugin_register_type (G_TYPE_MODULE (module));
	_rb_generic_player_source_register_type (G_TYPE_MODULE (module));
	_rb_generic_player_playlist_source_register_type (G_TYPE_MODULE (module));
	_rb_nokia770_source_register_type (G_TYPE_MODULE (module));
	_rb_psp_source_register_type (G_TYPE_MODULE (module));

	peas_object_module_register_extension_type (module,
						    PEAS_TYPE_ACTIVATABLE,
						    RB_TYPE_GENERIC_PLAYER_PLUGIN);
}
开发者ID:bhushan23,项目名称:rhythmbox,代码行数:13,代码来源:rb-generic-player-plugin.c

示例14: peas_register_types

G_MODULE_EXPORT void
peas_register_types (PeasObjectModule *module)
{
	rb_mtp_plugin_register_type (G_TYPE_MODULE (module));
	_rb_mtp_source_register_type (G_TYPE_MODULE (module));
	_rb_mtp_thread_register_type (G_TYPE_MODULE (module));

	rb_mtp_gst_init ();

	peas_object_module_register_extension_type (module,
						    PEAS_TYPE_ACTIVATABLE,
						    RB_TYPE_MTP_PLUGIN);
}
开发者ID:GNOME,项目名称:rhythmbox,代码行数:13,代码来源:rb-mtp-plugin.c

示例15: peas_register_types

G_MODULE_EXPORT void
peas_register_types (PeasObjectModule *module)
{
	rb_mtp_plugin_register_type (G_TYPE_MODULE (module));
	_rb_mtp_source_register_type (G_TYPE_MODULE (module));
	_rb_mtp_thread_register_type (G_TYPE_MODULE (module));

	/* ensure the gstreamer elements get linked in */
	rb_mtp_src_get_type ();
	rb_mtp_sink_get_type ();

	peas_object_module_register_extension_type (module,
						    PEAS_TYPE_ACTIVATABLE,
						    RB_TYPE_MTP_PLUGIN);
}
开发者ID:bilboed,项目名称:rhythmbox,代码行数:15,代码来源:rb-mtp-plugin.c


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