Gnome2-VFS

 view release on metacpan or  search on metacpan

xs/GnomeVFSMime.xs  view on Meta::CPAN

##  GnomeVFSResult gnome_vfs_mime_add_extension (const char *mime_type, const char *extension) 
GnomeVFSResult
gnome_vfs_mime_add_extension (mime_type, extension)
	GnomeVFSMimeType *mime_type
	const char *extension

##  GnomeVFSResult gnome_vfs_mime_remove_extension (const char *mime_type, const char *extension) 
GnomeVFSResult
gnome_vfs_mime_remove_extension (mime_type, extension)
	GnomeVFSMimeType *mime_type
	const char *extension

=for apidoc

=for arg ... of application id's

=cut
# FIXME: leak ...
##  GnomeVFSResult gnome_vfs_mime_extend_all_applications (const char *mime_type, GList *application_ids) 
GnomeVFSResult
gnome_vfs_mime_extend_all_applications (mime_type, ...)
	GnomeVFSMimeType *mime_type
    PREINIT:
	GList *application_ids = NULL;
	int i;
    CODE:
	for (i = 1; i < items; i++)
		application_ids = g_list_append (application_ids, SvPV_nolen (ST (i)));

	RETVAL = gnome_vfs_mime_extend_all_applications (mime_type, application_ids);

	g_list_free (application_ids);
    OUTPUT:
	RETVAL

=for apidoc

=for arg ... of application id's

=cut
# FIXME: leak ...
##  GnomeVFSResult gnome_vfs_mime_remove_from_all_applications (const char *mime_type, GList *application_ids) 
GnomeVFSResult
gnome_vfs_mime_remove_from_all_applications (mime_type, ...)
	GnomeVFSMimeType *mime_type
    PREINIT:
	GList *application_ids = NULL;
	int i;
    CODE:
	for (i = 1; i < items; i++)
		application_ids = g_list_append (application_ids, SvPV_nolen (ST (i)));

	RETVAL = gnome_vfs_mime_remove_from_all_applications (mime_type, application_ids);

	g_list_free (application_ids);
    OUTPUT:
	RETVAL

#if VFS_CHECK_VERSION (2, 8, 0)

##  GList *gnome_vfs_mime_get_all_desktop_entries (const char *mime_type)
void
gnome_vfs_mime_get_all_desktop_entries (mime_type)
      GnomeVFSMimeType *mime_type
    PREINIT:
	GList *result = NULL, *i;
    PPCODE:
	result = gnome_vfs_mime_get_all_desktop_entries (mime_type);

	for (i = result; i; i = i->next) {
		if (i->data) {
			XPUSHs (sv_2mortal (newSVpv (i->data, 0)));
			g_free (i->data);
		}
	}

	g_list_free (result);

##  gchar *gnome_vfs_mime_get_default_desktop_entry (const char *mime_type)
gchar_own *
gnome_vfs_mime_get_default_desktop_entry (mime_type)
      GnomeVFSMimeType *mime_type

##  GnomeVFSMimeEquivalence gnome_vfs_mime_type_get_equivalence (const char *mime_type, const char *base_mime_type)
GnomeVFSMimeEquivalence
gnome_vfs_mime_get_equivalence (mime_type, base_mime_type)
	GnomeVFSMimeType *mime_type
	GnomeVFSMimeType *base_mime_type
    CODE:
	RETVAL = gnome_vfs_mime_type_get_equivalence (mime_type, base_mime_type);
    OUTPUT:
	RETVAL

##  gboolean gnome_vfs_mime_type_is_equal (const char *a, const char *b)
gboolean
gnome_vfs_mime_is_equal (a, b)
	GnomeVFSMimeType *a
	GnomeVFSMimeType *b
    CODE:
	RETVAL = gnome_vfs_mime_type_is_equal (a, b);
    OUTPUT:
	RETVAL

#endif

# --------------------------------------------------------------------------- #

MODULE = Gnome2::VFS::Mime	PACKAGE = Gnome2::VFS::Mime::Application	PREFIX = gnome_vfs_mime_application_

void
DESTROY (GnomeVFSMimeApplication *application)
    CODE:
	gnome_vfs_mime_application_free (application);

##  GnomeVFSMimeApplication *gnome_vfs_mime_application_new_from_id (const char *id) 
GnomeVFSMimeApplication *
gnome_vfs_mime_application_new_from_id (class, id)
	const char *id
    C_ARGS:
	id

#if VFS_CHECK_VERSION (2, 10, 0)

##  GnomeVFSMimeApplication *gnome_vfs_mime_application_new_from_desktop_id (const char *id);
GnomeVFSMimeApplication *
gnome_vfs_mime_application_new_from_desktop_id (class, id)
	const char *id
    C_ARGS:
	id

#endif

#if VFS_CHECK_VERSION (2, 4, 0)

=for apidoc

=for arg ... of URI strings

=cut
##  GnomeVFSResult gnome_vfs_mime_application_launch (GnomeVFSMimeApplication *app, GList *uris) 
GnomeVFSResult
gnome_vfs_mime_application_launch (app, ...)
	GnomeVFSMimeApplication *app
    PREINIT:
	GList *uris = NULL;
	int i;
    CODE:
	for (i = 1; i < items; i++)
		uris = g_list_append (uris, SvPV_nolen (ST (i)));

	RETVAL = gnome_vfs_mime_application_launch (app, uris);

	g_list_free (uris);
    OUTPUT:
	RETVAL

# FIXME: leak?
##  GnomeVFSResult gnome_vfs_mime_application_launch_with_env (GnomeVFSMimeApplication *app, GList *uris, char **envp) 
GnomeVFSResult
gnome_vfs_mime_application_launch_with_env (app, uri_ref, env_ref)
	GnomeVFSMimeApplication *app
	SV *uri_ref
	SV *env_ref
    PREINIT:
	char **envp;
	GList *uris;
    CODE:
	envp = SvEnvArray (env_ref);
	uris = SvPVGList (uri_ref);

	RETVAL = gnome_vfs_mime_application_launch_with_env (app, uris, envp);

	g_free (envp);
	g_list_free (uris);
    OUTPUT:
	RETVAL

#endif

#if VFS_CHECK_VERSION (2, 10, 0)

const char *gnome_vfs_mime_application_get_desktop_id (GnomeVFSMimeApplication *app);

const char *gnome_vfs_mime_application_get_desktop_file_path (GnomeVFSMimeApplication *app);

const char *gnome_vfs_mime_application_get_name (GnomeVFSMimeApplication *app);

const char *gnome_vfs_mime_application_get_generic_name (GnomeVFSMimeApplication *app);

const char *gnome_vfs_mime_application_get_icon (GnomeVFSMimeApplication *app);

const char *gnome_vfs_mime_application_get_exec (GnomeVFSMimeApplication *app);

const char *gnome_vfs_mime_application_get_binary_name (GnomeVFSMimeApplication *app);

gboolean gnome_vfs_mime_application_supports_uris (GnomeVFSMimeApplication *app);

gboolean gnome_vfs_mime_application_requires_terminal (GnomeVFSMimeApplication *app);

gboolean gnome_vfs_mime_application_supports_startup_notification (GnomeVFSMimeApplication *app);

const char *gnome_vfs_mime_application_get_startup_wm_class (GnomeVFSMimeApplication *app);

#endif

# --------------------------------------------------------------------------- #

MODULE = Gnome2::VFS::Mime	PACKAGE = Gnome2::VFS::Mime::Action	PREFIX = gnome_vfs_mime_action_

##  void gnome_vfs_mime_action_free (GnomeVFSMimeAction *action) 

# FIXME: Needs bonobo typemaps.
###  GnomeVFSResult gnome_vfs_mime_action_launch (GnomeVFSMimeAction *action, GList *uris) 
#GnomeVFSResult
#gnome_vfs_mime_action_launch (action, uris)
#	GnomeVFSMimeAction *action
#	GList *uris

###  GnomeVFSResult gnome_vfs_mime_action_launch_with_env (GnomeVFSMimeAction *action, GList *uris, char **envp) 
#GnomeVFSResult
#gnome_vfs_mime_action_launch_with_env (action, uris, envp)
#	GnomeVFSMimeAction *action
#	GList *uris
#	char **envp

# --------------------------------------------------------------------------- #

MODULE = Gnome2::VFS::Mime	PACKAGE = Gnome2::VFS::Mime::Monitor	PREFIX = gnome_vfs_mime_monitor_
 
##  GnomeVFSMIMEMonitor *gnome_vfs_mime_monitor_get (void)
GnomeVFSMIMEMonitor *
gnome_vfs_mime_monitor_get (class)
    C_ARGS:
	/* void */

# --------------------------------------------------------------------------- #

MODULE = Gnome2::VFS::Mime	PACKAGE = Gnome2::VFS	PREFIX = gnome_vfs_

=for object Gnome2::VFS::Mime
=cut

##  char *gnome_vfs_get_mime_type (const char *text_uri)
char_own *



( run in 0.772 second using v1.01-cache-2.11-cpan-b16cb0d3907 )