## GtkSourceCompletionItem GtkSourceCompletionItem — Simple implementation of GtkSourceCompletionProposal |

## Functions

GtkSourceCompletionItem * | gtk_source_completion_item_new ()
GtkSourceCompletionItem * | gtk_source_completion_item_new_with_markup ()
GtkSourceCompletionItem * | gtk_source_completion_item_new_from_stock ()
GtkSourceCompletionItem * | gtk_source_completion_item_new2 ()
void | gtk_source_completion_item_set_label ()
void | gtk_source_completion_item_set_markup ()
void | gtk_source_completion_item_set_text ()
void | gtk_source_completion_item_set_icon ()
void | gtk_source_completion_item_set_icon_name ()
void | gtk_source_completion_item_set_gicon ()
void | gtk_source_completion_item_set_info ()

## Properties

GIcon * | gicon | Read / Write
GdkPixbuf * | icon | Read / Write
gchar * | icon-name | Read / Write
gchar * | info | Read / Write
gchar * | label | Read / Write
gchar * | markup | Read / Write
gchar * | text | Read / Write

## Types and Values

| GtkSourceCompletionItem

## Object Hierarchy

        GObject
        ╰── GtkSourceCompletionItem

## Implemented Interfaces

GtkSourceCompletionItem implements GtkSourceCompletionProposal.

## Includes

    #include <gtksourceview/gtksource.h>

## Description

The GtkSourceCompletionItem class is a simple implementation of the GtkSourceCompletionProposal interface.

## Functions

### gtk_source_completion_item_new ()

    GtkSourceCompletionItem *
    gtk_source_completion_item_new (const gchar *label,
                                    const gchar *text,
                                    GdkPixbuf *icon,
                                    const gchar *info);

`gtk_source_completion_item_new` has been deprecated since version 3.24 and should not be used in newly-written code.

Use `gtk_source_completion_item_new2()` instead.

Create a new GtkSourceCompletionItem with label `label` , icon `icon` and extra information `info` . Both `icon` and `info` can be `NULL` in which case there will be no icon shown and no extra information available.

#### Parameters

label | The item label. |
text | The item text. |
icon | The item icon. | [nullable]
info | The item extra information. | [nullable]

#### Returns

a new GtkSourceCompletionItem.

### gtk_source_completion_item_new_with_markup ()

    GtkSourceCompletionItem *
    gtk_source_completion_item_new_with_markup
                                   (const gchar *markup,
                                    const gchar *text,
                                    GdkPixbuf *icon,
                                    const gchar *info);

`gtk_source_completion_item_new_with_markup` has been deprecated since version 3.24 and should not be used in newly-written code.

Use `gtk_source_completion_item_new2()` instead.

Create a new GtkSourceCompletionItem with markup label `markup` , icon `icon` and extra information `info` . Both `icon` and `info` can be `NULL` in which case there will be no icon shown and no extra information available.

#### Parameters

markup | The item markup label. |
text | The item text. |
icon | The item icon. | [nullable]
info | The item extra information. | [nullable]

#### Returns

a new GtkSourceCompletionItem.

### gtk_source_completion_item_new_from_stock ()

    GtkSourceCompletionItem *
    gtk_source_completion_item_new_from_stock
                                   (const gchar *label,
                                    const gchar *text,
                                    const gchar *stock,
                                    const gchar *info);

`gtk_source_completion_item_new_from_stock` has been deprecated since version 3.10 and should not be used in newly-written code.

Use `gtk_source_completion_item_new2()` instead.

Creates a new GtkSourceCompletionItem from a stock item. If `label` is `NULL`, the stock label will be used.

#### Parameters

label | The item label. | [nullable]
text | The item text. |
stock | The stock icon. |
info | The item extra information. | [nullable]

#### Returns

a new GtkSourceCompletionItem.

### gtk_source_completion_item_new2 ()

    GtkSourceCompletionItem *
    gtk_source_completion_item_new2 (void);

Creates a new GtkSourceCompletionItem. The desired properties need to be set afterwards.

#### Returns

a new GtkSourceCompletionItem.

[transfer full]

Since: 3.24

### gtk_source_completion_item_set_label ()

    void
    gtk_source_completion_item_set_label (GtkSourceCompletionItem *item,
                                          const gchar *label);

#### Parameters

item | a GtkSourceCompletionItem. |
label | the label, or `NULL`. | [nullable]

Since: 3.24

### gtk_source_completion_item_set_markup ()

    void
    gtk_source_completion_item_set_markup (GtkSourceCompletionItem *item,
                                           const gchar *markup);

#### Parameters

item | a GtkSourceCompletionItem. |
markup | the markup, or `NULL`. | [nullable]

Since: 3.24

### gtk_source_completion_item_set_text ()

    void
    gtk_source_completion_item_set_text (GtkSourceCompletionItem *item,
                                         const gchar *text);

#### Parameters

item | a GtkSourceCompletionItem. |
text | the text, or `NULL`. | [nullable]

Since: 3.24

### gtk_source_completion_item_set_icon ()

    void
    gtk_source_completion_item_set_icon (GtkSourceCompletionItem *item,
                                         GdkPixbuf *icon);

#### Parameters

item | a GtkSourceCompletionItem. |
icon | the GdkPixbuf, or `NULL`. | [nullable]

Since: 3.24

### gtk_source_completion_item_set_icon_name ()

    void
    gtk_source_completion_item_set_icon_name
                                   (GtkSourceCompletionItem *item,
                                    const gchar *icon_name);

#### Parameters

item | a GtkSourceCompletionItem. |
icon_name | the icon name, or `NULL`. | [nullable]

Since: 3.24

### gtk_source_completion_item_set_gicon ()

    void
    gtk_source_completion_item_set_gicon (GtkSourceCompletionItem *item,
                                          GIcon *gicon);

#### Parameters

item | a GtkSourceCompletionItem. |
gicon | the GIcon, or `NULL`. | [nullable]

Since: 3.24

### gtk_source_completion_item_set_info ()

    void
    gtk_source_completion_item_set_info (GtkSourceCompletionItem *item,
                                         const gchar *info);

#### Parameters

item | a GtkSourceCompletionItem. |
info | the info, or `NULL`. | [nullable]

Since: 3.24

## Types and Values

### GtkSourceCompletionItem

    typedef struct _GtkSourceCompletionItem GtkSourceCompletionItem;

## Property Details

### The `“gicon”` property

      “gicon”                    GIcon *

The GIcon for the icon to be shown for this proposal.

Flags: Read / Write

Since: 3.18

### The `“icon”` property

      “icon”                     GdkPixbuf *

The GdkPixbuf for the icon to be shown for this proposal.

Flags: Read / Write

### The `“icon-name”` property

      “icon-name”                gchar *

The icon name for the icon to be shown for this proposal.

Flags: Read / Write

Default value: NULL

Since: 3.18

### The `“info”` property

      “info”                     gchar *

Optional extra information to be shown for this proposal.

Flags: Read / Write

Default value: NULL

### The `“label”` property

      “label”                    gchar *

Label to be shown for this proposal.

Flags: Read / Write

Default value: NULL

### The `“markup”` property

      “markup”                   gchar *

Label with markup to be shown for this proposal.

Flags: Read / Write

Default value: NULL

### The `“text”` property

      “text”                     gchar *

Proposal text.

Flags: Read / Write

Default value: NULL