void init_sample_type (void) { sample_tag = scm_make_smob_type ("Sample", sizeof (Sample)); scm_set_smob_mark (sample_tag, 0); scm_set_smob_free (sample_tag, free_sample); scm_set_smob_print (sample_tag, print_sample); scm_c_define_gsubr ("load-sample", 1, 0, 0, load_sample); scm_c_define_gsubr ("play-sample", 4, 0, 0, play_sample); scm_c_export ("load-sample", NULL); scm_c_export ("play-sample", NULL); }
void yacl_init_guile (void) { scm_c_define_gsubr ("yacl-sha256", 1, 0, 0, yacl_scm_sha256); scm_c_define_gsubr ("yacl-gen-p256-key-pair", 0, 0, 0, yacl_scm_gen_p256_key_pair); scm_c_define_gsubr ("yacl-p256-sign", 2, 0, 0, yacl_scm_p256_sign); scm_c_define_gsubr ("yacl-p256-verify", 3, 0, 0, yacl_scm_p256_verify); scm_c_define_gsubr ("yacl-get-random", 1, 0, 0, yacl_scm_get_random); scm_c_define_gsubr ("yacl-hexdump", 1, 0, 0, yacl_scm_hexdump); scm_c_define_gsubr ("yacl-hkdf-sha256", 1, 2, 0, yacl_scm_hkdf_sha256); scm_c_define_gsubr ("yacl-b64url-encode", 1, 0, 0, yacl_scm_b64url_encode); scm_c_define_gsubr ("yacl-b64url-decode", 1, 0, 0, yacl_scm_b64url_decode); scm_c_export ("yacl-sha256", "yacl-gen-p256-key-pair", "yacl-p256-sign", "yacl-p256-verify", "yacl-get-random", "yacl-hexdump", "yacl-hkdf-sha256", "yacl-b64url-encode", "yacl-b64url-decode", NULL); yacl_init (); }
void init_gram_keysym_fns (void *data) { scm_c_define_gsubr ("swallow-next-key", 0, 0, 0, gram_key_swallow_next); scm_c_define_gsubr ("kbd", 1, 0, 0, gram_keysym_construct); scm_c_define_gsubr ("unmodified", 1, 0, 0, gram_keysym_unmodified); scm_c_export ("swallow-next-key", "kbd", "unmodified", NULL); }
void gram_keydown_hook_init (void) { gram_keydown_hook = scm_permanent_object (scm_make_hook (scm_from_unsigned_integer (2))); gram_keydown_hook_object = scm_permanent_object (scm_c_define ("keydown-hook", gram_keydown_hook)); scm_c_export ("keydown-hook", NULL); }
/*! * \brief Create the (geda core smob) Scheme module. * \par Function Description * Defines procedures in the (geda core smob) module. The module can * be accessed using (use-modules (geda core smob)). */ static void init_module_geda_core_smob () { /* Register the functions. */ #include "scheme_smob.x" /* Add them to the module's public definitions. */ scm_c_export (s_page_p, s_object_p, s_config_p, NULL); }
void wave_init_guile_procedures (void) { #include "wave.x" scm_c_export (// "wave-load-from-file", "wave-bytevector", "wave-get-max-length", "wave-get-length", "wave-set-length"); }
void gram_view_focus_hook_init (void) { gram_view_focus_hook = scm_permanent_object (scm_make_hook (scm_from_unsigned_integer (2))); gram_view_focus_hook_object = scm_permanent_object (scm_c_define ("view-focus-hook", gram_view_focus_hook)); scm_c_export ("view-focus-hook", NULL); }
void gram_output_created_hook_init (void) { gram_output_created_hook = scm_permanent_object (scm_make_hook (scm_from_unsigned_integer (1))); gram_output_created_hook_object = scm_permanent_object (scm_c_define ("output-created-hook", gram_output_created_hook)); scm_c_export ("output-created-hook", NULL); }
void gram_compositor_ready_hook_init (void) { gram_compositor_ready_hook = scm_permanent_object (scm_make_hook (scm_from_unsigned_integer (0))); gram_compositor_ready_hook_object = scm_permanent_object (scm_c_define ("compositor-ready-hook", gram_compositor_ready_hook)); scm_c_export ("compositor-ready-hook", NULL); }
void gdbscm_define_variables (const scheme_variable *variables, int is_public) { const scheme_variable *sv; for (sv = variables; sv->name != NULL; ++sv) { scm_c_define (sv->name, sv->value); if (is_public) scm_c_export (sv->name, NULL); } }
/*! \brief Create the (gschem core builtins) Scheme module. * \par Function Description * Defines procedures in the (gschem core builtins) module. The module can * be accessed using (use-modules (gschem core builtins)). */ static void init_module_gschem_core_builtins (void *unused) { int i; /* Register the functions and add them to the module's public * definitions. */ for (i = 0; builtins[i].name != NULL; ++i) { struct BuiltinInfo b = builtins[i]; scm_c_define_gsubr (b.name, b.req, b.opt, b.rst, (scm_t_subr) b.func); scm_c_export (b.name, NULL); } }
void gdbscm_define_integer_constants (const scheme_integer_constant *constants, int is_public) { const scheme_integer_constant *sc; for (sc = constants; sc->name != NULL; ++sc) { scm_c_define (sc->name, scm_from_int (sc->value)); if (is_public) scm_c_export (sc->name, NULL); } }
void gdbscm_define_functions (const scheme_function *functions, int is_public) { const scheme_function *sf; for (sf = functions; sf->name != NULL; ++sf) { SCM proc = scm_c_define_gsubr (sf->name, sf->required, sf->optional, sf->rest, sf->func); scm_set_procedure_property_x (proc, gdbscm_documentation_symbol, gdbscm_scm_from_c_string (sf->doc_string)); if (is_public) scm_c_export (sf->name, NULL); } }
/* Start the LazyCat main procedure. */ static void inner_main (void* closure, int argc, char** argv) { SCM main; SCM args; SCM module; scm_c_define_module ("lazycat prctl", init_prctl_module, NULL); module = scm_c_resolve_module ("lazycat daemon lazycatd"); scm_set_current_module (module); scm_c_define_gsubr ("c-set-lazycat-signals", 0, 0, 0, set_lazycat_signals); scm_c_export ("c-set-lazycat-signals", NULL); main = scm_c_module_lookup (module, "main"); args = scm_program_arguments (); scm_call_1 (scm_variable_ref (main), args); }
void mus_midi_init(void) #endif { XEN_DEFINE_PROCEDURE(S_mus_midi_open_read, g_mus_midi_open_read_w, 1, 0, 0, H_mus_midi_open_read); XEN_DEFINE_PROCEDURE(S_mus_midi_open_write, g_mus_midi_open_write_w, 1, 0, 0, H_mus_midi_open_write); XEN_DEFINE_PROCEDURE(S_mus_midi_close, g_mus_midi_close_w, 1, 0, 0, H_mus_midi_close); XEN_DEFINE_PROCEDURE(S_mus_midi_read, g_mus_midi_read_w, 2, 0, 0, H_mus_midi_read); XEN_DEFINE_PROCEDURE(S_mus_midi_write, g_mus_midi_write_w, 2, 0, 0, H_mus_midi_write); XEN_DEFINE_PROCEDURE(S_mus_midi_device_name, g_mus_midi_device_name_w, 0, 1, 0, H_mus_midi_device_name); XEN_DEFINE_PROCEDURE(S_mus_midi_describe, g_mus_midi_describe_w, 0, 0, 0, H_mus_midi_describe); #if WITH_MODULES scm_c_export(S_mus_midi_open_read, S_mus_midi_open_write, S_mus_midi_close, S_mus_midi_read, S_mus_midi_write, S_mus_midi_device_name, S_mus_midi_describe, NULL); #endif }
void init_prctl_module (void *data) { scm_c_define_gsubr ("prctl-pr-set-name!", 1, 0, 0, set_thread_name); scm_c_export ("prctl-pr-set-name!", NULL); }
void init_game_type (void) { game_tag = scm_make_smob_type ("Game", sizeof (Game)); scm_set_smob_mark (game_tag, mark_game); scm_set_smob_free (game_tag, free_game); scm_set_smob_print (game_tag, print_game); scm_c_define_gsubr ("make-game", 0, 0, 0, make_game); scm_c_define_gsubr ("game-on-start-hook", 2, 0, 0, on_start_hook); scm_c_define_gsubr ("game-on-update-hook", 2, 0, 0, on_update_hook); scm_c_define_gsubr ("game-on-draw-hook", 2, 0, 0, on_draw_hook); scm_c_define_gsubr ("game-on-key-pressed-hook", 2, 0, 0, on_key_pressed_hook); scm_c_define_gsubr ("game-on-key-released-hook", 2, 0, 0, on_key_released_hook); scm_c_define_gsubr ("game-init", 4, 0, 0, game_init); scm_c_define_gsubr ("game-run", 1, 0, 0, game_run); scm_c_define_gsubr ("game-stop", 1, 0, 0, game_stop); scm_c_define_gsubr ("game-get-time", 1, 0, 0, game_get_time); scm_c_define_gsubr ("game-display-width", 1, 0, 0, game_display_width); scm_c_define_gsubr ("game-display-height", 1, 0, 0, game_display_height); scm_c_define_gsubr ("game-resize-display", 3, 0, 0, game_resize_display); scm_c_define_gsubr ("game-fullscreen?", 1, 0, 0, game_fullscreen); scm_c_define_gsubr ("set-game-fullscreen", 2, 0, 0, set_game_fullscreen); scm_c_define_gsubr ("game-reset-draw-target", 1, 0, 0, reset_draw_target); scm_c_export ("make-game", NULL); scm_c_export ("game-on-start-hook", NULL); scm_c_export ("game-on-update-hook", NULL); scm_c_export ("game-on-draw-hook", NULL); scm_c_export ("game-on-key-pressed-hook", NULL); scm_c_export ("game-on-key-released-hook", NULL); scm_c_export ("game-init", NULL); scm_c_export ("game-run", NULL); scm_c_export ("game-stop", NULL); scm_c_export ("game-get-time", NULL); scm_c_export ("game-display-width", NULL); scm_c_export ("game-display-height", NULL); scm_c_export ("game-resize-display", NULL); scm_c_export ("game-fullscreen?", NULL); scm_c_export ("set-game-fullscreen", NULL); scm_c_export ("game-reset-draw-target", NULL); }
void init_a_sync_monotonic_time(void* unused) { scm_c_define_gsubr("have-monotonic-time?", 0, 0, 0, have_monotonic_time_p); scm_c_define_gsubr("get-time", 0, 0, 0, get_time); scm_c_export("have-monotonic-time?", NULL); scm_c_export("get-time", NULL); }