Gtk-Server Seed7 Interface

### TABLE OF CONTENTS

- gtkserver/gtk
- gtkserver/gtk_exec
- gtkserver/gtk_start
- gtkserver/gtk_stop
- gtkserver/set_gtk_logging

## gtkserver/gtk [ Functions ]

[ Top ] [ Functions ]

NAME

       gtk -- Invoke a gtk-server command and return the result

SYNOPSIS

       const func string: gtk (in string: cmd)

FUNCTION

       Invoke a gtk-server command and return the result to the caller.
       The connection must be already started.

SEE ALSO

       gtk_start

NOTES

       This function doesn't verify the command syntax so the gtk-server
       command must be correct.

EXAMPLE

       wptr:=gtk("gtk_window_new 0");
       gtk_exec("gtk_window_set_title " <& wptr <& " \"Gtk-Server Example\"");
       vbox:=gtk("gtk_vbox_new 1 1");
       bt_one:=gtk("gtk_button_new_with_label \"First Button\"");
       bt_two:=gtk("gtk_button_new_with_label \"Second Button\"");

## gtkserver/gtk_exec [ Functions ]

[ Top ] [ Functions ]

NAME

       gtk -- Invoke a gtk-server command and discard the result

SYNOPSIS

       const proc: gtk_exec (in string: cmd)

FUNCTION

       Invoke a gtk-server command and discard the command result.
       The connection must be already started.

SEE ALSO

       gtk_start
       gtk_exec
       gtk

NOTES

       This function doesn't verify the command syntax so the gtk-server
       command must be correct.

## gtkserver/gtk_start [ Functions ]

[ Top ] [ Functions ]

NAME

       gtk_start -- Start the connection with the Gtk-Server

SYNOPSIS

       const proc: gtk_start(in integer: gtk_server_port)

FUNCTION

       Activate the TCP connection with the gtk-server; the port to use must be specified.
       Please note that the gtk-server must be already started and listening on that
       TCP port.
       The gtk-server is only connected and not initialized so you must call the
       gtk_init gtk-server command before creating your gui.

INPUTS

       port - The port to use in the gtk-server connection

EXAMPLE

       set_gtk_logging(FALSE);
       gtk_start(8765);
       gtk_exec("gtk_init NULL NULL");
       main_window();
       gtk_stop();

NOTES

       Please note that, before trying the previous example, you must start the gtk-server
       with the following command:

       gtk-server tcp=127.0.0.1:8765

SEE ALSO

       gtk_stop

## gtkserver/gtk_stop [ Functions ]

[ Top ] [ Functions ]

NAME

       gtk_stop -- Close the gtk-server connection

SYNOPSIS

       const proc: gtk_stop

FUNCTION

       Close the TCP connection with the gtk-server.
       The connection must be already started.

SEE ALSO

       gtk_start

## gtkserver/set_gtk_logging [ Functions ]

[ Top ] [ Functions ]

NAME

       set_gtk_logging -- Activate or deactivate the gtk-server logging facility

SYNOPSIS

       const proc: set_gtk_logging (in boolean: status)

FUNCTION

       Activate or deactivate the gtk-server logging facility. If the gtk-server
       logging facility is active you will see printed in the console the
       gtk-server command that is currently invoked and the relative result

INPUTS

       flag - A boolean flag. If it's true the gtk-server logging facility is
              activated, otherwise is deactivated