Documentation updates

svn path=/trunk/; revision=6138
This commit is contained in:
Matthias Clasen 2007-12-17 07:04:51 +00:00
parent f87b822b21
commit 2e3f48993d
8 changed files with 73 additions and 19 deletions

View File

@ -1,3 +1,13 @@
2007-12-17 Matthias Clasen <mclasen@redhat.com>
* gdesktopappinfo.c:
* gunixmounts.c:
* gfileinfo.c:
* gvolumemonitor.c:
* gfile.h:
* gioscheduler.c:
* gvolume.h: Documentation updates
2007-12-14 Matthias Clasen <mclasen@redhat.com> 2007-12-14 Matthias Clasen <mclasen@redhat.com>
* gunixmounts.c: * gunixmounts.c:

View File

@ -148,6 +148,8 @@ g_desktop_app_info_init (GDesktopAppInfo *local)
* g_desktop_app_info_new_from_filename: * g_desktop_app_info_new_from_filename:
* @filename: a string containing a file name. * @filename: a string containing a file name.
* *
* Creates a new #GDesktopAppInfo.
*
* Returns: a new #GDesktopAppInfo or %NULL on error. * Returns: a new #GDesktopAppInfo or %NULL on error.
**/ **/
GDesktopAppInfo * GDesktopAppInfo *
@ -254,6 +256,8 @@ g_desktop_app_info_new_from_filename (const char *filename)
* g_desktop_app_info_new: * g_desktop_app_info_new:
* @desktop_id: the desktop file id * @desktop_id: the desktop file id
* *
* Creates a new #GDesktopAppInfo.
*
* Returns: a new #GDesktopAppInfo, or %NULL if no desktop file with that id * Returns: a new #GDesktopAppInfo, or %NULL if no desktop file with that id
**/ **/
GDesktopAppInfo * GDesktopAppInfo *

View File

@ -43,6 +43,7 @@ G_BEGIN_DECLS
/** /**
* GFileQueryInfoFlags: * GFileQueryInfoFlags:
* @G_FILE_QUERY_INFO_NONE: No flags set.
* @G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS: Don't follow symlinks. * @G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS: Don't follow symlinks.
* *
* Flags used when querying a #GFileInfo. * Flags used when querying a #GFileInfo.

View File

@ -871,10 +871,10 @@ g_file_info_create_value_by_name (GFileInfo *info,
* g_file_info_set_attribute: * g_file_info_set_attribute:
* @info: a #GFileInfo. * @info: a #GFileInfo.
* @attribute: a file attribute key. * @attribute: a file attribute key.
* @attr_value: a #GFileAttributeValue. * @type: a #GFileAttributeType
* @value_p: pointer to the value
* *
* Sets the @attribute to contain the given @attr_value, * Sets the @attribute to contain the given value, if possible.
* if possible.
**/ **/
void void
g_file_info_set_attribute (GFileInfo *info, g_file_info_set_attribute (GFileInfo *info,

View File

@ -324,16 +324,17 @@ mainloop_proxy_free (MainLoopProxy *proxy)
* @user_data: a #gpointer. * @user_data: a #gpointer.
* @notify: a #GDestroyNotify. * @notify: a #GDestroyNotify.
* *
* Used from an I/O job to send a callback to be run in the main loop (main thread), waiting for * Used from an I/O job to send a callback to be run in the
* the result (and thus blocking the I/O job). * main loop (main thread), waiting for the result (and thus
* blocking the I/O job).
* *
* Returns: The return value of @func * Returns: The return value of @func
**/ **/
gboolean gboolean
g_io_scheduler_job_send_to_mainloop (GIOSchedulerJob *job, g_io_scheduler_job_send_to_mainloop (GIOSchedulerJob *job,
GSourceFunc func, GSourceFunc func,
gpointer user_data, gpointer user_data,
GDestroyNotify notify) GDestroyNotify notify)
{ {
GSource *source; GSource *source;
MainLoopProxy *proxy; MainLoopProxy *proxy;
@ -380,21 +381,22 @@ g_io_scheduler_job_send_to_mainloop (GIOSchedulerJob *job,
} }
/** /**
* g_io_scheduler_job_send_to_mainloop: * g_io_scheduler_job_send_to_mainloop_async:
* @job: a #GIOSchedulerJob. * @job: a #GIOSchedulerJob.
* @func: a #GSourceFunc callback that will be called in the main thread. * @func: a #GSourceFunc callback that will be called in the main thread.
* @user_data: a #gpointer. * @user_data: a #gpointer.
* @notify: a #GDestroyNotify. * @notify: a #GDestroyNotify.
* *
* Used from an I/O job to send a callback to be run asynchronously in the main loop (main thread). * Used from an I/O job to send a callback to be run asynchronously
* The callback will be run when the main loop is availible, but at that time the I/O job * in the main loop (main thread). The callback will be run when the
* might have finished. The return value from the callback is ignored. * main loop is available, but at that time the I/O job might have
* finished. The return value from the callback is ignored.
**/ **/
void void
g_io_scheduler_job_send_to_mainloop_async (GIOSchedulerJob *job, g_io_scheduler_job_send_to_mainloop_async (GIOSchedulerJob *job,
GSourceFunc func, GSourceFunc func,
gpointer user_data, gpointer user_data,
GDestroyNotify notify) GDestroyNotify notify)
{ {
GSource *source; GSource *source;
MainLoopProxy *proxy; MainLoopProxy *proxy;

View File

@ -1650,8 +1650,9 @@ g_unix_mount_guess_type (GUnixMountEntry *mount_entry)
* g_unix_mount_point_guess_type: * g_unix_mount_point_guess_type:
* @mount_point: a #GUnixMountPoint. * @mount_point: a #GUnixMountPoint.
* *
* Guesses the type of a unix mount point. If the mount type cannot be * Guesses the type of a unix mount point.
* determined, returns %G_UNIX_MOUNT_TYPE_UNKNOWN. * If the mount type cannot be determined,
* returns %G_UNIX_MOUNT_TYPE_UNKNOWN.
* *
* Returns: a #GUnixMountType. * Returns: a #GUnixMountType.
**/ **/
@ -1732,6 +1733,16 @@ type_to_icon (GUnixMountType type, gboolean is_mount_point)
return icon_name; return icon_name;
} }
/**
* g_unix_mount_guess_name:
* @mount_entry: a #GUnixMountEntry
*
* Guesses the name of a Unix mount.
* The result is a translated string.
*
* Returns: A newly allocated string that must
* be freed with g_free()
*/
char * char *
g_unix_mount_guess_name (GUnixMountEntry *mount_entry) g_unix_mount_guess_name (GUnixMountEntry *mount_entry)
{ {
@ -1745,12 +1756,30 @@ g_unix_mount_guess_name (GUnixMountEntry *mount_entry)
return name; return name;
} }
/**
* g_unix_mount_guess_icon:
* @mount_entry: a #GUnixMountEntry
*
* Guesses the icon of a Unix mount.
*
* Returns: a #GIcon
*/
GIcon * GIcon *
g_unix_mount_guess_icon (GUnixMountEntry *mount_entry) g_unix_mount_guess_icon (GUnixMountEntry *mount_entry)
{ {
return g_themed_icon_new (type_to_icon (g_unix_mount_guess_type (mount_entry), FALSE)); return g_themed_icon_new (type_to_icon (g_unix_mount_guess_type (mount_entry), FALSE));
} }
/**
* g_unix_mount_point_guess_name:
* @mount_point: a #GUnixMountPoint
*
* Guesses the name of a Unix mount point.
* The result is a translated string.
*
* Returns: A newly allocated string that must
* be freed with g_free()
*/
char * char *
g_unix_mount_point_guess_name (GUnixMountPoint *mount_point) g_unix_mount_point_guess_name (GUnixMountPoint *mount_point)
{ {
@ -1764,6 +1793,14 @@ g_unix_mount_point_guess_name (GUnixMountPoint *mount_point)
return name; return name;
} }
/**
* g_unix_mount_point_guess_icon:
* @mount_point: a #GUnixMountPoint
*
* Guesses the icon of a Unix mount point.
*
* Returns: a #GIcon
*/
GIcon * GIcon *
g_unix_mount_point_guess_icon (GUnixMountPoint *mount_point) g_unix_mount_point_guess_icon (GUnixMountPoint *mount_point)
{ {

View File

@ -48,7 +48,7 @@ G_BEGIN_DECLS
* @get_drive: Gets a #GDrive the volume is located on. Returns %NULL if the #GVolume is not associated with a #GDrive. * @get_drive: Gets a #GDrive the volume is located on. Returns %NULL if the #GVolume is not associated with a #GDrive.
* @get_mount: Gets a #GMount representing the mounted volume. Returns %NULL if the #GVolume is not mounted. * @get_mount: Gets a #GMount representing the mounted volume. Returns %NULL if the #GVolume is not mounted.
* @can_mount: Returns %TRUE if the #GVolume can be mounted. * @can_mount: Returns %TRUE if the #GVolume can be mounted.
* @mount: Mounts a given #GVolume. * @mount_fn: Mounts a given #GVolume.
* @mount_finish: Finishes a mount operation. * @mount_finish: Finishes a mount operation.
* *
* Interface for implementing operations for mountable volumes. * Interface for implementing operations for mountable volumes.

View File

@ -231,7 +231,7 @@ g_volume_monitor_init (GVolumeMonitor *monitor)
/** /**
* g_volume_monitor_get_drives: * g_volume_monitor_get_connected_drives:
* @volume_monitor: a #GVolumeMonitor. * @volume_monitor: a #GVolumeMonitor.
* *
* Gets a list of drives connected to the system. * Gets a list of drives connected to the system.