![]() |
![]() |
![]() |
GOffice Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
GOUndo; GOUndoBinary; GOUndoBinaryClass; void (*GOUndoBinaryFunc) (gpointer a
,gpointer b
,gpointer data
); GOUndoClass; GOUndoGroup; GOUndoGroupClass; GOUndoUnary; GOUndoUnaryClass; void (*GOUndoUnaryFunc) (gpointer a
,gpointer data
); GOUndo * go_undo_binary_new (gpointer a
,gpointer b
,GOUndoBinaryFunc undo
,GFreeFunc fa
,GFreeFunc fb
); GOUndo * go_undo_combine (GOUndo *a
,GOUndo *b
); void go_undo_group_add (GOUndoGroup *g
,GOUndo *u
); GOUndoGroup * go_undo_group_new (void
); GOUndo * go_undo_unary_new (gpointer a
,GOUndoUnaryFunc undo
,GFreeFunc fa
); void go_undo_undo (GOUndo *u
); void go_undo_undo_with_data (GOUndo *u
,gpointer data
);
GObject +----GOUndo +----GOUndoBinary +----GOUndoGroup +----GOUndoUnary
GObject +----GOUndo +----GOUndoBinary
GObject +----GOUndo +----GOUndoGroup
GObject +----GOUndo +----GOUndoUnary
typedef struct { GOUndoClass base; } GOUndoBinaryClass;
GOUndoClass |
base class. |
void (*GOUndoBinaryFunc) (gpointer a
,gpointer b
,gpointer data
);
|
|
|
|
|
typedef struct { GObjectClass base; void (*undo) (GOUndo *u, gpointer data); } GOUndoClass;
GObjectClass |
base class. |
undo. }; |
typedef struct { GOUndoClass base; } GOUndoGroupClass;
GOUndoClass |
base class. |
typedef struct { GOUndoClass base; } GOUndoUnaryClass;
GOUndoClass |
base class. |
GOUndo * go_undo_binary_new (gpointer a
,gpointer b
,GOUndoBinaryFunc undo
,GFreeFunc fa
,GFreeFunc fb
);
This function creates a new undo object for undo operations of two arguments. (In addition, an undo-time argument is added for context.)
|
first argument for undo operation |
|
second argument for undo operation |
|
function to call with arguments a and b for undo. [scope async]
|
|
optional function to free a . [scope async]
|
|
optional function to free b . [scope async]
|
Returns : |
a new undo object. [transfer full] |
GOUndo * go_undo_combine (GOUndo *a
,GOUndo *b
);
This function takes ownership of the argument references and gives ownership of the result to the caller. Either argument may be NULL in which case the other is returned.
|
optional first undo operation. [transfer full] |
|
optional last undo operation. [transfer full] |
Returns : |
the combination of two undo operations. [transfer full] |
void go_undo_group_add (GOUndoGroup *g
,GOUndo *u
);
This function adds u
to g
.
|
undo group |
|
undo object |
GOUndoGroup * go_undo_group_new (void
);
This function creates a new undo group for compounding undo objects.
Returns : |
a new, empty undo group. |
GOUndo * go_undo_unary_new (gpointer a
,GOUndoUnaryFunc undo
,GFreeFunc fa
);
This function creates a new undo object for undo operations of one argument. (In addition, an undo-time argument is added for context.)
|
argument for undo operation |
|
function to call with argument a for undo. [scope async]
|
|
optional function to free a . [scope async]
|
Returns : |
a new undo object. [transfer full] |
void go_undo_undo_with_data (GOUndo *u
,gpointer data
);
Execute the stored undo operation. data
is supplied to the undo
operation as an extra argument. It is meant not to affect the undo
operation in any way, but rather supply a context through which
progress and errors can be reported.
|
undo object |
|
user data |