inf-text-insert-operation

inf-text-insert-operation

Functions

Types and Values

Object Hierarchy

    GInterface
    ╰── InfTextInsertOperation

Prerequisites

InfTextInsertOperation requires InfAdoptedOperation and GObject.

Known Implementations

InfTextInsertOperation is implemented by InfTextDefaultInsertOperation.

Description

Functions

inf_text_insert_operation_get_position ()

guint
inf_text_insert_operation_get_position
                               (InfTextInsertOperation *operation);

Returns the position at which operation inserts text.

Parameters

operation

A InfTextInsertOperation.

 

Returns

The position to insert text.


inf_text_insert_operation_get_length ()

guint
inf_text_insert_operation_get_length (InfTextInsertOperation *operation);

Returns the length of the text inserted by operation .

Parameters

operation

A InfTextInsertOperation.

 

Returns

The length of operation .


inf_text_insert_operation_need_concurrency_id ()

gboolean
inf_text_insert_operation_need_concurrency_id
                               (InfTextInsertOperation *op,
                                InfAdoptedOperation *against);

Returns whether transforming op against against requires a concurrency ID (see inf_adopted_operation_need_concurrency_id() for further information).

Parameters

op

A InfTextInsertOperation.

 

against

Another InfAdoptedOperation.

 

Returns

Whether transforming op against against requires a concurrency ID.


inf_text_insert_operation_transform_insert ()

InfAdoptedOperation *
inf_text_insert_operation_transform_insert
                               (InfTextInsertOperation *operation,
                                InfTextInsertOperation *against,
                                InfTextInsertOperation *op_lcs,
                                InfTextInsertOperation *ag_lcs,
                                InfAdoptedConcurrencyId cid);

Returns a new operation that includes the effect of against into operation .

Parameters

operation

A InfTextInsertOperation.

 

against

Another InfTextInsertOperation.

 

op_lcs

The given operation in a previous state, or NULL.

 

ag_lcs

The against operation in a previous state, or NULL.

 

cid

The concurrency ID for the transformation.

 

Returns

A new InfAdoptedOperation.

[transfer full]


inf_text_insert_operation_transform_delete ()

InfAdoptedOperation *
inf_text_insert_operation_transform_delete
                               (InfTextInsertOperation *operation,
                                InfTextDeleteOperation *against);

Returns a new operation that includes the effect of against into operation .

Parameters

operation

A InfTextInsertOperation.

 

against

A InfTextDeleteOperation.

 

Returns

A new InfAdoptedOperation.

[transfer full]

Types and Values

InfTextInsertOperation

typedef struct _InfTextInsertOperation InfTextInsertOperation;

InfTextInsertOperation is an opaque data type. You should only access it via the public API functions.


struct InfTextInsertOperationInterface

struct InfTextInsertOperationInterface {
  GTypeInterface parent;

  /* Virtual table */
  guint(*get_position)(InfTextInsertOperation* operation);

  guint(*get_length)(InfTextInsertOperation* operation);

  InfTextInsertOperation*(*transform_position)(InfTextInsertOperation* op,
                                               guint position);
};