[gtksourceview/wip/completion-item: 4/4] CompletionItem: add new2() constructor and setters
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview/wip/completion-item: 4/4] CompletionItem: add new2() constructor and setters
- Date: Thu, 20 Oct 2016 05:36:58 +0000 (UTC)
commit 8361d4c43722fee1d02c7579677dae45d8b6a976
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
docs/reference/gtksourceview-3.0-sections.txt | 1 +
gtksourceview/gtksourcecompletionitem.c | 51 +++++++++++++++++++++++++
gtksourceview/gtksourcecompletionitem.h | 4 ++
3 files changed, 56 insertions(+), 0 deletions(-)
---
diff --git a/docs/reference/gtksourceview-3.0-sections.txt b/docs/reference/gtksourceview-3.0-sections.txt
index 2a04388..b4146ed 100644
--- a/docs/reference/gtksourceview-3.0-sections.txt
+++ b/docs/reference/gtksourceview-3.0-sections.txt
@@ -149,6 +149,7 @@ GtkSourceCompletionItem
gtk_source_completion_item_new
gtk_source_completion_item_new_with_markup
gtk_source_completion_item_new_from_stock
+gtk_source_completion_item_new2
<SUBSECTION Standard>
GTK_SOURCE_IS_COMPLETION_ITEM
GTK_SOURCE_IS_COMPLETION_ITEM_CLASS
diff --git a/gtksourceview/gtksourcecompletionitem.c b/gtksourceview/gtksourcecompletionitem.c
index 4906276..88f7b2b 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
@@ -500,3 +501,53 @@ 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: (transfer full): a new #GtkSourceCompletionItem.
+ */
+GtkSourceCompletionItem *
+gtk_source_completion_item_new2 (void)
+{
+ return g_object_new (GTK_SOURCE_TYPE_COMPLETION_ITEM, NULL);
+}
+
+void
+gtk_source_completion_item_set_label (GtkSourceCompletionItem *item,
+ const gchar *label)
+{
+}
+
+void
+gtk_source_completion_item_set_markup (GtkSourceCompletionItem *item,
+ const gchar *markup)
+{
+}
+
+void
+gtk_source_completion_item_set_text (GtkSourceCompletionItem *item,
+ const gchar *text)
+{
+}
+
+void
+gtk_source_completion_item_set_info (GtkSourceCompletionItem *item,
+ const gchar *info)
+{
+}
+
+void
+gtk_source_completion_item_set_icon_name (GtkSourceCompletionItem *item,
+ const gchar *icon_name)
+{
+}
+
+void
+gtk_source_completion_item_set_icon (GtkSourceCompletionItem *item,
+ GdkPixbuf *icon)
+{
+}
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]