gsc-proposal

gsc-proposal

Synopsis

#define             GSC_COMPLETION_PROPOSAL_GET_INTERFACE(obj)
                    GscProposal;
                    GscProposalIface;
const gchar *       gsc_proposal_get_label              (GscProposal *proposal);
const gchar *       gsc_proposal_get_markup             (GscProposal *proposal);
const gchar *       gsc_proposal_get_text               (GscProposal *proposal);
GdkPixbuf *         gsc_proposal_get_icon               (GscProposal *proposal);
const gchar *       gsc_proposal_get_info               (GscProposal *proposal);
guint               gsc_proposal_get_hash               (GscProposal *proposal);
gboolean            gsc_proposal_equals                 (GscProposal *proposal1,
                                                         GscProposal *proposal2);
void                gsc_proposal_changed                (GscProposal *proposal);

Object Hierarchy

  GInterface
   +----GscProposal

Known Implementations

GscProposal is implemented by GscItem.

Signals

  "changed"                                        : Run Last / Action

Description

Details

GSC_COMPLETION_PROPOSAL_GET_INTERFACE()

#define GSC_COMPLETION_PROPOSAL_GET_INTERFACE(obj)	(G_TYPE_INSTANCE_GET_INTERFACE ((obj), GSC_TYPE_PROPOSAL, GscProposalIface))

obj :


GscProposal

typedef struct _GscProposal GscProposal;


GscProposalIface

typedef struct {
	GTypeInterface parent;
	
	/* Interface functions */
	const gchar 	*(*get_label)	(GscProposal *proposal);
	const gchar 	*(*get_markup)	(GscProposal *proposal);
	const gchar 	*(*get_text)	(GscProposal *proposal);
	
	GdkPixbuf	*(*get_icon)	(GscProposal *proposal);
	const gchar	*(*get_info)	(GscProposal *proposal);
	
	guint		 (*get_hash)	(GscProposal *proposal);
	gboolean	 (*equals)	(GscProposal *proposal1,
					 GscProposal *proposal2);
	
	/* Signals */
	void		 (*changed)	(GscProposal *proposal);
} GscProposalIface;


gsc_proposal_get_label ()

const gchar *       gsc_proposal_get_label              (GscProposal *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 gsc_proposal_get_markup.

proposal :

A GscProposal

Returns :

The label of proposal.

gsc_proposal_get_markup ()

const gchar *       gsc_proposal_get_markup             (GscProposal *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 gsc_proposal_get_label if implemented.

proposal :

A GscProposal

Returns :

The label of proposal with markup.

gsc_proposal_get_text ()

const gchar *       gsc_proposal_get_text               (GscProposal *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 GscProposal

Returns :

The text of proposal.

gsc_proposal_get_icon ()

GdkPixbuf *         gsc_proposal_get_icon               (GscProposal *proposal);

Gets the icon of proposal.

proposal :

A GscProposal

Returns :

The icon of proposal.

gsc_proposal_get_info ()

const gchar *       gsc_proposal_get_info               (GscProposal *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 GscProposal

Returns :

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

gsc_proposal_get_hash ()

guint               gsc_proposal_get_hash               (GscProposal *proposal);

proposal :

Returns :


gsc_proposal_equals ()

gboolean            gsc_proposal_equals                 (GscProposal *proposal1,
                                                         GscProposal *proposal2);

proposal1 :

proposal2 :

Returns :


gsc_proposal_changed ()

void                gsc_proposal_changed                (GscProposal *proposal);

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

proposal :

A GscProposal

Signal Details

The "changed" signal

void                user_function                      (GscProposal *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 GscProposal

user_data :

user data set when the signal handler was connected.