GwyStringList — A string list object wrapper
#define | gwy_string_list_duplicate() |
GwyStringList * | gwy_string_list_new () |
void | gwy_string_list_append () |
void | gwy_string_list_append_take () |
guint | gwy_string_list_get_length () |
const gchar * | gwy_string_list_get () |
void | gwy_string_list_clear () |
void | value-changed | Run First |
struct | GwyStringList |
struct | GwyStringListClass |
GObject ╰── GwyStringList
GwyStringList implements GwySerializable.
#include <libgwyddion/gwyddion.h>
GwyStringList object represents a reference-counted, serializable list of strings. The current interface is very minimal, more methods may be added later as needed.
#define gwy_string_list_duplicate(strlist)
Convenience macro doing gwy_serializable_duplicate()
with all the necessary
typecasting.
strlist |
A string list to duplicate. |
GwyStringList *
gwy_string_list_new (void
);
Creates a new string list.
A new empty string list.
void gwy_string_list_append (GwyStringList *strlist
,const gchar *string
);
Appends a string to the end of a string list.
strlist |
A string list. |
|
string |
A string to add. |
void gwy_string_list_append_take (GwyStringList *strlist
,gchar *string
);
Appends a string to the end of a string list, taking ownership of the string.
strlist |
A string list. |
|
string |
A string to add. |
Since: 2.35
guint
gwy_string_list_get_length (GwyStringList *strlist
);
Gets the number of strings in a string list.
strlist |
A string list. |
The number of strings in strlist
.
const gchar * gwy_string_list_get (GwyStringList *strlist
,guint i
);
Gets a string from a string list by position.
strlist |
A string list. |
|
i |
The position of string to get. |
The string, owned by strlist
. It is valid only until strlist
changes.
void
gwy_string_list_clear (GwyStringList *strlist
);
Clears the contents of a string list, removing all strings.
strlist |
A string list. |
Since: 2.35
struct GwyStringList;
The GwyStringList struct contains private data only and should be accessed using the functions below.
struct GwyStringListClass { GObjectClass parent_class; void (*value_changed)(GwyStringList *strlist); };
“value-changed”
signalvoid user_function (GwyStringList *gwystrlist, gpointer user_data)
The ::value-changed signal is emitted whenever a string list changes.
gwystrlist |
The GwyStringList which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First