Gimp/plug-ins/script-fu/scheme-wrapper.h
lloyd konneker a3b242b2c5 ScriptFu: Break mutual includes between script-fu-server and scheme-wrapper
Instead, make outer script-fu-server register callbacks with inner scheme-wrapper.

Why? the inner scheme-wrapper should not know about the outer script-fu-server.
The change will allow a future, smaller scriptfu shared library,
that does not contain networking code.
We want a scriptfu library shared by separate script-fu-server,
future gimp-scheme-interpreter (!647), and script-fu executables.

This change does not alter observable functioning of the script-fu-server.
Except that I also changing the logging by script-fu-server,
so that I could test the changes.
I put a test plan in the comments.
2022-05-29 08:48:17 -04:00

52 lines
2 KiB
C

/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __SCHEME_WRAPPER_H__
#define __SCHEME_WRAPPER_H__
#include "tinyscheme/scheme.h"
typedef void (*TsCallbackFunc) (void);
void tinyscheme_init (GList *path,
gboolean register_scripts);
void ts_set_run_mode (GimpRunMode run_mode);
void ts_set_print_flag (gint print_flag);
void ts_print_welcome (void);
const gchar * ts_get_success_msg (void);
void ts_interpret_stdin (void);
/* if the return value is 0, success. error otherwise. */
gint ts_interpret_string (const gchar *expr);
void ts_stdout_output_func (TsOutputType type,
const char *string,
int len,
gpointer user_data);
void ts_gstring_output_func (TsOutputType type,
const char *string,
int len,
gpointer user_data);
void ts_register_quit_callback (TsCallbackFunc callback);
void ts_register_post_command_callback (TsCallbackFunc callback);
#endif /* __SCHEME_WRAPPER_H__ */