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

C++ G_TYPE_MODULE函数代码示例

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

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



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


示例16: pup_vm_plugin_init

//Main
G_MODULE_EXPORT void pup_vm_plugin_init(PupVMPlugin *plugin)
{
	g_debug("loaded");
	//Register our classes
	pup_cd_drive_register_type(G_TYPE_MODULE(plugin));
	pup_cd_register_type(G_TYPE_MODULE(plugin));

	PupVMMonitor *monitor = pup_vm_monitor_get();
	
	//Initialize the thread pool
	pup_cdrom_probe_thread_pool = g_thread_pool_new
		((GFunc) pup_cd_new_from_drive, monitor, 1, FALSE, NULL);
	pup_cd_drive_get_all(monitor);
	g_signal_connect(monitor, "udev", G_CALLBACK(pup_cdrom_udev_event), NULL);
}
开发者ID:Jubei-Mitsuyoshi,项目名称:aaa-pup-volume-monitor,代码行数:16,代码来源:cdrom.c


示例17: g_io_module_load

void
g_io_module_load (GIOModule *module)
{
    /* see gvfsproxyvolumemonitor.c:g_vfs_proxy_volume_monitor_daemon_init() */
    if (g_getenv ("GVFS_REMOTE_VOLUME_MONITOR_IGNORE") != NULL)
        goto out;

    /* We make this module resident since we *may* hold on to an instance
     * of the union monitor in the static method get_mount_for_mount_path()
     * on GNativeVolumeMonitor. And it doesn't make much sense to unload
     * the module *anyway*.
     *
     * See the comment gproxyvolumemonitor.c:get_mount_for_mount_path().
     */
    g_type_module_use (G_TYPE_MODULE (module));

    bindtextdomain (GETTEXT_PACKAGE, GVFS_LOCALEDIR);
    bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");

    g_proxy_drive_register (module);
    g_proxy_mount_register (module);
    g_proxy_shadow_mount_register (module);
    g_proxy_volume_register (module);
    g_proxy_volume_monitor_register (module);
out:
    ;
}
开发者ID:cpatulea,项目名称:gvfs,代码行数:27,代码来源:remote-volume-monitor-module.c


示例18: pluma_object_module_set_property

static void
pluma_object_module_set_property (GObject      *object,
				  guint         prop_id,
				  const GValue *value,
				  GParamSpec   *pspec)
{
	PlumaObjectModule *module = PLUMA_OBJECT_MODULE (object);

	switch (prop_id)
	{
		case PROP_MODULE_NAME:
			module->priv->module_name = g_value_dup_string (value);
			g_type_module_set_name (G_TYPE_MODULE (object),
						module->priv->module_name);
			break;
		case PROP_PATH:
			module->priv->path = g_value_dup_string (value);
			break;
		case PROP_TYPE_REGISTRATION:
			module->priv->type_registration = g_value_dup_string (value);
			break;
		case PROP_RESIDENT:
			module->priv->resident = g_value_get_boolean (value);
			break;
		default:
			g_return_if_reached ();
	}
}
开发者ID:jinguoliang,项目名称:mate-text-editor,代码行数:28,代码来源:pluma-object-module.c


示例19: ev_backends_manager_get_document

EvDocument *
ev_backends_manager_get_document (const gchar *mime_type)
{
	EvDocument    *document;
	EvBackendInfo *info;

	info = ev_backends_manager_get_backend_info (mime_type);
	if (!info)
		return NULL;

	if (!info->module) {
		gchar *path;
		
		path = g_module_build_path (backends_dir(), info->module_name);
		info->module = G_TYPE_MODULE (ev_module_new (path, info->resident));
		g_free (path);
	}
	
	if (!g_type_module_use (info->module)) {
		g_warning ("Cannot load backend '%s' since file '%s' cannot be read.",
			   info->module_name,
			   ev_module_get_path (EV_MODULE (info->module)));
		g_object_unref (G_OBJECT (info->module));
		info->module = NULL;

		return NULL;
	}

	document = EV_DOCUMENT (ev_module_new_object (EV_MODULE (info->module)));
	g_type_module_unuse (info->module);

	return document;
}
开发者ID:Acidburn0zzz,项目名称:atril,代码行数:33,代码来源:ev-backends-manager.c


示例20: peas_register_types

G_MODULE_EXPORT void
peas_register_types (PeasObjectModule *module)
{
	xviewer_postasa_plugin_register_type (G_TYPE_MODULE (module));
	peas_object_module_register_extension_type (module,
						    XVIEWER_TYPE_WINDOW_ACTIVATABLE,
						    XVIEWER_TYPE_POSTASA_PLUGIN);
}
开发者ID:linuxmint,项目名称:xviewer-plugins,代码行数:8,代码来源:xviewer-postasa-plugin.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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