libgeda
|
Go to the source code of this file.
Defines | |
#define | EDASCM_SMOB_TYPE(x) (SCM_SMOB_FLAGS (x) & GEDA_SMOB_TYPE_MASK) |
#define | EDASCM_SMOB_TYPEP(x, type) (SCM_SMOB_PREDICATE (geda_smob_tag, x) && (EDASCM_SMOB_TYPE (x) == type)) |
Test the type of a gEDA smob. | |
#define | EDASCM_SMOB_VALIDP(x) (SCM_SMOB_PREDICATE (geda_smob_tag, x) && ((void *)SCM_SMOB_DATA (x) != NULL)) |
Test whether a gEDA smob is valid. | |
#define | EDASCM_ASSERT_SMOB_VALID(x) |
Assert that a gEDA smob is valid. | |
#define | EDASCM_TOPLEVELP(x) EDASCM_SMOB_TYPEP(x, GEDA_SMOB_TOPLEVEL) |
#define | EDASCM_PAGEP(x) EDASCM_SMOB_TYPEP(x, GEDA_SMOB_PAGE) |
#define | EDASCM_OBJECTP(x) EDASCM_SMOB_TYPEP(x, GEDA_SMOB_OBJECT) |
#define | EDASCM_SMOB_GCP(x) (SCM_SMOB_PREDICATE (geda_smob_tag, x) && ((SCM_SMOB_FLAGS (x) & GEDA_SMOB_GC_FLAG) != 0)) |
Test whether a structure may be garbage-collected. | |
#define | EDASCM_SMOB_SET_GC(x, gc) |
Set whether a structure may be garbage-collected. | |
Enumerations | |
enum | geda_smob_flags { GEDA_SMOB_TOPLEVEL = 0, GEDA_SMOB_PAGE = 1, GEDA_SMOB_OBJECT = 2, GEDA_SMOB_TYPE_MASK = 0xf, GEDA_SMOB_GC_FLAG = 0x100 } |
Functions | |
void | edascm_init_smob () |
Initialise the basic gEDA smob types. | |
void | edascm_init_toplevel () |
Initialise the TOPLEVEL manipulation procedures. | |
void | edascm_init_object () |
Initialise the basic gEDA object manipulation procedures. | |
void | edascm_init_complex () |
Initialise the basic gEDA complex object manipulation procedures. | |
void | edascm_init_page () |
Initialise the basic gEDA page manipulation procedures. | |
void | edascm_init_attrib () |
Initialise the basic gEDA attribute manipulation procedures. | |
void | edascm_init_os () |
Initialise the host platform support procedures. | |
void | edascm_init_deprecated () |
Initialise the basic gEDA page manipulation procedures. | |
SCM | edascm_from_toplevel (TOPLEVEL *toplevel) |
Get the smob for a TOPLEVEL. | |
GList * | edascm_to_object_glist (SCM objs, const char *subr) G_GNUC_WARN_UNUSED_RESULT |
Convert a Scheme object list to a GList. | |
SCM | edascm_from_object_glist (const GList *objs) |
Convert a GList of objects into a Scheme list. | |
int | edascm_is_object_type (SCM smob, int type) |
Test if an object smob is of a particular type. | |
void | o_page_changed (TOPLEVEL *t, OBJECT *o) |
Flag an object's page as having been changed. | |
Variables | |
scm_t_bits | geda_smob_tag |
SCM | edascm_object_state_sym |
Scheme API private declarations and definitions.
Definition in file libgedaguile_priv.h.
#define EDASCM_SMOB_TYPE | ( | x | ) | (SCM_SMOB_FLAGS (x) & GEDA_SMOB_TYPE_MASK) |
Retrieve the type flags for a gEDA smob.
Definition at line 117 of file libgedaguile_priv.h.
#define EDASCM_SMOB_TYPEP | ( | x, | |
type | |||
) | (SCM_SMOB_PREDICATE (geda_smob_tag, x) && (EDASCM_SMOB_TYPE (x) == type)) |
Definition at line 124 of file libgedaguile_priv.h.
#define EDASCM_SMOB_VALIDP | ( | x | ) | (SCM_SMOB_PREDICATE (geda_smob_tag, x) && ((void *)SCM_SMOB_DATA (x) != NULL)) |
Definition at line 132 of file libgedaguile_priv.h.
#define EDASCM_ASSERT_SMOB_VALID | ( | x | ) |
do { if (!EDASCM_SMOB_VALIDP(x)) { \ scm_misc_error (NULL, "Found invalid gEDA smob ~S", scm_list_1 (x)); \ } } while (0)
Definition at line 142 of file libgedaguile_priv.h.
#define EDASCM_TOPLEVELP | ( | x | ) | EDASCM_SMOB_TYPEP(x, GEDA_SMOB_TOPLEVEL) |
Tests whether a Scheme value is a TOPLEVEL smob.
Definition at line 152 of file libgedaguile_priv.h.
#define EDASCM_PAGEP | ( | x | ) | EDASCM_SMOB_TYPEP(x, GEDA_SMOB_PAGE) |
Tests whether a Scheme value is a PAGE smob.
Definition at line 155 of file libgedaguile_priv.h.
#define EDASCM_OBJECTP | ( | x | ) | EDASCM_SMOB_TYPEP(x, GEDA_SMOB_OBJECT) |
Tests whether a Scheme value is an OBJECT smob.
Definition at line 158 of file libgedaguile_priv.h.
#define EDASCM_SMOB_GCP | ( | x | ) | (SCM_SMOB_PREDICATE (geda_smob_tag, x) && ((SCM_SMOB_FLAGS (x) & GEDA_SMOB_GC_FLAG) != 0)) |
Definition at line 167 of file libgedaguile_priv.h.
#define EDASCM_SMOB_SET_GC | ( | x, | |
gc | |||
) |
SCM_SET_SMOB_FLAGS (x, gc ? (SCM_SMOB_FLAGS (x) | GEDA_SMOB_GC_FLAG) \ : (SCM_SMOB_FLAGS (x) & ~GEDA_SMOB_GC_FLAG))
x | Smob to modify. |
gc | Non-zero if x should be garbage-collected. |
Definition at line 180 of file libgedaguile_priv.h.
enum geda_smob_flags |
The flags used to determine which C structure a smob contains.
GEDA_SMOB_TOPLEVEL | |
GEDA_SMOB_PAGE | |
GEDA_SMOB_OBJECT | |
GEDA_SMOB_TYPE_MASK | |
GEDA_SMOB_GC_FLAG |
Definition at line 108 of file libgedaguile_priv.h.
void edascm_init_smob | ( | ) |
Definition at line 455 of file scheme_smob.c.
void edascm_init_toplevel | ( | ) |
Definition at line 133 of file scheme_toplevel.c.
void edascm_init_object | ( | ) |
Definition at line 2206 of file scheme_object.c.
void edascm_init_complex | ( | ) |
Definition at line 398 of file scheme_complex.c.
void edascm_init_page | ( | ) |
Definition at line 477 of file scheme_page.c.
void edascm_init_attrib | ( | ) |
Definition at line 299 of file scheme_attrib.c.
void edascm_init_os | ( | ) |
Registers some Scheme procedures that provide cross-platform support. Should only be called by scheme_api_init().
Definition at line 98 of file scheme_os.c.
void edascm_init_deprecated | ( | ) |
Definition at line 88 of file scheme_deprecated.c.
GList* edascm_to_object_glist | ( | SCM | objs, |
const char * | subr | ||
) |
[in] | objs | a Scheme list of OBJECT smobs. |
[in] | subr | the name of the Scheme subroutine (used for error messages). |
Definition at line 98 of file scheme_object.c.
SCM edascm_from_object_glist | ( | const GList * | objs | ) |
[in] | objs | a #GList of OBJECT instances. |
Definition at line 133 of file scheme_object.c.
int edascm_is_object_type | ( | SCM | smob, |
int | type | ||
) |
[in] | smob | Scheme value to check type for. |
[in] | type | Type to check against (e.g. OBJ_LINE). |
Definition at line 161 of file scheme_object.c.
scm_t_bits geda_smob_tag |
The tag used to identify gEDA data structures in Scheme.
Definition at line 63 of file scheme_smob.c.