libgeda

scheme_object.c File Reference

Scheme API object manipulation procedures. More...

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

Go to the source code of this file.

Functions

 SCM_SYMBOL (wrong_type_arg_sym,"wrong-type-arg")
 SCM_SYMBOL (line_sym,"line")
 SCM_SYMBOL (net_sym,"net")
 SCM_SYMBOL (bus_sym,"bus")
 SCM_SYMBOL (box_sym,"box")
 SCM_SYMBOL (picture_sym,"picture")
 SCM_SYMBOL (circle_sym,"circle")
 SCM_SYMBOL (complex_sym,"complex")
 SCM_SYMBOL (text_sym,"text")
 SCM_SYMBOL (path_sym,"path")
 SCM_SYMBOL (pin_sym,"pin")
 SCM_SYMBOL (arc_sym,"arc")
 SCM_SYMBOL (lower_left_sym,"lower-left")
 SCM_SYMBOL (middle_left_sym,"middle-left")
 SCM_SYMBOL (upper_left_sym,"upper-left")
 SCM_SYMBOL (lower_center_sym,"lower-center")
 SCM_SYMBOL (middle_center_sym,"middle-center")
 SCM_SYMBOL (upper_center_sym,"upper-center")
 SCM_SYMBOL (lower_right_sym,"lower-right")
 SCM_SYMBOL (middle_right_sym,"middle-right")
 SCM_SYMBOL (upper_right_sym,"upper-right")
 SCM_SYMBOL (name_sym,"name")
 SCM_SYMBOL (value_sym,"value")
 SCM_SYMBOL (both_sym,"both")
 SCM_SYMBOL (none_sym,"none")
 SCM_SYMBOL (square_sym,"square")
 SCM_SYMBOL (round_sym,"round")
 SCM_SYMBOL (solid_sym,"solid")
 SCM_SYMBOL (dotted_sym,"dotted")
 SCM_SYMBOL (dashed_sym,"dashed")
 SCM_SYMBOL (center_sym,"center")
 SCM_SYMBOL (phantom_sym,"phantom")
 SCM_SYMBOL (hollow_sym,"hollow")
 SCM_SYMBOL (mesh_sym,"mesh")
 SCM_SYMBOL (hatch_sym,"hatch")
 SCM_SYMBOL (moveto_sym,"moveto")
 SCM_SYMBOL (lineto_sym,"lineto")
 SCM_SYMBOL (curveto_sym,"curveto")
 SCM_SYMBOL (closepath_sym,"closepath")
void o_page_changed (TOPLEVEL *t, OBJECT *o)
 Flag an object's page as having been changed.
GList * edascm_to_object_glist (SCM objs, const char *subr)
 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.
 SCM_DEFINE (copy_object,"%copy-object", 1, 0, 0,(SCM obj_s),"Copy an object.")
 Copy an object.
 SCM_DEFINE (object_type,"%object-type", 1, 0, 0,(SCM obj_s),"Get an object smob's type")
 Get the type of an object.
 SCM_DEFINE (object_bounds,"%object-bounds", 0, 0, 1,(SCM rst_s),"Get the bounds of a list of objects")
 Get the bounds of a list of objects.
 SCM_DEFINE (object_stroke,"%object-stroke", 1, 0, 0,(SCM obj_s),"Get the stroke properties of an object.")
 Get the stroke properties of an object.
 SCM_DEFINE (set_object_stroke_x,"%set-object-stroke!", 4, 2, 0,(SCM obj_s, SCM width_s, SCM cap_s, SCM dash_s, SCM space_s, SCM length_s),"Set the stroke properties of an object.")
 Set the stroke properties of an object.
 SCM_DEFINE (object_fill,"%object-fill", 1, 0, 0,(SCM obj_s),"Get the fill properties of an object.")
 Get the fill properties of an object.
 SCM_DEFINE (set_object_fill_x,"%set-object-fill!", 2, 5, 0,(SCM obj_s, SCM type_s, SCM width_s, SCM space1_s, SCM angle1_s, SCM space2_s, SCM angle2_s),"Set the fill properties of an object.")
 Set the fill properties of an object.
 SCM_DEFINE (object_color,"%object-color", 1, 0, 0,(SCM obj_s),"Get the color of an object.")
 Get the color of an object.
 SCM_DEFINE (set_object_color_x,"%set-object-color!", 2, 0, 0,(SCM obj_s, SCM color_s),"Set the color of an object.")
 Set the color of an object.
 SCM_DEFINE (make_line,"%make-line", 0, 0, 0,(),"Create a new line object.")
 Create a new line.
 SCM_DEFINE (set_line_x,"%set-line!", 6, 0, 0,(SCM line_s, SCM x1_s, SCM y1_s, SCM x2_s, SCM y2_s, SCM color_s),"Set line parameters.")
 Set line parameters.
 SCM_DEFINE (line_info,"%line-info", 1, 0, 0,(SCM line_s),"Get line parameters.")
 Get line parameters.
 SCM_DEFINE (make_net,"%make-net", 0, 0, 0,(),"Create a new net object.")
 Create a new net.
 SCM_DEFINE (make_bus,"%make-bus", 0, 0, 0,(),"Create a new bus object.")
 Create a new bus.
 SCM_DEFINE (make_pin,"%make-pin", 1, 0, 0,(SCM type_s),"Create a new pin object.")
 Create a new pin.
 SCM_DEFINE (pin_type,"%pin-type", 1, 0, 0,(SCM pin_s),"Get the type of a pin object.")
 Get the type of a pin object.
 SCM_DEFINE (make_box,"%make-box", 0, 0, 0,(),"Create a new box object.")
 Create a new box.
 SCM_DEFINE (set_box_x,"%set-box!", 6, 0, 0,(SCM box_s, SCM x1_s, SCM y1_s, SCM x2_s, SCM y2_s, SCM color_s),"Set box parameters.")
 Set box parameters.
 SCM_DEFINE (box_info,"%box-info", 1, 0, 0,(SCM box_s),"Get box parameters.")
 Get box parameters.
 SCM_DEFINE (make_circle,"%make-circle", 0, 0, 0,(),"Create a new circle object.")
 Create a new circle.
 SCM_DEFINE (set_circle_x,"%set-circle!", 5, 0, 0,(SCM circle_s, SCM x_s, SCM y_s, SCM r_s, SCM color_s),"Set circle parameters")
 Set circle parameters.
 SCM_DEFINE (circle_info,"%circle-info", 1, 0, 0,(SCM circle_s),"Get circle parameters.")
 Get circle parameters.
 SCM_DEFINE (make_arc,"%make-arc", 0, 0, 0,(),"Create a new arc object.")
 Create a new arc.
 SCM_DEFINE (set_arc_x,"%set-arc!", 7, 0, 0,(SCM arc_s, SCM x_s, SCM y_s, SCM r_s, SCM start_angle_s, SCM end_angle_s, SCM color_s),"Set arc parameters")
 Set arc parameters.
 SCM_DEFINE (arc_info,"%arc-info", 1, 0, 0,(SCM arc_s),"Get arc parameters.")
 Get arc parameters.
 SCM_DEFINE (make_text,"%make-text", 0, 0, 0,(),"Create a new text object.")
 Create a new text item.
 SCM_DEFINE (set_text_x,"%set-text!", 10, 0, 0,(SCM text_s, SCM x_s, SCM y_s, SCM align_s, SCM angle_s, SCM string_s, SCM size_s, SCM visible_s, SCM show_s, SCM color_s),"Set text parameters")
 Set text parameters.
 SCM_DEFINE (text_info,"%text-info", 1, 0, 0,(SCM text_s),"Get text parameters.")
 Get text parameters.
 SCM_DEFINE (object_connections,"%object-connections", 1, 0, 0,(SCM obj_s),"Get objects that are connected to an object.")
 Get objects that are connected to an object.
 SCM_DEFINE (object_complex,"%object-complex", 1, 0, 0,(SCM obj_s),"Get containing complex object of an object.")
 Get the complex object that contains an object.
 SCM_DEFINE (make_path,"%make-path", 0, 0, 0,(),"Create a new path object")
 Make a new, empty path object.
 SCM_DEFINE (path_length,"%path-length", 1, 0, 0,(SCM obj_s),"Get number of elements in a path object.")
 Get the number of elements in a path.
 SCM_DEFINE (path_ref,"%path-ref", 2, 0, 0,(SCM obj_s, SCM index_s),"Get a path element from a path object.")
 Get one of the elements from a path.
 SCM_DEFINE (path_remove_x,"%path-remove!", 2, 0, 0,(SCM obj_s, SCM index_s),"Remove a path element from a path object.")
 Remove an element from a path.
 SCM_DEFINE (path_insert_x,"%path-insert", 3, 6, 0,(SCM obj_s, SCM index_s, SCM type_s, SCM x1_s, SCM y1_s, SCM x2_s, SCM y2_s, SCM x3_s, SCM y3_s),"Insert a path element into a path object.")
 Insert an element into a path.
 SCM_DEFINE (make_picture,"%make-picture", 0, 0, 0,(),"Create a new picture object")
 Create a new, empty picture object.
 SCM_DEFINE (picture_info,"%picture-info", 1, 0, 0,(SCM obj_s),"Get picture object parameters")
 Get picture object parameters.
 SCM_DEFINE (set_picture_x,"%set-picture!", 7, 0, 0,(SCM obj_s, SCM x1_s, SCM y1_s, SCM x2_s, SCM y2_s, SCM angle_s, SCM mirror_s),"Set picture object parameters")
 SCM_DEFINE (set_picture_data_vector_x,"%set-picture-data/vector!", 3, 0, 0,(SCM obj_s, SCM data_s, SCM filename_s),"Set a picture object's data from a vector.")
 Set a picture object's data from a vector.
 SCM_DEFINE (translate_object_x,"%translate-object!", 3, 0, 0,(SCM obj_s, SCM dx_s, SCM dy_s),"Translate an object.")
 Translate an object.
 SCM_DEFINE (rotate_object_x,"%rotate-object!", 4, 0, 0,(SCM obj_s, SCM x_s, SCM y_s, SCM angle_s),"Rotate an object.")
 Rotate an object.
 SCM_DEFINE (mirror_object_x,"%mirror-object!", 2, 0, 0,(SCM obj_s, SCM x_s),"Mirror an object.")
 Mirror an object.
static void init_module_geda_core_object ()
 Create the (geda core object) Scheme module.
void edascm_init_object ()
 Initialise the basic gEDA object manipulation procedures.

Detailed Description

Definition in file scheme_object.c.


Function Documentation

SCM_SYMBOL ( wrong_type_arg_sym  ,
"wrong-type-arg"   
)
SCM_SYMBOL ( line_sym  ,
"line"   
)
SCM_SYMBOL ( net_sym  ,
"net"   
)
SCM_SYMBOL ( bus_sym  ,
"bus"   
)
SCM_SYMBOL ( box_sym  ,
"box"   
)
SCM_SYMBOL ( picture_sym  ,
"picture"   
)
SCM_SYMBOL ( circle_sym  ,
"circle"   
)
SCM_SYMBOL ( complex_sym  ,
"complex"   
)
SCM_SYMBOL ( text_sym  ,
"text"   
)
SCM_SYMBOL ( path_sym  ,
"path"   
)
SCM_SYMBOL ( pin_sym  ,
"pin"   
)
SCM_SYMBOL ( arc_sym  ,
"arc"   
)
SCM_SYMBOL ( lower_left_sym  ,
"lower-left"   
)
SCM_SYMBOL ( middle_left_sym  ,
"middle-left"   
)
SCM_SYMBOL ( upper_left_sym  ,
"upper-left"   
)
SCM_SYMBOL ( lower_center_sym  ,
"lower-center"   
)
SCM_SYMBOL ( middle_center_sym  ,
"middle-center"   
)
SCM_SYMBOL ( upper_center_sym  ,
"upper-center"   
)
SCM_SYMBOL ( lower_right_sym  ,
"lower-right"   
)
SCM_SYMBOL ( middle_right_sym  ,
"middle-right"   
)
SCM_SYMBOL ( upper_right_sym  ,
"upper-right"   
)
SCM_SYMBOL ( name_sym  ,
"name"   
)
SCM_SYMBOL ( value_sym  ,
"value"   
)
SCM_SYMBOL ( both_sym  ,
"both"   
)
SCM_SYMBOL ( none_sym  ,
"none"   
)
SCM_SYMBOL ( square_sym  ,
"square"   
)
SCM_SYMBOL ( round_sym  ,
"round"   
)
SCM_SYMBOL ( solid_sym  ,
"solid"   
)
SCM_SYMBOL ( dotted_sym  ,
"dotted"   
)
SCM_SYMBOL ( dashed_sym  ,
"dashed"   
)
SCM_SYMBOL ( center_sym  ,
"center"   
)
SCM_SYMBOL ( phantom_sym  ,
"phantom"   
)
SCM_SYMBOL ( hollow_sym  ,
"hollow"   
)
SCM_SYMBOL ( mesh_sym  ,
"mesh"   
)
SCM_SYMBOL ( hatch_sym  ,
"hatch"   
)
SCM_SYMBOL ( moveto_sym  ,
"moveto"   
)
SCM_SYMBOL ( lineto_sym  ,
"lineto"   
)
SCM_SYMBOL ( curveto_sym  ,
"curveto"   
)
SCM_SYMBOL ( closepath_sym  ,
"closepath"   
)
void o_page_changed ( TOPLEVEL t,
OBJECT o 
) [inline]

Definition at line 76 of file scheme_object.c.

Here is the call graph for this function:

GList* edascm_to_object_glist ( SCM  objs,
const char *  subr 
)
Function Description
Takes a Scheme list of OBJECT smobs, and returns a GList containing the objects. If objs is not a list of OBJECT smobs, throws a Scheme error.
Warning:
If the OBJECT structures in the GList are to be stored by C code and later free()'d directly, the smobs must be marked as unsafe for garbage collection (by calling edascm_c_set_gc()).
Parameters:
[in]objsa Scheme list of OBJECT smobs.
[in]subrthe name of the Scheme subroutine (used for error messages).
Returns:
a #GList of OBJECT.

Definition at line 98 of file scheme_object.c.

Here is the call graph for this function:

SCM edascm_from_object_glist ( const GList *  objs)
Function Description
Takes a GList of OBJECT and returns a Scheme list of corresponding object smobs.
Warning:
If the OBJECT structures are to be subsequently managed only by Scheme, the smobs in the returned list must be marked as safe for garbage collection (by calling edascm_c_set_gc()).
Parameters:
[in]objsa #GList of OBJECT instances.
Returns:
a Scheme list of smobs corresponding to each OBJECT.

Definition at line 133 of file scheme_object.c.

Here is the call graph for this function:

int edascm_is_object_type ( SCM  smob,
int  type 
)
Function Description
Checks if smob contains an OBJECT of the given type. This is intended to be used by C-based Scheme procedures for working with particular object types.
Parameters:
[in]smobScheme value to check type for.
[in]typeType to check against (e.g. OBJ_LINE).
Returns:
non-zero if smob is an OBJECT smob of type.

Definition at line 161 of file scheme_object.c.

Here is the call graph for this function:

SCM_DEFINE ( copy_object  ,
"%copy-object"  ,
,
,
,
(SCM obj_s)  ,
"Copy an object."   
)
Function Description
Returns a copy of the OBJECT contained in smob obj_s as a new smob.
Note:
Scheme API: Implements the copy-object procedure in the (geda core object) module.
Parameters:
[in]obj_san OBJECT smob.
Returns:
a new OBJECT smob containing a copy of the OBJECT in obj_s.

Definition at line 180 of file scheme_object.c.

Here is the call graph for this function:

SCM_DEFINE ( object_type  ,
"%object-type"  ,
,
,
,
(SCM obj_s)  ,
"Get an object smob's type"   
)
Function Description
Returns a symbol describing the type of the OBJECT smob obj_s.
Note:
Scheme API: Implements the object-type procedure in the (geda core object) module.
Parameters:
[in]obj_san OBJECT smob.
Returns:
a Scheme symbol representing the object type.

Definition at line 209 of file scheme_object.c.

Here is the call graph for this function:

SCM_DEFINE ( object_bounds  ,
"%object-bounds"  ,
,
,
,
(SCM rst_s)  ,
"Get the bounds of a list of objects"   
)
Function Description
Returns the bounds of the objects in the variable-length argument list rst_s. The bounds are returned as a pair structure of the form:
 ((left . top) . (right . bottom))

If rst_s is empty, or none of the objects has any bounds (e.g. because they are all empty components and/or text strings), returns SCM_BOOL_F.

Warning:
This function always returns the actual bounds of the objects, not the visible bounds.
Note:
Scheme API: Implements the object-bounds procedure in the (geda core object) module. The procedure takes any number of OBJECT smobs as arguments.
Parameters:
[in]rst_sVariable-length list of OBJECT arguments.
Returns:
bounds of objects or SCM_BOOL_F.

Definition at line 264 of file scheme_object.c.

Here is the call graph for this function:

SCM_DEFINE ( object_stroke  ,
"%object-stroke"  ,
,
,
,
(SCM obj_s)  ,
"Get the stroke properties of an object."   
)
Function Description
Returns the stroke settings of the object obj_s. If obj_s is not a line, box, circle, arc, or path, throws a Scheme error. The return value is a list of parameters:
  1. stroke width
  2. cap style (a symbol: none, square or round)
  3. dash style (a symbol: solid, dotted, dashed, center or phantom)
  4. up to two dash parameters, depending on dash style:
    1. For solid lines, no parameters.
    2. For dotted lines, dot spacing.
    3. For other styles, dot/dash spacing and dash length.
Note:
Scheme API: Implements the object-stroke procedure in the (geda core object) module.
Parameters:
obj_sobject to get stroke settings for.
Returns:
a list of stroke parameters.

Definition at line 319 of file scheme_object.c.

Here is the call graph for this function:

SCM_DEFINE ( set_object_stroke_x  ,
"%set-object-stroke!"  ,
,
,
,
(SCM obj_s, SCM width_s, SCM cap_s, SCM dash_s, SCM space_s,SCM length_s)  ,
"Set the stroke properties of an object."   
)
Function Description
Updates the stroke settings of the object obj_s. If obj_s is not a line, box, circle, arc, or path, throws a Scheme error. The optional parameters space_s and length_s can be set to SCM_UNDEFINED if not required by the dash style dash_s.
Note:
Scheme API: Implements the object-stroke procedure in the (geda core object) module.
Parameters:
obj_sobject to set stroke settings for.
width_snew stroke width for obj_s.
cap_snew stroke cap style for obj_s.
dash_snew dash style for obj_s.
space_sdot/dash spacing for dash styles other than solid.
length_sdash length for dash styles other than solid or dotted.
Returns:
obj_s.

Definition at line 394 of file scheme_object.c.

Here is the call graph for this function:

SCM_DEFINE ( object_fill  ,
"%object-fill"  ,
,
,
,
(SCM obj_s)  ,
"Get the fill properties of an object."   
)
Function Description
Returns the fill settings of the object obj_s. If obj_s is not a box, circle, or path, throws a Scheme error. The return value is a list of parameters:
  1. fill style (a symbol: hollow, solid, mesh or hatch)
  2. up to five fill parameters, depending on fill style:
    1. none for hollow or solid fills
    2. line width, line angle, and line spacing for hatch fills.
    3. line width, first angle and spacing, and second angle and spacing for mesh fills.
Note:
Scheme API: Implements the object-fill procedure in the (geda core object) module.
Parameters:
obj_sobject to get fill settings for.
Returns:
a list of fill parameters.

Definition at line 488 of file scheme_object.c.

Here is the call graph for this function:

SCM_DEFINE ( set_object_fill_x  ,
"%set-object-fill!"  ,
,
,
,
(SCM obj_s, SCM type_s, SCM width_s, SCM space1_s, SCM angle1_s,SCM space2_s, SCM angle2_s)  ,
"Set the fill properties of an object."   
)
Function Description

Updates the fill settings of the object obj_s. If obj_s is not a box, circle, or path, throws a Scheme error. The optional parameters width_s, angle1_s, space1_s, angle2_s and space2_s

Note:
Scheme API: Implements the object-fill procedure in the (geda core object) module.
Parameters:
obj_sobject to set fill settings for.
Returns:
obj_s.

Definition at line 545 of file scheme_object.c.

Here is the call graph for this function:

SCM_DEFINE ( object_color  ,
"%object-color"  ,
,
,
,
(SCM obj_s)  ,
"Get the color of an object."   
)
Function Description
Returns the colormap index of the color used to draw the OBJECT smob obj_s. Note that the color may not be meaningful for some object types.
Note:
Scheme API: Implements the object-color procedure in the (geda core object) module.
Parameters:
[in]obj_sOBJECT smob to inspect.
Returns:
The colormap index used by obj_s.

Definition at line 638 of file scheme_object.c.

Here is the call graph for this function:

SCM_DEFINE ( set_object_color_x  ,
"%set-object-color!"  ,
,
,
,
(SCM obj_s, SCM color_s)  ,
"Set the color of an object."   
)
Function Description
Set the colormap index of the color used to draw the OBJECT smob obj_s to color_s. Note that the color may not be meaningful for some object types.
Note:
Scheme API: Implements the set-object-color! procedure in the (geda core object) module.
Parameters:
obj_sOBJECT smob to modify.
color_snew colormap index to use for obj_s.
Returns:
the modified obj_s.

Definition at line 661 of file scheme_object.c.

Here is the call graph for this function:

SCM_DEFINE ( make_line  ,
"%make-line"  ,
,
,
,
()  ,
"Create a new line object."   
)
Function Description
Creates a new line object, with all its parameters set to default values.
Note:
Scheme API: Implements the make-line procedure in the (geda core object) module.
Returns:
a newly-created line object.

Definition at line 688 of file scheme_object.c.

Here is the call graph for this function:

SCM_DEFINE ( set_line_x  ,
"%set-line!"  ,
,
,
,
(SCM line_s, SCM x1_s, SCM y1_s, SCM x2_s, SCM y2_s, SCM color_s)  ,
"Set line parameters."   
)
Function Description
Modifies a line object by setting its parameters to new values.
Note:
Scheme API: Implements the set-line! procedure in the (geda core object) module.

This function also works on net, bus and pin objects. For pins, the start is the connectable point on the pin.

Parameters:
line_sthe line object to modify.
x1_sthe new x-coordinate of the start of the line.
y1_sthe new y-coordinate of the start of the line.
x2_sthe new x-coordinate of the end of the line.
y2_sthe new y-coordinate of the end of the line.
colorthe colormap index of the color to be used for drawing the line.
Returns:
the modified line object.

Definition at line 724 of file scheme_object.c.

Here is the call graph for this function:

SCM_DEFINE ( line_info  ,
"%line-info"  ,
,
,
,
(SCM line_s)  ,
"Get line parameters."   
)
Function Description
Retrieves the parameters of a line object. The return value is a list of parameters:
  1. X-coordinate of start of line
  2. Y-coordinate of start of line
  3. X-coordinate of end of line
  4. Y-coordinate of end of line
  5. Colormap index of color to be used for drawing the line

This function also works on net, bus and pin objects. For pins, the start is the connectable point on the pin.

Parameters:
line_sthe line object to inspect.
Returns:
a list of line parameters.

Definition at line 799 of file scheme_object.c.

Here is the call graph for this function:

SCM_DEFINE ( make_net  ,
"%make-net"  ,
,
,
,
()  ,
"Create a new net object."   
)
Function Description
Creates a new net object, with all its parameters set to default values.
Note:
Scheme API: Implements the make-net procedure in the (geda core object) module.
Returns:
a newly-created net object.

Definition at line 835 of file scheme_object.c.

Here is the call graph for this function:

SCM_DEFINE ( make_bus  ,
"%make-bus"  ,
,
,
,
()  ,
"Create a new bus object."   
)
Function Description
Creates a new bus object, with all its parameters set to default values.
Note:
Scheme API: Implements the make-bus procedure in the (geda core object) module.
Todo:
Do we need a way to get/set bus ripper direction?
Returns:
a newly-created bus object.

Definition at line 866 of file scheme_object.c.

Here is the call graph for this function:

SCM_DEFINE ( make_pin  ,
"%make-pin"  ,
,
,
,
(SCM type_s)  ,
"Create a new pin object."   
)
Function description
Creates a new pin object, with all parameters set to default values. type_s is a Scheme symbol indicating whether the pin should be a "net" pin or a "bus" pin.
Note:
Scheme API: Implements the make-pin procedure in the (geda core object) module.
Returns:
a newly-created pin object.

Definition at line 896 of file scheme_object.c.

Here is the call graph for this function:

SCM_DEFINE ( pin_type  ,
"%pin-type"  ,
,
,
,
(SCM pin_s)  ,
"Get the type of a pin object."   
)
Function Description
Returns a symbol describing the pin type of the pin object pin_s.
Note:
Scheme API: Implements the make-pin procedure in the (geda core object) module.
Returns:
the symbol 'pin or 'bus.

Definition at line 934 of file scheme_object.c.

Here is the call graph for this function:

SCM_DEFINE ( make_box  ,
"%make-box"  ,
,
,
,
()  ,
"Create a new box object."   
)
Function Description
Creates a new box object, with all its parameters set to default values.
Note:
Scheme API: Implements the make-box procedure in the (geda core object) module.
Returns:
a newly-created box object.

Definition at line 969 of file scheme_object.c.

Here is the call graph for this function:

SCM_DEFINE ( set_box_x  ,
"%set-box!"  ,
,
,
,
(SCM box_s, SCM x1_s, SCM y1_s, SCM x2_s, SCM y2_s, SCM color_s)  ,
"Set box parameters."   
)
Function Description
Modifies a box object by setting its parameters to new values.
Note:
Scheme API: Implements the set-box! procedure in the (geda core object) module.
Parameters:
box_sthe box object to modify.
x1_sthe new x-coordinate of the top left of the box.
y1_sthe new y-coordinate of the top left of the box.
x2_sthe new x-coordinate of the bottom right of the box.
y2_sthe new y-coordinate of the bottom right of the box.
colorthe colormap index of the color to be used for drawing the box.
Returns:
the modified box object.

Definition at line 1002 of file scheme_object.c.

Here is the call graph for this function:

SCM_DEFINE ( box_info  ,
"%box-info"  ,
,
,
,
(SCM box_s)  ,
"Get box parameters."   
)
Function Description
Retrieves the parameters of a box object. The return value is a list of parameters:
  1. X-coordinate of top left of box
  2. Y-coordinate of top left of box
  3. X-coordinate of bottom right of box
  4. Y-coordinate of bottom right of box
  5. Colormap index of color to be used for drawing the box
Parameters:
box_sthe box object to inspect.
Returns:
a list of box parameters.

Definition at line 1040 of file scheme_object.c.

Here is the call graph for this function:

SCM_DEFINE ( make_circle  ,
"%make-circle"  ,
,
,
,
()  ,
"Create a new circle object."   
)
Function Description

Creates a new circle object, with all its parameters set to default values.

Note:
Scheme API: Implements the make-circle procedure in the (geda core object) module.
Returns:
a newly-created circle object.

Definition at line 1067 of file scheme_object.c.

Here is the call graph for this function:

SCM_DEFINE ( set_circle_x  ,
"%set-circle!"  ,
,
,
,
(SCM circle_s, SCM x_s, SCM y_s, SCM r_s, SCM color_s)  ,
"Set circle parameters"   
)
Function Description
Modifies a circle object by setting its parameters to new values.
Note:
Scheme API: Implements the set-circle! procedure in the (geda core object) module.
Parameters:
circle_sthe circle object to modify.
x_sthe new x-coordinate of the center of the circle.
y_sthe new y-coordinate of the center of the circle.
r_sthe new radius of the circle.
colorthe colormap index of the color to be used for drawing the circle.
Returns:
the modified circle object.

Definition at line 1099 of file scheme_object.c.

Here is the call graph for this function:

SCM_DEFINE ( circle_info  ,
"%circle-info"  ,
,
,
,
(SCM circle_s)  ,
"Get circle parameters."   
)
Function Description

Retrieves the parameters of a circle object. The return value is a list of parameters:

  1. X-coordinate of center of circle
  2. Y-coordinate of center of circle
  3. Radius of circle
  4. Colormap index of color to be used for drawing the circle
Parameters:
circle_sthe circle object to inspect.
Returns:
a list of circle parameters.

Definition at line 1136 of file scheme_object.c.

Here is the call graph for this function:

SCM_DEFINE ( make_arc  ,
"%make-arc"  ,
,
,
,
()  ,
"Create a new arc object."   
)
Function Description
Creates a new arc object, with all its parameters set to default values.
Note:
Scheme API: Implements the make-arc procedure in the (geda core object) module.
Returns:
a newly-created arc object.

Definition at line 1161 of file scheme_object.c.

Here is the call graph for this function:

SCM_DEFINE ( set_arc_x  ,
"%set-arc!"  ,
,
,
,
(SCM arc_s, SCM x_s, SCM y_s, SCM r_s, SCM start_angle_s,SCM end_angle_s, SCM color_s)  ,
"Set arc parameters"   
)
Function Description
Modifies a arc object by setting its parameters to new values.
Note:
Scheme API: Implements the set-arc! procedure in the (geda core object) module.
Parameters:
arc_sthe arc object to modify.
x_sthe new x-coordinate of the center of the arc.
y_sthe new y-coordinate of the center of the arc.
r_sthe new radius of the arc.
start_angle_sthe start angle of the arc.
end_angle_sthe start angle of the arc.
color_sthe colormap index of the color to be used for drawing the arc.
Returns:
the modified arc object.

Definition at line 1195 of file scheme_object.c.

Here is the call graph for this function:

SCM_DEFINE ( arc_info  ,
"%arc-info"  ,
,
,
,
(SCM arc_s)  ,
"Get arc parameters."   
)
Function Description
Retrieves the parameters of a arc object. The return value is a list of parameters:
  1. X-coordinate of center of arc
  2. Y-coordinate of center of arc
  3. Radius of arc
  4. Start angle of arc
  5. End angle of arc
  6. Colormap index of color to be used for drawing the arc
Note:
Scheme API: Implements the arc-info procedure in the (geda core object) module.
Parameters:
arc_sthe arc object to inspect.
Returns:
a list of arc parameters.

Definition at line 1243 of file scheme_object.c.

Here is the call graph for this function:

SCM_DEFINE ( make_text  ,
"%make-text"  ,
,
,
,
()  ,
"Create a new text object."   
)
Function Description
Creates a new text object, with all its parameters set to default values.
Note:
Scheme API: Implements the make-text procedure in the (geda core object) module.
Returns:
a newly-created text object.

Definition at line 1270 of file scheme_object.c.

Here is the call graph for this function:

SCM_DEFINE ( set_text_x  ,
"%set-text!"  ,
10  ,
,
,
(SCM text_s, SCM x_s, SCM y_s, SCM align_s, SCM angle_s,SCM string_s, SCM size_s, SCM visible_s, SCM show_s, SCM color_s)  ,
"Set text parameters"   
)
Function Description
Modifies a text object by setting its parameters to new values.

The alignment align_s should be a symbol of the form "x-y" where x can be one of "lower", "middle", or "upper", and y can be one of "left", "center" or "right". show_s determines which parts of an attribute-formatted string should be shown, and should be one of the symbols "name", "value" or "both".

Note:
Scheme API: Implements the set-text! procedure in the (geda core object) module.
Parameters:
text_sthe text object to modify.
x_sthe new x-coordinate of the anchor of the text.
y_sthe new y-coordinate of the anchor of the text.
align_sthe new alignment of the text on the anchor.
angle_sthe angle the text in degrees (0, 90, 180 or 270).
string_sthe new string to display.
size_sthe new text size.
visible_sthe new text visibility (SCM_BOOL_T or SCM_BOOL_F).
show_sthe new attribute part visibility setting.
color_sthe colormap index of the color to be used for drawing the text.
Returns:
the modified text object.

Definition at line 1314 of file scheme_object.c.

Here is the call graph for this function:

SCM_DEFINE ( text_info  ,
"%text-info"  ,
,
,
,
(SCM text_s)  ,
"Get text parameters."   
)
Function Description
Retrieves the parameters of a text object. The return value is a list of parameters:
  1. X-coordinate of anchor of text
  2. Y-coordinate of anchor of text
  3. Alignment of text
  4. Angle of text
  5. The string contained in the text object
  6. Size of text
  7. Text visibility
  8. Which part(s) of an text attribute are shown
  9. Colormap index of color to be used for drawing the text
Note:
Scheme API: Implements the text-info procedure in the (geda core object) module.
Parameters:
text_sthe text object to inspect.
Returns:
a list of text parameters.

Definition at line 1435 of file scheme_object.c.

Here is the call graph for this function:

SCM_DEFINE ( object_connections  ,
"%object-connections"  ,
,
,
,
(SCM obj_s)  ,
"Get objects that are connected to an object."   
)
Function Description
Returns a list of all objects directly connected to obj_s. If obj_s is not included in a page, throws a Scheme error. If obj_s is not a pin, net, bus, or complex object, returns the empty list.
Note:
Scheme API: Implements the object-connections procedure of the (geda core object) module.
Parameters:
obj_sOBJECT smob for object to get connections for.
Returns:
a list of OBJECT smobs.

Definition at line 1505 of file scheme_object.c.

Here is the call graph for this function:

SCM_DEFINE ( object_complex  ,
"%object-complex"  ,
,
,
,
(SCM obj_s)  ,
"Get containing complex object of an object."   
)
Function Description
Returns the complex object that contains the object obj_s. If obj_s is not part of a component, returns SCM_BOOL_F.
Note:
Scheme API: Implements the object-complex procedure of the (geda core object) module.
Parameters:
obj_sOBJECT smob for object to get component of.
Returns:
the OBJECT smob of the containing component, or SCM_BOOL_F.

Definition at line 1538 of file scheme_object.c.

Here is the call graph for this function:

SCM_DEFINE ( make_path  ,
"%make-path"  ,
,
,
,
()  ,
"Create a new path object"   
)
Function Description
Creates a new, empty path object with default color, stroke and fill options.
Note:
Scheme API: Implements the make-path procedure in the (geda core object) module.
Returns:
a newly-created path object.

Definition at line 1564 of file scheme_object.c.

Here is the call graph for this function:

SCM_DEFINE ( path_length  ,
"%path-length"  ,
,
,
,
(SCM obj_s)  ,
"Get number of elements in a path object."   
)
Function Description
Retrieves the number of path elements in the path object obj_s.
Note:
Scheme API: Implements the path-length procedure in the (geda core object) module.
Parameters:
obj_sOBJECT smob for path object to inspect.
Returns:
The number of path elements in obj_s.

Definition at line 1589 of file scheme_object.c.

Here is the call graph for this function:

SCM_DEFINE ( path_ref  ,
"%path-ref"  ,
,
,
,
(SCM obj_s, SCM index_s)  ,
"Get a path element from a path object."   
)
Function Description
Retrieves a path element at index index_s from the path object obj_s. If index_s is not a valid index, raises a Scheme "out-of-range" error.

The return value is a list. The first element in the list is a symbol indicating the type of path element ("moveto", "lineto", "curveto" or "closepath"), and the remainder of the list contains zero or more control point coordinates, depending on the type of path element. Each element is evaluated relative to the current path position.

  • moveto: x and y coordinates of position to step to.
  • lineto: x and y coordinates of straight line endpoint.
  • curveto: coordinates of first Bezier control point; coordinates of second control point; and coordinates of curve endpoint.
  • closepath: No coordinate parameters.

All coordinates are absolute.

Note:
Scheme API: Implements the path-ref procedure in the (geda core object) module.
Parameters:
obj_sOBJECT smob of path object to get element from.
index_sIndex of element to retrieve from obj_s
Returns:
A list containing the requested path element data.

Definition at line 1628 of file scheme_object.c.

Here is the call graph for this function:

SCM_DEFINE ( path_remove_x  ,
"%path-remove!"  ,
,
,
,
(SCM obj_s, SCM index_s)  ,
"Remove a path element from a path object."   
)
Function Description
Removes the path element at index index_s from the path object obj_s. If index_s is not a valid index, raises a Scheme "out-of-range" error.
Note:
Scheme API: Implements the path-remove! procedure in the (geda core object) module.
Parameters:
obj_sOBJECT smob of path object to remove element from.
index_sIndex of element to remove from obj_s.
Returns:
obj_s.

Definition at line 1689 of file scheme_object.c.

Here is the call graph for this function:

SCM_DEFINE ( path_insert_x  ,
"%path-insert"  ,
,
,
,
(SCM obj_s, SCM index_s, SCM type_s,SCM x1_s, SCM y1_s, SCM x2_s, SCM y2_s, SCM x3_s, SCM y3_s)  ,
"Insert a path element into a path object."   
)
Function Description
Inserts a path element into the path object obj_s at index index_s. The type of element to be inserted is specified by the symbol type_s, and the remaining optional integer arguments provide as many absolute coordinate pairs as are required by that element type:
  • "closepath" elements require no coordinate arguments;
  • "moveto" and "lineto" elements require one coordinate pair, for the endpoint;
  • "curveto" elements require the coordinates of the first control point, coordinates of the second control point, and coordinates of the endpoint.

If the index is negative, or is greater than or equal to the number of elements currently in the path, the new element will be appended to the path.

Note:
Scheme API: Implements the path-insert! procedure of the (geda core object) module.
Parameters:
obj_sOBJECT smob for the path object to modify.
index_sIndex at which to insert new element.
type_sSymbol indicating what type of element to insert.
x1_sX-coordinate of first coordinate pair.
y1_sY-coordinate of first coordinate pair.
x2_sX-coordinate of second coordinate pair.
y2_sY-coordinate of second coordinate pair.
x3_sX-coordinate of third coordinate pair.
y3_sY-coordinate of third coordinate pair.
Returns:
obj_s.

Definition at line 1762 of file scheme_object.c.

Here is the call graph for this function:

SCM_DEFINE ( make_picture  ,
"%make-picture"  ,
,
,
,
()  ,
"Create a new picture object"   
)
Function Description
Creates a new picture object with no filename, no image data and all other parameters set to default values. It is initially set to be embedded.
Note:
Scheme API: Implements the make-picture procedure in the (geda core object) module.
Returns:
a newly-created picture object.

Definition at line 1855 of file scheme_object.c.

Here is the call graph for this function:

SCM_DEFINE ( picture_info  ,
"%picture-info"  ,
,
,
,
(SCM obj_s)  ,
"Get picture object parameters"   
)
Function Description
Retrieves the parameters of a picture object. The return value is a list of parameters:
  1. Filename of picture.
  2. X-coordinate of top left of picture.
  3. Y-coordinate of top left of picture.
  4. X-coordinate of bottom right of picture.
  5. Y-coordinate of bottom right of picture.
  6. Rotation angle.
  7. Whether object is mirrored.
Note:
Scheme API: Implements the picture-info procedure in the (geda core object) module.
Parameters:
obj_sthe picture object to inspect.
Returns:
a list of picture object parameters.

Definition at line 1889 of file scheme_object.c.

Here is the call graph for this function:

SCM_DEFINE ( set_picture_x  ,
"%set-picture!"  ,
,
,
,
(SCM obj_s, SCM x1_s, SCM y1_s, SCM x2_s, SCM y2_s, SCM angle_s,SCM mirror_s)  ,
"Set picture object parameters"   
)

Definition at line 1930 of file scheme_object.c.

Here is the call graph for this function:

SCM_DEFINE ( set_picture_data_vector_x  ,
"%set-picture-data/vector!"  ,
,
,
,
(SCM obj_s, SCM data_s, SCM filename_s)  ,
"Set a picture object's data from a vector."   
)
Function Description
Sets the image data for the picture object obj_s from the vector data_s, and set its filename. If the contents of data_s could not be successfully loaded as an image, raises an error. The contents of data_s should be image data encoded in on-disk format.
Note:
Scheme API: Implements the set-picture-data/vector! procedure in the (geda core object) module.
Parameters:
obj_sThe picture object to modify.
data_sVector containing encoded image data.
filename_sNew filename for obj_s.
Returns:
obj_s.

Definition at line 1989 of file scheme_object.c.

Here is the call graph for this function:

SCM_DEFINE ( translate_object_x  ,
"%translate-object!"  ,
,
,
,
(SCM obj_s, SCM dx_s, SCM dy_s)  ,
"Translate an object."   
)
Function Description
Translates obj_s by dx_s in the x-axis and dy_s in the y-axis.
Note:
Scheme API: Implements the translate-object! procedure of the (geda core object) module.
Parameters:
obj_sOBJECT smob for object to translate.
dx_sInteger distance to translate along x-axis.
dy_sInteger distance to translate along y-axis.
Returns:
obj_s.

Definition at line 2057 of file scheme_object.c.

Here is the call graph for this function:

SCM_DEFINE ( rotate_object_x  ,
"%rotate-object!"  ,
,
,
,
(SCM obj_s, SCM x_s, SCM y_s, SCM angle_s)  ,
"Rotate an object."   
)
Function Description
Rotates obj_s anti-clockwise by angle_s about the point specified by x_s and y_s. angle_s must be an integer multiple of 90 degrees.
Note:
Scheme API: Implements the rotate-object! procedure of the (geda core object) module.
Parameters:
obj_sOBJECT smob for object to translate.
x_sx-coordinate of centre of rotation.
y_sy-coordinate of centre of rotation.
angle_sAngle to rotate by.
Returns:
obj_s.

Definition at line 2096 of file scheme_object.c.

Here is the call graph for this function:

SCM_DEFINE ( mirror_object_x  ,
"%mirror-object!"  ,
,
,
,
(SCM obj_s, SCM x_s)  ,
"Mirror an object."   
)
Function Description
Mirrors obj_s in the line x = x_s.
Note:
Scheme API: Implements the mirror-object! procedure of the (geda core object) module.
Parameters:
obj_sOBJECT smob for object to translate.
x_sx-coordinate of centre of rotation.
Returns:
obj_s.

Definition at line 2143 of file scheme_object.c.

Here is the call graph for this function:

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

Definition at line 2172 of file scheme_object.c.

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

Definition at line 2206 of file scheme_object.c.

Here is the call graph for this function:

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines