Beast - Music Synthesizer and Composer  0.11.1+10.g2da35
bseitem.cc File Reference
#include "bseitem.hh"
#include "bsesuper.hh"
#include "bsesnet.hh"
#include "bsestorage.hh"
#include "bseprocedure.hh"
#include "bsemain.hh"
#include "bseproject.hh"
#include "bsesong.hh"
#include "bseundostack.hh"
#include <gobject/gvaluecollector.h>
#include <string.h>
Include dependency graph for bseitem.cc:

Namespaces

 Bse
 

Functions

 BSE_BUILTIN_TYPE (BseItem)
 
void bse_item_set_internal (void *item, gboolean internal)
 
gboolean bse_item_needs_storage (BseItem *self, BseStorage *storage)
 
void bse_item_compat_setup (BseItem *self, uint vmajor, uint vminor, uint vmicro)
 
BseIt3mSeq * bse_item_gather_items (BseItem *item, BseIt3mSeq *iseq, GType base_type, BseItemCheckContainer ccheck, BseItemCheckProxy pcheck, void *data)
 
BseIt3mSeq * bse_item_gather_items_typed (BseItem *item, BseIt3mSeq *iseq, GType proxy_type, GType container_type, gboolean allow_ancestor)
 
gboolean bse_item_get_candidates (BseItem *item, const char *property, BsePropertyCandidates *pc)
 
BseItembse_item_use (BseItem *item)
 
void bse_item_unuse (BseItem *item)
 
void bse_item_set_parent (BseItem *item, BseItem *parent)
 
void bse_item_queue_seqid_changed (BseItem *item)
 
uint bse_item_get_seqid (BseItem *item)
 
BseItembse_item_common_ancestor (BseItem *item1, BseItem *item2)
 
void bse_item_cross_link (BseItem *owner, BseItem *link, BseItemUncross uncross_func)
 
void bse_item_cross_unlink (BseItem *owner, BseItem *link, BseItemUncross uncross_func)
 
void bse_item_uncross_links (BseItem *owner, BseItem *link)
 
BseSuperbse_item_get_super (BseItem *item)
 
BseSNetbse_item_get_snet (BseItem *item)
 
BseItembse_item_get_toplevel (BseItem *item)
 
BseProjectbse_item_get_project (BseItem *item)
 
gboolean bse_item_has_ancestor (BseItem *item, BseItem *ancestor)
 
Bse::MusicalTuning bse_item_current_musical_tuning (BseItem *self)
 
Bse::Error bse_item_exec (void *_item, const char *procedure,...)
 
Bse::Error bse_item_exec_void (void *_item, const char *procedure,...)
 
void bse_item_push_undo_proc (void *item, const char *procedure,...)
 
void bse_item_push_redo_proc (void *item, const char *procedure,...)
 
void bse_item_set_undoable (void *object, const char *first_property_name,...)
 
void bse_item_set_valist_undoable (void *object, const char *first_property_name, va_list var_args)
 
void bse_item_set_property_undoable (BseItem *self, const char *name, const GValue *value)
 
BseUndoStack * bse_item_undo_open_str (void *item, const std::string &string)
 
void bse_item_undo_close (BseUndoStack *ustack)
 
void bse_item_push_undo_storage (BseItem *self, BseUndoStack *ustack, BseStorage *storage)
 
void bse_item_backup_to_undo (BseItem *self, BseUndoStack *ustack)
 

Variables

 Enum
 

Function Documentation

void bse_item_cross_link ( BseItem owner,
BseItem link,
BseItemUncross  uncross_func 
)
Parameters
ownerreference owner
linkitem to be referenced by owner
uncross_funcnotifier to be executed on uncrossing

Install a weak cross reference from owner to link. The two items must have a common ancestor when the cross link is installed. Once their ancestry changes so that they don't have a common ancestor anymore, uncross_func() is executed.

Here is the call graph for this function:

void bse_item_cross_unlink ( BseItem owner,
BseItem link,
BseItemUncross  uncross_func 
)
Parameters
ownerreference owner
linkitem referenced by owner
uncross_funcnotifier queued to be executed on uncrossing

Removes a cross link previously installed via bse_item_cross_link() without executing uncross_func().

Here is the call graph for this function:

Bse::MusicalTuning bse_item_current_musical_tuning ( BseItem self)
Parameters
selfa valid Item
Returns
the current BseMusicalTuningType, defaulting to BSE_MUSICAL_TUNING_12_TET Find out about the musical tuning that is currently used for this item. The musical tuning depends on project wide settings that may change after this funciton has been called, so the result should be used with caution.

Here is the call graph for this function:

BseIt3mSeq* bse_item_gather_items ( BseItem item,
BseIt3mSeq *  iseq,
GType  base_type,
BseItemCheckContainer  ccheck,
BseItemCheckProxy  pcheck,
void *  data 
)
Parameters
itemvalid BseItem from which to start gathering
itemssequence of items to append to
base_typebase type of the items to gather
ccheckcontainer filter function
pcheckproxy filter function
datadata pointer to ccheck and pcheck
Returns
returns items

This function gathers items from an object hierachy, walking upwards, starting out with item. For each container passing ccheck(), all immediate children are tested for addition with pcheck.

Referenced by bse_item_gather_items_typed().

Here is the caller graph for this function:

BseIt3mSeq* bse_item_gather_items_typed ( BseItem item,
BseIt3mSeq *  iseq,
GType  proxy_type,
GType  container_type,
gboolean  allow_ancestor 
)
Parameters
itemvalid BseItem from which to start gathering
itemssequence of items to append to
proxy_typebase type of the items to gather
container_typebase type of the containers to check for items
allow_ancestorif FALSE, ancestors of item are omitted
Returns
returns items

Variant of bse_item_gather_items(), the containers and items are simply filtered by checking derivation from container_type and proxy_type respectively. Gathered items may not be ancestors of item if allow_ancestor is FALSE.

Here is the call graph for this function:

void bse_item_set_internal ( void *  item,
gboolean  internal 
)
Parameters
itemvalid BseItem
internalTRUE or FALSE

Set whether an item should be considered internal to the BSE implementation (or implementation of another BSE object). Internal items are not stored with their parents and undo is not recorded for internal items either. Marking containers internal also affects any children they contain, in effect, the whole posterity spawned by the container is considered internal.

Referenced by bse_snet_intern_child().

Here is the caller graph for this function:

void bse_item_uncross_links ( BseItem owner,
BseItem link 
)
Parameters
ownerreference owner
linkitem referenced by owner

Destroys all existing cross links from owner to link by executing the associated notifiers.