+++ /dev/null
-Makefile
-Makefile.in
-*.o
-*.lo
-*.la
-.deps
-.libs
-
-gsteditor
+++ /dev/null
-lib_LTLIBRARIES = libgsteditor.la
-
-libgsteditor_la_SOURCES = \
- gsteditor.c \
- gsteditorproject.c \
- gsteditorprojectview.c \
- gsteditorelement.c \
- gsteditorbin.c \
- gsteditorcanvas.c \
- gsteditorpad.c \
- gsteditorpadtemplate.c \
- gsteditorconnection.c \
- gsteditorimage.c \
- gsteditorpalette.c \
- gsteditorproperty.c \
- gstelementselect.c \
- gsteditorcreate.c
-
-libgsteditor_la_CFLAGS = -DDATADIR="\"$(gladedir)/\"" $(GNOME_CFLAGS) $(LIBGLADE_GNOME_CFLAGS) $(GST_CFLAGS)
-libgsteditor_la_LDFLAGS = $(GNOME_LIBS) $(LIBGLADE_GNOME_LIBS)
-
-libgsteditorincludedir = $(includedir)/gst
-libgsteditorinclude_HEADERS = \
- gsteditor.h
-
-bin_PROGRAMS = gsteditor
-gsteditor_SOURCES = editor.c
-gsteditor_LDFLAGS = libgsteditor.la $(GST_LIBS) $(LIBGLADE_GNOME_LIBS)
-gsteditor_CFLAGS = $(LIBGLADE_GNOME_CFLAGS) $(GST_CFLAGS) -DDATADIR=\""$(gladedir)/"\"
-
-man_MANS = gsteditor.1
-
-gladedir = $(datadir)/gsteditor
-glade_DATA = editor.glade editorelement.glade
-
-noinst_HEADERS = \
- gsteditorproject.h \
- gstelementselect.h \
- gsteditorpalette.h \
- gsteditorproperty.h \
- gsteditorimage.h \
- gsteditorcreate.h
-
-SUBDIRS = pixmaps
-
-EXTRA_DIST = $(glade_DATA) $(man_MANS)
+++ /dev/null
-/* 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.
- */
-
-
-#include <glade/glade.h>
-#include <gst/gst.h>
-
-#include "gsteditor.h"
-#include "gsteditorproject.h"
-#include "config.h"
-
-extern gboolean _gst_plugin_spew;
-
-int
-main (int argc, char *argv[])
-{
- GstEditorProject *project;
-
- bindtextdomain (PACKAGE, PACKAGE_LOCALE_DIR);
- textdomain (PACKAGE);
-
- _gst_plugin_spew = TRUE;
- gst_init(&argc,&argv);
- gnome_init("GST Graph Editor",VERSION,argc,argv);
- glade_init();
- glade_gnome_init();
-
-
- if (argc > 1) {
- project = gst_editor_project_new_from_file(argv[1]);
- }
- else
- project = gst_editor_project_new();
-
- g_assert (project != NULL);
-
- gst_editor_project_view_new(project);
-
- gdk_threads_enter ();
- gtk_main();
- gdk_threads_leave ();
-
- return(0);
-}
+++ /dev/null
-<?xml version="1.0"?>
-<GTK-Interface>
-
-<project>
- <name>project1</name>
- <program_name>project1</program_name>
- <directory></directory>
- <source_directory></source_directory>
- <pixmaps_directory>pixmaps</pixmaps_directory>
- <language>C</language>
- <gnome_support>True</gnome_support>
- <gettext_support>True</gettext_support>
- <main_source_file>gladesrc.c</main_source_file>
- <main_header_file>gladesrc.h</main_header_file>
- <handler_source_file>gladesig.c</handler_source_file>
- <handler_header_file>gladesig.h</handler_header_file>
- <output_translatable_strings>True</output_translatable_strings>
- <translatable_strings_file>editor.ts</translatable_strings_file>
-</project>
-
-<widget>
- <class>GnomeApp</class>
- <name>main_project_window</name>
- <x>50</x>
- <y>50</y>
- <width>300</width>
- <height>200</height>
- <title>Project Window</title>
- <type>GTK_WINDOW_TOPLEVEL</type>
- <position>GTK_WIN_POS_NONE</position>
- <modal>False</modal>
- <allow_shrink>False</allow_shrink>
- <allow_grow>True</allow_grow>
- <auto_shrink>False</auto_shrink>
- <enable_layout_config>True</enable_layout_config>
-
- <widget>
- <class>GnomeDock</class>
- <child_name>GnomeApp:dock</child_name>
- <name>dock1</name>
- <allow_floating>True</allow_floating>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GnomeDockItem</class>
- <name>dockitem1</name>
- <border_width>2</border_width>
- <placement>GNOME_DOCK_TOP</placement>
- <band>0</band>
- <position>0</position>
- <offset>0</offset>
- <locked>False</locked>
- <exclusive>True</exclusive>
- <never_floating>False</never_floating>
- <never_vertical>True</never_vertical>
- <never_horizontal>False</never_horizontal>
- <shadow_type>GTK_SHADOW_OUT</shadow_type>
-
- <widget>
- <class>GtkMenuBar</class>
- <name>menubar1</name>
- <shadow_type>GTK_SHADOW_NONE</shadow_type>
-
- <widget>
- <class>GtkMenuItem</class>
- <name>file1</name>
- <stock_item>GNOMEUIINFO_MENU_FILE_TREE</stock_item>
-
- <widget>
- <class>GtkMenu</class>
- <name>file1_menu</name>
-
- <widget>
- <class>GtkPixmapMenuItem</class>
- <name>new_file1</name>
- <signal>
- <name>activate</name>
- <handler>on_new_file1_activate</handler>
- <last_modification_time>Fri, 29 Sep 2000 17:15:00 GMT</last_modification_time>
- </signal>
- <stock_item>GNOMEUIINFO_MENU_NEW_ITEM</stock_item>
- <label>_New File</label>
- </widget>
-
- <widget>
- <class>GtkPixmapMenuItem</class>
- <name>open1</name>
- <signal>
- <name>activate</name>
- <handler>on_open1_activate</handler>
- <last_modification_time>Fri, 29 Sep 2000 17:15:00 GMT</last_modification_time>
- </signal>
- <stock_item>GNOMEUIINFO_MENU_OPEN_ITEM</stock_item>
- </widget>
-
- <widget>
- <class>GtkPixmapMenuItem</class>
- <name>save1</name>
- <signal>
- <name>activate</name>
- <handler>on_save1_activate</handler>
- <last_modification_time>Fri, 29 Sep 2000 17:15:00 GMT</last_modification_time>
- </signal>
- <stock_item>GNOMEUIINFO_MENU_SAVE_ITEM</stock_item>
- </widget>
-
- <widget>
- <class>GtkPixmapMenuItem</class>
- <name>save_as1</name>
- <signal>
- <name>activate</name>
- <handler>on_save_as1_activate</handler>
- <last_modification_time>Fri, 29 Sep 2000 17:15:00 GMT</last_modification_time>
- </signal>
- <stock_item>GNOMEUIINFO_MENU_SAVE_AS_ITEM</stock_item>
- </widget>
-
- <widget>
- <class>GtkMenuItem</class>
- <name>separator1</name>
- <right_justify>False</right_justify>
- </widget>
-
- <widget>
- <class>GtkPixmapMenuItem</class>
- <name>project_options1</name>
- <signal>
- <name>activate</name>
- <handler>on_project_options1_activate</handler>
- <last_modification_time>Fri, 29 Sep 2000 17:15:00 GMT</last_modification_time>
- </signal>
- <label>_Project Options</label>
- <right_justify>False</right_justify>
- <stock_icon>GNOME_STOCK_MENU_PROP</stock_icon>
- </widget>
-
- <widget>
- <class>GtkMenuItem</class>
- <name>separator3</name>
- <right_justify>False</right_justify>
- </widget>
-
- <widget>
- <class>GtkPixmapMenuItem</class>
- <name>exit1</name>
- <signal>
- <name>activate</name>
- <handler>on_exit1_activate</handler>
- <last_modification_time>Fri, 29 Sep 2000 17:15:00 GMT</last_modification_time>
- </signal>
- <stock_item>GNOMEUIINFO_MENU_EXIT_ITEM</stock_item>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkMenuItem</class>
- <name>edit1</name>
- <stock_item>GNOMEUIINFO_MENU_EDIT_TREE</stock_item>
-
- <widget>
- <class>GtkMenu</class>
- <name>edit1_menu</name>
-
- <widget>
- <class>GtkPixmapMenuItem</class>
- <name>cut1</name>
- <signal>
- <name>activate</name>
- <handler>on_cut1_activate</handler>
- <last_modification_time>Fri, 29 Sep 2000 17:15:00 GMT</last_modification_time>
- </signal>
- <stock_item>GNOMEUIINFO_MENU_CUT_ITEM</stock_item>
- </widget>
-
- <widget>
- <class>GtkPixmapMenuItem</class>
- <name>copy1</name>
- <signal>
- <name>activate</name>
- <handler>on_copy1_activate</handler>
- <last_modification_time>Fri, 29 Sep 2000 17:15:00 GMT</last_modification_time>
- </signal>
- <stock_item>GNOMEUIINFO_MENU_COPY_ITEM</stock_item>
- </widget>
-
- <widget>
- <class>GtkPixmapMenuItem</class>
- <name>paste1</name>
- <signal>
- <name>activate</name>
- <handler>on_paste1_activate</handler>
- <last_modification_time>Fri, 29 Sep 2000 17:15:00 GMT</last_modification_time>
- </signal>
- <stock_item>GNOMEUIINFO_MENU_PASTE_ITEM</stock_item>
- </widget>
-
- <widget>
- <class>GtkPixmapMenuItem</class>
- <name>clear1</name>
- <signal>
- <name>activate</name>
- <handler>on_clear1_activate</handler>
- <last_modification_time>Fri, 29 Sep 2000 17:15:00 GMT</last_modification_time>
- </signal>
- <stock_item>GNOMEUIINFO_MENU_CLEAR_ITEM</stock_item>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkMenuItem</class>
- <name>view1</name>
- <stock_item>GNOMEUIINFO_MENU_VIEW_TREE</stock_item>
-
- <widget>
- <class>GtkMenu</class>
- <name>view1_menu</name>
-
- <widget>
- <class>GtkMenuItem</class>
- <name>show_palette1</name>
- <signal>
- <name>activate</name>
- <handler>on_show_palette1_activate</handler>
- <last_modification_time>Fri, 29 Sep 2000 17:26:54 GMT</last_modification_time>
- </signal>
- <label>Show _Palette</label>
- <right_justify>False</right_justify>
- </widget>
-
- <widget>
- <class>GtkMenuItem</class>
- <name>show_property_editor1</name>
- <signal>
- <name>activate</name>
- <handler>on_show_property_editor1_activate</handler>
- <last_modification_time>Fri, 29 Sep 2000 17:28:02 GMT</last_modification_time>
- </signal>
- <label>Show Property _Editor</label>
- <right_justify>False</right_justify>
- </widget>
-
- <widget>
- <class>GtkMenuItem</class>
- <name>show_element_tree1</name>
- <signal>
- <name>activate</name>
- <handler>on_show_element_tree1_activate</handler>
- <last_modification_time>Fri, 29 Sep 2000 17:28:23 GMT</last_modification_time>
- </signal>
- <label>Show Element _Tree</label>
- <right_justify>False</right_justify>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkMenuItem</class>
- <name>settings1</name>
- <stock_item>GNOMEUIINFO_MENU_SETTINGS_TREE</stock_item>
-
- <widget>
- <class>GtkMenu</class>
- <name>settings1_menu</name>
-
- <widget>
- <class>GtkPixmapMenuItem</class>
- <name>preferences2</name>
- <signal>
- <name>activate</name>
- <handler>on_preferences2_activate</handler>
- <last_modification_time>Fri, 29 Sep 2000 17:22:35 GMT</last_modification_time>
- </signal>
- <stock_item>GNOMEUIINFO_MENU_PREFERENCES_ITEM</stock_item>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkMenuItem</class>
- <name>help1</name>
- <stock_item>GNOMEUIINFO_MENU_HELP_TREE</stock_item>
-
- <widget>
- <class>GtkMenu</class>
- <name>help1_menu</name>
-
- <widget>
- <class>GtkPixmapMenuItem</class>
- <name>about</name>
- <signal>
- <name>activate</name>
- <handler>on_about_activate</handler>
- <last_modification_time>Fri, 29 Sep 2000 18:33:22 GMT</last_modification_time>
- </signal>
- <stock_item>GNOMEUIINFO_MENU_ABOUT_ITEM</stock_item>
- </widget>
- </widget>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GnomeDockItem</class>
- <name>dockitem2</name>
- <border_width>1</border_width>
- <placement>GNOME_DOCK_TOP</placement>
- <band>1</band>
- <position>0</position>
- <offset>0</offset>
- <locked>False</locked>
- <exclusive>True</exclusive>
- <never_floating>False</never_floating>
- <never_vertical>False</never_vertical>
- <never_horizontal>False</never_horizontal>
- <shadow_type>GTK_SHADOW_OUT</shadow_type>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment1</name>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xscale>1</xscale>
- <yscale>1</yscale>
-
- <widget>
- <class>GtkToolbar</class>
- <name>toolbar1</name>
- <border_width>1</border_width>
- <orientation>GTK_ORIENTATION_HORIZONTAL</orientation>
- <type>GTK_TOOLBAR_BOTH</type>
- <space_size>16</space_size>
- <space_style>GTK_TOOLBAR_SPACE_LINE</space_style>
- <relief>GTK_RELIEF_NONE</relief>
- <tooltips>True</tooltips>
-
- <widget>
- <class>GtkButton</class>
- <child_name>Toolbar:button</child_name>
- <name>button2</name>
- <tooltip>Open File</tooltip>
- <label>Open</label>
- <stock_pixmap>GNOME_STOCK_PIXMAP_OPEN</stock_pixmap>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <child_name>Toolbar:button</child_name>
- <name>button3</name>
- <tooltip>Save File</tooltip>
- <label>Save</label>
- <stock_pixmap>GNOME_STOCK_PIXMAP_SAVE</stock_pixmap>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <child_name>Toolbar:button</child_name>
- <name>button4</name>
- <label>Options</label>
- <stock_pixmap>GNOME_STOCK_PIXMAP_PREFERENCES</stock_pixmap>
- <child>
- <new_group>True</new_group>
- </child>
- </widget>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkScrolledWindow</class>
- <child_name>GnomeDock:contents</child_name>
- <name>scrolledwindow1</name>
- <hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
- <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
- <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
- <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-
- <widget>
- <class>GtkCList</class>
- <name>clist1</name>
- <can_focus>True</can_focus>
- <columns>1</columns>
- <column_widths>80</column_widths>
- <selection_mode>GTK_SELECTION_SINGLE</selection_mode>
- <show_titles>False</show_titles>
- <shadow_type>GTK_SHADOW_IN</shadow_type>
-
- <widget>
- <class>Placeholder</class>
- <child_name>CList:title</child_name>
- </widget>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GnomeAppBar</class>
- <child_name>GnomeApp:appbar</child_name>
- <name>appbar1</name>
- <has_progress>True</has_progress>
- <has_status>True</has_status>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
-</widget>
-
-<widget>
- <class>GtkWindow</class>
- <name>palette_window</name>
- <x>50</x>
- <y>400</y>
- <width>150</width>
- <height>300</height>
- <title>Palette</title>
- <type>GTK_WINDOW_TOPLEVEL</type>
- <position>GTK_WIN_POS_NONE</position>
- <modal>False</modal>
- <allow_shrink>True</allow_shrink>
- <allow_grow>True</allow_grow>
- <auto_shrink>False</auto_shrink>
-
- <widget>
- <class>GtkVBox</class>
- <name>palette_vbox</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox6</name>
- <border_width>4</border_width>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkToggleButton</class>
- <name>togglebutton1</name>
- <can_focus>True</can_focus>
- <label>Select</label>
- <active>False</active>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>lb_selector</name>
- <label>Selector</label>
- <justify>GTK_JUSTIFY_LEFT</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button7</name>
- <can_focus>True</can_focus>
- <label>GStreamer Core</label>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button8</name>
- <can_focus>True</can_focus>
- <label>Standard Elements</label>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button9</name>
- <can_focus>True</can_focus>
- <label>Tree select...</label>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>Placeholder</class>
- </widget>
- </widget>
-</widget>
-
-<widget>
- <class>GtkWindow</class>
- <name>property_window</name>
- <x>500</x>
- <y>30</y>
- <width>340</width>
- <height>400</height>
- <title>Properties</title>
- <type>GTK_WINDOW_TOPLEVEL</type>
- <position>GTK_WIN_POS_NONE</position>
- <modal>False</modal>
- <allow_shrink>True</allow_shrink>
- <allow_grow>True</allow_grow>
- <auto_shrink>False</auto_shrink>
-
- <widget>
- <class>GtkNotebook</class>
- <name>notebook1</name>
- <can_focus>True</can_focus>
- <show_tabs>True</show_tabs>
- <show_border>True</show_border>
- <tab_pos>GTK_POS_TOP</tab_pos>
- <scrollable>False</scrollable>
- <tab_hborder>2</tab_hborder>
- <tab_vborder>2</tab_vborder>
- <popup_enable>False</popup_enable>
-
- <widget>
- <class>GtkScrolledWindow</class>
- <name>scrolledwindow3</name>
- <hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
- <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
- <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
- <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-
- <widget>
- <class>GtkViewport</class>
- <name>viewport1</name>
- <border_width>7</border_width>
- <shadow_type>GTK_SHADOW_NONE</shadow_type>
-
- <widget>
- <class>GtkVBox</class>
- <name>property_vbox</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>Placeholder</class>
- </widget>
-
- <widget>
- <class>Placeholder</class>
- </widget>
-
- <widget>
- <class>Placeholder</class>
- </widget>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>nb_element</name>
- <label>Element</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox4</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkScrolledWindow</class>
- <name>pads_window</name>
- <hscrollbar_policy>GTK_POLICY_ALWAYS</hscrollbar_policy>
- <vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy>
- <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
- <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>Placeholder</class>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>label19</name>
- <label>Pads</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox3</name>
- <homogeneous>False</homogeneous>
- <spacing>2</spacing>
-
- <widget>
- <class>GtkScrolledWindow</class>
- <name>scrolledwindow4</name>
- <hscrollbar_policy>GTK_POLICY_ALWAYS</hscrollbar_policy>
- <vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy>
- <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
- <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkCList</class>
- <name>clist2</name>
- <can_focus>True</can_focus>
- <columns>5</columns>
- <column_widths>160,139,80,53,80</column_widths>
- <selection_mode>GTK_SELECTION_SINGLE</selection_mode>
- <show_titles>True</show_titles>
- <shadow_type>GTK_SHADOW_IN</shadow_type>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>CList:title</child_name>
- <name>signal</name>
- <label>Signal</label>
- <justify>GTK_JUSTIFY_LEFT</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>CList:title</child_name>
- <name>label5</name>
- <label>Handler</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>7.45058e-09</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>CList:title</child_name>
- <name>label6</name>
- <label>Data</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>7.45058e-09</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>CList:title</child_name>
- <name>label7</name>
- <label>After</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>7.45058e-09</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>CList:title</child_name>
- <name>label8</name>
- <label>Object</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>7.45058e-09</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkTable</class>
- <name>table1</name>
- <border_width>4</border_width>
- <rows>5</rows>
- <columns>2</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>2</row_spacing>
- <column_spacing>0</column_spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox4</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry3</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>bt_pick_signal</name>
- <can_focus>True</can_focus>
- <signal>
- <name>clicked</name>
- <handler>on_bt_pick_signal_clicked</handler>
- <last_modification_time>Fri, 29 Sep 2000 18:23:18 GMT</last_modification_time>
- </signal>
- <label>...</label>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- <pack>GTK_PACK_END</pack>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label12</name>
- <width>100</width>
- <label>Object:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>7.45058e-09</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>3</top_attach>
- <bottom_attach>4</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label11</name>
- <width>100</width>
- <label>Data:</label>
- <justify>GTK_JUSTIFY_LEFT</justify>
- <wrap>False</wrap>
- <xalign>7.45058e-09</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>2</top_attach>
- <bottom_attach>3</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label10</name>
- <width>100</width>
- <label>Handler:</label>
- <justify>GTK_JUSTIFY_LEFT</justify>
- <wrap>False</wrap>
- <xalign>7.45058e-09</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkToggleButton</class>
- <name>tg_after</name>
- <can_focus>True</can_focus>
- <label>No</label>
- <active>False</active>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>4</top_attach>
- <bottom_attach>5</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry2</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>3</top_attach>
- <bottom_attach>4</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>True</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry1</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>2</top_attach>
- <bottom_attach>3</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>True</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkCombo</class>
- <name>combo1</name>
- <value_in_list>False</value_in_list>
- <ok_if_empty>True</ok_if_empty>
- <case_sensitive>False</case_sensitive>
- <use_arrows>True</use_arrows>
- <use_arrows_always>False</use_arrows_always>
- <items></items>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>True</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
-
- <widget>
- <class>GtkEntry</class>
- <child_name>GtkCombo:entry</child_name>
- <name>combo-entry1</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- </widget>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label13</name>
- <width>100</width>
- <label>After:</label>
- <justify>GTK_JUSTIFY_LEFT</justify>
- <wrap>False</wrap>
- <xalign>7.45058e-09</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>4</top_attach>
- <bottom_attach>5</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>lb_signal</name>
- <width>100</width>
- <label>Signal:</label>
- <justify>GTK_JUSTIFY_RIGHT</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.52</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox3</name>
- <homogeneous>True</homogeneous>
- <spacing>0</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>bt_add</name>
- <border_width>5</border_width>
- <can_focus>True</can_focus>
- <label>Add</label>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>bt_update</name>
- <border_width>4</border_width>
- <can_focus>True</can_focus>
- <label>Update</label>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>bt_delete</name>
- <border_width>4</border_width>
- <can_focus>True</can_focus>
- <label>Delete</label>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>bt_clear</name>
- <border_width>4</border_width>
- <can_focus>True</can_focus>
- <label>Clear</label>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>nb_signals</name>
- <label>Signals</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
-</widget>
-
-<widget>
- <class>GnomeAbout</class>
- <name>about_dialog</name>
- <visible>False</visible>
- <modal>True</modal>
- <copyright>Copyright 2000</copyright>
- <authors>Wim Taymans <wim.taymans@chello.be>
-</authors>
- <comments>An editor for GStreamer pipelines.</comments>
-</widget>
-
-<widget>
- <class>GtkWindow</class>
- <name>element_tree</name>
- <visible>False</visible>
- <title>Element Tree</title>
- <type>GTK_WINDOW_TOPLEVEL</type>
- <position>GTK_WIN_POS_NONE</position>
- <modal>False</modal>
- <allow_shrink>True</allow_shrink>
- <allow_grow>True</allow_grow>
- <auto_shrink>False</auto_shrink>
-
- <widget>
- <class>GtkScrolledWindow</class>
- <name>scrolledwindow2</name>
- <hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
- <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
- <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
- <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-
- <widget>
- <class>GtkCTree</class>
- <name>ctree1</name>
- <can_focus>True</can_focus>
- <columns>1</columns>
- <column_widths>80</column_widths>
- <selection_mode>GTK_SELECTION_SINGLE</selection_mode>
- <show_titles>False</show_titles>
- <shadow_type>GTK_SHADOW_IN</shadow_type>
-
- <widget>
- <class>Placeholder</class>
- <child_name>CTree:title</child_name>
- </widget>
- </widget>
- </widget>
-</widget>
-
-<widget>
- <class>GtkWindow</class>
- <name>select_signal</name>
- <visible>False</visible>
- <title>Select Signal</title>
- <type>GTK_WINDOW_TOPLEVEL</type>
- <position>GTK_WIN_POS_MOUSE</position>
- <modal>True</modal>
- <allow_shrink>True</allow_shrink>
- <allow_grow>True</allow_grow>
- <auto_shrink>False</auto_shrink>
-
- <widget>
- <class>GtkScrolledWindow</class>
- <name>scrolledwindow5</name>
- <hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
- <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
- <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
- <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-
- <widget>
- <class>GtkCList</class>
- <name>clist3</name>
- <can_focus>True</can_focus>
- <columns>1</columns>
- <column_widths>80</column_widths>
- <selection_mode>GTK_SELECTION_SINGLE</selection_mode>
- <show_titles>True</show_titles>
- <shadow_type>GTK_SHADOW_NONE</shadow_type>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>CList:title</child_name>
- <name>lb_signals</name>
- <label>Signals</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
- </widget>
-</widget>
-
-<widget>
- <class>GnomePropertyBox</class>
- <name>propertybox1</name>
- <visible>False</visible>
- <title>Editor Properties</title>
- <position>GTK_WIN_POS_NONE</position>
- <modal>False</modal>
- <allow_shrink>True</allow_shrink>
- <allow_grow>True</allow_grow>
- <auto_shrink>False</auto_shrink>
-
- <widget>
- <class>GtkNotebook</class>
- <child_name>GnomePropertyBox:notebook</child_name>
- <name>notebook2</name>
- <can_focus>True</can_focus>
- <show_tabs>True</show_tabs>
- <show_border>True</show_border>
- <tab_pos>GTK_POS_TOP</tab_pos>
- <scrollable>False</scrollable>
- <tab_hborder>2</tab_hborder>
- <tab_vborder>2</tab_vborder>
- <popup_enable>False</popup_enable>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>Placeholder</class>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>label16</name>
- <label>label16</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
-
- <widget>
- <class>Placeholder</class>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>label17</name>
- <label>label17</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
-
- <widget>
- <class>Placeholder</class>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>label18</name>
- <label>label18</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
-</widget>
-
-<widget>
- <class>GtkFileSelection</class>
- <name>fileselection1</name>
- <border_width>10</border_width>
- <visible>False</visible>
- <title>Select File</title>
- <type>GTK_WINDOW_TOPLEVEL</type>
- <position>GTK_WIN_POS_NONE</position>
- <modal>False</modal>
- <allow_shrink>False</allow_shrink>
- <allow_grow>True</allow_grow>
- <auto_shrink>False</auto_shrink>
- <show_file_op_buttons>True</show_file_op_buttons>
-
- <widget>
- <class>GtkButton</class>
- <child_name>FileSel:ok_button</child_name>
- <name>ok_button1</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <label>OK</label>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <child_name>FileSel:cancel_button</child_name>
- <name>cancel_button1</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <label>Cancel</label>
- </widget>
-</widget>
-
-<widget>
- <class>GnomeDialog</class>
- <name>dialog1</name>
- <type>GTK_WINDOW_TOPLEVEL</type>
- <position>GTK_WIN_POS_NONE</position>
- <modal>False</modal>
- <allow_shrink>False</allow_shrink>
- <allow_grow>False</allow_grow>
- <auto_shrink>False</auto_shrink>
- <auto_close>False</auto_close>
- <hide_on_close>False</hide_on_close>
-
- <widget>
- <class>GtkVBox</class>
- <child_name>GnomeDialog:vbox</child_name>
- <name>dialog-vbox1</name>
- <homogeneous>False</homogeneous>
- <spacing>8</spacing>
- <child>
- <padding>4</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkHButtonBox</class>
- <child_name>GnomeDialog:action_area</child_name>
- <name>dialog-action_area1</name>
- <layout_style>GTK_BUTTONBOX_END</layout_style>
- <spacing>8</spacing>
- <child_min_width>85</child_min_width>
- <child_min_height>27</child_min_height>
- <child_ipad_x>7</child_ipad_x>
- <child_ipad_y>0</child_ipad_y>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- <pack>GTK_PACK_END</pack>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>button10</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button11</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_APPLY</stock_button>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button12</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
- </widget>
- </widget>
-
- <widget>
- <class>Placeholder</class>
- </widget>
- </widget>
-</widget>
-
-</GTK-Interface>
+++ /dev/null
-/*
- * Translatable strings file generated by Glade.
- * Add this file to your project's POTFILES.in.
- * DO NOT compile it as part of your application.
- */
-
-gchar *s = N_("Project Window");
-gchar *s = N_("_New File");
-gchar *s = N_("_Project Options");
-gchar *s = N_("Show _Palette");
-gchar *s = N_("Show Property _Editor");
-gchar *s = N_("Show Element _Tree");
-gchar *s = N_("Open File");
-gchar *s = N_("Open");
-gchar *s = N_("Save File");
-gchar *s = N_("Save");
-gchar *s = N_("Options");
-gchar *s = N_("Palette");
-gchar *s = N_("Select");
-gchar *s = N_("Selector");
-gchar *s = N_("GStreamer Core");
-gchar *s = N_("Standard Elements");
-gchar *s = N_("Tree select...");
-gchar *s = N_("Properties");
-gchar *s = N_("Element");
-gchar *s = N_("Pads");
-gchar *s = N_("Signal");
-gchar *s = N_("Handler");
-gchar *s = N_("Data");
-gchar *s = N_("After");
-gchar *s = N_("Object");
-gchar *s = N_("...");
-gchar *s = N_("Object:");
-gchar *s = N_("Data:");
-gchar *s = N_("Handler:");
-gchar *s = N_("No");
-gchar *s = N_("After:");
-gchar *s = N_("Signal:");
-gchar *s = N_("Add");
-gchar *s = N_("Update");
-gchar *s = N_("Delete");
-gchar *s = N_("Clear");
-gchar *s = N_("Signals");
-gchar *s = N_("Copyright 2000");
-gchar *s = N_("An editor for GStreamer pipelines.");
-gchar *s = N_("Element Tree");
-gchar *s = N_("Select Signal");
-gchar *s = N_("Signals");
-gchar *s = N_("Editor Properties");
-gchar *s = N_("label16");
-gchar *s = N_("label17");
-gchar *s = N_("label18");
-gchar *s = N_("Select File");
-gchar *s = N_("OK");
-gchar *s = N_("Cancel");
+++ /dev/null
-<?xml version="1.0"?>
-<GTK-Interface>
-
-<project>
- <name>project1</name>
- <directory></directory>
- <source_directory></source_directory>
- <pixmaps_directory>pixmaps</pixmaps_directory>
- <language>C</language>
- <gnome_support>True</gnome_support>
- <gettext_support>True</gettext_support>
- <use_widget_names>False</use_widget_names>
- <main_source_file>gladesrc.c</main_source_file>
- <main_header_file>gladesrc.h</main_header_file>
- <handler_source_file>gladesig.c</handler_source_file>
- <handler_header_file>gladesig.h</handler_header_file>
-</project>
-
-<widget>
- <class>GtkWindow</class>
- <name>window1</name>
- <title>window1</title>
- <type>GTK_WINDOW_TOPLEVEL</type>
- <position>GTK_WIN_POS_NONE</position>
- <allow_shrink>False</allow_shrink>
- <allow_grow>True</allow_grow>
- <auto_shrink>False</auto_shrink>
-
- <widget>
- <class>GtkFrame</class>
- <name>element</name>
- <border_width>25</border_width>
- <label>mpegparse</label>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox1</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox1</name>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame5</name>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-
- <widget>
- <class>GtkLabel</class>
- <name>src</name>
- <label>src</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>Placeholder</class>
- </widget>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox3</name>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame3</name>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-
- <widget>
- <class>GtkLabel</class>
- <name>audiosrc</name>
- <label>audiosrc</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame4</name>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-
- <widget>
- <class>GtkLabel</class>
- <name>videosrc</name>
- <label></label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
- </widget>
- </widget>
- </widget>
-</widget>
-
-</GTK-Interface>
+++ /dev/null
-.TH GStreamer 1 "March 2001"
-.SH NAME
-gsteditor - a graphical GStreamer pipeline editor
-.SH SYNOPSIS
-.B gsteditor [OPTION...] [FILE]
-.SH DESCRIPTION
-.PP
-\fIgsteditor\fP is a graphical \fIGStreamer\fP pipeline editor. It can
-load, save, and run pipelines.
-.
-.SH OPTIONS
-.l
-\fIgsteditor\fP accepts the following options:
-.TP 8
-.B FILE
-Pipeline to load
-.TP 8
-.B \-\-help
-Print help synopsis and available FLAGS
-.TP 8
-.B \-\-gst\-info\-mask=FLAGS
-\fIGStreamer\fP info flags to set (list with \-\-help)
-.TP 8
-.B \-\-gst\-debug\-mask=FLAGS
-\fIGStreamer\fP debugging flags to set (list with \-\-help)
-.TP 8
-.B \-\-gst\-plugin\-spew
-\fIGStreamer\fP info flags to set
-Enable printout of errors while loading \fIGStreamer\fP plugins
-.TP 8
-.B \-\-gst\-plugin\-path=PATH
-Add directories separated with ':' to the plugin search path
-.SH SEE ALSO
-.BR gstreamer\-register (1),
-.BR gstreamer\-inspect (1),
-.BR gstreamer\-launch (1),
-.BR gstmediaplay (1)
-.SH AUTHOR
-The GStreamer team at http://gstreamer.net/
+++ /dev/null
-/* 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.
- */
-
-
-#include <gtk/gtk.h>
-#include <gnome.h>
-#include <gst/gst.h>
-
-#include "gsteditor.h"
-
-/* signals and args */
-enum {
- NAME_CHANGED,
- LAST_SIGNAL
-};
-
-enum {
- ARG_0,
- ARG_NAME,
-};
-
-static void gst_editor_class_init (GstEditorClass *klass);
-static void gst_editor_init (GstEditor *editor);
-
-static void gst_editor_set_arg (GtkObject *object, GtkArg *arg, guint id);
-static void gst_editor_get_arg (GtkObject *object, GtkArg *arg, guint id);
-
-static GtkFrame *parent_class = NULL;
-static guint gst_editor_signals[LAST_SIGNAL] = { 0 };
-
-GtkType
-gst_editor_get_type (void)
-{
- static GtkType editor_type = 0;
-
- if (!editor_type) {
- static const GtkTypeInfo editor_info = {
- "GstEditor",
- sizeof(GstEditor),
- sizeof(GstEditorClass),
- (GtkClassInitFunc)gst_editor_class_init,
- (GtkObjectInitFunc)gst_editor_init,
- NULL,
- NULL,
- (GtkClassInitFunc)NULL,
- };
- editor_type = gtk_type_unique (gtk_window_get_type (), &editor_info);
- }
- return editor_type;
-}
-
-static void
-gst_editor_class_init (GstEditorClass *klass)
-{
- GtkObjectClass *object_class;
-
- object_class = (GtkObjectClass*)klass;
-
- parent_class = gtk_type_class(gtk_window_get_type());
-
- gtk_object_add_arg_type("GstEditor::name",GTK_TYPE_STRING,
- GTK_ARG_READWRITE,ARG_NAME);
-
- gst_editor_signals[NAME_CHANGED] =
- gtk_signal_new("name_changed",GTK_RUN_FIRST,object_class->type,
- GTK_SIGNAL_OFFSET(GstEditorClass,name_changed),
- gtk_marshal_NONE__POINTER,GTK_TYPE_NONE,1,
- GST_TYPE_EDITOR);
-
- gtk_object_class_add_signals(object_class,gst_editor_signals,LAST_SIGNAL);
-
- object_class->set_arg = gst_editor_set_arg;
- object_class->get_arg = gst_editor_get_arg;
-}
-
-static void
-gst_editor_init(GstEditor *editor)
-{
-}
-
-static void
-on_name_changed (GstEditorElement *element, gpointer data)
-{
- gtk_signal_emit(GTK_OBJECT(element),gst_editor_signals[NAME_CHANGED], NULL);
-}
-/**
- * gst_editor_new:
- * name: name of editor frame
- *
- * Creates a new GstEditor composite widget with the given name.
- *
- * Returns: Freshly created GstEditor widget.
- */
-GstEditor*
-gst_editor_new (GstElement *element)
-{
- GstEditor *editor;
-
- g_return_val_if_fail(element != NULL, NULL);
-
- editor = gtk_type_new(gst_editor_get_type());
- editor->element = element;
-
- /* create the editor canvas */
- if (element) {
- editor->canvas = gst_editor_canvas_new_with_bin (gst_editor_bin_new (GST_BIN (element), NULL));
- }
- else {
- editor->canvas = gst_editor_canvas_new ();
- }
-
- /* create the scrolled window */
- editor->scrollwindow = gtk_scrolled_window_new(NULL,NULL);
-
- /* get the canvas widget */
- editor->canvaswidget = GTK_WIDGET (editor->canvas);
-
- gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(editor->scrollwindow),
- editor->canvaswidget);
-
- /* add the scrolled window to the canvas */
- gtk_container_add(GTK_CONTAINER(editor),editor->scrollwindow);
-
- gtk_widget_set_usize(GTK_WIDGET(editor),400,400);
-
- gtk_widget_show_all(GTK_WIDGET(editor));
-
- return editor;
-}
-
-const gchar*
-gst_editor_get_name (GstEditor *editor)
-{
- return gst_element_get_name (GST_ELEMENT (editor->element));
-}
-
-static void
-gst_editor_set_arg(GtkObject *object, GtkArg *arg, guint id)
-{
- GstEditor *editor = GST_EDITOR(object);
-
- switch (id) {
- case ARG_NAME:
- gtk_object_set(GTK_OBJECT(editor),"label",GTK_VALUE_STRING(*arg),NULL);
- gst_element_set_name(GST_ELEMENT(editor->element),
- GTK_VALUE_STRING(*arg));
- break;
- default:
- g_warning("gsteditor: unknown arg!\n");
- break;
- }
-}
-
-static void
-gst_editor_get_arg (GtkObject *object, GtkArg *arg, guint id)
-{
- GstEditor *editor = GST_EDITOR(object);
-
- switch (id) {
- case ARG_NAME:
- GTK_VALUE_STRING(*arg) =
- (gchar *)gst_element_get_name(GST_ELEMENT(editor->element));
- break;
- default:
- arg->type = GTK_TYPE_INVALID;
- break;
- }
-}
+++ /dev/null
-/* 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;
-typedef struct _GstEditorPadTemplate GstEditorPadTemplate;
-typedef struct _GstEditorPadTemplateClass GstEditorPadTemplateClass;
-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) \
- (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_EDITOR))
-
-
-struct _GstEditor {
- GtkWindow window;
-
- /* the actual element to be associated with this thing */
- GstElement *element;
-
- /* the editor canvas */
- GstEditorCanvas *canvas;
-
- /* the canvas and scrollwindow */
- GtkWidget *canvaswidget;
- GtkWidget *scrollwindow;
-};
-
-struct _GstEditorClass {
- GtkWindowClass parent_class;
-
- void (*name_changed) (GstEditor *editor);
-};
-
-
-GtkType gst_editor_get_type();
-GstEditor *gst_editor_new(GstElement *element);
-
-const gchar *gst_editor_get_name(GstEditor *editor);
-
-
-#define GST_EDITOR_SET_OBJECT(item,object) \
- (gtk_object_set_data(GTK_OBJECT(item),"gsteditorobject",(object)))
-#define GST_EDITOR_GET_OBJECT(item) \
- (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) \
- (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_EDITOR_ELEMENT))
-
-#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? */
- gboolean active; /* is it active (currently selected) */
-
- /* list of pads */
- GList *srcpads,*sinkpads;
- gboolean padlistchange;
-
- /* list of padtemplates */
- GList *srcpadtemps,*sinkpadtemps;
-
- /* interaction state */
- gboolean dragging,resizing,moved,hesitating;
- gdouble offx,offy,dragx,dragy;
-};
-
-struct _GstEditorElementClass {
- GnomeCanvasGroupClass parent_class;
-
- 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);
-};
-
-
-GtkType gst_editor_element_get_type();
-GstEditorElement *gst_editor_element_new(GstElement *element,
- 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);
-void gst_editor_element_set_name(GstEditorElement *element,
- const gchar *name);
-const gchar *gst_editor_element_get_name(GstEditorElement *element);
-
-
-#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) \
- (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_EDITOR_BIN))
-
-struct _GstEditorBin {
- GstEditorElement element;
-
- /* lists of GUI elements and connections */
- 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();
-
-GstEditorBin* gst_editor_bin_new (GstBin *bin, const gchar *first_arg_name,...);
-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);
-
-
-#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) \
- (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_EDITOR_CANVAS))
-
-GtkType gst_editor_canvas_get_type();
-
-struct _GstEditorCanvas {
- GnomeCanvas canvas;
-
- GstEditorBin *bin;
-};
-
-struct _GstEditorCanvasClass {
- GnomeCanvasClass parent_class;
-};
-
-GstEditorCanvas* gst_editor_canvas_new (void);
-GstEditorCanvas* gst_editor_canvas_new_with_bin (GstEditorBin *bin);
-
-void gst_editor_canvas_set_bin (GstEditorCanvas *canvas,
- GstEditorBin *element);
-GstEditorElement* gst_editor_canvas_get_bin (GstEditorCanvas *canvas);
-
-
-#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) \
- (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_EDITOR_PAD))
-
-struct _GstEditorPad {
- GtkObject object;
-
- /* 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? */
-
- /* interaction state */
- gboolean dragging,resizing,moved;
- gdouble dragx,dragy;
-
- /* connection */
-/* GnomeCanvasItem *connection; // can't use */
-/*GstEditorConnection */
-};
-
-struct _GstEditorPadClass {
- GtkObjectClass parent_class;
-
- void (*realize) (GstEditorPad *pad);
-};
-
-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);
-
-
-
-#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 {
- GtkObject object;
-
- /* 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? */
-
- /* interaction state */
- gboolean dragging,resizing,moved;
- gdouble dragx,dragy;
-
- /* connection */
-/* GnomeCanvasItem *connection; // can't use */
-/*GstEditorConnection */
-};
-
-struct _GstEditorPadTemplateClass {
- GtkObjectClass parent_class;
-
- void (*realize) (GstEditorPadTemplate *padtemplate);
-};
-
-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);
-
-
-#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) \
- (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_EDITOR_CONNECTION))
-
-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();
-GstEditorConnection *gst_editor_connection_new(GstEditorElement *parent,
- GstEditorPad *frompad);
-
-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__ */
+++ /dev/null
-/* 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.
- */
-
-
-#include <gnome.h>
-#include <gst/gst.h>
-
-#include "gsteditor.h"
-#include "gsteditorcreate.h"
-
-/* signals and args */
-enum {
- LAST_SIGNAL
-};
-
-enum {
- ARG_0,
-};
-
-static void gst_editor_bin_class_init (GstEditorBinClass *klass);
-static void gst_editor_bin_init (GstEditorBin *bin);
-
-/* static void gst_editor_bin_set_arg(GtkObject *object,GtkArg *arg,guint id); */
-/* static void gst_editor_bin_get_arg(GtkObject *object,GtkArg *arg,guint id); */
-
-static void gst_editor_bin_realize (GstEditorElement *bin);
-static void gst_editor_bin_repack (GstEditorBin *bin);
-
-static void gst_editor_bin_object_added (GstEditorBin *editorbin, GstObject *bin, GstObject *child);
-
-static gint gst_editor_bin_event (GnomeCanvasItem *item,
- GdkEvent *event,
- GstEditorElement *element);
-static gint gst_editor_bin_button_event (GnomeCanvasItem *item,
- GdkEvent *event,
- GstEditorElement *element);
-void gst_editor_bin_connection_drag (GstEditorBin *bin,
- gdouble wx,gdouble wy);
-
-static GstEditorElementClass *parent_class = NULL;
-
-GtkType
-gst_editor_bin_get_type (void)
-{
- static GtkType bin_type = 0;
-
- if (!bin_type) {
- static const GtkTypeInfo bin_info = {
- "GstEditorBin",
- sizeof(GstEditorBin),
- sizeof(GstEditorBinClass),
- (GtkClassInitFunc)gst_editor_bin_class_init,
- (GtkObjectInitFunc)gst_editor_bin_init,
- NULL,
- NULL,
- (GtkClassInitFunc)NULL,
- };
- bin_type = gtk_type_unique(gst_editor_element_get_type(),&bin_info);
- }
- return bin_type;
-}
-
-static void
-gst_editor_bin_class_init (GstEditorBinClass *klass)
-{
- GstEditorElementClass *element_class;
-
- element_class = (GstEditorElementClass*)klass;
-
- parent_class = gtk_type_class(gst_editor_element_get_type());
-
- element_class->event = gst_editor_bin_event;
- element_class->button_event = gst_editor_bin_button_event;
- element_class->realize = gst_editor_bin_realize;
-}
-
-static void
-gst_editor_bin_init (GstEditorBin *bin)
-{
- GstEditorElement *element = GST_EDITOR_ELEMENT(bin);
-
- element->insidewidth = 200;
- element->insideheight = 100;
-}
-
-GstEditorBin*
-gst_editor_bin_new (GstBin *bin, const gchar *first_arg_name,...)
-{
- GstEditorBin *editorbin;
- GList *children;
- va_list args;
- gdouble xpos;
-
- g_return_val_if_fail(bin != NULL, NULL);
- g_return_val_if_fail(GST_IS_BIN(bin), NULL);
-
- editorbin = GST_EDITOR_BIN(gtk_type_new(GST_TYPE_EDITOR_BIN));
- GST_EDITOR_ELEMENT(editorbin)->element = GST_ELEMENT(bin);
- GST_EDITOR_SET_OBJECT(bin, editorbin);
-
- gtk_signal_connect_object (GTK_OBJECT (bin), "object_added",
- gst_editor_bin_object_added, GTK_OBJECT (editorbin));
-
- va_start(args,first_arg_name);
- gst_editor_element_construct(GST_EDITOR_ELEMENT(editorbin), first_arg_name,args);
- va_end(args);
-
- children = gst_bin_get_list (bin);
- xpos = 50.0;
-
- while (children) {
- GstElement *child = (GstElement *)children->data;
-
- if (GST_IS_BIN (child)) {
- GstEditorBin *childbin = gst_editor_bin_new (GST_BIN (child), "x", xpos+60.0, "y", 80.0, NULL);
-
- gst_editor_bin_add (editorbin, GST_EDITOR_ELEMENT (childbin));
- xpos += 120.0;
- }
- else {
- GstEditorElement *childelement = gst_editor_element_new (child, "x", xpos, "y", 50.0, NULL);
-
- gst_editor_bin_add (editorbin, childelement);
- }
-
- xpos += 100.0;
- children = g_list_next (children);
- }
-
- gtk_object_set (GTK_OBJECT (editorbin), "width", xpos-50.0, NULL);
-
- return editorbin;
-}
-
-static void
-gst_editor_bin_realize (GstEditorElement *element)
-{
- GList *children;
- GstEditorBin *bin = GST_EDITOR_BIN(element);
-
- children = bin->elements;
-
- if (GST_EDITOR_ELEMENT_CLASS(parent_class)->realize) {
- GST_EDITOR_ELEMENT_CLASS(parent_class)->realize(GST_EDITOR_ELEMENT(bin));
- }
-
- while (children) {
- GstEditorElement *child = (GstEditorElement *)children->data;
- GstEditorElementClass *elementclass;
-
- elementclass = GST_EDITOR_ELEMENT_CLASS(GTK_OBJECT(child)->klass);
-
- if (elementclass->realize)
- (elementclass->realize) (child);
-
- children = g_list_next (children);
- }
-
- gst_editor_bin_repack (bin);
-}
-
-static void
-gst_editor_bin_repack (GstEditorBin *bin)
-{
-}
-
-static gint
-gst_editor_bin_event(GnomeCanvasItem *item,
- GdkEvent *event,
- GstEditorElement *element)
-{
- GstEditorBin *bin = GST_EDITOR_BIN(element);
-
-/* g_print("bin got %d event at %.2fx%.2f\n",event->type, */
-/* event->button.x,event->button.y); */
-
- switch (event->type) {
- case GDK_BUTTON_RELEASE:
- if (bin->connecting) {
-/* g_print("bin got release event during drag\n"); */
- gnome_canvas_item_ungrab(
- GNOME_CANVAS_ITEM(element->group),
- event->button.time);
- if (bin->connection->topad)
- gst_editor_connection_connect(bin->connection);
- else {
- bin->connection->frompad->connection = NULL;
- g_list_remove(bin->connections,bin->connection);
- gtk_object_destroy(GTK_OBJECT(bin->connection));
- bin->connection = NULL;
- }
- bin->connecting = FALSE;
-/* g_print("in bin, setting inchild for button release\n"); */
- /* element->canvas->inchild = TRUE; */
- return TRUE;
- }
- break;
- case GDK_MOTION_NOTIFY:
- if (bin->connecting) {
- gdouble x,y;
- x = event->button.x;y = event->button.y;
-/* g_print("bin has motion during connection draw at %.2fx%.2f\n", */
-/* x,y); */
- gst_editor_bin_connection_drag(bin,x,y);
- return TRUE;
- }
- break;
- default:
- break;
- }
-
- if (GST_EDITOR_ELEMENT_CLASS(parent_class)->event)
- return (*GST_EDITOR_ELEMENT_CLASS(parent_class)->event)(item,event,element);
-
- return TRUE;
-}
-
-
-static gint
-gst_editor_bin_button_event(GnomeCanvasItem *item,
- GdkEvent *event,
- GstEditorElement *element)
-{
- GstEditorBin *bin = GST_EDITOR_BIN(element);
- GstEditorElement *newelement;
- GdkEventButton *buttonevent;
-
-/* g_print("bin got button event\n"); */
-
- if (event->type != GDK_BUTTON_RELEASE) return FALSE;
-
- buttonevent = (GdkEventButton *) event;
-
- if (buttonevent->button != 1) return FALSE;
-
- gnome_canvas_item_w2i(item,&event->button.x,&event->button.y);
-/* g_print("calling gst_editor_create_item(,%.2f,%.2f)\n", */
-/* event->button.x,event->button.y); */
- newelement = gst_editor_create_item(event->button.x,event->button.y);
- if (newelement != NULL) {
- GstEditorElementClass *elementclass;
-
- gst_editor_bin_add (bin, newelement);
-
- elementclass = GST_EDITOR_ELEMENT_CLASS(GTK_OBJECT(newelement)->klass);
- if (elementclass->realize)
- (elementclass->realize)(newelement);
-
- return TRUE;
- }
- return FALSE;
-}
-
-
-void
-gst_editor_bin_start_banding (GstEditorBin *bin,GstEditorPad *pad)
-{
- GdkCursor *cursor;
-
-/* g_print("starting to band\n"); */
-
- g_return_if_fail(GST_IS_EDITOR_PAD(pad));
-
- bin->connection = gst_editor_connection_new (GST_EDITOR_ELEMENT (bin), pad);
- bin->connections = g_list_prepend (bin->connections, bin->connection);
-
- cursor = gdk_cursor_new (GDK_SB_RIGHT_ARROW);
- gnome_canvas_item_grab(
- GNOME_CANVAS_ITEM(GST_EDITOR_ELEMENT(bin)->group),
- GDK_POINTER_MOTION_MASK | GDK_BUTTON_RELEASE_MASK,
- cursor,GDK_CURRENT_TIME);
-
- bin->connecting = TRUE;
-}
-
-
-void
-gst_editor_bin_connection_drag (GstEditorBin *bin,
- gdouble wx,gdouble wy)
-{
- GstEditorElement *element;
- gdouble bx,by;
- GnomeCanvasItem *underitem, *under = NULL;
- GstEditorPad *destpad;
-
- element = GST_EDITOR_ELEMENT(bin);
-
- bx = wx;by = wy;
- gnome_canvas_item_w2i(GNOME_CANVAS_ITEM(GST_EDITOR_ELEMENT(bin)->group),&bx,&by);
-
- /* first see if we're on top of an interesting pad */
- underitem = gnome_canvas_get_item_at(
- &GST_EDITOR_ELEMENT(bin)->canvas->canvas,wx,wy);
- if (underitem != NULL)
- under = GST_EDITOR_GET_OBJECT(underitem);
- if ((under != NULL) && GST_IS_EDITOR_PAD(under)) {
- destpad = GST_EDITOR_PAD(under);
- if (destpad != bin->connection->frompad)
- gst_editor_connection_set_endpad(bin->connection,destpad);
- } else {
- gst_editor_connection_set_endpoint(bin->connection,bx,by);
- }
-
-/* This code is a nightmare, it'll be fixed in the next minor version
- if (
- ((bx < element->sinkwidth) ||
- (bx > (element->width - element->srcwidth))) &&
- ((by > element->titleheight) &&
- (by < (element->height - element->stateheight)))
- ) {
- if (!bin->inpadregion) {
- GstEditorPad *ghostpad;
- g_print("I'd be creating a ghost pad right about now...\n");
- gst_element_add_ghost_pad(
- GST_EDITOR_ELEMENT(bin)->element,
- bin->connection->frompad->pad);
- ghostpad = gst_editor_element_add_pad(GST_EDITOR_ELEMENT(bin),
- bin->connection->frompad->pad);
- gst_editor_connection_set_endpad(bin->connection,ghostpad);
- gtk_object_set(GTK_OBJECT(bin->connection),"ghost",TRUE,NULL);
- bin->inpadregion = TRUE;
- } else {
- g_print("I'd be moving the ghost pad around now...\n");
- }
- } else {
- if (bin->inpadregion) {
- g_print("I'd be removing the ghost pad now...\n");
- bin->inpadregion = FALSE;
- }
- }
-*/
-}
-
-static void
-gst_editor_bin_object_added (GstEditorBin *editorbin, GstObject *bin, GstObject *child)
-{
- g_print ("gsteditorbin: object added\n");
-}
-
-
-void
-gst_editor_bin_add (GstEditorBin *bin, GstEditorElement *element)
-{
- /* set the element's parent */
- element->parent = bin;
-
- /* set the canvas */
- element->canvas = GST_EDITOR_ELEMENT(bin)->canvas;
-
- /* add element to list of bin's children */
- bin->elements = g_list_prepend(bin->elements,element);
-
- /* add the real element to the real bin */
- if (!gst_object_get_parent (GST_OBJECT (element->element))) {
- gst_bin_add(GST_BIN(GST_EDITOR_ELEMENT(bin)->element),element->element);
- }
-}
+++ /dev/null
-/* 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.
- */
-
-
-#include <gnome.h>
-#include <gst/gst.h>
-
-#include "gsteditor.h"
-#include "gsteditorcreate.h"
-
-/* signals and args */
-enum {
- LAST_SIGNAL
-};
-
-enum {
- ARG_0,
-};
-
-static void gst_editor_canvas_class_init (GstEditorCanvasClass *klass);
-static void gst_editor_canvas_init (GstEditorCanvas *editorcanvas);
-
-static void gst_editor_canvas_set_arg (GtkObject *object,GtkArg *arg,guint id);
-static void gst_editor_canvas_get_arg (GtkObject *object,GtkArg *arg,guint id);
-
-static void gst_editor_canvas_realize (GtkWidget *widget);
-
-
-/* gint gst_editor_canvas_verbose_event(GtkWidget *widget,GdkEvent *event); */
-
-
-static GstEditorBinClass *parent_class = NULL;
-
-GtkType
-gst_editor_canvas_get_type (void)
-{
- static GtkType editor_canvas_type = 0;
-
- if (!editor_canvas_type) {
- static const GtkTypeInfo editor_canvas_info = {
- "GstEditorCanvas",
- sizeof(GstEditorCanvas),
- sizeof(GstEditorCanvasClass),
- (GtkClassInitFunc)gst_editor_canvas_class_init,
- (GtkObjectInitFunc)gst_editor_canvas_init,
- NULL,
- NULL,
- (GtkClassInitFunc)NULL,
- };
- editor_canvas_type = gtk_type_unique (gnome_canvas_get_type (), &editor_canvas_info);
- }
- return editor_canvas_type;
-}
-
-static void
-gst_editor_canvas_class_init (GstEditorCanvasClass *klass)
-{
- GtkObjectClass *object_class;
- GtkWidgetClass *widget_class;
-
- object_class = (GtkObjectClass*)klass;
- widget_class = (GtkWidgetClass *)klass;
-
- parent_class = gtk_type_class (gnome_canvas_get_type ());
-
- object_class->set_arg = gst_editor_canvas_set_arg;
- object_class->get_arg = gst_editor_canvas_get_arg;
-
- widget_class->realize = gst_editor_canvas_realize;
-}
-
-static void
-gst_editor_canvas_init (GstEditorCanvas *editorcanvas)
-{
-}
-
-GstEditorCanvas*
-gst_editor_canvas_new (void)
-{
- GstEditorCanvas *editorcanvas;
-
- editorcanvas = GST_EDITOR_CANVAS(gtk_type_new(GST_TYPE_EDITOR_CANVAS));
-
- return editorcanvas;
-}
-
-GstEditorCanvas*
-gst_editor_canvas_new_with_bin (GstEditorBin *bin)
-{
- GstEditorCanvas *editorcanvas;
-
- g_return_val_if_fail(bin != NULL, NULL);
-
- editorcanvas = gst_editor_canvas_new ();
- editorcanvas->bin = bin;
-
- GST_EDITOR_ELEMENT(bin)->parent = bin;
- GST_EDITOR_ELEMENT(bin)->canvas = editorcanvas;
-
- return editorcanvas;
-}
-
-static void
-gst_editor_canvas_realize (GtkWidget *widget)
-{
- GstEditorCanvas *canvas = GST_EDITOR_CANVAS (widget);
-
- if (GTK_WIDGET_CLASS(parent_class)->realize) {
- GTK_WIDGET_CLASS(parent_class)->realize(GTK_WIDGET(canvas));
- }
-
- if (canvas->bin) {
- GstEditorElementClass *element_class;
-
- GST_EDITOR_ELEMENT(canvas->bin)->group = gnome_canvas_root(GNOME_CANVAS(canvas));
-
- element_class = GST_EDITOR_ELEMENT_CLASS(GTK_OBJECT(canvas->bin)->klass);
-
- if (element_class->realize) {
- element_class->realize(GST_EDITOR_ELEMENT(canvas->bin));
- }
- }
-}
-
-static void
-gst_editor_canvas_set_arg (GtkObject *object,GtkArg *arg,guint id)
-{
- GstEditorCanvas *canvas;
-
- canvas = GST_EDITOR_CANVAS(object);
-
- switch (id) {
- default:
- g_warning("gsteditorcanvas: unknown arg!");
- break;
- }
-}
-
-static void
-gst_editor_canvas_get_arg (GtkObject *object,GtkArg *arg,guint id)
-{
- GstEditorCanvas *canvas;
-
- canvas = GST_EDITOR_CANVAS(object);
-
- switch (id) {
- default:
- arg->type = GTK_TYPE_INVALID;
- break;
- }
-}
-
+++ /dev/null
-#include <gnome.h>
-
-#include <gst/gst.h>
-#include <gst/gstutils.h>
-
-#include "gsteditor.h"
-
-/* class functions */
-static void gst_editor_connection_class_init (GstEditorConnectionClass *klass);
-static void gst_editor_connection_init (GstEditorConnection *connection);
-
-static void gst_editor_connection_set_arg (GtkObject *object,GtkArg *arg,guint id);
-static void gst_editor_connection_get_arg (GtkObject *object,GtkArg *arg,guint id);
-
-static void gst_editor_connection_destroy (GtkObject *object);
-static void gst_editor_connection_realize (GstEditorConnection *connection);
-
-/* events fired by items within self */
-/* static gint gst_editor_connection_line_event(GnomeCanvasItem *item, */
-/* GdkEvent *event, */
-/* GstEditorConnection *connection); */
-
-/* utility functions */
-
-
-enum {
- ARG_0,
- ARG_X,
- ARG_Y,
- ARG_FROMPAD,
- ARG_TOPAD,
- ARG_GHOST,
-};
-
-enum {
- LAST_SIGNAL
-};
-
-static GtkObjectClass *parent_class;
-/* static guint gst_editor_connection_signals[LAST_SIGNAL] = { 0 }; */
-
-GtkType
-gst_editor_connection_get_type (void)
-{
- static GtkType connection_type = 0;
-
- if (!connection_type) {
- static const GtkTypeInfo connection_info = {
- "GstEditorConnection",
- sizeof(GstEditorConnection),
- sizeof(GstEditorConnectionClass),
- (GtkClassInitFunc)gst_editor_connection_class_init,
- (GtkObjectInitFunc)gst_editor_connection_init,
- NULL,
- NULL,
- (GtkClassInitFunc)NULL,
- };
- connection_type = gtk_type_unique (gtk_object_get_type (), &connection_info);
- }
- return connection_type;
-}
-
-static void
-gst_editor_connection_class_init (GstEditorConnectionClass *klass)
-{
- GtkObjectClass *object_class;
-
- object_class = (GtkObjectClass*)klass;
-
- parent_class = gtk_type_class(gnome_canvas_line_get_type());
-
- gtk_object_add_arg_type("GstEditorConnection::x",GTK_TYPE_DOUBLE,
- GTK_ARG_READWRITE,ARG_X);
- gtk_object_add_arg_type("GstEditorConnection::y",GTK_TYPE_DOUBLE,
- GTK_ARG_READWRITE,ARG_Y);
- gtk_object_add_arg_type("GstEditorConnection::frompad",GTK_TYPE_POINTER,
- GTK_ARG_READWRITE,ARG_FROMPAD);
- gtk_object_add_arg_type("GstEditorConnection::topad",GTK_TYPE_POINTER,
- GTK_ARG_READWRITE,ARG_TOPAD);
- gtk_object_add_arg_type("GstEditorConnection::ghost",GTK_TYPE_BOOL,
- GTK_ARG_READWRITE,ARG_GHOST);
-
- klass->realize = gst_editor_connection_realize;
-
- object_class->set_arg = gst_editor_connection_set_arg;
- object_class->get_arg = gst_editor_connection_get_arg;
-
- object_class->destroy = gst_editor_connection_destroy;
-}
-
-static void
-gst_editor_connection_init (GstEditorConnection *connection)
-{
- connection->points = gnome_canvas_points_new(2);
-}
-
-GstEditorConnection*
-gst_editor_connection_new (GstEditorElement *parent,
- GstEditorPad *frompad)
-{
- GstEditorConnection *connection;
-
- g_return_val_if_fail(parent != NULL, NULL);
- g_return_val_if_fail(GST_IS_EDITOR_ELEMENT(parent), NULL);
- g_return_val_if_fail(frompad != NULL, NULL);
- g_return_val_if_fail(GST_IS_EDITOR_PAD(frompad), NULL);
-
- connection = GST_EDITOR_CONNECTION(gtk_type_new(GST_TYPE_EDITOR_CONNECTION));
- connection->frompad = frompad;
- connection->frompad->connection = connection;
- connection->fromsrc = connection->frompad->issrc;
- connection->parent = parent;
-
- gst_editor_connection_realize(connection);
-
- return connection;
-}
-
-
-static void
-gst_editor_connection_set_arg (GtkObject *object,GtkArg *arg,guint id)
-{
- GstEditorConnection *connection;
-
- /* get the major types of this object */
- connection = GST_EDITOR_CONNECTION(object);
-
- switch (id) {
- case ARG_X:
- connection->x = GTK_VALUE_DOUBLE(*arg);
- connection->resize = TRUE;
- break;
- case ARG_Y:
- connection->y = GTK_VALUE_DOUBLE(*arg);
- connection->resize = TRUE;
- break;
- case ARG_TOPAD:
- if (connection->topad) {
- if (connection->ghost)
- connection->topad->ghostconnection = NULL;
- else
- connection->topad->connection = NULL;
- }
- connection->topad = GTK_VALUE_POINTER(*arg);
- /* if this is the same type, refuse */
- if (connection->topad &&
- (connection->frompad->issrc == connection->topad->issrc))
- connection->topad = NULL;
- if (connection->topad) {
- if (connection->ghost)
- connection->topad->ghostconnection = connection;
- else
- connection->topad->connection = connection;
- }
- connection->resize = TRUE;
- break;
- case ARG_GHOST:
- connection->ghost = GTK_VALUE_BOOL(*arg);
- break;
- default:
- g_warning("gsteditorconnection: unknown arg!");
- break;
- }
- gst_editor_connection_resize(connection);
-}
-
-static void
-gst_editor_connection_get_arg (GtkObject *object,GtkArg *arg,guint id)
-{
- GstEditorConnection *connection;
-
- /* get the major types of this object */
- connection = GST_EDITOR_CONNECTION(object);
-
- switch (id) {
- case ARG_X:
- GTK_VALUE_INT(*arg) = connection->x;
- break;
- case ARG_Y:
- GTK_VALUE_INT(*arg) = connection->y;
- break;
- default:
- arg->type = GTK_TYPE_INVALID;
- break;
- }
-}
-
-
-static void
-gst_editor_connection_realize (GstEditorConnection *connection)
-{
- connection->points->coords[0] = 0.0;
- connection->points->coords[1] = 0.0;
- connection->points->coords[2] = 0.0;
- connection->points->coords[3] = 0.0;
- connection->line = gnome_canvas_item_new(
- GST_EDITOR_ELEMENT(connection->parent)->group,
- gnome_canvas_line_get_type(),
- "points",connection->points,"width_units",2.0, NULL);
-}
-
-static void
-gst_editor_connection_destroy (GtkObject *object)
-{
- GstEditorConnection *connection = GST_EDITOR_CONNECTION(object);
-
- gtk_object_destroy(GTK_OBJECT(connection->line));
-}
-
-void
-gst_editor_connection_resize (GstEditorConnection *connection)
-{
- gdouble x1,y1,x2,y2;
-
- if (connection->resize != TRUE) return;
- connection->resize = FALSE;
-
-/* g_print("resizing connection, frompad is %p, topad is %p\n", */
-/* connection->frompad,connection->topad); */
-
- /* calculate the new endpoints */
- if (connection->topad == NULL) {
- /* our base point is the source pad */
- if (connection->fromsrc)
- x1 = connection->frompad->x + connection->frompad->width;
- else
- x1 = connection->frompad->x;
- y1 = connection->frompad->y + (connection->frompad->height / 2);
- x2 = connection->x;
- y2 = connection->y;
- /* NOTE: coords are in the following state:
- x1,y1: item coords relative to the element's group
- x2,y2: item coords relative to the bin's group
- This means translating the x1,y1 coords into world, then into bin.
- */
- gnome_canvas_item_i2w(GNOME_CANVAS_ITEM(connection->frompad->parent->group),&x1,&y1);
- gnome_canvas_item_w2i(GNOME_CANVAS_ITEM(GST_EDITOR_ELEMENT_GROUP(connection->parent)),
- &x1,&y1);
- } else {
- if (connection->fromsrc) {
- x1 = connection->frompad->x + connection->frompad->width;
- x2 = connection->topad->x;
- } else {
- x1 = connection->frompad->x;
- x2 = connection->topad->x + connection->topad->width;
- }
- y1 = connection->frompad->y + (connection->frompad->height / 2);
- y2 = connection->topad->y + (connection->topad->height / 2);
- gnome_canvas_item_i2w(GNOME_CANVAS_ITEM(connection->frompad->parent->group),&x1,&y1);
- gnome_canvas_item_w2i(GNOME_CANVAS_ITEM(GST_EDITOR_ELEMENT_GROUP(connection->parent)),
- &x1,&y1);
- gnome_canvas_item_i2w(GNOME_CANVAS_ITEM(connection->topad->parent->group),&x2,&y2);
- gnome_canvas_item_w2i(GNOME_CANVAS_ITEM(GST_EDITOR_ELEMENT_GROUP(connection->parent)),
- &x2,&y2);
- }
-
- connection->points->coords[0] = x1;
- connection->points->coords[1] = y1;
- connection->points->coords[2] = x2;
- connection->points->coords[3] = y2;
- gnome_canvas_item_set(connection->line,
- "points",connection->points,NULL);
-}
-
-void
-gst_editor_connection_set_endpoint (GstEditorConnection *connection,
- gdouble x,gdouble y)
-{
- connection->x = x;
- connection->y = y;
- if (connection->topad) {
- if (connection->ghost)
- connection->topad->ghostconnection = NULL;
- else
- connection->topad->connection = NULL;
- connection->topad = NULL;
- }
- connection->resize = TRUE;
- gst_editor_connection_resize(connection);
-}
-
-void
-gst_editor_connection_set_endpad (GstEditorConnection *connection,
- GstEditorPad *pad)
-{
- /* first check for the trivial case */
- if (connection->topad == pad) return;
-
- /* now clean up if we've changed pads */
- if (connection->topad) {
- if (connection->ghost)
- connection->topad->ghostconnection = NULL;
- else
- connection->topad->connection = NULL;
- }
- connection->topad = pad;
- if (connection->ghost)
- connection->topad->ghostconnection = connection;
- else
- connection->topad->connection = connection;
- connection->resize = TRUE;
- gst_editor_connection_resize(connection);
-}
-
-void
-gst_editor_connection_connect (GstEditorConnection *connection)
-{
- if (connection->ghost) {
- g_print("uhhh.... Boo!\n");
- } else {
- if (connection->fromsrc)
- gst_pad_connect(connection->frompad->pad,connection->topad->pad);
- else
- gst_pad_connect(connection->topad->pad,connection->frompad->pad);
- }
-}
+++ /dev/null
-/* 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_CONNECTION_H__
-#define __GST_EDITOR_CONNECTION_H__
-
-#include <gnome.h>
-#include <gst.h>
-
-#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,GstEditorConnection))
-#define GST_IS_EDITOR_CONNECTION(obj) \
- (GTK_CHECK_TYPE((obj),GST_TYPE_EDITOR_CONNECTION))
-#define GST_IS_EDITOR_CONNECTION_CLASS(obj) \
- (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_EDITOR_CONNECTION))
-
-typedef struct _GstEditorConnection GstEditorConnection;
-typedef struct _GstEditorConnectionClass GstEditorConnectionClass;
-
-struct _GstEditorConnection {
- GnomeCanvasLine line;
-
- /* the two pads we're connecting */
- GstEditorPad *pad1, *pad2;
- gdouble fromsrc;
-
- /* visual stuff */
- gdouble x,y; // terminating point
- GnomeCanvasPoints *points;
- gboolean created; // has it been created?
- gboolean resized; // does it need resizing?
-};
-
-struct _GstEditorConnectionClass {
- GnomeCanvasGroupClass parent_class;
-};
-
-GtkType gst_editor_connection_get_type();
-
-GstEditorConnection* gst_editor_connection_new (GstEditorBin *parent,
- GstEditorPad *frompad);
-
-
-#endif /* __GST_EDITOR_CONNECTION_H__ */
+++ /dev/null
-/* 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.
- */
-
-
-#include <gnome.h>
-
-#include <gst/gst.h>
-
-#include "gsteditor.h"
-#include "gstelementselect.h"
-#include "gsteditorcreate.h"
-
-GstEditorElement*
-gst_editor_create_item(gdouble x,gdouble y)
-{
- GstElementFactory *factory;
- GstElement *element;
- GstEditorElement *editorelement;
-
- factory = element_select_dialog();
- if (factory) {
-/* g_print("got factory \"%s\"\n",factory->name); */
- element = gst_elementfactory_create(factory, GST_OBJECT_NAME (factory));
- if (element) {
- if (GST_IS_BIN(element)) {
-/* g_print("factory is a bin\n"); */
- editorelement = GST_EDITOR_ELEMENT(gst_editor_bin_new(
- GST_BIN(element), "x",x,"y",y,"width",50.0,"height",20.0,NULL));
- } else {
-/* g_print("factory is an element\n"); */
- editorelement = gst_editor_element_new(element,
- "x",x,"y",y,"width",50.0,"height",20.0,NULL);
- }
-/* g_print("created element \"%s\" at %.2fx%.2f\n", */
-/* gst_object_get_name(GST_OBJECT(element)), */
-/* x,y); */
- return editorelement;
- }
- }
- return NULL;
-}
+++ /dev/null
-/* 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.
- */
-
-
-#include "gsteditor.h"
-
-GstEditorElement *gst_editor_create_item(gdouble x,gdouble y);
+++ /dev/null
-/* 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.
- */
-
-
-#include <gnome.h>
-
-#include <gst/gst.h>
-#include <gst/gstutils.h>
-
-#include "gsteditor.h"
-#include "gsteditorproject.h"
-#include "gsteditorproperty.h"
-
-/* class functions */
-static void gst_editor_element_class_init (GstEditorElementClass *klass);
-static void gst_editor_element_init (GstEditorElement *element);
-
-static void gst_editor_element_set_arg (GtkObject *object,GtkArg *arg,guint id);
-static void gst_editor_element_get_arg (GtkObject *object,GtkArg *arg,guint id);
-
-static void gst_editor_element_realize (GstEditorElement *element);
-static gint gst_editor_element_event (GnomeCanvasItem *item,
- GdkEvent *event,
- GstEditorElement *element);
-
-/* events fired by items within self */
-static gint gst_editor_element_resizebox_event (GnomeCanvasItem *item,
- GdkEvent *event,
- GstEditorElement *element);
-static gint gst_editor_element_group_event (GnomeCanvasItem *item,
- GdkEvent *event,
- GstEditorElement *element);
-static gint gst_editor_element_state_event (GnomeCanvasItem *item,
- GdkEvent *event,
- gpointer data);
-
-/* utility functions */
-static void gst_editor_element_resize (GstEditorElement *element);
-static void gst_editor_element_set_state (GstEditorElement *element,
- gint id,gboolean set);
-static void gst_editor_element_add_pad_wrapper (GstEditorElement *element,
- GstPad *pad);
-static void gst_editor_element_add_pad (GstEditorElement *element,
- GstPad *pad);
-GstEditorPadTemplate* gst_editor_element_add_padtemplate (GstEditorElement *element,
- GstPadTemplate *pad);
-static void gst_editor_element_sync_state (GstEditorElement *element);
-static void gst_editor_element_sync_state_wrapper (GstEditorElement *element);
-static void gst_editor_element_move (GstEditorElement *element,
- gdouble dx,gdouble dy);
-static void gst_editor_element_position_changed (GstEditorElement *element,
- GstEditorElement *parent);
-
-static gchar *_gst_editor_element_states[] = { "S","R","P","F" };
-
-static GstElementState _gst_element_states[] = {
- GST_STATE_NULL,
- GST_STATE_READY,
- GST_STATE_PLAYING,
- GST_STATE_PAUSED,
-};
-
-enum {
- ARG_0,
- ARG_X,
- ARG_Y,
- ARG_WIDTH,
- ARG_HEIGHT,
- ARG_X1,
- ARG_Y1,
- ARG_X2,
- ARG_Y2,
- ARG_ELEMENT,
- ARG_ACTIVE,
-};
-
-enum {
- NAME_CHANGED,
- POSITION_CHANGED,
- SIZE_CHANGED,
- LAST_SIGNAL
-};
-
-static GtkObjectClass *parent_class;
-static guint gst_editor_element_signals[LAST_SIGNAL] = { 0 };
-
-GtkType
-gst_editor_element_get_type(void)
-{
- static GtkType element_type = 0;
-
- if (!element_type) {
- static const GtkTypeInfo element_info = {
- "GstEditorElement",
- sizeof(GstEditorElement),
- sizeof(GstEditorElementClass),
- (GtkClassInitFunc)gst_editor_element_class_init,
- (GtkObjectInitFunc)gst_editor_element_init,
- NULL,
- NULL,
- (GtkClassInitFunc)NULL,
- };
- element_type = gtk_type_unique(gtk_object_get_type(),&element_info);
- }
- return element_type;
-}
-
-static void
-gst_editor_element_class_init (GstEditorElementClass *klass)
-{
- GtkObjectClass *object_class;
-
- object_class = (GtkObjectClass*)klass;
-
- parent_class = gtk_type_class(gtk_object_get_type());
-
- gst_editor_element_signals[NAME_CHANGED] =
- gtk_signal_new ("name_changed", GTK_RUN_FIRST, object_class->type,
- GTK_SIGNAL_OFFSET (GstEditorElementClass, name_changed),
- gtk_marshal_NONE__POINTER, GTK_TYPE_NONE, 1,
- GST_TYPE_EDITOR_ELEMENT);
- gst_editor_element_signals[POSITION_CHANGED] =
- gtk_signal_new ("position_changed", GTK_RUN_FIRST, object_class->type,
- GTK_SIGNAL_OFFSET (GstEditorElementClass, position_changed),
- gtk_marshal_NONE__POINTER, GTK_TYPE_NONE, 1,
- GST_TYPE_EDITOR_ELEMENT);
- gst_editor_element_signals[SIZE_CHANGED] =
- gtk_signal_new ("size_changed", GTK_RUN_FIRST, object_class->type,
- GTK_SIGNAL_OFFSET (GstEditorElementClass, size_changed),
- gtk_marshal_NONE__POINTER, GTK_TYPE_NONE, 1,
- GST_TYPE_EDITOR_ELEMENT);
-
- gtk_object_class_add_signals(object_class,gst_editor_element_signals,LAST_SIGNAL);
-
- gtk_object_add_arg_type("GstEditorElement::x",GTK_TYPE_DOUBLE,
- GTK_ARG_READWRITE|GTK_ARG_CONSTRUCT_ONLY,
- ARG_X);
- gtk_object_add_arg_type("GstEditorElement::y",GTK_TYPE_DOUBLE,
- GTK_ARG_READWRITE|GTK_ARG_CONSTRUCT_ONLY,
- ARG_Y);
- gtk_object_add_arg_type("GstEditorElement::width",GTK_TYPE_DOUBLE,
- GTK_ARG_READWRITE|GTK_ARG_CONSTRUCT_ONLY,
- ARG_WIDTH);
- gtk_object_add_arg_type("GstEditorElement::height",GTK_TYPE_DOUBLE,
- GTK_ARG_READWRITE|GTK_ARG_CONSTRUCT_ONLY,
- ARG_HEIGHT);
- gtk_object_add_arg_type("GstEditorElement::x1",GTK_TYPE_DOUBLE,
- GTK_ARG_READWRITE, ARG_X1);
- gtk_object_add_arg_type("GstEditorElement::y1",GTK_TYPE_DOUBLE,
- GTK_ARG_READWRITE, ARG_Y1);
- gtk_object_add_arg_type("GstEditorElement::x2",GTK_TYPE_DOUBLE,
- GTK_ARG_READWRITE, ARG_X2);
- gtk_object_add_arg_type("GstEditorElement::y2",GTK_TYPE_DOUBLE,
- GTK_ARG_READWRITE, ARG_Y2);
- gtk_object_add_arg_type("GstEditorElement::element",GTK_TYPE_POINTER,
- GTK_ARG_READABLE, ARG_ELEMENT);
- gtk_object_add_arg_type("GstEditorElement::active",GTK_TYPE_BOOL,
- GTK_ARG_READWRITE, ARG_ACTIVE);
-
- klass->realize = gst_editor_element_realize;
- klass->event = gst_editor_element_event;
-
- object_class->set_arg = gst_editor_element_set_arg;
- object_class->get_arg = gst_editor_element_get_arg;
-}
-
-static void
-gst_editor_element_init (GstEditorElement *element)
-{
- element->active = FALSE;
-}
-
-GstEditorElement*
-gst_editor_element_new (GstElement *element,
- const gchar *first_arg_name, ...)
-{
- GstEditorElement *editorelement;
- va_list args;
-
- g_return_val_if_fail(element != NULL, NULL);
- g_return_val_if_fail(GST_IS_ELEMENT(element), NULL);
-
- editorelement = GST_EDITOR_ELEMENT(gtk_type_new(GST_TYPE_EDITOR_ELEMENT));
- editorelement->element = element;
- GST_EDITOR_SET_OBJECT(element, editorelement);
-
- va_start(args,first_arg_name);
- gst_editor_element_construct(editorelement,first_arg_name,args);
- va_end(args);
-
- return editorelement;
-}
-
-void
-gst_editor_element_set_name (GstEditorElement *element,
- const gchar *name)
-{
- g_return_if_fail(GST_IS_EDITOR_ELEMENT(element));
- g_return_if_fail(name != NULL);
-
- gst_element_set_name(element->element, (gchar *)name);
- gnome_canvas_item_set(element->title, "text", name, NULL);
- gtk_signal_emit(GTK_OBJECT(element),gst_editor_element_signals[NAME_CHANGED], element);
-}
-
-const gchar*
-gst_editor_element_get_name (GstEditorElement *element)
-{
- g_return_val_if_fail(GST_IS_EDITOR_ELEMENT(element), NULL);
-
- return gst_element_get_name(element->element);
-}
-
-void
-gst_editor_element_construct (GstEditorElement *element,
- const gchar *first_arg_name,
- va_list args)
-{
- GtkObject *obj = GTK_OBJECT(element);
- GSList *arg_list = NULL, *info_list = NULL;
- gchar *error;
-
-/* g_print("in gst_editor_element_construct()\n"); */
-
- error = gtk_object_args_collect(GTK_OBJECT_TYPE(obj),&arg_list,
- &info_list,first_arg_name,args);
- if (error) {
- g_warning("gst_editor_element_construct(): %s",error);
- g_free(error);
- } else {
- GSList *arg,*info;
-/* g_print("setting all the arguments on the element\n"); */
- for (arg=arg_list,info=info_list;arg;arg=arg->next,info=info->next)
- gtk_object_arg_set(obj,arg->data,info->data);
- gtk_args_collect_cleanup(arg_list,info_list);
- }
-}
-
-static void
-gst_editor_element_set_arg (GtkObject *object, GtkArg *arg, guint id)
-{
- GstEditorElement *element;
-
- /* get the major types of this object */
- element = GST_EDITOR_ELEMENT(object);
-
- switch (id) {
- case ARG_X:
- element->x = GTK_VALUE_DOUBLE(*arg);
- break;
- case ARG_Y:
- element->y = GTK_VALUE_DOUBLE(*arg);
- break;
- case ARG_WIDTH:
- element->width = GTK_VALUE_DOUBLE(*arg);
- element->resize = TRUE;
- break;
- case ARG_HEIGHT:
- element->height = GTK_VALUE_DOUBLE(*arg);
- element->resize = TRUE;
- break;
- case ARG_X1:
- element->x = GTK_VALUE_DOUBLE(*arg);
- element->resize = TRUE;
- break;
- case ARG_Y1:
- element->y = GTK_VALUE_DOUBLE(*arg);
- element->resize = TRUE;
- break;
- case ARG_X2:
- /* make sure it's big enough, grow if not */
- element->width = MAX(GTK_VALUE_DOUBLE(*arg),element->minwidth);
- element->resize = TRUE;
- break;
- case ARG_Y2:
- /* make sure it's big enough, grow if not */
- element->height = MAX(GTK_VALUE_DOUBLE(*arg),element->minheight);
- element->resize = TRUE;
- break;
- case ARG_ACTIVE:
- element->active = GTK_VALUE_BOOL(*arg);
- gnome_canvas_item_set(GNOME_CANVAS_ITEM(element->border),
- "width_units", (element->active ? 2.0 : 1.0), NULL);
- break;
- default:
- g_warning("gsteditorelement: unknown arg!");
- break;
- }
-}
-
-static void
-gst_editor_element_get_arg(GtkObject *object, GtkArg *arg, guint id)
-{
- GstEditorElement *element;
-
- /* get the major types of this object */
- element = GST_EDITOR_ELEMENT(object);
-
- switch (id) {
- case ARG_X:
- GTK_VALUE_INT(*arg) = element->x + (element->width / 2.0);
- break;
- case ARG_Y:
- GTK_VALUE_INT(*arg) = element->y + (element->height / 2.0);
- break;
- case ARG_WIDTH:
- GTK_VALUE_INT(*arg) = element->width;
- break;
- case ARG_HEIGHT:
- GTK_VALUE_INT(*arg) = element->height;
- break;
- case ARG_X1:
- GTK_VALUE_INT(*arg) = element->x;
- break;
- case ARG_Y1:
- GTK_VALUE_INT(*arg) = element->y;
- break;
- case ARG_X2:
- GTK_VALUE_INT(*arg) = element->x + element->width;
- break;
- case ARG_Y2:
- GTK_VALUE_INT(*arg) = element->y + element->height;
- break;
- case ARG_ELEMENT:
- GTK_VALUE_POINTER(*arg) = element->element;
- break;
- case ARG_ACTIVE:
- GTK_VALUE_BOOL(*arg) = element->active;
- break;
- default:
- arg->type = GTK_TYPE_INVALID;
- break;
- }
-}
-
-static GtkMenu*
-gst_editor_element_get_popup_menu (GstEditorElement *element)
-{
- GtkMenu *menu;
-
- menu = GTK_MENU (gtk_menu_new ());
- gtk_menu_append (menu, gtk_menu_item_new_with_label ("cut"));
- gtk_menu_append (menu, gtk_menu_item_new_with_label ("copy"));
- gtk_menu_append (menu, gtk_menu_item_new_with_label ("paste"));
- gtk_widget_show_all (GTK_WIDGET (menu));
-
- return menu;
-}
-
-static void
-gst_editor_element_realize (GstEditorElement *element)
-{
- GnomeCanvasGroup *parentgroup;
- gint i;
- gdouble x1,y1,x2,y2;
- GList *pads;
-
-/* g_print("realizing editor element %p\n",element); */
-
- /* we have to have a parent by this point */
- g_return_if_fail(element->parent != NULL);
-
- /* set the state signal of the actual element */
- gtk_signal_connect_object (GTK_OBJECT(element->element),"state_change",
- GTK_SIGNAL_FUNC(gst_editor_element_sync_state_wrapper),
- GTK_OBJECT (element));
-
- gtk_signal_connect_object (GTK_OBJECT(element->element),"new_pad",
- GTK_SIGNAL_FUNC(gst_editor_element_add_pad_wrapper),
- GTK_OBJECT (element));
-
- gtk_signal_connect_object (GTK_OBJECT(element->parent),"position_changed",
- GTK_SIGNAL_FUNC(gst_editor_element_position_changed),
- GTK_OBJECT (element));
-
- /* create the bounds if we haven't had them set */
-/* g_print("centering element at %.2fx%.2f (%.2fx%.2f)\n", */
-/* element->x,element->y,element->width,element->height); */
-
-
- /* create the group holding all the stuff for this element */
- parentgroup = GST_EDITOR_ELEMENT(element->parent)->group;
- element->group = GNOME_CANVAS_GROUP(gnome_canvas_item_new(parentgroup,
- gnome_canvas_group_get_type(),
- "x",element->x - (element->width / 2.0),
- "y",element->y - (element->height / 2.0),NULL));
-/* g_print("origin of group is %.2fx%.2f\n", */
-/* element->x - (element->width / 2.0), */
-/* element->y - (element->height / 2.0)); */
- g_return_if_fail(element->group != NULL);
- GST_EDITOR_SET_OBJECT(element->group,element);
- gtk_signal_connect(GTK_OBJECT(element->group),"event",
- GTK_SIGNAL_FUNC(gst_editor_element_group_event),element);
-
- /* calculate the inter-group coords (x1,y1,x2,y2 are convenience vars) */
- x1 = 0.0;y1 = 0.0;
- x2 = element->width;y2 = element->height;
-
- /* create bordering box */
- element->border = gnome_canvas_item_new(element->group,
- gnome_canvas_rect_get_type(),
- "width_units",1.0,"fill_color","white","outline_color","black",
- "x1",x1,"y1",y1,"x2",x2,"y2",y2,NULL);
- g_return_if_fail(element->border != NULL);
- GST_EDITOR_SET_OBJECT(element->border,element);
-
- /* create resizing box */
- element->resizebox = gnome_canvas_item_new(element->group,
- gnome_canvas_rect_get_type(),
- "width_units",1.0,"fill_color","white","outline_color","black",
- "x1",x2-4.0,"y1",y2-4.0,"x2",x2,"y2",y2,NULL);
- g_return_if_fail(element->resizebox != NULL);
- GST_EDITOR_SET_OBJECT(element->resizebox,element);
- gtk_signal_connect(GTK_OBJECT(element->resizebox),"event",
- GTK_SIGNAL_FUNC(gst_editor_element_resizebox_event),element);
-
- /* create the title */
- element->title = gnome_canvas_item_new(element->group,
- gnome_canvas_text_get_type(),
- "text",gst_element_get_name(GST_ELEMENT(element->element)),
- "x",x1+1.0,"y",y1+1.0,"anchor",GTK_ANCHOR_NORTH_WEST,
- "font_gdk",gtk_widget_get_default_style()->font,
- NULL);
- g_return_if_fail(element->title != NULL);
- GST_EDITOR_SET_OBJECT(element->title,element);
-
- /* create the state boxen */
- for (i=0;i<4;i++) {
- element->statebox[i] = gnome_canvas_item_new(element->group,
- gnome_canvas_rect_get_type(),
- "width_units",1.0,"fill_color","white","outline_color","black",
- "x1",0.0,"y1",0.0,"x2",0.0,"y2",0.0,
- NULL);
- g_return_if_fail(element->statebox[i] != NULL);
-
- GST_EDITOR_SET_OBJECT(element->statebox[i],element);
- gtk_signal_connect(GTK_OBJECT(element->statebox[i]),"event",
- GTK_SIGNAL_FUNC(gst_editor_element_state_event),
- GINT_TO_POINTER(i));
- element->statetext[i] = gnome_canvas_item_new(element->group,
- gnome_canvas_text_get_type(),
- "text",_gst_editor_element_states[i],
- "x",0.0,"y",0.0,"anchor",GTK_ANCHOR_NORTH_WEST,
- "font","-*-*-*-*-*-*-6-*-*-*-*-*-*-*",
- NULL);
- g_return_if_fail(element->statetext[i] != NULL);
- GST_EDITOR_SET_OBJECT(element->statetext[i],element);
- gtk_signal_connect(GTK_OBJECT(element->statetext[i]),"event",
- GTK_SIGNAL_FUNC(gst_editor_element_state_event),
- GINT_TO_POINTER(i));
- }
-
- /* get all the padtemplates */
- pads = gst_element_get_padtemplate_list(element->element);
- while (pads) {
- GstPadTemplate *temp = (GstPadTemplate *) pads->data;
-
- gst_editor_element_add_padtemplate (element,temp);
-
- pads = g_list_next(pads);
- }
-
- /* get all the pads */
- pads = gst_element_get_pad_list(element->element);
- while (pads) {
- GstPad *pad = GST_PAD(pads->data);
-
- gst_editor_element_add_pad(element,pad);
-
- pads = g_list_next(pads);
- }
-
- element->realized = TRUE;
-
- /* force a resize */
- element->resize = TRUE;
- gst_editor_element_resize(element);
-
- /* recenter things on the supposed center */
-/* g_print("recentering element at %.2fx%.2f (%.2fx%.2f)\n", */
-/* element->x,element->y,element->width,element->height); */
- element->x -= (element->width / 2.0);
- element->y -= (element->height / 2.0);
- gnome_canvas_item_set(GNOME_CANVAS_ITEM(element->group),
- "x",element->x,"y",element->y,NULL);
-/* g_print("origin of group is %.2fx%.2f\n",element->x,element->y); */
-
- gst_editor_element_repack(element);
-}
-
-
-static void
-gst_editor_element_resize (GstEditorElement *element)
-{
- gdouble itemwidth,itemheight;
- gdouble groupwidth,groupheight;
- GList *pads;
- GstEditorPad *editorpad;
- GstEditorPadTemplate *editorpadtemplate;
- gint i;
-
- if (element->resize != TRUE) return;
- element->resize = FALSE;
-
-/* g_print("resizing element\n"); */
-
- element->minwidth = element->insidewidth;
- element->minheight = element->insideheight;
-
- /* get the text size and add it into minsize */
- g_return_if_fail(element->title != NULL);
- itemwidth = gst_util_get_double_arg(GTK_OBJECT(element->title),
- "text_width") + 2.0;
- itemheight = gst_util_get_double_arg(GTK_OBJECT(element->title),
- "text_height") + 2.0;
-
- element->titlewidth = itemwidth;
- element->titleheight = itemheight;
- element->minwidth = MAX(element->minwidth,itemwidth);
- element->minheight += itemheight;
-
- /* now do the bottom bar */
- /* find the biggest of the state chars */
- element->statewidth = 0.0;element->stateheight = 0.0;
- for (i=0;i<4;i++) {
- g_return_if_fail(element->statetext[i] != NULL);
-
- itemwidth = 16.0;
- itemheight = 16.0;
-
- element->statewidth = MAX(element->statewidth,itemwidth);
- element->stateheight = MAX(element->stateheight,itemheight);
- }
- /* calculate the size of the primary group */
- groupwidth = element->statewidth * 5; /* 4 states plus playstate */
- groupheight = element->stateheight;
- /* add in the resize box */
- groupwidth += 7.0; /* 2.0 for buffer, 5.0 for actual size */
- groupheight = MAX(groupheight,5.0);
- /* update the minsize */
- element->minwidth = MAX(element->minwidth,groupwidth);
- element->minheight += groupheight;
-
- /* now go and try to calculate necessary space for the pads */
- element->sinkwidth = 10.0;element->sinkheight = 0.0;element->sinks = 0;
- pads = element->sinkpads;
- while (pads) {
- editorpad = GST_EDITOR_PAD(pads->data);
- element->sinkwidth = MAX(element->sinkwidth,editorpad->width);
- element->sinkheight = MAX(element->sinkheight,editorpad->height);
- element->sinks++;
- pads = g_list_next(pads);
- }
- element->srcwidth = 10.0;element->srcheight = 0.0;element->srcs = 0;
- pads = element->srcpads;
- while (pads) {
- editorpad = GST_EDITOR_PAD(pads->data);
- element->srcwidth = MAX(element->srcwidth,editorpad->width);
- element->srcheight = MAX(element->srcheight,editorpad->height);
- element->srcs++;
- pads = g_list_next(pads);
- }
- pads = element->sinkpadtemps;
- while (pads) {
- editorpadtemplate = GST_EDITOR_PADTEMPLATE(pads->data);
- element->sinkwidth = MAX(element->sinkwidth,editorpadtemplate->width);
- element->sinkheight = MAX(element->sinkheight,editorpadtemplate->height);
- element->sinks++;
- pads = g_list_next(pads);
- }
- pads = element->srcpadtemps;
- while (pads) {
- editorpadtemplate = GST_EDITOR_PADTEMPLATE(pads->data);
- element->srcwidth = MAX(element->srcwidth,editorpadtemplate->width);
- element->srcheight = MAX(element->srcheight,editorpadtemplate->height);
- element->srcs++;
- pads = g_list_next(pads);
- }
- /* add in the needed space */
- element->minheight += MAX((element->sinkheight*element->sinks),
- (element->srcheight*element->srcs)) + 4.0;
- element->minwidth = MAX(element->minwidth,
- ((element->sinkwidth) +
- (element->srcwidth) + 4.0));
-/* g_print("have %d sinks (%.2fx%.2f) and %d srcs (%.2fx%.2f)\n", */
-/* element->sinks,element->sinkwidth,element->sinkheight, */
-/* element->srcs,element->srcwidth,element->srcheight); */
-
- /* grow the element to hold all the stuff */
-/* g_print("minsize is %.2fx%.2f, */
-/*",element->minwidth,element->minheight); */
-/* g_print("size was %.2fx%.2f, ",element->width,element->height); */
- element->width = MAX(element->width,element->minwidth);
- element->height = MAX(element->height,element->minheight);
-/* g_print("is now %.2fx%.2f\n",element->width,element->height); */
-
- gtk_signal_emit(GTK_OBJECT(element),gst_editor_element_signals[SIZE_CHANGED], element);
-}
-
-void
-gst_editor_element_repack (GstEditorElement *element)
-{
- GList *pads;
- GstEditorPad *editorpad;
- GstEditorPadTemplate *editorpadtemplate;
- gint sinks;
- gint srcs;
- gdouble x1,y1,x2,y2;
- gint i;
-
- if (!element->realized) return;
-
- gst_editor_element_resize(element);
-
- /* still use x1,y1,x2,y2 so we can change around later */
- x1 = 0.0;y1 = 0.0;
- x2 = element->width;y2 = element->height;
-
-/* g_print("repacking element at %.2fx%.2f + %.2fx%.2f\n", */
-/* element->x,element->y,x2,y2); */
-
- /* move the element group to match */
- gnome_canvas_item_set(GNOME_CANVAS_ITEM(element->group),
- "x",element->x,"y",element->y,NULL);
-
- /* start by resizing the bordering box */
- g_return_if_fail(element->border != NULL);
- gtk_object_set(GTK_OBJECT(element->border),
- "x1",x1,"y1",y1,"x2",x2,"y2",y2,NULL);
-
- /* then move the text to the new top left */
- g_return_if_fail(element->title != NULL);
- gtk_object_set(GTK_OBJECT(element->title),
- "x",x1+1.0,"y",y1+1.0,
- "anchor",GTK_ANCHOR_NORTH_WEST,
- NULL);
-
- /* and move the resize box */
- g_return_if_fail(element->resizebox != NULL);
- gtk_object_set(GTK_OBJECT(element->resizebox),
- "x1",x2-5.0,"y1",y2-5.0,"x2",x2,"y2",y2,NULL);
-
- /* now place the state boxes */
- for (i=0;i<4;i++) {
- g_return_if_fail(element->statebox[i] != NULL);
- gtk_object_set(GTK_OBJECT(element->statebox[i]),
- "x1",x1+(element->statewidth*i),
- "y1",y2-element->stateheight,
- "x2",x1+(element->statewidth*(i+1)),"y2",y2,NULL);
- g_return_if_fail(element->statetext[i] != NULL);
- gtk_object_set(GTK_OBJECT(element->statetext[i]),
- "x",x1+(element->statewidth*i)+2.0,
- "y",y2-element->stateheight+1.0,
- "anchor",GTK_ANCHOR_NORTH_WEST,NULL);
- }
- gst_editor_element_sync_state(element);
-
- /* now we try to place all the pads */
- sinks = element->sinks;
- pads = element->sinkpads;
- while (pads) {
- editorpad = GST_EDITOR_PAD(pads->data);
- gtk_object_set(GTK_OBJECT(editorpad),
- "x",x1,
- "y",y2 - 2.0 - element->stateheight -
- (element->sinkheight * sinks),
- NULL);
- gst_editor_pad_repack(editorpad);
- sinks--;
- pads = g_list_next(pads);
- }
- pads = element->sinkpadtemps;
- while (pads) {
- editorpadtemplate = GST_EDITOR_PADTEMPLATE(pads->data);
- gtk_object_set(GTK_OBJECT(editorpadtemplate),
- "x",x1,
- "y",y2 - 2.0 - element->stateheight -
- (element->sinkheight * sinks),
- NULL);
- gst_editor_padtemplate_repack(editorpadtemplate);
- sinks--;
- pads = g_list_next(pads);
- }
-
- srcs = element->srcs;
- pads = element->srcpads;
- while (pads) {
- editorpad = GST_EDITOR_PAD(pads->data);
- gtk_object_set(GTK_OBJECT(editorpad),
- "x",x2 - editorpad->width,
- "y",y2 - 2.0 - element->stateheight -
- (element->srcheight * srcs),
- NULL);
- gst_editor_pad_repack(editorpad);
- srcs--;
- pads = g_list_next(pads);
- }
- pads = element->srcpadtemps;
- while (pads) {
- editorpadtemplate = GST_EDITOR_PADTEMPLATE(pads->data);
- gtk_object_set(GTK_OBJECT(editorpadtemplate),
- "x",x2 - editorpadtemplate->width,
- "y",y2 - 2.0 - element->stateheight -
- (element->srcheight * srcs),
- NULL);
- gst_editor_padtemplate_repack(editorpadtemplate);
- srcs--;
- pads = g_list_next(pads);
- }
-
- gtk_signal_emit(GTK_OBJECT(element),gst_editor_element_signals[SIZE_CHANGED], element);
-/* g_print("done resizing element\n"); */
-}
-
-static void
-gst_editor_element_add_pad_wrapper (GstEditorElement *element,
- GstPad *pad)
-{
- gdk_threads_enter ();
- gst_editor_element_add_pad (element, pad);
- element->resize = TRUE;
- gst_editor_element_repack (element);
- gdk_threads_leave ();
-}
-
-static void
-gst_editor_element_add_pad_func (GstEditorElement *element,
- GstPad *pad)
-{
- GstEditorPad *editorpad;
-
- editorpad = gst_editor_pad_new (element, pad, NULL);
-
- /* FIXME does this need to check for ghost/real? */
- if (GST_PAD_DIRECTION(pad) == GST_PAD_SINK) {
- element->sinkpads = g_list_prepend(element->sinkpads,editorpad);
- element->sinks++;
-/* g_print("added 'new' pad to sink list\n"); */
- } else if (GST_PAD_DIRECTION(pad) == GST_PAD_SRC) {
- element->srcpads = g_list_prepend(element->srcpads,editorpad);
- element->srcs++;
-/* g_print("added 'new' pad to src list\n"); */
- } else
- g_print("HUH?!? Don't know which direction this pad is...\n");
-
- gst_editor_element_repack(element);
-}
-
-static void
-gst_editor_element_add_pad (GstEditorElement *element,
- GstPad *pad)
-{
- GstPadTemplate *temp;
-
- temp = pad->padtemplate;
- if (!temp) {
- gst_editor_element_add_pad_func (element,pad);
- }
- else {
- /* find the template */
- GList *temppads;
-
- temppads = element->sinkpadtemps;
- while (temppads) {
- GstEditorPadTemplate *editorpadtemp = (GstEditorPadTemplate *) temppads->data;
-
- if (editorpadtemp->padtemplate == temp) {
- gst_editor_padtemplate_add_pad (editorpadtemp, pad);
- break;
- }
- temppads = g_list_next (temppads);
- }
- temppads = element->srcpadtemps;
- while (temppads) {
- GstEditorPadTemplate *editorpadtemp = (GstEditorPadTemplate *) temppads->data;
-
- if (editorpadtemp->padtemplate == temp) {
- gst_editor_padtemplate_add_pad (editorpadtemp, pad);
- break;
- }
- temppads = g_list_next (temppads);
- }
- }
-}
-
-GstEditorPadTemplate*
-gst_editor_element_add_padtemplate (GstEditorElement *element,
- GstPadTemplate *pad)
-{
- GstEditorPadTemplate *editorpad;
-
- g_print ("gsteditorelement: new padtemplate\n");
-
- editorpad = gst_editor_padtemplate_new (element, pad, NULL);
-
- if (pad->direction == GST_PAD_SINK) {
- element->sinkpadtemps = g_list_prepend(element->sinkpadtemps,editorpad);
- element->sinks++;
-/* g_print("added 'new' pad to sink list\n"); */
- } else if (pad->direction == GST_PAD_SRC) {
-/* g_print("added 'new' pad to src list\n"); */
- element->srcpadtemps = g_list_prepend(element->srcpadtemps,editorpad);
- element->srcs++;
- } else
- g_print("HUH?!? Don't know which direction this pad is...\n");
-
- gst_editor_element_repack(element);
- return editorpad;
-}
-
-static gint
-gst_editor_element_group_event (GnomeCanvasItem *item,
- GdkEvent *event,
- GstEditorElement *element)
-{
- switch(event->type) {
- case GDK_BUTTON_PRESS:
- gst_editor_property_show(gst_editor_property_get(), element);
- break;
- default:
- break;
- }
-
- if (GST_EDITOR_ELEMENT_CLASS(GTK_OBJECT(element)->klass)->event)
- return (GST_EDITOR_ELEMENT_CLASS(GTK_OBJECT(element)->klass)->event)(
- item,event,element);
- return FALSE;
-}
-
-
-static gint
-gst_editor_element_event(GnomeCanvasItem *item,
- GdkEvent *event,
- GstEditorElement *element)
-{
- gdouble dx,dy;
- GdkCursor *fleur;
-
-/* g_print("element in event, type %d\n",event->type); */
-
- switch(event->type) {
- case GDK_ENTER_NOTIFY:
- return TRUE;
- case GDK_LEAVE_NOTIFY:
- return TRUE;
- case GDK_BUTTON_PRESS:
- {
- if (event->button.button == 3) {
- GtkMenu *menu;
-
- menu = gst_editor_element_get_popup_menu (element);
-
- gtk_menu_popup (menu, NULL, NULL, NULL, NULL,
- event->button.button, event->button.time);
-
- return TRUE;
- }
- else {
- /* dragxy coords are world coords of button press */
- element->dragx = event->button.x;
- element->dragy = event->button.y;
- /* set some flags */
- element->dragging = TRUE;
- element->moved = FALSE;
- fleur = gdk_cursor_new (GDK_FLEUR);
- gnome_canvas_item_grab(item,
- GDK_POINTER_MOTION_MASK |
-/* GDK_ENTER_NOTIFY_MASK | */
-/* GDK_LEAVE_NOTIFY_MASK | */
- GDK_BUTTON_RELEASE_MASK,
- fleur,event->button.time);
- return TRUE;
- }
- }
- case GDK_MOTION_NOTIFY:
- if (element->dragging) {
- dx = event->button.x - element->dragx;
- dy = event->button.y - element->dragy;
- gst_editor_element_move(element,dx,dy);
- element->dragx = event->button.x;
- element->dragy = event->button.y;
- element->moved = TRUE;
- }
- return TRUE;
- case GDK_BUTTON_RELEASE:
- if (element->dragging) {
- element->dragging = FALSE;
- gnome_canvas_item_ungrab(item,event->button.time);
- }
- if (!element->moved) {
- GstEditorElementClass *elementclass;
- elementclass = GST_EDITOR_ELEMENT_CLASS(GTK_OBJECT(element)->klass);
- if (elementclass->button_event)
- (elementclass->button_event)(item,event,element);
- }
-/* g_print("in element group_event, setting inchild"); */
- /* element->canvas->inchild = TRUE; */
- return TRUE;
-
- default:
- break;
- }
- return FALSE;
-}
-
-
-static gint
-gst_editor_element_resizebox_event (GnomeCanvasItem *item,
- GdkEvent *event,
- GstEditorElement *element)
-{
- GdkCursor *bottomright;
- gdouble item_x,item_y;
-
-/* g_print("in resizebox_event...\n"); */
-
- /* calculate coords relative to the group, not the box */
- item_x = event->button.x;
- item_y = event->button.y;
- gnome_canvas_item_w2i(item->parent,&item_x,&item_y);
-
- switch(event->type) {
- case GDK_ENTER_NOTIFY:
- gnome_canvas_item_set(GNOME_CANVAS_ITEM(element->resizebox),
- "fill_color", "red" , NULL);
- return TRUE;
- break;
- case GDK_LEAVE_NOTIFY:
- gnome_canvas_item_set(GNOME_CANVAS_ITEM(element->resizebox),
- "fill_color", "white" , NULL);
- element->hesitating = FALSE;
- return TRUE;
- break;
- case GDK_BUTTON_PRESS:
- element->dragx = event->button.x;
- element->dragy = event->button.y;
- element->resizing = TRUE;
- element->hesitating = TRUE;
- bottomright = gdk_cursor_new(GDK_BOTTOM_RIGHT_CORNER);
- gnome_canvas_item_grab(item,
- GDK_POINTER_MOTION_MASK |
- GDK_ENTER_NOTIFY_MASK |
- GDK_LEAVE_NOTIFY_MASK |
- GDK_BUTTON_RELEASE_MASK,
- bottomright,event->button.time);
- return TRUE;
- break;
- case GDK_MOTION_NOTIFY:
- if (element->resizing) {
- /* doing a set because the code is in the arg set code */
-/* g_print("resizing to x2,y2 of %.2f,%.2f\n",item_x,item_y); */
- gtk_object_set(GTK_OBJECT(element),"x2",item_x,"y2",item_y,NULL);
- element->resize = TRUE;
- gst_editor_element_repack(element);
- return TRUE;
- }
- break;
- case GDK_BUTTON_RELEASE:
- if (element->resizing) {
- element->resizing = FALSE;
- gnome_canvas_item_ungrab(item,event->button.time);
-/* g_print("in element resizebox_event, setting inchild"); */
- /* element->canvas->inchild = TRUE; */
- return TRUE;
- }
- break;
- default:
- break;
- }
- return FALSE;
-}
-
-
-static gint
-gst_editor_element_state_event(GnomeCanvasItem *item,
- GdkEvent *event,
- gpointer data)
-{
- GstEditorElement *element;
- gint id = GPOINTER_TO_INT(data);
- GdkCursor *uparrow;
-
- element = GST_EDITOR_GET_OBJECT(item);
-
- switch (event->type) {
- case GDK_ENTER_NOTIFY:
- uparrow = gdk_cursor_new(GDK_SB_UP_ARROW);
- gnome_canvas_item_grab(item,
- GDK_POINTER_MOTION_MASK |
- GDK_BUTTON_RELEASE_MASK |
- GDK_LEAVE_NOTIFY_MASK,
- uparrow,event->button.time);
- /* NOTE: when grabbing canvas item, always get pointer_motion,
- this will allow you to actually get all the other synth events */
- break;
- case GDK_LEAVE_NOTIFY:
- gnome_canvas_item_ungrab(item,event->button.time);
- break;
- case GDK_BUTTON_PRESS:
- {
- GdkEventButton *buttonevent = (GdkEventButton *)event;
-
- if (buttonevent->button == 1)
- return TRUE;
- return FALSE;
- }
- case GDK_BUTTON_RELEASE:
- {
- GdkEventButton *buttonevent = (GdkEventButton *)event;
-
- if (buttonevent->button != 1)
- return FALSE;
-
- if (id < 4) {
- gdk_threads_leave ();
- gst_editor_element_set_state(element,id,TRUE);
- gdk_threads_enter ();
- } else
- g_warning("Uh, shouldn't have gotten here, unknown state\n");
-/* g_print("in element statebox_event, setting inchild"); */
- /* element->canvas->inchild = TRUE; */
- return TRUE;
- }
- default:
- break;
- }
- return FALSE;
-}
-
-
-static void
-gst_editor_element_set_state(GstEditorElement *element,
- gint id,gboolean set)
-{
- gboolean stateset = TRUE; /* if we have no element, set anyway */
- /* g_print("element set state %d\n", id); */
- if (element->element)
- stateset = gst_element_set_state(element->element,_gst_element_states[id]);
-}
-
-
-static void
-gst_editor_element_sync_state_wrapper (GstEditorElement *element)
-{
- gdk_threads_enter ();
- gst_editor_element_sync_state (element);
- gdk_threads_leave ();
-}
-
-static void
-gst_editor_element_sync_state (GstEditorElement *element)
-{
- gint id;
- GstElementState state = GST_STATE(element->element);
-
- for (id=0;id<4;id++) {
- if (_gst_element_states[id] == state) {
- gtk_object_set(GTK_OBJECT(element->statebox[id]),
- "fill_color","black",NULL);
- gtk_object_set(GTK_OBJECT(element->statetext[id]),
- "fill_color","white",NULL);
- }
- else {
- gtk_object_set(GTK_OBJECT(element->statebox[id]),
- "fill_color","white",NULL);
- gtk_object_set(GTK_OBJECT(element->statetext[id]),
- "fill_color","black",NULL);
- }
- }
-}
-
-static void
-gst_editor_element_position_changed (GstEditorElement *element,
- GstEditorElement *parent)
-{
- if (element != parent)
- gtk_signal_emit(GTK_OBJECT(element),gst_editor_element_signals[POSITION_CHANGED], element);
-}
-
-static void
-gst_editor_element_move(GstEditorElement *element,
- gdouble dx,gdouble dy)
-{
- /* this is a 'little' trick to keep from repacking the whole thing... */
- element->x += dx;element->y += dy;
- gnome_canvas_item_move(GNOME_CANVAS_ITEM(element->group),dx,dy);
-
- gtk_signal_emit(GTK_OBJECT(element),gst_editor_element_signals[POSITION_CHANGED], element);
-}
+++ /dev/null
-/* 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.
- */
-
-
-#include <gnome.h>
-#include <gst/gst.h>
-
-#include <sys/stat.h>
-#include <unistd.h>
-
-#include "gsteditorimage.h"
-
-GHashTable *_gst_editor_images;
-
-static char *_gst_editor_image_name[] = {
- "pixmaps/bin.xpm",
- "pixmaps/pipeline.xpm",
- "pixmaps/thread.xpm",
- "pixmaps/element.xpm",
- "pixmaps/sink.xpm",
- "pixmaps/src.xpm",
- "pixmaps/connection.xpm",
- "pixmaps/filter.xpm",
- "pixmaps/tee.xpm",
-};
-
-struct _image_entry {
- GstEditorImageType type;
- GtkType (*gtktype) (void);
-};
-
-#define TYPES_SIZE 3
-struct _image_entry _image_types[TYPES_SIZE] = {
- {GST_EDITOR_IMAGE_BIN, gst_bin_get_type },
- {GST_EDITOR_IMAGE_THREAD, gst_thread_get_type },
- {GST_EDITOR_IMAGE_PIPELINE, gst_pipeline_get_type },
-};
-
-GstEditorImage*
-gst_editor_image_get(GstEditorImageType type)
-{
- struct stat statbuf;
- GstEditorImage *new = g_new0(GstEditorImage, 1);
-
- if (stat (_gst_editor_image_name[type], &statbuf) == 0) {
- new->pixmap = gdk_pixmap_colormap_create_from_xpm(NULL, gdk_colormap_get_system(), &new->bitmap, NULL,
- _gst_editor_image_name[type]);
- }
- else {
- new->pixmap = gdk_pixmap_colormap_create_from_xpm(NULL, gdk_colormap_get_system(), &new->bitmap, NULL,
- g_strconcat (DATADIR, _gst_editor_image_name[type], NULL));
- }
-
- return new;
-}
-
-GstEditorImage *gst_editor_image_get_for_type(GtkType type) {
-
- gint i;
- for (i=0; i<TYPES_SIZE; i++) {
- if (_image_types[i].gtktype() == type) {
- return gst_editor_image_get(_image_types[i].type);
- }
- }
- return gst_editor_image_get(GST_EDITOR_IMAGE_ELEMENT);
-}
+++ /dev/null
-/* 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_IMAGE_H__
-#define __GST_EDITOR_IMAGE_H__
-
-#include <gst/gst.h>
-
-typedef enum
-{
- GST_EDITOR_IMAGE_BIN,
- GST_EDITOR_IMAGE_PIPELINE,
- GST_EDITOR_IMAGE_THREAD,
-
- GST_EDITOR_IMAGE_ELEMENT,
- GST_EDITOR_IMAGE_SINK,
- GST_EDITOR_IMAGE_SOURCE,
- GST_EDITOR_IMAGE_CONNECTION,
- GST_EDITOR_IMAGE_FILTER,
- GST_EDITOR_IMAGE_TEE,
-} GstEditorImageType;
-
-typedef struct _GstEditorImage GstEditorImage;
-
-struct _GstEditorImage {
- GdkPixmap *pixmap;
- GdkBitmap *bitmap;
-};
-
-
-GstEditorImage *gst_editor_image_get(GstEditorImageType type);
-GstEditorImage *gst_editor_image_get_for_type(GtkType type);
-
-
-#endif /* __GST_EDITOR_IMAGE_H__ */
+++ /dev/null
-/* 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.
- */
-
-
-#include <gnome.h>
-#include <gst/gst.h>
-
-#include "gsteditor.h"
-
-/* class functions */
-static void gst_editor_pad_class_init(GstEditorPadClass *klass);
-static void gst_editor_pad_init(GstEditorPad *pad);
-static void gst_editor_pad_set_arg(GtkObject *object,GtkArg *arg,guint id);
-static void gst_editor_pad_get_arg(GtkObject *object,GtkArg *arg,guint id);
-static void gst_editor_pad_realize(GstEditorPad *pad);
-
-static void gst_editor_pad_position_changed(GstEditorPad *pad, GstEditorElement *element);
-
-/* class implementation functions */
-/* static void gst_editor_pad_update(GnomeCanvasItem *item,double *affine, */
-/* ArtSVP *clip_path,int flags); */
-/* static gint gst_editor_pad_event(GnomeCanvasItem *item,GdkEvent *event); */
-
-/* events fired by items within self */
-static gint gst_editor_pad_padbox_event(GnomeCanvasItem *item,
- GdkEvent *event,
- GstEditorPad *pad);
-
-/* utility functions */
-static void gst_editor_pad_resize(GstEditorPad *pad);
-
-
-enum {
- ARG_0,
- ARG_X,
- ARG_Y,
- ARG_WIDTH,
- ARG_HEIGHT,
- ARG_PAD,
-};
-
-enum {
- LAST_SIGNAL
-};
-
-static GtkObjectClass *parent_class;
-/* static guint gst_editor_pad_signals[LAST_SIGNAL] = { 0 }; */
-
-GtkType
-gst_editor_pad_get_type (void)
-{
- static GtkType pad_type = 0;
-
- if (!pad_type) {
- static const GtkTypeInfo pad_info = {
- "GstEditorPad",
- sizeof(GstEditorPad),
- sizeof(GstEditorPadClass),
- (GtkClassInitFunc)gst_editor_pad_class_init,
- (GtkObjectInitFunc)gst_editor_pad_init,
- NULL,
- NULL,
- (GtkClassInitFunc)NULL,
- };
- pad_type = gtk_type_unique(gtk_object_get_type(),&pad_info);
- }
- return pad_type;
-}
-
-static void
-gst_editor_pad_class_init (GstEditorPadClass *klass)
-{
- GtkObjectClass *object_class;
-
- object_class = (GtkObjectClass*)klass;
-
- parent_class = gtk_type_class(gtk_object_get_type());
-
- gtk_object_add_arg_type("GstEditorPad::x",GTK_TYPE_DOUBLE,
- GTK_ARG_READWRITE,ARG_X);
- gtk_object_add_arg_type("GstEditorPad::y",GTK_TYPE_DOUBLE,
- GTK_ARG_READWRITE,ARG_Y);
- gtk_object_add_arg_type("GstEditorPad::width",GTK_TYPE_DOUBLE,
- GTK_ARG_READWRITE,ARG_WIDTH);
- gtk_object_add_arg_type("GstEditorPad::height",GTK_TYPE_DOUBLE,
- GTK_ARG_READWRITE,ARG_HEIGHT);
- gtk_object_add_arg_type("GstEditorPad::pad",GTK_TYPE_POINTER,
- GTK_ARG_READWRITE,ARG_PAD);
-
- klass->realize = gst_editor_pad_realize;
-
- object_class->set_arg = gst_editor_pad_set_arg;
- object_class->get_arg = gst_editor_pad_get_arg;
-}
-
-static void
-gst_editor_pad_init(GstEditorPad *pad)
-{
-}
-
-GstEditorPad*
-gst_editor_pad_new(GstEditorElement *parent,GstPad *pad,
- const gchar *first_arg_name, ...)
-{
- GstEditorPad *editorpad;
- va_list args;
-
- g_return_val_if_fail(parent != NULL, NULL);
- g_return_val_if_fail(GST_IS_EDITOR_ELEMENT(parent), NULL);
- g_return_val_if_fail(pad != NULL, NULL);
- g_return_val_if_fail(GST_IS_PAD(pad), NULL);
-
- editorpad = GST_EDITOR_PAD(gtk_type_new(GST_TYPE_EDITOR_PAD));
- editorpad->pad = pad;
- GST_EDITOR_SET_OBJECT(pad, editorpad);
-
- va_start(args,first_arg_name);
- gst_editor_pad_construct(editorpad,parent,first_arg_name,args);
- va_end(args);
-
- if (GST_PAD_CONNECTED (pad)) {
- GstPad *peerpad;
- GstEditorPad *peereditorpad;
-
- /* FIXME does this need to check for ghost/real? */
- peerpad = gst_pad_get_peer (pad);
-
- peereditorpad = GST_EDITOR_GET_OBJECT (peerpad);
-
- if (peereditorpad) {
- GstEditorConnection *connection;
-
- connection = gst_editor_connection_new (parent, editorpad);
- gst_editor_connection_set_endpad (connection, peereditorpad);
- }
- }
-
- gtk_signal_connect_object (GTK_OBJECT (parent), "position_changed",
- gst_editor_pad_position_changed, GTK_OBJECT (editorpad));
-
- return editorpad;
-}
-
-void
-gst_editor_pad_construct(GstEditorPad *pad,
- GstEditorElement *parent,
- const gchar *first_arg_name,va_list args)
-{
- GtkObject *obj = GTK_OBJECT(pad);
- GSList *arg_list = NULL, *info_list = NULL;
- gchar *error;
- GstEditorPadClass *padclass;
-
-/* g_print("in gst_editor_pad_construct()\n"); */
-
- error = gtk_object_args_collect(GTK_OBJECT_TYPE(obj),&arg_list,
- &info_list,first_arg_name,args);
- if (error) {
- g_warning("gst_editor_pad_construct(): %s",error);
- g_free(error);
- } else {
- GSList *arg,*info;
-/* g_print("setting all the arguments on the pad\n"); */
- for (arg=arg_list,info=info_list;arg;arg=arg->next,info=info->next)
- gtk_object_arg_set(obj,arg->data,info->data);
- gtk_args_collect_cleanup(arg_list,info_list);
- }
-
- pad->parent = parent;
-
- padclass = GST_EDITOR_PAD_CLASS(GTK_OBJECT(pad)->klass);
- if (padclass)
- (padclass->realize)(pad);
-}
-
-static void
-gst_editor_pad_set_arg (GtkObject *object,GtkArg *arg,guint id)
-{
- GstEditorPad *pad;
-
- /* get the major types of this object */
- pad = GST_EDITOR_PAD(object);
-
- switch (id) {
- case ARG_X:
- pad->x = GTK_VALUE_DOUBLE(*arg);
- break;
- case ARG_Y:
- pad->y = GTK_VALUE_DOUBLE(*arg);
- break;
- case ARG_WIDTH:
- pad->width = GTK_VALUE_DOUBLE(*arg);
- pad->resize = TRUE;
- break;
- case ARG_HEIGHT:
- pad->height = GTK_VALUE_DOUBLE(*arg);
- pad->resize = TRUE;
- break;
- case ARG_PAD:
- /* FIXME: this is very brute force */
- pad->pad = GTK_VALUE_POINTER(*arg);
- break;
- default:
- g_warning("gsteditorpad: unknown arg!");
- break;
- }
-}
-
-static void
-gst_editor_pad_get_arg (GtkObject *object,GtkArg *arg,guint id)
-{
- GstEditorPad *pad;
-
- /* get the major types of this object */
- pad = GST_EDITOR_PAD(object);
-
- switch (id) {
- case ARG_X:
- GTK_VALUE_INT(*arg) = pad->x;
- break;
- case ARG_Y:
- GTK_VALUE_INT(*arg) = pad->y;
- break;
- case ARG_WIDTH:
- GTK_VALUE_INT(*arg) = pad->width;
- break;
- case ARG_HEIGHT:
- GTK_VALUE_INT(*arg) = pad->height;
- break;
- default:
- arg->type = GTK_TYPE_INVALID;
- break;
- }
-}
-
-static void
-gst_editor_pad_realize (GstEditorPad *pad)
-{
-/* g_print("realizing editor pad %p\n",pad); */
-
- /* we must be attached to an element */
- g_return_if_fail(pad->parent != NULL);
-
- /* create the group and bounding box */
- pad->group = GNOME_CANVAS_GROUP(gnome_canvas_item_new(pad->parent->group,
- gnome_canvas_group_get_type(),"x",pad->x,"y",pad->y,NULL));
- g_return_if_fail(pad->group != NULL);
- GST_EDITOR_SET_OBJECT(pad->group,pad);
-
- pad->border = gnome_canvas_item_new(pad->group,
- gnome_canvas_rect_get_type(),
- "width_units",1.0,"fill_color_rgba", 0xCCFFCC00,"outline_color","black",
- "x1",0.0,"y1",0.0,"x2",pad->width,"y2",pad->height,NULL);
- g_return_if_fail(pad->border != NULL);
- GST_EDITOR_SET_OBJECT(pad->border,pad);
-
- /* create the pad box on the correct side */
- /* FIXME does this need to check for ghost/real? */
- pad->issrc = (GST_PAD_DIRECTION(pad->pad) == GST_PAD_SRC);
- if (pad->issrc)
- pad->padbox = gnome_canvas_item_new(pad->group,
- gnome_canvas_rect_get_type(),
- "width_units",1.0,"fill_color","white","outline_color","black",
- "x1",pad->x-4.0,"y1",2.0,"x2",pad->x,"y2",pad->height-2.0,NULL);
- else
- pad->padbox = gnome_canvas_item_new(pad->group,
- gnome_canvas_rect_get_type(),
- "width_units",1.0,"fill_color","white","outline_color","black",
- "x1",0.0,"y1",2.0,"x2",4.0,"y2",pad->height-2.0,NULL);
- g_return_if_fail(pad->padbox != NULL);
- GST_EDITOR_SET_OBJECT(pad->padbox,pad);
-
- gtk_signal_connect(GTK_OBJECT(pad->group),"event",
- GTK_SIGNAL_FUNC(gst_editor_pad_padbox_event),pad);
-
- pad->title = gnome_canvas_item_new(pad->group,
- gnome_canvas_text_get_type(),
- "text",gst_pad_get_name(pad->pad),
- "x",0.0,"y",0.0,"anchor",GTK_ANCHOR_NORTH_WEST,
- "font_gdk",gtk_widget_get_default_style()->font,
- NULL);
- g_return_if_fail(pad->title != NULL);
- GST_EDITOR_SET_OBJECT(pad->title,pad);
-
- pad->realized = TRUE;
- pad->resize = TRUE;
- gst_editor_pad_repack(pad);
-}
-
-
-static void
-gst_editor_pad_resize (GstEditorPad *pad)
-{
- gdouble minwidth,minheight;
-
-/* g_print("resizing pad\n"); */
-
- minwidth = 0;minheight = 0;
-
- /* get the text size and add it into minsize */
- minwidth = gst_util_get_double_arg(GTK_OBJECT(pad->title),
- "text_width") + 2.0;
- minheight = gst_util_get_double_arg(GTK_OBJECT(pad->title),
- "text_height");
-
- /* calculate the size of the padbox */
- pad->boxheight = minheight - 4.0;
- pad->boxwidth = pad->boxheight / 2.0;
- minwidth += pad->boxwidth;
-
- /* force the thing to grow if necessary */
- pad->width = MAX(pad->width,minwidth);
- pad->height = MAX(pad->height,minheight);
-
- /* update the connection if there is one */
-/* g_print("connection is %p\n",pad->connection); */
- if (pad->connection != NULL)
- gst_editor_connection_resize(pad->connection);
-}
-
-void
-gst_editor_pad_repack (GstEditorPad *pad)
-{
- gdouble x1,y1,x2,y2;
-
- if (!pad->realized) return;
-
- gst_editor_pad_resize(pad);
-
- x1 = 0;y1 = 0;
- x2 = x1 + pad->width;y2 = y1 + pad->height;
-/* g_print("repacking pad at %.2fx%.2f - %.2fx%.2f\n",x1,y1,x2,y2); */
-
- /* move the group */
- gtk_object_set(GTK_OBJECT(pad->group),"x",pad->x,"y",pad->y,NULL);
-
- /* start by resizing the bordering box */
- gtk_object_set(GTK_OBJECT(pad->border),
- "x1",x1,"y1",y1,"x2",x2,"y2",y2,NULL);
-
- /* if we're a left-jusified sink */
- if (pad->issrc) {
- /* and move the pad box */
- gtk_object_set(GTK_OBJECT(pad->padbox),
- "x1",x2-pad->boxwidth,"y1",y1+2.0,
- "x2",x2,"y2",y2-2.0,NULL);
- /* then move the text to the right place */
- gtk_object_set(GTK_OBJECT(pad->title),
- "x",x2-pad->boxwidth-1.0,"y",y1,
- "anchor",GTK_ANCHOR_NORTH_EAST,
- NULL);
- } else {
- /* and move the pad box */
- gtk_object_set(GTK_OBJECT(pad->padbox),
- "x1",x1,"y1",y1+2.0,
- "x2",x1+pad->boxwidth,"y2",y2-2.0,NULL);
- /* then move the text to the right place */
- gtk_object_set(GTK_OBJECT(pad->title),
- "x",x1+pad->boxwidth+1.0,"y",y1,
- "anchor",GTK_ANCHOR_NORTH_WEST,
- NULL);
- }
-
- if (pad->connection != NULL) {
- pad->connection->resize = TRUE;
- gst_editor_connection_resize(pad->connection);
- }
-
- pad->resize = FALSE;
-}
-
-
-/*
-static gint gst_editor_pad_event(GnomeCanvasItem *item,GdkEvent *event) {
- GstEditorPad *pad = GST_EDITOR_PAD(item);
- gdouble item_x,item_y;
- GdkCursor *fleur;
- gdouble tx,ty;
-
- item_x = event->button.x;
- item_y = event->button.y;
- gnome_canvas_item_w2i(item->parent,&item_x,&item_y);
-
- switch(event->type) {
- case GDK_ENTER_NOTIFY:
- break;
- case GDK_LEAVE_NOTIFY:
- break;
- default:
- break;
- }
- return FALSE;
-}
-*/
-
-/* FIXME FIXME FIXME */
-static gint
-gst_editor_pad_padbox_event(GnomeCanvasItem *item,
- GdkEvent *event,
- GstEditorPad *pad)
-{
- GstEditorElement *element;
- GstEditorBin *bin;
-
-/* g_print("padbox has event %d\n",event->type); */
- g_return_val_if_fail(GST_IS_EDITOR_PAD(pad), FALSE);
-
- element = pad->parent;
- bin = element->parent;
-
- switch(event->type) {
- case GDK_ENTER_NOTIFY:
- gtk_object_set(GTK_OBJECT(pad->border),
- "fill_color_rgba", 0xBBDDBB00, NULL);
- break;
- case GDK_LEAVE_NOTIFY:
- gtk_object_set(GTK_OBJECT(pad->border),
- "fill_color_rgba", 0xCCFFCC00, NULL);
- break;
- case GDK_BUTTON_PRESS:
-/* g_print("have button press in pad '%s'\n", */
-/* gst_pad_get_name(pad->pad)); */
- gst_editor_bin_start_banding(bin,pad);
- return TRUE;
- break;
- case GDK_MOTION_NOTIFY:
-/* g_print("have motion in pad\n"); */
- break;
- default:
- break;
- }
- return FALSE;
-}
-
-static void
-gst_editor_pad_position_changed(GstEditorPad *pad,
- GstEditorElement *element)
-{
- if (pad->connection) {
- pad->connection->resize = TRUE;
- gst_editor_connection_resize(pad->connection);
- }
-}
+++ /dev/null
-/* 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_PAD_H__
-#define __GST_EDITOR_PAD_H__
-
-#include <gst/gst.h>
-
-#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,GstEditorPad))
-#define GST_IS_EDITOR_PAD(obj) \
- (GTK_CHECK_TYPE((obj),GST_TYPE_EDITOR_PAD))
-#define GST_IS_EDITOR_PAD_CLASS(obj) \
- (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_EDITOR_PAD))
-
-typedef struct _GstEditorPad GstEditorPad;
-typedef struct _GstEditorPadClass GstEditorPadClass;
-
-struct _GstEditorPad {
- GtkObject object;
-
- /* parent object */
- GtkObject *parent; // FIXME!!!
-
- /* the pad we're associated with */
- GstPad *pad;
- gboolean issink;
-
- /* 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?
-
- /* interaction state */
- gboolean dragging,resizing,moved;
- gdouble dragx,dragy;
-
- /* connection */
-// GnomeCanvasItem *connection; // can't use
-//GstEditorConnection
-};
-
-struct _GstEditorPadClass {
- GtkObjectClass parent_class;
-};
-
-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);
-
-#endif /* __GST_EDITOR_PAD_H__ */
+++ /dev/null
-/* 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.
- */
-
-
-#include <gnome.h>
-#include <gst/gst.h>
-
-#include "gsteditor.h"
-
-/* class functions */
-static void gst_editor_padtemplate_class_init(GstEditorPadTemplateClass *klass);
-static void gst_editor_padtemplate_init(GstEditorPadTemplate *padtemplate);
-static void gst_editor_padtemplate_set_arg(GtkObject *object,GtkArg *arg,guint id);
-static void gst_editor_padtemplate_get_arg(GtkObject *object,GtkArg *arg,guint id);
-static void gst_editor_padtemplate_realize(GstEditorPadTemplate *padtemplate);
-
-/* class implementation functions */
-/* static void gst_editor_pad_update(GnomeCanvasItem *item,double *affine, */
-/* ArtSVP *clip_path,int flags); */
-/* static gint gst_editor_pad_event(GnomeCanvasItem *item,GdkEvent *event); */
-
-/* events fired by items within self */
-static gint gst_editor_padtemplate_padbox_event(GnomeCanvasItem *item,
- GdkEvent *event,
- GstEditorPadTemplate *padtemplate);
-
-/* utility functions */
-static void gst_editor_padtemplate_resize(GstEditorPadTemplate *padtemplate);
-
-
-enum {
- ARG_0,
- ARG_X,
- ARG_Y,
- ARG_WIDTH,
- ARG_HEIGHT,
- ARG_PADTEMPLATE,
-};
-
-enum {
- LAST_SIGNAL
-};
-
-static GtkObjectClass *parent_class;
-/* static guint gst_editor_padtemplate_signals[LAST_SIGNAL] = { 0 }; */
-
-GtkType
-gst_editor_padtemplate_get_type (void)
-{
- static GtkType padtemplate_type = 0;
-
- if (!padtemplate_type) {
- static const GtkTypeInfo padtemplate_info = {
- "GstEditorPadTemplate",
- sizeof(GstEditorPadTemplate),
- sizeof(GstEditorPadTemplateClass),
- (GtkClassInitFunc)gst_editor_padtemplate_class_init,
- (GtkObjectInitFunc)gst_editor_padtemplate_init,
- NULL,
- NULL,
- (GtkClassInitFunc)NULL,
- };
- padtemplate_type = gtk_type_unique(gtk_object_get_type(),&padtemplate_info);
- }
- return padtemplate_type;
-}
-
-static void
-gst_editor_padtemplate_class_init (GstEditorPadTemplateClass *klass)
-{
- GtkObjectClass *object_class;
-
- object_class = (GtkObjectClass*)klass;
-
- parent_class = gtk_type_class(gtk_object_get_type());
-
- gtk_object_add_arg_type("GstEditorPadTemplate::x",GTK_TYPE_DOUBLE,
- GTK_ARG_READWRITE,ARG_X);
- gtk_object_add_arg_type("GstEditorPadTemplate::y",GTK_TYPE_DOUBLE,
- GTK_ARG_READWRITE,ARG_Y);
- gtk_object_add_arg_type("GstEditorPadTemplate::width",GTK_TYPE_DOUBLE,
- GTK_ARG_READWRITE,ARG_WIDTH);
- gtk_object_add_arg_type("GstEditorPadTemplate::height",GTK_TYPE_DOUBLE,
- GTK_ARG_READWRITE,ARG_HEIGHT);
- gtk_object_add_arg_type("GstEditorPadTemplate::padtemplate",GTK_TYPE_POINTER,
- GTK_ARG_READWRITE,ARG_PADTEMPLATE);
-
- klass->realize = gst_editor_padtemplate_realize;
-
- object_class->set_arg = gst_editor_padtemplate_set_arg;
- object_class->get_arg = gst_editor_padtemplate_get_arg;
-}
-
-static void
-gst_editor_padtemplate_init(GstEditorPadTemplate *padtemplate)
-{
-}
-
-GstEditorPadTemplate*
-gst_editor_padtemplate_new (GstEditorElement *parent,
- GstPadTemplate *padtemplate,
- const gchar *first_arg_name, ...)
-{
- GstEditorPadTemplate *editorpadtemplate;
- va_list args;
-
- g_return_val_if_fail(parent != NULL, NULL);
- g_return_val_if_fail(GST_IS_EDITOR_ELEMENT(parent), NULL);
- g_return_val_if_fail(padtemplate != NULL, NULL);
-
- editorpadtemplate = GST_EDITOR_PADTEMPLATE(gtk_type_new(GST_TYPE_EDITOR_PADTEMPLATE));
- editorpadtemplate->padtemplate = padtemplate;
- /* GST_EDITOR_SET_OBJECT(padtemplate, editorpadtemplate); */
-
- va_start(args,first_arg_name);
- gst_editor_padtemplate_construct(editorpadtemplate,parent,first_arg_name,args);
- va_end(args);
-
- return editorpadtemplate;
-}
-
-void
-gst_editor_padtemplate_construct (GstEditorPadTemplate *padtemplate,
- GstEditorElement *parent,
- const gchar *first_arg_name, va_list args)
-{
- GtkObject *obj = GTK_OBJECT(padtemplate);
- GSList *arg_list = NULL, *info_list = NULL;
- gchar *error;
- GstEditorPadTemplateClass *padtemplateclass;
-
-/* g_print("in gst_editor_padtemplate_construct()\n"); */
-
- error = gtk_object_args_collect(GTK_OBJECT_TYPE(obj),&arg_list,
- &info_list,first_arg_name,args);
- if (error) {
- g_warning("gst_editor_padtemplate_construct(): %s",error);
- g_free(error);
- } else {
- GSList *arg,*info;
-/* g_print("setting all the arguments on the padtemplate\n"); */
- for (arg=arg_list,info=info_list;arg;arg=arg->next,info=info->next)
- gtk_object_arg_set(obj,arg->data,info->data);
- gtk_args_collect_cleanup(arg_list,info_list);
- }
-
- padtemplate->parent = parent;
-
- padtemplateclass = GST_EDITOR_PADTEMPLATE_CLASS(GTK_OBJECT(padtemplate)->klass);
- if (padtemplateclass)
- (padtemplateclass->realize)(padtemplate);
-}
-
-void
-gst_editor_padtemplate_add_pad (GstEditorPadTemplate *padtemplate,
- GstPad *pad)
-{
- GstEditorPad *editorpad;
- g_print ("gsteditorpadtemplate: add pad\n");
-
- editorpad = gst_editor_pad_new (padtemplate->parent, pad, NULL);
-
- padtemplate->pads = g_list_prepend (padtemplate->pads, editorpad);
-}
-
-static void
-gst_editor_padtemplate_set_arg (GtkObject *object,GtkArg *arg,guint id)
-{
- GstEditorPadTemplate *padtemplate;
-
- /* get the major types of this object */
- padtemplate = GST_EDITOR_PADTEMPLATE(object);
-
- switch (id) {
- case ARG_X:
- padtemplate->x = GTK_VALUE_DOUBLE(*arg);
- break;
- case ARG_Y:
- padtemplate->y = GTK_VALUE_DOUBLE(*arg);
- break;
- case ARG_WIDTH:
- padtemplate->width = GTK_VALUE_DOUBLE(*arg);
- padtemplate->resize = TRUE;
- break;
- case ARG_HEIGHT:
- padtemplate->height = GTK_VALUE_DOUBLE(*arg);
- padtemplate->resize = TRUE;
- break;
- case ARG_PADTEMPLATE:
- /* FIXME: this is very brute force */
- padtemplate->padtemplate = GTK_VALUE_POINTER(*arg);
- break;
- default:
- g_warning("gsteditorpadtemplate: unknown arg!");
- break;
- }
-}
-
-static void
-gst_editor_padtemplate_get_arg (GtkObject *object,GtkArg *arg,guint id)
-{
- GstEditorPadTemplate *padtemplate;
-
- /* get the major types of this object */
- padtemplate = GST_EDITOR_PADTEMPLATE(object);
-
- switch (id) {
- case ARG_X:
- GTK_VALUE_INT(*arg) = padtemplate->x;
- break;
- case ARG_Y:
- GTK_VALUE_INT(*arg) = padtemplate->y;
- break;
- case ARG_WIDTH:
- GTK_VALUE_INT(*arg) = padtemplate->width;
- break;
- case ARG_HEIGHT:
- GTK_VALUE_INT(*arg) = padtemplate->height;
- break;
- default:
- arg->type = GTK_TYPE_INVALID;
- break;
- }
-}
-
-static void
-gst_editor_padtemplate_realize (GstEditorPadTemplate *padtemplate)
-{
- g_print("realizing editor padtemplate %p\n",padtemplate);
-
- /* we must be attached to an element */
- g_return_if_fail(padtemplate->parent != NULL);
-
- /* create the group and bounding box */
- padtemplate->group = GNOME_CANVAS_GROUP(gnome_canvas_item_new(padtemplate->parent->group,
- gnome_canvas_group_get_type(),"x",padtemplate->x,"y",padtemplate->y,NULL));
- g_return_if_fail(padtemplate->group != NULL);
- GST_EDITOR_SET_OBJECT(padtemplate->group,padtemplate);
-
- padtemplate->border = gnome_canvas_item_new(padtemplate->group,
- gnome_canvas_rect_get_type(),
- "width_units",1.0,"fill_color_rgba", 0xFFCCCC00,"outline_color","black",
- "x1",0.0,"y1",0.0,"x2",padtemplate->width,"y2",padtemplate->height,NULL);
- g_return_if_fail(padtemplate->border != NULL);
- GST_EDITOR_SET_OBJECT(padtemplate->border,padtemplate);
-
- /* create the padtemplate box on the correct side */
- padtemplate->issrc = (padtemplate->padtemplate->direction == GST_PAD_SRC);
- if (padtemplate->issrc)
- padtemplate->padtemplatebox = gnome_canvas_item_new(padtemplate->group,
- gnome_canvas_rect_get_type(),
- "width_units",1.0,"fill_color","white","outline_color","black",
- "x1",padtemplate->x-4.0,"y1",2.0,"x2",padtemplate->x,"y2",padtemplate->height-2.0,NULL);
- else
- padtemplate->padtemplatebox = gnome_canvas_item_new(padtemplate->group,
- gnome_canvas_rect_get_type(),
- "width_units",1.0,"fill_color","white","outline_color","black",
- "x1",0.0,"y1",2.0,"x2",4.0,"y2",padtemplate->height-2.0,NULL);
- g_return_if_fail(padtemplate->padtemplatebox != NULL);
- GST_EDITOR_SET_OBJECT(padtemplate->padtemplatebox,padtemplate);
-
- gtk_signal_connect(GTK_OBJECT(padtemplate->group),"event",
- GTK_SIGNAL_FUNC(gst_editor_padtemplate_padbox_event),padtemplate);
-
- padtemplate->title = gnome_canvas_item_new(padtemplate->group,
- gnome_canvas_text_get_type(),
- "text",padtemplate->padtemplate->name_template,
- "x",0.0,"y",0.0,"anchor",GTK_ANCHOR_NORTH_WEST,
- "font_gdk",gtk_widget_get_default_style()->font,
- NULL);
- g_return_if_fail(padtemplate->title != NULL);
- GST_EDITOR_SET_OBJECT(padtemplate->title,padtemplate);
-
- padtemplate->realized = TRUE;
- padtemplate->resize = TRUE;
- gst_editor_padtemplate_repack(padtemplate);
-}
-
-
-static void
-gst_editor_padtemplate_resize (GstEditorPadTemplate *padtemplate)
-{
- gdouble minwidth,minheight;
-
-/* g_print("resizing padtemplate\n"); */
-
- minwidth = 0;minheight = 0;
-
- /* get the text size and add it into minsize */
- minwidth = gst_util_get_double_arg(GTK_OBJECT(padtemplate->title),
- "text_width") + 2.0;
- minheight = gst_util_get_double_arg(GTK_OBJECT(padtemplate->title),
- "text_height");
-
- /* calculate the size of the padtemplatebox */
- padtemplate->boxheight = minheight - 4.0;
- padtemplate->boxwidth = padtemplate->boxheight / 2.0;
- minwidth += padtemplate->boxwidth;
-
- /* force the thing to grow if necessary */
- padtemplate->width = MAX(padtemplate->width,minwidth);
- padtemplate->height = MAX(padtemplate->height,minheight);
-
- /* update the connection if there is one */
-/* g_print("connection is %p\n",padtemplate->connection); */
- if (padtemplate->connection != NULL)
- gst_editor_connection_resize(padtemplate->connection);
-}
-
-void
-gst_editor_padtemplate_repack (GstEditorPadTemplate *padtemplate)
-{
- gdouble x1,y1,x2,y2;
- GList *pads;
-
- if (!padtemplate->realized) return;
-
- gst_editor_padtemplate_resize(padtemplate);
-
- x1 = 0;y1 = 0;
- x2 = x1 + padtemplate->width;y2 = y1 + padtemplate->height;
-/* g_print("repacking padtemplate at %.2fx%.2f %.2fx%.2f - %.2fx%.2f\n",padtemplate->x, padtemplate->y,x1,y1,x2,y2); */
-
- /* move the group */
- gtk_object_set(GTK_OBJECT(padtemplate->group),"x",padtemplate->x,"y",padtemplate->y,NULL);
-
- /* start by resizing the bordering box */
- gtk_object_set(GTK_OBJECT(padtemplate->border),
- "x1",x1,"y1",y1,"x2",x2,"y2",y2,NULL);
-
- /* if we're a left-jusified sink */
- if (padtemplate->issrc) {
- /* and move the padtemplate box */
- gtk_object_set(GTK_OBJECT(padtemplate->padtemplatebox),
- "x1",x2-padtemplate->boxwidth,"y1",y1+2.0,
- "x2",x2,"y2",y2-2.0,NULL);
- /* then move the text to the right place */
- gtk_object_set(GTK_OBJECT(padtemplate->title),
- "x",x2-padtemplate->boxwidth-1.0,"y",y1,
- "anchor",GTK_ANCHOR_NORTH_EAST,
- NULL);
- } else {
- /* and move the padtemplate box */
- gtk_object_set(GTK_OBJECT(padtemplate->padtemplatebox),
- "x1",x1,"y1",y1+2.0,
- "x2",x1+padtemplate->boxwidth,"y2",y2-2.0,NULL);
- /* then move the text to the right place */
- gtk_object_set(GTK_OBJECT(padtemplate->title),
- "x",x1+padtemplate->boxwidth+1.0,"y",y1,
- "anchor",GTK_ANCHOR_NORTH_WEST,
- NULL);
- }
-
- pads = padtemplate->pads;
- while (pads) {
- GstEditorPad *pad = GST_EDITOR_PAD(pads->data);
-
- if (!strcmp (gst_pad_get_name(pad->pad), padtemplate->padtemplate->name_template)) {
- gtk_object_set(GTK_OBJECT(pad),"x",padtemplate->x,"y",padtemplate->y,NULL);
- }
- else {
- gtk_object_set(GTK_OBJECT(pad),"x",padtemplate->x,"y",padtemplate->y+y2,NULL);
- }
- gst_editor_pad_repack (pad);
-
- pads = g_list_next (pads);
- }
-
- if (padtemplate->connection != NULL) {
- padtemplate->connection->resize = TRUE;
- gst_editor_connection_resize(padtemplate->connection);
- }
-
- padtemplate->resize = FALSE;
-}
-
-
-/*
-static gint gst_editor_padtemplate_event(GnomeCanvasItem *item,GdkEvent *event) {
- GstEditorPadTemplate *padtemplate = GST_EDITOR_PAD(item);
- gdouble item_x,item_y;
- GdkCursor *fleur;
- gdouble tx,ty;
-
- item_x = event->button.x;
- item_y = event->button.y;
- gnome_canvas_item_w2i(item->parent,&item_x,&item_y);
-
- switch(event->type) {
- case GDK_ENTER_NOTIFY:
- break;
- case GDK_LEAVE_NOTIFY:
- break;
- default:
- break;
- }
- return FALSE;
-}
-*/
-
-/* FIXME FIXME FIXME */
-static gint
-gst_editor_padtemplate_padbox_event(GnomeCanvasItem *item,
- GdkEvent *event,
- GstEditorPadTemplate *padtemplate)
-{
- GstEditorElement *element;
- GstEditorBin *bin;
-
-/* g_print("padtemplatebox has event %d\n",event->type); */
- g_return_val_if_fail(GST_IS_EDITOR_PADTEMPLATE(padtemplate), FALSE);
-
- element = padtemplate->parent;
- bin = element->parent;
-
- switch(event->type) {
- case GDK_ENTER_NOTIFY:
- gtk_object_set(GTK_OBJECT(padtemplate->border),
- "fill_color_rgba", 0xDDBBBB00, NULL);
-/* g_print("entered padtemplate '%s'\n", */
-/* gst_padtemplate_get_name(padtemplate->padtemplate)); */
- break;
- case GDK_LEAVE_NOTIFY:
- gtk_object_set(GTK_OBJECT(padtemplate->border),
- "fill_color_rgba", 0xFFCCCC00, NULL);
-/* g_print("left padtemplate '%s'\n", */
-/* gst_padtemplate_get_name(padtemplate->padtemplate)); */
- break;
- case GDK_BUTTON_PRESS:
-/* g_print("have button press in padtemplate '%s'\n", */
-/* gst_padtemplate_get_name(padtemplate->padtemplate)); */
- /* gst_editor_bin_start_banding(bin,padtemplate); */
- return TRUE;
- break;
- case GDK_MOTION_NOTIFY:
-/* g_print("have motion in padtemplate\n"); */
- break;
- default:
- break;
- }
- return FALSE;
-}
+++ /dev/null
-/* 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.
- */
-
-
-#include <gnome.h>
-#include <gst/gst.h>
-
-#include <sys/stat.h>
-#include <unistd.h>
-
-#include "gsteditorpalette.h"
-#include "gsteditorimage.h"
-
-/* class functions */
-static void gst_editor_palette_class_init(GstEditorPaletteClass *klass);
-static void gst_editor_palette_init(GstEditorPalette *palette);
-static void gst_editor_palette_set_arg(GtkObject *object,GtkArg *arg,guint id);
-static void gst_editor_palette_get_arg(GtkObject *object,GtkArg *arg,guint id);
-
-static void gst_editor_palette_make(GstEditorPalette *palette);
-
-struct _palette_entry {
- gchar *tooltip;
- GtkType (*type) (void);
- gchar *factoryname;
-};
-
-#define CORE_ELEMENT_SIZE 3
-struct _palette_entry _palette_contents_core[CORE_ELEMENT_SIZE] = {
- {"Bin", gst_bin_get_type, "bin" },
- {"Thread", gst_thread_get_type, "thread" },
- {"Pipeline", gst_pipeline_get_type, "pipeline" },
-};
-
-enum {
- ARG_0,
-};
-
-enum {
- SIGNAL_ELEMENT_SELECTED,
- SIGNAL_IN_SELECTION_MODE,
- LAST_SIGNAL
-};
-
-static GtkObjectClass *parent_class;
-static guint gst_editor_palette_signals[LAST_SIGNAL] = { 0 };
-
-GtkType
-gst_editor_palette_get_type (void)
-{
- static GtkType palette_type = 0;
-
- if (!palette_type) {
- static const GtkTypeInfo palette_info = {
- "GstEditorPalette",
- sizeof(GstEditorPalette),
- sizeof(GstEditorPaletteClass),
- (GtkClassInitFunc)gst_editor_palette_class_init,
- (GtkObjectInitFunc)gst_editor_palette_init,
- NULL,
- NULL,
- (GtkClassInitFunc)NULL,
- };
- palette_type = gtk_type_unique(gtk_object_get_type(),&palette_info);
- }
- return palette_type;
-}
-
-static void
-gst_editor_palette_class_init (GstEditorPaletteClass *klass)
-{
- GtkObjectClass *object_class;
-
- object_class = (GtkObjectClass*)klass;
-
- parent_class = gtk_type_class(gtk_object_get_type());
-
- gst_editor_palette_signals[SIGNAL_ELEMENT_SELECTED] =
- gtk_signal_new("element_selected",GTK_RUN_FIRST,object_class->type,
- GTK_SIGNAL_OFFSET(GstEditorPaletteClass,element_selected),
- gtk_marshal_NONE__INT,GTK_TYPE_NONE,1,
- GTK_TYPE_INT);
-
- gst_editor_palette_signals[SIGNAL_IN_SELECTION_MODE] =
- gtk_signal_new("in_selection_mode",GTK_RUN_FIRST,object_class->type,
- GTK_SIGNAL_OFFSET(GstEditorPaletteClass,in_selection_mode),
- gtk_marshal_NONE__INT,GTK_TYPE_NONE,1,
- GTK_TYPE_INT);
-
- gtk_object_class_add_signals(object_class,gst_editor_palette_signals,LAST_SIGNAL);
-
- object_class->set_arg = gst_editor_palette_set_arg;
- object_class->get_arg = gst_editor_palette_get_arg;
-}
-
-static void
-gst_editor_palette_init (GstEditorPalette *palette)
-{
- palette->tooltips = gtk_tooltips_new();
-}
-
-typedef struct {
- GstEditorPalette *palette;
- GModule *symbols;
-} connect_struct;
-
-/* we need more control here so... */
-static void
-gst_editor_palette_connect_func (const gchar *handler_name,
- GtkObject *object,
- const gchar *signal_name,
- const gchar *signal_data,
- GtkObject *connect_object,
- gboolean after,
- gpointer user_data)
-{
- GtkSignalFunc func;
- connect_struct *data = (connect_struct *)user_data;
-
- if (!g_module_symbol(data->symbols, handler_name, (gpointer *)&func))
- g_warning("gsteditorpalette: could not find signal handler '%s'.", handler_name);
- else {
- if (after)
- gtk_signal_connect_after(object, signal_name, func, (gpointer) data->palette);
- else
- gtk_signal_connect(object, signal_name, func, (gpointer) data->palette);
- }
-}
-
-GstEditorPalette*
-gst_editor_palette_new()
-{
- GstEditorPalette *palette;
- GtkWidget *palette_window;
- connect_struct data;
- GModule *symbols;
- struct stat statbuf;
-
- palette = GST_EDITOR_PALETTE(gtk_type_new(GST_TYPE_EDITOR_PALETTE));
-
- symbols = g_module_open(NULL, 0);
-
- data.palette = palette;
- data.symbols = symbols;
-
- if (stat(DATADIR"editor.glade", &statbuf) == 0) {
- palette->xml = glade_xml_new(DATADIR"editor.glade", "palette_window");
- }
- else {
- palette->xml = glade_xml_new ("editor.glade", "palette_window");
- }
- g_assert (palette->xml != NULL);
-
- glade_xml_signal_autoconnect_full (palette->xml, gst_editor_palette_connect_func, &data);
-
- palette_window = glade_xml_get_widget(palette->xml, "palette_window");
- gtk_widget_show(palette_window);
-
- palette->table = gtk_table_new(1, 4, TRUE);
-
- gst_editor_palette_make(palette);
-
- return palette;
-}
-
-typedef struct {
- GstEditorPalette *palette;
- struct _palette_entry *entry;
-} _signal_data;
-
-static void
-gst_editor_palette_element_clicked(GtkButton *button, _signal_data *data)
-{
- GstElementFactory *factory;
-
- factory = gst_elementfactory_find (data->entry->factoryname);
-
- gtk_signal_emit(GTK_OBJECT(data->palette),gst_editor_palette_signals[SIGNAL_ELEMENT_SELECTED], factory);
-}
-
-static void
-gst_editor_palette_make (GstEditorPalette *palette)
-{
- GtkWidget *button;
- GstEditorImage *editimage;
- GtkWidget *image;
- GtkWidget *vbox;
- gint i, x, y;
- _signal_data *data;
-
- x=0;
- y=0;
-
- vbox = glade_xml_get_widget(palette->xml, "palette_vbox");
- gtk_box_pack_start(GTK_BOX(vbox), palette->table, FALSE, TRUE, 0);
-
- for (i=0; i<CORE_ELEMENT_SIZE; i++) {
- button = gtk_button_new();
- gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE);
- editimage = gst_editor_image_get_for_type(_palette_contents_core[i].type());
- image = gtk_pixmap_new(editimage->pixmap, editimage->bitmap);
- gtk_container_add(GTK_CONTAINER(button), image);
- gtk_widget_show(image);
-
- gtk_table_attach(GTK_TABLE(palette->table), button, x, x+1, y, y+1, 0, 0, 0, 0);
- gtk_widget_show(palette->table);
-
- data = g_new0(_signal_data, 1);
-
- data->palette = palette;
- data->entry = &_palette_contents_core[i];
-
- gtk_signal_connect(GTK_OBJECT(button), "clicked", gst_editor_palette_element_clicked, data);
-
- gtk_tooltips_set_tip(palette->tooltips, button, _palette_contents_core[i].tooltip, NULL);
-
- gtk_widget_show(button);
-
- x++;
- if (x==4) {
- x=0;
- y++;
- }
- }
-}
-
-static void
-gst_editor_palette_set_arg (GtkObject *object,GtkArg *arg,guint id)
-{
- GstEditorPalette *palette;
-
- /* get the major types of this object */
- palette = GST_EDITOR_PALETTE(object);
-
- switch (id) {
- default:
- g_warning("gsteditorpalette: unknown arg!");
- break;
- }
-}
-
-static void
-gst_editor_palette_get_arg (GtkObject *object,GtkArg *arg,guint id)
-{
- GstEditorPalette *palette;
-
- /* get the major types of this object */
- palette = GST_EDITOR_PALETTE(object);
-
- switch (id) {
- default:
- arg->type = GTK_TYPE_INVALID;
- break;
- }
-}
-
-
-
+++ /dev/null
-/* 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_PALETTE_H__
-#define __GST_EDITOR_PALETTE_H__
-
-#include <gst/gst.h>
-#include <glade/glade.h>
-#include "gsteditor.h"
-
-#define GST_TYPE_EDITOR_PALETTE \
- (gst_editor_palette_get_type())
-#define GST_EDITOR_PALETTE(obj) \
- (GTK_CHECK_CAST((obj),GST_TYPE_EDITOR_PALETTE,GstEditorPalette))
-#define GST_EDITOR_PALETTE_CLASS(klass) \
- (GTK_CHECK_CLASS_CAST((klass),GST_TYPE_EDITOR_PALETTE,GstEditorPalette))
-#define GST_IS_EDITOR_PALETTE(obj) \
- (GTK_CHECK_TYPE((obj),GST_TYPE_EDITOR_PALETTE))
-#define GST_IS_EDITOR_PALETTE_CLASS(obj) \
- (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_EDITOR_PALETTE))
-
-typedef struct _GstEditorPalette GstEditorPalette;
-typedef struct _GstEditorPaletteClass GstEditorPaletteClass;
-
-struct _GstEditorPalette {
- GtkObject object;
-
- GladeXML *xml;
- GtkWidget *table;
- GtkTooltips *tooltips;
-};
-
-struct _GstEditorPaletteClass {
- GtkObjectClass parent_class;
-
- void (*element_selected) (GstEditorPalette *palette,
- GstElementFactory *factory);
- void (*in_selection_mode) (GstEditorPalette *palette,
- GstEditorElement *element);
-};
-
-GtkType gst_editor_palette_get_type();
-GstEditorPalette *gst_editor_palette_new();
-
-
-#endif /* __GST_EDITOR_PALETTE_H__ */
+++ /dev/null
-/* 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.
- */
-
-
-#include <gnome.h>
-#include <gst/gst.h>
-
-#include <glade/glade.h>
-#include "gsteditorproject.h"
-#include "gsteditorpalette.h"
-#include "gsteditorproperty.h"
-#include "gsteditorimage.h"
-
-/* class functions */
-static void gst_editor_project_class_init (GstEditorProjectClass *klass);
-static void gst_editor_project_init (GstEditorProject *project);
-
-static void gst_editor_project_set_arg (GtkObject *object,GtkArg *arg,guint id);
-static void gst_editor_project_get_arg (GtkObject *object,GtkArg *arg,guint id);
-
-enum {
- ARG_0,
-};
-
-enum {
- ELEMENT_ADDED,
- ELEMENT_REMOVED,
- ELEMENT_CHANGED,
- LAST_SIGNAL
-};
-
-static GtkObjectClass *parent_class;
-static guint gst_editor_project_signals[LAST_SIGNAL] = { 0 };
-
-GtkType gst_editor_project_get_type (void)
-{
- static GtkType project_type = 0;
-
- if (!project_type) {
- static const GtkTypeInfo project_info = {
- "GstEditorProject",
- sizeof(GstEditorProject),
- sizeof(GstEditorProjectClass),
- (GtkClassInitFunc)gst_editor_project_class_init,
- (GtkObjectInitFunc)gst_editor_project_init,
- NULL,
- NULL,
- (GtkClassInitFunc)NULL,
- };
- project_type = gtk_type_unique(gtk_object_get_type(),&project_info);
- }
- return project_type;
-}
-
-static void
-gst_editor_project_class_init (GstEditorProjectClass *klass)
-{
- GtkObjectClass *object_class;
-
- object_class = (GtkObjectClass*)klass;
-
- parent_class = gtk_type_class(gtk_object_get_type());
-
- gst_editor_project_signals[ELEMENT_ADDED] =
- gtk_signal_new("element_added",GTK_RUN_FIRST,G_TYPE_FROM_CLASS (object_class),
- GTK_SIGNAL_OFFSET(GstEditorProjectClass,element_added),
- gtk_marshal_NONE__POINTER,GTK_TYPE_NONE,1,
- GST_TYPE_ELEMENT);
-
- gst_editor_project_signals[ELEMENT_REMOVED] =
- gtk_signal_new("element_removed",GTK_RUN_FIRST,G_TYPE_FROM_CLASS (object_class),
- GTK_SIGNAL_OFFSET(GstEditorProjectClass,element_removed),
- gtk_marshal_NONE__POINTER,GTK_TYPE_NONE,1,
- GST_TYPE_ELEMENT);
-
- gst_editor_project_signals[ELEMENT_CHANGED] =
- gtk_signal_new("element_changed",GTK_RUN_FIRST,G_TYPE_FROM_CLASS (object_class),
- GTK_SIGNAL_OFFSET(GstEditorProjectClass,element_changed),
- gtk_marshal_NONE__POINTER,GTK_TYPE_NONE,1,
- GST_TYPE_ELEMENT);
-
-#ifndef USE_GLIB2
- gtk_object_class_add_signals(object_class,gst_editor_project_signals,LAST_SIGNAL);
-#endif
-
- object_class->set_arg = gst_editor_project_set_arg;
- object_class->get_arg = gst_editor_project_get_arg;
-}
-
-static void
-gst_editor_project_init (GstEditorProject *project)
-{
- project->toplevelelements = NULL;
-}
-
-GstEditorProject*
-gst_editor_project_new (void)
-{
- GstEditorProject *editorproject;
-
- editorproject = GST_EDITOR_PROJECT(gtk_type_new(GST_TYPE_EDITOR_PROJECT));
-
- return editorproject;
-}
-
-GstEditorProject *
-gst_editor_project_new_from_file (const guchar *fname)
-{
-#ifndef GST_DISABLE_LOADSAVE
- GstEditorProject *editorproject;
- GstXML *xml;
- GList *elements;
-
- g_return_val_if_fail (fname != NULL, NULL);
-
- editorproject = gst_editor_project_new();
-
- xml = gst_xml_new ();
- gst_xml_parse_file (xml, fname, NULL);
-
- elements = gst_xml_get_topelements(xml);
-
- while (elements) {
- GstElement *element = (GstElement *) elements->data;
-
- gst_editor_project_add_toplevel_element (editorproject, element);
-
- elements = g_list_next (elements);
- }
- return editorproject;
-#else
- return NULL;
-#endif
-}
-
-void
-gst_editor_project_load (GstEditorProject *project, const guchar *fname)
-{
-}
-
-void
-gst_editor_project_save_as (GstEditorProject *project, const guchar *fname)
-{
- GList *elements;
-
- g_return_if_fail (fname != NULL);
- g_return_if_fail (project != NULL);
-
- elements = project->toplevelelements;
-
- while (elements) {
- GstElement *element = (GstElement *) elements->data;
-
-#ifndef GST_DISABLE_LOADSAVE
- xmlSaveFile (fname, gst_xml_write (element));
-#endif
-
- elements = g_list_next (elements);
- }
-}
-
-void
-gst_editor_project_add_toplevel_element (GstEditorProject *project,
- GstElement *element)
-{
- g_return_if_fail(project != NULL);
- g_return_if_fail(GST_IS_EDITOR_PROJECT(project));
- g_return_if_fail(element != NULL);
- g_return_if_fail(GST_IS_ELEMENT(element));
-
- project->toplevelelements = g_list_append(project->toplevelelements, element);
-
- gst_element_set_name(element, "new_element");
-
- gtk_signal_emit(GTK_OBJECT(project),gst_editor_project_signals[ELEMENT_ADDED], element);
-}
-
-static void
-gst_editor_project_set_arg (GtkObject *object, GtkArg *arg, guint id)
-{
- GstEditorProject *project;
-
- /* get the major types of this object */
- project = GST_EDITOR_PROJECT(object);
-
- switch (id) {
- default:
- g_warning("gsteditorproject: unknown arg!");
- break;
- }
-}
-
-static void
-gst_editor_project_get_arg (GtkObject *object, GtkArg *arg, guint id)
-{
- GstEditorProject *project;
-
- /* get the major types of this object */
- project = GST_EDITOR_PROJECT(object);
-
- switch (id) {
- default:
- arg->type = GTK_TYPE_INVALID;
- break;
- }
-}
-
-
+++ /dev/null
-/* 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_PROJECT_H__
-#define __GST_EDITOR_PROJECT_H__
-
-#include <gst/gst.h>
-#include "gsteditor.h"
-#include "gsteditorproperty.h"
-
-#define GST_TYPE_EDITOR_PROJECT \
- (gst_editor_project_get_type())
-#define GST_EDITOR_PROJECT(obj) \
- (GTK_CHECK_CAST((obj),GST_TYPE_EDITOR_PROJECT,GstEditorProject))
-#define GST_EDITOR_PROJECT_CLASS(klass) \
- (GTK_CHECK_CLASS_CAST((klass),GST_TYPE_EDITOR_PROJECT,GstEditorProject))
-#define GST_IS_EDITOR_PROJECT(obj) \
- (GTK_CHECK_TYPE((obj),GST_TYPE_EDITOR_PROJECT))
-#define GST_IS_EDITOR_PROJECT_CLASS(obj) \
- (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_EDITOR_PROJECT))
-
-typedef struct _GstEditorProject GstEditorProject;
-typedef struct _GstEditorProjectClass GstEditorProjectClass;
-
-struct _GstEditorProject {
- GtkObject object;
-
- GList *toplevelelements;
-};
-
-struct _GstEditorProjectClass {
- GtkObjectClass parent_class;
-
- void (*element_added) (GstEditorProject *project,
- GstEditorElement *element);
- void (*element_removed) (GstEditorProject *project,
- GstEditorElement *element);
- void (*element_changed) (GstEditorProject *project,
- GstEditorElement *element);
-};
-
-GtkType gst_editor_project_get_type (void);
-
-GstEditorProject* gst_editor_project_new (void);
-GstEditorProject* gst_editor_project_new_from_file (const guchar *fname);
-void gst_editor_project_load (GstEditorProject *project, const guchar *fname);
-void gst_editor_project_save (GstEditorProject *project);
-void gst_editor_project_save_as (GstEditorProject *project,
- const guchar *fname);
-
-void gst_editor_project_add_toplevel_element (GstEditorProject *project,
- GstElement *element);
-
-#define GST_TYPE_EDITOR_PROJECT_VIEW \
- (gst_editor_project_view_get_type())
-#define GST_EDITOR_PROJECT_VIEW(obj) \
- (GTK_CHECK_CAST((obj),GST_TYPE_EDITOR_PROJECT_VIEW,GstEditorProjectView))
-#define GST_EDITOR_PROJECT_VIEW_CLASS(klass) \
- (GTK_CHECK_CLASS_CAST((klass),GST_TYPE_EDITOR_PROJECT_VIEW,GstEditorProjectView))
-#define GST_IS_EDITOR_PROJECT_VIEW(obj) \
- (GTK_CHECK_TYPE((obj),GST_TYPE_EDITOR_PROJECT_VIEW))
-#define GST_IS_EDITOR_PROJECT_VIEW_CLASS(obj) \
- (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_EDITOR_PROJECT_VIEW))
-
-typedef struct _GstEditorProjectView GstEditorProjectView;
-typedef struct _GstEditorProjectViewClass GstEditorProjectViewClass;
-
-struct _GstEditorProjectView {
- GtkObject object;
-
- GladeXML *xml;
- GtkWidget *list;
- GstEditorProject *project;
-};
-
-struct _GstEditorProjectViewClass {
- GtkObjectClass parent_class;
-};
-
-GtkType gst_editor_project_view_get_type (void);
-
-GstEditorProjectView* gst_editor_project_view_new (GstEditorProject *project);
-
-#endif /* __GST_EDITOR_PROJECT_H__ */
+++ /dev/null
-/* 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.
- */
-
-
-#include <gnome.h>
-#include <gst/gst.h>
-
-#include <sys/stat.h>
-#include <unistd.h>
-
-#include <glade/glade.h>
-#include "gsteditorproject.h"
-#include "gsteditorpalette.h"
-#include "gsteditorproperty.h"
-#include "gsteditorimage.h"
-
-/* class functions */
-static void gst_editor_project_view_class_init (GstEditorProjectViewClass *klass);
-static void gst_editor_project_view_init (GstEditorProjectView *project_view);
-
-static void gst_editor_project_view_set_arg (GtkObject *object, GtkArg *arg, guint id);
-static void gst_editor_project_view_get_arg (GtkObject *object, GtkArg *arg, guint id);
-
-enum {
- ARG_0,
-};
-
-enum {
- LAST_SIGNAL
-};
-
-static GtkObjectClass *parent_class;
-/* static guint gst_editor_project_view_signals[LAST_SIGNAL] = { 0 }; */
-
-GtkType
-gst_editor_project_view_get_type(void)
-{
- static GtkType project_view_type = 0;
-
- if (!project_view_type) {
- static const GtkTypeInfo project_view_info = {
- "GstEditorProjectView",
- sizeof(GstEditorProjectView),
- sizeof(GstEditorProjectViewClass),
- (GtkClassInitFunc)gst_editor_project_view_class_init,
- (GtkObjectInitFunc)gst_editor_project_view_init,
- NULL,
- NULL,
- (GtkClassInitFunc)NULL,
- };
- project_view_type = gtk_type_unique(gtk_object_get_type(),&project_view_info);
- }
- return project_view_type;
-}
-
-static void
-gst_editor_project_view_class_init (GstEditorProjectViewClass *klass)
-{
- GtkObjectClass *object_class;
-
- object_class = (GtkObjectClass*)klass;
-
- parent_class = gtk_type_class(gtk_object_get_type());
-
- object_class->set_arg = gst_editor_project_view_set_arg;
- object_class->get_arg = gst_editor_project_view_get_arg;
-}
-
-static void
-gst_editor_project_view_init (GstEditorProjectView *project)
-{
-}
-
-typedef struct {
- GstEditorProjectView *view;
- GModule *symbols;
-} connect_struct;
-
-/* we need more control here so... */
-static void
-gst_editor_project_connect_func (const gchar *handler_name,
- GtkObject *object,
- const gchar *signal_name,
- const gchar *signal_data,
- GtkObject *connect_object,
- gboolean after,
- gpointer user_data)
-{
- GtkSignalFunc func;
- connect_struct *data = (connect_struct *)user_data;
-
- if (!g_module_symbol(data->symbols, handler_name, (gpointer *)&func))
- g_warning("GstEditorProject: could not find signal handler '%s'.", handler_name);
- else {
- if (after)
- gtk_signal_connect_after(object, signal_name, func, (gpointer) data->view);
- else
- gtk_signal_connect(object, signal_name, func, (gpointer) data->view);
- }
-}
-
-static void
-gst_editor_project_element_selected (GstEditorProjectView *view,
- GstElementFactory *factory, GstEditorPalette *palette)
-{
- GstElement *element;
-
- element = gst_elementfactory_create (factory, "new_element");
-
- g_return_if_fail(element != NULL);
- g_return_if_fail(GST_IS_ELEMENT(element));
-
- gst_editor_project_add_toplevel_element(view->project, element);
-}
-
-static void
-on_name_change (GstEditorProjectView *view,
- GstEditorElement *element, GstEditor *editor)
-{
- gint row;
- gchar *text;
- guint8 spacing;
- GdkPixmap *pixmap;
- GdkBitmap *mask;
-
- row = gtk_clist_find_row_from_data(GTK_CLIST(view->list), editor);
-
- gtk_clist_get_pixtext(GTK_CLIST(view->list), row, 0, &text, &spacing, &pixmap, &mask);
- gtk_clist_set_pixtext(GTK_CLIST(view->list), row, 0, gst_editor_get_name(editor),
- spacing, pixmap, mask);
-}
-
-static void
-view_on_element_added (GstEditorProjectView *view, GstElement *element)
-{
- gchar *name;
- gint row;
- GstEditorImage *image;
- GstEditor *editor;
-
- image = gst_editor_image_get_for_type(GTK_OBJECT_TYPE(element));
- name = (gchar *)gst_element_get_name(element);
- row = gtk_clist_append(GTK_CLIST(view->list), &name);
- editor = gst_editor_new(element);
-
- g_signal_connect_swapped(G_OBJECT (editor), "name_changed",
- G_CALLBACK (on_name_change), G_OBJECT(view));
- gtk_clist_set_row_data(GTK_CLIST(view->list), row, editor);
- gtk_clist_set_pixtext(GTK_CLIST(view->list), row, 0, name, 3, image->pixmap, image->bitmap);
-}
-
-typedef struct {
- GtkWidget *selection;
- GstEditorProjectView *view;
-} file_select;
-
-static void
-on_save_as_file_selected (GtkWidget *button,
- file_select *data)
-{
- GtkWidget *selector = data->selection;
- GstEditorProjectView *view = data->view;
-
- gchar *file_name = gtk_file_selection_get_filename (GTK_FILE_SELECTION(selector));
- gst_editor_project_save_as (view->project, file_name);
-
- g_free (data);
-}
-
-void
-on_save_as1_activate (GtkWidget *widget,
- GstEditorProjectView *view)
-{
- GtkWidget *file_selector;
- file_select *file_data = g_new0 (file_select, 1);
-
- file_selector = gtk_file_selection_new("Please select a file for saving.");
-
- file_data->selection = file_selector;
- file_data->view = view;
-
- gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION(file_selector)->ok_button),
- "clicked", GTK_SIGNAL_FUNC (on_save_as_file_selected),
- file_data);
-
- /* Ensure that the dialog box is destroyed when the user clicks a button. */
- gtk_signal_connect_object (GTK_OBJECT (GTK_FILE_SELECTION(file_selector)->ok_button),
- "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy),
- (gpointer) file_selector);
- gtk_signal_connect_object (GTK_OBJECT (GTK_FILE_SELECTION(file_selector)->cancel_button),
- "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy),
- (gpointer) file_selector);
-
- /* Display that dialog */
- gtk_widget_show (file_selector);
-}
-
-static void
-on_load_file_selected (GtkWidget *button,
- file_select *data)
-{
- GtkWidget *selector = data->selection;
- const gchar *file_name;
- GstEditorProjectView *view = data->view;
-
- file_name = gtk_file_selection_get_filename (GTK_FILE_SELECTION(selector));
-
- gst_editor_project_load (view->project, file_name);
-
- g_free (data);
-}
-
-void
-on_open1_activate (GtkWidget *widget,
- GstEditorProjectView *view)
-{
- GtkWidget *file_selector;
- file_select *file_data = g_new0 (file_select, 1);
-
- file_selector = gtk_file_selection_new("Please select a file to load.");
-
- file_data->selection = file_selector;
- file_data->view = view;
-
- gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION(file_selector)->ok_button),
- "clicked", GTK_SIGNAL_FUNC (on_load_file_selected),
- file_data);
-
- /* Ensure that the dialog box is destroyed when the user clicks a button. */
- gtk_signal_connect_object (GTK_OBJECT (GTK_FILE_SELECTION(file_selector)->ok_button),
- "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy),
- (gpointer) file_selector);
- gtk_signal_connect_object (GTK_OBJECT (GTK_FILE_SELECTION(file_selector)->cancel_button),
- "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy),
- (gpointer) file_selector);
-
- /* Display that dialog */
- gtk_widget_show (file_selector);
-}
-
-GstEditorProjectView*
-gst_editor_project_view_new (GstEditorProject *project)
-{
- GstEditorProjectView *view;
- GtkWidget *main_window;
- connect_struct data;
- GModule *symbols;
- GstEditorPalette *palette;
- GList *elements;
- struct stat statbuf;
-
- view = GST_EDITOR_PROJECT_VIEW(gtk_type_new(GST_TYPE_EDITOR_PROJECT_VIEW));
-
- view->project = project;
-
- symbols = g_module_open(NULL, 0);
-
- data.view = view;
- data.symbols = symbols;
-
-
- if (stat(DATADIR"editor.glade", &statbuf) == 0) {
- g_print ("loading from %s\n", DATADIR"editor.glade");
- view->xml = glade_xml_new(DATADIR"editor.glade", "main_project_window");
- }
- else {
- g_print ("loading from %s\n", "editor.glade");
- view->xml = glade_xml_new ("editor.glade", "main_project_window");
- }
- g_assert (view->xml != NULL);
-
- glade_xml_signal_autoconnect_full (view->xml, gst_editor_project_connect_func, &data);
-
- main_window = glade_xml_get_widget(view->xml, "main_project_window");
- gtk_widget_show(main_window);
-
- palette = gst_editor_palette_new();
- gtk_signal_connect_object(GTK_OBJECT(palette), "element_selected", gst_editor_project_element_selected, GTK_OBJECT(view));
-
- view->list = glade_xml_get_widget(view->xml, "clist1");
- gtk_clist_set_row_height(GTK_CLIST(view->list), 21);
-
- gst_editor_property_get();
-
- elements = project->toplevelelements;
-
- while (elements) {
- GstElement *element = (GstElement *)elements->data;
-
- view_on_element_added (view, element);
-
- elements = g_list_next (elements);
- }
-
- gtk_signal_connect_object(GTK_OBJECT(project), "element_added", view_on_element_added, GTK_OBJECT(view));
-
- return view;
-}
-
-static void
-gst_editor_project_view_set_arg (GtkObject *object,GtkArg *arg,guint id)
-{
- GstEditorProjectView *project_view;
-
- /* get the major types of this object */
- project_view = GST_EDITOR_PROJECT_VIEW(object);
-
- switch (id) {
- default:
- g_warning("gsteditorproject_view: unknown arg!");
- break;
- }
-}
-
-static void
-gst_editor_project_view_get_arg (GtkObject *object,GtkArg *arg,guint id)
-{
- GstEditorProjectView *project_view;
-
- /* get the major types of this object */
- project_view = GST_EDITOR_PROJECT_VIEW(object);
-
- switch (id) {
- default:
- arg->type = GTK_TYPE_INVALID;
- break;
- }
-}
-
-
-
-
+++ /dev/null
-/* 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.
- */
-
-
-#include <ctype.h>
-#include <gnome.h>
-#include <gst/gst.h>
-#include <gst/gstpropsprivate.h>
-
-#include <sys/stat.h>
-#include <unistd.h>
-
-#include "gsteditorproperty.h"
-#include "gsteditorimage.h"
-
-/* class functions */
-static void gst_editor_property_class_init (GstEditorPropertyClass *klass);
-static void gst_editor_property_init (GstEditorProperty *property);
-
-static void gst_editor_property_set_arg (GtkObject *object,GtkArg *arg,guint id);
-static void gst_editor_property_get_arg (GtkObject *object,GtkArg *arg,guint id);
-
-static GtkWidget* create_property_entry (GtkArg *arg, GstElement *element);
-
-static GtkWidget* gst_editor_property_create (GstEditorProperty *property, GstEditorElement *element);
-
-
-enum {
- ARG_0,
-};
-
-enum {
- SIGNAL_ELEMENT_SELECTED,
- SIGNAL_IN_SELECTION_MODE,
- LAST_SIGNAL
-};
-
-static GtkObjectClass *parent_class;
-static guint gst_editor_property_signals[LAST_SIGNAL] = { 0 };
-
-static GstEditorProperty *_the_property = NULL;
-
-GtkType
-gst_editor_property_get_type (void)
-{
- static GtkType property_type = 0;
-
- if (!property_type) {
- static const GtkTypeInfo property_info = {
- "GstEditorProperty",
- sizeof(GstEditorProperty),
- sizeof(GstEditorPropertyClass),
- (GtkClassInitFunc)gst_editor_property_class_init,
- (GtkObjectInitFunc)gst_editor_property_init,
- NULL,
- NULL,
- (GtkClassInitFunc)NULL,
- };
- property_type = gtk_type_unique(gtk_object_get_type(),&property_info);
- }
- return property_type;
-}
-
-static void
-gst_editor_property_class_init (GstEditorPropertyClass *klass)
-{
- GtkObjectClass *object_class;
-
- object_class = (GtkObjectClass*)klass;
-
- parent_class = gtk_type_class(gtk_object_get_type());
-
- gst_editor_property_signals[SIGNAL_ELEMENT_SELECTED] =
- gtk_signal_new("element_selected",GTK_RUN_FIRST,object_class->type,
- GTK_SIGNAL_OFFSET(GstEditorPropertyClass,element_selected),
- gtk_marshal_NONE__INT,GTK_TYPE_NONE,1,
- GTK_TYPE_INT);
-
- gst_editor_property_signals[SIGNAL_IN_SELECTION_MODE] =
- gtk_signal_new("in_selection_mode",GTK_RUN_FIRST,object_class->type,
- GTK_SIGNAL_OFFSET(GstEditorPropertyClass,in_selection_mode),
- gtk_marshal_NONE__INT,GTK_TYPE_NONE,1,
- GTK_TYPE_INT);
-
- gtk_object_class_add_signals(object_class,gst_editor_property_signals,LAST_SIGNAL);
-
- object_class->set_arg = gst_editor_property_set_arg;
- object_class->get_arg = gst_editor_property_get_arg;
-}
-
-static void
-gst_editor_property_init (GstEditorProperty *property)
-{
- property->shown_element = NULL;
-}
-
-typedef struct {
- GstEditorProperty *property;
- GModule *symbols;
-} connect_struct;
-
-/* we need more control here so... */
-static void
-gst_editor_property_connect_func (const gchar *handler_name,
- GtkObject *object,
- const gchar *signal_name,
- const gchar *signal_data,
- GtkObject *connect_object,
- gboolean after,
- gpointer user_data)
-{
- GtkSignalFunc func;
- connect_struct *data = (connect_struct *)user_data;
-
- if (!g_module_symbol(data->symbols, handler_name, (gpointer *)&func))
- g_warning("gsteditorproperty: could not find signal handler '%s'.", handler_name);
- else {
- if (after)
- gtk_signal_connect_after(object, signal_name, func, (gpointer) data->property);
- else
- gtk_signal_connect(object, signal_name, func, (gpointer) data->property);
- }
-}
-
-static GstEditorProperty*
-gst_editor_property_new (void)
-{
- GstEditorProperty *property;
- GtkWidget *property_window;
- connect_struct data;
- GModule *symbols;
- struct stat statbuf;
-
- property = GST_EDITOR_PROPERTY(gtk_type_new(GST_TYPE_EDITOR_PROPERTY));
-
- symbols = g_module_open(NULL, 0);
-
- data.property = property;
- data.symbols = symbols;
-
- if (stat (DATADIR"editor.glade", &statbuf) == 0) {
- property->xml = glade_xml_new(DATADIR"editor.glade", "property_window");
- }
- else {
- property->xml = glade_xml_new ("editor.glade", "property_window");
- }
- g_assert (property->xml != NULL);
-
- glade_xml_signal_autoconnect_full (property->xml, gst_editor_property_connect_func, &data);
-
- property_window = glade_xml_get_widget(property->xml, "property_window");
- gtk_widget_show(property_window);
-
- return property;
-}
-
-GstEditorProperty*
-gst_editor_property_get (void)
-{
- if (!_the_property) {
- _the_property = gst_editor_property_new();
- }
- return _the_property;
-}
-
-static void
-gst_editor_property_set_arg (GtkObject *object,GtkArg *arg,guint id)
-{
- GstEditorProperty *property;
-
- /* get the major types of this object */
- property = GST_EDITOR_PROPERTY(object);
-
- switch (id) {
- default:
- g_warning("gsteditorproperty: unknown arg!");
- break;
- }
-}
-
-static void
-gst_editor_property_get_arg (GtkObject *object,GtkArg *arg,guint id)
-{
- GstEditorProperty *property;
-
- /* get the major types of this object */
- property = GST_EDITOR_PROPERTY(object);
-
- switch (id) {
- default:
- arg->type = GTK_TYPE_INVALID;
- break;
- }
-}
-
-static void
-on_name_changed (GtkEntry *entry, GstEditorElement *element)
-{
- gst_editor_element_set_name(element, gtk_entry_get_text(GTK_ENTRY(entry)));
-}
-
-static gchar*
-make_readable_name (gchar *name)
-{
- gchar *new;
- gchar *colon;
- gboolean inupper;
- gint len, i;
-
- colon = strstr(name, "::");
-
- if (!colon)
- new = g_strdup(name);
- else
- new = g_strdup(&colon[2]);
-
- new = g_strdelimit(new, G_STR_DELIMITERS, ' ');
-
- len = strlen(new);
- inupper = TRUE;
- for (i=0; i<len; i++) {
- if (inupper) new[i] = toupper(new[i]);
- inupper = FALSE;
- if (new[i] == ' ')
- inupper = TRUE;
- }
-
- return new;
-}
-
-static gchar*
-gst_editor_props_show_func (GstPropsEntry *entry)
-{
- switch (entry->propstype) {
- case GST_PROPS_INT_ID:
- return g_strdup_printf ("%d", entry->data.int_data);
- break;
- case GST_PROPS_INT_RANGE_ID:
- return g_strdup_printf ("%d-%d", entry->data.int_range_data.min, entry->data.int_range_data.max);
- break;
- case GST_PROPS_FLOAT_ID:
- return g_strdup_printf ("%f", entry->data.float_data);
- break;
- case GST_PROPS_FLOAT_RANGE_ID:
- return g_strdup_printf ("%f-%f", entry->data.float_range_data.min, entry->data.float_range_data.max);
- break;
- case GST_PROPS_FOURCC_ID:
- return g_strdup_printf ("%4.4s", (gchar *)&entry->data.fourcc_data);
- break;
- case GST_PROPS_BOOL_ID:
- return g_strdup_printf ("%s", (entry->data.bool_data ? "TRUE" : "FALSE"));
- break;
- default:
- break;
- }
- return g_strdup ("unknown");
-}
-
-static void
-gst_editor_add_caps_to_tree (GstCaps *caps, GtkWidget *tree, GtkCTreeNode *padnode)
-{
- if (caps) {
- GstProps *props = gst_caps_get_props (caps);
- if (props) {
- GList *propslist = props->properties;
-
- while (propslist) {
- gchar *data[2];
- GstPropsEntry *entry = (GstPropsEntry *)propslist->data;
-
- data[0] = g_quark_to_string (entry->propid);
-
- switch (entry->propstype) {
- case GST_PROPS_LIST_ID:
- {
- GList *list;
- guint count = 0;
- data[1] = "";
-
- list = entry->data.list_data.entries;
-
- while (list) {
- data[1] = g_strconcat (data[1], (count++?", ":""),
- gst_editor_props_show_func ((GstPropsEntry *)list->data), NULL);
- list = g_list_next (list);
- }
- break;
- }
- default:
- data[1] = gst_editor_props_show_func (entry);
- break;
- }
- gtk_ctree_insert_node (GTK_CTREE (tree), padnode, NULL, data, 0,
- NULL, NULL, NULL, NULL, TRUE, TRUE);
-
- propslist = g_list_next (propslist);
- }
- }
- }
-}
-
-static GtkWidget*
-gst_editor_pads_create (GstEditorProperty *property, GstEditorElement *element)
-{
- GstElement *realelement = element->element;
- GList *pads;
- GtkWidget *tree;
- gchar *columns[2];
-
- columns[0] = "name";
- columns[1] = "info";
-
- tree = gtk_ctree_new_with_titles (2, 0, columns);
- gtk_clist_set_column_width (GTK_CLIST (tree), 0, 150);
-
- gtk_clist_freeze (GTK_CLIST (tree));
-
- pads = gst_element_get_pad_list(realelement);
-
- while (pads) {
- GstPad *pad = (GstPad *)pads->data;
- GstCaps *caps = gst_pad_get_caps (pad);
- gchar *mime;
- gchar *data[2];
- GtkCTreeNode *padnode;
-
- if (caps) {
- GstType *type;
- type = gst_type_find_by_id (caps->id);
- mime = type->mime;
- }
- else {
- mime = "unknown/unknown";
- }
-
- data[0] = g_strdup (gst_pad_get_name (pad));
- data[1] = mime;
- padnode = gtk_ctree_insert_node (GTK_CTREE (tree), NULL, NULL, data, 0,
- NULL, NULL, NULL, NULL, FALSE, TRUE);
-
-
- gst_editor_add_caps_to_tree (caps, tree, padnode);
-
- pads = g_list_next (pads);
- }
-
- pads = gst_element_get_padtemplate_list(realelement);
- while (pads) {
- GstPadTemplate *templ = (GstPadTemplate *)pads->data;
- GstCaps *caps = templ->caps;
- gchar *mime;
- gchar *data[2];
- GtkCTreeNode *padnode;
-
- if (caps) {
- GstType *type;
- type = gst_type_find_by_id (((GstCaps *)caps)->id);
- mime = type->mime;
- }
- else {
- mime = "unknown/unknown";
- }
-
- data[0] = g_strdup (templ->name_template);
- data[1] = mime;
- padnode = gtk_ctree_insert_node (GTK_CTREE (tree), NULL, NULL, data, 0,
- NULL, NULL, NULL, NULL, FALSE, TRUE);
-
- while (caps) {
- GstCaps *cap = (GstCaps *)caps;
-
- gst_editor_add_caps_to_tree (cap, tree, padnode);
-
- caps = (caps)->next;
- }
-
- pads = g_list_next (pads);
- }
-
- gtk_clist_thaw (GTK_CLIST (tree));
-
- gtk_widget_show(tree);
- gtk_object_ref(GTK_OBJECT(tree));
- return tree;
-}
-
-typedef struct {
- GtkWidget *properties;
- GtkWidget *pads;
- GtkWidget *signals;
-} properties_widgets;
-
-void
-gst_editor_property_show (GstEditorProperty *property, GstEditorElement *element)
-{
- GtkType type;
-
- if (property->shown_element != element) {
- gtk_object_set (GTK_OBJECT (element), "active",TRUE, NULL);
- if (property->shown_element) {
- gtk_object_set (GTK_OBJECT (property->shown_element), "active",FALSE, NULL);
- }
- }
- else return;
-
- type = GTK_OBJECT_TYPE(element->element);
- if (type != GTK_TYPE_INVALID) {
- GtkWidget *property_box, *pads_window;
- properties_widgets *widgets;
-
- property_box = glade_xml_get_widget(property->xml, "property_vbox");
- pads_window = glade_xml_get_widget(property->xml, "pads_window");
-
- if (property->shown_element) {
- properties_widgets *oldwidgets;
-
- oldwidgets = (properties_widgets *) GST_EDITOR_PROPERTY_GET_OBJECT (property->shown_element);
-
- gtk_container_remove(GTK_CONTAINER(property_box), oldwidgets->properties);
- gtk_container_remove(GTK_CONTAINER(pads_window), oldwidgets->pads);
- }
-
- widgets = (properties_widgets *)GST_EDITOR_PROPERTY_GET_OBJECT(element);
-
- if (!widgets) {
- widgets = g_new0 (properties_widgets, 1);
-
- widgets->properties = gst_editor_property_create (property, element);
- widgets->pads = gst_editor_pads_create (property, element);
-
- GST_EDITOR_PROPERTY_SET_OBJECT(element, widgets);
- }
-
- gtk_box_pack_start(GTK_BOX(property_box), widgets->properties, FALSE, TRUE, 0);
- gtk_container_add(GTK_CONTAINER(pads_window), widgets->pads);
-
- property->shown_element = element;
- }
-}
-
-static GtkWidget*
-gst_editor_property_create (GstEditorProperty *property, GstEditorElement *element)
-{
- GtkWidget *table;
- GtkType type;
- GtkArg *args;
- guint32 *flags;
- guint num_args, i, count;
- GtkWidget *label, *entry;
-
- type = GTK_OBJECT_TYPE(element->element);
-
- table = gtk_table_new(1, 2, FALSE);
- gtk_table_set_row_spacings(GTK_TABLE(table), 2);
-
- count = 0;
-
- label = gtk_label_new(_("Type:"));
- gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.0);
- gtk_object_set(GTK_OBJECT(label), "width", 100, NULL);
- gtk_widget_show(label);
- entry = gtk_entry_new();
- gtk_widget_show(entry);
- gtk_entry_set_editable(GTK_ENTRY(entry), FALSE);
- gtk_entry_set_text(GTK_ENTRY(entry),
- gst_object_get_name (GST_OBJECT (gst_element_get_factory(element->element))));
- gtk_table_attach(GTK_TABLE(table), label, 0, 1, count, count+1, GTK_FILL, 0, 0, 0);
- gtk_table_attach(GTK_TABLE(table), entry, 1, 2, count, count+1, GTK_FILL|GTK_EXPAND, 0, 0, 0);
- count++;
-
- label = gtk_label_new(_("Name:"));
- gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.0);
- gtk_object_set(GTK_OBJECT(label), "width", 100, NULL);
- gtk_widget_show(label);
- entry = gtk_entry_new();
- gtk_widget_show(entry);
- gtk_entry_set_text(GTK_ENTRY(entry), gst_element_get_name(element->element));
- gtk_table_attach(GTK_TABLE(table), label, 0, 1, count, count+1, GTK_FILL, 0, 0, 0);
- gtk_table_attach(GTK_TABLE(table), entry, 1, 2, count, count+1, GTK_FILL|GTK_EXPAND, 0, 0, 0);
- count++;
-
- gtk_signal_connect(GTK_OBJECT(entry), "changed", on_name_changed, element);
-
- args = gtk_object_query_args(type, &flags, &num_args);
- for (i=0; i<num_args; i++) {
- if (flags[i] & GTK_ARG_READABLE) {
- gtk_object_getv(GTK_OBJECT(element->element), 1, &args[i]);
-
- entry = create_property_entry(&args[i], element->element);
-
- if (entry) {
- label = gtk_label_new(g_strconcat(make_readable_name(args[i].name), ":", NULL));
- gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.0);
- gtk_object_set(GTK_OBJECT(label), "width", 100, NULL);
- gtk_widget_show(label);
-
- gtk_table_attach(GTK_TABLE(table), label, 0, 1, count, count+1, GTK_FILL, 0, 0, 0);
- gtk_table_attach(GTK_TABLE(table), entry, 1, 2, count, count+1, GTK_FILL|GTK_EXPAND, 0, 0, 0);
- count++;
- }
- }
- }
-
- gtk_widget_show(table);
- gtk_object_ref(GTK_OBJECT(table));
- return table;
-}
-
-static void
-widget_show_toggled (GtkToggleButton *button, GtkArg *arg)
-{
- GtkWidget *window;
-
- window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
-
- gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(GTK_VALUE_OBJECT(*arg)));
-
- gtk_widget_show(window);
-}
-
-typedef struct {
- GtkArg *arg;
- GstElement *element;
-} arg_data;
-
-static void
-widget_bool_toggled (GtkToggleButton *button, arg_data *arg)
-{
- gboolean toggled;
-
- toggled = gtk_toggle_button_get_active(button);
- gtk_object_set (GTK_OBJECT (button), "label", (toggled? _("Yes"):_("No")), NULL);
-
- gdk_threads_leave ();
- gtk_object_set (GTK_OBJECT (arg->element), arg->arg->name, toggled, NULL);
- gdk_threads_enter ();
-}
-
-static void
-widget_adjustment_value_changed (GtkAdjustment *adjustment,
- arg_data *arg)
-{
- gdk_threads_leave ();
- gtk_object_set (GTK_OBJECT (arg->element), arg->arg->name, (gint) adjustment->value, NULL);
- gdk_threads_enter ();
-}
-
-static void
-on_file_selected (GtkEditable *entry, arg_data *fs)
-{
- gtk_object_set(GTK_OBJECT(fs->element), fs->arg->name,
- gtk_entry_get_text(GTK_ENTRY(entry)), NULL);
-}
-
-static GtkWidget*
-create_property_entry (GtkArg *arg, GstElement *element)
-{
- GtkWidget *entry = NULL;
-
- /* basic types */
- switch (arg->type) {
- case GTK_TYPE_STRING:
- {
- gchar *text;
- entry = gtk_entry_new();
- text = GTK_VALUE_STRING(*arg);
- if (text)
- gtk_entry_set_text(GTK_ENTRY(entry), text);
- break;
- }
- case GTK_TYPE_BOOL:
- {
- gboolean toggled;
- arg_data *data = g_new0(arg_data, 1);
-
- data->element = element;
- data->arg = arg;
-
- toggled = GTK_VALUE_BOOL(*arg);
- entry = gtk_toggle_button_new_with_label((toggled? _("Yes"):_("No")));
- gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(entry), toggled);
- gtk_signal_connect(GTK_OBJECT(entry), "toggled", widget_bool_toggled, data);
- break;
- }
- case GTK_TYPE_ULONG:
- case GTK_TYPE_LONG:
- case GTK_TYPE_UINT:
- case GTK_TYPE_INT:
- {
- gint value;
- GtkAdjustment *spinner_adj;
- arg_data *data = g_new0(arg_data, 1);
-
- data->element = element;
- data->arg = arg;
-
- value = GTK_VALUE_INT(*arg);
- spinner_adj = (GtkAdjustment *) gtk_adjustment_new(50.0, 0.0, 10000000.0, 1.0, 5.0, 5.0);
- entry = gtk_spin_button_new(spinner_adj, 1.0, 0);
- gtk_spin_button_set_value(GTK_SPIN_BUTTON(entry), (gfloat) value);
- gtk_signal_connect(GTK_OBJECT(spinner_adj), "value_changed", widget_adjustment_value_changed, data);
- break;
- }
- case GTK_TYPE_FLOAT:
- case GTK_TYPE_DOUBLE:
- {
- gdouble value;
- GtkAdjustment *spinner_adj;
-
- value = GTK_VALUE_DOUBLE(*arg);
- spinner_adj = (GtkAdjustment *) gtk_adjustment_new(50.0, 0.0, 10000000.0, 0.1, 5.0, 5.0);
- entry = gtk_spin_button_new(spinner_adj, 1.0, 3);
- gtk_spin_button_set_value(GTK_SPIN_BUTTON(entry), (gfloat) value);
- break;
- }
- default:
- break;
- }
- /* more extensive testing here */
- if (!entry) {
- if (arg->type == GTK_TYPE_WIDGET)
- {
- entry = gtk_toggle_button_new_with_label(_("Show..."));
- gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(entry), FALSE);
- gtk_signal_connect(GTK_OBJECT(entry), "toggled", widget_show_toggled, arg);
- }
- else if (GTK_FUNDAMENTAL_TYPE(arg->type) == GTK_TYPE_ENUM) {
- GtkEnumValue *values;
- guint i = 0;
- GtkWidget *menu;
- guint value = GTK_VALUE_ENUM (*arg);
- guint active = 0;
-
- entry = gtk_option_menu_new();
- menu = gtk_menu_new();
-
- values = gtk_type_enum_get_values(arg->type);
- while (values[i].value_name) {
- GtkWidget *menuitem = gtk_menu_item_new_with_label(values[i].value_nick);
-
- gtk_menu_append(GTK_MENU(menu), menuitem);
- gtk_widget_show(menuitem);
-
- if (value == values[i].value) active = i;
- i++;
- }
- gtk_menu_set_active(GTK_MENU(menu), active);
- gtk_option_menu_set_menu(GTK_OPTION_MENU(entry), menu);
- }
- else if (arg->type == GST_TYPE_FILENAME) {
- arg_data *fs = g_new0(arg_data, 1);
-
- entry = gnome_file_entry_new(NULL, NULL);
-
- fs->element = element;
- fs->arg = arg;
-
- gtk_signal_connect(GTK_OBJECT(gnome_file_entry_gtk_entry(GNOME_FILE_ENTRY(entry))),
- "changed",
- GTK_SIGNAL_FUNC(on_file_selected),
- fs);
- }
- else {
- g_print("unknown type: %d\n", arg->type);
- }
- }
- gtk_widget_show(entry);
-
- return entry;
-}
-
+++ /dev/null
-/* 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_PROPERTY_H__
-#define __GST_EDITOR_PROPERTY_H__
-
-#include <gst/gst.h>
-#include <glade/glade.h>
-#include "gsteditor.h"
-
-#define GST_TYPE_EDITOR_PROPERTY \
- (gst_editor_property_get_type())
-#define GST_EDITOR_PROPERTY(obj) \
- (GTK_CHECK_CAST((obj),GST_TYPE_EDITOR_PROPERTY,GstEditorProperty))
-#define GST_EDITOR_PROPERTY_CLASS(klass) \
- (GTK_CHECK_CLASS_CAST((klass),GST_TYPE_EDITOR_PROPERTY,GstEditorProperty))
-#define GST_IS_EDITOR_PROPERTY(obj) \
- (GTK_CHECK_TYPE((obj),GST_TYPE_EDITOR_PROPERTY))
-#define GST_IS_EDITOR_PROPERTY_CLASS(obj) \
- (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_EDITOR_PROPERTY))
-
-#define GST_EDITOR_PROPERTY_SET_OBJECT(item,object) \
- (gtk_object_set_data(GTK_OBJECT(item),"gsteditorproperty",(object)))
-#define GST_EDITOR_PROPERTY_GET_OBJECT(item) \
- (gtk_object_get_data(GTK_OBJECT(item),"gsteditorproperty"))
-
-typedef struct _GstEditorProperty GstEditorProperty;
-typedef struct _GstEditorPropertyClass GstEditorPropertyClass;
-
-struct _GstEditorProperty {
- GtkObject object;
-
- GladeXML *xml;
- GstEditorElement *shown_element;
-};
-
-struct _GstEditorPropertyClass {
- GtkObjectClass parent_class;
-
- void (*element_selected) (GstEditorProperty *property,
- GstEditorElement *element);
- void (*in_selection_mode) (GstEditorProperty *property,
- GstEditorElement *element);
-};
-
-GtkType gst_editor_property_get_type();
-GstEditorProperty *gst_editor_property_get();
-
-void gst_editor_property_show(GstEditorProperty *property, GstEditorElement *element);
-
-
-#endif /* __GST_EDITOR_PROPERTY_H__ */
+++ /dev/null
-/* 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.
- */
-
-
-#include <gst/gst.h>
-#include <gnome.h>
-
-struct element_select_classlist {
- gchar *name;
- GSList *subclasses;
- GSList *factories;
-};
-
-struct element_select_details {
- GstElementFactory *factory;
- GtkWidget *longname, *description, *version, *author, *copyright;
-};
-
-static gint compare_name(gconstpointer a,gconstpointer b) {
- return (strcmp(GST_OBJECT_NAME (a),
- GST_OBJECT_NAME (b)));
-}
-
-gint str_compare(gconstpointer a,gconstpointer b) {
- return (strcmp((gchar *)a,(gchar *)b));
-}
-
-/* this function creates a GtkCTreeNode with the contents of the classtree */
-static void make_ctree(GtkCTree *tree,GtkCTreeNode *parent,
- struct element_select_classlist *class) {
- GSList *traverse;
- GtkCTreeNode *classnode, *node = NULL;
- gchar *data[2];
-
- data[0] = g_strdup(class->name);
- data[1] = NULL;
- classnode = gtk_ctree_insert_node(tree,parent,NULL,data,0,
- NULL,NULL,NULL,NULL,FALSE,TRUE);
- gtk_ctree_node_set_selectable(tree,classnode,FALSE);
-
- traverse = class->subclasses;
- while (traverse) {
- make_ctree(tree,classnode,
- (struct element_select_classlist *)(traverse->data));
- traverse = g_slist_next(traverse);
- }
-
- traverse = class->factories;
- while (traverse) {
- GstElementFactory *factory = (GstElementFactory *)(traverse->data);
- data[0] = g_strdup(GST_OBJECT_NAME (factory));
- data[1] = g_strdup(factory->details->description);
- node = gtk_ctree_insert_node(tree,classnode,NULL,data,0,
- NULL,NULL,NULL,NULL,TRUE,FALSE);
- gtk_ctree_node_set_row_data_full(tree,node,factory,NULL);
- traverse = g_slist_next(traverse);
- }
-}
-
-static void ctree_select(GtkWidget *widget,gint row,gint column,
- GdkEventButton *bevent,gpointer data) {
- GtkCTree *tree = GTK_CTREE(widget);
- GtkCTreeNode *node;
- GstElementFactory *factory;
- struct element_select_details *details;
- node = gtk_ctree_node_nth(tree,row);
- factory = (GstElementFactory *)gtk_ctree_node_get_row_data(tree,node);
- if (!factory)
- return;
- details = (struct element_select_details *)data;
- details->factory = factory;
-
- gtk_entry_set_text(GTK_ENTRY(details->longname),
- factory->details->longname);
- gtk_entry_set_text(GTK_ENTRY(details->description),
- factory->details->description);
- gtk_entry_set_text(GTK_ENTRY(details->version),
- factory->details->version);
- gtk_entry_set_text(GTK_ENTRY(details->author),
- factory->details->author);
- gtk_entry_set_text(GTK_ENTRY(details->copyright),
- factory->details->copyright);
-
- if (bevent && bevent->type == GDK_2BUTTON_PRESS)
- gtk_main_quit();
-}
-
-
-GstElementFactory *element_select_dialog() {
- GtkWidget *dialog;
- gchar *titles[2];
- GtkWidget *ctree;
- GtkWidget *scroller;
- GtkTable *table;
- GtkWidget *detailslabel;
- GtkWidget *detailshsep;
- GtkWidget *longname, *description, *version, *author, *copyright;
-
- GList *elements;
- GstElementFactory *element;
- gchar **classes, **class;
- GSList *classtree, *treewalk;
- GSList **curlist;
- struct element_select_classlist *branch = NULL;
- struct element_select_details details;
-
- /* first create the dialog and associated stuff */
- dialog = gnome_dialog_new("Select Element",
- GNOME_STOCK_BUTTON_OK,
- GNOME_STOCK_BUTTON_CANCEL,
- NULL);
- gnome_dialog_set_close(GNOME_DIALOG(dialog),TRUE);
- gnome_dialog_close_hides(GNOME_DIALOG(dialog),TRUE);
- gnome_dialog_set_default(GNOME_DIALOG(dialog),GNOME_OK);
-
- titles[0] = "Element ";
- titles[1] = "Description";
- ctree = gtk_ctree_new_with_titles(2,0,titles);
- gtk_widget_set_usize(ctree,400,350);
-
- scroller = gtk_scrolled_window_new(NULL,NULL);
- gtk_container_add(GTK_CONTAINER(scroller),ctree);
- gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scroller),
- GTK_POLICY_AUTOMATIC,GTK_POLICY_AUTOMATIC);
- gtk_box_pack_start(GTK_BOX(GNOME_DIALOG(dialog)->vbox),scroller,
- TRUE,TRUE,0);
-
- /* create the details table and put a title on it */
- table = GTK_TABLE(gtk_table_new(2,7,FALSE));
- detailslabel = gtk_label_new("Element Details:");
- gtk_misc_set_alignment(GTK_MISC(detailslabel),0.0,0.5);
- gtk_table_attach(table,detailslabel,0,2,0,1,GTK_FILL|GTK_EXPAND,0,0,0);
-
- /* then a separator to keep the title separate */
- detailshsep = gtk_hseparator_new();
- gtk_table_attach(table,detailshsep,0,2,1,2,GTK_FILL|GTK_EXPAND,0,0,0);
-
- /* the long name of the element */
- longname = gtk_label_new("Name:");
- gtk_misc_set_alignment(GTK_MISC(longname),1.0,0.5);
- gtk_table_attach(table,longname,0,1,2,3,GTK_FILL,0,5,0);
- details.longname = gtk_entry_new();
- gtk_entry_set_editable(GTK_ENTRY(details.longname),FALSE);
- gtk_table_attach(table,details.longname,1,2,2,3,GTK_FILL|GTK_EXPAND,0,0,0);
-
- /* the description */
- description = gtk_label_new("Description:");
- gtk_misc_set_alignment(GTK_MISC(description),1.0,0.5);
- gtk_table_attach(table,description,0,1,3,4,GTK_FILL,0,5,0);
- details.description = gtk_entry_new();
- gtk_entry_set_editable(GTK_ENTRY(details.description),FALSE);
- gtk_table_attach(table,details.description,1,2,3,4,GTK_FILL|GTK_EXPAND,0,0,0);
-
- /* the version */
- version = gtk_label_new("Version:");
- gtk_misc_set_alignment(GTK_MISC(version),1.0,0.5);
- gtk_table_attach(table,version,0,1,4,5,GTK_FILL,0,5,0);
- details.version = gtk_entry_new();
- gtk_entry_set_editable(GTK_ENTRY(details.version),FALSE);
- gtk_table_attach(table,details.version,1,2,4,5,GTK_FILL|GTK_EXPAND,0,0,0);
-
- /* the author */
- author = gtk_label_new("Author:");
- gtk_misc_set_alignment(GTK_MISC(author),1.0,0.5);
- gtk_table_attach(table,author,0,1,6,7,GTK_FILL,0,5,0);
- details.author = gtk_entry_new();
- gtk_entry_set_editable(GTK_ENTRY(details.author),FALSE);
- gtk_table_attach(table,details.author,1,2,6,7,GTK_FILL|GTK_EXPAND,0,0,0);
-
- /* the copyright */
- copyright = gtk_label_new("Copyright:");
- gtk_misc_set_alignment(GTK_MISC(copyright),1.0,0.5);
- gtk_table_attach(table,copyright,0,1,7,8,GTK_FILL,0,5,0);
- details.copyright = gtk_entry_new();
- gtk_entry_set_editable(GTK_ENTRY(details.copyright),FALSE);
- gtk_table_attach(table,details.copyright,1,2,7,8,GTK_FILL|GTK_EXPAND,0,0,0);
-
- gtk_box_pack_start(GTK_BOX(GNOME_DIALOG(dialog)->vbox),GTK_WIDGET(table),
- TRUE,TRUE,0);
-
-
- /* first create a sorted (by class) tree of all the factories */
- classtree = NULL;
- elements = gst_elementfactory_get_list();
- while (elements) {
- element = (GstElementFactory *)(elements->data);
- printf("%s %s\n", GST_OBJECT_NAME (element), element->details->klass);
- /* split up the factory's class */
- classes = g_strsplit(element->details->klass,"/",0);
- class = classes;
- curlist = &classtree;
- /* walk down the class tree to find where to place this element */
- /* the goal is for treewalk to point to the right class branch */
- /* when we exit this thing, branch is pointing where we want */
- while (*class) {
- treewalk = *curlist;
- /* walk the current level of class to see if we have the class */
- while (treewalk) {
- branch = (struct element_select_classlist *)(treewalk->data);
- /* see if this class matches what we're looking for */
- if (!strcmp(branch->name,*class)) {
- /* if so, we progress down the list into this one's list */
- curlist = &branch->subclasses;
- break;
- }
- treewalk = g_slist_next(treewalk);
- }
- /* if treewalk == NULL, it wasn't in the list. add one */
- if (treewalk == NULL) {
- /* curlist is pointer to list */
- branch = g_new0(struct element_select_classlist,1);
- branch->name = g_strdup(*class);
- *curlist = g_slist_insert_sorted(*curlist,branch,str_compare);
- curlist = &branch->subclasses;
- }
- class++;
- }
- /* theoretically branch points where we want now */
- branch->factories = g_slist_insert_sorted(branch->factories,element,
- compare_name);
- elements = g_list_next(elements);
- }
-
- /* now fill in the ... */
- gtk_clist_freeze(GTK_CLIST(ctree));
- treewalk = classtree;
- while (treewalk) {
- make_ctree(GTK_CTREE(ctree),NULL,
- (struct element_select_classlist *)(treewalk->data));
- treewalk = g_slist_next(treewalk);
- }
- gtk_clist_thaw(GTK_CLIST(ctree));
-
- gtk_signal_connect(GTK_OBJECT(ctree),"select_row",
- GTK_SIGNAL_FUNC(ctree_select),&details);
-
- gtk_widget_show_all(GTK_WIDGET(dialog));
-
- details.factory = NULL;
- if (gnome_dialog_run_and_close(GNOME_DIALOG(dialog)) == GNOME_CANCEL)
- return NULL;
- else
- return details.factory;
-};
-
-
-/* this is available so we can do a quick test of this thing */
-#ifdef ELEMENTSELECT_MAIN
-int main(int argc,char *argv[]) {
- GstElementFactory *chosen;
-
- gst_init(&argc,&argv);
- gst_plugin_load_all();
- gnome_init("elementselect_test","0.0.0",argc,argv);
- chosen = element_select_dialog();
- if (chosen)
- g_print("selected '%s'\n",chosen->name);
- else
- g_print("didn't choose any\n");
- exit(0);
-}
-#endif /* ELEMENTSELECT_MAIN */
+++ /dev/null
-/* 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.
- */
-
-
-#include <gst/gst.h>
-
-GstElementFactory *element_select_dialog();
+++ /dev/null
-xpmdir = $(datadir)/gsteditor/pixmaps
-xpm_DATA = bin.xpm element.xpm pipeline.xpm selector.xpm tee.xpm thread.xpm
-
-EXTRA_DIST = $(xpm_DATA)
+++ /dev/null
-/* XPM */
-static char * bin_xpm[] = {
-"21 21 116 2",
-" c None",
-". c #7B7B7B",
-"+ c #D6D6D6",
-"@ c #E5E3DF",
-"# c #CAC6BF",
-"$ c #EBEAE7",
-"% c #000000",
-"& c #FFFFFF",
-"* c #DBD8D4",
-"= c #B4AEA5",
-"- c #867C6D",
-"; c #544C3F",
-"> c #726755",
-", c #796E5D",
-"' c #A6A096",
-") c #C8C4BC",
-"! c #C1BFB9",
-"~ c #867F6F",
-"{ c #514238",
-"] c #706757",
-"^ c #5C5446",
-"/ c #706A5F",
-"( c #B8B6B1",
-"_ c #E2E2E0",
-": c #9A9178",
-"< c #D2C398",
-"[ c #AB9976",
-"} c #907F68",
-"| c #716150",
-"1 c #685F51",
-"2 c #706656",
-"3 c #796F5D",
-"4 c #817562",
-"5 c #9B8C76",
-"6 c #867B6A",
-"7 c #645F55",
-"8 c #AAA492",
-"9 c #CEBF94",
-"0 c #D4C494",
-"a c #D3C494",
-"b c #D4C396",
-"c c #C9B48D",
-"d c #7B6B55",
-"e c #6E5F50",
-"f c #8C7F6A",
-"g c #9B8C75",
-"h c #9C8C74",
-"i c #9C8C73",
-"j c #9A8A74",
-"k c #D2D1CE",
-"l c #A69E84",
-"m c #D1C293",
-"n c #D4C493",
-"o c #C2B58B",
-"p c #756C52",
-"q c #544B39",
-"r c #92846E",
-"s c #92846F",
-"t c #605749",
-"u c #D9D7D0",
-"v c #908970",
-"w c #C8BA90",
-"x c #D3C395",
-"y c #797153",
-"z c #827B62",
-"A c #6E634F",
-"B c #574E3F",
-"C c #9B8B73",
-"D c #988872",
-"E c #685E4E",
-"F c #443F35",
-"G c #272621",
-"H c #8B887E",
-"I c #716A50",
-"J c #867C5C",
-"K c #A89C7A",
-"L c #696249",
-"M c #988F72",
-"N c #84775F",
-"O c #544C3D",
-"P c #726959",
-"Q c #49453B",
-"R c #4E4A3F",
-"S c #423E35",
-"T c #AAA9A2",
-"U c #9F987F",
-"V c #857E63",
-"W c #655E46",
-"X c #92896B",
-"Y c #AAA080",
-"Z c #81735A",
-"` c #7C725F",
-" . c #47443B",
-".. c #625C4E",
-"+. c #897E6D",
-"@. c #A29E98",
-"#. c #C3C0BA",
-"$. c #8D8777",
-"%. c #A2987B",
-"&. c #A99C7A",
-"*. c #B4A885",
-"=. c #7E7157",
-"-. c #928570",
-";. c #544F44",
-">. c #6E675A",
-",. c #7E786D",
-"'. c #C3C1BB",
-"). c #9D947D",
-"!. c #AEA182",
-"~. c #887A63",
-"{. c #867A68",
-"]. c #7E796F",
-"^. c #AFADAA",
-"/. c #BDB9AE",
-"(. c #A09A91",
-"_. c #CECBC8",
-" ",
-" ",
-" ",
-". . . . . . . . . . . . . . . . . . . ",
-". + + + + + + + + + + @ # $ + + + + . % ",
-". + . & . . & & * = - ; ; > , ' ) & . % ",
-". + . . . . ! ~ { > > ; ; ; ; ] ^ / ( % ",
-". + & & & _ : < [ } | > ; 1 2 3 4 5 6 7 ",
-". + & & & 8 9 0 a b c d e f g h i i j 7 ",
-". + & & k l m n n 0 o p q r i i i s t 7 ",
-". + & & & u v w a x y z A B C D E F G % ",
-". + & & & & H I J K L M N O P ; Q R S % ",
-". + & & & & T U V W X Y Z ` . ...+.@.% ",
-". + + + + + + #.$.%.&.*.=.-.;.>.,.@.. % ",
-". + % + & + % % . '.).!.~.{.].^.& & . % ",
-". + % % . + % % . + & /.(._.& & & & . % ",
-". + % + & + % % . + & & & & & & & & . % ",
-". . . . . . . . . . . . . . . . . . . % ",
-" % % % % % % % % % % % % % % % % % % % ",
-" ",
-" "};
+++ /dev/null
-/* XPM */
-static char * element_xpm[] = {
-"21 21 5 1",
-" c None",
-". c #7B7B7B",
-"+ c #D6D6D6",
-"@ c #000000",
-"# c #FFFFFF",
-" ",
-" ",
-" ",
-"................... ",
-".+++++++++++++++++.@ ",
-".+.#..############.@ ",
-".+.....###########.@ ",
-".+################.@ ",
-".+################.@ ",
-".+################.@ ",
-".+################.@ ",
-".+################.@ ",
-".+################.@ ",
-".+++++++++########.@ ",
-".+@+#+@@.+########.@ ",
-".+@@.+@@.+########.@ ",
-".+@+#+@@.+########.@ ",
-"...................@ ",
-" @@@@@@@@@@@@@@@@@@@ ",
-" ",
-" "};
+++ /dev/null
-/* XPM */
-static char * pipeline_xpm[] = {
-"21 21 94 2",
-" c None",
-". c #7B7B7B",
-"+ c #A8ABA5",
-"@ c #D6D6D6",
-"# c #CACBC9",
-"$ c #424B3B",
-"% c #819373",
-"& c #606959",
-"* c #000000",
-"= c #FFFFFF",
-"- c #C5C6C4",
-"; c #475242",
-"> c #99AF87",
-", c #667855",
-"' c #4C5641",
-") c #A0A19E",
-"! c #C8C7C5",
-"~ c #4E5847",
-"{ c #96AE85",
-"] c #7B9369",
-"^ c #58664B",
-"/ c #373A32",
-"( c #C1C2C0",
-"_ c #3A382F",
-": c #97AE86",
-"< c #7E996B",
-"[ c #5D6E4F",
-"} c #31362C",
-"| c #D1D2CF",
-"1 c #C6C7C5",
-"2 c #6A7261",
-"3 c #757E68",
-"4 c #8A9778",
-"5 c #627651",
-"6 c #607252",
-"7 c #32382D",
-"8 c #CCCCCA",
-"9 c #7B8571",
-"0 c #ADC29C",
-"a c #A6BE95",
-"b c #889B74",
-"c c #586A47",
-"d c #343B2D",
-"e c #B8B8B8",
-"f c #91948E",
-"g c #A7BA96",
-"h c #9EB78D",
-"i c #8AA079",
-"j c #6D8459",
-"k c #5A6B4D",
-"l c #7E7F7B",
-"m c #606355",
-"n c #889976",
-"o c #768A65",
-"p c #687D57",
-"q c #697D57",
-"r c #525A48",
-"s c #CFCFCD",
-"t c #7B8177",
-"u c #93A685",
-"v c #748C60",
-"w c #5C6F4C",
-"x c #697A5A",
-"y c #4F5A44",
-"z c #A1A39D",
-"A c #878E83",
-"B c #A0B094",
-"C c #92AC80",
-"D c #6B825A",
-"E c #3E4934",
-"F c #464940",
-"G c #B1B1AE",
-"H c #8C9385",
-"I c #8A987D",
-"J c #9AB188",
-"K c #6C825A",
-"L c #525E46",
-"M c #6F726B",
-"N c #A8A8A5",
-"O c #7E8676",
-"P c #91A282",
-"Q c #5D6F4D",
-"R c #556148",
-"S c #666960",
-"T c #B6B6B4",
-"U c #45463E",
-"V c #556049",
-"W c #58644B",
-"X c #65675E",
-"Y c #E1E1E1",
-"Z c #A9A9A6",
-"` c #3C3D34",
-" . c #5C5E56",
-".. c #1F1F1F",
-" ",
-" ",
-" ",
-". . . . . . . . . . . . . . . + + + . ",
-". @ @ @ @ @ @ @ @ @ @ @ @ @ # $ % & + * ",
-". @ . = . . = = = = = = = - ; > , ' ) * ",
-". @ . . . . . = = = = = ! ~ { ] ^ / + * ",
-". @ = = = = = = = = = ( _ : < [ } | . * ",
-". @ = = = = = = = 1 2 3 4 5 6 7 ( = . * ",
-". @ = = = = = = 8 9 0 a b c d e = = . * ",
-". @ = = = = = = f g h i j k l = = = . * ",
-". @ = = = = = = m n o p q r s = = = . * ",
-". @ = = = = = t u v w x y z = = = = . * ",
-". @ @ @ @ @ A B C D E F G = = = = = . * ",
-". @ * @ = H I J K L M = = = = = = = . * ",
-". @ * * N O P Q R S = = = = = = = = . * ",
-". @ * @ T U V W X Y = = = = = = = = . * ",
-". . . . . Z ` .+ . . . . . . . . . . * ",
-" * * * * * . ..* * * * * * * * * * * * ",
-" ",
-" "};
+++ /dev/null
-/* XPM */
-static char *selector_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"21 21 3 1",
-" c Gray0",
-". c #b3cece",
-"X c None",
-/* pixels */
-"XXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXX",
-"XXXXXX XXXXXXXXXXXXXX",
-"XXXXXX XXXXXXXXXXXXX",
-"XXXXXX XXXXXXXXXXXX",
-"XXXXXX XXXXXXXXXXX",
-"XXXXXX XXXXXXXXXX",
-"XXXXXX XXXXXXXXX",
-"XXXXXX XXXXXXXX",
-"XXXXXX XXXXXXX",
-"XXXXXX XXXXXX",
-"XXXXXX XXXXXXXXX",
-"XXXXXX X XXXXXXXXX",
-"XXXXXX XXX XXXXXXXX",
-"XXXXXXXXXX XXXXXXXX",
-"XXXXXXXXXXX XXXXXXX",
-"XXXXXXXXXXXX XXXXXXX",
-"XXXXXXXXXXXX XXXXXX",
-"XXXXXXXXXXXXX XXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXX"
-};
+++ /dev/null
-/* XPM */
-static char * element_xpm[] = {
-"21 21 5 1",
-" c None",
-". c #7B7B7B",
-"+ c #D6D6D6",
-"@ c #000000",
-"# c #FFFFFF",
-" ",
-" ",
-" ",
-"................... ",
-".+++++++++++++++++.@ ",
-".+.#..############.@ ",
-".+.....###########.@ ",
-".+################.@ ",
-".+################.@ ",
-".+################.@ ",
-".+################.@ ",
-".+################.@ ",
-".+################.@ ",
-".+++++++++########.@ ",
-".+@+#+@@.+########.@ ",
-".+@@.+@@.+########.@ ",
-".+@+#+@@.+########.@ ",
-"...................@ ",
-" @@@@@@@@@@@@@@@@@@@ ",
-" ",
-" "};
+++ /dev/null
-/* XPM */
-static char * thread_xpm[] = {
-"21 21 86 1",
-" c None",
-". c #7B7B7B",
-"+ c #D6D6D6",
-"@ c #FFFFFF",
-"# c #CFCFCF",
-"$ c #919195",
-"% c #929195",
-"& c #B2B2B3",
-"* c #E7E7E7",
-"= c #000000",
-"- c #D8D8D9",
-"; c #3A3941",
-"> c #D0CDDC",
-", c #C9C6D7",
-"' c #AFACBD",
-") c #898694",
-"! c #BAB9BC",
-"~ c #6D6D70",
-"{ c #44414F",
-"] c #A7A4B4",
-"^ c #C5C2D4",
-"/ c #BEBACE",
-"( c #B6B2C8",
-"_ c #8D899B",
-": c #EFEFEF",
-"< c #706E7C",
-"[ c #787485",
-"} c #6A6777",
-"| c #898696",
-"1 c #AFABC1",
-"2 c #A8A3BC",
-"3 c #89888E",
-"4 c #B7B6B7",
-"5 c #8E899F",
-"6 c #BFBCCF",
-"7 c #8F8C99",
-"8 c #565363",
-"9 c #464350",
-"0 c #595765",
-"a c #504D5A",
-"b c #B8B8B9",
-"c c #838288",
-"d c #A7A2BA",
-"e c #C8C4D6",
-"f c #9692A7",
-"g c #585465",
-"h c #2D2B35",
-"i c #2D2C31",
-"j c #5F5C69",
-"k c #AEAAC1",
-"l c #C7C4D6",
-"m c #B9B5CA",
-"n c #948FA7",
-"o c #5D596C",
-"p c #4E4B5C",
-"q c #9E9D9F",
-"r c #A7A6A9",
-"s c #9F9BAF",
-"t c #BBB7CC",
-"u c #A8A4BB",
-"v c #5D5A6A",
-"w c #575466",
-"x c #39383E",
-"y c #B9B9B9",
-"z c #A7A6AA",
-"A c #7D7A8C",
-"B c #9691AA",
-"C c #6E6980",
-"D c #383643",
-"E c #8C8C8D",
-"F c #F5F5F5",
-"G c #CCCCCD",
-"H c #3D3C41",
-"I c #67656D",
-"J c #908F91",
-"K c #838189",
-"L c #4A4853",
-"M c #706F76",
-"N c #44414D",
-"O c #18171B",
-"P c #4A4851",
-"Q c #5D5B68",
-"R c #3A393D",
-"S c #D7D7D8",
-"T c #828282",
-"U c #D3D3D3",
-" ",
-" ",
-" ",
-"................... ",
-".++++++++++@#$%&*@+= ",
-".+.@..@@@@@-;>,')!@= ",
-".+.....@@@@~{]^/(_#= ",
-".+@@@@@@@@:<[}|(123= ",
-".+@@@@@@@@4567890ab= ",
-".+@@@@@@@@cdeefghi:= ",
-".+@@@@@@@@jklmnopq+= ",
-".+@@@@@@@@rstuvwx:y= ",
-".+@@@@@@@@@zABCDEFy= ",
-".+++++++++@G9HIJFF.= ",
-".+=+@+==.+-KLFFFF@.= ",
-".+==.+==.+MNOFF@@@.= ",
-".+=+@+==.+PQRF@@@@.= ",
-".........+STUy.....= ",
-" =================== ",
-" ",
-" "};