libgeda

scheme_complex.c File Reference

Scheme API complex object manipulation procedures. More...

#include <config.h>
#include "libgeda_priv.h"
#include "libgedaguile_priv.h"
#include "scheme_complex.x"
Include dependency graph for scheme_complex.c:

Go to the source code of this file.

Functions

 SCM_DEFINE (make_complex,"%make-complex", 1, 0, 0,(SCM basename_s),"Create a new complex object.")
 Create a new complex object.
 SCM_DEFINE (make_complex_library,"%make-complex/library", 1, 0, 0,(SCM basename_s),"Instantiate a complex object from the component library.")
 Instantiate a complex object from the component library.
 SCM_DEFINE (set_complex_x,"%set-complex!", 6, 0, 0,(SCM complex_s, SCM x_s, SCM y_s, SCM angle_s, SCM mirror_s, SCM locked_s),"Set complex object parameters")
 Set complex object parameters.
 SCM_DEFINE (complex_info,"%complex-info", 1, 0, 0,(SCM complex_s),"Get complex object parameters.")
 Get complex object parameters.
 SCM_DEFINE (complex_contents,"%complex-contents", 1, 0, 0,(SCM complex_s),"Get complex object contents.")
 Get the contents of a complex object.
 SCM_DEFINE (complex_append_x,"%complex-append!", 2, 0, 0,(SCM complex_s, SCM obj_s),"Add a primitive object to a complex object")
 Add a primitive object to a complex object.
 SCM_DEFINE (complex_remove_x,"%complex-remove!", 2, 0, 0,(SCM complex_s, SCM obj_s),"Remove a primitive object from a complex object")
 Remove a primitive object from a complex object.
static void init_module_geda_core_complex ()
 Create the (geda core complex) Scheme module.
void edascm_init_complex ()
 Initialise the basic gEDA complex object manipulation procedures.

Detailed Description

Definition in file scheme_complex.c.


Function Documentation

SCM_DEFINE ( make_complex  ,
"%make-complex"  ,
,
,
,
(SCM basename_s)  ,
"Create a new complex object."   
)
Function Description
Creates a new, empty complex object, with the given basename and with all other parameters set to default values. It is initially set to be embedded.
Note:
Scheme API: Implements the make-complex procedure in the (geda core complex) module.
Returns:
a newly-created complex object.

Definition at line 41 of file scheme_complex.c.

Here is the call graph for this function:

SCM_DEFINE ( make_complex_library  ,
"%make-complex/library"  ,
,
,
,
(SCM basename_s)  ,
"Instantiate a complex object from the component library."   
)
Function Description

Searches the component library for a component with the given basename. If found, creates a new complex object by instantiating that library component. It is initially set to be unembedded. If no match is found for basename in the library, returns SCM_BOOL_F.

Note:
Scheme API: Implements the make-complex/library procedure in the (geda core complex) module.
Parameters:
basenamecomponent name to search for in the component library.
Returns:
a newly-created complex object.

Definition at line 77 of file scheme_complex.c.

Here is the call graph for this function:

SCM_DEFINE ( set_complex_x  ,
"%set-complex!"  ,
,
,
,
(SCM complex_s, SCM x_s, SCM y_s, SCM angle_s, SCM mirror_s,SCM locked_s)  ,
"Set complex object parameters"   
)
Function Description
Modifies the complex object complex_s by setting its parameters to new values.
Note:
Scheme API: Implements the set-complex! procedure in the (geda core complex) module.
Parameters:
complex_sthe complex object to modify.
x_sthe new x-coordinate of the complex object.
y_sthe new y-coordinate of the complex object.
angle_sthe new rotation angle.
mirror_swhether the complex object should be mirrored.
locked_swhether the complex object should be locked.
Returns:
the modified complex_s.

Definition at line 123 of file scheme_complex.c.

Here is the call graph for this function:

SCM_DEFINE ( complex_info  ,
"%complex-info"  ,
,
,
,
(SCM complex_s)  ,
"Get complex object parameters."   
)
Function Description
Retrieves the parameters of a complex object. The return value is a list of parameters:
  1. Basename
  2. Base x-coordinate.
  3. Base y-coordinate.
  4. Rotation angle.
  5. Whether object is mirrored.
  6. Whether object is locked.
Note:
Scheme API: Implements the complex-info procedure in the (geda core complex) module.
Parameters:
complex_sthe complex object to inspect.
Returns:
a list of complex object parameters.

Definition at line 191 of file scheme_complex.c.

Here is the call graph for this function:

SCM_DEFINE ( complex_contents  ,
"%complex-contents"  ,
,
,
,
(SCM complex_s)  ,
"Get complex object contents."   
)
Function Description
Retrieves a list of the primitive objects that make up a complex object.
Note:
Scheme API: Implements the complex-contents procedure in the (geda core complex) module.
Parameters:
complex_sa complex object.
Returns:
a list of primitive objects.

Definition at line 218 of file scheme_complex.c.

Here is the call graph for this function:

SCM_DEFINE ( complex_append_x  ,
"%complex-append!"  ,
,
,
,
(SCM complex_s, SCM obj_s)  ,
"Add a primitive object to a complex object"   
)
Function Description
Adds obj_s to complex_s. If obj_s is already attached to another complex object or to a PAGE, or if obj_s is itself a complex object, throws a Scheme error. If obj_s is already attached to complex_s, does nothing.
Note:
Scheme API: Implements the complex-append! procedure of the (geda core complex) module.
Parameters:
complex_scomplex object to modify.
obj_sprimitive object to add.
Returns:
obj_s.

Definition at line 243 of file scheme_complex.c.

Here is the call graph for this function:

SCM_DEFINE ( complex_remove_x  ,
"%complex-remove!"  ,
,
,
,
(SCM complex_s, SCM obj_s)  ,
"Remove a primitive object from a complex object"   
)
Function Description
Removes obj_s from complex_s. If obj_s is attached to a PAGE or to a complex object other than complex_s, throws a Scheme error. If obj_s is unattached, does nothing.
Note:
Scheme API: Implements the complex-remove! procedure of the (geda core complex) module.
Parameters:
complex_scomplex object to modify.
obj_sprimitive object to remove.
Returns:
obj_s.

Definition at line 308 of file scheme_complex.c.

Here is the call graph for this function:

static void init_module_geda_core_complex ( ) [static]
Function Description
Defines procedures in the (geda core complex) module. The module can be accessed using (use-modules (geda core complex)).

Definition at line 380 of file scheme_complex.c.

void edascm_init_complex ( )
Function Description
Registers some Scheme procedures for working with complex OBJECT smobs. Should only be called by scheme_api_init().

Definition at line 398 of file scheme_complex.c.

Here is the call graph for this function:

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines