ide-marked-content

ide-marked-content

Functions

Types and Values

Object Hierarchy

    GBoxed
    ╰── IdeMarkedContent

Description

Functions

ide_marked_content_new ()

IdeMarkedContent *
ide_marked_content_new (GBytes *content,
                        IdeMarkedKind kind);

Creates a new IdeMarkedContent using the bytes provided.

Parameters

content

a GBytes containing the markup

 

kind

an IdeMakredKind describing the markup kind

 

Returns

an IdeMarkedContent.

[transfer full]

Since: 3.32


ide_marked_content_new_plaintext ()

IdeMarkedContent *
ide_marked_content_new_plaintext (const gchar *plaintext);

Creates a new IdeMarkedContent of type IDE_MARKED_KIND_PLAINTEXT with the contents of string .

Parameters

plaintext

a string containing the plaintext.

[nullable]

Returns

an IdeMarkedContent.

[transfer full]

Since: 3.32


ide_marked_content_new_from_data ()

IdeMarkedContent *
ide_marked_content_new_from_data (const gchar *data,
                                  gssize len,
                                  IdeMarkedKind kind);

Creates a new IdeMarkedContent from the provided data.

Parameters

data

the data for the content

 

len

the length of the data, or -1 to strlen() data

 

kind

the kind of markup

 

Returns

an IdeMarkedContent.

[transfer full]

Since: 3.32


ide_marked_content_get_bytes ()

GBytes *
ide_marked_content_get_bytes (IdeMarkedContent *self);

Gets the bytes for the marked content.

Returns

a GBytes.

[transfer none]

Since: 3.32


ide_marked_content_get_kind ()

IdeMarkedKind
ide_marked_content_get_kind (IdeMarkedContent *self);

Gets the kind of markup that self contains.

This is used to display the content appropriately.

Parameters

self

an IdeMarkedContent

 

Since: 3.32


ide_marked_content_as_string ()

gchar *
ide_marked_content_as_string (IdeMarkedContent *self);

Gets the contents of the marked content as a newly allcoated C string.

Parameters

self

a IdeMarkedContent

 

Returns

a newly allocated string or NULL.

[nullable]

Since: 3.32


ide_marked_content_ref ()

IdeMarkedContent *
ide_marked_content_ref (IdeMarkedContent *self);

Increments the reference count of self by one.

When a IdeMarkedContent reaches a reference count of zero, by using ide_marked_content_unref(), it will be freed.

Parameters

self

an IdeMarkedContent

 

Returns

self with the reference count incremented.

[transfer full]

Since: 3.32


ide_marked_content_unref ()

void
ide_marked_content_unref (IdeMarkedContent *self);

Decrements the reference count of self by one.

When the reference count of self reaches zero, it will be freed.

Parameters

self

an IdeMarkedContent

 

Since: 3.32

Types and Values

enum IdeMarkedKind

Members

IDE_MARKED_KIND_PLAINTEXT

   

IDE_MARKED_KIND_MARKDOWN

   

IDE_MARKED_KIND_HTML

   

IDE_MARKED_KIND_PANGO