[gtksourceview/wip/completion-item: 2/2] CompletionItem: add new2() constructor and setters



commit 04d0bd8343131ca11ca7123b1ebb90ac0ab38817
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Thu Oct 20 06:16:11 2016 +0200

    CompletionItem: add new2() constructor and setters
    
    https://bugzilla.gnome.org/show_bug.cgi?id=753649

 gtksourceview/gtksourcecompletionitem.c |   15 +++++++++++++++
 gtksourceview/gtksourcecompletionitem.h |    4 ++++
 2 files changed, 19 insertions(+), 0 deletions(-)
---
diff --git a/gtksourceview/gtksourcecompletionitem.c b/gtksourceview/gtksourcecompletionitem.c
index a442531..f4eecda 100644
--- a/gtksourceview/gtksourcecompletionitem.c
+++ b/gtksourceview/gtksourcecompletionitem.c
@@ -3,6 +3,7 @@
  * This file is part of GtkSourceView
  *
  * Copyright (C) 2009 - Jesse van den Kieboom <jessevdk gnome org>
+ * Copyright (C) 2016 - Sébastien Wilmet <swilmet gnome org>
  *
  * GtkSourceView is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -499,3 +500,17 @@ gtk_source_completion_item_new_from_stock (const gchar *label,
 }
 
 G_GNUC_END_IGNORE_DEPRECATIONS;
+
+/**
+ * gtk_source_completion_item_new2:
+ *
+ * Creates a new #GtkSourceCompletionItem. The desired properties need to be set
+ * afterwards.
+ *
+ * Returns: a new #GtkSourceCompletionItem.
+ */
+GtkSourceCompletionItem *
+gtk_source_completion_item_new2 (void)
+{
+       return g_object_new (GTK_SOURCE_TYPE_COMPLETION_ITEM, NULL);
+}
diff --git a/gtksourceview/gtksourcecompletionitem.h b/gtksourceview/gtksourcecompletionitem.h
index 5ccd425..48e4d41 100644
--- a/gtksourceview/gtksourcecompletionitem.h
+++ b/gtksourceview/gtksourcecompletionitem.h
@@ -3,6 +3,7 @@
  * This file is part of GtkSourceView
  *
  * Copyright (C) 2009 - Jesse van den Kieboom <jessevdk gnome org>
+ * Copyright (C) 2016 - Sébastien Wilmet <swilmet gnome org>
  *
  * GtkSourceView is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -76,6 +77,9 @@ GtkSourceCompletionItem *gtk_source_completion_item_new_from_stock    (const gchar
                                                                         const gchar *stock,
                                                                         const gchar *info);
 
+GTK_SOURCE_AVAILABLE_IN_3_24
+GtkSourceCompletionItem *gtk_source_completion_item_new2               (void);
+
 G_END_DECLS
 
 #endif /* GTK_SOURCE_COMPLETION_ITEM_H */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]