gschem

g_hook.c File Reference

#include <config.h>
#include <missing.h>
#include <stdio.h>
#include <math.h>
#include "gschem.h"
#include "g_hook.x"
Include dependency graph for g_hook.c:

Go to the source code of this file.

Defines

#define DEFINE_HOOK(name)

Functions

 SCM_SYMBOL (at_sym,"@")
 SCM_SYMBOL (gschem_sym,"gschem")
 SCM_SYMBOL (core_sym,"core")
 SCM_SYMBOL (hook_sym,"hook")
 SCM_SYMBOL (run_hook_sym,"run-hook")
 SCM_SYMBOL (list_sym,"list")
static SCM g_get_hook_by_name (const char *name)
 Gets a Scheme hook object by name.
void g_run_hook_object_list (GSCHEM_TOPLEVEL *w_current, const char *name, GList *obj_lst)
 Runs a object hook for a list of objects.
void g_run_hook_object (GSCHEM_TOPLEVEL *w_current, const char *name, OBJECT *obj)
 Runs a object hook with a single OBJECT.
void g_run_hook_page (GSCHEM_TOPLEVEL *w_current, const char *name, PAGE *page)
 Runs a page hook.
static void init_module_gschem_core_hook ()
 Create the (gschem core hook) Scheme module.
void g_init_hook ()
 Initialise the gschem hooks.

Define Documentation

#define DEFINE_HOOK (   name)
Value:
do { \
    scm_c_define (name, scm_make_hook (scm_from_int (1)));      \
    scm_c_export (name, NULL); \
  } while (0)

Function Documentation

SCM_SYMBOL ( at_sym  ,
"@"   
)
SCM_SYMBOL ( gschem_sym  ,
"gschem"   
)
SCM_SYMBOL ( core_sym  ,
"core"   
)
SCM_SYMBOL ( hook_sym  ,
"hook"   
)
SCM_SYMBOL ( run_hook_sym  ,
"run-hook"   
)
SCM_SYMBOL ( list_sym  ,
"list"   
)
static SCM g_get_hook_by_name ( const char *  name) [static]
Function Description
Returns the contents of variable with the given name in the (gschem core hook). Used for looking up hook objects.
Parameters:
namename of hook to lookup.
Returns:
value found in the (gschem core hook) module.

Definition at line 51 of file g_hook.c.

void g_run_hook_object_list ( GSCHEM_TOPLEVEL w_current,
const char *  name,
GList *  obj_lst 
)
Function Description
Runs a hook called name, which should expect a list of #OBJECT smobs as its argument, with obj_lst as the argument list.
See also:
g_run_hook_object()
Parameters:
namename of hook to run.
obj_lstlist of #OBJECT smobs as hook argument.

Definition at line 70 of file g_hook.c.

Here is the call graph for this function:

void g_run_hook_object ( GSCHEM_TOPLEVEL w_current,
const char *  name,
OBJECT *  obj 
)
Function Description
Runs a hook called name, which should expect a list of #OBJECT smobs as its argument, with a single-element list containing only obj.
See also:
g_run_hook_object_list()
Parameters:
namename of hook to run.
obj#OBJECT argument for hook.

Definition at line 103 of file g_hook.c.

Here is the call graph for this function:

void g_run_hook_page ( GSCHEM_TOPLEVEL w_current,
const char *  name,
PAGE *  page 
)
Function Description
Runs a hook called name, which should expect the single #PAGE page as its argument.
Parameters:
namename of hook to run
page#PAGE argument for hook.

Definition at line 126 of file g_hook.c.

Here is the call graph for this function:

static void init_module_gschem_core_hook ( ) [static]
Function Description
Defines some hooks in the (gschem core hook) module. These hooks allow Scheme callbacks to be triggered on certain gschem actions. For a description of the arguments and behaviour of these hooks, please see ../scheme/gschem/hook.scm.

Definition at line 148 of file g_hook.c.

void g_init_hook ( )
Function Description

Registers gschem's Guile hooks for various events.. Should only be called by main_prog().

Definition at line 180 of file g_hook.c.

Here is the call graph for this function:

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines