forked from AuroraMiddleware/gtk
stringlist: Export gtk_string_object_new()
There are various use cases where it makes sense to construct these - from our internal testing to using them in flatten- or mapmodels.
This commit is contained in:
parent
f6c2c2edbd
commit
1dbb8df95f
@ -7611,7 +7611,9 @@ gtk_string_list_take
|
||||
gtk_string_list_remove
|
||||
gtk_string_list_splice
|
||||
gtk_string_list_get_string
|
||||
<SUBSECTION>
|
||||
GtkStringObject
|
||||
gtk_string_object_new
|
||||
gtk_string_object_get_string
|
||||
</SECTION>
|
||||
|
||||
|
@ -156,7 +156,15 @@ gtk_string_object_new_take (char *string)
|
||||
return obj;
|
||||
}
|
||||
|
||||
static GtkStringObject *
|
||||
/**
|
||||
* gtk_string_object_new:
|
||||
* @string: (non-nullable): The string to wrap
|
||||
*
|
||||
* Wraps a string in an object for use with #GListModel
|
||||
*
|
||||
* Returns: a new #GtkStringObject
|
||||
**/
|
||||
GtkStringObject *
|
||||
gtk_string_object_new (const char *string)
|
||||
{
|
||||
return gtk_string_object_new_take (g_strdup (string));
|
||||
|
@ -37,7 +37,9 @@ GDK_AVAILABLE_IN_ALL
|
||||
G_DECLARE_FINAL_TYPE (GtkStringObject, gtk_string_object, GTK, STRING_OBJECT, GObject)
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
const char * gtk_string_object_get_string (GtkStringObject *self);
|
||||
GtkStringObject * gtk_string_object_new (const char *string);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
const char * gtk_string_object_get_string (GtkStringObject *self);
|
||||
|
||||
#define GTK_TYPE_STRING_LIST (gtk_string_list_get_type ())
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user