GtkSourceCompletionProposal

GtkSourceCompletionProposal

Synopsis


#include <gtksourceview/gtksourcecompletionproposal.h>

                    GtkSourceCompletionProposal;
const gchar *       gtk_source_completion_proposal_get_label
                                                        (GtkSourceCompletionProposal *proposal);
const gchar *       gtk_source_completion_proposal_get_markup
                                                        (GtkSourceCompletionProposal *proposal);
const gchar *       gtk_source_completion_proposal_get_text
                                                        (GtkSourceCompletionProposal *proposal);
GdkPixbuf *         gtk_source_completion_proposal_get_icon
                                                        (GtkSourceCompletionProposal *proposal);
const gchar *       gtk_source_completion_proposal_get_info
                                                        (GtkSourceCompletionProposal *proposal);
void                gtk_source_completion_proposal_changed
                                                        (GtkSourceCompletionProposal *proposal);
guint               gtk_source_completion_proposal_hash (GtkSourceCompletionProposal *proposal);
gboolean            gtk_source_completion_proposal_equal
                                                        (GtkSourceCompletionProposal *proposal,
                                                         GtkSourceCompletionProposal *other);

Object Hierarchy

  GInterface
   +----GtkSourceCompletionProposal

Prerequisites

GtkSourceCompletionProposal requires GObject.

Known Implementations

GtkSourceCompletionProposal is implemented by GtkSourceCompletionItem.

Signals

  "changed"                                        : Run Last / Action

Description

Details

GtkSourceCompletionProposal

typedef struct _GtkSourceCompletionProposal GtkSourceCompletionProposal;


gtk_source_completion_proposal_get_label ()

const gchar *       gtk_source_completion_proposal_get_label
                                                        (GtkSourceCompletionProposal *proposal);

Gets the label of proposal. The label is shown in the list of proposals as plain text. If you need any markup (such as bold or italic text), you have to implement gtk_source_completion_proposal_get_markup.

proposal :

A GtkSourceCompletionProposal

Returns :

The label of proposal.

gtk_source_completion_proposal_get_markup ()

const gchar *       gtk_source_completion_proposal_get_markup
                                                        (GtkSourceCompletionProposal *proposal);

Gets the label of proposal with markup. The label is shown in the list of proposals and may contain markup. This will be used instead of gtk_source_completion_proposal_get_label if implemented.

proposal :

A GtkSourceCompletionProposal

Returns :

The label of proposal with markup.

gtk_source_completion_proposal_get_text ()

const gchar *       gtk_source_completion_proposal_get_text
                                                        (GtkSourceCompletionProposal *proposal);

Gets the text of proposal. The text that is inserted into the text buffer when the proposal is activated by the default activation. You are free to implement a custom activation handler in the provider and not implement this function.

proposal :

A GtkSourceCompletionProposal

Returns :

The text of proposal.

gtk_source_completion_proposal_get_icon ()

GdkPixbuf *         gtk_source_completion_proposal_get_icon
                                                        (GtkSourceCompletionProposal *proposal);

Gets the icon of proposal.

proposal :

A GtkSourceCompletionProposal

Returns :

The icon of proposal.

gtk_source_completion_proposal_get_info ()

const gchar *       gtk_source_completion_proposal_get_info
                                                        (GtkSourceCompletionProposal *proposal);

Gets extra information associated to the proposal. This information will be used to present the user with extra, detailed information about the selected proposal.

proposal :

A GtkSourceCompletionProposal

Returns :

The extra information of proposal or NULL if no extra information is associated to proposal.

gtk_source_completion_proposal_changed ()

void                gtk_source_completion_proposal_changed
                                                        (GtkSourceCompletionProposal *proposal);

Emits the "changed" signal on proposal. This should be called by implementations whenever the name, icon or info of the proposal has changed.


gtk_source_completion_proposal_hash ()

guint               gtk_source_completion_proposal_hash (GtkSourceCompletionProposal *proposal);

Get the hash value of proposal. This is used to (together with gtk_source_completion_proposal_equal) to match proposals in the completion model. By default, it uses a direct hash (g_direct_hash).

proposal :

A GtkSourceCompletionProposal

Returns :

The hash value of proposal

gtk_source_completion_proposal_equal ()

gboolean            gtk_source_completion_proposal_equal
                                                        (GtkSourceCompletionProposal *proposal,
                                                         GtkSourceCompletionProposal *other);

Get whether two proposal objects are the same. This is used to (together with gtk_source_completion_proposal_hash) to match proposals in the completion model. By default, it uses direct equality (g_direct_equal).

proposal :

A GtkSourceCompletionProposal

other :

A GtkSourceCompletionProposal

Returns :

TRUE if proposal and object are the same proposal

Signal Details

The "changed" signal

void                user_function                      (GtkSourceCompletionProposal *proposal,
                                                        gpointer                     user_data)      : Run Last / Action

Emitted when the proposal has changed. The completion popup will react to this by updating the shown information.

proposal :

The GtkSourceCompletionProposal

user_data :

user data set when the signal handler was connected.