InfTextUser

InfTextUser

Synopsis

                    InfTextUser;
guint               inf_text_user_get_caret_position    (InfTextUser *user);
gint                inf_text_user_get_selection_length  (InfTextUser *user);
void                inf_text_user_set_selection         (InfTextUser *user,
                                                         guint position,
                                                         gint length);
gdouble             inf_text_user_get_hue               (InfTextUser *user);

Object Hierarchy

  GObject
   +----InfUser
         +----InfAdoptedUser
               +----InfTextUser

Properties

  "caret-position"           guint                 : Read / Write / Construct
  "hue"                      gdouble               : Read / Write / Construct
  "selection-length"         gint                  : Read / Write / Construct

Signals

  "selection-changed"                              : Run Last

Description

Details

InfTextUser

typedef struct _InfTextUser InfTextUser;


inf_text_user_get_caret_position ()

guint               inf_text_user_get_caret_position    (InfTextUser *user);

Returns the position of user's caret.

user :

A InfTextUser.

Returns :

user's caret position.

inf_text_user_get_selection_length ()

gint                inf_text_user_get_selection_length  (InfTextUser *user);

Returns the number of characters this user has selected, starting from the caret position. Negative number mean selection towards the beginning of the buffer.

user :

A InfTextUser.

Returns :

user's selection length in characters.

inf_text_user_set_selection ()

void                inf_text_user_set_selection         (InfTextUser *user,
                                                         guint position,
                                                         gint length);

Changes user's selection (i.e. caret position and selection length).

user :

A InfTextUser.

position :

The new position for the user's caret.

length :

The number of characters to select. Negative numbers mean selection towards the beginning.

inf_text_user_get_hue ()

gdouble             inf_text_user_get_hue               (InfTextUser *user);

Returns the hue of the user's color as a double ranging from 0 to 1. The other components (saturation and lightness) are not specific to the user and may be chosen indivudually to optimize the actual visual display.

user :

A InfTextUser.

Returns :

The hue of the user's color.

Property Details

The "caret-position" property

  "caret-position"           guint                 : Read / Write / Construct

The position of this user's caret.

Default value: 0


The "hue" property

  "hue"                      gdouble               : Read / Write / Construct

The hue value of the user's color. saturation and lightness are set by each client individually.

Allowed values: [0,1]

Default value: 0


The "selection-length" property

  "selection-length"         gint                  : Read / Write / Construct

The number of characters of this user's selection.

Default value: 0

Signal Details

The "selection-changed" signal

void                user_function                      (InfTextUser *inftextuser,
                                                        guint        arg1,
                                                        gint         arg2,
                                                        gpointer     user_data)        : Run Last

inftextuser :

the object which received the signal.

arg1 :

arg2 :

user_data :

user data set when the signal handler was connected.