GIO Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Signals |
#include <gio/gio.h> GFilenameCompleter; GFilenameCompleter * g_filename_completer_new (void
); char * g_filename_completer_get_completion_suffix (GFilenameCompleter *completer
,const char *initial_text
); char ** g_filename_completer_get_completions (GFilenameCompleter *completer
,const char *initial_text
); void g_filename_completer_set_dirs_only (GFilenameCompleter *completer
,gboolean dirs_only
);
Completes partial file and directory names given a partial string by looking in the file system for clues. Can return a list of possible completion strings for widget implementations.
typedef struct _GFilenameCompleter GFilenameCompleter;
Completes filenames based on files that exist within the file system.
GFilenameCompleter * g_filename_completer_new (void
);
Creates a new filename completer.
Returns : |
a GFilenameCompleter. |
char * g_filename_completer_get_completion_suffix (GFilenameCompleter *completer
,const char *initial_text
);
Obtains a completion for initial_text
from completer
.
|
the filename completer. |
|
text to be completed. |
Returns : |
a completed string, or NULL if no completion exists.
This string is not owned by GIO, so remember to g_free() it
when finished. |
char ** g_filename_completer_get_completions (GFilenameCompleter *completer
,const char *initial_text
);
Gets an array of completion strings for a given initial text.
|
the filename completer. |
|
text to be completed. |
Returns : |
array of strings with possible completions for initial_text .
This array must be freed by g_strfreev() when finished. |
void g_filename_completer_set_dirs_only (GFilenameCompleter *completer
,gboolean dirs_only
);
If dirs_only
is TRUE
, completer
will only
complete directory names, and not file names.
|
the filename completer. |
|
a gboolean. |
"got-completion-data"
signalvoid user_function (GFilenameCompleter *arg0,
gpointer user_data) : Run Last
Emitted when the file name completion information comes available.
|
user data set when the signal handler was connected. |