pure-data/src/x_gui.c

/* Copyright (c) 1997-2000 Miller Puckette.
* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.  */

/* dialogs.  LATER, deal with the situation where the object goes
away before the panel does... */

#include "m_pd.h"
#include "g_canvas.h"
#include "s_stuff.h"
#include <stdio.h>
#include <string.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include "m_private_utils.h"

/* --------------------- graphics responder  ---------------- */

/* gfxstub_* are deprecated for externals and shouldn't be used directly within Pd.
   however, the we do use them for implementing the high-level
   communication pdgui_stub_*(), so we do not want the compiler to shout out loud.
 */
#ifdef __GNUC__
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#elif defined _MSC_VER
#pragma warning( disable : 4996 )
#endif


/* make one of these if you want to put up a dialog window but want to be
protected from getting deleted and then having the dialog call you back.  In
this design the calling object doesn't have to keep the address of the dialog
window around; instead we keep a list of all open dialogs.  Any object that
might have dialogs, when it is deleted, simply checks down the dialog window
list and breaks off any dialogs that might later have sent messages to it.
Only when the dialog window itself closes do we delete the gfxstub object. */

static t_class *gfxstub_class;

t_gfxstub;

static t_gfxstub *gfxstub_list;

    /* create a new one.  the "key" is an address by which the owner
    will identify it later; if the owner only wants one dialog, this
    could just be a pointer to the owner itself.  The string "cmd"
    is a TK command to create the dialog, with "%s" embedded in
    it so we can provide a name by which the GUI can send us back
    messages; e.g., "pdtk_canvas_dofont %s 10". */

static t_symbol*gfxstub_symbol(t_gfxstub *x)
{}

void gfxstub_new(t_pd *owner, void *key, const char *cmd)
{}

static void gfxstub_offlist(t_gfxstub *x)
{}

    /* if the owner disappears, we still may have to stay around until our
    dialog window signs off.  Anyway we can now tell the GUI to destroy the
    window.  */
void gfxstub_deleteforkey(void *key)
{}

/* --------- pd messages for gfxstub (these come from the GUI) ---------- */

    /* "cancel" to request that we close the dialog window. */
static void gfxstub_cancel(t_gfxstub *x)
{}

    /* "signoff" comes from the GUI to say the dialog window closed. */
static void gfxstub_signoff(t_gfxstub *x)
{}

static t_binbuf *gfxstub_binbuf;

    /* a series of "data" messages rebuilds a scalar */
static void gfxstub_data(t_gfxstub *x, t_symbol *s, int argc, t_atom *argv)
{}
    /* the "end" message terminates rebuilding the scalar */
static void gfxstub_end(t_gfxstub *x)
{}

    /* anything else is a message from the dialog window to the owner;
    just forward it. */
static void gfxstub_anything(t_gfxstub *x, t_symbol *s, int argc, t_atom *argv)
{}

static void gfxstub_free(t_gfxstub *x)
{}

static void gfxstub_setup(void)
{}

#include <stdarg.h>
/* pdgui_*mess() are from s_inter_gui.c */
void pdgui_vamess(const char* message, const char* format, va_list args);
void pdgui_endmess(void);

static void _pdguistub_vamess(const char*dest, const char*fmt, ...)
{}
void pdgui_stub_vnew(t_pd *owner, const char* destination, void *key, const char* fmt, ...)
{}
void pdgui_stub_deleteforkey(void *key)
{}

/* -------------------------- openpanel ------------------------------ */

static t_class *openpanel_class;

t_openpanel;

static void *openpanel_new(t_floatarg mode)
{}

static void openpanel_symbol(t_openpanel *x, t_symbol *s)
{}

static void openpanel_bang(t_openpanel *x)
{}

static void openpanel_callback(t_openpanel *x, t_symbol *s, int argc, t_atom *argv)
{}

static void openpanel_free(t_openpanel *x)
{}

static void openpanel_setup(void)
{}

/* -------------------------- savepanel ------------------------------ */

static t_class *savepanel_class;

t_savepanel;

static void *savepanel_new(void)
{}

static void savepanel_symbol(t_savepanel *x, t_symbol *s)
{}

static void savepanel_bang(t_savepanel *x)
{}

static void savepanel_callback(t_savepanel *x, t_symbol *s)
{}

static void savepanel_free(t_savepanel *x)
{}

static void savepanel_setup(void)
{}

/* ---------------------- key and its relatives ------------------ */

static t_class *key_class, *keyup_class, *keyname_class;

t_key;

static void *key_new(void)
{}

static void key_float(t_key *x, t_floatarg f)
{}

static void key_free(t_key *x)
{}

t_keyup;

static void *keyup_new(void)
{}

static void keyup_float(t_keyup *x, t_floatarg f)
{}

static void keyup_free(t_keyup *x)
{}

t_keyname;

static void *keyname_new(void)
{}

static void keyname_list(t_keyname *x, t_symbol *s, int ac, t_atom *av)
{}

static void keyname_free(t_keyname *x)
{}

static void key_setup(void)
{}

/* ------------------------ pdcontrol --------------------------------- */

static t_class *pdcontrol_class;

t_pdcontrol;

static void *pdcontrol_new( void)
{}

    /* output containing directory of patch.  optional args:
    1. a number, zero for this patch, one for the parent, etc.;
    2. a symbol to concatenate onto the directory; */

static void pdcontrol_dir(t_pdcontrol *x, t_symbol *s, t_floatarg f)
{}

static void pdcontrol_args(t_pdcontrol *x, t_floatarg f)
{}

static void pdcontrol_browse(t_pdcontrol *x, t_symbol *s)
{}

static void pdcontrol_isvisible(t_pdcontrol *x)
{}

static void pdcontrol_sendcanvas(t_pdcontrol *x, t_symbol *s,
    int argc, t_atom *argv)
{}

static void pdcontrol_setup(void)
{}

/* -------------------------- setup routine ------------------------------ */

void x_gui_setup(void)
{}