KWin
|
#include <transaction.h>
Public Member Functions | |
Transaction () | |
void | lock () |
void | unlock () |
bool | isReady () const |
Transaction * | next (SurfaceInterface *surface) const |
void | add (SurfaceInterface *surface) |
void | amend (SurfaceInterface *surface, std::function< void(SurfaceState *state)> mutator) |
void | merge (Transaction *other) |
void | commit () |
The Transaction type provides a way to commit the pending state of one or more surfaces atomically.
Definition at line 60 of file transaction.h.
KWin::Transaction::Transaction | ( | ) |
Definition at line 79 of file transaction.cpp.
void KWin::Transaction::add | ( | SurfaceInterface * | surface | ) |
Adds the specified surface to this transaction. The transaction will move the pending surface state and apply it when it's possible.
Definition at line 118 of file transaction.cpp.
void KWin::Transaction::amend | ( | SurfaceInterface * | surface, |
std::function< void(SurfaceState *state)> | mutator ) |
Amends already committed state.
Definition at line 142 of file transaction.cpp.
void KWin::Transaction::commit | ( | ) |
Commits the transaction. Note that the transaction may be applied later if there are previous transactions that have not been applied yet or if the transaction is locked.
The commit() function takes the ownership of the transaction. The transaction will be destroyed when it is applied.
Definition at line 246 of file transaction.cpp.
bool KWin::Transaction::isReady | ( | ) | const |
Returns true
if this transaction can be applied, i.e. all its dependencies are resolved; otherwise returns false
.
Definition at line 97 of file transaction.cpp.
void KWin::Transaction::lock | ( | ) |
Locks the transaction. While the transaction is locked, it cannot be applied.
Definition at line 83 of file transaction.cpp.
void KWin::Transaction::merge | ( | Transaction * | other | ) |
Merge the given other transaction with this transaction. The other transaction must be uncommitted.
Definition at line 151 of file transaction.cpp.
Transaction * KWin::Transaction::next | ( | SurfaceInterface * | surface | ) | const |
Returns the next transaction for the specified surface. If this transaction does not affect the given surface, null
is returned.
Definition at line 108 of file transaction.cpp.
void KWin::Transaction::unlock | ( | ) |
Unlocks the transaction.
Definition at line 88 of file transaction.cpp.