2000-01-30 10:44:33 +00:00
|
|
|
/* Gnome-Streamer
|
|
|
|
* Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library 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
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef __GST_EDITOR_H__
|
|
|
|
#define __GST_EDITOR_H__
|
|
|
|
|
|
|
|
#include <gnome.h>
|
|
|
|
#include <gst/gst.h>
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct _GstEditor GstEditor;
|
|
|
|
typedef struct _GstEditorClass GstEditorClass;
|
|
|
|
typedef struct _GstEditorElement GstEditorElement;
|
|
|
|
typedef struct _GstEditorElementClass GstEditorElementClass;
|
|
|
|
typedef struct _GstEditorBin GstEditorBin;
|
|
|
|
typedef struct _GstEditorBinClass GstEditorBinClass;
|
|
|
|
typedef struct _GstEditorCanvas GstEditorCanvas;
|
|
|
|
typedef struct _GstEditorCanvasClass GstEditorCanvasClass;
|
|
|
|
typedef struct _GstEditorPad GstEditorPad;
|
|
|
|
typedef struct _GstEditorPadClass GstEditorPadClass;
|
2000-12-28 02:51:07 +00:00
|
|
|
typedef struct _GstEditorPadTemplate GstEditorPadTemplate;
|
|
|
|
typedef struct _GstEditorPadTemplateClass GstEditorPadTemplateClass;
|
2000-01-30 10:44:33 +00:00
|
|
|
typedef struct _GstEditorConnection GstEditorConnection;
|
|
|
|
typedef struct _GstEditorConnectionClass GstEditorConnectionClass;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define GST_TYPE_EDITOR \
|
|
|
|
(gst_editor_get_type())
|
|
|
|
#define GST_EDITOR(obj) \
|
|
|
|
(GTK_CHECK_CAST((obj),GST_TYPE_EDITOR,GstEditor))
|
|
|
|
#define GST_EDITOR_CLASS(klass) \
|
|
|
|
(GTK_CHECK_CLASS_CAST((klass),GST_TYPE_EDITOR,GstEditorClass))
|
|
|
|
#define GST_IS_EDITOR(obj) \
|
|
|
|
(GTK_CHECK_TYPE((obj),GST_TYPE_EDITOR))
|
|
|
|
#define GST_IS_EDITOR_CLASS(obj) \
|
2000-10-01 21:46:33 +00:00
|
|
|
(GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_EDITOR))
|
2000-01-30 10:44:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
struct _GstEditor {
|
2000-10-01 21:46:33 +00:00
|
|
|
GtkWindow window;
|
2000-01-30 10:44:33 +00:00
|
|
|
|
2000-10-01 21:46:33 +00:00
|
|
|
/* the actual element to be associated with this thing */
|
|
|
|
GstElement *element;
|
2000-01-30 10:44:33 +00:00
|
|
|
|
|
|
|
/* the editor canvas */
|
|
|
|
GstEditorCanvas *canvas;
|
|
|
|
|
|
|
|
/* the canvas and scrollwindow */
|
|
|
|
GtkWidget *canvaswidget;
|
|
|
|
GtkWidget *scrollwindow;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _GstEditorClass {
|
2000-10-01 21:46:33 +00:00
|
|
|
GtkWindowClass parent_class;
|
|
|
|
|
|
|
|
void (*name_changed) (GstEditor *editor);
|
2000-01-30 10:44:33 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
GtkType gst_editor_get_type();
|
2000-10-01 21:46:33 +00:00
|
|
|
GstEditor *gst_editor_new(GstElement *element);
|
2000-01-30 10:44:33 +00:00
|
|
|
|
2000-12-25 01:33:06 +00:00
|
|
|
const gchar *gst_editor_get_name(GstEditor *editor);
|
2000-01-30 10:44:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
#define GST_EDITOR_SET_OBJECT(item,object) \
|
|
|
|
(gtk_object_set_data(GTK_OBJECT(item),"gsteditorobject",(object)))
|
2000-12-25 01:33:06 +00:00
|
|
|
#define GST_EDITOR_GET_OBJECT(item) \
|
2000-01-30 10:44:33 +00:00
|
|
|
(gtk_object_get_data(GTK_OBJECT(item),"gsteditorobject"))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define GST_TYPE_EDITOR_ELEMENT \
|
|
|
|
(gst_editor_element_get_type())
|
|
|
|
#define GST_EDITOR_ELEMENT(obj) \
|
|
|
|
(GTK_CHECK_CAST((obj),GST_TYPE_EDITOR_ELEMENT,GstEditorElement))
|
|
|
|
#define GST_EDITOR_ELEMENT_CLASS(klass) \
|
|
|
|
(GTK_CHECK_CLASS_CAST((klass),GST_TYPE_EDITOR_ELEMENT,GstEditorElementClass))
|
|
|
|
#define GST_IS_EDITOR_ELEMENT(obj) \
|
|
|
|
(GTK_CHECK_TYPE((obj),GST_TYPE_EDITOR_ELEMENT))
|
|
|
|
#define GST_IS_EDITOR_ELEMENT_CLASS(obj) \
|
2000-10-01 21:46:33 +00:00
|
|
|
(GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_EDITOR_ELEMENT))
|
2000-01-30 10:44:33 +00:00
|
|
|
|
|
|
|
#define GST_EDITOR_ELEMENT_PARENT(obj) (GST_EDITOR_ELEMENT(obj)->parent)
|
|
|
|
#define GST_EDITOR_ELEMENT_GROUP(obj) (GST_EDITOR_ELEMENT(obj)->group)
|
|
|
|
#define GST_EDITOR_ELEMENT_CANVAS(obj) (GST_EDITOR_ELEMENT(obj)->canvas)
|
|
|
|
|
|
|
|
struct _GstEditorElement {
|
|
|
|
GstObject object;
|
|
|
|
|
|
|
|
/* parent object (NULL if I am the parent) */
|
|
|
|
GstEditorBin *parent;
|
|
|
|
|
|
|
|
/* toplevel canvas (myself if I am the toplevel) */
|
|
|
|
GstEditorCanvas *canvas;
|
|
|
|
|
|
|
|
/* the element we're associated with */
|
|
|
|
GstElement *element;
|
|
|
|
|
|
|
|
/* whether we've been realized or not */
|
|
|
|
gboolean realized;
|
|
|
|
|
|
|
|
/* toplevel group, must be !NULL */
|
|
|
|
GnomeCanvasGroup *group; // parent group
|
|
|
|
|
|
|
|
/* visual stuff */
|
|
|
|
gdouble x,y; // center
|
|
|
|
gdouble width,height; // size
|
|
|
|
GnomeCanvasItem *border,*title,*resizebox; // easy ones
|
|
|
|
GnomeCanvasItem *statebox[4],*statetext[4]; // GST_STATE_*
|
|
|
|
|
|
|
|
gdouble insidewidth,insideheight; // minimum space inside
|
|
|
|
gdouble minwidth,minheight; // minimum size
|
|
|
|
gdouble titlewidth,titleheight; // size of title
|
|
|
|
gdouble statewidth,stateheight; // size of state boxes
|
|
|
|
gdouble sinkwidth,sinkheight; // size of sink pads
|
|
|
|
gdouble srcwidth,srcheight; // size of src pads
|
|
|
|
gint sinks,srcs; // how many pads?
|
|
|
|
|
|
|
|
GnomeCanvasGroup *insidegroup; // contents if any
|
|
|
|
|
|
|
|
gboolean resize; // does it need resizing?
|
2000-12-25 01:33:06 +00:00
|
|
|
gboolean active; // is it active (currently selected)
|
2000-01-30 10:44:33 +00:00
|
|
|
|
|
|
|
/* list of pads */
|
|
|
|
GList *srcpads,*sinkpads;
|
|
|
|
gboolean padlistchange;
|
|
|
|
|
2000-12-28 02:51:07 +00:00
|
|
|
/* list of padtemplates */
|
|
|
|
GList *srcpadtemps,*sinkpadtemps;
|
|
|
|
|
2000-01-30 10:44:33 +00:00
|
|
|
/* interaction state */
|
|
|
|
gboolean dragging,resizing,moved,hesitating;
|
|
|
|
gdouble offx,offy,dragx,dragy;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _GstEditorElementClass {
|
|
|
|
GnomeCanvasGroupClass parent_class;
|
|
|
|
|
2001-03-07 21:52:56 +00:00
|
|
|
void (*name_changed) (GstEditorElement *element);
|
|
|
|
void (*position_changed) (GstEditorElement *element);
|
|
|
|
void (*size_changed) (GstEditorElement *element);
|
|
|
|
void (*realize) (GstEditorElement *element);
|
|
|
|
gint (*event) (GnomeCanvasItem *item,GdkEvent *event,
|
|
|
|
GstEditorElement *element);
|
|
|
|
gint (*button_event) (GnomeCanvasItem *item,GdkEvent *event,
|
|
|
|
GstEditorElement *element);
|
2000-01-30 10:44:33 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
GtkType gst_editor_element_get_type();
|
2000-12-25 01:33:06 +00:00
|
|
|
GstEditorElement *gst_editor_element_new(GstElement *element,
|
2000-01-30 10:44:33 +00:00
|
|
|
const gchar *first_arg_name,...);
|
|
|
|
void gst_editor_element_construct(GstEditorElement *element,
|
|
|
|
const gchar *first_arg_name,
|
|
|
|
va_list args);
|
|
|
|
void gst_editor_element_repack(GstEditorElement *element);
|
2000-10-01 21:46:33 +00:00
|
|
|
void gst_editor_element_set_name(GstEditorElement *element,
|
|
|
|
const gchar *name);
|
|
|
|
const gchar *gst_editor_element_get_name(GstEditorElement *element);
|
2000-01-30 10:44:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
#define GST_TYPE_EDITOR_BIN \
|
|
|
|
(gst_editor_bin_get_type())
|
|
|
|
#define GST_EDITOR_BIN(obj) \
|
|
|
|
(GTK_CHECK_CAST((obj),GST_TYPE_EDITOR_BIN,GstEditorBin))
|
|
|
|
#define GST_EDITOR_BIN_CLASS(klass) \
|
|
|
|
(GTK_CHECK_CLASS_CAST((klass),GST_TYPE_EDITOR_BIN,GstEditorBin))
|
|
|
|
#define GST_IS_EDITOR_BIN(obj) \
|
|
|
|
(GTK_CHECK_TYPE((obj),GST_TYPE_EDITOR_BIN))
|
|
|
|
#define GST_IS_EDITOR_BIN_CLASS(obj) \
|
2000-10-01 21:46:33 +00:00
|
|
|
(GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_EDITOR_BIN))
|
2001-03-07 21:52:56 +00:00
|
|
|
|
2000-01-30 10:44:33 +00:00
|
|
|
struct _GstEditorBin {
|
|
|
|
GstEditorElement element;
|
|
|
|
|
2001-03-07 21:52:56 +00:00
|
|
|
/* lists of GUI elements and connections */
|
2000-01-30 10:44:33 +00:00
|
|
|
GList *elements, *connections;
|
|
|
|
|
|
|
|
/* connection state */
|
|
|
|
GstEditorPad *frompad; // where the drawing started from
|
|
|
|
gboolean fromsrc; // are we connecting *from* a source?
|
|
|
|
gboolean connecting; // if we're trying to connect right now
|
|
|
|
GstEditorConnection *connection; // the connection we're operating on
|
|
|
|
GstEditorPad *ghostpad; // potential ghost pad
|
|
|
|
gboolean inpadregion; // is cursor in pad region
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _GstEditorBinClass {
|
|
|
|
GstEditorElementClass parent_class;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GtkType gst_editor_bin_get_type();
|
2000-12-25 01:33:06 +00:00
|
|
|
|
|
|
|
GstEditorBin* gst_editor_bin_new (GstBin *bin, const gchar *first_arg_name,...);
|
2001-03-07 21:52:56 +00:00
|
|
|
void gst_editor_bin_add (GstEditorBin *bin, GstEditorElement *element);
|
|
|
|
|
|
|
|
void gst_editor_bin_connection_drag (GstEditorBin *bin,
|
|
|
|
gdouble wx,gdouble wy);
|
|
|
|
void gst_editor_bin_start_banding (GstEditorBin *bin,GstEditorPad *pad);
|
2000-01-30 10:44:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
#define GST_TYPE_EDITOR_CANVAS \
|
|
|
|
(gst_editor_canvas_get_type())
|
|
|
|
#define GST_EDITOR_CANVAS(obj) \
|
|
|
|
(GTK_CHECK_CAST((obj),GST_TYPE_EDITOR_CANVAS,GstEditorCanvas))
|
|
|
|
#define GST_EDITOR_CANVAS_CLASS(klass) \
|
|
|
|
(GTK_CHECK_CLASS_CAST((klass),GST_TYPE_EDITOR_CANVAS,GstEditorCanvasClass))
|
|
|
|
#define GST_IS_EDITOR_CANVAS(obj) \
|
|
|
|
(GTK_CHECK_TYPE((obj),GST_TYPE_EDITOR_CANVAS))
|
|
|
|
#define GST_IS_EDITOR_CANVAS_CLASS(obj) \
|
2000-10-01 21:46:33 +00:00
|
|
|
(GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_EDITOR_CANVAS))
|
2000-01-30 10:44:33 +00:00
|
|
|
|
2000-12-25 01:33:06 +00:00
|
|
|
GtkType gst_editor_canvas_get_type();
|
2000-01-30 10:44:33 +00:00
|
|
|
|
|
|
|
struct _GstEditorCanvas {
|
2000-12-25 01:33:06 +00:00
|
|
|
GnomeCanvas canvas;
|
2000-01-30 10:44:33 +00:00
|
|
|
|
2000-12-25 01:33:06 +00:00
|
|
|
GstEditorBin *bin;
|
2000-01-30 10:44:33 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _GstEditorCanvasClass {
|
|
|
|
GnomeCanvasClass parent_class;
|
|
|
|
};
|
|
|
|
|
2000-12-25 01:33:06 +00:00
|
|
|
GstEditorCanvas* gst_editor_canvas_new (void);
|
|
|
|
GstEditorCanvas* gst_editor_canvas_new_with_bin (GstEditorBin *bin);
|
2000-01-30 10:44:33 +00:00
|
|
|
|
2001-03-07 21:52:56 +00:00
|
|
|
void gst_editor_canvas_set_bin (GstEditorCanvas *canvas,
|
|
|
|
GstEditorBin *element);
|
2000-12-25 01:33:06 +00:00
|
|
|
GstEditorElement* gst_editor_canvas_get_bin (GstEditorCanvas *canvas);
|
2000-01-30 10:44:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
#define GST_TYPE_EDITOR_PAD \
|
|
|
|
(gst_editor_pad_get_type())
|
|
|
|
#define GST_EDITOR_PAD(obj) \
|
|
|
|
(GTK_CHECK_CAST((obj),GST_TYPE_EDITOR_PAD,GstEditorPad))
|
|
|
|
#define GST_EDITOR_PAD_CLASS(klass) \
|
|
|
|
(GTK_CHECK_CLASS_CAST((klass),GST_TYPE_EDITOR_PAD,GstEditorPadClass))
|
|
|
|
#define GST_IS_EDITOR_PAD(obj) \
|
|
|
|
(GTK_CHECK_TYPE((obj),GST_TYPE_EDITOR_PAD))
|
|
|
|
#define GST_IS_EDITOR_PAD_CLASS(obj) \
|
2000-10-01 21:46:33 +00:00
|
|
|
(GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_EDITOR_PAD))
|
2000-01-30 10:44:33 +00:00
|
|
|
|
|
|
|
struct _GstEditorPad {
|
2001-03-07 21:52:56 +00:00
|
|
|
GtkObject object;
|
2000-01-30 10:44:33 +00:00
|
|
|
|
|
|
|
/* parent element */
|
|
|
|
GstEditorElement *parent;
|
|
|
|
|
|
|
|
/* toplevel canvas */
|
|
|
|
GstEditorCanvas *canvas;
|
|
|
|
|
|
|
|
/* the pad we're associated with */
|
|
|
|
GstPad *pad;
|
|
|
|
/* if this is a sink (convenience) */
|
|
|
|
gboolean issrc;
|
|
|
|
|
|
|
|
/* whether we've been realized or not */
|
|
|
|
gboolean realized;
|
|
|
|
|
|
|
|
/* connections */
|
|
|
|
GstEditorConnection *connection;
|
|
|
|
GstEditorConnection *ghostconnection;
|
|
|
|
|
|
|
|
/* visual stuff */
|
|
|
|
GnomeCanvasGroup *group;
|
|
|
|
GnomeCanvasItem *border,*title,*padbox;
|
|
|
|
gboolean sinkpad; // is this a sink pad?
|
|
|
|
gdouble x,y; // location
|
|
|
|
gdouble width,height; // actual size
|
|
|
|
gdouble boxwidth,boxheight; // size of pad box
|
|
|
|
gboolean resize; // does it need resizing?
|
2001-03-07 21:52:56 +00:00
|
|
|
|
2000-01-30 10:44:33 +00:00
|
|
|
/* interaction state */
|
|
|
|
gboolean dragging,resizing,moved;
|
|
|
|
gdouble dragx,dragy;
|
|
|
|
|
|
|
|
/* connection */
|
|
|
|
// GnomeCanvasItem *connection; // can't use
|
|
|
|
//GstEditorConnection
|
|
|
|
};
|
2001-03-07 21:52:56 +00:00
|
|
|
|
2000-01-30 10:44:33 +00:00
|
|
|
struct _GstEditorPadClass {
|
|
|
|
GtkObjectClass parent_class;
|
|
|
|
|
|
|
|
void (*realize) (GstEditorPad *pad);
|
|
|
|
};
|
2001-03-07 21:52:56 +00:00
|
|
|
|
2000-01-30 10:44:33 +00:00
|
|
|
GtkType gst_editor_pad_get_type();
|
|
|
|
GstEditorPad *gst_editor_pad_new(GstEditorElement *parent,GstPad *pad,
|
|
|
|
const gchar *first_arg_name, ...);
|
|
|
|
void gst_editor_pad_construct(GstEditorPad *element,
|
|
|
|
GstEditorElement *parent,
|
|
|
|
const gchar *first_arg_name,va_list args);
|
|
|
|
void gst_editor_pad_repack(GstEditorPad *pad);
|
|
|
|
|
|
|
|
|
|
|
|
|
2000-12-28 02:51:07 +00:00
|
|
|
#define GST_TYPE_EDITOR_PADTEMPLATE \
|
|
|
|
(gst_editor_padtemplate_get_type())
|
|
|
|
#define GST_EDITOR_PADTEMPLATE(obj) \
|
|
|
|
(GTK_CHECK_CAST((obj),GST_TYPE_EDITOR_PADTEMPLATE,GstEditorPadTemplate))
|
|
|
|
#define GST_EDITOR_PADTEMPLATE_CLASS(klass) \
|
|
|
|
(GTK_CHECK_CLASS_CAST((klass),GST_TYPE_EDITOR_PADTEMPLATE,GstEditorPadTemplateClass))
|
|
|
|
#define GST_IS_EDITOR_PADTEMPLATE(obj) \
|
|
|
|
(GTK_CHECK_TYPE((obj),GST_TYPE_EDITOR_PADTEMPLATE))
|
|
|
|
#define GST_IS_EDITOR_PADTEMPLATE_CLASS(obj) \
|
|
|
|
(GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_EDITOR_PADTEMPLATE))
|
|
|
|
|
|
|
|
struct _GstEditorPadTemplate {
|
2001-03-07 21:52:56 +00:00
|
|
|
GtkObject object;
|
2000-12-28 02:51:07 +00:00
|
|
|
|
|
|
|
/* parent element */
|
|
|
|
GstEditorElement *parent;
|
|
|
|
|
|
|
|
/* toplevel canvas */
|
|
|
|
GstEditorCanvas *canvas;
|
|
|
|
|
|
|
|
/* the padtemplate we're associated with */
|
|
|
|
GstPadTemplate *padtemplate;
|
|
|
|
|
|
|
|
/* pads created from this template */
|
|
|
|
GList *pads;
|
|
|
|
|
|
|
|
/* if this is a sink (convenience) */
|
|
|
|
gboolean issrc;
|
|
|
|
|
|
|
|
/* whether we've been realized or not */
|
|
|
|
gboolean realized;
|
|
|
|
|
|
|
|
/* connections */
|
|
|
|
GstEditorConnection *connection;
|
|
|
|
GstEditorConnection *ghostconnection;
|
|
|
|
|
|
|
|
/* visual stuff */
|
|
|
|
GnomeCanvasGroup *group;
|
|
|
|
GnomeCanvasItem *border,*title,*padtemplatebox;
|
|
|
|
gboolean sinkpadtemplate; // is this a sink padtemplate?
|
|
|
|
gdouble x,y; // location
|
|
|
|
gdouble width,height; // actual size
|
|
|
|
gdouble boxwidth,boxheight; // size of padtemplate box
|
|
|
|
gboolean resize; // does it need resizing?
|
2001-03-07 21:52:56 +00:00
|
|
|
|
2000-12-28 02:51:07 +00:00
|
|
|
/* interaction state */
|
|
|
|
gboolean dragging,resizing,moved;
|
|
|
|
gdouble dragx,dragy;
|
|
|
|
|
|
|
|
/* connection */
|
|
|
|
// GnomeCanvasItem *connection; // can't use
|
|
|
|
//GstEditorConnection
|
|
|
|
};
|
2001-03-07 21:52:56 +00:00
|
|
|
|
2000-12-28 02:51:07 +00:00
|
|
|
struct _GstEditorPadTemplateClass {
|
|
|
|
GtkObjectClass parent_class;
|
|
|
|
|
|
|
|
void (*realize) (GstEditorPadTemplate *padtemplate);
|
|
|
|
};
|
2001-03-07 21:52:56 +00:00
|
|
|
|
2000-12-28 02:51:07 +00:00
|
|
|
GtkType gst_editor_padtemplate_get_type();
|
|
|
|
GstEditorPadTemplate *gst_editor_padtemplate_new(GstEditorElement *parent,GstPadTemplate *padtemplate,
|
|
|
|
const gchar *first_arg_name, ...);
|
|
|
|
void gst_editor_padtemplate_construct(GstEditorPadTemplate *element,
|
|
|
|
GstEditorElement *parent,
|
|
|
|
const gchar *first_arg_name,va_list args);
|
|
|
|
void gst_editor_padtemplate_repack(GstEditorPadTemplate *padtemplate);
|
|
|
|
|
|
|
|
|
2000-01-30 10:44:33 +00:00
|
|
|
#define GST_TYPE_EDITOR_CONNECTION \
|
|
|
|
(gst_editor_connection_get_type())
|
|
|
|
#define GST_EDITOR_CONNECTION(obj) \
|
|
|
|
(GTK_CHECK_CAST((obj),GST_TYPE_EDITOR_CONNECTION,GstEditorConnection))
|
|
|
|
#define GST_EDITOR_CONNECTION_CLASS(klass) \
|
|
|
|
(GTK_CHECK_CLASS_CAST((klass),GST_TYPE_EDITOR_CONNECTION,GstEditorConnectionClass))
|
|
|
|
#define GST_IS_EDITOR_CONNECTION(obj) \
|
|
|
|
(GTK_CHECK_TYPE((obj),GST_TYPE_EDITOR_CONNECTION))
|
|
|
|
#define GST_IS_EDITOR_CONNECTION_CLASS(obj) \
|
2000-10-01 21:46:33 +00:00
|
|
|
(GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_EDITOR_CONNECTION))
|
2000-01-30 10:44:33 +00:00
|
|
|
|
|
|
|
struct _GstEditorConnection {
|
|
|
|
GtkObject object;
|
|
|
|
|
|
|
|
/* our parent */
|
|
|
|
GstEditorElement *parent;
|
|
|
|
|
|
|
|
/* the two pads we're connecting */
|
|
|
|
GstEditorPad *frompad, *topad;
|
|
|
|
/* is this starting at a source (convenience) */
|
|
|
|
gboolean fromsrc;
|
|
|
|
|
|
|
|
/* toplevel canvas */
|
|
|
|
GstEditorCanvas *canvas;
|
|
|
|
|
|
|
|
/* whether we've been realized or not */
|
|
|
|
gboolean realized;
|
|
|
|
|
|
|
|
/* are we a ghosted connection? */
|
|
|
|
gboolean ghost;
|
|
|
|
|
|
|
|
/* visual stuff */
|
|
|
|
GnomeCanvasItem *line;
|
|
|
|
GnomeCanvasPoints *points;
|
|
|
|
gdouble x,y; // terminating point
|
|
|
|
gboolean resize; // does it need resizing?
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _GstEditorConnectionClass {
|
|
|
|
GtkObjectClass parent_class;
|
|
|
|
void (*realize) (GstEditorConnection *connection);
|
|
|
|
};
|
|
|
|
|
|
|
|
GtkType gst_editor_connection_get_type();
|
2000-12-25 01:33:06 +00:00
|
|
|
GstEditorConnection *gst_editor_connection_new(GstEditorElement *parent,
|
2000-10-08 22:17:11 +00:00
|
|
|
GstEditorPad *frompad);
|
|
|
|
|
2000-01-30 10:44:33 +00:00
|
|
|
void gst_editor_connection_resize(GstEditorConnection *connection);
|
|
|
|
void gst_editor_connection_set_endpoint(GstEditorConnection *connection,
|
|
|
|
gdouble x,gdouble y);
|
|
|
|
void gst_editor_connection_set_endpad(GstEditorConnection *connection,
|
|
|
|
GstEditorPad *pad);
|
|
|
|
void gst_editor_connection_connect(GstEditorConnection *connection);
|
|
|
|
|
|
|
|
|
|
|
|
#endif /* __GST_EDITOR_H__ */
|