Switched to use libgnomecanvas (not the C++ one).
authorTaybin Rutkin <taybin@taybin.com>
Sun, 25 Sep 2005 22:26:56 +0000 (22:26 +0000)
committerTaybin Rutkin <taybin@taybin.com>
Sun, 25 Sep 2005 22:26:56 +0000 (22:26 +0000)
git-svn-id: svn://localhost/trunk/ardour2@30 d708f5d6-7413-0410-9779-e7cbd77b26cf

90 files changed:
gtk2_ardour/SConscript
gtk2_ardour/about.h
gtk2_ardour/ardour_ui.h
gtk2_ardour/audio_time_axis.cc
gtk2_ardour/audio_time_axis.h
gtk2_ardour/automation_gain_line.cc
gtk2_ardour/automation_gain_line.h
gtk2_ardour/automation_line.cc
gtk2_ardour/automation_line.h
gtk2_ardour/automation_pan_line.cc
gtk2_ardour/automation_pan_line.h
gtk2_ardour/automation_time_axis.cc
gtk2_ardour/automation_time_axis.h
gtk2_ardour/canvas-curve.h
gtk2_ardour/canvas-imageframe.c
gtk2_ardour/canvas-imageframe.h
gtk2_ardour/canvas-ruler.c
gtk2_ardour/canvas-ruler.h
gtk2_ardour/canvas-simpleline.c
gtk2_ardour/canvas-simpleline.h
gtk2_ardour/canvas-simplerect.c
gtk2_ardour/canvas-simplerect.h
gtk2_ardour/canvas-waveview.c
gtk2_ardour/canvas-waveview.h
gtk2_ardour/crossfade_edit.cc
gtk2_ardour/crossfade_edit.h
gtk2_ardour/crossfade_view.cc
gtk2_ardour/crossfade_view.h
gtk2_ardour/editor.cc
gtk2_ardour/editor.h
gtk2_ardour/editor_canvas_events.cc
gtk2_ardour/editor_cursors.cc
gtk2_ardour/editor_imageframe.cc
gtk2_ardour/editor_keyboard.cc
gtk2_ardour/editor_markers.cc
gtk2_ardour/editor_mixer.cc
gtk2_ardour/editor_mouse.cc
gtk2_ardour/editor_ops.cc
gtk2_ardour/editor_route_list.cc
gtk2_ardour/editor_rulers.cc
gtk2_ardour/editor_tempodisplay.cc
gtk2_ardour/enums.h
gtk2_ardour/extra_bind.h
gtk2_ardour/gain_automation_time_axis.cc
gtk2_ardour/gain_automation_time_axis.h
gtk2_ardour/gain_meter.h
gtk2_ardour/ghostregion.cc
gtk2_ardour/ghostregion.h
gtk2_ardour/gtk-custom-hruler.c
gtk2_ardour/gtk-custom-ruler.c
gtk2_ardour/gtkscrolledwindow.c
gtk2_ardour/imageframe_time_axis.cc
gtk2_ardour/imageframe_time_axis.h
gtk2_ardour/imageframe_time_axis_group.cc
gtk2_ardour/imageframe_time_axis_group.h
gtk2_ardour/imageframe_time_axis_view.cc
gtk2_ardour/imageframe_time_axis_view.h
gtk2_ardour/imageframe_view.cc
gtk2_ardour/imageframe_view.h
gtk2_ardour/marker.cc
gtk2_ardour/marker.h
gtk2_ardour/marker_time_axis.cc
gtk2_ardour/marker_time_axis.h
gtk2_ardour/marker_time_axis_view.cc
gtk2_ardour/marker_time_axis_view.h
gtk2_ardour/marker_view.cc
gtk2_ardour/marker_view.h
gtk2_ardour/pan_automation_time_axis.cc
gtk2_ardour/pan_automation_time_axis.h
gtk2_ardour/public_editor.cc
gtk2_ardour/public_editor.h
gtk2_ardour/redirect_automation_line.cc
gtk2_ardour/redirect_automation_line.h
gtk2_ardour/redirect_automation_time_axis.cc
gtk2_ardour/redirect_automation_time_axis.h
gtk2_ardour/region_editor.h
gtk2_ardour/region_gain_line.cc
gtk2_ardour/region_gain_line.h
gtk2_ardour/regionview.cc
gtk2_ardour/regionview.h
gtk2_ardour/rgb_macros.h
gtk2_ardour/streamview.cc
gtk2_ardour/streamview.h
gtk2_ardour/time_axis_view.cc
gtk2_ardour/time_axis_view.h
gtk2_ardour/time_axis_view_item.cc
gtk2_ardour/time_axis_view_item.h
gtk2_ardour/utils.cc
gtk2_ardour/utils.h
gtk2_ardour/visual_time_axis.h

index 4db1d122edaba52d3234e8a81ecae848c48c2d8f..04213f43369aeaadd801f9e23f701d950bd1c3e1 100644 (file)
@@ -25,7 +25,7 @@ gtkardour.Merge ( [libraries['ardour'],
                    libraries['pbd3'],
                    libraries['gtkmm2'],
                    libraries['sigc2'],
                    libraries['pbd3'],
                    libraries['gtkmm2'],
                    libraries['sigc2'],
-                   libraries['libgnomecanvasmm'],
+#                   libraries['libgnomecanvasmm'],
                    libraries['sysmidi'],
                    libraries['sndfile'],
                    libraries['lrdf'],
                    libraries['sysmidi'],
                    libraries['sndfile'],
                    libraries['lrdf'],
@@ -125,7 +125,7 @@ ardour_ui.cc
 ardour_ui2.cc
 ardour_ui_dialogs.cc
 audio_time_axis.cc
 ardour_ui2.cc
 ardour_ui_dialogs.cc
 audio_time_axis.cc
-automation_line.c
+automation_line.cc
 canvas-imageframe.cc
 about.cc
 editor.cc
 canvas-imageframe.cc
 about.cc
 editor.cc
index afe6f28cd85b369cba4ed4342d3b1cfa211e422e..9d178230f925411d7450a67ae86c8b46c4d7653d 100644 (file)
@@ -23,7 +23,7 @@
 
 #include <gtkmm/window.h>
 #include <gtkmm/pixmap.h>
 
 #include <gtkmm/window.h>
 #include <gtkmm/pixmap.h>
-#include <gtk-canvas.h>
+#include <libgnomecanvas/libgnomecanvas.h>
 
 class ARDOUR_UI;
 
 
 class ARDOUR_UI;
 
index dd5b60173952edbace6597c8e834b95330635514..5077fe9940cc2a858bdfe88bb985c666c96e0aaf 100644 (file)
 
 #include <cmath>
 
 
 #include <cmath>
 
-#include <gtk-canvas.h>
-
 #include <pbd/xml++.h>
 #include <gtkmm2ext/gtk_ui.h>
 #include <gtkmm2ext/pix.h>
 #include <pbd/xml++.h>
 #include <gtkmm2ext/gtk_ui.h>
 #include <gtkmm2ext/pix.h>
-#include <gtkmm2ext/spinner.h>
-#include <gtkmm2ext/pixmap_button.h>
-#include <gtkmm2ext/popup_selector.h>
 #include <gtkmm2ext/click_box.h>
 #include <gtkmm2ext/selector.h>
 #include <ardour/ardour.h>
 #include <gtkmm2ext/click_box.h>
 #include <gtkmm2ext/selector.h>
 #include <ardour/ardour.h>
index 205f3bcabcfe4b733cc1cc56150646071655788c..d14c9a8cf0927a68415adf470efca93cf04b4d20 100644 (file)
@@ -486,8 +486,8 @@ AudioTimeAxisView::show_timestretch (jack_nframes_t start, jack_nframes_t end)
 #endif
 
        if (timestretch_rect == 0) {
 #endif
 
        if (timestretch_rect == 0) {
-               timestretch_rect = gtk_canvas_item_new (GTK_CANVAS_GROUP(canvas_display),
-                                                       gtk_canvas_simplerect_get_type(),
+               timestretch_rect = gnome_canvas_item_new (GNOME_CANVAS_GROUP(canvas_display),
+                                                       gnome_canvas_simplerect_get_type(),
                                                        "x1", 0.0,
                                                        "y1", 0.0,
                                                        "x2", 0.0,
                                                        "x1", 0.0,
                                                        "y1", 0.0,
                                                        "x2", 0.0,
@@ -497,8 +497,8 @@ AudioTimeAxisView::show_timestretch (jack_nframes_t start, jack_nframes_t end)
                                                        NULL);
        }
 
                                                        NULL);
        }
 
-       gtk_canvas_item_show (timestretch_rect);
-       gtk_canvas_item_raise_to_top (timestretch_rect);
+       gnome_canvas_item_show (timestretch_rect);
+       gnome_canvas_item_raise_to_top (timestretch_rect);
        
        x1 = start / editor.get_current_zoom();
        x2 = (end - 1) / editor.get_current_zoom();
        
        x1 = start / editor.get_current_zoom();
        x2 = (end - 1) / editor.get_current_zoom();
@@ -518,7 +518,7 @@ AudioTimeAxisView::hide_timestretch ()
        TimeAxisView::hide_timestretch ();
 
        if (timestretch_rect) {
        TimeAxisView::hide_timestretch ();
 
        if (timestretch_rect) {
-               gtk_canvas_item_hide (timestretch_rect);
+               gnome_canvas_item_hide (timestretch_rect);
        }
 }
 
        }
 }
 
@@ -1312,7 +1312,7 @@ AudioTimeAxisView::toggle_gain_track ()
        if (showit != gain_track->marked_for_display()) {
                if (showit) {
                        gain_track->set_marked_for_display (true);
        if (showit != gain_track->marked_for_display()) {
                if (showit) {
                        gain_track->set_marked_for_display (true);
-                       gtk_canvas_item_show (gain_track->canvas_display);
+                       gnome_canvas_item_show (gain_track->canvas_display);
                        gain_track->get_state_node()->add_property ("shown", X_("yes"));
                } else {
                        gain_track->set_marked_for_display (false);
                        gain_track->get_state_node()->add_property ("shown", X_("yes"));
                } else {
                        gain_track->set_marked_for_display (false);
@@ -1348,7 +1348,7 @@ AudioTimeAxisView::toggle_pan_track ()
        if (showit != pan_track->marked_for_display()) {
                if (showit) {
                        pan_track->set_marked_for_display (true);
        if (showit != pan_track->marked_for_display()) {
                if (showit) {
                        pan_track->set_marked_for_display (true);
-                       gtk_canvas_item_show (pan_track->canvas_display);
+                       gnome_canvas_item_show (pan_track->canvas_display);
                        pan_track->get_state_node()->add_property ("shown", X_("yes"));
                } else {
                        pan_track->set_marked_for_display (false);
                        pan_track->get_state_node()->add_property ("shown", X_("yes"));
                } else {
                        pan_track->set_marked_for_display (false);
@@ -1623,7 +1623,7 @@ AudioTimeAxisView::redirect_menu_item_toggled (AudioTimeAxisView::RedirectAutoma
 
                if (showit) {
                        ran->view->set_marked_for_display (true);
 
                if (showit) {
                        ran->view->set_marked_for_display (true);
-                       gtk_canvas_item_show (ran->view->canvas_display);
+                       gnome_canvas_item_show (ran->view->canvas_display);
                } else {
                        rai->redirect->mark_automation_visible (ran->what, true);
                        ran->view->set_marked_for_display (false);
                } else {
                        rai->redirect->mark_automation_visible (ran->what, true);
                        ran->view->set_marked_for_display (false);
index 780469ccb922037657ae5d265c79531269740033..4515e0f4a24ccf8c6aa2adc988fd841e4e86a1b1 100644 (file)
@@ -22,7 +22,7 @@
 #define __ardour_trackview_h__
 
 #include <gtkmm.h>
 #define __ardour_trackview_h__
 
 #include <gtkmm.h>
-#include <gtk-canvas.h>
+#include <libgnomecanvas/libgnomecanvas.h>
 #include <gtkmm2ext/selector.h>
 #include <gtkmm2ext/popup_selector.h>
 #include <list>
 #include <gtkmm2ext/selector.h>
 #include <gtkmm2ext/popup_selector.h>
 #include <list>
@@ -299,7 +299,7 @@ class AudioTimeAxisView : public RouteUI, public TimeAxisView
        void add_redirect_automation_curve (ARDOUR::Redirect*, uint32_t);
        void add_existing_redirect_automation_curves (ARDOUR::Redirect*);
 
        void add_redirect_automation_curve (ARDOUR::Redirect*, uint32_t);
        void add_existing_redirect_automation_curves (ARDOUR::Redirect*);
 
-       GtkCanvasItem *timestretch_rect;
+       GnomeCanvasItem *timestretch_rect;
 
        void timestretch (jack_nframes_t start, jack_nframes_t end);
 
 
        void timestretch (jack_nframes_t start, jack_nframes_t end);
 
index 15da1a2a8404efc125cc2a9374b56531fbdb6a5a..65fc7b2cba118962bb407df4ff787c4afaf84c73 100644 (file)
 using namespace std;
 using namespace ARDOUR;
 
 using namespace std;
 using namespace ARDOUR;
 
-AutomationGainLine::AutomationGainLine (string name, Session& s, TimeAxisView& tv, GtkCanvasItem* parent,
+AutomationGainLine::AutomationGainLine (string name, Session& s, TimeAxisView& tv, GnomeCanvasItem* parent,
                                        Curve& c, 
                                        Curve& c, 
-                                       gint (*point_callback)(GtkCanvasItem*, GdkEvent*, gpointer),
-                                       gint (*line_callback)(GtkCanvasItem*, GdkEvent*, gpointer))
+                                       gint (*point_callback)(GnomeCanvasItem*, GdkEvent*, gpointer),
+                                       gint (*line_callback)(GnomeCanvasItem*, GdkEvent*, gpointer))
        : AutomationLine (name, tv, parent, c, point_callback, line_callback),
          session (s)
 {
        : AutomationLine (name, tv, parent, c, point_callback, line_callback),
          session (s)
 {
index 7d697f0966681b8ceadc1f47b355436bcda1d00e..1fb50f07d6777322d08fd09a7d3550deb9f3bbb2 100644 (file)
@@ -2,7 +2,7 @@
 #define __ardour_gtk_automation_gain_line_h__
 
 #include <ardour/ardour.h>
 #define __ardour_gtk_automation_gain_line_h__
 
 #include <ardour/ardour.h>
-#include <gtk-canvas.h>
+#include <libgnomecanvas/libgnomecanvas.h>
 #include <gtkmm.h>
 
 #include "automation_line.h"
 #include <gtkmm.h>
 
 #include "automation_line.h"
@@ -17,10 +17,10 @@ class TimeAxisView;
 class AutomationGainLine : public AutomationLine
 {
   public:
 class AutomationGainLine : public AutomationLine
 {
   public:
-       AutomationGainLine (string name, ARDOUR::Session&, TimeAxisView&, GtkCanvasItem* parent,
+       AutomationGainLine (string name, ARDOUR::Session&, TimeAxisView&, GnomeCanvasItem* parent,
                            ARDOUR::Curve&, 
                            ARDOUR::Curve&, 
-                           gint (*point_callback)(GtkCanvasItem*, GdkEvent*, gpointer),
-                           gint (*line_callback)(GtkCanvasItem*, GdkEvent*, gpointer));
+                           gint (*point_callback)(GnomeCanvasItem*, GdkEvent*, gpointer),
+                           gint (*line_callback)(GnomeCanvasItem*, GdkEvent*, gpointer));
        
        void view_to_model_y (double&);
        void model_to_view_y (double&);
        
        void view_to_model_y (double&);
        void model_to_view_y (double&);
index b2f63655fcd58ccdcb7d18db0337b866f1f84370..f6031f1eaa7025e9c02304b86cbb5f6a15083282 100644 (file)
@@ -49,7 +49,7 @@ using namespace std;
 using namespace ARDOUR;
 using namespace Editing;
 
 using namespace ARDOUR;
 using namespace Editing;
 
-ControlPoint::ControlPoint (AutomationLine& al, gint (*event_handler)(GtkCanvasItem*, GdkEvent*, gpointer))
+ControlPoint::ControlPoint (AutomationLine& al, gint (*event_handler)(GnomeCanvasItem*, GdkEvent*, gpointer))
        : line (al)
 {
        model = al.the_list().end();
        : line (al)
 {
        model = al.the_list().end();
@@ -61,8 +61,8 @@ ControlPoint::ControlPoint (AutomationLine& al, gint (*event_handler)(GtkCanvasI
        _size = 4.0;
        selected = false;
 
        _size = 4.0;
        selected = false;
 
-       item = gtk_canvas_item_new (line.canvas_group(),
-                                   gtk_canvas_simplerect_get_type(),
+       item = gnome_canvas_item_new (line.canvas_group(),
+                                   gnome_canvas_simplerect_get_type(),
                                    "draw", (gboolean) TRUE,
                                    "fill", (gboolean) FALSE,
                                    "fill_color_rgba", color_map[cControlPointFill],
                                    "draw", (gboolean) TRUE,
                                    "fill", (gboolean) FALSE,
                                    "fill_color_rgba", color_map[cControlPointFill],
@@ -93,8 +93,8 @@ ControlPoint::ControlPoint (const ControlPoint& other, bool dummy_arg_to_force_s
        _size = other._size;
        selected = false;
 
        _size = other._size;
        selected = false;
 
-       item = gtk_canvas_item_new (line.canvas_group(),
-                                   gtk_canvas_simplerect_get_type(),
+       item = gnome_canvas_item_new (line.canvas_group(),
+                                   gnome_canvas_simplerect_get_type(),
                                    "fill", (gboolean) FALSE,
                                    "outline_color_rgba", color_map[cEnteredControlPointOutline],
                                    "outline_pixels", (gint) 1,
                                    "fill", (gboolean) FALSE,
                                    "outline_color_rgba", color_map[cEnteredControlPointOutline],
                                    "outline_pixels", (gint) 1,
@@ -114,19 +114,19 @@ ControlPoint::~ControlPoint ()
 void
 ControlPoint::hide ()
 {
 void
 ControlPoint::hide ()
 {
-       gtk_canvas_item_hide (item);
+       gnome_canvas_item_hide (item);
 }
 
 void
 ControlPoint::show()
 {
 }
 
 void
 ControlPoint::show()
 {
-       gtk_canvas_item_show (item);
+       gnome_canvas_item_show (item);
 }
 
 void
 ControlPoint::set_visible (bool yn)
 {
 }
 
 void
 ControlPoint::set_visible (bool yn)
 {
-       gtk_canvas_item_set (item, "draw", (gboolean) yn, NULL);
+       gnome_canvas_item_set (item, "draw", (gboolean) yn, NULL);
 }
 
 void
 }
 
 void
@@ -142,10 +142,10 @@ ControlPoint::show_color (bool entered, bool hide_too)
 {
        if (entered) {
                if (selected) {
 {
        if (entered) {
                if (selected) {
-                       gtk_canvas_item_set (item, "outline_color_rgba", color_map[cEnteredControlPointSelected], NULL);
+                       gnome_canvas_item_set (item, "outline_color_rgba", color_map[cEnteredControlPointSelected], NULL);
                        set_visible(true);
                } else {
                        set_visible(true);
                } else {
-                       gtk_canvas_item_set (item, "outline_color_rgba", color_map[cEnteredControlPoint], NULL);
+                       gnome_canvas_item_set (item, "outline_color_rgba", color_map[cEnteredControlPoint], NULL);
                        if (hide_too) {
                                set_visible(false);
                        }
                        if (hide_too) {
                                set_visible(false);
                        }
@@ -153,10 +153,10 @@ ControlPoint::show_color (bool entered, bool hide_too)
 
        } else {
                if (selected) {
 
        } else {
                if (selected) {
-                       gtk_canvas_item_set (item, "outline_color_rgba", color_map[cControlPointSelected], NULL);
+                       gnome_canvas_item_set (item, "outline_color_rgba", color_map[cControlPointSelected], NULL);
                        set_visible(true);
                } else {
                        set_visible(true);
                } else {
-                       gtk_canvas_item_set (item, "outline_color_rgba", color_map[cControlPoint], NULL);
+                       gnome_canvas_item_set (item, "outline_color_rgba", color_map[cControlPoint], NULL);
                        if (hide_too) {
                                set_visible(false);
                        }
                        if (hide_too) {
                                set_visible(false);
                        }
@@ -171,11 +171,11 @@ ControlPoint::set_size (double sz)
 
 #if 0  
        if (_size > 6.0) {
 
 #if 0  
        if (_size > 6.0) {
-               gtk_canvas_item_set (item, 
+               gnome_canvas_item_set (item, 
                                     "fill", (gboolean) TRUE,
                                     NULL);
        } else {
                                     "fill", (gboolean) TRUE,
                                     NULL);
        } else {
-               gtk_canvas_item_set (item, 
+               gnome_canvas_item_set (item, 
                                     "fill", (gboolean) FALSE,
                                     NULL);
        }
                                     "fill", (gboolean) FALSE,
                                     NULL);
        }
@@ -206,7 +206,7 @@ ControlPoint::move_to (double x, double y, ShapeType shape)
                break;
        }
 
                break;
        }
 
-       gtk_canvas_item_set (item, 
+       gnome_canvas_item_set (item, 
                             "x1", x1,
                             "x2", x2,
                             "y1", y - half_size,
                             "x1", x1,
                             "x2", x2,
                             "y1", y - half_size,
@@ -220,9 +220,9 @@ ControlPoint::move_to (double x, double y, ShapeType shape)
 
 /*****/
 
 
 /*****/
 
-AutomationLine::AutomationLine (string name, TimeAxisView& tv, GtkCanvasItem* parent, AutomationList& al,
-                               gint (*point_handler)(GtkCanvasItem*, GdkEvent*, gpointer),
-                               gint (*line_handler)(GtkCanvasItem*, GdkEvent*, gpointer))
+AutomationLine::AutomationLine (string name, TimeAxisView& tv, GnomeCanvasItem* parent, AutomationList& al,
+                               gint (*point_handler)(GnomeCanvasItem*, GdkEvent*, gpointer),
+                               gint (*line_handler)(GnomeCanvasItem*, GdkEvent*, gpointer))
        : trackview (tv),
          _name (name),
          alist (al)
        : trackview (tv),
          _name (name),
          alist (al)
@@ -238,14 +238,14 @@ AutomationLine::AutomationLine (string name, TimeAxisView& tv, GtkCanvasItem* pa
        terminal_points_can_slide = true;
        _height = 0;
 
        terminal_points_can_slide = true;
        _height = 0;
 
-       group = gtk_canvas_item_new (GTK_CANVAS_GROUP(parent),
-                                    gtk_canvas_group_get_type(),
+       group = gnome_canvas_item_new (GNOME_CANVAS_GROUP(parent),
+                                    gnome_canvas_group_get_type(),
                                     "x", 0.0,
                                     "y", 0.0,
                                     NULL);
 
                                     "x", 0.0,
                                     "y", 0.0,
                                     NULL);
 
-       line = gtk_canvas_item_new (GTK_CANVAS_GROUP(group),
-                                        gtk_canvas_line_get_type(),
+       line = gnome_canvas_item_new (GNOME_CANVAS_GROUP(group),
+                                        gnome_canvas_line_get_type(),
                                         "width_pixels", (guint) 1,
                                         NULL);
 
                                         "width_pixels", (guint) 1,
                                         NULL);
 
@@ -260,7 +260,7 @@ AutomationLine::AutomationLine (string name, TimeAxisView& tv, GtkCanvasItem* pa
 AutomationLine::~AutomationLine ()
 {
        if (point_coords) {
 AutomationLine::~AutomationLine ()
 {
        if (point_coords) {
-               gtk_canvas_points_unref (point_coords);
+               gnome_canvas_points_unref (point_coords);
        }
 
        vector_delete (&control_points);
        }
 
        vector_delete (&control_points);
@@ -288,7 +288,7 @@ AutomationLine::set_point_size (double sz)
 void
 AutomationLine::show () 
 {
 void
 AutomationLine::show () 
 {
-       gtk_canvas_item_show (line);
+       gnome_canvas_item_show (line);
 
        if (points_visible) {
                for (vector<ControlPoint*>::iterator i = control_points.begin(); i != control_points.end(); ++i) {
 
        if (points_visible) {
                for (vector<ControlPoint*>::iterator i = control_points.begin(); i != control_points.end(); ++i) {
@@ -302,7 +302,7 @@ AutomationLine::show ()
 void
 AutomationLine::hide () 
 {
 void
 AutomationLine::hide () 
 {
-       gtk_canvas_item_hide (line);
+       gnome_canvas_item_hide (line);
        for (vector<ControlPoint*>::iterator i = control_points.begin(); i != control_points.end(); ++i) {
                (*i)->hide();
        }
        for (vector<ControlPoint*>::iterator i = control_points.begin(); i != control_points.end(); ++i) {
                (*i)->hide();
        }
@@ -331,7 +331,7 @@ void
 AutomationLine::set_line_color (uint32_t color)
 {
        _line_color = color;
 AutomationLine::set_line_color (uint32_t color)
 {
        _line_color = color;
-       gtk_canvas_item_set (line, "fill_color_rgba", color, NULL);
+       gnome_canvas_item_set (line, "fill_color_rgba", color, NULL);
 }
 
 void
 }
 
 void
@@ -486,7 +486,7 @@ AutomationLine::reset_line_coords (ControlPoint& cp)
 void
 AutomationLine::update_line ()
 {
 void
 AutomationLine::update_line ()
 {
-       gtk_canvas_item_set (line, "points", point_coords, NULL);       
+       gnome_canvas_item_set (line, "points", point_coords, NULL);     
 }
 
 void
 }
 
 void
@@ -667,7 +667,7 @@ AutomationLine::sync_model_with_view_point (ControlPoint& cp)
 }
 
 void
 }
 
 void
-AutomationLine::determine_visible_control_points (GtkCanvasPoints* points)
+AutomationLine::determine_visible_control_points (GnomeCanvasPoints* points)
 {
        uint32_t xi, yi, view_index, pi;
        int n;
 {
        uint32_t xi, yi, view_index, pi;
        int n;
@@ -684,7 +684,7 @@ AutomationLine::determine_visible_control_points (GtkCanvasPoints* points)
        for (vector<ControlPoint*>::iterator i = control_points.begin(); i != control_points.end(); ++i) {
                (*i)->hide();
        }
        for (vector<ControlPoint*>::iterator i = control_points.begin(); i != control_points.end(); ++i) {
                (*i)->hide();
        }
-       gtk_canvas_item_hide (line);
+       gnome_canvas_item_hide (line);
 
        if (points == 0 || points->num_points == 0)  {
                return;
 
        if (points == 0 || points->num_points == 0)  {
                return;
@@ -831,7 +831,7 @@ AutomationLine::determine_visible_control_points (GtkCanvasPoints* points)
                
                if (point_coords) {
                        if (point_coords->num_points < (int) npoints) {
                
                if (point_coords) {
                        if (point_coords->num_points < (int) npoints) {
-                               gtk_canvas_points_unref (point_coords);
+                               gnome_canvas_points_unref (point_coords);
                                point_coords = get_canvas_points ("autoline", npoints);
                        } else {
                                point_coords->num_points = npoints;
                                point_coords = get_canvas_points ("autoline", npoints);
                        } else {
                                point_coords->num_points = npoints;
@@ -850,10 +850,10 @@ AutomationLine::determine_visible_control_points (GtkCanvasPoints* points)
                }
 
                // cerr << "set al2 points, nc = " << point_coords->num_points << endl;
                }
 
                // cerr << "set al2 points, nc = " << point_coords->num_points << endl;
-               gtk_canvas_item_set (line, "points", point_coords, NULL);
+               gnome_canvas_item_set (line, "points", point_coords, NULL);
 
                if (_visible) {
 
                if (_visible) {
-                       gtk_canvas_item_show (line);
+                       gnome_canvas_item_show (line);
                }
        } 
 
                }
        } 
 
@@ -879,13 +879,13 @@ AutomationLine::get_verbose_cursor_string (float fraction)
 }
 
 bool
 }
 
 bool
-AutomationLine::invalid_point (GtkCanvasPoints* p, uint32_t index)
+AutomationLine::invalid_point (GnomeCanvasPoints* p, uint32_t index)
 {
        return p->coords[index*2] == max_frames && p->coords[(index*2)+1] == DBL_MAX;
 }
 
 void
 {
        return p->coords[index*2] == max_frames && p->coords[(index*2)+1] == DBL_MAX;
 }
 
 void
-AutomationLine::invalidate_point (GtkCanvasPoints* p, uint32_t index)
+AutomationLine::invalidate_point (GnomeCanvasPoints* p, uint32_t index)
 {
        p->coords[index*2] = max_frames;
        p->coords[(index*2)+1] = DBL_MAX;
 {
        p->coords[index*2] = max_frames;
        p->coords[(index*2)+1] = DBL_MAX;
@@ -1201,7 +1201,7 @@ AutomationLine::list_changed (Change ignored)
 void
 AutomationLine::reset_callback (const AutomationList& events)
 {
 void
 AutomationLine::reset_callback (const AutomationList& events)
 {
-       GtkCanvasPoints *tmp_points;
+       GnomeCanvasPoints *tmp_points;
        uint32_t npoints = events.size();
 
        if (npoints == 0) {
        uint32_t npoints = events.size();
 
        if (npoints == 0) {
@@ -1209,7 +1209,7 @@ AutomationLine::reset_callback (const AutomationList& events)
                        delete *i;
                }
                control_points.clear ();
                        delete *i;
                }
                control_points.clear ();
-               gtk_canvas_item_hide (line);
+               gnome_canvas_item_hide (line);
                return;
        }
 
                return;
        }
 
@@ -1231,7 +1231,7 @@ AutomationLine::reset_callback (const AutomationList& events)
        tmp_points->num_points = npoints;
 
        determine_visible_control_points (tmp_points);
        tmp_points->num_points = npoints;
 
        determine_visible_control_points (tmp_points);
-       gtk_canvas_points_unref (tmp_points);
+       gnome_canvas_points_unref (tmp_points);
 }
 
 void
 }
 
 void
index 48658b2ecb492b8121d7f5ba53ebd1071fc4c3b5..7984381fde752991b8b12b4882237e805da64b9d 100644 (file)
@@ -27,7 +27,7 @@
 #include <sys/types.h>
 
 #include <gtkmm.h>
 #include <sys/types.h>
 
 #include <gtkmm.h>
-#include <gtk-canvas.h>
+#include <libgnomecanvas/libgnomecanvas.h>
 #include <sigc++/signal.h>
 
 #include <pbd/undo.h>
 #include <sigc++/signal.h>
 
 #include <pbd/undo.h>
@@ -48,7 +48,7 @@ class Selection;
 class ControlPoint 
 {
   public:
 class ControlPoint 
 {
   public:
-       ControlPoint (AutomationLine& al, gint (*event_handler)(GtkCanvasItem*, GdkEvent*, gpointer));
+       ControlPoint (AutomationLine& al, gint (*event_handler)(GnomeCanvasItem*, GdkEvent*, gpointer));
        ControlPoint (const ControlPoint&, bool dummy_arg_to_force_special_copy_constructor);
        ~ControlPoint ();
 
        ControlPoint (const ControlPoint&, bool dummy_arg_to_force_special_copy_constructor);
        ~ControlPoint ();
 
@@ -70,7 +70,7 @@ class ControlPoint
        void set_size (double);
        void set_visible (bool);
 
        void set_size (double);
        void set_visible (bool);
 
-       GtkCanvasItem* item;
+       GnomeCanvasItem* item;
        AutomationLine& line;
        uint32_t view_index;
        ARDOUR::AutomationList::iterator model;
        AutomationLine& line;
        uint32_t view_index;
        ARDOUR::AutomationList::iterator model;
@@ -87,9 +87,9 @@ class ControlPoint
 class AutomationLine : public sigc::trackable
 {
   public:
 class AutomationLine : public sigc::trackable
 {
   public:
-       AutomationLine (string name, TimeAxisView&, GtkCanvasItem *, ARDOUR::AutomationList&,
-                       gint (*point_event_handler)(GtkCanvasItem*, GdkEvent*, gpointer),
-                       gint (*line_event_handler)(GtkCanvasItem*, GdkEvent*, gpointer));
+       AutomationLine (string name, TimeAxisView&, GnomeCanvasItem *, ARDOUR::AutomationList&,
+                       gint (*point_event_handler)(GnomeCanvasItem*, GdkEvent*, gpointer),
+                       gint (*line_event_handler)(GnomeCanvasItem*, GdkEvent*, gpointer));
 
        virtual ~AutomationLine ();
 
 
        virtual ~AutomationLine ();
 
@@ -130,17 +130,17 @@ class AutomationLine : public sigc::trackable
 
        TimeAxisView& trackview;
 
 
        TimeAxisView& trackview;
 
-       GtkCanvasGroup* canvas_group() const { return GTK_CANVAS_GROUP(group); }
-       GtkCanvasItem*  parent_group() const { return _parent_group; }
-       GtkCanvasItem*  grab_item() const { return line; }
+       GnomeCanvasGroup* canvas_group() const { return GNOME_CANVAS_GROUP(group); }
+       GnomeCanvasItem*  parent_group() const { return _parent_group; }
+       GnomeCanvasItem*  grab_item() const { return line; }
 
        void show_selection();
        void hide_selection ();
 
        void set_point_size (double size);
 
 
        void show_selection();
        void hide_selection ();
 
        void set_point_size (double size);
 
-       static void invalidate_point (GtkCanvasPoints*, uint32_t index);
-       static bool invalid_point (GtkCanvasPoints*, uint32_t index);
+       static void invalidate_point (GnomeCanvasPoints*, uint32_t index);
+       static bool invalid_point (GnomeCanvasPoints*, uint32_t index);
        
        virtual string  get_verbose_cursor_string (float);
        virtual void view_to_model_y (double&) = 0;
        
        virtual string  get_verbose_cursor_string (float);
        virtual void view_to_model_y (double&) = 0;
@@ -167,15 +167,15 @@ class AutomationLine : public sigc::trackable
        bool    no_draw : 1;
        bool    points_visible : 1;
        
        bool    no_draw : 1;
        bool    points_visible : 1;
        
-       GtkCanvasItem*  _parent_group;
-       GtkCanvasItem*   group;
-       GtkCanvasItem*   line; /* line */
-       GtkCanvasPoints* point_coords; /* coordinates for canvas line */
+       GnomeCanvasItem*  _parent_group;
+       GnomeCanvasItem*   group;
+       GnomeCanvasItem*   line; /* line */
+       GnomeCanvasPoints* point_coords; /* coordinates for canvas line */
        vector<ControlPoint*> control_points; /* visible control points */
 
        vector<ControlPoint*> control_points; /* visible control points */
 
-       gint   (*point_callback)(GtkCanvasItem*, GdkEvent*, gpointer);
+       gint   (*point_callback)(GnomeCanvasItem*, GdkEvent*, gpointer);
 
 
-       void determine_visible_control_points (GtkCanvasPoints*);
+       void determine_visible_control_points (GnomeCanvasPoints*);
        void sync_model_from (ControlPoint&);
        void sync_model_with_view_point (ControlPoint&);
        void sync_model_with_view_line (uint32_t, uint32_t);
        void sync_model_from (ControlPoint&);
        void sync_model_with_view_point (ControlPoint&);
        void sync_model_with_view_line (uint32_t, uint32_t);
index d027544f73c262b7eb80bf5363511a7709733754..d471e6d6aa7b711b284884c52bab7dd5a0c2ca75 100644 (file)
 
 using namespace ARDOUR;
 
 
 using namespace ARDOUR;
 
-AutomationPanLine::AutomationPanLine (string name, Session& s, TimeAxisView& tv, GtkCanvasItem* parent,
+AutomationPanLine::AutomationPanLine (string name, Session& s, TimeAxisView& tv, GnomeCanvasItem* parent,
                                      Curve& c, 
                                      Curve& c, 
-                                     gint (*point_callback)(GtkCanvasItem*, GdkEvent*, gpointer),
-                                     gint (*line_callback)(GtkCanvasItem*, GdkEvent*, gpointer))
+                                     gint (*point_callback)(GnomeCanvasItem*, GdkEvent*, gpointer),
+                                     gint (*line_callback)(GnomeCanvasItem*, GdkEvent*, gpointer))
        : AutomationLine (name, tv, parent, c, point_callback, line_callback),
          session (s)
 {
        : AutomationLine (name, tv, parent, c, point_callback, line_callback),
          session (s)
 {
index 67ab5d1bec54f2e6f2070e19ed7dfa3041cccd31..2e66ececf1faa6d699521ae3843fab1f605f88a0 100644 (file)
@@ -2,7 +2,7 @@
 #define __ardour_gtk_automation_pan_line_h__
 
 #include <ardour/ardour.h>
 #define __ardour_gtk_automation_pan_line_h__
 
 #include <ardour/ardour.h>
-#include <gtk-canvas.h>
+#include <libgnomecanvas/libgnomecanvas.h>
 #include <gtkmm.h>
 
 #include "automation_line.h"
 #include <gtkmm.h>
 
 #include "automation_line.h"
@@ -16,17 +16,17 @@ class TimeAxisView;
 class AutomationPanLine : public AutomationLine
 {
   public:
 class AutomationPanLine : public AutomationLine
 {
   public:
-       AutomationPanLine (string name, ARDOUR::Session&, TimeAxisView&, GtkCanvasItem* parent,
+       AutomationPanLine (string name, ARDOUR::Session&, TimeAxisView&, GnomeCanvasItem* parent,
                           ARDOUR::Curve&, 
                           ARDOUR::Curve&, 
-                          gint (*point_callback)(GtkCanvasItem*, GdkEvent*, gpointer),
-                          gint (*line_callback)(GtkCanvasItem*, GdkEvent*, gpointer));
+                          gint (*point_callback)(GnomeCanvasItem*, GdkEvent*, gpointer),
+                          gint (*line_callback)(GnomeCanvasItem*, GdkEvent*, gpointer));
        
        void view_to_model_y (double&);
        void model_to_view_y (double&);
 
   private:
        ARDOUR::Session& session;
        
        void view_to_model_y (double&);
        void model_to_view_y (double&);
 
   private:
        ARDOUR::Session& session;
-       vector<GtkCanvasItem*> lines;
+       vector<GnomeCanvasItem*> lines;
 };
 
 
 };
 
 
index b33132133ff6c0b3b438645f4074c391c43c97b4..227fcc4b5f211c86f13ea1ffd5919e84ca18a64d 100644 (file)
@@ -53,8 +53,8 @@ AutomationTimeAxisView::AutomationTimeAxisView (Session& s, Route& r, PublicEdit
        auto_play_item = 0;
        ignore_state_request = false;
 
        auto_play_item = 0;
        ignore_state_request = false;
 
-       base_rect = gtk_canvas_item_new (GTK_CANVAS_GROUP(canvas_display),
-                                        gtk_canvas_simplerect_get_type(),
+       base_rect = gnome_canvas_item_new (GNOME_CANVAS_GROUP(canvas_display),
+                                        gnome_canvas_simplerect_get_type(),
                                         "x1", 0.0,
                                         "y1", 0.0,
                                         "x2", 1000000.0,
                                         "x1", 0.0,
                                         "y1", 0.0,
                                         "x2", 1000000.0,
index a0e8d7e786409f19fa30f9365e22c65e781b4e6c..68f977ba67e4a5587f58d3c4504a43bb68221efa 100644 (file)
@@ -47,7 +47,7 @@ class AutomationTimeAxisView : public TimeAxisView {
        void set_samples_per_unit (double);
        std::string name() const { return _name; }
 
        void set_samples_per_unit (double);
        std::string name() const { return _name; }
 
-       virtual void add_automation_event (GtkCanvasItem *item, GdkEvent *event, jack_nframes_t, double) = 0;
+       virtual void add_automation_event (GnomeCanvasItem *item, GdkEvent *event, jack_nframes_t, double) = 0;
 
        void clear_lines ();
        void add_line (AutomationLine&);
 
        void clear_lines ();
        void add_line (AutomationLine&);
@@ -77,7 +77,7 @@ class AutomationTimeAxisView : public TimeAxisView {
 
   protected:
        ARDOUR::Route& route;
 
   protected:
        ARDOUR::Route& route;
-       GtkCanvasItem* base_rect;
+       GnomeCanvasItem* base_rect;
        string _name;
        string _state_name;
        bool    in_destructor;
        string _name;
        string _state_name;
        bool    in_destructor;
index 4727c3d1d36f741555952833a24c8159d4d6c7b5..fcf1905ac8892af88f6b5613e7caa134a9c35421 100644 (file)
@@ -1,4 +1,4 @@
-/* gtk-canvas-curve.h: GtkCanvas item for constrained spline curves
+/* libgnomecanvas/gnome-canvas-curve.h: GnomeCanvas item for constrained spline curves
  *
  * Copyright (C) 2003 Paul Davis <pbd@op.net>
  *
  *
  * Copyright (C) 2003 Paul Davis <pbd@op.net>
  *
  *
  */
 
  *
  */
 
-#ifndef __GTK_CANVAS_CURVE_H__
-#define __GTK_CANVAS_CURVE_H__
+#ifndef __GNOME_CANVAS_CURVE_H__
+#define __GNOME_CANVAS_CURVE_H__
 
 
-#include <gtk-canvas/gtk-canvas-defs.h>
-#include "gtk-canvas/gtk-canvas.h"
+#include <libgnomecanvas/libgnomecanvas.h>
 
 
-BEGIN_GTK_CANVAS_DECLS
+BEGIN_GNOME_CANVAS_DECLS
 
 /* Wave viewer item for canvas.
  */
 
 
 /* Wave viewer item for canvas.
  */
 
-#define GTK_CANVAS_TYPE_CANVAS_CURVE            (gtk_canvas_curve_get_type ())
-#define GTK_CANVAS_CURVE(obj)                   (GTK_CHECK_CAST ((obj), GTK_CANVAS_TYPE_CANVAS_CURVE, GtkCanvasCurve))
-#define GTK_CANVAS_CURVE_CLASS(klass)           (GTK_CHECK_CLASS_CAST ((klass), GTK_CANVAS_TYPE_CANVAS_CURVE, GtkCanvasCurveClass))
-#define GTK_CANVAS_IS_CANVAS_CURVE(obj)         (GTK_CHECK_TYPE ((obj), GTK_CANVAS_TYPE_CANVAS_CURVE))
-#define GTK_CANVAS_IS_CANVAS_CURVE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_CANVAS_TYPE_CANVAS_CURVE))
+#define GNOME_CANVAS_TYPE_CANVAS_CURVE            (gnome_canvas_curve_get_type ())
+#define GNOME_CANVAS_CURVE(obj)                   (GTK_CHECK_CAST ((obj), GNOME_CANVAS_TYPE_CANVAS_CURVE, GnomeCanvasCurve))
+#define GNOME_CANVAS_CURVE_CLASS(klass)           (GTK_CHECK_CLASS_CAST ((klass), GNOME_CANVAS_TYPE_CANVAS_CURVE, GnomeCanvasCurveClass))
+#define GNOME_CANVAS_IS_CANVAS_CURVE(obj)         (GTK_CHECK_TYPE ((obj), GNOME_CANVAS_TYPE_CANVAS_CURVE))
+#define GNOME_CANVAS_IS_CANVAS_CURVE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GNOME_CANVAS_TYPE_CANVAS_CURVE))
 
 
-typedef struct _GtkCanvasCurve            GtkCanvasCurve;
-typedef struct _GtkCanvasCurveClass       GtkCanvasCurveClass;
+typedef struct _GnomeCanvasCurve            GnomeCanvasCurve;
+typedef struct _GnomeCanvasCurveClass       GnomeCanvasCurveClass;
 
 
-struct _GtkCanvasCurve
+struct _GnomeCanvasCurve
 {
 {
-    GtkCanvasItem item;
+    GnomeCanvasItem item;
     double x1, y1, x2, y2;
     void* curve_arg;
     float* vector;
     double x1, y1, x2, y2;
     void* curve_arg;
     float* vector;
@@ -55,12 +54,12 @@ struct _GtkCanvasCurve
     guint32 bbox_lrx, bbox_lry;
 };
 
     guint32 bbox_lrx, bbox_lry;
 };
 
-struct _GtkCanvasCurveClass {
-       GtkCanvasItemClass parent_class;
+struct _GnomeCanvasCurveClass {
+       GnomeCanvasItemClass parent_class;
 };
 
 };
 
-GtkType gtk_canvas_curve_get_type (void);
+GtkType gnome_canvas_curve_get_type (void);
 
 
-END_GTK_CANVAS_DECLS
+END_GNOME_CANVAS_DECLS
 
 
-#endif /* __GTK_CANVAS_CURVE_H__ */
+#endif /* __GNOME_CANVAS_CURVE_H__ */
index d186e86f50bd85a88c9b67c721a21768f4848953..3ccfb80a76f9e84b891871add7c9dfa185a0f26d 100644 (file)
@@ -1,6 +1,6 @@
-/* Image item type for GtkCanvas widget
+/* Image item type for GnomeCanvas widget
  *
  *
- * GtkCanvas is basically a port of the Tk toolkit's most excellent canvas widget.  Tk is
+ * GnomeCanvas is basically a port of the Tk toolkit's most excellent canvas widget.  Tk is
  * copyrighted by the Regents of the University of California, Sun Microsystems, and other parties.
  *
  * Copyright (C) 1998 The Free Software Foundation
  * copyrighted by the Regents of the University of California, Sun Microsystems, and other parties.
  *
  * Copyright (C) 1998 The Free Software Foundation
@@ -17,8 +17,8 @@
 #include "libart_lgpl/art_pixbuf.h"
 #include "libart_lgpl/art_rgb_pixbuf_affine.h"
 #include "canvas-imageframe.h"
 #include "libart_lgpl/art_pixbuf.h"
 #include "libart_lgpl/art_rgb_pixbuf_affine.h"
 #include "canvas-imageframe.h"
-#include <gtk-canvas/gtk-canvas-util.h>
-#include <gtk-canvas/gtk-canvastypebuiltins.h>
+#include <libgnomecanvas/gnome-canvas-util.h>
+#include <libgnomecanvas/gnome-canvastypebuiltins.h>
 
 
 enum {
 
 
 enum {
@@ -33,82 +33,82 @@ enum {
 };
 
 
 };
 
 
-static void gtk_canvas_imageframe_class_init(GtkCanvasImageFrameClass* class) ;
-static void gtk_canvas_imageframe_init(GtkCanvasImageFrame* image) ;
-static void gtk_canvas_imageframe_destroy(GtkObject* object) ;
-static void gtk_canvas_imageframe_set_arg(GtkObject* object, GtkArg* arg, guint arg_id) ;
-static void gtk_canvas_imageframe_get_arg(GtkObject* object, GtkArg* arg, guint arg_id) ;
+static void gnome_canvas_imageframe_class_init(GnomeCanvasImageFrameClass* class) ;
+static void gnome_canvas_imageframe_init(GnomeCanvasImageFrame* image) ;
+static void gnome_canvas_imageframe_destroy(GtkObject* object) ;
+static void gnome_canvas_imageframe_set_arg(GtkObject* object, GtkArg* arg, guint arg_id) ;
+static void gnome_canvas_imageframe_get_arg(GtkObject* object, GtkArg* arg, guint arg_id) ;
 
 
-static void gtk_canvas_imageframe_update(GtkCanvasItem *item, double *affine, ArtSVP *clip_path, int flags) ;
-static void gtk_canvas_imageframe_realize(GtkCanvasItem *item) ;
-static void gtk_canvas_imageframe_unrealize(GtkCanvasItem *item) ;
-static void gtk_canvas_imageframe_draw(GtkCanvasItem *item, GdkDrawable *drawable, int x, int y, int width, int height) ;
-static double gtk_canvas_imageframe_point(GtkCanvasItem *item, double x, double y, int cx, int cy, GtkCanvasItem **actual_item) ;
-static void gtk_canvas_imageframe_translate(GtkCanvasItem *item, double dx, double dy) ;
-static void gtk_canvas_imageframe_bounds(GtkCanvasItem *item, double *x1, double *y1, double *x2, double *y2) ;
-static void gtk_canvas_imageframe_render(GtkCanvasItem *item, GtkCanvasBuf *buf) ;
+static void gnome_canvas_imageframe_update(GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, int flags) ;
+static void gnome_canvas_imageframe_realize(GnomeCanvasItem *item) ;
+static void gnome_canvas_imageframe_unrealize(GnomeCanvasItem *item) ;
+static void gnome_canvas_imageframe_draw(GnomeCanvasItem *item, GdkDrawable *drawable, int x, int y, int width, int height) ;
+static double gnome_canvas_imageframe_point(GnomeCanvasItem *item, double x, double y, int cx, int cy, GnomeCanvasItem **actual_item) ;
+static void gnome_canvas_imageframe_translate(GnomeCanvasItem *item, double dx, double dy) ;
+static void gnome_canvas_imageframe_bounds(GnomeCanvasItem *item, double *x1, double *y1, double *x2, double *y2) ;
+static void gnome_canvas_imageframe_render(GnomeCanvasItem *item, GnomeCanvasBuf *buf) ;
 
 
-static GtkCanvasItemClass *parent_class;
+static GnomeCanvasItemClass *parent_class;
 
 
 GtkType
 
 
 GtkType
-gtk_canvas_imageframe_get_type (void)
+gnome_canvas_imageframe_get_type (void)
 {
        static GtkType imageframe_type = 0;
 
        if (!imageframe_type) {
                GtkTypeInfo imageframe_info = {
 {
        static GtkType imageframe_type = 0;
 
        if (!imageframe_type) {
                GtkTypeInfo imageframe_info = {
-                       "GtkCanvasImageFrame",
-                       sizeof (GtkCanvasImageFrame),
-                       sizeof (GtkCanvasImageFrameClass),
-                       (GtkClassInitFunc) gtk_canvas_imageframe_class_init,
-                       (GtkObjectInitFunc) gtk_canvas_imageframe_init,
+                       "GnomeCanvasImageFrame",
+                       sizeof (GnomeCanvasImageFrame),
+                       sizeof (GnomeCanvasImageFrameClass),
+                       (GtkClassInitFunc) gnome_canvas_imageframe_class_init,
+                       (GtkObjectInitFunc) gnome_canvas_imageframe_init,
                        NULL, /* reserved_1 */
                        NULL, /* reserved_2 */
                        (GtkClassInitFunc) NULL
                };
 
                        NULL, /* reserved_1 */
                        NULL, /* reserved_2 */
                        (GtkClassInitFunc) NULL
                };
 
-               imageframe_type = gtk_type_unique (gtk_canvas_item_get_type (), &imageframe_info);
+               imageframe_type = gtk_type_unique (gnome_canvas_item_get_type (), &imageframe_info);
        }
 
        return imageframe_type;
 }
 
 static void
        }
 
        return imageframe_type;
 }
 
 static void
-gtk_canvas_imageframe_class_init (GtkCanvasImageFrameClass *class)
+gnome_canvas_imageframe_class_init (GnomeCanvasImageFrameClass *class)
 {
        GtkObjectClass *object_class;
 {
        GtkObjectClass *object_class;
-       GtkCanvasItemClass *item_class;
+       GnomeCanvasItemClass *item_class;
 
        object_class = (GtkObjectClass *) class;
 
        object_class = (GtkObjectClass *) class;
-       item_class = (GtkCanvasItemClass *) class;
-
-       parent_class = gtk_type_class (gtk_canvas_item_get_type ());
-
-       gtk_object_add_arg_type ("GtkCanvasImageFrame::pixbuf", GTK_TYPE_BOXED, GTK_ARG_WRITABLE, ARG_PIXBUF);
-       gtk_object_add_arg_type ("GtkCanvasImageFrame::x", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_X);
-       gtk_object_add_arg_type ("GtkCanvasImageFrame::y", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_Y);
-       gtk_object_add_arg_type ("GtkCanvasImageFrame::width", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_WIDTH);
-       gtk_object_add_arg_type ("GtkCanvasImageFrame::drawwidth", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_DRAWWIDTH);
-       gtk_object_add_arg_type ("GtkCanvasImageFrame::height", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_HEIGHT);
-       gtk_object_add_arg_type ("GtkCanvasImageFrame::anchor", GTK_TYPE_ANCHOR_TYPE, GTK_ARG_READWRITE, ARG_ANCHOR);
-
-       object_class->destroy = gtk_canvas_imageframe_destroy;
-       object_class->set_arg = gtk_canvas_imageframe_set_arg;
-       object_class->get_arg = gtk_canvas_imageframe_get_arg;
-
-       item_class->update = gtk_canvas_imageframe_update;
-       item_class->realize = gtk_canvas_imageframe_realize;
-       item_class->unrealize = gtk_canvas_imageframe_unrealize;
-       item_class->draw = gtk_canvas_imageframe_draw;
-       item_class->point = gtk_canvas_imageframe_point;
-       item_class->translate = gtk_canvas_imageframe_translate;
-       item_class->bounds = gtk_canvas_imageframe_bounds;
-       item_class->render = gtk_canvas_imageframe_render;
+       item_class = (GnomeCanvasItemClass *) class;
+
+       parent_class = gtk_type_class (gnome_canvas_item_get_type ());
+
+       gtk_object_add_arg_type ("GnomeCanvasImageFrame::pixbuf", GTK_TYPE_BOXED, GTK_ARG_WRITABLE, ARG_PIXBUF);
+       gtk_object_add_arg_type ("GnomeCanvasImageFrame::x", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_X);
+       gtk_object_add_arg_type ("GnomeCanvasImageFrame::y", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_Y);
+       gtk_object_add_arg_type ("GnomeCanvasImageFrame::width", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_WIDTH);
+       gtk_object_add_arg_type ("GnomeCanvasImageFrame::drawwidth", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_DRAWWIDTH);
+       gtk_object_add_arg_type ("GnomeCanvasImageFrame::height", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_HEIGHT);
+       gtk_object_add_arg_type ("GnomeCanvasImageFrame::anchor", GTK_TYPE_ANCHOR_TYPE, GTK_ARG_READWRITE, ARG_ANCHOR);
+
+       object_class->destroy = gnome_canvas_imageframe_destroy;
+       object_class->set_arg = gnome_canvas_imageframe_set_arg;
+       object_class->get_arg = gnome_canvas_imageframe_get_arg;
+
+       item_class->update = gnome_canvas_imageframe_update;
+       item_class->realize = gnome_canvas_imageframe_realize;
+       item_class->unrealize = gnome_canvas_imageframe_unrealize;
+       item_class->draw = gnome_canvas_imageframe_draw;
+       item_class->point = gnome_canvas_imageframe_point;
+       item_class->translate = gnome_canvas_imageframe_translate;
+       item_class->bounds = gnome_canvas_imageframe_bounds;
+       item_class->render = gnome_canvas_imageframe_render;
 }
 
 static void
 }
 
 static void
-gtk_canvas_imageframe_init (GtkCanvasImageFrame *image)
+gnome_canvas_imageframe_init (GnomeCanvasImageFrame *image)
 {
        image->x = 0.0;
        image->y = 0.0;
 {
        image->x = 0.0;
        image->y = 0.0;
@@ -116,18 +116,18 @@ gtk_canvas_imageframe_init (GtkCanvasImageFrame *image)
        image->height = 0.0;
        image->drawwidth = 0.0;
        image->anchor = GTK_ANCHOR_CENTER;
        image->height = 0.0;
        image->drawwidth = 0.0;
        image->anchor = GTK_ANCHOR_CENTER;
-       GTK_CANVAS_ITEM(image)->object.flags |= GTK_CANVAS_ITEM_NO_AUTO_REDRAW;
+       GNOME_CANVAS_ITEM(image)->object.flags |= GNOME_CANVAS_ITEM_NO_AUTO_REDRAW;
 }
 
 static void
 }
 
 static void
-gtk_canvas_imageframe_destroy (GtkObject *object)
+gnome_canvas_imageframe_destroy (GtkObject *object)
 {
 {
-       GtkCanvasImageFrame *image;
+       GnomeCanvasImageFrame *image;
 
        g_return_if_fail (object != NULL);
 
        g_return_if_fail (object != NULL);
-       g_return_if_fail (GTK_CANVAS_IS_CANVAS_IMAGEFRAME (object));
+       g_return_if_fail (GNOME_CANVAS_IS_CANVAS_IMAGEFRAME (object));
 
 
-       image = GTK_CANVAS_IMAGEFRAME (object);
+       image = GNOME_CANVAS_IMAGEFRAME (object);
        
        image->cwidth = 0;
        image->cheight = 0;
        
        image->cwidth = 0;
        image->cheight = 0;
@@ -146,12 +146,12 @@ gtk_canvas_imageframe_destroy (GtkObject *object)
 
 /* Get's the image bounds expressed as item-relative coordinates. */
 static void
 
 /* Get's the image bounds expressed as item-relative coordinates. */
 static void
-get_bounds_item_relative (GtkCanvasImageFrame *image, double *px1, double *py1, double *px2, double *py2)
+get_bounds_item_relative (GnomeCanvasImageFrame *image, double *px1, double *py1, double *px2, double *py2)
 {
 {
-       GtkCanvasItem *item;
+       GnomeCanvasItem *item;
        double x, y;
 
        double x, y;
 
-       item = GTK_CANVAS_ITEM (image);
+       item = GNOME_CANVAS_ITEM (image);
 
        /* Get item coordinates */
 
 
        /* Get item coordinates */
 
@@ -207,15 +207,15 @@ get_bounds_item_relative (GtkCanvasImageFrame *image, double *px1, double *py1,
 }
 
 static void
 }
 
 static void
-get_bounds (GtkCanvasImageFrame *image, double *px1, double *py1, double *px2, double *py2)
+get_bounds (GnomeCanvasImageFrame *image, double *px1, double *py1, double *px2, double *py2)
 {
 {
-       GtkCanvasItem *item;
+       GnomeCanvasItem *item;
        double i2c[6];
        ArtDRect i_bbox, c_bbox;
 
        double i2c[6];
        ArtDRect i_bbox, c_bbox;
 
-       item = GTK_CANVAS_ITEM (image);
+       item = GNOME_CANVAS_ITEM (image);
 
 
-       gtk_canvas_item_i2c_affine (item, i2c);
+       gnome_canvas_item_i2c_affine (item, i2c);
 
        get_bounds_item_relative (image, &i_bbox.x0, &i_bbox.y0, &i_bbox.x1, &i_bbox.y1);
        art_drect_affine_transform (&c_bbox, &i_bbox, i2c);
 
        get_bounds_item_relative (image, &i_bbox.x0, &i_bbox.y0, &i_bbox.x1, &i_bbox.y1);
        art_drect_affine_transform (&c_bbox, &i_bbox, i2c);
@@ -229,11 +229,11 @@ get_bounds (GtkCanvasImageFrame *image, double *px1, double *py1, double *px2, d
 
 /* deprecated */
 static void
 
 /* deprecated */
 static void
-recalc_bounds (GtkCanvasImageFrame *image)
+recalc_bounds (GnomeCanvasImageFrame *image)
 {
 {
-       GtkCanvasItem *item;
+       GnomeCanvasItem *item;
 
 
-       item = GTK_CANVAS_ITEM (image);
+       item = GNOME_CANVAS_ITEM (image);
 
        get_bounds (image, &item->x1, &item->y1, &item->x2, &item->y2);
 
 
        get_bounds (image, &item->x1, &item->y1, &item->x2, &item->y2);
 
@@ -242,19 +242,19 @@ recalc_bounds (GtkCanvasImageFrame *image)
        item->x2 = image->cx + image->cwidth;
        item->y2 = image->cy + image->cheight;
 
        item->x2 = image->cx + image->cwidth;
        item->y2 = image->cy + image->cheight;
 
-       gtk_canvas_group_child_bounds (GTK_CANVAS_GROUP (item->parent), item);
+       gnome_canvas_group_child_bounds (GNOME_CANVAS_GROUP (item->parent), item);
 }
 
 static void
 }
 
 static void
-gtk_canvas_imageframe_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
+gnome_canvas_imageframe_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
 {
 {
-       GtkCanvasItem *item;
-       GtkCanvasImageFrame *image;
+       GnomeCanvasItem *item;
+       GnomeCanvasImageFrame *image;
        int update;
        int calc_bounds;
 
        int update;
        int calc_bounds;
 
-       item = GTK_CANVAS_ITEM (object);
-       image = GTK_CANVAS_IMAGEFRAME (object);
+       item = GNOME_CANVAS_ITEM (object);
+       image = GNOME_CANVAS_IMAGEFRAME (object);
 
        update = FALSE;
        calc_bounds = FALSE;
 
        update = FALSE;
        calc_bounds = FALSE;
@@ -305,22 +305,22 @@ gtk_canvas_imageframe_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
 
 #ifdef OLD_XFORM
        if (update)
 
 #ifdef OLD_XFORM
        if (update)
-               (* GTK_CANVAS_ITEM_CLASS (item->object.klass)->update) (item, NULL, NULL, 0);
+               (* GNOME_CANVAS_ITEM_CLASS (item->object.klass)->update) (item, NULL, NULL, 0);
 
        if (calc_bounds)
                recalc_bounds (image);
 #else
        if (update)
 
        if (calc_bounds)
                recalc_bounds (image);
 #else
        if (update)
-               gtk_canvas_item_request_update (item);
+               gnome_canvas_item_request_update (item);
 #endif
 }
 
 static void
 #endif
 }
 
 static void
-gtk_canvas_imageframe_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
+gnome_canvas_imageframe_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
 {
 {
-       GtkCanvasImageFrame *image;
+       GnomeCanvasImageFrame *image;
 
 
-       image = GTK_CANVAS_IMAGEFRAME (object);
+       image = GNOME_CANVAS_IMAGEFRAME (object);
 
        switch (arg_id) {
 
 
        switch (arg_id) {
 
@@ -355,14 +355,14 @@ gtk_canvas_imageframe_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
 }
 
 static void
 }
 
 static void
-gtk_canvas_imageframe_update (GtkCanvasItem *item, double *affine, ArtSVP *clip_path, int flags)
+gnome_canvas_imageframe_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, int flags)
 {
 {
-       GtkCanvasImageFrame *image;
+       GnomeCanvasImageFrame *image;
        ArtDRect i_bbox, c_bbox;
        int w = 0;
        int h = 0;
 
        ArtDRect i_bbox, c_bbox;
        int w = 0;
        int h = 0;
 
-       image = GTK_CANVAS_IMAGEFRAME (item);
+       image = GNOME_CANVAS_IMAGEFRAME (item);
 
        if (parent_class->update)
                (* parent_class->update) (item, affine, clip_path, flags);
 
        if (parent_class->update)
                (* parent_class->update) (item, affine, clip_path, flags);
@@ -391,7 +391,7 @@ gtk_canvas_imageframe_update (GtkCanvasItem *item, double *affine, ArtSVP *clip_
        c_bbox.x1++;
        c_bbox.y1++;
 
        c_bbox.x1++;
        c_bbox.y1++;
 
-       gtk_canvas_update_bbox (item, c_bbox.x0, c_bbox.y0, c_bbox.x1, c_bbox.y1);
+       gnome_canvas_update_bbox (item, c_bbox.x0, c_bbox.y0, c_bbox.x1, c_bbox.y1);
 
        if (image->pixbuf) {
                w = image->pixbuf->width;
 
        if (image->pixbuf) {
                w = image->pixbuf->width;
@@ -409,11 +409,11 @@ gtk_canvas_imageframe_update (GtkCanvasItem *item, double *affine, ArtSVP *clip_
 }
 
 static void
 }
 
 static void
-gtk_canvas_imageframe_realize (GtkCanvasItem *item)
+gnome_canvas_imageframe_realize (GnomeCanvasItem *item)
 {
 {
-       GtkCanvasImageFrame *image;
+       GnomeCanvasImageFrame *image;
 
 
-       image = GTK_CANVAS_IMAGEFRAME (item);
+       image = GNOME_CANVAS_IMAGEFRAME (item);
 
        if (parent_class->realize)
                (* parent_class->realize) (item);
 
        if (parent_class->realize)
                (* parent_class->realize) (item);
@@ -421,22 +421,22 @@ gtk_canvas_imageframe_realize (GtkCanvasItem *item)
 }
 
 static void
 }
 
 static void
-gtk_canvas_imageframe_unrealize (GtkCanvasItem *item)
+gnome_canvas_imageframe_unrealize (GnomeCanvasItem *item)
 {
 {
-       GtkCanvasImageFrame *image;
+       GnomeCanvasImageFrame *image;
 
 
-       image = GTK_CANVAS_IMAGEFRAME(item);
+       image = GNOME_CANVAS_IMAGEFRAME(item);
 
        if (parent_class->unrealize)
                (* parent_class->unrealize) (item);
 }
 
 static void
 
        if (parent_class->unrealize)
                (* parent_class->unrealize) (item);
 }
 
 static void
-recalc_if_needed (GtkCanvasImageFrame *image)
+recalc_if_needed (GnomeCanvasImageFrame *image)
 {}
 
 static void
 {}
 
 static void
-gtk_canvas_imageframe_draw (GtkCanvasItem *item, GdkDrawable *drawable,
+gnome_canvas_imageframe_draw (GnomeCanvasItem *item, GdkDrawable *drawable,
                         int x, int y, int width, int height)
 {
        fprintf(stderr, "please don't use the CanvasImageFrame item in a non-aa Canvas\n") ;
                         int x, int y, int width, int height)
 {
        fprintf(stderr, "please don't use the CanvasImageFrame item in a non-aa Canvas\n") ;
@@ -444,14 +444,14 @@ gtk_canvas_imageframe_draw (GtkCanvasItem *item, GdkDrawable *drawable,
 }
 
 static double
 }
 
 static double
-gtk_canvas_imageframe_point (GtkCanvasItem *item, double x, double y,
-                         int cx, int cy, GtkCanvasItem **actual_item)
+gnome_canvas_imageframe_point (GnomeCanvasItem *item, double x, double y,
+                         int cx, int cy, GnomeCanvasItem **actual_item)
 {
 {
-       GtkCanvasImageFrame *image;
+       GnomeCanvasImageFrame *image;
        int x1, y1, x2, y2;
        int dx, dy;
 
        int x1, y1, x2, y2;
        int dx, dy;
 
-       image = GTK_CANVAS_IMAGEFRAME (item);
+       image = GNOME_CANVAS_IMAGEFRAME (item);
 
        *actual_item = item;
 
 
        *actual_item = item;
 
@@ -492,12 +492,12 @@ gtk_canvas_imageframe_point (GtkCanvasItem *item, double x, double y,
 }
 
 static void
 }
 
 static void
-gtk_canvas_imageframe_translate (GtkCanvasItem *item, double dx, double dy)
+gnome_canvas_imageframe_translate (GnomeCanvasItem *item, double dx, double dy)
 {
 #ifdef OLD_XFORM
 {
 #ifdef OLD_XFORM
-       GtkCanvasImageFrame *image;
+       GnomeCanvasImageFrame *image;
 
 
-       image = GTK_CANVAS_IMAGEFRAME (item);
+       image = GNOME_CANVAS_IMAGEFRAME (item);
 
        image->x += dx;
        image->y += dy;
 
        image->x += dx;
        image->y += dy;
@@ -507,11 +507,11 @@ gtk_canvas_imageframe_translate (GtkCanvasItem *item, double dx, double dy)
 }
 
 static void
 }
 
 static void
-gtk_canvas_imageframe_bounds (GtkCanvasItem *item, double *x1, double *y1, double *x2, double *y2)
+gnome_canvas_imageframe_bounds (GnomeCanvasItem *item, double *x1, double *y1, double *x2, double *y2)
 {
 {
-       GtkCanvasImageFrame *image;
+       GnomeCanvasImageFrame *image;
 
 
-       image = GTK_CANVAS_IMAGEFRAME (item);
+       image = GNOME_CANVAS_IMAGEFRAME (item);
 
        *x1 = image->x;
        *y1 = image->y;
 
        *x1 = image->x;
        *y1 = image->y;
@@ -559,19 +559,19 @@ gtk_canvas_imageframe_bounds (GtkCanvasItem *item, double *x1, double *y1, doubl
 }
 
 static void
 }
 
 static void
-gtk_canvas_imageframe_render      (GtkCanvasItem *item, GtkCanvasBuf *buf)
+gnome_canvas_imageframe_render      (GnomeCanvasItem *item, GnomeCanvasBuf *buf)
 {
 {
-       GtkCanvasImageFrame *image;
+       GnomeCanvasImageFrame *image;
 
 
-       image = GTK_CANVAS_IMAGEFRAME (item);
+       image = GNOME_CANVAS_IMAGEFRAME (item);
 
 
-        gtk_canvas_buf_ensure_buf (buf);
+        gnome_canvas_buf_ensure_buf (buf);
 
 #ifdef VERBOSE
        {
                char str[128];
                art_affine_to_string (str, image->affine);
 
 #ifdef VERBOSE
        {
                char str[128];
                art_affine_to_string (str, image->affine);
-               g_print ("gtk_canvas_imageframe_render %s\n", str);
+               g_print ("gnome_canvas_imageframe_render %s\n", str);
        }
 #endif
 
        }
 #endif
 
index 408814b8fc1aa555ebac3398b0588fb80d399c07..9522bf3796c64b03cbf07ae9aa02e89c49348a66 100644 (file)
@@ -1,6 +1,6 @@
-/* Image item type for GtkCanvas widget
+/* Image item type for GnomeCanvas widget
  *
  *
- * GtkCanvas is basically a port of the Tk toolkit's most excellent canvas widget.  Tk is
+ * GnomeCanvas is basically a port of the Tk toolkit's most excellent canvas widget.  Tk is
  * copyrighted by the Regents of the University of California, Sun Microsystems, and other parties.
  *
  * Copyright (C) 1998 The Free Software Foundation
  * copyrighted by the Regents of the University of California, Sun Microsystems, and other parties.
  *
  * Copyright (C) 1998 The Free Software Foundation
@@ -9,19 +9,18 @@
  */
  
  
  */
  
  
-#ifndef __GTK_CANVAS_IMAGEFRAME_H__
-#define __GTK_CANVAS_IMAGEFRAME_H__
+#ifndef __GNOME_CANVAS_IMAGEFRAME_H__
+#define __GNOME_CANVAS_IMAGEFRAME_H__
 
 #include <stdint.h>
 
 
 #include <stdint.h>
 
-#include <gtk-canvas/gtk-canvas-defs.h>
+#include <libgnomecanvas/libgnomecanvas.h>
 #include <gtk/gtkpacker.h> /* why the hell is GtkAnchorType here and not in gtkenums.h? */
 #include <libart_lgpl/art_misc.h>
 #include <libart_lgpl/art_pixbuf.h>
 #include <gtk/gtkpacker.h> /* why the hell is GtkAnchorType here and not in gtkenums.h? */
 #include <libart_lgpl/art_misc.h>
 #include <libart_lgpl/art_pixbuf.h>
-#include "gtk-canvas/gtk-canvas.h"
 
 
 
 
-BEGIN_GTK_CANVAS_DECLS
+BEGIN_GNOME_CANVAS_DECLS
 
 
 /* Image item for the canvas.  Images are positioned by anchoring them to a point.
 
 
 /* Image item for the canvas.  Images are positioned by anchoring them to a point.
@@ -39,18 +38,18 @@ BEGIN_GTK_CANVAS_DECLS
  */
 
 
  */
 
 
-#define GTK_CANVAS_TYPE_CANVAS_IMAGEFRAME            (gtk_canvas_imageframe_get_type ())
-#define GTK_CANVAS_IMAGEFRAME(obj)                   (GTK_CHECK_CAST ((obj), GTK_CANVAS_TYPE_CANVAS_IMAGEFRAME, GtkCanvasImageFrame))
-#define GTK_CANVAS_IMAGEFRAME_CLASS(klass)           (GTK_CHECK_CLASS_CAST ((klass), GTK_CANVAS_TYPE_CANVAS_IMAGEFRAME, GtkCanvasImageFrameClass))
-#define GTK_CANVAS_IS_CANVAS_IMAGEFRAME(obj)         (GTK_CHECK_TYPE ((obj), GTK_CANVAS_TYPE_CANVAS_IMAGEFRAME))
-#define GTK_CANVAS_IS_CANVAS_IMAGEFRAME_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_CANVAS_TYPE_CANVAS_IMAGEFRAME))
+#define GNOME_CANVAS_TYPE_CANVAS_IMAGEFRAME            (gnome_canvas_imageframe_get_type ())
+#define GNOME_CANVAS_IMAGEFRAME(obj)                   (GTK_CHECK_CAST ((obj), GNOME_CANVAS_TYPE_CANVAS_IMAGEFRAME, GnomeCanvasImageFrame))
+#define GNOME_CANVAS_IMAGEFRAME_CLASS(klass)           (GTK_CHECK_CLASS_CAST ((klass), GNOME_CANVAS_TYPE_CANVAS_IMAGEFRAME, GnomeCanvasImageFrameClass))
+#define GNOME_CANVAS_IS_CANVAS_IMAGEFRAME(obj)         (GTK_CHECK_TYPE ((obj), GNOME_CANVAS_TYPE_CANVAS_IMAGEFRAME))
+#define GNOME_CANVAS_IS_CANVAS_IMAGEFRAME_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GNOME_CANVAS_TYPE_CANVAS_IMAGEFRAME))
 
 
 
 
-typedef struct _GtkCanvasImageFrame GtkCanvasImageFrame;
-typedef struct _GtkCanvasImageFrameClass GtkCanvasImageFrameClass;
+typedef struct _GnomeCanvasImageFrame GnomeCanvasImageFrame;
+typedef struct _GnomeCanvasImageFrameClass GnomeCanvasImageFrameClass;
 
 
-struct _GtkCanvasImageFrame {
-       GtkCanvasItem item;
+struct _GnomeCanvasImageFrame {
+       GnomeCanvasItem item;
 
        double x, y;                    /* Position at anchor, item relative */
        double width, height;           /* Size of image, item relative */
 
        double x, y;                    /* Position at anchor, item relative */
        double width, height;           /* Size of image, item relative */
@@ -66,15 +65,15 @@ struct _GtkCanvasImageFrame {
        double affine[6];               /* The item -> canvas affine */
 };
 
        double affine[6];               /* The item -> canvas affine */
 };
 
-struct _GtkCanvasImageFrameClass {
-       GtkCanvasItemClass parent_class;
+struct _GnomeCanvasImageFrameClass {
+       GnomeCanvasItemClass parent_class;
 };
 
 
 /* Standard Gtk function */
 };
 
 
 /* Standard Gtk function */
-GtkType gtk_canvas_imageframe_get_type (void);
+GtkType gnome_canvas_imageframe_get_type (void);
 
 
 
 
-END_GTK_CANVAS_DECLS
+END_GNOME_CANVAS_DECLS
 
 #endif
 
 #endif
index 07b7553431d60ba14e54d3fdcd760d2069d7d067..51581d8de8d68a97223d1f54fb3cbe85520e30da 100644 (file)
@@ -1,6 +1,6 @@
 #include <stdio.h>
 #include <math.h>
 #include <stdio.h>
 #include <math.h>
-#include <gtk-canvas.h>
+#include <libgnomecanvas/libgnomecanvas.h>
 
 #include "canvas-ruler.h"
 #include "rgb_macros.h"
 
 #include "canvas-ruler.h"
 #include "rgb_macros.h"
@@ -17,78 +17,78 @@ enum {
 
 };
 
 
 };
 
-static void gtk_canvas_ruler_class_init (GtkCanvasRulerClass *class);
-static void gtk_canvas_ruler_init       (GtkCanvasRuler      *ruler);
-static void gtk_canvas_ruler_set_arg    (GtkObject              *object,
+static void gnome_canvas_ruler_class_init (GnomeCanvasRulerClass *class);
+static void gnome_canvas_ruler_init       (GnomeCanvasRuler      *ruler);
+static void gnome_canvas_ruler_set_arg    (GtkObject              *object,
                                              GtkArg                 *arg,
                                              guint                   arg_id);
                                              GtkArg                 *arg,
                                              guint                   arg_id);
-static void gtk_canvas_ruler_get_arg    (GtkObject              *object,
+static void gnome_canvas_ruler_get_arg    (GtkObject              *object,
                                              GtkArg                 *arg,
                                              guint                   arg_id);
 
                                              GtkArg                 *arg,
                                              guint                   arg_id);
 
-static void   gtk_canvas_ruler_update      (GtkCanvasItem *item, double *affine, ArtSVP *clip_path, int flags);
-static void   gtk_canvas_ruler_bounds      (GtkCanvasItem *item, double *x1, double *y1, double *x2, double *y2);
-static double gtk_canvas_ruler_point (GtkCanvasItem *item, double x, double y, int cx, int cy, GtkCanvasItem **actual_item);
-static void   gtk_canvas_ruler_render (GtkCanvasItem *item, GtkCanvasBuf *buf);
-static void   gtk_canvas_ruler_draw (GtkCanvasItem *item, GdkDrawable *drawable, int x, int y, int w, int h);
+static void   gnome_canvas_ruler_update      (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, int flags);
+static void   gnome_canvas_ruler_bounds      (GnomeCanvasItem *item, double *x1, double *y1, double *x2, double *y2);
+static double gnome_canvas_ruler_point (GnomeCanvasItem *item, double x, double y, int cx, int cy, GnomeCanvasItem **actual_item);
+static void   gnome_canvas_ruler_render (GnomeCanvasItem *item, GnomeCanvasBuf *buf);
+static void   gnome_canvas_ruler_draw (GnomeCanvasItem *item, GdkDrawable *drawable, int x, int y, int w, int h);
 
 
-static GtkCanvasItemClass *parent_class;
+static GnomeCanvasItemClass *parent_class;
 
 
 GtkType
 
 
 GtkType
-gtk_canvas_ruler_get_type (void)
+gnome_canvas_ruler_get_type (void)
 {
        static GtkType ruler_type = 0;
 
        if (!ruler_type) {
                GtkTypeInfo ruler_info = {
 {
        static GtkType ruler_type = 0;
 
        if (!ruler_type) {
                GtkTypeInfo ruler_info = {
-                       "GtkCanvasRuler",
-                       sizeof (GtkCanvasRuler),
-                       sizeof (GtkCanvasRulerClass),
-                       (GtkClassInitFunc) gtk_canvas_ruler_class_init,
-                       (GtkObjectInitFunc) gtk_canvas_ruler_init,
+                       "GnomeCanvasRuler",
+                       sizeof (GnomeCanvasRuler),
+                       sizeof (GnomeCanvasRulerClass),
+                       (GtkClassInitFunc) gnome_canvas_ruler_class_init,
+                       (GtkObjectInitFunc) gnome_canvas_ruler_init,
                        NULL, /* reserved_1 */
                        NULL, /* reserved_2 */
                        (GtkClassInitFunc) NULL
                };
 
                        NULL, /* reserved_1 */
                        NULL, /* reserved_2 */
                        (GtkClassInitFunc) NULL
                };
 
-               ruler_type = gtk_type_unique (gtk_canvas_item_get_type (), &ruler_info);
+               ruler_type = gtk_type_unique (gnome_canvas_item_get_type (), &ruler_info);
        }
 
        return ruler_type;
 }
 
 static void
        }
 
        return ruler_type;
 }
 
 static void
-gtk_canvas_ruler_class_init (GtkCanvasRulerClass *class)
+gnome_canvas_ruler_class_init (GnomeCanvasRulerClass *class)
 {
        GtkObjectClass *object_class;
 {
        GtkObjectClass *object_class;
-       GtkCanvasItemClass *item_class;
+       GnomeCanvasItemClass *item_class;
 
        object_class = (GtkObjectClass *) class;
 
        object_class = (GtkObjectClass *) class;
-       item_class = (GtkCanvasItemClass *) class;
-
-       parent_class = gtk_type_class (gtk_canvas_item_get_type ());
-
-       gtk_object_add_arg_type ("GtkCanvasRuler::x1", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_X1);
-       gtk_object_add_arg_type ("GtkCanvasRuler::y1", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_Y1);
-       gtk_object_add_arg_type ("GtkCanvasRuler::x2", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_X2);
-       gtk_object_add_arg_type ("GtkCanvasRuler::y2", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_Y2);
-       gtk_object_add_arg_type ("GtkCanvasRuler::frames_per_unit", GTK_TYPE_LONG, GTK_ARG_READWRITE, ARG_FRAMES_PER_UNIT);
-       gtk_object_add_arg_type ("GtkCanvasRuler::fill_color", GTK_TYPE_INT, GTK_ARG_READWRITE, ARG_FILL_COLOR);
-       gtk_object_add_arg_type ("GtkCanvasRuler::tick_color", GTK_TYPE_INT, GTK_ARG_READWRITE, ARG_TICK_COLOR);
-
-       object_class->set_arg = gtk_canvas_ruler_set_arg;
-       object_class->get_arg = gtk_canvas_ruler_get_arg;
-
-       item_class->update = gtk_canvas_ruler_update;
-       item_class->bounds = gtk_canvas_ruler_bounds;
-       item_class->point = gtk_canvas_ruler_point;
-       item_class->render = gtk_canvas_ruler_render;
-       item_class->draw = gtk_canvas_ruler_draw;
+       item_class = (GnomeCanvasItemClass *) class;
+
+       parent_class = gtk_type_class (gnome_canvas_item_get_type ());
+
+       gtk_object_add_arg_type ("GnomeCanvasRuler::x1", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_X1);
+       gtk_object_add_arg_type ("GnomeCanvasRuler::y1", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_Y1);
+       gtk_object_add_arg_type ("GnomeCanvasRuler::x2", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_X2);
+       gtk_object_add_arg_type ("GnomeCanvasRuler::y2", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_Y2);
+       gtk_object_add_arg_type ("GnomeCanvasRuler::frames_per_unit", GTK_TYPE_LONG, GTK_ARG_READWRITE, ARG_FRAMES_PER_UNIT);
+       gtk_object_add_arg_type ("GnomeCanvasRuler::fill_color", GTK_TYPE_INT, GTK_ARG_READWRITE, ARG_FILL_COLOR);
+       gtk_object_add_arg_type ("GnomeCanvasRuler::tick_color", GTK_TYPE_INT, GTK_ARG_READWRITE, ARG_TICK_COLOR);
+
+       object_class->set_arg = gnome_canvas_ruler_set_arg;
+       object_class->get_arg = gnome_canvas_ruler_get_arg;
+
+       item_class->update = gnome_canvas_ruler_update;
+       item_class->bounds = gnome_canvas_ruler_bounds;
+       item_class->point = gnome_canvas_ruler_point;
+       item_class->render = gnome_canvas_ruler_render;
+       item_class->draw = gnome_canvas_ruler_draw;
 }
 
 static void
 }
 
 static void
-gtk_canvas_ruler_init (GtkCanvasRuler *ruler)
+gnome_canvas_ruler_init (GnomeCanvasRuler *ruler)
 {
        ruler->x1 = 0.0;
        ruler->y1 = 0.0;
 {
        ruler->x1 = 0.0;
        ruler->y1 = 0.0;
@@ -98,11 +98,11 @@ gtk_canvas_ruler_init (GtkCanvasRuler *ruler)
        ruler->fill_color = 0;
        ruler->tick_color = 0;
 
        ruler->fill_color = 0;
        ruler->tick_color = 0;
 
-       GTK_CANVAS_ITEM(ruler)->object.flags |= GTK_CANVAS_ITEM_NO_AUTO_REDRAW;
+       GNOME_CANVAS_ITEM(ruler)->object.flags |= GNOME_CANVAS_ITEM_NO_AUTO_REDRAW;
 }
 
 static void 
 }
 
 static void 
-gtk_canvas_ruler_reset_bounds (GtkCanvasItem *item)
+gnome_canvas_ruler_reset_bounds (GnomeCanvasItem *item)
 
 {
        double x1, x2, y1, y2;
 
 {
        double x1, x2, y1, y2;
@@ -111,14 +111,14 @@ gtk_canvas_ruler_reset_bounds (GtkCanvasItem *item)
        int Ix1, Ix2, Iy1, Iy2;
        double i2w[6];
 
        int Ix1, Ix2, Iy1, Iy2;
        double i2w[6];
 
-       gtk_canvas_ruler_bounds (item, &x1, &y1, &x2, &y2);
+       gnome_canvas_ruler_bounds (item, &x1, &y1, &x2, &y2);
 
        i1.x = x1;
        i1.y = y1;
        i2.x = x2;
        i2.y = y2;
 
 
        i1.x = x1;
        i1.y = y1;
        i2.x = x2;
        i2.y = y2;
 
-       gtk_canvas_item_i2w_affine (item, i2w);
+       gnome_canvas_item_i2w_affine (item, i2w);
        art_affine_point (&w1, &i1, i2w);
        art_affine_point (&w2, &i2, i2w);
 
        art_affine_point (&w1, &i1, i2w);
        art_affine_point (&w2, &i2, i2w);
 
@@ -127,7 +127,7 @@ gtk_canvas_ruler_reset_bounds (GtkCanvasItem *item)
        Iy1 = (int) rint(w1.y);
        Iy2 = (int) rint(w2.y);
 
        Iy1 = (int) rint(w1.y);
        Iy2 = (int) rint(w2.y);
 
-       gtk_canvas_update_bbox (item, Ix1, Iy1, Ix2, Iy2);
+       gnome_canvas_update_bbox (item, Ix1, Iy1, Ix2, Iy2);
 }
 
 /* 
 }
 
 /* 
@@ -135,15 +135,15 @@ gtk_canvas_ruler_reset_bounds (GtkCanvasItem *item)
  */
 
 static void
  */
 
 static void
-gtk_canvas_ruler_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
+gnome_canvas_ruler_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
 {
 {
-       GtkCanvasItem *item;
-       GtkCanvasRuler *ruler;
+       GnomeCanvasItem *item;
+       GnomeCanvasRuler *ruler;
        int redraw;
        int calc_bounds;
 
        int redraw;
        int calc_bounds;
 
-       item = GTK_CANVAS_ITEM (object);
-       ruler = GTK_CANVAS_RULER (object);
+       item = GNOME_CANVAS_ITEM (object);
+       ruler = GNOME_CANVAS_RULER (object);
 
        redraw = FALSE;
        calc_bounds = FALSE;
 
        redraw = FALSE;
        calc_bounds = FALSE;
@@ -203,21 +203,21 @@ gtk_canvas_ruler_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
        }
 
        if (calc_bounds) {
        }
 
        if (calc_bounds) {
-               gtk_canvas_ruler_reset_bounds (item);
+               gnome_canvas_ruler_reset_bounds (item);
        }
 
        if (redraw) {
        }
 
        if (redraw) {
-               gtk_canvas_item_request_update (item);
+               gnome_canvas_item_request_update (item);
        }
 
 }
 
 static void
        }
 
 }
 
 static void
-gtk_canvas_ruler_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
+gnome_canvas_ruler_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
 {
 {
-       GtkCanvasRuler *ruler;
+       GnomeCanvasRuler *ruler;
 
 
-       ruler = GTK_CANVAS_RULER (object);
+       ruler = GNOME_CANVAS_RULER (object);
 
        switch (arg_id) {
        case ARG_X1:
 
        switch (arg_id) {
        case ARG_X1:
@@ -248,50 +248,50 @@ gtk_canvas_ruler_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
 }
 
 static void
 }
 
 static void
-gtk_canvas_ruler_update (GtkCanvasItem *item, double *affine, ArtSVP *clip_path, int flags)
+gnome_canvas_ruler_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, int flags)
 {
 {
-       GtkCanvasRuler *ruler;
+       GnomeCanvasRuler *ruler;
        double x;
        double y;
 
        double x;
        double y;
 
-       ruler = GTK_CANVAS_RULER (item);
+       ruler = GNOME_CANVAS_RULER (item);
 
        if (parent_class->update)
                (* parent_class->update) (item, affine, clip_path, flags);
 
 
        if (parent_class->update)
                (* parent_class->update) (item, affine, clip_path, flags);
 
-       gtk_canvas_ruler_reset_bounds (item);
+       gnome_canvas_ruler_reset_bounds (item);
 
        x = ruler->x1;
        y = ruler->y1;
 
 
        x = ruler->x1;
        y = ruler->y1;
 
-       gtk_canvas_item_i2w (item, &x, &y);
-       gtk_canvas_w2c (GTK_CANVAS(item->canvas), x, y, &ruler->bbox_ulx, &ruler->bbox_uly);
+       gnome_canvas_item_i2w (item, &x, &y);
+       gnome_canvas_w2c (GNOME_CANVAS(item->canvas), x, y, &ruler->bbox_ulx, &ruler->bbox_uly);
 
        x = ruler->x2;
        y = ruler->y2;
 
 
        x = ruler->x2;
        y = ruler->y2;
 
-       gtk_canvas_item_i2w (item, &x, &y);
-       gtk_canvas_w2c (GTK_CANVAS(item->canvas), x, y, &ruler->bbox_lrx, &ruler->bbox_lry);
+       gnome_canvas_item_i2w (item, &x, &y);
+       gnome_canvas_w2c (GNOME_CANVAS(item->canvas), x, y, &ruler->bbox_lrx, &ruler->bbox_lry);
 
        UINT_TO_RGB (ruler->tick_color, &ruler->tick_r, &ruler->tick_g, &ruler->tick_b);
        UINT_TO_RGB (ruler->fill_color, &ruler->fill_r, &ruler->fill_g, &ruler->fill_b);
 }
 
 static void
 
        UINT_TO_RGB (ruler->tick_color, &ruler->tick_r, &ruler->tick_g, &ruler->tick_b);
        UINT_TO_RGB (ruler->fill_color, &ruler->fill_r, &ruler->fill_g, &ruler->fill_b);
 }
 
 static void
-gtk_canvas_ruler_render (GtkCanvasItem *item,
-                             GtkCanvasBuf *buf)
+gnome_canvas_ruler_render (GnomeCanvasItem *item,
+                             GnomeCanvasBuf *buf)
 {
 {
-       GtkCanvasRuler *ruler;
+       GnomeCanvasRuler *ruler;
        int end, begin;
 
        int end, begin;
 
-       ruler = GTK_CANVAS_RULER (item);
+       ruler = GNOME_CANVAS_RULER (item);
 
        if (parent_class->render) {
                (*parent_class->render) (item, buf);
        }
 
        if (buf->is_bg) {
 
        if (parent_class->render) {
                (*parent_class->render) (item, buf);
        }
 
        if (buf->is_bg) {
-               gtk_canvas_buf_ensure_buf (buf);
+               gnome_canvas_buf_ensure_buf (buf);
                buf->is_bg = FALSE;
        }
 
                buf->is_bg = FALSE;
        }
 
@@ -312,14 +312,14 @@ gtk_canvas_ruler_render (GtkCanvasItem *item,
 }
 
 static void
 }
 
 static void
-gtk_canvas_ruler_draw (GtkCanvasItem *item,
+gnome_canvas_ruler_draw (GnomeCanvasItem *item,
                            GdkDrawable *drawable,
                            int x, int y,
                            int width, int height)
 {
                            GdkDrawable *drawable,
                            int x, int y,
                            int width, int height)
 {
-       GtkCanvasRuler *ruler;
+       GnomeCanvasRuler *ruler;
 
 
-       ruler = GTK_CANVAS_RULER (item);
+       ruler = GNOME_CANVAS_RULER (item);
 
        if (parent_class->draw) {
                (* parent_class->draw) (item, drawable, x, y, width, height);
 
        if (parent_class->draw) {
                (* parent_class->draw) (item, drawable, x, y, width, height);
@@ -330,9 +330,9 @@ gtk_canvas_ruler_draw (GtkCanvasItem *item,
 }
 
 static void
 }
 
 static void
-gtk_canvas_ruler_bounds (GtkCanvasItem *item, double *x1, double *y1, double *x2, double *y2)
+gnome_canvas_ruler_bounds (GnomeCanvasItem *item, double *x1, double *y1, double *x2, double *y2)
 {
 {
-       GtkCanvasRuler *ruler = GTK_CANVAS_RULER (item);
+       GnomeCanvasRuler *ruler = GNOME_CANVAS_RULER (item);
 
        *x1 = ruler->x1;
        *y1 = ruler->y1;
 
        *x1 = ruler->x1;
        *y1 = ruler->y1;
@@ -341,19 +341,19 @@ gtk_canvas_ruler_bounds (GtkCanvasItem *item, double *x1, double *y1, double *x2
 }
 
 static double
 }
 
 static double
-gtk_canvas_ruler_point (GtkCanvasItem *item, double x, double y, int cx, int cy, GtkCanvasItem **actual_item)
+gnome_canvas_ruler_point (GnomeCanvasItem *item, double x, double y, int cx, int cy, GnomeCanvasItem **actual_item)
 {
 {
-       GtkCanvasRuler *ruler;
+       GnomeCanvasRuler *ruler;
        double x1, y1, x2, y2;
        double dx, dy;
 
        double x1, y1, x2, y2;
        double dx, dy;
 
-       ruler = GTK_CANVAS_RULER (item);
+       ruler = GNOME_CANVAS_RULER (item);
 
        *actual_item = item;
 
        /* Find the bounds for the rectangle plus its outline width */
 
 
        *actual_item = item;
 
        /* Find the bounds for the rectangle plus its outline width */
 
-       gtk_canvas_ruler_bounds (item, &x1, &y1, &x2, &y2);
+       gnome_canvas_ruler_bounds (item, &x1, &y1, &x2, &y2);
 
        /* Is point inside rectangle */
        
 
        /* Is point inside rectangle */
        
index db9937000a4fff04dc3607a5f1dcb780da7508fd..a0a54c39f6a737d8ec7443d7133fc29bb6159a07 100644 (file)
@@ -1,4 +1,4 @@
-/* gtk-canvas-ruler.h: GtkCanvas item for simple rects
+/* libgnomecanvas/gnome-canvas-ruler.h: GnomeCanvas item for simple rects
  *
  * Copyright (C) 2001 Paul Davis <pbd@op.net>
  *
  *
  * Copyright (C) 2001 Paul Davis <pbd@op.net>
  *
  *
  */
 
  *
  */
 
-#ifndef __GTK_CANVAS_RULER_H__
-#define __GTK_CANVAS_RULER_H__
+#ifndef __GNOME_CANVAS_RULER_H__
+#define __GNOME_CANVAS_RULER_H__
 
 #include <stdint.h>
 
 
 #include <stdint.h>
 
-#include <gtk-canvas/gtk-canvas-defs.h>
-#include "gtk-canvas/gtk-canvas.h"
+#include "libgnomecanvas/libgnomecanvas.h"
 
 
-BEGIN_GTK_CANVAS_DECLS
+BEGIN_GNOME_CANVAS_DECLS
 
 /* Wave viewer item for canvas.
  */
 
 
 /* Wave viewer item for canvas.
  */
 
-#define GTK_CANVAS_TYPE_CANVAS_RULER            (gtk_canvas_ruler_get_type ())
-#define GTK_CANVAS_RULER(obj)                   (GTK_CHECK_CAST ((obj), GTK_CANVAS_TYPE_CANVAS_RULER, GtkCanvasRuler))
-#define GTK_CANVAS_RULER_CLASS(klass)           (GTK_CHECK_CLASS_CAST ((klass), GTK_CANVAS_TYPE_CANVAS_RULER, GtkCanvasRulerClass))
-#define GTK_CANVAS_IS_CANVAS_RULER(obj)         (GTK_CHECK_TYPE ((obj), GTK_CANVAS_TYPE_CANVAS_RULER))
-#define GTK_CANVAS_IS_CANVAS_RULER_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_CANVAS_TYPE_CANVAS_RULER))
+#define GNOME_CANVAS_TYPE_CANVAS_RULER            (gnome_canvas_ruler_get_type ())
+#define GNOME_CANVAS_RULER(obj)                   (GTK_CHECK_CAST ((obj), GNOME_CANVAS_TYPE_CANVAS_RULER, GnomeCanvasRuler))
+#define GNOME_CANVAS_RULER_CLASS(klass)           (GTK_CHECK_CLASS_CAST ((klass), GNOME_CANVAS_TYPE_CANVAS_RULER, GnomeCanvasRulerClass))
+#define GNOME_CANVAS_IS_CANVAS_RULER(obj)         (GTK_CHECK_TYPE ((obj), GNOME_CANVAS_TYPE_CANVAS_RULER))
+#define GNOME_CANVAS_IS_CANVAS_RULER_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GNOME_CANVAS_TYPE_CANVAS_RULER))
 
 
-typedef struct _GtkCanvasRuler            GtkCanvasRuler;
-typedef struct _GtkCanvasRulerClass       GtkCanvasRulerClass;
+typedef struct _GnomeCanvasRuler            GnomeCanvasRuler;
+typedef struct _GnomeCanvasRulerClass       GnomeCanvasRulerClass;
 
 
-struct _GtkCanvasRuler
+struct _GnomeCanvasRuler
 {
 {
-    GtkCanvasItem item;
+    GnomeCanvasItem item;
     double x1, y1, x2, y2;
     uint32_t fill_color;
     uint32_t tick_color;
     double x1, y1, x2, y2;
     uint32_t fill_color;
     uint32_t tick_color;
@@ -57,12 +56,12 @@ struct _GtkCanvasRuler
     guint32 bbox_lrx, bbox_lry;
 };
 
     guint32 bbox_lrx, bbox_lry;
 };
 
-struct _GtkCanvasRulerClass {
-       GtkCanvasItemClass parent_class;
+struct _GnomeCanvasRulerClass {
+       GnomeCanvasItemClass parent_class;
 };
 
 };
 
-GtkType gtk_canvas_ruler_get_type (void);
+GtkType gnome_canvas_ruler_get_type (void);
 
 
-END_GTK_CANVAS_DECLS
+END_GNOME_CANVAS_DECLS
 
 
-#endif /* __GTK_CANVAS_RULER_H__ */
+#endif /* __GNOME_CANVAS_RULER_H__ */
index 9823975eeee3bcd6135a3c2a4ac88e9e723b5bc1..bf0fdeabc69981bd7596c2eb093691779671a801 100644 (file)
@@ -1,6 +1,6 @@
 #include <stdio.h>
 #include <math.h>
 #include <stdio.h>
 #include <math.h>
-#include <gtk-canvas.h>
+#include <libgnomecanvas/libgnomecanvas.h>
 
 #include "canvas-simpleline.h"
 #include "rgb_macros.h"
 
 #include "canvas-simpleline.h"
 #include "rgb_macros.h"
@@ -14,76 +14,76 @@ enum {
        ARG_COLOR_RGBA
 };
 
        ARG_COLOR_RGBA
 };
 
-static void gtk_canvas_simpleline_class_init (GtkCanvasSimpleLineClass *class);
-static void gtk_canvas_simpleline_init       (GtkCanvasSimpleLine      *simpleline);
-static void gtk_canvas_simpleline_set_arg    (GtkObject              *object,
+static void gnome_canvas_simpleline_class_init (GnomeCanvasSimpleLineClass *class);
+static void gnome_canvas_simpleline_init       (GnomeCanvasSimpleLine      *simpleline);
+static void gnome_canvas_simpleline_set_arg    (GtkObject              *object,
                                              GtkArg                 *arg,
                                              guint                   arg_id);
                                              GtkArg                 *arg,
                                              guint                   arg_id);
-static void gtk_canvas_simpleline_get_arg    (GtkObject              *object,
+static void gnome_canvas_simpleline_get_arg    (GtkObject              *object,
                                              GtkArg                 *arg,
                                              guint                   arg_id);
 
                                              GtkArg                 *arg,
                                              guint                   arg_id);
 
-static void   gtk_canvas_simpleline_update      (GtkCanvasItem *item, double *affine, ArtSVP *clip_path, int flags);
-static void   gtk_canvas_simpleline_bounds      (GtkCanvasItem *item, double *x1, double *y1, double *x2, double *y2);
-static double gtk_canvas_simpleline_point (GtkCanvasItem *item, double x, double y, int cx, int cy, GtkCanvasItem **actual_item);
-static void   gtk_canvas_simpleline_render (GtkCanvasItem *item, GtkCanvasBuf *buf);
-static void   gtk_canvas_simpleline_draw (GtkCanvasItem *item, GdkDrawable *drawable, int x, int y, int w, int h);
+static void   gnome_canvas_simpleline_update      (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, int flags);
+static void   gnome_canvas_simpleline_bounds      (GnomeCanvasItem *item, double *x1, double *y1, double *x2, double *y2);
+static double gnome_canvas_simpleline_point (GnomeCanvasItem *item, double x, double y, int cx, int cy, GnomeCanvasItem **actual_item);
+static void   gnome_canvas_simpleline_render (GnomeCanvasItem *item, GnomeCanvasBuf *buf);
+static void   gnome_canvas_simpleline_draw (GnomeCanvasItem *item, GdkDrawable *drawable, int x, int y, int w, int h);
 
 
-static GtkCanvasItemClass *parent_class;
+static GnomeCanvasItemClass *parent_class;
 
 
 GtkType
 
 
 GtkType
-gtk_canvas_simpleline_get_type (void)
+gnome_canvas_simpleline_get_type (void)
 {
        static GtkType simpleline_type = 0;
 
        if (!simpleline_type) {
                GtkTypeInfo simpleline_info = {
 {
        static GtkType simpleline_type = 0;
 
        if (!simpleline_type) {
                GtkTypeInfo simpleline_info = {
-                       "GtkCanvasSimpleLine",
-                       sizeof (GtkCanvasSimpleLine),
-                       sizeof (GtkCanvasSimpleLineClass),
-                       (GtkClassInitFunc) gtk_canvas_simpleline_class_init,
-                       (GtkObjectInitFunc) gtk_canvas_simpleline_init,
+                       "GnomeCanvasSimpleLine",
+                       sizeof (GnomeCanvasSimpleLine),
+                       sizeof (GnomeCanvasSimpleLineClass),
+                       (GtkClassInitFunc) gnome_canvas_simpleline_class_init,
+                       (GtkObjectInitFunc) gnome_canvas_simpleline_init,
                        NULL, /* reserved_1 */
                        NULL, /* reserved_2 */
                        (GtkClassInitFunc) NULL
                };
 
                        NULL, /* reserved_1 */
                        NULL, /* reserved_2 */
                        (GtkClassInitFunc) NULL
                };
 
-               simpleline_type = gtk_type_unique (gtk_canvas_item_get_type (), &simpleline_info);
+               simpleline_type = gtk_type_unique (gnome_canvas_item_get_type (), &simpleline_info);
        }
 
        return simpleline_type;
 }
 
 static void
        }
 
        return simpleline_type;
 }
 
 static void
-gtk_canvas_simpleline_class_init (GtkCanvasSimpleLineClass *class)
+gnome_canvas_simpleline_class_init (GnomeCanvasSimpleLineClass *class)
 {
        GtkObjectClass *object_class;
 {
        GtkObjectClass *object_class;
-       GtkCanvasItemClass *item_class;
+       GnomeCanvasItemClass *item_class;
 
        object_class = (GtkObjectClass *) class;
 
        object_class = (GtkObjectClass *) class;
-       item_class = (GtkCanvasItemClass *) class;
+       item_class = (GnomeCanvasItemClass *) class;
 
 
-       parent_class = gtk_type_class (gtk_canvas_item_get_type ());
+       parent_class = gtk_type_class (gnome_canvas_item_get_type ());
 
 
-       gtk_object_add_arg_type ("GtkCanvasSimpleLine::x1", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_X1);
-       gtk_object_add_arg_type ("GtkCanvasSimpleLine::y1", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_Y1);
-       gtk_object_add_arg_type ("GtkCanvasSimpleLine::x2", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_X2);
-       gtk_object_add_arg_type ("GtkCanvasSimpleLine::y2", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_Y2);
-       gtk_object_add_arg_type ("GtkCanvasSimpleLine::color_rgba", GTK_TYPE_INT, GTK_ARG_READWRITE, ARG_COLOR_RGBA);
+       gtk_object_add_arg_type ("GnomeCanvasSimpleLine::x1", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_X1);
+       gtk_object_add_arg_type ("GnomeCanvasSimpleLine::y1", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_Y1);
+       gtk_object_add_arg_type ("GnomeCanvasSimpleLine::x2", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_X2);
+       gtk_object_add_arg_type ("GnomeCanvasSimpleLine::y2", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_Y2);
+       gtk_object_add_arg_type ("GnomeCanvasSimpleLine::color_rgba", GTK_TYPE_INT, GTK_ARG_READWRITE, ARG_COLOR_RGBA);
 
 
-       object_class->set_arg = gtk_canvas_simpleline_set_arg;
-       object_class->get_arg = gtk_canvas_simpleline_get_arg;
+       object_class->set_arg = gnome_canvas_simpleline_set_arg;
+       object_class->get_arg = gnome_canvas_simpleline_get_arg;
 
 
-       item_class->update = gtk_canvas_simpleline_update;
-       item_class->bounds = gtk_canvas_simpleline_bounds;
-       item_class->point = gtk_canvas_simpleline_point;
-       item_class->render = gtk_canvas_simpleline_render;
-       item_class->draw = gtk_canvas_simpleline_draw;
+       item_class->update = gnome_canvas_simpleline_update;
+       item_class->bounds = gnome_canvas_simpleline_bounds;
+       item_class->point = gnome_canvas_simpleline_point;
+       item_class->render = gnome_canvas_simpleline_render;
+       item_class->draw = gnome_canvas_simpleline_draw;
 }
 
 static void
 }
 
 static void
-gtk_canvas_simpleline_init (GtkCanvasSimpleLine *simpleline)
+gnome_canvas_simpleline_init (GnomeCanvasSimpleLine *simpleline)
 {
        simpleline->x1 = 0.0;
        simpleline->y1 = 0.0;
 {
        simpleline->x1 = 0.0;
        simpleline->y1 = 0.0;
@@ -91,26 +91,26 @@ gtk_canvas_simpleline_init (GtkCanvasSimpleLine *simpleline)
        simpleline->y2 = 0.0;
        simpleline->color = RGBA_TO_UINT(98,123,174,241);
        simpleline->horizontal = TRUE; /* reset in the _update() method */
        simpleline->y2 = 0.0;
        simpleline->color = RGBA_TO_UINT(98,123,174,241);
        simpleline->horizontal = TRUE; /* reset in the _update() method */
-       GTK_CANVAS_ITEM(simpleline)->object.flags |= GTK_CANVAS_ITEM_NO_AUTO_REDRAW;
+       GNOME_CANVAS_ITEM(simpleline)->object.flags |= GNOME_CANVAS_ITEM_NO_AUTO_REDRAW;
 }
 
 static void
 }
 
 static void
-gtk_canvas_simpleline_bounds_world (GtkCanvasItem *item, int* ix1, int* iy1, int* ix2, int* iy2)
+gnome_canvas_simpleline_bounds_world (GnomeCanvasItem *item, int* ix1, int* iy1, int* ix2, int* iy2)
 {
        double x1, x2, y1, y2;
        ArtPoint i1, i2;
        ArtPoint w1, w2;
        double i2w[6];
 {
        double x1, x2, y1, y2;
        ArtPoint i1, i2;
        ArtPoint w1, w2;
        double i2w[6];
-       GtkCanvasSimpleLine *simpleline = GTK_CANVAS_SIMPLELINE(item);
+       GnomeCanvasSimpleLine *simpleline = GNOME_CANVAS_SIMPLELINE(item);
 
 
-       gtk_canvas_simpleline_bounds (item, &x1, &y1, &x2, &y2);
+       gnome_canvas_simpleline_bounds (item, &x1, &y1, &x2, &y2);
 
        i1.x = x1;
        i1.y = y1;
        i2.x = x2;
        i2.y = y2;
        
 
        i1.x = x1;
        i1.y = y1;
        i2.x = x2;
        i2.y = y2;
        
-       gtk_canvas_item_i2w_affine (item, i2w);
+       gnome_canvas_item_i2w_affine (item, i2w);
        art_affine_point (&w1, &i1, i2w);
        art_affine_point (&w2, &i2, i2w);
 
        art_affine_point (&w1, &i1, i2w);
        art_affine_point (&w2, &i2, i2w);
 
@@ -131,12 +131,12 @@ gtk_canvas_simpleline_bounds_world (GtkCanvasItem *item, int* ix1, int* iy1, int
 }
 
 static void 
 }
 
 static void 
-gtk_canvas_simpleline_reset_bounds (GtkCanvasItem *item)
+gnome_canvas_simpleline_reset_bounds (GnomeCanvasItem *item)
 {
        int Ix1, Ix2, Iy1, Iy2;
 
 {
        int Ix1, Ix2, Iy1, Iy2;
 
-       gtk_canvas_simpleline_bounds_world (item, &Ix1, &Iy1, &Ix2, &Iy2);
-       gtk_canvas_update_bbox (item, Ix1, Iy1, Ix2, Iy2);
+       gnome_canvas_simpleline_bounds_world (item, &Ix1, &Iy1, &Ix2, &Iy2);
+       gnome_canvas_update_bbox (item, Ix1, Iy1, Ix2, Iy2);
 }
 
 /* 
 }
 
 /* 
@@ -144,15 +144,15 @@ gtk_canvas_simpleline_reset_bounds (GtkCanvasItem *item)
  */
 
 static void
  */
 
 static void
-gtk_canvas_simpleline_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
+gnome_canvas_simpleline_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
 {
 {
-       GtkCanvasItem *item;
-       GtkCanvasSimpleLine *simpleline;
+       GnomeCanvasItem *item;
+       GnomeCanvasSimpleLine *simpleline;
        int redraw;
        int calc_bounds;
 
        int redraw;
        int calc_bounds;
 
-       item = GTK_CANVAS_ITEM (object);
-       simpleline = GTK_CANVAS_SIMPLELINE (object);
+       item = GNOME_CANVAS_ITEM (object);
+       simpleline = GNOME_CANVAS_SIMPLELINE (object);
 
        redraw = FALSE;
        calc_bounds = FALSE;
 
        redraw = FALSE;
        calc_bounds = FALSE;
@@ -200,22 +200,22 @@ gtk_canvas_simpleline_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
        
        if (calc_bounds) {
 
        
        if (calc_bounds) {
 
-               gtk_canvas_item_request_update (item);
+               gnome_canvas_item_request_update (item);
 
        } else if (redraw) {
 
                int Ix1, Ix2, Iy1, Iy2;
 
        } else if (redraw) {
 
                int Ix1, Ix2, Iy1, Iy2;
-               gtk_canvas_simpleline_bounds_world (item, &Ix1, &Iy1, &Ix2, &Iy2);
-               gtk_canvas_request_redraw (item->canvas, Ix1, Iy1, Ix2, Iy2);
+               gnome_canvas_simpleline_bounds_world (item, &Ix1, &Iy1, &Ix2, &Iy2);
+               gnome_canvas_request_redraw (item->canvas, Ix1, Iy1, Ix2, Iy2);
        }
 }
 
 static void
        }
 }
 
 static void
-gtk_canvas_simpleline_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
+gnome_canvas_simpleline_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
 {
 {
-       GtkCanvasSimpleLine *simpleline;
+       GnomeCanvasSimpleLine *simpleline;
 
 
-       simpleline = GTK_CANVAS_SIMPLELINE (object);
+       simpleline = GNOME_CANVAS_SIMPLELINE (object);
 
        switch (arg_id) {
        case ARG_X1:
 
        switch (arg_id) {
        case ARG_X1:
@@ -240,47 +240,47 @@ gtk_canvas_simpleline_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
 }
 
 static void
 }
 
 static void
-gtk_canvas_simpleline_update (GtkCanvasItem *item, double *affine, ArtSVP *clip_path, int flags)
+gnome_canvas_simpleline_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, int flags)
 {
 {
-       GtkCanvasSimpleLine *simpleline;
+       GnomeCanvasSimpleLine *simpleline;
        double x;
        double y;
 
        double x;
        double y;
 
-       simpleline = GTK_CANVAS_SIMPLELINE (item);
+       simpleline = GNOME_CANVAS_SIMPLELINE (item);
 
        if (parent_class->update)
                (* parent_class->update) (item, affine, clip_path, flags);
 
 
        if (parent_class->update)
                (* parent_class->update) (item, affine, clip_path, flags);
 
-       gtk_canvas_simpleline_reset_bounds (item);
+       gnome_canvas_simpleline_reset_bounds (item);
 
        x = simpleline->x1;
        y = simpleline->y1;
 
 
        x = simpleline->x1;
        y = simpleline->y1;
 
-       gtk_canvas_item_i2w (item, &x, &y);
-       gtk_canvas_w2c (GTK_CANVAS(item->canvas), x, y, &simpleline->bbox_ulx, &simpleline->bbox_uly);
+       gnome_canvas_item_i2w (item, &x, &y);
+       gnome_canvas_w2c (GNOME_CANVAS(item->canvas), x, y, &simpleline->bbox_ulx, &simpleline->bbox_uly);
 
        x = simpleline->x2;
        y = simpleline->y2;
 
 
        x = simpleline->x2;
        y = simpleline->y2;
 
-       gtk_canvas_item_i2w (item, &x, &y);
-       gtk_canvas_w2c (GTK_CANVAS(item->canvas), x, y, &simpleline->bbox_lrx, &simpleline->bbox_lry);
+       gnome_canvas_item_i2w (item, &x, &y);
+       gnome_canvas_w2c (GNOME_CANVAS(item->canvas), x, y, &simpleline->bbox_lrx, &simpleline->bbox_lry);
 }
 
 static void
 }
 
 static void
-gtk_canvas_simpleline_render (GtkCanvasItem *item,
-                             GtkCanvasBuf *buf)
+gnome_canvas_simpleline_render (GnomeCanvasItem *item,
+                             GnomeCanvasBuf *buf)
 {
 {
-       GtkCanvasSimpleLine *simpleline;
+       GnomeCanvasSimpleLine *simpleline;
        int end, begin;
 
        int end, begin;
 
-       simpleline = GTK_CANVAS_SIMPLELINE (item);
+       simpleline = GNOME_CANVAS_SIMPLELINE (item);
 
        if (parent_class->render) {
                (*parent_class->render) (item, buf);
        }
 
        if (buf->is_bg) {
 
        if (parent_class->render) {
                (*parent_class->render) (item, buf);
        }
 
        if (buf->is_bg) {
-               gtk_canvas_buf_ensure_buf (buf);
+               gnome_canvas_buf_ensure_buf (buf);
                buf->is_bg = FALSE;
        }
 
                buf->is_bg = FALSE;
        }
 
@@ -302,14 +302,14 @@ gtk_canvas_simpleline_render (GtkCanvasItem *item,
 }
 
 static void
 }
 
 static void
-gtk_canvas_simpleline_draw (GtkCanvasItem *item,
+gnome_canvas_simpleline_draw (GnomeCanvasItem *item,
                            GdkDrawable *drawable,
                            int x, int y,
                            int width, int height)
 {
                            GdkDrawable *drawable,
                            int x, int y,
                            int width, int height)
 {
-       GtkCanvasSimpleLine *simpleline;
+       GnomeCanvasSimpleLine *simpleline;
 
 
-       simpleline = GTK_CANVAS_SIMPLELINE (item);
+       simpleline = GNOME_CANVAS_SIMPLELINE (item);
 
        if (parent_class->draw) {
                (* parent_class->draw) (item, drawable, x, y, width, height);
 
        if (parent_class->draw) {
                (* parent_class->draw) (item, drawable, x, y, width, height);
@@ -320,9 +320,9 @@ gtk_canvas_simpleline_draw (GtkCanvasItem *item,
 }
 
 static void
 }
 
 static void
-gtk_canvas_simpleline_bounds (GtkCanvasItem *item, double *x1, double *y1, double *x2, double *y2)
+gnome_canvas_simpleline_bounds (GnomeCanvasItem *item, double *x1, double *y1, double *x2, double *y2)
 {
 {
-       GtkCanvasSimpleLine *simpleline = GTK_CANVAS_SIMPLELINE (item);
+       GnomeCanvasSimpleLine *simpleline = GNOME_CANVAS_SIMPLELINE (item);
 
        *x1 = simpleline->x1;
        *y1 = simpleline->y1;
 
        *x1 = simpleline->x1;
        *y1 = simpleline->y1;
@@ -331,19 +331,19 @@ gtk_canvas_simpleline_bounds (GtkCanvasItem *item, double *x1, double *y1, doubl
 }
 
 static double
 }
 
 static double
-gtk_canvas_simpleline_point (GtkCanvasItem *item, double x, double y, int cx, int cy, GtkCanvasItem **actual_item)
+gnome_canvas_simpleline_point (GnomeCanvasItem *item, double x, double y, int cx, int cy, GnomeCanvasItem **actual_item)
 {
 {
-       GtkCanvasSimpleLine *simpleline;
+       GnomeCanvasSimpleLine *simpleline;
        double x1, y1, x2, y2;
        double dx, dy;
 
        double x1, y1, x2, y2;
        double dx, dy;
 
-       simpleline = GTK_CANVAS_SIMPLELINE (item);
+       simpleline = GNOME_CANVAS_SIMPLELINE (item);
 
        *actual_item = item;
 
        /* Find the bounds for the rectangle plus its outline width */
 
 
        *actual_item = item;
 
        /* Find the bounds for the rectangle plus its outline width */
 
-       gtk_canvas_simpleline_bounds (item, &x1, &y1, &x2, &y2);
+       gnome_canvas_simpleline_bounds (item, &x1, &y1, &x2, &y2);
 
        /* Is point inside rectangle */
        
 
        /* Is point inside rectangle */
        
index f46f54d82804d29a5b02a49ded14a32b459ad65e..7a8a318985ddba984ec9453d8744a6ff9bfdd0a9 100644 (file)
@@ -1,4 +1,4 @@
-/* gtk-canvas-simpleline.h: GtkCanvas item for simple rects
+/* libgnomecanvas/gnome-canvas-simpleline.h: GnomeCanvas item for simple rects
  *
  * Copyright (C) 2001 Paul Davis <pbd@op.net>
  *
  *
  * Copyright (C) 2001 Paul Davis <pbd@op.net>
  *
  *
  */
 
  *
  */
 
-#ifndef __GTK_CANVAS_SIMPLELINE_H__
-#define __GTK_CANVAS_SIMPLELINE_H__
+#ifndef __GNOME_CANVAS_SIMPLELINE_H__
+#define __GNOME_CANVAS_SIMPLELINE_H__
 
 #include <stdint.h>
 
 
 #include <stdint.h>
 
-#include <gtk-canvas/gtk-canvas-defs.h>
-#include "gtk-canvas/gtk-canvas.h"
+#include <libgnomecanvas/libgnomecanvas.h>
 
 
-BEGIN_GTK_CANVAS_DECLS
+BEGIN_GNOME_CANVAS_DECLS
 
 /* Wave viewer item for canvas.
  */
 
 
 /* Wave viewer item for canvas.
  */
 
-#define GTK_CANVAS_TYPE_CANVAS_SIMPLELINE            (gtk_canvas_simpleline_get_type ())
-#define GTK_CANVAS_SIMPLELINE(obj)                   (GTK_CHECK_CAST ((obj), GTK_CANVAS_TYPE_CANVAS_SIMPLELINE, GtkCanvasSimpleLine))
-#define GTK_CANVAS_SIMPLELINE_CLASS(klass)           (GTK_CHECK_CLASS_CAST ((klass), GTK_CANVAS_TYPE_CANVAS_SIMPLELINE, GtkCanvasSimpleLineClass))
-#define GTK_CANVAS_IS_CANVAS_SIMPLELINE(obj)         (GTK_CHECK_TYPE ((obj), GTK_CANVAS_TYPE_CANVAS_SIMPLELINE))
-#define GTK_CANVAS_IS_CANVAS_SIMPLELINE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_CANVAS_TYPE_CANVAS_SIMPLELINE))
+#define GNOME_CANVAS_TYPE_CANVAS_SIMPLELINE            (gnome_canvas_simpleline_get_type ())
+#define GNOME_CANVAS_SIMPLELINE(obj)                   (GTK_CHECK_CAST ((obj), GNOME_CANVAS_TYPE_CANVAS_SIMPLELINE, GnomeCanvasSimpleLine))
+#define GNOME_CANVAS_SIMPLELINE_CLASS(klass)           (GTK_CHECK_CLASS_CAST ((klass), GNOME_CANVAS_TYPE_CANVAS_SIMPLELINE, GnomeCanvasSimpleLineClass))
+#define GNOME_CANVAS_IS_CANVAS_SIMPLELINE(obj)         (GTK_CHECK_TYPE ((obj), GNOME_CANVAS_TYPE_CANVAS_SIMPLELINE))
+#define GNOME_CANVAS_IS_CANVAS_SIMPLELINE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GNOME_CANVAS_TYPE_CANVAS_SIMPLELINE))
 
 
-typedef struct _GtkCanvasSimpleLine            GtkCanvasSimpleLine;
-typedef struct _GtkCanvasSimpleLineClass       GtkCanvasSimpleLineClass;
+typedef struct _GnomeCanvasSimpleLine            GnomeCanvasSimpleLine;
+typedef struct _GnomeCanvasSimpleLineClass       GnomeCanvasSimpleLineClass;
 
 
-struct _GtkCanvasSimpleLine
+struct _GnomeCanvasSimpleLine
 {
 {
-    GtkCanvasItem item;
+    GnomeCanvasItem item;
     double x1, y1, x2, y2;
     uint32_t color;
     gboolean horizontal;
     double x1, y1, x2, y2;
     uint32_t color;
     gboolean horizontal;
@@ -55,12 +54,12 @@ struct _GtkCanvasSimpleLine
     guint32 bbox_lrx, bbox_lry;
 };
 
     guint32 bbox_lrx, bbox_lry;
 };
 
-struct _GtkCanvasSimpleLineClass {
-       GtkCanvasItemClass parent_class;
+struct _GnomeCanvasSimpleLineClass {
+       GnomeCanvasItemClass parent_class;
 };
 
 };
 
-GtkType gtk_canvas_simpleline_get_type (void);
+GtkType gnome_canvas_simpleline_get_type (void);
 
 
-END_GTK_CANVAS_DECLS
+END_GNOME_CANVAS_DECLS
 
 
-#endif /* __GTK_CANVAS_SIMPLELINE_H__ */
+#endif /* __GNOME_CANVAS_SIMPLELINE_H__ */
index 4ee4985a2c7c64839171e5c712473392aea0f826..661d8e0a49fea5588d13d4d36fad86afd7ab518b 100644 (file)
@@ -1,6 +1,6 @@
 #include <stdio.h>
 #include <math.h>
 #include <stdio.h>
 #include <math.h>
-#include <gtk-canvas.h>
+#include <libgnomecanvas/libgnomecanvas.h>
 
 #include "canvas-simplerect.h"
 #include "rgb_macros.h"
 
 #include "canvas-simplerect.h"
 #include "rgb_macros.h"
@@ -20,81 +20,81 @@ enum {
        
 };
 
        
 };
 
-static void gtk_canvas_simplerect_class_init (GtkCanvasSimpleRectClass *class);
-static void gtk_canvas_simplerect_init       (GtkCanvasSimpleRect      *simplerect);
-static void gtk_canvas_simplerect_set_arg    (GtkObject              *object,
+static void gnome_canvas_simplerect_class_init (GnomeCanvasSimpleRectClass *class);
+static void gnome_canvas_simplerect_init       (GnomeCanvasSimpleRect      *simplerect);
+static void gnome_canvas_simplerect_set_arg    (GtkObject              *object,
                                              GtkArg                 *arg,
                                              guint                   arg_id);
                                              GtkArg                 *arg,
                                              guint                   arg_id);
-static void gtk_canvas_simplerect_get_arg    (GtkObject              *object,
+static void gnome_canvas_simplerect_get_arg    (GtkObject              *object,
                                              GtkArg                 *arg,
                                              guint                   arg_id);
 
                                              GtkArg                 *arg,
                                              guint                   arg_id);
 
-static void   gtk_canvas_simplerect_update      (GtkCanvasItem *item, double *affine, ArtSVP *clip_path, int flags);
-static void   gtk_canvas_simplerect_bounds      (GtkCanvasItem *item, double *x1, double *y1, double *x2, double *y2);
-static double gtk_canvas_simplerect_point (GtkCanvasItem *item, double x, double y, int cx, int cy, GtkCanvasItem **actual_item);
-static void   gtk_canvas_simplerect_render (GtkCanvasItem *item, GtkCanvasBuf *buf);
-static void   gtk_canvas_simplerect_draw (GtkCanvasItem *item, GdkDrawable *drawable, int x, int y, int w, int h);
+static void   gnome_canvas_simplerect_update      (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, int flags);
+static void   gnome_canvas_simplerect_bounds      (GnomeCanvasItem *item, double *x1, double *y1, double *x2, double *y2);
+static double gnome_canvas_simplerect_point (GnomeCanvasItem *item, double x, double y, int cx, int cy, GnomeCanvasItem **actual_item);
+static void   gnome_canvas_simplerect_render (GnomeCanvasItem *item, GnomeCanvasBuf *buf);
+static void   gnome_canvas_simplerect_draw (GnomeCanvasItem *item, GdkDrawable *drawable, int x, int y, int w, int h);
 
 
-static GtkCanvasItemClass *parent_class;
+static GnomeCanvasItemClass *parent_class;
 
 
 GtkType
 
 
 GtkType
-gtk_canvas_simplerect_get_type (void)
+gnome_canvas_simplerect_get_type (void)
 {
        static GtkType simplerect_type = 0;
 
        if (!simplerect_type) {
                GtkTypeInfo simplerect_info = {
 {
        static GtkType simplerect_type = 0;
 
        if (!simplerect_type) {
                GtkTypeInfo simplerect_info = {
-                       "GtkCanvasSimpleRect",
-                       sizeof (GtkCanvasSimpleRect),
-                       sizeof (GtkCanvasSimpleRectClass),
-                       (GtkClassInitFunc) gtk_canvas_simplerect_class_init,
-                       (GtkObjectInitFunc) gtk_canvas_simplerect_init,
+                       "GnomeCanvasSimpleRect",
+                       sizeof (GnomeCanvasSimpleRect),
+                       sizeof (GnomeCanvasSimpleRectClass),
+                       (GtkClassInitFunc) gnome_canvas_simplerect_class_init,
+                       (GtkObjectInitFunc) gnome_canvas_simplerect_init,
                        NULL, /* reserved_1 */
                        NULL, /* reserved_2 */
                        (GtkClassInitFunc) NULL
                };
 
                        NULL, /* reserved_1 */
                        NULL, /* reserved_2 */
                        (GtkClassInitFunc) NULL
                };
 
-               simplerect_type = gtk_type_unique (gtk_canvas_item_get_type (), &simplerect_info);
+               simplerect_type = gtk_type_unique (gnome_canvas_item_get_type (), &simplerect_info);
        }
 
        return simplerect_type;
 }
 
 static void
        }
 
        return simplerect_type;
 }
 
 static void
-gtk_canvas_simplerect_class_init (GtkCanvasSimpleRectClass *class)
+gnome_canvas_simplerect_class_init (GnomeCanvasSimpleRectClass *class)
 {
        GtkObjectClass *object_class;
 {
        GtkObjectClass *object_class;
-       GtkCanvasItemClass *item_class;
+       GnomeCanvasItemClass *item_class;
 
        object_class = (GtkObjectClass *) class;
 
        object_class = (GtkObjectClass *) class;
-       item_class = (GtkCanvasItemClass *) class;
-
-       parent_class = gtk_type_class (gtk_canvas_item_get_type ());
-
-       gtk_object_add_arg_type ("GtkCanvasSimpleRect::x1", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_X1);
-       gtk_object_add_arg_type ("GtkCanvasSimpleRect::y1", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_Y1);
-       gtk_object_add_arg_type ("GtkCanvasSimpleRect::x2", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_X2);
-       gtk_object_add_arg_type ("GtkCanvasSimpleRect::y2", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_Y2);
-       gtk_object_add_arg_type ("GtkCanvasSimpleRect::fill", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_FILL);
-       gtk_object_add_arg_type ("GtkCanvasSimpleRect::draw", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_DRAW);
-       gtk_object_add_arg_type ("GtkCanvasSimpleRect::fill_color_rgba", GTK_TYPE_INT, GTK_ARG_READWRITE, ARG_FILL_COLOR_RGBA);
-       gtk_object_add_arg_type ("GtkCanvasSimpleRect::outline_color_rgba", GTK_TYPE_INT, GTK_ARG_READWRITE, ARG_OUTLINE_COLOR_RGBA);
-       gtk_object_add_arg_type ("GtkCanvasSimpleRect::outline_pixels", GTK_TYPE_INT, GTK_ARG_READWRITE, ARG_OUTLINE_PIXELS);
-       gtk_object_add_arg_type ("GtkCanvasSimpleRect::outline_what", GTK_TYPE_INT, GTK_ARG_READWRITE, ARG_OUTLINE_WHAT);
-
-       object_class->set_arg = gtk_canvas_simplerect_set_arg;
-       object_class->get_arg = gtk_canvas_simplerect_get_arg;
-
-       item_class->update = gtk_canvas_simplerect_update;
-       item_class->bounds = gtk_canvas_simplerect_bounds;
-       item_class->point = gtk_canvas_simplerect_point;
-       item_class->render = gtk_canvas_simplerect_render;
-       item_class->draw = gtk_canvas_simplerect_draw;
+       item_class = (GnomeCanvasItemClass *) class;
+
+       parent_class = gtk_type_class (gnome_canvas_item_get_type ());
+
+       gtk_object_add_arg_type ("GnomeCanvasSimpleRect::x1", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_X1);
+       gtk_object_add_arg_type ("GnomeCanvasSimpleRect::y1", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_Y1);
+       gtk_object_add_arg_type ("GnomeCanvasSimpleRect::x2", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_X2);
+       gtk_object_add_arg_type ("GnomeCanvasSimpleRect::y2", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_Y2);
+       gtk_object_add_arg_type ("GnomeCanvasSimpleRect::fill", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_FILL);
+       gtk_object_add_arg_type ("GnomeCanvasSimpleRect::draw", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_DRAW);
+       gtk_object_add_arg_type ("GnomeCanvasSimpleRect::fill_color_rgba", GTK_TYPE_INT, GTK_ARG_READWRITE, ARG_FILL_COLOR_RGBA);
+       gtk_object_add_arg_type ("GnomeCanvasSimpleRect::outline_color_rgba", GTK_TYPE_INT, GTK_ARG_READWRITE, ARG_OUTLINE_COLOR_RGBA);
+       gtk_object_add_arg_type ("GnomeCanvasSimpleRect::outline_pixels", GTK_TYPE_INT, GTK_ARG_READWRITE, ARG_OUTLINE_PIXELS);
+       gtk_object_add_arg_type ("GnomeCanvasSimpleRect::outline_what", GTK_TYPE_INT, GTK_ARG_READWRITE, ARG_OUTLINE_WHAT);
+
+       object_class->set_arg = gnome_canvas_simplerect_set_arg;
+       object_class->get_arg = gnome_canvas_simplerect_get_arg;
+
+       item_class->update = gnome_canvas_simplerect_update;
+       item_class->bounds = gnome_canvas_simplerect_bounds;
+       item_class->point = gnome_canvas_simplerect_point;
+       item_class->render = gnome_canvas_simplerect_render;
+       item_class->draw = gnome_canvas_simplerect_draw;
 }
 
 static void
 }
 
 static void
-gtk_canvas_simplerect_init (GtkCanvasSimpleRect *simplerect)
+gnome_canvas_simplerect_init (GnomeCanvasSimpleRect *simplerect)
 {
        simplerect->x1 = 0.0;
        simplerect->y1 = 0.0;
 {
        simplerect->x1 = 0.0;
        simplerect->y1 = 0.0;
@@ -108,13 +108,13 @@ gtk_canvas_simplerect_init (GtkCanvasSimpleRect *simplerect)
        simplerect->outline_pixels = 1;
        simplerect->outline_what = 0xf;
 
        simplerect->outline_pixels = 1;
        simplerect->outline_what = 0xf;
 
-       GTK_CANVAS_ITEM(simplerect)->object.flags |= GTK_CANVAS_ITEM_NO_AUTO_REDRAW;
+       GNOME_CANVAS_ITEM(simplerect)->object.flags |= GNOME_CANVAS_ITEM_NO_AUTO_REDRAW;
 }
 
 static void
 }
 
 static void
-gtk_canvas_simplerect_bounds (GtkCanvasItem *item, double *x1, double *y1, double *x2, double *y2)
+gnome_canvas_simplerect_bounds (GnomeCanvasItem *item, double *x1, double *y1, double *x2, double *y2)
 {
 {
-       GtkCanvasSimpleRect *simplerect = GTK_CANVAS_SIMPLERECT (item);
+       GnomeCanvasSimpleRect *simplerect = GNOME_CANVAS_SIMPLERECT (item);
 
        *x1 = simplerect->x1;
        *y1 = simplerect->y1;
 
        *x1 = simplerect->x1;
        *y1 = simplerect->y1;
@@ -124,9 +124,9 @@ gtk_canvas_simplerect_bounds (GtkCanvasItem *item, double *x1, double *y1, doubl
 }
 
 static void 
 }
 
 static void 
-gtk_canvas_simplerect_reset_bounds (GtkCanvasItem *item)
+gnome_canvas_simplerect_reset_bounds (GnomeCanvasItem *item)
 {
 {
-       GtkCanvasSimpleRect* simplerect;
+       GnomeCanvasSimpleRect* simplerect;
        double x1, x2, y1, y2;
        double old_x1, old_x2, old_y1, old_y2;
        double a, b;
        double x1, x2, y1, y2;
        double old_x1, old_x2, old_y1, old_y2;
        double a, b;
@@ -136,9 +136,9 @@ gtk_canvas_simplerect_reset_bounds (GtkCanvasItem *item)
        old_x2 = item->x2;
        old_y2 = item->y2;
 
        old_x2 = item->x2;
        old_y2 = item->y2;
 
-       gtk_canvas_simplerect_bounds (item, &x1, &y1, &x2, &y2);
-       gtk_canvas_item_i2w (item, &x1, &y1);
-       gtk_canvas_item_i2w (item, &x2, &y2);
+       gnome_canvas_simplerect_bounds (item, &x1, &y1, &x2, &y2);
+       gnome_canvas_item_i2w (item, &x1, &y1);
+       gnome_canvas_item_i2w (item, &x2, &y2);
 
        item->x1 = x1;
        item->y1 = y1;
 
        item->x1 = x1;
        item->y1 = y1;
@@ -147,10 +147,10 @@ gtk_canvas_simplerect_reset_bounds (GtkCanvasItem *item)
 
        /* now compute bounding box in canvas units */
 
 
        /* now compute bounding box in canvas units */
 
-       simplerect = GTK_CANVAS_SIMPLERECT (item);
+       simplerect = GNOME_CANVAS_SIMPLERECT (item);
 
 
-       gtk_canvas_w2c (GTK_CANVAS(item->canvas), x1, y1, &simplerect->bbox_ulx, &simplerect->bbox_uly);
-       gtk_canvas_w2c (GTK_CANVAS(item->canvas), x2, y2, &simplerect->bbox_lrx, &simplerect->bbox_lry);
+       gnome_canvas_w2c (GNOME_CANVAS(item->canvas), x1, y1, &simplerect->bbox_ulx, &simplerect->bbox_uly);
+       gnome_canvas_w2c (GNOME_CANVAS(item->canvas), x2, y2, &simplerect->bbox_lrx, &simplerect->bbox_lry);
 
        /* now queue redraws for changed areas */
 
 
        /* now queue redraws for changed areas */
 
@@ -160,7 +160,7 @@ gtk_canvas_simplerect_reset_bounds (GtkCanvasItem *item)
                
                a = MIN(item->x1, old_x1); 
                b = MAX(item->x1, old_x1);
                
                a = MIN(item->x1, old_x1); 
                b = MAX(item->x1, old_x1);
-               gtk_canvas_request_redraw (item->canvas, a - 1, item->y1, b + 1, item->y2);
+               gnome_canvas_request_redraw (item->canvas, a - 1, item->y1, b + 1, item->y2);
        }
        
        if (item->x2 != old_x2) {
        }
        
        if (item->x2 != old_x2) {
@@ -169,7 +169,7 @@ gtk_canvas_simplerect_reset_bounds (GtkCanvasItem *item)
                
                a = MIN(item->x2, old_x2);
                b = MAX(item->x2, old_x2);
                
                a = MIN(item->x2, old_x2);
                b = MAX(item->x2, old_x2);
-               gtk_canvas_request_redraw (item->canvas, a - 1, item->y1, b + 1, item->y2);
+               gnome_canvas_request_redraw (item->canvas, a - 1, item->y1, b + 1, item->y2);
        }
        
        if (item->y1 != old_y1) {
        }
        
        if (item->y1 != old_y1) {
@@ -178,7 +178,7 @@ gtk_canvas_simplerect_reset_bounds (GtkCanvasItem *item)
                
                a = MIN(item->y1, old_y1);
                b = MAX(item->y1, old_y1);
                
                a = MIN(item->y1, old_y1);
                b = MAX(item->y1, old_y1);
-               gtk_canvas_request_redraw (item->canvas, item->x1, a - 1, item->x2, b + 1);
+               gnome_canvas_request_redraw (item->canvas, item->x1, a - 1, item->x2, b + 1);
        }
        
        if (item->y2 != old_y2) {
        }
        
        if (item->y2 != old_y2) {
@@ -187,7 +187,7 @@ gtk_canvas_simplerect_reset_bounds (GtkCanvasItem *item)
                
                a = MIN(item->y2, old_y2);
                b = MAX(item->y2, old_y2);
                
                a = MIN(item->y2, old_y2);
                b = MAX(item->y2, old_y2);
-               gtk_canvas_request_redraw (item->canvas, item->x1, a - 1, item->x2, b + 1);
+               gnome_canvas_request_redraw (item->canvas, item->x1, a - 1, item->x2, b + 1);
        }
 }
 
        }
 }
 
@@ -196,15 +196,15 @@ gtk_canvas_simplerect_reset_bounds (GtkCanvasItem *item)
  */
 
 static void
  */
 
 static void
-gtk_canvas_simplerect_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
+gnome_canvas_simplerect_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
 {
 {
-       GtkCanvasItem *item;
-       GtkCanvasSimpleRect *simplerect;
+       GnomeCanvasItem *item;
+       GnomeCanvasSimpleRect *simplerect;
        int update;
        int bounds_changed;
 
        int update;
        int bounds_changed;
 
-       item = GTK_CANVAS_ITEM (object);
-       simplerect = GTK_CANVAS_SIMPLERECT (object);
+       item = GNOME_CANVAS_ITEM (object);
+       simplerect = GNOME_CANVAS_SIMPLERECT (object);
 
        update = FALSE;
        bounds_changed = FALSE;
 
        update = FALSE;
        bounds_changed = FALSE;
@@ -288,16 +288,16 @@ gtk_canvas_simplerect_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
        simplerect->full_draw_on_update = update;
 
        if (update || bounds_changed) {
        simplerect->full_draw_on_update = update;
 
        if (update || bounds_changed) {
-               gtk_canvas_item_request_update (item);
+               gnome_canvas_item_request_update (item);
        }
 }
 
 static void
        }
 }
 
 static void
-gtk_canvas_simplerect_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
+gnome_canvas_simplerect_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
 {
 {
-       GtkCanvasSimpleRect *simplerect;
+       GnomeCanvasSimpleRect *simplerect;
 
 
-       simplerect = GTK_CANVAS_SIMPLERECT (object);
+       simplerect = GNOME_CANVAS_SIMPLERECT (object);
 
        switch (arg_id) {
        case ARG_X1:
 
        switch (arg_id) {
        case ARG_X1:
@@ -337,20 +337,20 @@ gtk_canvas_simplerect_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
 }
 
 static void
 }
 
 static void
-gtk_canvas_simplerect_update (GtkCanvasItem *item, double *affine, ArtSVP *clip_path, int flags)
+gnome_canvas_simplerect_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, int flags)
 {
 {
-       GtkCanvasSimpleRect *simplerect;
+       GnomeCanvasSimpleRect *simplerect;
        unsigned char foo;
 
        unsigned char foo;
 
-       simplerect = GTK_CANVAS_SIMPLERECT (item);
+       simplerect = GNOME_CANVAS_SIMPLERECT (item);
 
        if (parent_class->update)
                (* parent_class->update) (item, affine, clip_path, flags);
 
 
        if (parent_class->update)
                (* parent_class->update) (item, affine, clip_path, flags);
 
-       gtk_canvas_simplerect_reset_bounds (item);
+       gnome_canvas_simplerect_reset_bounds (item);
 
        if (simplerect->full_draw_on_update) {
 
        if (simplerect->full_draw_on_update) {
-               gtk_canvas_request_redraw (item->canvas, 
+               gnome_canvas_request_redraw (item->canvas, 
                                           simplerect->bbox_ulx,
                                           simplerect->bbox_uly,
                                           simplerect->bbox_lrx+1,
                                           simplerect->bbox_ulx,
                                           simplerect->bbox_uly,
                                           simplerect->bbox_lrx+1,
@@ -366,17 +366,17 @@ gtk_canvas_simplerect_update (GtkCanvasItem *item, double *affine, ArtSVP *clip_
 #ifdef SIMPLERECT_FAST_RENDERER
 
 static void
 #ifdef SIMPLERECT_FAST_RENDERER
 
 static void
-gtk_canvas_simplerect_render (GtkCanvasItem *item,
-                             GtkCanvasBuf *buf)
+gnome_canvas_simplerect_render (GnomeCanvasItem *item,
+                             GnomeCanvasBuf *buf)
 {
 {
-       GtkCanvasSimpleRect *simplerect;
+       GnomeCanvasSimpleRect *simplerect;
        int end, begin;
        int ey, sy;
        unsigned int i;
        ArtIRect intersection;
        ArtIRect self;
 
        int end, begin;
        int ey, sy;
        unsigned int i;
        ArtIRect intersection;
        ArtIRect self;
 
-       simplerect = GTK_CANVAS_SIMPLERECT (item);
+       simplerect = GNOME_CANVAS_SIMPLERECT (item);
 
        if (parent_class->render) {
                (*parent_class->render) (item, buf);
 
        if (parent_class->render) {
                (*parent_class->render) (item, buf);
@@ -393,7 +393,7 @@ gtk_canvas_simplerect_render (GtkCanvasItem *item,
                // randb = random() % 255;
                // PAINT_BOX(buf, randr, randg, randb, 255, buf->rect.x0, buf->rect.y0, buf->rect.x1, buf->rect.y1);
 
                // randb = random() % 255;
                // PAINT_BOX(buf, randr, randg, randb, 255, buf->rect.x0, buf->rect.y0, buf->rect.x1, buf->rect.y1);
 
-               gtk_canvas_buf_ensure_buf (buf);
+               gnome_canvas_buf_ensure_buf (buf);
                buf->is_bg = FALSE;
        }
 
                buf->is_bg = FALSE;
        }
 
@@ -458,15 +458,15 @@ gtk_canvas_simplerect_render (GtkCanvasItem *item,
 #else /* SIMPLERECT_FAST_RENDERER */
 
 static void
 #else /* SIMPLERECT_FAST_RENDERER */
 
 static void
-gtk_canvas_simplerect_render (GtkCanvasItem *item,
-                             GtkCanvasBuf *buf)
+gnome_canvas_simplerect_render (GnomeCanvasItem *item,
+                             GnomeCanvasBuf *buf)
 {
 {
-       GtkCanvasSimpleRect *simplerect;
+       GnomeCanvasSimpleRect *simplerect;
        int end, begin;
        int ey, sy;
        unsigned int i;
 
        int end, begin;
        int ey, sy;
        unsigned int i;
 
-       simplerect = GTK_CANVAS_SIMPLERECT (item);
+       simplerect = GNOME_CANVAS_SIMPLERECT (item);
 
        if (parent_class->render) {
                (*parent_class->render) (item, buf);
 
        if (parent_class->render) {
                (*parent_class->render) (item, buf);
@@ -483,7 +483,7 @@ gtk_canvas_simplerect_render (GtkCanvasItem *item,
                // randb = random() % 255;
                // PAINT_BOX(buf, randr, randg, randb, 255, buf->rect.x0, buf->rect.y0, buf->rect.x1, buf->rect.y1);
 
                // randb = random() % 255;
                // PAINT_BOX(buf, randr, randg, randb, 255, buf->rect.x0, buf->rect.y0, buf->rect.x1, buf->rect.y1);
 
-               gtk_canvas_buf_ensure_buf (buf);
+               gnome_canvas_buf_ensure_buf (buf);
                buf->is_bg = FALSE;
        }
 
                buf->is_bg = FALSE;
        }
 
@@ -537,7 +537,7 @@ gtk_canvas_simplerect_render (GtkCanvasItem *item,
 #endif /* SIMPLERECT_FAST_RENDERER */
 
 static void
 #endif /* SIMPLERECT_FAST_RENDERER */
 
 static void
-gtk_canvas_simplerect_draw (GtkCanvasItem *item,
+gnome_canvas_simplerect_draw (GnomeCanvasItem *item,
                            GdkDrawable *drawable,
                            int x, int y,
                            int width, int height)
                            GdkDrawable *drawable,
                            int x, int y,
                            int width, int height)
@@ -547,19 +547,19 @@ gtk_canvas_simplerect_draw (GtkCanvasItem *item,
 }
 
 static double
 }
 
 static double
-gtk_canvas_simplerect_point (GtkCanvasItem *item, double x, double y, int cx, int cy, GtkCanvasItem **actual_item)
+gnome_canvas_simplerect_point (GnomeCanvasItem *item, double x, double y, int cx, int cy, GnomeCanvasItem **actual_item)
 {
 {
-       GtkCanvasSimpleRect *simplerect;
+       GnomeCanvasSimpleRect *simplerect;
        double x1, y1, x2, y2;
        double dx, dy;
 
        double x1, y1, x2, y2;
        double dx, dy;
 
-       simplerect = GTK_CANVAS_SIMPLERECT (item);
+       simplerect = GNOME_CANVAS_SIMPLERECT (item);
 
        *actual_item = item;
 
        /* Find the bounds for the rectangle plus its outline width */
 
 
        *actual_item = item;
 
        /* Find the bounds for the rectangle plus its outline width */
 
-       gtk_canvas_simplerect_bounds (item, &x1, &y1, &x2, &y2);
+       gnome_canvas_simplerect_bounds (item, &x1, &y1, &x2, &y2);
 
        /* Is point inside rectangle */
        
 
        /* Is point inside rectangle */
        
index f15cb40548af9467240e59dd33b4127ecc69d96a..b3ae7d1f566efdeced4843a7676195409908116a 100644 (file)
@@ -1,4 +1,4 @@
-/* gtk-canvas-simplerect.h: GtkCanvas item for simple rects
+/* libgnomecanvas/gnome-canvas-simplerect.h: GnomeCanvas item for simple rects
  *
  * Copyright (C) 2001 Paul Davis <pbd@op.net>
  *
  *
  * Copyright (C) 2001 Paul Davis <pbd@op.net>
  *
  *
  */
 
  *
  */
 
-#ifndef __GTK_CANVAS_SIMPLERECT_H__
-#define __GTK_CANVAS_SIMPLERECT_H__
+#ifndef __GNOME_CANVAS_SIMPLERECT_H__
+#define __GNOME_CANVAS_SIMPLERECT_H__
 
 #include <stdint.h>
 
 
 #include <stdint.h>
 
-#include <gtk-canvas/gtk-canvas-defs.h>
-#include "gtk-canvas/gtk-canvas.h"
+#include <libgnomecanvas/libgnomecanvas.h>
 
 
-BEGIN_GTK_CANVAS_DECLS
+BEGIN_GNOME_CANVAS_DECLS
 
 /* Wave viewer item for canvas.
  */
 
 
 /* Wave viewer item for canvas.
  */
 
-#define GTK_CANVAS_TYPE_CANVAS_SIMPLERECT            (gtk_canvas_simplerect_get_type ())
-#define GTK_CANVAS_SIMPLERECT(obj)                   (GTK_CHECK_CAST ((obj), GTK_CANVAS_TYPE_CANVAS_SIMPLERECT, GtkCanvasSimpleRect))
-#define GTK_CANVAS_SIMPLERECT_CLASS(klass)           (GTK_CHECK_CLASS_CAST ((klass), GTK_CANVAS_TYPE_CANVAS_SIMPLERECT, GtkCanvasSimpleRectClass))
-#define GTK_CANVAS_IS_CANVAS_SIMPLERECT(obj)         (GTK_CHECK_TYPE ((obj), GTK_CANVAS_TYPE_CANVAS_SIMPLERECT))
-#define GTK_CANVAS_IS_CANVAS_SIMPLERECT_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_CANVAS_TYPE_CANVAS_SIMPLERECT))
+#define GNOME_CANVAS_TYPE_CANVAS_SIMPLERECT            (gnome_canvas_simplerect_get_type ())
+#define GNOME_CANVAS_SIMPLERECT(obj)                   (GTK_CHECK_CAST ((obj), GNOME_CANVAS_TYPE_CANVAS_SIMPLERECT, GnomeCanvasSimpleRect))
+#define GNOME_CANVAS_SIMPLERECT_CLASS(klass)           (GTK_CHECK_CLASS_CAST ((klass), GNOME_CANVAS_TYPE_CANVAS_SIMPLERECT, GnomeCanvasSimpleRectClass))
+#define GNOME_CANVAS_IS_CANVAS_SIMPLERECT(obj)         (GTK_CHECK_TYPE ((obj), GNOME_CANVAS_TYPE_CANVAS_SIMPLERECT))
+#define GNOME_CANVAS_IS_CANVAS_SIMPLERECT_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GNOME_CANVAS_TYPE_CANVAS_SIMPLERECT))
 
 
-typedef struct _GtkCanvasSimpleRect            GtkCanvasSimpleRect;
-typedef struct _GtkCanvasSimpleRectClass       GtkCanvasSimpleRectClass;
+typedef struct _GnomeCanvasSimpleRect            GnomeCanvasSimpleRect;
+typedef struct _GnomeCanvasSimpleRectClass       GnomeCanvasSimpleRectClass;
 
 
-struct _GtkCanvasSimpleRect
+struct _GnomeCanvasSimpleRect
 {
 {
-    GtkCanvasItem item;
+    GnomeCanvasItem item;
     double x1, y1, x2, y2;
     gboolean     fill;
     gboolean     draw;
     double x1, y1, x2, y2;
     gboolean     fill;
     gboolean     draw;
@@ -61,12 +60,12 @@ struct _GtkCanvasSimpleRect
     guint32 bbox_lrx, bbox_lry;
 };
 
     guint32 bbox_lrx, bbox_lry;
 };
 
-struct _GtkCanvasSimpleRectClass {
-       GtkCanvasItemClass parent_class;
+struct _GnomeCanvasSimpleRectClass {
+       GnomeCanvasItemClass parent_class;
 };
 
 };
 
-GtkType gtk_canvas_simplerect_get_type (void);
+GtkType gnome_canvas_simplerect_get_type (void);
 
 
-END_GTK_CANVAS_DECLS
+END_GNOME_CANVAS_DECLS
 
 
-#endif /* __GTK_CANVAS_SIMPLERECT_H__ */
+#endif /* __GNOME_CANVAS_SIMPLERECT_H__ */
index ce46811d2c33e97e7d6b3f030bc010ea0e9fdf92..3198c933b826ee1192c6e8273004f3b18eac35f4 100644 (file)
@@ -20,7 +20,7 @@
 
 #include <stdio.h>
 #include <math.h>
 
 #include <stdio.h>
 #include <math.h>
-#include <gtk-canvas.h>
+#include <libgnomecanvas/libgnomecanvas.h>
 #include <string.h>
 #include <limits.h>
 
 #include <string.h>
 #include <limits.h>
 
@@ -50,100 +50,100 @@ enum {
        ARG_REGION_START
 };
 
        ARG_REGION_START
 };
 
-static void gtk_canvas_waveview_class_init (GtkCanvasWaveViewClass *class);
-static void gtk_canvas_waveview_init       (GtkCanvasWaveView      *waveview);
-static void gtk_canvas_waveview_set_arg    (GtkObject              *object,
+static void gnome_canvas_waveview_class_init (GnomeCanvasWaveViewClass *class);
+static void gnome_canvas_waveview_init       (GnomeCanvasWaveView      *waveview);
+static void gnome_canvas_waveview_set_arg    (GtkObject              *object,
                                              GtkArg                 *arg,
                                              guint                   arg_id);
                                              GtkArg                 *arg,
                                              guint                   arg_id);
-static void gtk_canvas_waveview_get_arg    (GtkObject              *object,
+static void gnome_canvas_waveview_get_arg    (GtkObject              *object,
                                              GtkArg                 *arg,
                                              guint                   arg_id);
 
                                              GtkArg                 *arg,
                                              guint                   arg_id);
 
-static void   gtk_canvas_waveview_update      (GtkCanvasItem *item, double *affine, ArtSVP *clip_path, int flags);
-static void   gtk_canvas_waveview_bounds      (GtkCanvasItem *item, double *x1, double *y1, double *x2, double *y2);
-static double gtk_canvas_waveview_point (GtkCanvasItem *item, double x, double y, int cx, int cy, GtkCanvasItem **actual_item);
+static void   gnome_canvas_waveview_update      (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, int flags);
+static void   gnome_canvas_waveview_bounds      (GnomeCanvasItem *item, double *x1, double *y1, double *x2, double *y2);
+static double gnome_canvas_waveview_point (GnomeCanvasItem *item, double x, double y, int cx, int cy, GnomeCanvasItem **actual_item);
 
 
-static void gtk_canvas_waveview_render (GtkCanvasItem *item, GtkCanvasBuf *buf);
-static void gtk_canvas_waveview_draw (GtkCanvasItem *item, GdkDrawable *drawable, int x, int y, int w, int h);
+static void gnome_canvas_waveview_render (GnomeCanvasItem *item, GnomeCanvasBuf *buf);
+static void gnome_canvas_waveview_draw (GnomeCanvasItem *item, GdkDrawable *drawable, int x, int y, int w, int h);
 
 
-static void gtk_canvas_waveview_set_data_src      (GtkCanvasWaveView *, void *);
-static void gtk_canvas_waveview_set_channel      (GtkCanvasWaveView *, guint32);
+static void gnome_canvas_waveview_set_data_src      (GnomeCanvasWaveView *, void *);
+static void gnome_canvas_waveview_set_channel      (GnomeCanvasWaveView *, guint32);
 
 
-static gint32 gtk_canvas_waveview_ensure_cache (GtkCanvasWaveView *waveview, gulong start_sample, gulong end_sample);
+static gint32 gnome_canvas_waveview_ensure_cache (GnomeCanvasWaveView *waveview, gulong start_sample, gulong end_sample);
 
 
-static GtkCanvasItemClass *parent_class;
+static GnomeCanvasItemClass *parent_class;
 
 GtkType
 
 GtkType
-gtk_canvas_waveview_get_type (void)
+gnome_canvas_waveview_get_type (void)
 {
        static GtkType waveview_type = 0;
 
        if (!waveview_type) {
                GtkTypeInfo waveview_info = {
 {
        static GtkType waveview_type = 0;
 
        if (!waveview_type) {
                GtkTypeInfo waveview_info = {
-                       "GtkCanvasWaveView",
-                       sizeof (GtkCanvasWaveView),
-                       sizeof (GtkCanvasWaveViewClass),
-                       (GtkClassInitFunc) gtk_canvas_waveview_class_init,
-                       (GtkObjectInitFunc) gtk_canvas_waveview_init,
+                       "GnomeCanvasWaveView",
+                       sizeof (GnomeCanvasWaveView),
+                       sizeof (GnomeCanvasWaveViewClass),
+                       (GtkClassInitFunc) gnome_canvas_waveview_class_init,
+                       (GtkObjectInitFunc) gnome_canvas_waveview_init,
                        NULL, /* reserved_1 */
                        NULL, /* reserved_2 */
                        (GtkClassInitFunc) NULL
                };
 
                        NULL, /* reserved_1 */
                        NULL, /* reserved_2 */
                        (GtkClassInitFunc) NULL
                };
 
-               waveview_type = gtk_type_unique (gtk_canvas_item_get_type (), &waveview_info);
+               waveview_type = gtk_type_unique (gnome_canvas_item_get_type (), &waveview_info);
        }
 
        return waveview_type;
 }
 
 static void
        }
 
        return waveview_type;
 }
 
 static void
-gtk_canvas_waveview_class_init (GtkCanvasWaveViewClass *class)
+gnome_canvas_waveview_class_init (GnomeCanvasWaveViewClass *class)
 {
        GtkObjectClass *object_class;
 {
        GtkObjectClass *object_class;
-       GtkCanvasItemClass *item_class;
+       GnomeCanvasItemClass *item_class;
 
        object_class = (GtkObjectClass *) class;
 
        object_class = (GtkObjectClass *) class;
-       item_class = (GtkCanvasItemClass *) class;
-
-       parent_class = gtk_type_class (gtk_canvas_item_get_type ());
-
-       gtk_object_add_arg_type ("GtkCanvasWaveView::data_src", GTK_TYPE_POINTER, GTK_ARG_READWRITE, ARG_DATA_SRC);
-       gtk_object_add_arg_type ("GtkCanvasWaveView::channel", GTK_TYPE_POINTER, GTK_ARG_READWRITE, ARG_CHANNEL);
-       gtk_object_add_arg_type ("GtkCanvasWaveView::length_function", GTK_TYPE_POINTER, GTK_ARG_READWRITE, ARG_LENGTH_FUNCTION);
-       gtk_object_add_arg_type ("GtkCanvasWaveView::sourcefile_length_function", GTK_TYPE_POINTER, GTK_ARG_READWRITE, ARG_SOURCEFILE_LENGTH_FUNCTION);
-       gtk_object_add_arg_type ("GtkCanvasWaveView::peak_function", GTK_TYPE_POINTER, GTK_ARG_READWRITE, ARG_PEAK_FUNCTION);
-       gtk_object_add_arg_type ("GtkCanvasWaveView::gain_function", GTK_TYPE_POINTER, GTK_ARG_READWRITE, ARG_GAIN_FUNCTION);
-       gtk_object_add_arg_type ("GtkCanvasWaveView::gain_src", GTK_TYPE_POINTER, GTK_ARG_READWRITE, ARG_GAIN_SRC);
-       gtk_object_add_arg_type ("GtkCanvasWaveView::cache", GTK_TYPE_POINTER, GTK_ARG_READWRITE, ARG_CACHE);
-       gtk_object_add_arg_type ("GtkCanvasWaveView::cache_updater", GTK_TYPE_POINTER, GTK_ARG_READWRITE, ARG_CACHE_UPDATER);
-       gtk_object_add_arg_type ("GtkCanvasWaveView::samples_per_unit", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_SAMPLES_PER_PIXEL);
-       gtk_object_add_arg_type ("GtkCanvasWaveView::amplitude_above_axis", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_AMPLITUDE_ABOVE_AXIS);
-       gtk_object_add_arg_type ("GtkCanvasWaveView::x", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_X);
-       gtk_object_add_arg_type ("GtkCanvasWaveView::y", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_Y);
-       gtk_object_add_arg_type ("GtkCanvasWaveView::height", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_HEIGHT);
-       gtk_object_add_arg_type ("GtkCanvasWaveView::wave_color", GTK_TYPE_INT, GTK_ARG_READWRITE, ARG_WAVE_COLOR);
-       gtk_object_add_arg_type ("GtkCanvasWaveView::rectified", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_RECTIFIED);
-       gtk_object_add_arg_type ("GtkCanvasWaveView::region_start", GTK_TYPE_UINT, GTK_ARG_READWRITE, ARG_REGION_START);
-
-       object_class->set_arg = gtk_canvas_waveview_set_arg;
-       object_class->get_arg = gtk_canvas_waveview_get_arg;
-
-       item_class->update = gtk_canvas_waveview_update;
-       item_class->bounds = gtk_canvas_waveview_bounds;
-       item_class->point = gtk_canvas_waveview_point;
-       item_class->render = gtk_canvas_waveview_render;
-       item_class->draw = gtk_canvas_waveview_draw;
+       item_class = (GnomeCanvasItemClass *) class;
+
+       parent_class = gtk_type_class (gnome_canvas_item_get_type ());
+
+       gtk_object_add_arg_type ("GnomeCanvasWaveView::data_src", GTK_TYPE_POINTER, GTK_ARG_READWRITE, ARG_DATA_SRC);
+       gtk_object_add_arg_type ("GnomeCanvasWaveView::channel", GTK_TYPE_POINTER, GTK_ARG_READWRITE, ARG_CHANNEL);
+       gtk_object_add_arg_type ("GnomeCanvasWaveView::length_function", GTK_TYPE_POINTER, GTK_ARG_READWRITE, ARG_LENGTH_FUNCTION);
+       gtk_object_add_arg_type ("GnomeCanvasWaveView::sourcefile_length_function", GTK_TYPE_POINTER, GTK_ARG_READWRITE, ARG_SOURCEFILE_LENGTH_FUNCTION);
+       gtk_object_add_arg_type ("GnomeCanvasWaveView::peak_function", GTK_TYPE_POINTER, GTK_ARG_READWRITE, ARG_PEAK_FUNCTION);
+       gtk_object_add_arg_type ("GnomeCanvasWaveView::gain_function", GTK_TYPE_POINTER, GTK_ARG_READWRITE, ARG_GAIN_FUNCTION);
+       gtk_object_add_arg_type ("GnomeCanvasWaveView::gain_src", GTK_TYPE_POINTER, GTK_ARG_READWRITE, ARG_GAIN_SRC);
+       gtk_object_add_arg_type ("GnomeCanvasWaveView::cache", GTK_TYPE_POINTER, GTK_ARG_READWRITE, ARG_CACHE);
+       gtk_object_add_arg_type ("GnomeCanvasWaveView::cache_updater", GTK_TYPE_POINTER, GTK_ARG_READWRITE, ARG_CACHE_UPDATER);
+       gtk_object_add_arg_type ("GnomeCanvasWaveView::samples_per_unit", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_SAMPLES_PER_PIXEL);
+       gtk_object_add_arg_type ("GnomeCanvasWaveView::amplitude_above_axis", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_AMPLITUDE_ABOVE_AXIS);
+       gtk_object_add_arg_type ("GnomeCanvasWaveView::x", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_X);
+       gtk_object_add_arg_type ("GnomeCanvasWaveView::y", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_Y);
+       gtk_object_add_arg_type ("GnomeCanvasWaveView::height", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_HEIGHT);
+       gtk_object_add_arg_type ("GnomeCanvasWaveView::wave_color", GTK_TYPE_INT, GTK_ARG_READWRITE, ARG_WAVE_COLOR);
+       gtk_object_add_arg_type ("GnomeCanvasWaveView::rectified", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_RECTIFIED);
+       gtk_object_add_arg_type ("GnomeCanvasWaveView::region_start", GTK_TYPE_UINT, GTK_ARG_READWRITE, ARG_REGION_START);
+
+       object_class->set_arg = gnome_canvas_waveview_set_arg;
+       object_class->get_arg = gnome_canvas_waveview_get_arg;
+
+       item_class->update = gnome_canvas_waveview_update;
+       item_class->bounds = gnome_canvas_waveview_bounds;
+       item_class->point = gnome_canvas_waveview_point;
+       item_class->render = gnome_canvas_waveview_render;
+       item_class->draw = gnome_canvas_waveview_draw;
 }
 
 }
 
-GtkCanvasWaveViewCache*
-gtk_canvas_waveview_cache_new ()
+GnomeCanvasWaveViewCache*
+gnome_canvas_waveview_cache_new ()
 {
 {
-       GtkCanvasWaveViewCache *c;
+       GnomeCanvasWaveViewCache *c;
 
 
-       c = g_malloc (sizeof (GtkCanvasWaveViewCache));
+       c = g_malloc (sizeof (GnomeCanvasWaveViewCache));
 
        c->allocated = 2048;
 
        c->allocated = 2048;
-       c->data = g_malloc (sizeof (GtkCanvasWaveViewCacheEntry) * c->allocated);
+       c->data = g_malloc (sizeof (GnomeCanvasWaveViewCacheEntry) * c->allocated);
        c->data_size = 0;
        c->start = 0;
        c->end = 0;
        c->data_size = 0;
        c->start = 0;
        c->end = 0;
@@ -152,14 +152,14 @@ gtk_canvas_waveview_cache_new ()
 }
 
 void
 }
 
 void
-gtk_canvas_waveview_cache_destroy (GtkCanvasWaveViewCache* cache)
+gnome_canvas_waveview_cache_destroy (GnomeCanvasWaveViewCache* cache)
 {
        g_free (cache->data);
        g_free (cache);
 }
 
 static void
 {
        g_free (cache->data);
        g_free (cache);
 }
 
 static void
-gtk_canvas_waveview_init (GtkCanvasWaveView *waveview)
+gnome_canvas_waveview_init (GnomeCanvasWaveView *waveview)
 {
        waveview->x = 0.0;
        waveview->y = 0.0;
 {
        waveview->x = 0.0;
        waveview->y = 0.0;
@@ -182,13 +182,13 @@ gtk_canvas_waveview_init (GtkCanvasWaveView *waveview)
 
        waveview->wave_color = RGBA_TO_UINT(44,35,126,255);
 
 
        waveview->wave_color = RGBA_TO_UINT(44,35,126,255);
 
-       GTK_CANVAS_ITEM(waveview)->object.flags |= GTK_CANVAS_ITEM_NO_AUTO_REDRAW;
+       GNOME_CANVAS_ITEM(waveview)->object.flags |= GNOME_CANVAS_ITEM_NO_AUTO_REDRAW;
 }
 
 #define DEBUG_CACHE 0
 
 static gint32
 }
 
 #define DEBUG_CACHE 0
 
 static gint32
-gtk_canvas_waveview_ensure_cache (GtkCanvasWaveView *waveview, gulong start_sample, gulong end_sample)
+gnome_canvas_waveview_ensure_cache (GnomeCanvasWaveView *waveview, gulong start_sample, gulong end_sample)
 {
        gulong required_cache_entries;
        gulong rf1, rf2,rf3, required_frames;
 {
        gulong required_cache_entries;
        gulong rf1, rf2,rf3, required_frames;
@@ -200,7 +200,7 @@ gtk_canvas_waveview_ensure_cache (GtkCanvasWaveView *waveview, gulong start_samp
        gulong present_frames;
        gulong present_entries;
        gulong copied;
        gulong present_frames;
        gulong present_entries;
        gulong copied;
-       GtkCanvasWaveViewCache *cache;
+       GnomeCanvasWaveViewCache *cache;
        float* gain;
 
        cache = waveview->cache;
        float* gain;
 
        cache = waveview->cache;
@@ -267,7 +267,7 @@ gtk_canvas_waveview_ensure_cache (GtkCanvasWaveView *waveview, gulong start_samp
 #endif
 
        if (required_cache_entries > cache->allocated) {
 #endif
 
        if (required_cache_entries > cache->allocated) {
-               cache->data = g_realloc (cache->data, sizeof (GtkCanvasWaveViewCacheEntry) * required_cache_entries);
+               cache->data = g_realloc (cache->data, sizeof (GnomeCanvasWaveViewCacheEntry) * required_cache_entries);
                cache->allocated = required_cache_entries;
                // cache->start = 0;
                // cache->end = 0;
                cache->allocated = required_cache_entries;
                // cache->start = 0;
                // cache->end = 0;
@@ -309,7 +309,7 @@ gtk_canvas_waveview_ensure_cache (GtkCanvasWaveView *waveview, gulong start_samp
 
                memmove (&cache->data[0],
                         &cache->data[cache->data_size - present_entries],
 
                memmove (&cache->data[0],
                         &cache->data[cache->data_size - present_entries],
-                        present_entries * sizeof (GtkCanvasWaveViewCacheEntry));
+                        present_entries * sizeof (GnomeCanvasWaveViewCacheEntry));
                
 #if DEBUG_CACHE
                fprintf (stderr, "satisfied %lu of %lu frames, offset = %lu, will start at %lu (ptr = 0x%x)\n",
                
 #if DEBUG_CACHE
                fprintf (stderr, "satisfied %lu of %lu frames, offset = %lu, will start at %lu (ptr = 0x%x)\n",
@@ -340,7 +340,7 @@ gtk_canvas_waveview_ensure_cache (GtkCanvasWaveView *waveview, gulong start_samp
 
                memmove (&cache->data[cache->data_size - present_entries],
                         &cache->data[0],
 
                memmove (&cache->data[cache->data_size - present_entries],
                         &cache->data[0],
-                        present_entries * sizeof (GtkCanvasWaveViewCacheEntry));
+                        present_entries * sizeof (GnomeCanvasWaveViewCacheEntry));
                
 #if DEBUG_CACHE                
                fprintf (stderr, "existing material at start of current cache, move to start of end cache\n");
                
 #if DEBUG_CACHE                
                fprintf (stderr, "existing material at start of current cache, move to start of end cache\n");
@@ -399,7 +399,7 @@ gtk_canvas_waveview_ensure_cache (GtkCanvasWaveView *waveview, gulong start_samp
 #if DEBUG_CACHE
                fprintf (stderr, "zero fill cache for %lu at %lu\n", cache->allocated - npeaks, npeaks);
 #endif
 #if DEBUG_CACHE
                fprintf (stderr, "zero fill cache for %lu at %lu\n", cache->allocated - npeaks, npeaks);
 #endif
-               memset (&cache->data[npeaks], 0, sizeof (GtkCanvasWaveViewCacheEntry) * (cache->allocated - npeaks));
+               memset (&cache->data[npeaks], 0, sizeof (GnomeCanvasWaveViewCacheEntry) * (cache->allocated - npeaks));
                cache->data_size = npeaks;
        } else {
                cache->data_size = cache->allocated;
                cache->data_size = npeaks;
        } else {
                cache->data_size = cache->allocated;
@@ -434,7 +434,7 @@ gtk_canvas_waveview_ensure_cache (GtkCanvasWaveView *waveview, gulong start_samp
 }
 
 void
 }
 
 void
-gtk_canvas_waveview_set_data_src (GtkCanvasWaveView *waveview, void *data_src)
+gnome_canvas_waveview_set_data_src (GnomeCanvasWaveView *waveview, void *data_src)
 {
 
        if (waveview->cache_updater) {
 {
 
        if (waveview->cache_updater) {
@@ -451,7 +451,7 @@ gtk_canvas_waveview_set_data_src (GtkCanvasWaveView *waveview, void *data_src)
 }
 
 void
 }
 
 void
-gtk_canvas_waveview_set_channel (GtkCanvasWaveView *waveview, guint32 chan)
+gnome_canvas_waveview_set_channel (GnomeCanvasWaveView *waveview, guint32 chan)
 {
        if (waveview->channel == chan) {
                return;
 {
        if (waveview->channel == chan) {
                return;
@@ -461,7 +461,7 @@ gtk_canvas_waveview_set_channel (GtkCanvasWaveView *waveview, guint32 chan)
 }
 
 static void 
 }
 
 static void 
-gtk_canvas_waveview_reset_bounds (GtkCanvasItem *item)
+gnome_canvas_waveview_reset_bounds (GnomeCanvasItem *item)
 
 {
        double x1, x2, y1, y2;
 
 {
        double x1, x2, y1, y2;
@@ -470,14 +470,14 @@ gtk_canvas_waveview_reset_bounds (GtkCanvasItem *item)
        int Ix1, Ix2, Iy1, Iy2;
        double i2w[6];
 
        int Ix1, Ix2, Iy1, Iy2;
        double i2w[6];
 
-       gtk_canvas_waveview_bounds (item, &x1, &y1, &x2, &y2);
+       gnome_canvas_waveview_bounds (item, &x1, &y1, &x2, &y2);
 
        i1.x = x1;
        i1.y = y1;
        i2.x = x2;
        i2.y = y2;
 
 
        i1.x = x1;
        i1.y = y1;
        i2.x = x2;
        i2.y = y2;
 
-       gtk_canvas_item_i2w_affine (item, i2w);
+       gnome_canvas_item_i2w_affine (item, i2w);
        art_affine_point (&w1, &i1, i2w);
        art_affine_point (&w2, &i2, i2w);
 
        art_affine_point (&w1, &i1, i2w);
        art_affine_point (&w2, &i2, i2w);
 
@@ -486,7 +486,7 @@ gtk_canvas_waveview_reset_bounds (GtkCanvasItem *item)
        Iy1 = (int) rint(w1.y);
        Iy2 = (int) rint(w2.y);
 
        Iy1 = (int) rint(w1.y);
        Iy2 = (int) rint(w2.y);
 
-       gtk_canvas_update_bbox (item, Ix1, Iy1, Ix2, Iy2);
+       gnome_canvas_update_bbox (item, Ix1, Iy1, Ix2, Iy2);
 }
 
 /* 
 }
 
 /* 
@@ -494,27 +494,27 @@ gtk_canvas_waveview_reset_bounds (GtkCanvasItem *item)
  */
 
 static void
  */
 
 static void
-gtk_canvas_waveview_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
+gnome_canvas_waveview_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
 {
 {
-       GtkCanvasItem *item;
-       GtkCanvasWaveView *waveview;
+       GnomeCanvasItem *item;
+       GnomeCanvasWaveView *waveview;
        int redraw;
        int calc_bounds;
 
        int redraw;
        int calc_bounds;
 
-       item = GTK_CANVAS_ITEM (object);
-       waveview = GTK_CANVAS_WAVEVIEW (object);
+       item = GNOME_CANVAS_ITEM (object);
+       waveview = GNOME_CANVAS_WAVEVIEW (object);
 
        redraw = FALSE;
        calc_bounds = FALSE;
 
        switch (arg_id) {
        case ARG_DATA_SRC:
 
        redraw = FALSE;
        calc_bounds = FALSE;
 
        switch (arg_id) {
        case ARG_DATA_SRC:
-               gtk_canvas_waveview_set_data_src (waveview, GTK_VALUE_POINTER(*arg));
+               gnome_canvas_waveview_set_data_src (waveview, GTK_VALUE_POINTER(*arg));
                redraw = TRUE;
                break;
 
        case ARG_CHANNEL:
                redraw = TRUE;
                break;
 
        case ARG_CHANNEL:
-               gtk_canvas_waveview_set_channel (waveview, GTK_VALUE_UINT(*arg));
+               gnome_canvas_waveview_set_channel (waveview, GTK_VALUE_UINT(*arg));
                redraw = TRUE;
                break;
 
                redraw = TRUE;
                break;
 
@@ -621,21 +621,21 @@ gtk_canvas_waveview_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
        }
 
        if (calc_bounds) {
        }
 
        if (calc_bounds) {
-               gtk_canvas_waveview_reset_bounds (item);
+               gnome_canvas_waveview_reset_bounds (item);
        }
 
        if (redraw) {
        }
 
        if (redraw) {
-               gtk_canvas_item_request_update (item);
+               gnome_canvas_item_request_update (item);
        }
 
 }
 
 static void
        }
 
 }
 
 static void
-gtk_canvas_waveview_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
+gnome_canvas_waveview_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
 {
 {
-       GtkCanvasWaveView *waveview;
+       GnomeCanvasWaveView *waveview;
 
 
-       waveview = GTK_CANVAS_WAVEVIEW (object);
+       waveview = GNOME_CANVAS_WAVEVIEW (object);
 
        switch (arg_id) {
        case ARG_DATA_SRC:
 
        switch (arg_id) {
        case ARG_DATA_SRC:
@@ -710,19 +710,19 @@ gtk_canvas_waveview_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
 }
 
 static void
 }
 
 static void
-gtk_canvas_waveview_update (GtkCanvasItem *item, double *affine, ArtSVP *clip_path, int flags)
+gnome_canvas_waveview_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, int flags)
 {
 {
-       GtkCanvasWaveView *waveview;
+       GnomeCanvasWaveView *waveview;
        double x, y;
 
        double x, y;
 
-       waveview = GTK_CANVAS_WAVEVIEW (item);
+       waveview = GNOME_CANVAS_WAVEVIEW (item);
 
 //     check_cache (waveview, "start of update");
 
        if (parent_class->update)
                (* parent_class->update) (item, affine, clip_path, flags);
 
 
 //     check_cache (waveview, "start of update");
 
        if (parent_class->update)
                (* parent_class->update) (item, affine, clip_path, flags);
 
-       gtk_canvas_waveview_reset_bounds (item);
+       gnome_canvas_waveview_reset_bounds (item);
 
        /* get the canvas coordinates of the view. Do NOT use affines
           for this, because they do not round to the integer units used
 
        /* get the canvas coordinates of the view. Do NOT use affines
           for this, because they do not round to the integer units used
@@ -732,16 +732,16 @@ gtk_canvas_waveview_update (GtkCanvasItem *item, double *affine, ArtSVP *clip_pa
        x = waveview->x;
        y = waveview->y;
 
        x = waveview->x;
        y = waveview->y;
 
-       gtk_canvas_item_i2w (item, &x, &y);
-       gtk_canvas_w2c (GTK_CANVAS(item->canvas), x, y, &waveview->bbox_ulx, &waveview->bbox_uly);
+       gnome_canvas_item_i2w (item, &x, &y);
+       gnome_canvas_w2c (GNOME_CANVAS(item->canvas), x, y, &waveview->bbox_ulx, &waveview->bbox_uly);
 
        waveview->samples = waveview->length_function (waveview->data_src);
 
        x = waveview->x + (waveview->samples / waveview->samples_per_unit);
        y = waveview->y + waveview->height;
 
 
        waveview->samples = waveview->length_function (waveview->data_src);
 
        x = waveview->x + (waveview->samples / waveview->samples_per_unit);
        y = waveview->y + waveview->height;
 
-       gtk_canvas_item_i2w (item, &x, &y);
-       gtk_canvas_w2c (GTK_CANVAS(item->canvas), x, y, &waveview->bbox_lrx, &waveview->bbox_lry);
+       gnome_canvas_item_i2w (item, &x, &y);
+       gnome_canvas_w2c (GNOME_CANVAS(item->canvas), x, y, &waveview->bbox_lrx, &waveview->bbox_lry);
 
        /* cache the half-height and the end point in canvas units */
 
 
        /* cache the half-height and the end point in canvas units */
 
@@ -756,10 +756,10 @@ gtk_canvas_waveview_update (GtkCanvasItem *item, double *affine, ArtSVP *clip_pa
 }
 
 static void
 }
 
 static void
-gtk_canvas_waveview_render (GtkCanvasItem *item,
-                           GtkCanvasBuf *buf)
+gnome_canvas_waveview_render (GnomeCanvasItem *item,
+                           GnomeCanvasBuf *buf)
 {
 {
-       GtkCanvasWaveView *waveview;
+       GnomeCanvasWaveView *waveview;
        gulong s1, s2;
        int clip_length = 0;
        int pymin, pymax;
        gulong s1, s2;
        int clip_length = 0;
        int pymin, pymax;
@@ -767,7 +767,7 @@ gtk_canvas_waveview_render (GtkCanvasItem *item,
        double half_height;
        int x, end, begin;
 
        double half_height;
        int x, end, begin;
 
-       waveview = GTK_CANVAS_WAVEVIEW (item);
+       waveview = GNOME_CANVAS_WAVEVIEW (item);
 
 //     check_cache (waveview, "start of render");
 
 
 //     check_cache (waveview, "start of render");
 
@@ -776,7 +776,7 @@ gtk_canvas_waveview_render (GtkCanvasItem *item,
        }
 
        if (buf->is_bg) {
        }
 
        if (buf->is_bg) {
-               gtk_canvas_buf_ensure_buf (buf);
+               gnome_canvas_buf_ensure_buf (buf);
                buf->is_bg = FALSE;
        }
 
                buf->is_bg = FALSE;
        }
 
@@ -832,7 +832,7 @@ gtk_canvas_waveview_render (GtkCanvasItem *item,
                waveview->reload_cache_in_render = FALSE;
        }
 
                waveview->reload_cache_in_render = FALSE;
        }
 
-       cache_index = gtk_canvas_waveview_ensure_cache (waveview, s1, s2);
+       cache_index = gnome_canvas_waveview_ensure_cache (waveview, s1, s2);
 
 //     check_cache (waveview, "post-ensure");
 
 
 //     check_cache (waveview, "post-ensure");
 
@@ -924,14 +924,14 @@ gtk_canvas_waveview_render (GtkCanvasItem *item,
 }
 
 static void
 }
 
 static void
-gtk_canvas_waveview_draw (GtkCanvasItem *item,
+gnome_canvas_waveview_draw (GnomeCanvasItem *item,
                          GdkDrawable *drawable,
                          int x, int y,
                          int width, int height)
 {
                          GdkDrawable *drawable,
                          int x, int y,
                          int width, int height)
 {
-       GtkCanvasWaveView *waveview;
+       GnomeCanvasWaveView *waveview;
 
 
-       waveview = GTK_CANVAS_WAVEVIEW (item);
+       waveview = GNOME_CANVAS_WAVEVIEW (item);
 
        if (parent_class->draw) {
                (* parent_class->draw) (item, drawable, x, y, width, height);
 
        if (parent_class->draw) {
                (* parent_class->draw) (item, drawable, x, y, width, height);
@@ -942,9 +942,9 @@ gtk_canvas_waveview_draw (GtkCanvasItem *item,
 }
 
 static void
 }
 
 static void
-gtk_canvas_waveview_bounds (GtkCanvasItem *item, double *x1, double *y1, double *x2, double *y2)
+gnome_canvas_waveview_bounds (GnomeCanvasItem *item, double *x1, double *y1, double *x2, double *y2)
 {
 {
-       GtkCanvasWaveView *waveview = GTK_CANVAS_WAVEVIEW (item);
+       GnomeCanvasWaveView *waveview = GNOME_CANVAS_WAVEVIEW (item);
 
        *x1 = waveview->x;
        *y1 = waveview->y;
 
        *x1 = waveview->x;
        *y1 = waveview->y;
@@ -954,22 +954,22 @@ gtk_canvas_waveview_bounds (GtkCanvasItem *item, double *x1, double *y1, double
 
 #if 0
        x = 0; y = 0;
 
 #if 0
        x = 0; y = 0;
-       gtk_canvas_item_i2w (item, &x, &y);
-       gtk_canvas_w2c_d (GTK_CANVAS(item->canvas), x, y, &a, &b);
+       gnome_canvas_item_i2w (item, &x, &y);
+       gnome_canvas_w2c_d (GNOME_CANVAS(item->canvas), x, y, &a, &b);
        x = *x2;
        y = *y2;
        x = *x2;
        y = *y2;
-       gtk_canvas_item_i2w (item, &x, &y);
-       gtk_canvas_w2c_d (GTK_CANVAS(item->canvas), x, y, &c, &d);
+       gnome_canvas_item_i2w (item, &x, &y);
+       gnome_canvas_w2c_d (GNOME_CANVAS(item->canvas), x, y, &c, &d);
        printf ("item bounds now (%g,%g),(%g,%g)\n", a, b, c, d);
 #endif         
 
 }
 
 static double
        printf ("item bounds now (%g,%g),(%g,%g)\n", a, b, c, d);
 #endif         
 
 }
 
 static double
-gtk_canvas_waveview_point (GtkCanvasItem *item, double x, double y, int cx, int cy, GtkCanvasItem **actual_item)
+gnome_canvas_waveview_point (GnomeCanvasItem *item, double x, double y, int cx, int cy, GnomeCanvasItem **actual_item)
 {
        /* XXX for now, point is never inside the wave 
 {
        /* XXX for now, point is never inside the wave 
-       GtkCanvasWaveView *waveview;
+       GnomeCanvasWaveView *waveview;
        double x1, y1, x2, y2;
        double dx, dy;
        */
        double x1, y1, x2, y2;
        double dx, dy;
        */
@@ -977,13 +977,13 @@ gtk_canvas_waveview_point (GtkCanvasItem *item, double x, double y, int cx, int
        return DBL_MAX;
 
 #if 0
        return DBL_MAX;
 
 #if 0
-       waveview = GTK_CANVAS_WAVEVIEW (item);
+       waveview = GNOME_CANVAS_WAVEVIEW (item);
 
        *actual_item = item;
 
        /* Find the bounds for the rectangle plus its outline width */
 
 
        *actual_item = item;
 
        /* Find the bounds for the rectangle plus its outline width */
 
-       gtk_canvas_waveview_bounds (item, &x1, &y1, &x2, &y2);
+       gnome_canvas_waveview_bounds (item, &x1, &y1, &x2, &y2);
 
        /* Is point inside rectangle */
        
 
        /* Is point inside rectangle */
        
index b868abfa6113ec5e0a2295489d229c7d9d2c914d..f0c74b0fe0ab525a619309c0be733962845c4a70 100644 (file)
@@ -1,4 +1,4 @@
-/* gtk-canvas-waveview.h: GtkCanvas item for displaying wave data
+/* libgnomecanvas/gnome-canvas-waveview.h: GnomeCanvas item for displaying wave data
  *
  * Copyright (C) 2001 Paul Davis <pbd@op.net>
  *
  *
  * Copyright (C) 2001 Paul Davis <pbd@op.net>
  *
  *
  */
 
  *
  */
 
-#ifndef __GTK_CANVAS_WAVEVIEW_H__
-#define __GTK_CANVAS_WAVEVIEW_H__
+#ifndef __GNOME_CANVAS_WAVEVIEW_H__
+#define __GNOME_CANVAS_WAVEVIEW_H__
 
 #include <stdint.h>
 
 
 #include <stdint.h>
 
-#include <gtk-canvas/gtk-canvas-defs.h>
-#include "gtk-canvas/gtk-canvas.h"
+#include <libgnomecanvas/libgnomecanvas.h>
 
 
-BEGIN_GTK_CANVAS_DECLS
+BEGIN_GNOME_CANVAS_DECLS
 
 /* Wave viewer item for canvas.
  */
 
 
 /* Wave viewer item for canvas.
  */
 
-#define GTK_CANVAS_TYPE_CANVAS_WAVEVIEW            (gtk_canvas_waveview_get_type ())
-#define GTK_CANVAS_WAVEVIEW(obj)                   (GTK_CHECK_CAST ((obj), GTK_CANVAS_TYPE_CANVAS_WAVEVIEW, GtkCanvasWaveView))
-#define GTK_CANVAS_WAVEVIEW_CLASS(klass)           (GTK_CHECK_CLASS_CAST ((klass), GTK_CANVAS_TYPE_CANVAS_WAVEVIEW, GtkCanvasWaveViewClass))
-#define GTK_CANVAS_IS_CANVAS_WAVEVIEW(obj)         (GTK_CHECK_TYPE ((obj), GTK_CANVAS_TYPE_CANVAS_WAVEVIEW))
-#define GTK_CANVAS_IS_CANVAS_WAVEVIEW_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_CANVAS_TYPE_CANVAS_WAVEVIEW))
+#define GNOME_CANVAS_TYPE_CANVAS_WAVEVIEW            (gnome_canvas_waveview_get_type ())
+#define GNOME_CANVAS_WAVEVIEW(obj)                   (GTK_CHECK_CAST ((obj), GNOME_CANVAS_TYPE_CANVAS_WAVEVIEW, GnomeCanvasWaveView))
+#define GNOME_CANVAS_WAVEVIEW_CLASS(klass)           (GTK_CHECK_CLASS_CAST ((klass), GNOME_CANVAS_TYPE_CANVAS_WAVEVIEW, GnomeCanvasWaveViewClass))
+#define GNOME_CANVAS_IS_CANVAS_WAVEVIEW(obj)         (GTK_CHECK_TYPE ((obj), GNOME_CANVAS_TYPE_CANVAS_WAVEVIEW))
+#define GNOME_CANVAS_IS_CANVAS_WAVEVIEW_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GNOME_CANVAS_TYPE_CANVAS_WAVEVIEW))
 
 
-typedef struct _GtkCanvasWaveView            GtkCanvasWaveView;
-typedef struct _GtkCanvasWaveViewClass       GtkCanvasWaveViewClass;
-typedef struct _GtkCanvasWaveViewChannelInfo GtkCanvasWaveViewChannelInfo;
-typedef struct _GtkCanvasWaveViewCacheEntry  GtkCanvasWaveViewCacheEntry;
-typedef struct _GtkCanvasWaveViewCache       GtkCanvasWaveViewCache;
+typedef struct _GnomeCanvasWaveView            GnomeCanvasWaveView;
+typedef struct _GnomeCanvasWaveViewClass       GnomeCanvasWaveViewClass;
+typedef struct _GnomeCanvasWaveViewChannelInfo GnomeCanvasWaveViewChannelInfo;
+typedef struct _GnomeCanvasWaveViewCacheEntry  GnomeCanvasWaveViewCacheEntry;
+typedef struct _GnomeCanvasWaveViewCache       GnomeCanvasWaveViewCache;
 
 /* XXX this needs to be synced with ardour/source.h PeakData */
 
 
 /* XXX this needs to be synced with ardour/source.h PeakData */
 
-struct _GtkCanvasWaveViewCacheEntry
+struct _GnomeCanvasWaveViewCacheEntry
 {
     float  min;
     float  max;
 };
 
 {
     float  min;
     float  max;
 };
 
-struct _GtkCanvasWaveViewCache
+struct _GnomeCanvasWaveViewCache
 {
 {
-    GtkCanvasWaveViewCacheEntry* data;
+    GnomeCanvasWaveViewCacheEntry* data;
     gint32                       allocated;
     gint32                       data_size;
     gulong                       start;
     gulong                       end;
 };    
 
     gint32                       allocated;
     gint32                       data_size;
     gulong                       start;
     gulong                       end;
 };    
 
-GtkCanvasWaveViewCache* gtk_canvas_waveview_cache_new ();
-void                    gtk_canvas_waveview_cache_destroy (GtkCanvasWaveViewCache*);
+GnomeCanvasWaveViewCache* gnome_canvas_waveview_cache_new ();
+void                    gnome_canvas_waveview_cache_destroy (GnomeCanvasWaveViewCache*);
 
 
-struct _GtkCanvasWaveView
+struct _GnomeCanvasWaveView
 {
 {
-    GtkCanvasItem item;
+    GnomeCanvasItem item;
     
     
-    GtkCanvasWaveViewCache *cache;
+    GnomeCanvasWaveViewCache *cache;
     gboolean                cache_updater;
     gint                    screen_width;
 
     gboolean                cache_updater;
     gint                    screen_width;
 
@@ -117,12 +116,12 @@ struct _GtkCanvasWaveView
     int32_t reload_cache_in_render;
 };
 
     int32_t reload_cache_in_render;
 };
 
-struct _GtkCanvasWaveViewClass {
-       GtkCanvasItemClass parent_class;
+struct _GnomeCanvasWaveViewClass {
+       GnomeCanvasItemClass parent_class;
 };
 
 };
 
-GtkType gtk_canvas_waveview_get_type (void);
+GtkType gnome_canvas_waveview_get_type (void);
 
 
-END_GTK_CANVAS_DECLS
+END_GNOME_CANVAS_DECLS
 
 
-#endif /* __GTK_CANVAS_WAVEVIEW_H__ */
+#endif /* __GNOME_CANVAS_WAVEVIEW_H__ */
index aaab5e5b5aeb8695e5ff8b4ed32f6437f668a2e8..5c9485fef244767fa685fc3e5c7717b901f1a48e 100644 (file)
@@ -112,14 +112,14 @@ CrossfadeEditor::CrossfadeEditor (Session& s, Crossfade& xf, double my, double m
        point_grabbed = false;
        toplevel = 0;
 
        point_grabbed = false;
        toplevel = 0;
 
-       _canvas = gtk_canvas_new_aa ();
+       _canvas = gnome_canvas_new_aa ();
 
        canvas = wrap (_canvas);
        canvas->size_allocate.connect (mem_fun(*this, &CrossfadeEditor::canvas_allocation));
        canvas->set_size_request (425, 200);
 
 
        canvas = wrap (_canvas);
        canvas->size_allocate.connect (mem_fun(*this, &CrossfadeEditor::canvas_allocation));
        canvas->set_size_request (425, 200);
 
-       toplevel = gtk_canvas_item_new (gtk_canvas_root (GTK_CANVAS(_canvas)),
-                                       gtk_canvas_simplerect_get_type(),
+       toplevel = gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS(_canvas)),
+                                       gnome_canvas_simplerect_get_type(),
                                        "x1", 0.0,
                                        "y1", 0.0,
                                        "x2", 10.0,
                                        "x1", 0.0,
                                        "y1", 0.0,
                                        "x2", 10.0,
@@ -134,25 +134,25 @@ CrossfadeEditor::CrossfadeEditor (Session& s, Crossfade& xf, double my, double m
                            (GtkSignalFunc) _canvas_event,
                            this);
 
                            (GtkSignalFunc) _canvas_event,
                            this);
 
-       fade[Out].line = gtk_canvas_item_new (gtk_canvas_root (GTK_CANVAS(_canvas)),
-                                             gtk_canvas_line_get_type (),
+       fade[Out].line = gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS(_canvas)),
+                                             gnome_canvas_line_get_type (),
                                              "width_pixels", (guint) 1,
                                              "fill_color_rgba", color_map[cCrossfadeEditorLine],
                                              NULL);
 
                                              "width_pixels", (guint) 1,
                                              "fill_color_rgba", color_map[cCrossfadeEditorLine],
                                              NULL);
 
-       fade[Out].shading = gtk_canvas_item_new (gtk_canvas_root (GTK_CANVAS(_canvas)),
-                                                gtk_canvas_polygon_get_type(),
+       fade[Out].shading = gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS(_canvas)),
+                                                gnome_canvas_polygon_get_type(),
                                                 "fill_color_rgba", color_map[cCrossfadeEditorLineShading],
                                                 NULL);
        
                                                 "fill_color_rgba", color_map[cCrossfadeEditorLineShading],
                                                 NULL);
        
-       fade[In].line = gtk_canvas_item_new (gtk_canvas_root (GTK_CANVAS(_canvas)),
-                                            gtk_canvas_line_get_type (),
+       fade[In].line = gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS(_canvas)),
+                                            gnome_canvas_line_get_type (),
                                             "width_pixels", (guint) 1,
                                             "fill_color_rgba", color_map[cCrossfadeEditorLine],
                                             NULL);
        
                                             "width_pixels", (guint) 1,
                                             "fill_color_rgba", color_map[cCrossfadeEditorLine],
                                             NULL);
        
-       fade[In].shading = gtk_canvas_item_new (gtk_canvas_root (GTK_CANVAS(_canvas)),
-                                               gtk_canvas_polygon_get_type(),
+       fade[In].shading = gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS(_canvas)),
+                                               gnome_canvas_polygon_get_type(),
                                                "fill_color_rgba", color_map[cCrossfadeEditorLineShading],
                                                NULL);
 
                                                "fill_color_rgba", color_map[cCrossfadeEditorLineShading],
                                                NULL);
 
@@ -416,14 +416,14 @@ CrossfadeEditor::set (const ARDOUR::Curve& curve, WhichFade which)
 }
 
 gint                
 }
 
 gint                
-CrossfadeEditor::_canvas_event (GtkCanvasItem* item, GdkEvent* event, gpointer data)
+CrossfadeEditor::_canvas_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data)
 {
        CrossfadeEditor* ed = static_cast<CrossfadeEditor*> (data);
        return ed->canvas_event (item, event);
 }
 
 gint
 {
        CrossfadeEditor* ed = static_cast<CrossfadeEditor*> (data);
        return ed->canvas_event (item, event);
 }
 
 gint
-CrossfadeEditor::canvas_event (GtkCanvasItem* item, GdkEvent* event)
+CrossfadeEditor::canvas_event (GnomeCanvasItem* item, GdkEvent* event)
 {
        switch (event->type) {
        case GDK_BUTTON_PRESS:
 {
        switch (event->type) {
        case GDK_BUTTON_PRESS:
@@ -447,8 +447,8 @@ CrossfadeEditor::make_point ()
 {
        Point* p = new Point;
 
 {
        Point* p = new Point;
 
-       p->box = gtk_canvas_item_new (gtk_canvas_root (GTK_CANVAS(_canvas)),
-                                     gtk_canvas_simplerect_get_type(),
+       p->box = gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS(_canvas)),
+                                     gnome_canvas_simplerect_get_type(),
                                      "fill", (gboolean) TRUE,
                                      "fill_color_rgba", color_map[cCrossfadeEditorPointFill],
                                      "outline_color_rgba", color_map[cCrossfadeEditorPointOutline],
                                      "fill", (gboolean) TRUE,
                                      "fill_color_rgba", color_map[cCrossfadeEditorPointFill],
                                      "outline_color_rgba", color_map[cCrossfadeEditorPointOutline],
@@ -495,7 +495,7 @@ CrossfadeEditor::Point::move_to (double nx, double ny, double xfract, double yfr
        double x1 = nx - half_size;
        double x2 = nx + half_size;
 
        double x1 = nx - half_size;
        double x2 = nx + half_size;
 
-       gtk_canvas_item_set (box,
+       gnome_canvas_item_set (box,
                             "x1", x1,
                             "x2", x2,
                             "y1", ny - half_size,
                             "x1", x1,
                             "x2", x2,
                             "y1", ny - half_size,
@@ -509,7 +509,7 @@ void
 CrossfadeEditor::canvas_allocation (GtkAllocation *alloc)
 {
        if (toplevel) {
 CrossfadeEditor::canvas_allocation (GtkAllocation *alloc)
 {
        if (toplevel) {
-               gtk_canvas_item_set (toplevel,
+               gnome_canvas_item_set (toplevel,
                                     "x1", 0.0,
                                     "y1", 0.0,
                                     "x2", (double) _canvas->allocation.width + canvas_border,
                                     "x1", 0.0,
                                     "y1", 0.0,
                                     "x2", (double) _canvas->allocation.width + canvas_border,
@@ -517,7 +517,7 @@ CrossfadeEditor::canvas_allocation (GtkAllocation *alloc)
                                     NULL);
        }
 
                                     NULL);
        }
 
-       gtk_canvas_set_scroll_region (GTK_CANVAS(_canvas), 0.0, 0.0,
+       gnome_canvas_set_scroll_region (GNOME_CANVAS(_canvas), 0.0, 0.0,
                                      _canvas->allocation.width,
                                      _canvas->allocation.height);
 
                                      _canvas->allocation.width,
                                      _canvas->allocation.height);
 
@@ -589,7 +589,7 @@ CrossfadeEditor::canvas_allocation (GtkAllocation *alloc)
        }
 
        double ht;
        }
 
        double ht;
-       vector<GtkCanvasItem*>::iterator i;
+       vector<GnomeCanvasItem*>::iterator i;
        uint32_t n;
 
        ht = _canvas->allocation.height / xfade.in().n_channels();
        uint32_t n;
 
        ht = _canvas->allocation.height / xfade.in().n_channels();
@@ -599,7 +599,7 @@ CrossfadeEditor::canvas_allocation (GtkAllocation *alloc)
 
                yoff = n * ht;
 
 
                yoff = n * ht;
 
-               gtk_canvas_item_set ((*i),
+               gnome_canvas_item_set ((*i),
                                     "y", yoff,
                                     "height", ht,
                                     "samples_per_unit", spu,
                                     "y", yoff,
                                     "height", ht,
                                     "samples_per_unit", spu,
@@ -613,7 +613,7 @@ CrossfadeEditor::canvas_allocation (GtkAllocation *alloc)
 
                yoff = n * ht;
 
 
                yoff = n * ht;
 
-               gtk_canvas_item_set ((*i),
+               gnome_canvas_item_set ((*i),
                                     "y", yoff,
                                     "height", ht,
                                     "samples_per_unit", spu,
                                     "y", yoff,
                                     "height", ht,
                                     "samples_per_unit", spu,
@@ -623,14 +623,14 @@ CrossfadeEditor::canvas_allocation (GtkAllocation *alloc)
 }
 
 gint
 }
 
 gint
-CrossfadeEditor::_point_event (GtkCanvasItem* item, GdkEvent* event, gpointer data)
+CrossfadeEditor::_point_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data)
 {
        CrossfadeEditor* ed = static_cast<CrossfadeEditor*> (data);
        return ed->point_event (item, event);
 }
 
 gint
 {
        CrossfadeEditor* ed = static_cast<CrossfadeEditor*> (data);
        return ed->point_event (item, event);
 }
 
 gint
-CrossfadeEditor::point_event (GtkCanvasItem* item, GdkEvent* event)
+CrossfadeEditor::point_event (GnomeCanvasItem* item, GdkEvent* event)
 {
        Point* point = static_cast<Point*> (gtk_object_get_data (GTK_OBJECT (item), "point"));
 
 {
        Point* point = static_cast<Point*> (gtk_object_get_data (GTK_OBJECT (item), "point"));
 
@@ -678,14 +678,14 @@ CrossfadeEditor::point_event (GtkCanvasItem* item, GdkEvent* event)
 }
 
 gint
 }
 
 gint
-CrossfadeEditor::_curve_event (GtkCanvasItem* item, GdkEvent* event, gpointer data)
+CrossfadeEditor::_curve_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data)
 {
        CrossfadeEditor* ed = static_cast<CrossfadeEditor*> (data);
        return ed->curve_event (item, event);
 }
 
 gint
 {
        CrossfadeEditor* ed = static_cast<CrossfadeEditor*> (data);
        return ed->curve_event (item, event);
 }
 
 gint
-CrossfadeEditor::curve_event (GtkCanvasItem* item, GdkEvent* event)
+CrossfadeEditor::curve_event (GnomeCanvasItem* item, GdkEvent* event)
 {
        /* treat it like a toplevel event */
 
 {
        /* treat it like a toplevel event */
 
@@ -721,8 +721,8 @@ CrossfadeEditor::redraw ()
 
        fade[current].normative_curve.get_vector (0, 1.0, vec, npoints);
        
 
        fade[current].normative_curve.get_vector (0, 1.0, vec, npoints);
        
-       GtkCanvasPoints* pts = get_canvas_points ("xfade edit1", npoints);
-       GtkCanvasPoints* spts = get_canvas_points ("xfade edit2", npoints + 3);
+       GnomeCanvasPoints* pts = get_canvas_points ("xfade edit1", npoints);
+       GnomeCanvasPoints* spts = get_canvas_points ("xfade edit2", npoints + 3);
 
        /* the shade coordinates *MUST* be in anti-clockwise order.
         */
 
        /* the shade coordinates *MUST* be in anti-clockwise order.
         */
@@ -777,14 +777,14 @@ CrossfadeEditor::redraw ()
                spts->coords[last_spt - (i*2) + 1] = pts->coords[(i*2)+1];
        }
 
                spts->coords[last_spt - (i*2) + 1] = pts->coords[(i*2)+1];
        }
 
-       gtk_canvas_item_set (fade[current].line, "points", pts, NULL);
-       gtk_canvas_item_set (fade[current].shading, "points", spts, NULL);
+       gnome_canvas_item_set (fade[current].line, "points", pts, NULL);
+       gnome_canvas_item_set (fade[current].shading, "points", spts, NULL);
 
 
-       gtk_canvas_points_unref (pts);
-       gtk_canvas_points_unref (spts);
+       gnome_canvas_points_unref (pts);
+       gnome_canvas_points_unref (spts);
 
 
-       for (vector<GtkCanvasItem*>::iterator i = fade[current].waves.begin(); i != fade[current].waves.end(); ++i) {
-               gtk_canvas_item_set ((*i), "gain_src", &fade[current].gain_curve, NULL);
+       for (vector<GnomeCanvasItem*>::iterator i = fade[current].waves.begin(); i != fade[current].waves.end(); ++i) {
+               gnome_canvas_item_set ((*i), "gain_src", &fade[current].gain_curve, NULL);
        }
 }
 
        }
 }
 
@@ -1002,25 +1002,25 @@ CrossfadeEditor::curve_select_clicked (WhichFade wf)
 
        if (wf == In) {
 
 
        if (wf == In) {
 
-               for (vector<GtkCanvasItem*>::iterator i = fade[In].waves.begin(); i != fade[In].waves.end(); ++i) {
-                       gtk_canvas_item_set ((*i), "wave_color", color_map[cSelectedCrossfadeEditorWave], NULL);
+               for (vector<GnomeCanvasItem*>::iterator i = fade[In].waves.begin(); i != fade[In].waves.end(); ++i) {
+                       gnome_canvas_item_set ((*i), "wave_color", color_map[cSelectedCrossfadeEditorWave], NULL);
                }
 
                }
 
-               for (vector<GtkCanvasItem*>::iterator i = fade[Out].waves.begin(); i != fade[Out].waves.end(); ++i) {
-                       gtk_canvas_item_set ((*i), "wave_color", color_map[cCrossfadeEditorWave], NULL);
+               for (vector<GnomeCanvasItem*>::iterator i = fade[Out].waves.begin(); i != fade[Out].waves.end(); ++i) {
+                       gnome_canvas_item_set ((*i), "wave_color", color_map[cCrossfadeEditorWave], NULL);
                }
 
                }
 
-               gtk_canvas_item_set (fade[In].line, "fill_color_rgba", color_map[cSelectedCrossfadeEditorLine], NULL);
-               gtk_canvas_item_set (fade[Out].line, "fill_color_rgba", color_map[cCrossfadeEditorLine], NULL);
-               gtk_canvas_item_hide (fade[Out].shading);
-               gtk_canvas_item_show (fade[In].shading);
+               gnome_canvas_item_set (fade[In].line, "fill_color_rgba", color_map[cSelectedCrossfadeEditorLine], NULL);
+               gnome_canvas_item_set (fade[Out].line, "fill_color_rgba", color_map[cCrossfadeEditorLine], NULL);
+               gnome_canvas_item_hide (fade[Out].shading);
+               gnome_canvas_item_show (fade[In].shading);
 
                for (list<Point*>::iterator i = fade[Out].points.begin(); i != fade[Out].points.end(); ++i) {
 
                for (list<Point*>::iterator i = fade[Out].points.begin(); i != fade[Out].points.end(); ++i) {
-                       gtk_canvas_item_hide ((*i)->box);
+                       gnome_canvas_item_hide ((*i)->box);
                }
 
                for (list<Point*>::iterator i = fade[In].points.begin(); i != fade[In].points.end(); ++i) {
                }
 
                for (list<Point*>::iterator i = fade[In].points.begin(); i != fade[In].points.end(); ++i) {
-                       gtk_canvas_item_show ((*i)->box);
+                       gnome_canvas_item_show ((*i)->box);
                }
 
                for (vector<Button*>::iterator i = fade_out_buttons.begin(); i != fade_out_buttons.end(); ++i) {
                }
 
                for (vector<Button*>::iterator i = fade_out_buttons.begin(); i != fade_out_buttons.end(); ++i) {
@@ -1033,25 +1033,25 @@ CrossfadeEditor::curve_select_clicked (WhichFade wf)
 
        } else {
 
 
        } else {
 
-               for (vector<GtkCanvasItem*>::iterator i = fade[In].waves.begin(); i != fade[In].waves.end(); ++i) {
-                       gtk_canvas_item_set ((*i), "wave_color", color_map[cCrossfadeEditorWave], NULL);
+               for (vector<GnomeCanvasItem*>::iterator i = fade[In].waves.begin(); i != fade[In].waves.end(); ++i) {
+                       gnome_canvas_item_set ((*i), "wave_color", color_map[cCrossfadeEditorWave], NULL);
                }
 
                }
 
-               for (vector<GtkCanvasItem*>::iterator i = fade[Out].waves.begin(); i != fade[Out].waves.end(); ++i) {
-                       gtk_canvas_item_set ((*i), "wave_color", color_map[cSelectedCrossfadeEditorWave], NULL);
+               for (vector<GnomeCanvasItem*>::iterator i = fade[Out].waves.begin(); i != fade[Out].waves.end(); ++i) {
+                       gnome_canvas_item_set ((*i), "wave_color", color_map[cSelectedCrossfadeEditorWave], NULL);
                }
 
                }
 
-               gtk_canvas_item_set (fade[Out].line, "fill_color_rgba", color_map[cSelectedCrossfadeEditorLine], NULL);
-               gtk_canvas_item_set (fade[In].line, "fill_color_rgba", color_map[cCrossfadeEditorLine], NULL);
-               gtk_canvas_item_hide (fade[In].shading);
-               gtk_canvas_item_show (fade[Out].shading);
+               gnome_canvas_item_set (fade[Out].line, "fill_color_rgba", color_map[cSelectedCrossfadeEditorLine], NULL);
+               gnome_canvas_item_set (fade[In].line, "fill_color_rgba", color_map[cCrossfadeEditorLine], NULL);
+               gnome_canvas_item_hide (fade[In].shading);
+               gnome_canvas_item_show (fade[Out].shading);
 
                for (list<Point*>::iterator i = fade[In].points.begin(); i != fade[In].points.end(); ++i) {
 
                for (list<Point*>::iterator i = fade[In].points.begin(); i != fade[In].points.end(); ++i) {
-                       gtk_canvas_item_hide ((*i)->box);
+                       gnome_canvas_item_hide ((*i)->box);
                }
                
                for (list<Point*>::iterator i = fade[Out].points.begin(); i != fade[Out].points.end(); ++i) {
                }
                
                for (list<Point*>::iterator i = fade[Out].points.begin(); i != fade[Out].points.end(); ++i) {
-                       gtk_canvas_item_show ((*i)->box);
+                       gnome_canvas_item_show ((*i)->box);
                }
 
                for (vector<Button*>::iterator i = fade_out_buttons.begin(); i != fade_out_buttons.end(); ++i) {
                }
 
                for (vector<Button*>::iterator i = fade_out_buttons.begin(); i != fade_out_buttons.end(); ++i) {
@@ -1106,11 +1106,11 @@ CrossfadeEditor::make_waves (AudioRegion& region, WhichFade which)
                
                if (region.source(n).peaks_ready (bind (mem_fun(*this, &CrossfadeEditor::peaks_ready), &region, which))) {
                        
                
                if (region.source(n).peaks_ready (bind (mem_fun(*this, &CrossfadeEditor::peaks_ready), &region, which))) {
                        
-                       GtkCanvasItem *wave = gtk_canvas_item_new (gtk_canvas_root (GTK_CANVAS(_canvas)),
-                                                                  gtk_canvas_waveview_get_type (),
+                       GnomeCanvasItem *wave = gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS(_canvas)),
+                                                                  gnome_canvas_waveview_get_type (),
                                                                   "data_src", (gpointer) &region,
                                                                   "cache_updater", (gboolean) TRUE,
                                                                   "data_src", (gpointer) &region,
                                                                   "cache_updater", (gboolean) TRUE,
-                                                                  "cache", gtk_canvas_waveview_cache_new (),
+                                                                  "cache", gnome_canvas_waveview_cache_new (),
                                                                   "channel", (guint32) n,
                                                                   "length_function", (gpointer) region_length_from_c,
                                                                   "sourcefile_length_function", (gpointer) sourcefile_length_from_c,
                                                                   "channel", (guint32) n,
                                                                   "length_function", (gpointer) region_length_from_c,
                                                                   "sourcefile_length_function", (gpointer) sourcefile_length_from_c,
@@ -1125,12 +1125,12 @@ CrossfadeEditor::make_waves (AudioRegion& region, WhichFade which)
                                                                   "wave_color", color,
                                                                   NULL);
                        
                                                                   "wave_color", color,
                                                                   NULL);
                        
-                       gtk_canvas_item_lower_to_bottom (wave);
+                       gnome_canvas_item_lower_to_bottom (wave);
                        fade[which].waves.push_back (wave);
                }
        }
 
                        fade[which].waves.push_back (wave);
                }
        }
 
-       gtk_canvas_item_lower_to_bottom (toplevel);
+       gnome_canvas_item_lower_to_bottom (toplevel);
 }
 
 void
 }
 
 void
index c03f320fc7a944d2b0981841e0a479d31e7fe09d..307e9b860a38eb6ca4a54558823960bed8abe183 100644 (file)
@@ -6,7 +6,7 @@
 #include <gtkmm/box.h>
 #include <gtkmm/button.h>
 #include <gtkmm/radiobutton.h>
 #include <gtkmm/box.h>
 #include <gtkmm/button.h>
 #include <gtkmm/radiobutton.h>
-#include <gtk-canvas.h>
+#include <libgnomecanvas/libgnomecanvas.h>
 
 #include <ardour/curve.h>
 #include "ardour_dialog.h"
 
 #include <ardour/curve.h>
 #include "ardour_dialog.h"
@@ -63,8 +63,8 @@ class CrossfadeEditor : public ArdourDialog
     struct Point {
        ~Point();
 
     struct Point {
        ~Point();
 
-       GtkCanvasItem* box;
-       GtkCanvasItem* curve;
+       GnomeCanvasItem* box;
+       GnomeCanvasItem* curve;
        double x;
        double y;
 
        double x;
        double y;
 
@@ -81,16 +81,16 @@ class CrossfadeEditor : public ArdourDialog
     };
 
     GtkWidget*    _canvas;
     };
 
     GtkWidget*    _canvas;
-    GtkCanvasItem* toplevel;
+    GnomeCanvasItem* toplevel;
     Gtk::Widget*   canvas;
 
     struct Half {
     Gtk::Widget*   canvas;
 
     struct Half {
-       GtkCanvasItem*          line;
-       GtkCanvasItem*          shading;
+       GnomeCanvasItem*          line;
+       GnomeCanvasItem*          shading;
        list<Point*>            points;
        ARDOUR::Curve           normative_curve; /* 0 - 1.0, linear */
        ARDOUR::Curve           gain_curve;      /* 0 - 2.0, gain mapping */
        list<Point*>            points;
        ARDOUR::Curve           normative_curve; /* 0 - 1.0, linear */
        ARDOUR::Curve           gain_curve;      /* 0 - 2.0, gain mapping */
-       vector<GtkCanvasItem*>  waves;
+       vector<GnomeCanvasItem*>  waves;
 
        Half();
     };
 
        Half();
     };
@@ -127,13 +127,13 @@ class CrossfadeEditor : public ArdourDialog
 
     gint event_handler (GdkEvent*);
 
 
     gint event_handler (GdkEvent*);
 
-    static gint _canvas_event (GtkCanvasItem*, GdkEvent* event, gpointer data);
-    static gint _point_event (GtkCanvasItem*, GdkEvent* event, gpointer data);
-    static gint _curve_event (GtkCanvasItem*, GdkEvent* event, gpointer data);
+    static gint _canvas_event (GnomeCanvasItem*, GdkEvent* event, gpointer data);
+    static gint _point_event (GnomeCanvasItem*, GdkEvent* event, gpointer data);
+    static gint _curve_event (GnomeCanvasItem*, GdkEvent* event, gpointer data);
 
 
-    gint canvas_event (GtkCanvasItem*, GdkEvent* event);
-    gint point_event (GtkCanvasItem*, GdkEvent* event);
-    gint curve_event (GtkCanvasItem*, GdkEvent* event);
+    gint canvas_event (GnomeCanvasItem*, GdkEvent* event);
+    gint point_event (GnomeCanvasItem*, GdkEvent* event);
+    gint curve_event (GnomeCanvasItem*, GdkEvent* event);
 
     void canvas_allocation (GtkAllocation*);
     void add_control_point (double x, double y);
 
     void canvas_allocation (GtkAllocation*);
     void add_control_point (double x, double y);
index c126eed80fd114b528b511ef27a7275834ed6df4..6d983cfa6509e72815960293affefc4c556b3d4b 100644 (file)
@@ -38,7 +38,7 @@ using namespace Editing;
 
 sigc::signal<void,CrossfadeView*> CrossfadeView::GoingAway;
 
 
 sigc::signal<void,CrossfadeView*> CrossfadeView::GoingAway;
 
-CrossfadeView::CrossfadeView (GtkCanvasGroup *parent, 
+CrossfadeView::CrossfadeView (GnomeCanvasGroup *parent, 
                              AudioTimeAxisView &tv, 
                              Crossfade& xf, 
                              double spu,
                              AudioTimeAxisView &tv, 
                              Crossfade& xf, 
                              double spu,
@@ -57,14 +57,14 @@ CrossfadeView::CrossfadeView (GtkCanvasGroup *parent,
        _valid = true;
        _visible = true;
 
        _valid = true;
        _visible = true;
 
-       fade_in = gtk_canvas_item_new (GTK_CANVAS_GROUP(group),
-                                      gtk_canvas_line_get_type(),
+       fade_in = gnome_canvas_item_new (GNOME_CANVAS_GROUP(group),
+                                      gnome_canvas_line_get_type(),
                                       "fill_color_rgba", color_map[cCrossfadeLine],
                                        "width_pixels", (guint) 1,
                                       NULL);
 
                                       "fill_color_rgba", color_map[cCrossfadeLine],
                                        "width_pixels", (guint) 1,
                                       NULL);
 
-       fade_out = gtk_canvas_item_new (GTK_CANVAS_GROUP(group),
-                                       gtk_canvas_line_get_type(),
+       fade_out = gnome_canvas_item_new (GNOME_CANVAS_GROUP(group),
+                                       gnome_canvas_line_get_type(),
                                        "fill_color_rgba", color_map[cCrossfadeLine],
                                        "width_pixels", (guint) 1,
                                        NULL);
                                        "fill_color_rgba", color_map[cCrossfadeLine],
                                        "width_pixels", (guint) 1,
                                        NULL);
@@ -73,11 +73,11 @@ CrossfadeView::CrossfadeView (GtkCanvasGroup *parent,
 
        /* no frame around the xfade or overlap rects */
 
 
        /* no frame around the xfade or overlap rects */
 
-       gtk_canvas_item_set (frame, "outline_what", 0, NULL);
+       gnome_canvas_item_set (frame, "outline_what", 0, NULL);
 
        /* never show the vestigial frame */
 
 
        /* never show the vestigial frame */
 
-       gtk_canvas_item_hide (vestigial_frame);
+       gnome_canvas_item_hide (vestigial_frame);
        show_vestigial = false;
 
        gtk_object_set_data (GTK_OBJECT(group), "crossfadeview", this);
        show_vestigial = false;
 
        gtk_object_set_data (GTK_OBJECT(group), "crossfadeview", this);
@@ -110,8 +110,8 @@ CrossfadeView::reset_width_dependent_items (double pixel_width)
        active_changed ();
 
        if (pixel_width < 5) {
        active_changed ();
 
        if (pixel_width < 5) {
-               gtk_canvas_item_hide (fade_in);
-               gtk_canvas_item_hide (fade_out);
+               gnome_canvas_item_hide (fade_in);
+               gnome_canvas_item_hide (fade_out);
        }
 }
 
        }
 }
 
@@ -149,7 +149,7 @@ CrossfadeView::crossfade_changed (Change what_changed)
 void
 CrossfadeView::redraw_curves ()
 {
 void
 CrossfadeView::redraw_curves ()
 {
-       GtkCanvasPoints* points; 
+       GnomeCanvasPoints* points; 
        int32_t npoints;
        float* vec;
        
        int32_t npoints;
        float* vec;
        
@@ -178,12 +178,12 @@ CrossfadeView::redraw_curves ()
        npoints = std::min (gdk_screen_width(), npoints);
 
        if (!_visible || !crossfade.active() || npoints < 3) {
        npoints = std::min (gdk_screen_width(), npoints);
 
        if (!_visible || !crossfade.active() || npoints < 3) {
-               gtk_canvas_item_hide (fade_in);
-               gtk_canvas_item_hide (fade_out);
+               gnome_canvas_item_hide (fade_in);
+               gnome_canvas_item_hide (fade_out);
                return;
        } else {
                return;
        } else {
-               gtk_canvas_item_show (fade_in);
-               gtk_canvas_item_show (fade_out);
+               gnome_canvas_item_show (fade_in);
+               gnome_canvas_item_show (fade_out);
        } 
 
        points = get_canvas_points ("xfade edit redraw", npoints);
        } 
 
        points = get_canvas_points ("xfade edit redraw", npoints);
@@ -194,33 +194,33 @@ CrossfadeView::redraw_curves ()
                points->coords[pci++] = i;
                points->coords[pci++] = 2.0 + h - (h * vec[i]);
        }
                points->coords[pci++] = i;
                points->coords[pci++] = 2.0 + h - (h * vec[i]);
        }
-       gtk_canvas_item_set (fade_in, "points", points, NULL);
+       gnome_canvas_item_set (fade_in, "points", points, NULL);
 
        crossfade.fade_out().get_vector (0, crossfade.length(), vec, npoints);
        for (int i = 0, pci = 0; i < npoints; ++i) {
                points->coords[pci++] = i;
                points->coords[pci++] = 2.0 + h - (h * vec[i]);
        }
 
        crossfade.fade_out().get_vector (0, crossfade.length(), vec, npoints);
        for (int i = 0, pci = 0; i < npoints; ++i) {
                points->coords[pci++] = i;
                points->coords[pci++] = 2.0 + h - (h * vec[i]);
        }
-       gtk_canvas_item_set (fade_out, "points", points, NULL);
+       gnome_canvas_item_set (fade_out, "points", points, NULL);
 
        delete [] vec;
 
 
        delete [] vec;
 
-       gtk_canvas_points_unref (points);
+       gnome_canvas_points_unref (points);
 
        /* XXX this is ugly, but it will have to wait till Crossfades are reimplented
           as regions. This puts crossfade views on top of a track, above all regions.
        */
 
 
        /* XXX this is ugly, but it will have to wait till Crossfades are reimplented
           as regions. This puts crossfade views on top of a track, above all regions.
        */
 
-       gtk_canvas_item_raise_to_top (group);
+       gnome_canvas_item_raise_to_top (group);
 }
 
 void
 CrossfadeView::active_changed ()
 {
        if (crossfade.active()) {
 }
 
 void
 CrossfadeView::active_changed ()
 {
        if (crossfade.active()) {
-               gtk_canvas_item_set (frame, "fill_color_rgba", color_map[cActiveCrossfade], NULL);
+               gnome_canvas_item_set (frame, "fill_color_rgba", color_map[cActiveCrossfade], NULL);
        } else {
        } else {
-               gtk_canvas_item_set (frame, "fill_color_rgba", color_map[cInactiveCrossfade], NULL);
+               gnome_canvas_item_set (frame, "fill_color_rgba", color_map[cInactiveCrossfade], NULL);
        }
 
        redraw_curves ();
        }
 
        redraw_curves ();
@@ -245,19 +245,19 @@ CrossfadeView::upper_regionview () const
 void
 CrossfadeView::show ()
 {
 void
 CrossfadeView::show ()
 {
-       gtk_canvas_item_show (group);
+       gnome_canvas_item_show (group);
        _visible = true;
 }
 
 void
 CrossfadeView::hide ()
 {
        _visible = true;
 }
 
 void
 CrossfadeView::hide ()
 {
-       gtk_canvas_item_hide (group);
+       gnome_canvas_item_hide (group);
        _visible = false;
 }
 
 void
 CrossfadeView::fake_hide ()
 {
        _visible = false;
 }
 
 void
 CrossfadeView::fake_hide ()
 {
-       gtk_canvas_item_hide (group);
+       gnome_canvas_item_hide (group);
 }
 }
index 18eddee96e3a1b8bb09fe60499a73e6db9006f78..d8a5d89858b67b0691ea2fbbc6e71e82a4b97a53 100644 (file)
@@ -23,7 +23,7 @@
 
 #include <vector>
 #include <gtkmm.h>
 
 #include <vector>
 #include <gtkmm.h>
-#include <gtk-canvas.h>
+#include <libgnomecanvas/libgnomecanvas.h>
 #include <sigc++/signal.h>
 #include <ardour/crossfade.h>
 
 #include <sigc++/signal.h>
 #include <ardour/crossfade.h>
 
@@ -34,7 +34,7 @@ class AudioRegionView;
 
 struct CrossfadeView : public TimeAxisViewItem
 {
 
 struct CrossfadeView : public TimeAxisViewItem
 {
-    CrossfadeView (GtkCanvasGroup*, 
+    CrossfadeView (GnomeCanvasGroup*, 
                   AudioTimeAxisView&,
                   ARDOUR::Crossfade&,
                   double initial_samples_per_unit, 
                   AudioTimeAxisView&,
                   ARDOUR::Crossfade&,
                   double initial_samples_per_unit, 
@@ -71,10 +71,10 @@ struct CrossfadeView : public TimeAxisViewItem
 
     double spu;
 
 
     double spu;
 
-    GtkCanvasItem *overlap_rect;
-    GtkCanvasItem *fade_in;
-    GtkCanvasItem *fade_out;
-    GtkCanvasItem *active_button;
+    GnomeCanvasItem *overlap_rect;
+    GnomeCanvasItem *fade_in;
+    GnomeCanvasItem *fade_out;
+    GnomeCanvasItem *active_button;
 
     void crossfade_changed (ARDOUR::Change);
     void active_changed ();
 
     void crossfade_changed (ARDOUR::Change);
     void active_changed ();
index 7f10be94fca512c35397f8fd44e4257acd1822cc..c34a807402f77c99823f359b17e36f2d27a9b2f2 100644 (file)
@@ -26,7 +26,7 @@
 
 #include <sigc++/bind.h>
 
 
 #include <sigc++/bind.h>
 
-#include <gtk-canvas.h>
+#include <libgnomecanvas/libgnomecanvas.h>
 #include <pbd/error.h>
 
 #include <gtkmm2ext/gtk_ui.h>
 #include <pbd/error.h>
 
 #include <gtkmm2ext/gtk_ui.h>
@@ -817,17 +817,17 @@ Editor::left_track_canvas (GdkEventCrossing *ev)
 void
 Editor::initialize_canvas ()
 {
 void
 Editor::initialize_canvas ()
 {
-       gtk_canvas_init ();
+       gnome_canvas_init ();
 
 
-       track_gtk_canvas = gtk_canvas_new_aa ();
+       track_gnome_canvas = gnome_canvas_new_aa ();
 
        /* adjust sensitivity for "picking" items */
 
 
        /* adjust sensitivity for "picking" items */
 
-       // GTK_CANVAS(track_gtk_canvas)->close_enough = 2;
+       // GNOME_CANVAS(track_gnome_canvas)->close_enough = 2;
 
 
-       gtk_signal_connect (GTK_OBJECT(gtk_canvas_root (GTK_CANVAS(track_gtk_canvas))), "event",
+       gtk_signal_connect (GTK_OBJECT(gnome_canvas_root (GNOME_CANVAS(track_gnome_canvas))), "event",
                            (GtkSignalFunc) Editor::_track_canvas_event, this);
                            (GtkSignalFunc) Editor::_track_canvas_event, this);
-       track_canvas = wrap (track_gtk_canvas);
+       track_canvas = wrap (track_gnome_canvas);
        track_canvas->set_name ("EditorMainCanvas");
 
        track_canvas->add_events (Gdk::POINTER_MOTION_HINT_MASK);
        track_canvas->set_name ("EditorMainCanvas");
 
        track_canvas->add_events (Gdk::POINTER_MOTION_HINT_MASK);
@@ -845,8 +845,8 @@ Editor::initialize_canvas ()
 
        string fontname = get_font_for_style (N_("VerboseCanvasCursor"));
 
 
        string fontname = get_font_for_style (N_("VerboseCanvasCursor"));
 
-       verbose_canvas_cursor = gtk_canvas_item_new (gtk_canvas_root(GTK_CANVAS(track_gtk_canvas)),
-                                                    gtk_canvas_text_get_type(),
+       verbose_canvas_cursor = gnome_canvas_item_new (gnome_canvas_root(GNOME_CANVAS(track_gnome_canvas)),
+                                                    gnome_canvas_text_get_type(),
                                                     "font", fontname.c_str(),
                                                     "anchor", GTK_ANCHOR_NW,
                                                     "fill_color_rgba", color_map[cVerboseCanvasCursor],
                                                     "font", fontname.c_str(),
                                                     "anchor", GTK_ANCHOR_NW,
                                                     "fill_color_rgba", color_map[cVerboseCanvasCursor],
@@ -855,52 +855,52 @@ Editor::initialize_canvas ()
 
        /* a group to hold time (measure) lines */
 
 
        /* a group to hold time (measure) lines */
 
-       time_line_group = gtk_canvas_item_new (gtk_canvas_root(GTK_CANVAS(track_gtk_canvas)),
-                                                 gtk_canvas_group_get_type(),
+       time_line_group = gnome_canvas_item_new (gnome_canvas_root(GNOME_CANVAS(track_gnome_canvas)),
+                                                 gnome_canvas_group_get_type(),
                                                  "x", 0.0,
                                                  "y", 0.0,
                                                  NULL);
 
                                                  "x", 0.0,
                                                  "y", 0.0,
                                                  NULL);
 
-       cursor_group = gtk_canvas_item_new (gtk_canvas_root(GTK_CANVAS(track_gtk_canvas)),
-                                                 gtk_canvas_group_get_type(),
+       cursor_group = gnome_canvas_item_new (gnome_canvas_root(GNOME_CANVAS(track_gnome_canvas)),
+                                                 gnome_canvas_group_get_type(),
                                                  "x", 0.0,
                                                  "y", 0.0,
                                                  NULL);
        
                                                  "x", 0.0,
                                                  "y", 0.0,
                                                  NULL);
        
-       time_gtk_canvas = gtk_canvas_new_aa ();
-       time_canvas = wrap (time_gtk_canvas);
+       time_gnome_canvas = gnome_canvas_new_aa ();
+       time_canvas = wrap (time_gnome_canvas);
        time_canvas->set_name ("EditorTimeCanvas");
 
        time_canvas->add_events (Gdk::POINTER_MOTION_HINT_MASK);
 
        time_canvas->set_name ("EditorTimeCanvas");
 
        time_canvas->add_events (Gdk::POINTER_MOTION_HINT_MASK);
 
-       meter_group = gtk_canvas_item_new (gtk_canvas_root(GTK_CANVAS(time_gtk_canvas)),
-                                           gtk_canvas_group_get_type(),
+       meter_group = gnome_canvas_item_new (gnome_canvas_root(GNOME_CANVAS(time_gnome_canvas)),
+                                           gnome_canvas_group_get_type(),
                                            "x", 0.0,
                                            "y", 0.0,
                                            NULL);
                                            "x", 0.0,
                                            "y", 0.0,
                                            NULL);
-       tempo_group = gtk_canvas_item_new (gtk_canvas_root(GTK_CANVAS(time_gtk_canvas)),
-                                           gtk_canvas_group_get_type(),
+       tempo_group = gnome_canvas_item_new (gnome_canvas_root(GNOME_CANVAS(time_gnome_canvas)),
+                                           gnome_canvas_group_get_type(),
                                            "x", 0.0,
                                            "y", timebar_height,
                                            NULL);
                                            "x", 0.0,
                                            "y", timebar_height,
                                            NULL);
-       marker_group = gtk_canvas_item_new (gtk_canvas_root(GTK_CANVAS(time_gtk_canvas)),
-                                           gtk_canvas_group_get_type(),
+       marker_group = gnome_canvas_item_new (gnome_canvas_root(GNOME_CANVAS(time_gnome_canvas)),
+                                           gnome_canvas_group_get_type(),
                                            "x", 0.0,
                                            "y", timebar_height * 2.0,
                                            NULL);
                                            "x", 0.0,
                                            "y", timebar_height * 2.0,
                                            NULL);
-       range_marker_group = gtk_canvas_item_new (gtk_canvas_root(GTK_CANVAS(time_gtk_canvas)),
-                                           gtk_canvas_group_get_type(),
+       range_marker_group = gnome_canvas_item_new (gnome_canvas_root(GNOME_CANVAS(time_gnome_canvas)),
+                                           gnome_canvas_group_get_type(),
                                            "x", 0.0,
                                            "y", timebar_height * 3.0,
                                            NULL);
                                            "x", 0.0,
                                            "y", timebar_height * 3.0,
                                            NULL);
-       transport_marker_group = gtk_canvas_item_new (gtk_canvas_root(GTK_CANVAS(time_gtk_canvas)),
-                                           gtk_canvas_group_get_type(),
+       transport_marker_group = gnome_canvas_item_new (gnome_canvas_root(GNOME_CANVAS(time_gnome_canvas)),
+                                           gnome_canvas_group_get_type(),
                                            "x", 0.0,
                                            "y", timebar_height * 4.0,
                                            NULL);
        
                                            "x", 0.0,
                                            "y", timebar_height * 4.0,
                                            NULL);
        
-       tempo_bar = gtk_canvas_item_new (GTK_CANVAS_GROUP(tempo_group),
-                                        gtk_canvas_simplerect_get_type(),
+       tempo_bar = gnome_canvas_item_new (GNOME_CANVAS_GROUP(tempo_group),
+                                        gnome_canvas_simplerect_get_type(),
                                         "x1", 0.0,
                                         "y1", 0.0,
                                         "x2", max_canvas_coordinate,
                                         "x1", 0.0,
                                         "y1", 0.0,
                                         "x2", max_canvas_coordinate,
@@ -908,8 +908,8 @@ Editor::initialize_canvas ()
                                         "fill_color_rgba", color_map[cTempoBar],
                                         "outline_pixels", 0,
                                          NULL);
                                         "fill_color_rgba", color_map[cTempoBar],
                                         "outline_pixels", 0,
                                          NULL);
-       meter_bar = gtk_canvas_item_new (GTK_CANVAS_GROUP(meter_group),
-                                        gtk_canvas_simplerect_get_type(),
+       meter_bar = gnome_canvas_item_new (GNOME_CANVAS_GROUP(meter_group),
+                                        gnome_canvas_simplerect_get_type(),
                                         "x1", 0.0,
                                         "y1", 0.0,
                                         "x2", max_canvas_coordinate,
                                         "x1", 0.0,
                                         "y1", 0.0,
                                         "x2", max_canvas_coordinate,
@@ -917,8 +917,8 @@ Editor::initialize_canvas ()
                                         "fill_color_rgba", color_map[cMeterBar],
                                         "outline_pixels", 0,
                                         NULL);
                                         "fill_color_rgba", color_map[cMeterBar],
                                         "outline_pixels", 0,
                                         NULL);
-       marker_bar = gtk_canvas_item_new (GTK_CANVAS_GROUP(marker_group),
-                                         gtk_canvas_simplerect_get_type(),
+       marker_bar = gnome_canvas_item_new (GNOME_CANVAS_GROUP(marker_group),
+                                         gnome_canvas_simplerect_get_type(),
                                          "x1", 0.0,
                                          "y1", 0.0,
                                          "x2", max_canvas_coordinate,
                                          "x1", 0.0,
                                          "y1", 0.0,
                                          "x2", max_canvas_coordinate,
@@ -926,8 +926,8 @@ Editor::initialize_canvas ()
                                          "fill_color_rgba", color_map[cMarkerBar],
                                          "outline_pixels", 0,
                                          NULL);
                                          "fill_color_rgba", color_map[cMarkerBar],
                                          "outline_pixels", 0,
                                          NULL);
-       range_marker_bar = gtk_canvas_item_new (GTK_CANVAS_GROUP(range_marker_group),
-                                               gtk_canvas_simplerect_get_type(),
+       range_marker_bar = gnome_canvas_item_new (GNOME_CANVAS_GROUP(range_marker_group),
+                                               gnome_canvas_simplerect_get_type(),
                                                "x1", 0.0,
                                                "y1", 0.0,
                                                "x2", max_canvas_coordinate,
                                                "x1", 0.0,
                                                "y1", 0.0,
                                                "x2", max_canvas_coordinate,
@@ -935,8 +935,8 @@ Editor::initialize_canvas ()
                                                "fill_color_rgba", color_map[cRangeMarkerBar],
                                                "outline_pixels", 0,
                                                NULL);
                                                "fill_color_rgba", color_map[cRangeMarkerBar],
                                                "outline_pixels", 0,
                                                NULL);
-       transport_marker_bar = gtk_canvas_item_new (GTK_CANVAS_GROUP(transport_marker_group),
-                                                   gtk_canvas_simplerect_get_type(),
+       transport_marker_bar = gnome_canvas_item_new (GNOME_CANVAS_GROUP(transport_marker_group),
+                                                   gnome_canvas_simplerect_get_type(),
                                                    "x1", 0.0,
                                                    "y1", 0.0,
                                                    "x2", max_canvas_coordinate,
                                                    "x1", 0.0,
                                                    "y1", 0.0,
                                                    "x2", max_canvas_coordinate,
@@ -945,8 +945,8 @@ Editor::initialize_canvas ()
                                                    "outline_pixels", 0,
                                                    NULL);
        
                                                    "outline_pixels", 0,
                                                    NULL);
        
-       range_bar_drag_rect = gtk_canvas_item_new (GTK_CANVAS_GROUP(range_marker_group),
-                                                  gtk_canvas_simplerect_get_type(),
+       range_bar_drag_rect = gnome_canvas_item_new (GNOME_CANVAS_GROUP(range_marker_group),
+                                                  gnome_canvas_simplerect_get_type(),
                                                   "x1", 0.0,
                                                   "y1", 0.0,
                                                   "x2", 0.0,
                                                   "x1", 0.0,
                                                   "y1", 0.0,
                                                   "x2", 0.0,
@@ -954,10 +954,10 @@ Editor::initialize_canvas ()
                                                   "fill_color_rgba", color_map[cRangeDragBarRectFill],
                                                   "outline_color_rgba", color_map[cRangeDragBarRect],
                                                   NULL);
                                                   "fill_color_rgba", color_map[cRangeDragBarRectFill],
                                                   "outline_color_rgba", color_map[cRangeDragBarRect],
                                                   NULL);
-       gtk_canvas_item_hide (range_bar_drag_rect);
+       gnome_canvas_item_hide (range_bar_drag_rect);
 
 
-       transport_bar_drag_rect = gtk_canvas_item_new (GTK_CANVAS_GROUP(transport_marker_group),
-                                                      gtk_canvas_simplerect_get_type(),
+       transport_bar_drag_rect = gnome_canvas_item_new (GNOME_CANVAS_GROUP(transport_marker_group),
+                                                      gnome_canvas_simplerect_get_type(),
                                                       "x1", 0.0,
                                                       "y1", 0.0,
                                                       "x2", 0.0,
                                                       "x1", 0.0,
                                                       "y1", 0.0,
                                                       "x2", 0.0,
@@ -965,10 +965,10 @@ Editor::initialize_canvas ()
                                                       "fill_color_rgba", color_map[cTransportDragRectFill],
                                                       "outline_color_rgba", color_map[cTransportDragRect],
                                                       NULL);
                                                       "fill_color_rgba", color_map[cTransportDragRectFill],
                                                       "outline_color_rgba", color_map[cTransportDragRect],
                                                       NULL);
-       gtk_canvas_item_hide (transport_bar_drag_rect);
+       gnome_canvas_item_hide (transport_bar_drag_rect);
 
        
 
        
-       marker_drag_line_points = gtk_canvas_points_new (2);
+       marker_drag_line_points = gnome_canvas_points_new (2);
        marker_drag_line_points->coords[0] = 0.0;
        marker_drag_line_points->coords[1] = 0.0;
        marker_drag_line_points->coords[2] = 0.0;
        marker_drag_line_points->coords[0] = 0.0;
        marker_drag_line_points->coords[1] = 0.0;
        marker_drag_line_points->coords[2] = 0.0;
@@ -976,16 +976,16 @@ Editor::initialize_canvas ()
        
        
        //cerr << "set mdl points, nc = " << marker_drag_line_points->num_points << endl;
        
        
        //cerr << "set mdl points, nc = " << marker_drag_line_points->num_points << endl;
-       marker_drag_line = gtk_canvas_item_new (gtk_canvas_root(GTK_CANVAS(track_gtk_canvas)),
-                                               gtk_canvas_line_get_type(),
+       marker_drag_line = gnome_canvas_item_new (gnome_canvas_root(GNOME_CANVAS(track_gnome_canvas)),
+                                               gnome_canvas_line_get_type(),
                                                "width_pixels", 1,
                                                "fill_color_rgba", color_map[cMarkerDragLine],
                                                "points", marker_drag_line_points,
                                                NULL);
                                                "width_pixels", 1,
                                                "fill_color_rgba", color_map[cMarkerDragLine],
                                                "points", marker_drag_line_points,
                                                NULL);
-       gtk_canvas_item_hide (marker_drag_line);
+       gnome_canvas_item_hide (marker_drag_line);
 
 
-       range_marker_drag_rect = gtk_canvas_item_new (gtk_canvas_root(GTK_CANVAS(track_gtk_canvas)),
-                                              gtk_canvas_simplerect_get_type(),
+       range_marker_drag_rect = gnome_canvas_item_new (gnome_canvas_root(GNOME_CANVAS(track_gnome_canvas)),
+                                              gnome_canvas_simplerect_get_type(),
                                               "x1", 0.0,
                                               "y1", 0.0,
                                               "x2", 0.0,
                                               "x1", 0.0,
                                               "y1", 0.0,
                                               "x2", 0.0,
@@ -993,11 +993,11 @@ Editor::initialize_canvas ()
                                               "fill_color_rgba", color_map[cRangeDragRectFill],
                                               "outline_color_rgba", color_map[cRangeDragRect],
                                               NULL);
                                               "fill_color_rgba", color_map[cRangeDragRectFill],
                                               "outline_color_rgba", color_map[cRangeDragRect],
                                               NULL);
-       gtk_canvas_item_hide (range_marker_drag_rect);
+       gnome_canvas_item_hide (range_marker_drag_rect);
        
 
        
 
-       transport_loop_range_rect = gtk_canvas_item_new ((GTK_CANVAS_GROUP(time_line_group)),
-                                              gtk_canvas_simplerect_get_type(),
+       transport_loop_range_rect = gnome_canvas_item_new ((GNOME_CANVAS_GROUP(time_line_group)),
+                                              gnome_canvas_simplerect_get_type(),
                                               "x1", 0.0,
                                               "y1", 0.0,
                                               "x2", 0.0,
                                               "x1", 0.0,
                                               "y1", 0.0,
                                               "x2", 0.0,
@@ -1006,10 +1006,10 @@ Editor::initialize_canvas ()
                                               "outline_color_rgba", color_map[cTransportLoopRect],
                                               "outline_pixels", 1,
                                               NULL);
                                               "outline_color_rgba", color_map[cTransportLoopRect],
                                               "outline_pixels", 1,
                                               NULL);
-       gtk_canvas_item_hide (transport_loop_range_rect);
+       gnome_canvas_item_hide (transport_loop_range_rect);
 
 
-       transport_punch_range_rect = gtk_canvas_item_new ((GTK_CANVAS_GROUP(time_line_group)),
-                                              gtk_canvas_simplerect_get_type(),
+       transport_punch_range_rect = gnome_canvas_item_new ((GNOME_CANVAS_GROUP(time_line_group)),
+                                              gnome_canvas_simplerect_get_type(),
                                               "x1", 0.0,
                                               "y1", 0.0,
                                               "x2", 0.0,
                                               "x1", 0.0,
                                               "y1", 0.0,
                                               "x2", 0.0,
@@ -1018,12 +1018,12 @@ Editor::initialize_canvas ()
                                               "outline_color_rgba", color_map[cTransportPunchRect],
                                               "outline_pixels", 0,
                                               NULL);
                                               "outline_color_rgba", color_map[cTransportPunchRect],
                                               "outline_pixels", 0,
                                               NULL);
-       gtk_canvas_item_lower_to_bottom (transport_punch_range_rect);
-       gtk_canvas_item_lower_to_bottom (transport_loop_range_rect); // loop on the bottom
-       gtk_canvas_item_hide (transport_punch_range_rect);
+       gnome_canvas_item_lower_to_bottom (transport_punch_range_rect);
+       gnome_canvas_item_lower_to_bottom (transport_loop_range_rect); // loop on the bottom
+       gnome_canvas_item_hide (transport_punch_range_rect);
 
 
-       transport_punchin_line = gtk_canvas_item_new ((GTK_CANVAS_GROUP(time_line_group)),
-                                              gtk_canvas_simplerect_get_type(),
+       transport_punchin_line = gnome_canvas_item_new ((GNOME_CANVAS_GROUP(time_line_group)),
+                                              gnome_canvas_simplerect_get_type(),
                                               "x1", 0.0,
                                               "y1", 0.0,
                                               "x2", 0.0,
                                               "x1", 0.0,
                                               "y1", 0.0,
                                               "x2", 0.0,
@@ -1031,10 +1031,10 @@ Editor::initialize_canvas ()
                                               "outline_color_rgba", color_map[cPunchInLine],
                                               "outline_pixels", 1,
                                               NULL);
                                               "outline_color_rgba", color_map[cPunchInLine],
                                               "outline_pixels", 1,
                                               NULL);
-       gtk_canvas_item_hide (transport_punchin_line);
+       gnome_canvas_item_hide (transport_punchin_line);
 
 
-       transport_punchout_line  = gtk_canvas_item_new ((GTK_CANVAS_GROUP(time_line_group)),
-                                              gtk_canvas_simplerect_get_type(),
+       transport_punchout_line  = gnome_canvas_item_new ((GNOME_CANVAS_GROUP(time_line_group)),
+                                              gnome_canvas_simplerect_get_type(),
                                               "x1", 0.0,
                                               "y1", 0.0,
                                               "x2", 0.0,
                                               "x1", 0.0,
                                               "y1", 0.0,
                                               "x2", 0.0,
@@ -1042,14 +1042,14 @@ Editor::initialize_canvas ()
                                               "outline_color_rgba", color_map[cPunchOutLine],
                                               "outline_pixels", 1,
                                               NULL);
                                               "outline_color_rgba", color_map[cPunchOutLine],
                                               "outline_pixels", 1,
                                               NULL);
-       gtk_canvas_item_hide (transport_punchout_line);
+       gnome_canvas_item_hide (transport_punchout_line);
 
 
 
        
        // used to show zoom mode active zooming
 
 
 
        
        // used to show zoom mode active zooming
-       zoom_rect = gtk_canvas_item_new (gtk_canvas_root(GTK_CANVAS(track_gtk_canvas)),
-                                        gtk_canvas_simplerect_get_type(),
+       zoom_rect = gnome_canvas_item_new (gnome_canvas_root(GNOME_CANVAS(track_gnome_canvas)),
+                                        gnome_canvas_simplerect_get_type(),
                                         "x1", 0.0,
                                         "y1", 0.0,
                                         "x2", 0.0,
                                         "x1", 0.0,
                                         "y1", 0.0,
                                         "x2", 0.0,
@@ -1058,14 +1058,14 @@ Editor::initialize_canvas ()
                                         "outline_color_rgba", color_map[cZoomRect],
                                         "outline_pixels", 1,
                                         NULL);
                                         "outline_color_rgba", color_map[cZoomRect],
                                         "outline_pixels", 1,
                                         NULL);
-       gtk_canvas_item_hide (zoom_rect);
+       gnome_canvas_item_hide (zoom_rect);
        gtk_signal_connect (GTK_OBJECT(zoom_rect), "event",
                            (GtkSignalFunc) PublicEditor::canvas_zoom_rect_event,
                            this);
 
        // used as rubberband rect
        gtk_signal_connect (GTK_OBJECT(zoom_rect), "event",
                            (GtkSignalFunc) PublicEditor::canvas_zoom_rect_event,
                            this);
 
        // used as rubberband rect
-       rubberband_rect = gtk_canvas_item_new (gtk_canvas_root(GTK_CANVAS(track_gtk_canvas)),
-                                              gtk_canvas_simplerect_get_type(),
+       rubberband_rect = gnome_canvas_item_new (gnome_canvas_root(GNOME_CANVAS(track_gnome_canvas)),
+                                              gnome_canvas_simplerect_get_type(),
                                               "x1", 0.0,
                                               "y1", 0.0,
                                               "x2", 0.0,
                                               "x1", 0.0,
                                               "y1", 0.0,
                                               "x2", 0.0,
@@ -1074,7 +1074,7 @@ Editor::initialize_canvas ()
                                               "fill_color_rgba", (guint32) color_map[cRubberBandRectFill],
                                               "outline_pixels", 1,
                                               NULL);
                                               "fill_color_rgba", (guint32) color_map[cRubberBandRectFill],
                                               "outline_pixels", 1,
                                               NULL);
-       gtk_canvas_item_hide (rubberband_rect);
+       gnome_canvas_item_hide (rubberband_rect);
 
        
 
 
        
 
@@ -1100,14 +1100,14 @@ Editor::initialize_canvas ()
        
        /* separator lines */
 
        
        /* separator lines */
 
-       tempo_line_points = gtk_canvas_points_new (2);
+       tempo_line_points = gnome_canvas_points_new (2);
        tempo_line_points->coords[0] = 0;
        tempo_line_points->coords[1] = timebar_height;
        tempo_line_points->coords[2] = max_canvas_coordinate;
        tempo_line_points->coords[3] = timebar_height;
        //cerr << "set tl points, nc = " << tempo_line_points->num_points << endl;
        tempo_line_points->coords[0] = 0;
        tempo_line_points->coords[1] = timebar_height;
        tempo_line_points->coords[2] = max_canvas_coordinate;
        tempo_line_points->coords[3] = timebar_height;
        //cerr << "set tl points, nc = " << tempo_line_points->num_points << endl;
-       tempo_line = gtk_canvas_item_new (GTK_CANVAS_GROUP(tempo_group),
-                                         gtk_canvas_line_get_type(),
+       tempo_line = gnome_canvas_item_new (GNOME_CANVAS_GROUP(tempo_group),
+                                         gnome_canvas_line_get_type(),
                                          "width_pixels", 0,
                                          "fill_color", "black",
                                          "points", tempo_line_points,
                                          "width_pixels", 0,
                                          "fill_color", "black",
                                          "points", tempo_line_points,
@@ -1115,14 +1115,14 @@ Editor::initialize_canvas ()
 
        // cerr << "tempo line @ " << tempo_line << endl;
 
 
        // cerr << "tempo line @ " << tempo_line << endl;
 
-       meter_line_points = gtk_canvas_points_new (2);
+       meter_line_points = gnome_canvas_points_new (2);
        meter_line_points->coords[0] = 0;
        meter_line_points->coords[1] = timebar_height;
        meter_line_points->coords[2] = max_canvas_coordinate;
        meter_line_points->coords[3] = timebar_height;
        // cerr << "set ml points, nc = " << tempo_line_points->num_points << endl;
        meter_line_points->coords[0] = 0;
        meter_line_points->coords[1] = timebar_height;
        meter_line_points->coords[2] = max_canvas_coordinate;
        meter_line_points->coords[3] = timebar_height;
        // cerr << "set ml points, nc = " << tempo_line_points->num_points << endl;
-       meter_line = gtk_canvas_item_new (GTK_CANVAS_GROUP(meter_group),
-                                         gtk_canvas_line_get_type(),
+       meter_line = gnome_canvas_item_new (GNOME_CANVAS_GROUP(meter_group),
+                                         gnome_canvas_line_get_type(),
                                          "width_pixels", 0,
                                          "fill_color", "black",
                                          "points", meter_line_points,
                                          "width_pixels", 0,
                                          "fill_color", "black",
                                          "points", meter_line_points,
@@ -1130,28 +1130,28 @@ Editor::initialize_canvas ()
 
        // cerr << "meter line @ " << tempo_line << endl;
        
 
        // cerr << "meter line @ " << tempo_line << endl;
        
-       marker_line_points = gtk_canvas_points_new (2);
+       marker_line_points = gnome_canvas_points_new (2);
        marker_line_points->coords[0] = 0;
        marker_line_points->coords[1] = timebar_height;
        marker_line_points->coords[2] = max_canvas_coordinate;
        marker_line_points->coords[3] = timebar_height;
        // cerr << "set ml2 points, nc = " << marker_line_points->num_points << endl;
        marker_line_points->coords[0] = 0;
        marker_line_points->coords[1] = timebar_height;
        marker_line_points->coords[2] = max_canvas_coordinate;
        marker_line_points->coords[3] = timebar_height;
        // cerr << "set ml2 points, nc = " << marker_line_points->num_points << endl;
-       marker_line = gtk_canvas_item_new (GTK_CANVAS_GROUP(marker_group),
-                                          gtk_canvas_line_get_type(),
+       marker_line = gnome_canvas_item_new (GNOME_CANVAS_GROUP(marker_group),
+                                          gnome_canvas_line_get_type(),
                                           "width_pixels", 0,
                                           "fill_color", "black",
                                           "points", marker_line_points,
                                           NULL);
        // cerr << "set rml points, nc = " << marker_line_points->num_points << endl;
                                           "width_pixels", 0,
                                           "fill_color", "black",
                                           "points", marker_line_points,
                                           NULL);
        // cerr << "set rml points, nc = " << marker_line_points->num_points << endl;
-       range_marker_line = gtk_canvas_item_new (GTK_CANVAS_GROUP(range_marker_group),
-                                          gtk_canvas_line_get_type(),
+       range_marker_line = gnome_canvas_item_new (GNOME_CANVAS_GROUP(range_marker_group),
+                                          gnome_canvas_line_get_type(),
                                           "width_pixels", 0,
                                           "fill_color", "black",
                                           "points", marker_line_points,
                                           NULL);
        // cerr << "set tml2 points, nc = " << marker_line_points->num_points << endl;
                                           "width_pixels", 0,
                                           "fill_color", "black",
                                           "points", marker_line_points,
                                           NULL);
        // cerr << "set tml2 points, nc = " << marker_line_points->num_points << endl;
-       transport_marker_line = gtk_canvas_item_new (GTK_CANVAS_GROUP(transport_marker_group),
-                                          gtk_canvas_line_get_type(),
+       transport_marker_line = gnome_canvas_item_new (GNOME_CANVAS_GROUP(transport_marker_group),
+                                          gnome_canvas_line_get_type(),
                                           "width_pixels", 0,
                                           "fill_color", "black",
                                           "points", marker_line_points,
                                           "width_pixels", 0,
                                           "fill_color", "black",
                                           "points", marker_line_points,
@@ -1164,7 +1164,7 @@ Editor::initialize_canvas ()
        
        double time_height = timebar_height * 5;
        double time_width = FLT_MAX/frames_per_unit;
        
        double time_height = timebar_height * 5;
        double time_width = FLT_MAX/frames_per_unit;
-       gtk_canvas_set_scroll_region (GTK_CANVAS(time_gtk_canvas), 0.0, 0.0, time_width, time_height);
+       gnome_canvas_set_scroll_region (GNOME_CANVAS(time_gnome_canvas), 0.0, 0.0, time_width, time_height);
 
        edit_cursor = new Cursor (*this, "blue", (GtkSignalFunc) _canvas_edit_cursor_event);
        playhead_cursor = new Cursor (*this, "red", (GtkSignalFunc) _canvas_playhead_cursor_event);
 
        edit_cursor = new Cursor (*this, "blue", (GtkSignalFunc) _canvas_edit_cursor_event);
        playhead_cursor = new Cursor (*this, "red", (GtkSignalFunc) _canvas_playhead_cursor_event);
@@ -1444,8 +1444,8 @@ Editor::track_canvas_allocate (GtkAllocation *alloc)
                        strcpy (txt, _(txt1));
                        strcat (txt, _(txt2));
                        
                        strcpy (txt, _(txt1));
                        strcat (txt, _(txt2));
                        
-                       first_action_message = gtk_canvas_item_new (gtk_canvas_root(GTK_CANVAS(track_gtk_canvas)),
-                                                                   gtk_canvas_text_get_type(),
+                       first_action_message = gnome_canvas_item_new (gnome_canvas_root(GNOME_CANVAS(track_gnome_canvas)),
+                                                                   gnome_canvas_text_get_type(),
                                                                    "font", fontname.c_str(),
                                                                    "fill_color_rgba", color_map[cFirstActionMessage],
                                                                    "x", (gdouble) (canvas_width - width) / 2.0,
                                                                    "font", fontname.c_str(),
                                                                    "fill_color_rgba", color_map[cFirstActionMessage],
                                                                    "x", (gdouble) (canvas_width - width) / 2.0,
@@ -1458,7 +1458,7 @@ Editor::track_canvas_allocate (GtkAllocation *alloc)
 
                        /* center it */
 
 
                        /* center it */
 
-                       gtk_canvas_item_set (first_action_message,
+                       gnome_canvas_item_set (first_action_message,
                                             "x", (gdouble) (canvas_width - width) / 2.0,
                                             "y", (gdouble) (canvas_height/2.0) - (2.0 * (ascent+descent)),
                                             NULL);
                                             "x", (gdouble) (canvas_width - width) / 2.0,
                                             "y", (gdouble) (canvas_height/2.0) - (2.0 * (ascent+descent)),
                                             NULL);
@@ -1520,13 +1520,13 @@ Editor::reset_scrolling_region (GtkAllocation *alloc)
                canvas_alloc_height = alloc->height;
                canvas_alloc_width = alloc->width;
        } else {
                canvas_alloc_height = alloc->height;
                canvas_alloc_width = alloc->width;
        } else {
-               canvas_alloc_height = track_gtk_canvas->allocation.height;
-               canvas_alloc_width = track_gtk_canvas->allocation.width;
+               canvas_alloc_height = track_gnome_canvas->allocation.height;
+               canvas_alloc_width = track_gnome_canvas->allocation.width;
        }
 
        canvas_height = max (canvas_height, canvas_alloc_height);
 
        }
 
        canvas_height = max (canvas_height, canvas_alloc_height);
 
-       gtk_canvas_set_scroll_region (GTK_CANVAS(track_gtk_canvas), 0.0, 0.0, 
+       gnome_canvas_set_scroll_region (GNOME_CANVAS(track_gnome_canvas), 0.0, 0.0, 
                                      max (last_canvas_unit, canvas_alloc_width),
                                      canvas_height);
 
                                      max (last_canvas_unit, canvas_alloc_width),
                                      canvas_height);
 
@@ -1536,22 +1536,22 @@ Editor::reset_scrolling_region (GtkAllocation *alloc)
        if (marker_drag_line) {
                marker_drag_line_points->coords[3] = canvas_height;
                // cerr << "set mlA points, nc = " << marker_drag_line_points->num_points << endl;
        if (marker_drag_line) {
                marker_drag_line_points->coords[3] = canvas_height;
                // cerr << "set mlA points, nc = " << marker_drag_line_points->num_points << endl;
-               gtk_canvas_item_set (marker_drag_line, "points", marker_drag_line_points, NULL);
+               gnome_canvas_item_set (marker_drag_line, "points", marker_drag_line_points, NULL);
        }
        if (range_marker_drag_rect) {
        }
        if (range_marker_drag_rect) {
-               gtk_canvas_item_set (range_marker_drag_rect, "y1", 0.0, "y2", (double) canvas_height, NULL);
+               gnome_canvas_item_set (range_marker_drag_rect, "y1", 0.0, "y2", (double) canvas_height, NULL);
        }
        if (transport_loop_range_rect) {
        }
        if (transport_loop_range_rect) {
-               gtk_canvas_item_set (transport_loop_range_rect, "y1", 0.0, "y2", (double) canvas_height, NULL);
+               gnome_canvas_item_set (transport_loop_range_rect, "y1", 0.0, "y2", (double) canvas_height, NULL);
        }
        if (transport_punch_range_rect) {
        }
        if (transport_punch_range_rect) {
-               gtk_canvas_item_set (transport_punch_range_rect, "y1", 0.0, "y2", (double) canvas_height, NULL);
+               gnome_canvas_item_set (transport_punch_range_rect, "y1", 0.0, "y2", (double) canvas_height, NULL);
        }
        if (transport_punchin_line) {
        }
        if (transport_punchin_line) {
-               gtk_canvas_item_set (transport_punchin_line, "y1", 0.0, "y2", (double) canvas_height, NULL);
+               gnome_canvas_item_set (transport_punchin_line, "y1", 0.0, "y2", (double) canvas_height, NULL);
        }
        if (transport_punchout_line) {
        }
        if (transport_punchout_line) {
-               gtk_canvas_item_set (transport_punchout_line, "y1", 0.0, "y2", (double) canvas_height, NULL);
+               gnome_canvas_item_set (transport_punchout_line, "y1", 0.0, "y2", (double) canvas_height, NULL);
        }
        
        
        }
        
        
@@ -1727,7 +1727,7 @@ Editor::connect_to_session (Session *t)
        session = t;
 
        if (first_action_message) {
        session = t;
 
        if (first_action_message) {
-               gtk_canvas_item_hide (first_action_message);
+               gnome_canvas_item_hide (first_action_message);
        }
 
        flush_track_canvas();
        }
 
        flush_track_canvas();
@@ -1948,7 +1948,7 @@ Editor::build_cursors ()
 }
 
 void
 }
 
 void
-Editor::popup_fade_context_menu (int button, int32_t time, GtkCanvasItem* item, ItemType item_type)
+Editor::popup_fade_context_menu (int button, int32_t time, GnomeCanvasItem* item, ItemType item_type)
 {
        using namespace Menu_Helpers;
        AudioRegionView* arv = static_cast<AudioRegionView*> (gtk_object_get_data (GTK_OBJECT(item), "regionview"));
 {
        using namespace Menu_Helpers;
        AudioRegionView* arv = static_cast<AudioRegionView*> (gtk_object_get_data (GTK_OBJECT(item), "regionview"));
@@ -3478,7 +3478,7 @@ Editor::track_canvas_drag_data_received  (GdkDragContext     *context,
        double wx;
        double wy;
 
        double wx;
        double wy;
 
-       gtk_canvas_window_to_world (GTK_CANVAS(track_gtk_canvas), (double) x, (double) y, &wx, &wy);
+       gnome_canvas_window_to_world (GNOME_CANVAS(track_gnome_canvas), (double) x, (double) y, &wx, &wy);
 
        ev.type = GDK_BUTTON_RELEASE;
        ev.button.x = wx;
 
        ev.type = GDK_BUTTON_RELEASE;
        ev.button.x = wx;
@@ -3596,7 +3596,7 @@ Editor::flush_track_canvas ()
           out this method entirely
        */
        
           out this method entirely
        */
        
-       //gtk_canvas_update_now (GTK_CANVAS(track_gtk_canvas));
+       //gnome_canvas_update_now (GNOME_CANVAS(track_gnome_canvas));
        //gtk_main_iteration ();
 }
 
        //gtk_main_iteration ();
 }
 
@@ -3740,8 +3740,8 @@ Editor::set_selected_regionview_from_click (bool add, bool no_track_remove)
                // leads to a mismatch between actual layering
                // and visual layering. resolution required ....
                //
                // leads to a mismatch between actual layering
                // and visual layering. resolution required ....
                //
-               // gtk_canvas_item_raise_to_top (clicked_regionview->get_canvas_group());
-               // gtk_canvas_item_raise_to_top (clicked_regionview->get_time_axis_view().canvas_display);
+               // gnome_canvas_item_raise_to_top (clicked_regionview->get_canvas_group());
+               // gnome_canvas_item_raise_to_top (clicked_regionview->get_time_axis_view().canvas_display);
 
                if (clicked_regionview->get_selected()) {
                        /* no commit necessary: we are the one selected. */
 
                if (clicked_regionview->get_selected()) {
                        /* no commit necessary: we are the one selected. */
@@ -4037,15 +4037,15 @@ Editor::duplicate_dialog (bool dup_region)
 void
 Editor::show_verbose_canvas_cursor ()
 {
 void
 Editor::show_verbose_canvas_cursor ()
 {
-       gtk_canvas_item_raise_to_top (verbose_canvas_cursor);
-       gtk_canvas_item_show (verbose_canvas_cursor);
+       gnome_canvas_item_raise_to_top (verbose_canvas_cursor);
+       gnome_canvas_item_show (verbose_canvas_cursor);
        verbose_cursor_visible = true;
 }
 
 void
 Editor::hide_verbose_canvas_cursor ()
 {
        verbose_cursor_visible = true;
 }
 
 void
 Editor::hide_verbose_canvas_cursor ()
 {
-       gtk_canvas_item_hide (verbose_canvas_cursor);
+       gnome_canvas_item_hide (verbose_canvas_cursor);
        verbose_cursor_visible = false;
 }
 
        verbose_cursor_visible = false;
 }
 
@@ -4055,13 +4055,13 @@ Editor::set_verbose_canvas_cursor (string txt, double x, double y)
        /* XXX get origin of canvas relative to root window,
           add x and y and check compared to gdk_screen_{width,height}
        */
        /* XXX get origin of canvas relative to root window,
           add x and y and check compared to gdk_screen_{width,height}
        */
-       gtk_canvas_item_set (verbose_canvas_cursor, "text", txt.c_str(), "x", x, "y", y, NULL); 
+       gnome_canvas_item_set (verbose_canvas_cursor, "text", txt.c_str(), "x", x, "y", y, NULL);       
 }
 
 void
 Editor::set_verbose_canvas_cursor_text (string txt)
 {
 }
 
 void
 Editor::set_verbose_canvas_cursor_text (string txt)
 {
-       gtk_canvas_item_set (verbose_canvas_cursor, "text", txt.c_str(), NULL);
+       gnome_canvas_item_set (verbose_canvas_cursor, "text", txt.c_str(), NULL);
 }
 
 gint
 }
 
 gint
index 5d749394eeda821c7b88690598d6abc6e0dc6934..1d585662fb710f27f25afda11e78e358db93e7be 100644 (file)
@@ -33,8 +33,8 @@
 
 #include <gtkmm.h>
 #include <gtkmm/layout.h>
 
 #include <gtkmm.h>
 #include <gtkmm/layout.h>
-#include <gtk-canvas.h>
-#include <gtk-canvas/gtk-canvas-util.h>
+#include <libgnomecanvas/libgnomecanvas.h>
+#include <libgnomecanvas/gnome-canvas-util.h>
 #include <gtkmm2ext/selector.h>
 #include <gtkmm2ext/click_box.h>
 
 #include <gtkmm2ext/selector.h>
 #include <gtkmm2ext/click_box.h>
 
@@ -196,14 +196,14 @@ class Editor : public PublicEditor
                */
 
                if (pixel >= 0) {
                */
 
                if (pixel >= 0) {
-                       return (jack_nframes_t) rint (pixel * frames_per_unit * GTK_CANVAS(track_gtk_canvas)->pixels_per_unit);
+                       return (jack_nframes_t) rint (pixel * frames_per_unit * GNOME_CANVAS(track_gnome_canvas)->pixels_per_unit);
                } else {
                        return 0;
                }
        }
 
        gulong frame_to_pixel (jack_nframes_t frame) {
                } else {
                        return 0;
                }
        }
 
        gulong frame_to_pixel (jack_nframes_t frame) {
-               return (gulong) rint ((frame / (frames_per_unit *  GTK_CANVAS(track_gtk_canvas)->pixels_per_unit)));
+               return (gulong) rint ((frame / (frames_per_unit *  GNOME_CANVAS(track_gnome_canvas)->pixels_per_unit)));
        }
 
        /* selection */
        }
 
        /* selection */
@@ -389,7 +389,7 @@ class Editor : public PublicEditor
        void refresh_location_display_internal (ARDOUR::Locations::LocationList&);
        void add_new_location (ARDOUR::Location *);
        void location_gone (ARDOUR::Location *);
        void refresh_location_display_internal (ARDOUR::Locations::LocationList&);
        void add_new_location (ARDOUR::Location *);
        void location_gone (ARDOUR::Location *);
-       void remove_marker (GtkCanvasItem*, GdkEvent*);
+       void remove_marker (GnomeCanvasItem*, GdkEvent*);
        gint really_remove_marker (ARDOUR::Location* loc);
 
        uint32_t location_marker_color;
        gint really_remove_marker (ARDOUR::Location* loc);
 
        uint32_t location_marker_color;
@@ -417,7 +417,7 @@ class Editor : public PublicEditor
        typedef map<ARDOUR::Location*,LocationMarkers *> LocationMarkerMap;
        LocationMarkerMap location_markers;
 
        typedef map<ARDOUR::Location*,LocationMarkers *> LocationMarkerMap;
        LocationMarkerMap location_markers;
 
-       void hide_marker (GtkCanvasItem*, GdkEvent*);
+       void hide_marker (GnomeCanvasItem*, GdkEvent*);
        void clear_marker_display ();
        void mouse_add_new_marker (jack_nframes_t where);
 
        void clear_marker_display ();
        void mouse_add_new_marker (jack_nframes_t where);
 
@@ -471,20 +471,20 @@ class Editor : public PublicEditor
 
        GdkCursor          *current_canvas_cursor;
 
 
        GdkCursor          *current_canvas_cursor;
 
-       GtkWidget          *track_gtk_canvas;
-       GtkWidget          *time_gtk_canvas;
+       GtkWidget          *track_gnome_canvas;
+       GtkWidget          *time_gnome_canvas;
        Gtk::Widget        *track_canvas;
        Gtk::Widget        *time_canvas;
 
        Gtk::Widget        *track_canvas;
        Gtk::Widget        *time_canvas;
 
-       GtkCanvasItem*      first_action_message;
-       GtkCanvasItem      *verbose_canvas_cursor;
+       GnomeCanvasItem*      first_action_message;
+       GnomeCanvasItem      *verbose_canvas_cursor;
        bool                verbose_cursor_visible;
 
        void session_control_changed (ARDOUR::Session::ControlType);
        void queue_session_control_changed (ARDOUR::Session::ControlType);
 
        
        bool                verbose_cursor_visible;
 
        void session_control_changed (ARDOUR::Session::ControlType);
        void queue_session_control_changed (ARDOUR::Session::ControlType);
 
        
-       gint track_canvas_motion (GtkCanvasItem*, GdkEvent*);
+       gint track_canvas_motion (GnomeCanvasItem*, GdkEvent*);
        void set_verbose_canvas_cursor (string, double x, double y);
        void set_verbose_canvas_cursor_text (string);
        void show_verbose_canvas_cursor();
        void set_verbose_canvas_cursor (string, double x, double y);
        void set_verbose_canvas_cursor_text (string);
        void show_verbose_canvas_cursor();
@@ -499,15 +499,15 @@ class Editor : public PublicEditor
        Gtk::EventBox      track_canvas_event_box;
        Gtk::EventBox      time_button_event_box;
 
        Gtk::EventBox      track_canvas_event_box;
        Gtk::EventBox      time_button_event_box;
 
-       GtkCanvasItem      *minsec_group;
-       GtkCanvasItem      *bbt_group;
-       GtkCanvasItem      *smpte_group;
-       GtkCanvasItem      *frame_group;
-       GtkCanvasItem      *tempo_group;
-       GtkCanvasItem      *meter_group;
-       GtkCanvasItem      *marker_group;
-       GtkCanvasItem      *range_marker_group;
-       GtkCanvasItem      *transport_marker_group;
+       GnomeCanvasItem      *minsec_group;
+       GnomeCanvasItem      *bbt_group;
+       GnomeCanvasItem      *smpte_group;
+       GnomeCanvasItem      *frame_group;
+       GnomeCanvasItem      *tempo_group;
+       GnomeCanvasItem      *meter_group;
+       GnomeCanvasItem      *marker_group;
+       GnomeCanvasItem      *range_marker_group;
+       GnomeCanvasItem      *transport_marker_group;
        
        enum {
                ruler_metric_smpte = 0,
        
        enum {
                ruler_metric_smpte = 0,
@@ -569,25 +569,25 @@ class Editor : public PublicEditor
        Gtk::Menu          *editor_ruler_menu;
 
        
        Gtk::Menu          *editor_ruler_menu;
 
        
-       GtkCanvasItem      *tempo_bar;
-       GtkCanvasItem      *meter_bar;
-       GtkCanvasItem      *marker_bar;
-       GtkCanvasItem      *range_marker_bar;
+       GnomeCanvasItem      *tempo_bar;
+       GnomeCanvasItem      *meter_bar;
+       GnomeCanvasItem      *marker_bar;
+       GnomeCanvasItem      *range_marker_bar;
 
 
-       GtkCanvasItem      *transport_marker_bar;
+       GnomeCanvasItem      *transport_marker_bar;
 
        
 
        
-       GtkCanvasItem      *tempo_line;
-       GtkCanvasItem      *meter_line;
-       GtkCanvasItem      *marker_line;
-       GtkCanvasItem      *range_marker_line;
-       GtkCanvasItem      *transport_marker_line;
-
-       GtkCanvasPoints    *tempo_line_points;
-       GtkCanvasPoints    *meter_line_points;
-       GtkCanvasPoints    *marker_line_points;
-       GtkCanvasPoints    *range_marker_line_points;
-       GtkCanvasPoints    *transport_marker_line_points;
+       GnomeCanvasItem      *tempo_line;
+       GnomeCanvasItem      *meter_line;
+       GnomeCanvasItem      *marker_line;
+       GnomeCanvasItem      *range_marker_line;
+       GnomeCanvasItem      *transport_marker_line;
+
+       GnomeCanvasPoints    *tempo_line_points;
+       GnomeCanvasPoints    *meter_line_points;
+       GnomeCanvasPoints    *marker_line_points;
+       GnomeCanvasPoints    *range_marker_line_points;
+       GnomeCanvasPoints    *transport_marker_line_points;
 
        Gtk::Label  minsec_label;
        Gtk::Label  bbt_label;
 
        Gtk::Label  minsec_label;
        Gtk::Label  bbt_label;
@@ -605,8 +605,8 @@ class Editor : public PublicEditor
 
        struct Cursor {
            Editor&             editor;
 
        struct Cursor {
            Editor&             editor;
-           GtkCanvasPoints    *points;
-           GtkCanvasItem      *canvas_item;
+           GnomeCanvasPoints    *points;
+           GnomeCanvasItem      *canvas_item;
            jack_nframes_t      current_frame;
            GtkSignalFunc       callback;
                double                          length;
            jack_nframes_t      current_frame;
            GtkSignalFunc       callback;
                double                          length;
@@ -625,7 +625,7 @@ class Editor : public PublicEditor
 
        Cursor* playhead_cursor;
        Cursor* edit_cursor;
 
        Cursor* playhead_cursor;
        Cursor* edit_cursor;
-       GtkCanvasItem* cursor_group;
+       GnomeCanvasItem* cursor_group;
 
        void    cursor_to_next_region_point (Cursor*, ARDOUR::RegionPoint);
        void    cursor_to_previous_region_point (Cursor*, ARDOUR::RegionPoint);
 
        void    cursor_to_next_region_point (Cursor*, ARDOUR::RegionPoint);
        void    cursor_to_previous_region_point (Cursor*, ARDOUR::RegionPoint);
@@ -803,12 +803,12 @@ class Editor : public PublicEditor
        jack_nframes_t cut_buffer_start;
        jack_nframes_t cut_buffer_length;
 
        jack_nframes_t cut_buffer_start;
        jack_nframes_t cut_buffer_length;
 
-       gint typed_event (GtkCanvasItem*, GdkEvent*, ItemType);
-       gint button_press_handler (GtkCanvasItem*, GdkEvent*, ItemType);
-       gint button_release_handler (GtkCanvasItem*, GdkEvent*, ItemType);
-       gint motion_handler (GtkCanvasItem*, GdkEvent*, ItemType);
-       gint enter_handler (GtkCanvasItem*, GdkEvent*, ItemType);
-       gint leave_handler (GtkCanvasItem*, GdkEvent*, ItemType);
+       gint typed_event (GnomeCanvasItem*, GdkEvent*, ItemType);
+       gint button_press_handler (GnomeCanvasItem*, GdkEvent*, ItemType);
+       gint button_release_handler (GnomeCanvasItem*, GdkEvent*, ItemType);
+       gint motion_handler (GnomeCanvasItem*, GdkEvent*, ItemType);
+       gint enter_handler (GnomeCanvasItem*, GdkEvent*, ItemType);
+       gint leave_handler (GnomeCanvasItem*, GdkEvent*, ItemType);
        
        /* KEYMAP HANDLING */
 
        
        /* KEYMAP HANDLING */
 
@@ -1037,7 +1037,7 @@ class Editor : public PublicEditor
        void queue_route_list_reordered (gint row, gint col);
 
        struct DragInfo {
        void queue_route_list_reordered (gint row, gint col);
 
        struct DragInfo {
-           GtkCanvasItem* item;
+           GnomeCanvasItem* item;
            void* data;
            jack_nframes_t last_frame_position;
            int32_t pointer_frame_offset;
            void* data;
            jack_nframes_t last_frame_position;
            int32_t pointer_frame_offset;
@@ -1049,8 +1049,8 @@ class Editor : public PublicEditor
            double cumulative_y_drag;
            double current_pointer_x;
            double current_pointer_y;
            double cumulative_y_drag;
            double current_pointer_x;
            double current_pointer_y;
-           void (Editor::*motion_callback)(GtkCanvasItem*, GdkEvent*);
-           void (Editor::*finished_callback)(GtkCanvasItem*, GdkEvent*);
+           void (Editor::*motion_callback)(GnomeCanvasItem*, GdkEvent*);
+           void (Editor::*finished_callback)(GnomeCanvasItem*, GdkEvent*);
            TimeAxisView* last_trackview;
            bool x_constrained;
            bool copy;
            TimeAxisView* last_trackview;
            bool x_constrained;
            bool copy;
@@ -1070,56 +1070,56 @@ class Editor : public PublicEditor
        LineDragInfo current_line_drag_info;
 
        void start_grab (GdkEvent*, GdkCursor* cursor = 0);
        LineDragInfo current_line_drag_info;
 
        void start_grab (GdkEvent*, GdkCursor* cursor = 0);
-       bool end_grab (GtkCanvasItem*, GdkEvent*);
+       bool end_grab (GnomeCanvasItem*, GdkEvent*);
 
        Gtk::Menu fade_context_menu;
 
        Gtk::Menu fade_context_menu;
-       void popup_fade_context_menu (int, int, GtkCanvasItem*, ItemType);
-
-       void start_fade_in_grab (GtkCanvasItem*, GdkEvent*);
-       void start_fade_out_grab (GtkCanvasItem*, GdkEvent*);
-       void fade_in_drag_motion_callback (GtkCanvasItem*, GdkEvent*);
-       void fade_out_drag_motion_callback (GtkCanvasItem*, GdkEvent*);
-       void fade_in_drag_finished_callback (GtkCanvasItem*, GdkEvent*);
-       void fade_out_drag_finished_callback (GtkCanvasItem*, GdkEvent*);
+       void popup_fade_context_menu (int, int, GnomeCanvasItem*, ItemType);
+
+       void start_fade_in_grab (GnomeCanvasItem*, GdkEvent*);
+       void start_fade_out_grab (GnomeCanvasItem*, GdkEvent*);
+       void fade_in_drag_motion_callback (GnomeCanvasItem*, GdkEvent*);
+       void fade_out_drag_motion_callback (GnomeCanvasItem*, GdkEvent*);
+       void fade_in_drag_finished_callback (GnomeCanvasItem*, GdkEvent*);
+       void fade_out_drag_finished_callback (GnomeCanvasItem*, GdkEvent*);
        
        std::set<ARDOUR::Playlist*> motion_frozen_playlists;
        
        std::set<ARDOUR::Playlist*> motion_frozen_playlists;
-       void region_drag_motion_callback (GtkCanvasItem*, GdkEvent*);
-       void region_drag_finished_callback (GtkCanvasItem*, GdkEvent*);
-       void region_copy_drag_finished_callback (GtkCanvasItem*, GdkEvent*);
-
-       void cursor_drag_motion_callback (GtkCanvasItem*, GdkEvent*);
-       void cursor_drag_finished_callback (GtkCanvasItem*, GdkEvent*);
-       void marker_drag_motion_callback (GtkCanvasItem*, GdkEvent*);
-       void marker_drag_finished_callback (GtkCanvasItem*, GdkEvent*);
-       void control_point_drag_motion_callback (GtkCanvasItem*, GdkEvent*);
-       void control_point_drag_finished_callback (GtkCanvasItem*, GdkEvent*);
-       void line_drag_motion_callback (GtkCanvasItem*, GdkEvent*);
-       void line_drag_finished_callback (GtkCanvasItem*, GdkEvent*);
-
-       void tempo_marker_drag_motion_callback (GtkCanvasItem*, GdkEvent*);
-       void tempo_marker_drag_finished_callback (GtkCanvasItem*, GdkEvent*);
-       void meter_marker_drag_motion_callback (GtkCanvasItem*, GdkEvent*);
-       void meter_marker_drag_finished_callback (GtkCanvasItem*, GdkEvent*);
-
-       gint mouse_rename_region (GtkCanvasItem*, GdkEvent*);
-
-       void start_region_grab (GtkCanvasItem*, GdkEvent*);
-       void start_region_copy_grab (GtkCanvasItem*, GdkEvent*);
-       void start_region_brush_grab (GtkCanvasItem*, GdkEvent*);
-       void start_selection_grab (GtkCanvasItem*, GdkEvent*);
-       void start_cursor_grab (GtkCanvasItem*, GdkEvent*);
-       void start_marker_grab (GtkCanvasItem*, GdkEvent*);
-       void start_control_point_grab (GtkCanvasItem*, GdkEvent*);
-       void start_line_grab_from_regionview (GtkCanvasItem*, GdkEvent*);
-       void start_line_grab_from_line (GtkCanvasItem*, GdkEvent*);
+       void region_drag_motion_callback (GnomeCanvasItem*, GdkEvent*);
+       void region_drag_finished_callback (GnomeCanvasItem*, GdkEvent*);
+       void region_copy_drag_finished_callback (GnomeCanvasItem*, GdkEvent*);
+
+       void cursor_drag_motion_callback (GnomeCanvasItem*, GdkEvent*);
+       void cursor_drag_finished_callback (GnomeCanvasItem*, GdkEvent*);
+       void marker_drag_motion_callback (GnomeCanvasItem*, GdkEvent*);
+       void marker_drag_finished_callback (GnomeCanvasItem*, GdkEvent*);
+       void control_point_drag_motion_callback (GnomeCanvasItem*, GdkEvent*);
+       void control_point_drag_finished_callback (GnomeCanvasItem*, GdkEvent*);
+       void line_drag_motion_callback (GnomeCanvasItem*, GdkEvent*);
+       void line_drag_finished_callback (GnomeCanvasItem*, GdkEvent*);
+
+       void tempo_marker_drag_motion_callback (GnomeCanvasItem*, GdkEvent*);
+       void tempo_marker_drag_finished_callback (GnomeCanvasItem*, GdkEvent*);
+       void meter_marker_drag_motion_callback (GnomeCanvasItem*, GdkEvent*);
+       void meter_marker_drag_finished_callback (GnomeCanvasItem*, GdkEvent*);
+
+       gint mouse_rename_region (GnomeCanvasItem*, GdkEvent*);
+
+       void start_region_grab (GnomeCanvasItem*, GdkEvent*);
+       void start_region_copy_grab (GnomeCanvasItem*, GdkEvent*);
+       void start_region_brush_grab (GnomeCanvasItem*, GdkEvent*);
+       void start_selection_grab (GnomeCanvasItem*, GdkEvent*);
+       void start_cursor_grab (GnomeCanvasItem*, GdkEvent*);
+       void start_marker_grab (GnomeCanvasItem*, GdkEvent*);
+       void start_control_point_grab (GnomeCanvasItem*, GdkEvent*);
+       void start_line_grab_from_regionview (GnomeCanvasItem*, GdkEvent*);
+       void start_line_grab_from_line (GnomeCanvasItem*, GdkEvent*);
        void start_line_grab (AutomationLine *, GdkEvent*);
        void start_line_grab (AutomationLine *, GdkEvent*);
-       void start_tempo_marker_grab (GtkCanvasItem*, GdkEvent*);
-       void start_meter_marker_grab (GtkCanvasItem*, GdkEvent*);
+       void start_tempo_marker_grab (GnomeCanvasItem*, GdkEvent*);
+       void start_meter_marker_grab (GnomeCanvasItem*, GdkEvent*);
 
        void region_view_item_click (AudioRegionView&, GdkEventButton*);
 
 
        void region_view_item_click (AudioRegionView&, GdkEventButton*);
 
-       void remove_gain_control_point (GtkCanvasItem*, GdkEvent*);
-       void remove_control_point (GtkCanvasItem*, GdkEvent*);
+       void remove_gain_control_point (GnomeCanvasItem*, GdkEvent*);
+       void remove_control_point (GnomeCanvasItem*, GdkEvent*);
 
        void mouse_brush_insert_region (AudioRegionView*, jack_nframes_t pos);
        void brush (jack_nframes_t);
 
        void mouse_brush_insert_region (AudioRegionView*, jack_nframes_t pos);
        void brush (jack_nframes_t);
@@ -1129,81 +1129,81 @@ class Editor : public PublicEditor
 
        /* static versions of these are public in PublicEditor */
        
 
        /* static versions of these are public in PublicEditor */
        
-       gint _canvas_crossfade_view_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
-       gint _canvas_fade_in_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
-       gint _canvas_fade_in_handle_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
-       gint _canvas_fade_out_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
-       gint _canvas_fade_out_handle_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
-       gint _canvas_region_view_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
-       gint _canvas_region_view_name_highlight_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
-       gint _canvas_region_view_name_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
-       gint _canvas_stream_view_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
-       gint _canvas_automation_track_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
-       gint _canvas_marker_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
-       gint _canvas_zoom_rect_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
-       gint _canvas_selection_rect_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
-       gint _canvas_selection_start_trim_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
-       gint _canvas_selection_end_trim_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
-       gint _canvas_control_point_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
-       gint _canvas_line_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
-       gint _canvas_tempo_marker_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
-       gint _canvas_meter_marker_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
-       gint _canvas_tempo_bar_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
-       gint _canvas_meter_bar_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
-       gint _canvas_marker_bar_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
-       gint _canvas_range_marker_bar_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
-       gint _canvas_transport_marker_bar_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
-       gint _canvas_imageframe_item_view_event(GtkCanvasItem *item, GdkEvent* event, gpointer data) ;
-       gint _canvas_imageframe_view_event(GtkCanvasItem *item, GdkEvent* event, gpointer data) ;
-       gint _canvas_imageframe_start_handle_event(GtkCanvasItem* item, GdkEvent* event, gpointer data) ;
-       gint _canvas_imageframe_end_handle_event(GtkCanvasItem* item, GdkEvent* event, gpointer data) ;
-       gint _canvas_marker_time_axis_view_event(GtkCanvasItem* item, GdkEvent* event, gpointer data) ;
-       gint _canvas_markerview_item_view_event(GtkCanvasItem* item, GdkEvent* event, gpointer data) ;
-       gint _canvas_markerview_start_handle_event(GtkCanvasItem* item, GdkEvent* event, gpointer data) ;
-       gint _canvas_markerview_end_handle_event(GtkCanvasItem* item, GdkEvent* event, gpointer data) ;
+       gint _canvas_crossfade_view_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
+       gint _canvas_fade_in_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
+       gint _canvas_fade_in_handle_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
+       gint _canvas_fade_out_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
+       gint _canvas_fade_out_handle_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
+       gint _canvas_region_view_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
+       gint _canvas_region_view_name_highlight_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
+       gint _canvas_region_view_name_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
+       gint _canvas_stream_view_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
+       gint _canvas_automation_track_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
+       gint _canvas_marker_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
+       gint _canvas_zoom_rect_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
+       gint _canvas_selection_rect_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
+       gint _canvas_selection_start_trim_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
+       gint _canvas_selection_end_trim_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
+       gint _canvas_control_point_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
+       gint _canvas_line_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
+       gint _canvas_tempo_marker_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
+       gint _canvas_meter_marker_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
+       gint _canvas_tempo_bar_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
+       gint _canvas_meter_bar_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
+       gint _canvas_marker_bar_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
+       gint _canvas_range_marker_bar_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
+       gint _canvas_transport_marker_bar_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
+       gint _canvas_imageframe_item_view_event(GnomeCanvasItem *item, GdkEvent* event, gpointer data) ;
+       gint _canvas_imageframe_view_event(GnomeCanvasItem *item, GdkEvent* event, gpointer data) ;
+       gint _canvas_imageframe_start_handle_event(GnomeCanvasItem* item, GdkEvent* event, gpointer data) ;
+       gint _canvas_imageframe_end_handle_event(GnomeCanvasItem* item, GdkEvent* event, gpointer data) ;
+       gint _canvas_marker_time_axis_view_event(GnomeCanvasItem* item, GdkEvent* event, gpointer data) ;
+       gint _canvas_markerview_item_view_event(GnomeCanvasItem* item, GdkEvent* event, gpointer data) ;
+       gint _canvas_markerview_start_handle_event(GnomeCanvasItem* item, GdkEvent* event, gpointer data) ;
+       gint _canvas_markerview_end_handle_event(GnomeCanvasItem* item, GdkEvent* event, gpointer data) ;
 
        /* now the real things */
 
 
        /* now the real things */
 
-       gint canvas_crossfade_view_event (GtkCanvasItem* item, GdkEvent* event, CrossfadeView*);
-       gint canvas_fade_in_event (GtkCanvasItem* item, GdkEvent* event, AudioRegionView*);
-       gint canvas_fade_in_handle_event (GtkCanvasItem* item, GdkEvent* event, AudioRegionView*);
-       gint canvas_fade_out_event (GtkCanvasItem* item, GdkEvent* event, AudioRegionView*);
-       gint canvas_fade_out_handle_event (GtkCanvasItem* item, GdkEvent* event, AudioRegionView*);
-       gint canvas_region_view_event (GtkCanvasItem* item, GdkEvent* event, AudioRegionView*);
-       gint canvas_stream_view_event (GtkCanvasItem* item, GdkEvent* event, AudioTimeAxisView*);
-       gint canvas_automation_track_event (GtkCanvasItem* item, GdkEvent* event, AutomationTimeAxisView*);
-       gint canvas_marker_event (GtkCanvasItem* item, GdkEvent* event);
-       gint canvas_zoom_rect_event (GtkCanvasItem* item, GdkEvent* event);
-       gint canvas_selection_rect_event (GtkCanvasItem* item, GdkEvent* event);
-       gint canvas_selection_start_trim_event (GtkCanvasItem* item, GdkEvent* event);
-       gint canvas_selection_end_trim_event (GtkCanvasItem* item, GdkEvent* event);
-       gint canvas_control_point_event (GtkCanvasItem* item, GdkEvent* event);
-       gint canvas_line_event (GtkCanvasItem* item, GdkEvent* event);
-       gint canvas_tempo_marker_event (GtkCanvasItem* item, GdkEvent* event);
-       gint canvas_meter_marker_event (GtkCanvasItem* item, GdkEvent* event);
-       gint canvas_tempo_bar_event (GtkCanvasItem* item, GdkEvent* event);
-       gint canvas_meter_bar_event (GtkCanvasItem* item, GdkEvent* event);
-       gint canvas_marker_bar_event (GtkCanvasItem* item, GdkEvent* event);
-       gint canvas_range_marker_bar_event (GtkCanvasItem* item, GdkEvent* event);
-       gint canvas_transport_marker_bar_event (GtkCanvasItem* item, GdkEvent* event);
-       gint canvas_region_view_name_highlight_event (GtkCanvasItem* item, GdkEvent* event);
-       gint canvas_region_view_name_event (GtkCanvasItem* item, GdkEvent* event);
+       gint canvas_crossfade_view_event (GnomeCanvasItem* item, GdkEvent* event, CrossfadeView*);
+       gint canvas_fade_in_event (GnomeCanvasItem* item, GdkEvent* event, AudioRegionView*);
+       gint canvas_fade_in_handle_event (GnomeCanvasItem* item, GdkEvent* event, AudioRegionView*);
+       gint canvas_fade_out_event (GnomeCanvasItem* item, GdkEvent* event, AudioRegionView*);
+       gint canvas_fade_out_handle_event (GnomeCanvasItem* item, GdkEvent* event, AudioRegionView*);
+       gint canvas_region_view_event (GnomeCanvasItem* item, GdkEvent* event, AudioRegionView*);
+       gint canvas_stream_view_event (GnomeCanvasItem* item, GdkEvent* event, AudioTimeAxisView*);
+       gint canvas_automation_track_event (GnomeCanvasItem* item, GdkEvent* event, AutomationTimeAxisView*);
+       gint canvas_marker_event (GnomeCanvasItem* item, GdkEvent* event);
+       gint canvas_zoom_rect_event (GnomeCanvasItem* item, GdkEvent* event);
+       gint canvas_selection_rect_event (GnomeCanvasItem* item, GdkEvent* event);
+       gint canvas_selection_start_trim_event (GnomeCanvasItem* item, GdkEvent* event);
+       gint canvas_selection_end_trim_event (GnomeCanvasItem* item, GdkEvent* event);
+       gint canvas_control_point_event (GnomeCanvasItem* item, GdkEvent* event);
+       gint canvas_line_event (GnomeCanvasItem* item, GdkEvent* event);
+       gint canvas_tempo_marker_event (GnomeCanvasItem* item, GdkEvent* event);
+       gint canvas_meter_marker_event (GnomeCanvasItem* item, GdkEvent* event);
+       gint canvas_tempo_bar_event (GnomeCanvasItem* item, GdkEvent* event);
+       gint canvas_meter_bar_event (GnomeCanvasItem* item, GdkEvent* event);
+       gint canvas_marker_bar_event (GnomeCanvasItem* item, GdkEvent* event);
+       gint canvas_range_marker_bar_event (GnomeCanvasItem* item, GdkEvent* event);
+       gint canvas_transport_marker_bar_event (GnomeCanvasItem* item, GdkEvent* event);
+       gint canvas_region_view_name_highlight_event (GnomeCanvasItem* item, GdkEvent* event);
+       gint canvas_region_view_name_event (GnomeCanvasItem* item, GdkEvent* event);
 
        /* these are not publically accessible, but we still need the static versions
           till we use Gnome::Canvas.
        */
        
 
        /* these are not publically accessible, but we still need the static versions
           till we use Gnome::Canvas.
        */
        
-       static gint _canvas_copy_region_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
-       gint canvas_copy_region_event (GtkCanvasItem* item, GdkEvent* event);
+       static gint _canvas_copy_region_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
+       gint canvas_copy_region_event (GnomeCanvasItem* item, GdkEvent* event);
 
 
-       static gint _canvas_playhead_cursor_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
-       gint canvas_playhead_cursor_event (GtkCanvasItem* item, GdkEvent* event);
+       static gint _canvas_playhead_cursor_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
+       gint canvas_playhead_cursor_event (GnomeCanvasItem* item, GdkEvent* event);
 
 
-       static gint _canvas_edit_cursor_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
-       gint canvas_edit_cursor_event (GtkCanvasItem* item, GdkEvent* event);
+       static gint _canvas_edit_cursor_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
+       gint canvas_edit_cursor_event (GnomeCanvasItem* item, GdkEvent* event);
        
        
-       static gint _track_canvas_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
-       gint track_canvas_event (GtkCanvasItem* item, GdkEvent* event);
+       static gint _track_canvas_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
+       gint track_canvas_event (GnomeCanvasItem* item, GdkEvent* event);
 
        gint track_canvas_button_press_event (GdkEventButton *);
        gint track_canvas_button_release_event (GdkEventButton *);
 
        gint track_canvas_button_press_event (GdkEventButton *);
        gint track_canvas_button_release_event (GdkEventButton *);
@@ -1253,12 +1253,12 @@ class Editor : public PublicEditor
 
        ARDOUR::TempoMap::BBTPointList *current_bbt_points;
        
 
        ARDOUR::TempoMap::BBTPointList *current_bbt_points;
        
-       typedef vector<GtkCanvasItem*> TimeLineList;
+       typedef vector<GnomeCanvasItem*> TimeLineList;
        TimeLineList free_measure_lines;
        TimeLineList used_measure_lines;
 
        TimeLineList free_measure_lines;
        TimeLineList used_measure_lines;
 
-       GtkCanvasItem* time_line_group;
-       GtkCanvasItem* get_time_line ();
+       GnomeCanvasItem* time_line_group;
+       GnomeCanvasItem* get_time_line ();
        void hide_measures ();
        void draw_measures ();
        void draw_time_bars ();
        void hide_measures ();
        void draw_measures ();
        void draw_time_bars ();
@@ -1268,15 +1268,15 @@ class Editor : public PublicEditor
        void mouse_add_new_tempo_event (jack_nframes_t where);
        void mouse_add_new_meter_event (jack_nframes_t where);
 
        void mouse_add_new_tempo_event (jack_nframes_t where);
        void mouse_add_new_meter_event (jack_nframes_t where);
 
-       void remove_tempo_marker (GtkCanvasItem*);
-       void remove_meter_marker (GtkCanvasItem*);
+       void remove_tempo_marker (GnomeCanvasItem*);
+       void remove_meter_marker (GnomeCanvasItem*);
        gint real_remove_tempo_marker (ARDOUR::TempoSection*);
        gint real_remove_meter_marker (ARDOUR::MeterSection*);
        
        void edit_tempo_section (ARDOUR::TempoSection*);
        void edit_meter_section (ARDOUR::MeterSection*);
        gint real_remove_tempo_marker (ARDOUR::TempoSection*);
        gint real_remove_meter_marker (ARDOUR::MeterSection*);
        
        void edit_tempo_section (ARDOUR::TempoSection*);
        void edit_meter_section (ARDOUR::MeterSection*);
-       void edit_tempo_marker (GtkCanvasItem*);
-       void edit_meter_marker (GtkCanvasItem*);
+       void edit_tempo_marker (GnomeCanvasItem*);
+       void edit_meter_marker (GnomeCanvasItem*);
        
        void marker_menu_edit ();
        void marker_menu_remove ();
        
        void marker_menu_edit ();
        void marker_menu_remove ();
@@ -1292,10 +1292,10 @@ class Editor : public PublicEditor
        void update_loop_range_view (bool visibility=false);
        void update_punch_range_view (bool visibility=false);
         gint new_transport_marker_menu_popdown (GdkEventAny*);
        void update_loop_range_view (bool visibility=false);
        void update_punch_range_view (bool visibility=false);
         gint new_transport_marker_menu_popdown (GdkEventAny*);
-       void marker_context_menu (GdkEventButton*, GtkCanvasItem*);
-       void tm_marker_context_menu (GdkEventButton*, GtkCanvasItem*);
-       void transport_marker_context_menu (GdkEventButton*, GtkCanvasItem*);
-       void new_transport_marker_context_menu (GdkEventButton*, GtkCanvasItem*);
+       void marker_context_menu (GdkEventButton*, GnomeCanvasItem*);
+       void tm_marker_context_menu (GdkEventButton*, GnomeCanvasItem*);
+       void transport_marker_context_menu (GdkEventButton*, GnomeCanvasItem*);
+       void new_transport_marker_context_menu (GdkEventButton*, GnomeCanvasItem*);
        void build_marker_menu ();
        void build_tm_marker_menu ();
        void build_transport_marker_menu ();
        void build_marker_menu ();
        void build_tm_marker_menu ();
        void build_transport_marker_menu ();
@@ -1305,7 +1305,7 @@ class Editor : public PublicEditor
        Gtk::Menu* marker_menu;
        Gtk::Menu* transport_marker_menu;
        Gtk::Menu* new_transport_marker_menu;
        Gtk::Menu* marker_menu;
        Gtk::Menu* transport_marker_menu;
        Gtk::Menu* new_transport_marker_menu;
-       GtkCanvasItem* marker_menu_item;
+       GnomeCanvasItem* marker_menu_item;
 
        typedef list<Marker*> Marks;
        Marks metric_marks;
 
        typedef list<Marker*> Marks;
        Marks metric_marks;
@@ -1419,9 +1419,9 @@ class Editor : public PublicEditor
                SelectionMove
        } selection_op;
 
                SelectionMove
        } selection_op;
 
-       void start_selection_op (GtkCanvasItem* item, GdkEvent* event, SelectionOp);
-       void drag_selection (GtkCanvasItem* item, GdkEvent* event);
-       void end_selection_op (GtkCanvasItem* item, GdkEvent* event);
+       void start_selection_op (GnomeCanvasItem* item, GdkEvent* event, SelectionOp);
+       void drag_selection (GnomeCanvasItem* item, GdkEvent* event);
+       void end_selection_op (GnomeCanvasItem* item, GdkEvent* event);
        void cancel_selection ();
 
        void region_selection_op (void (ARDOUR::Region::*pmf)(void));
        void cancel_selection ();
 
        void region_selection_op (void (ARDOUR::Region::*pmf)(void));
@@ -1440,28 +1440,28 @@ class Editor : public PublicEditor
                CreateTransportMarker
        } range_marker_op;
 
                CreateTransportMarker
        } range_marker_op;
 
-       void start_range_markerbar_op (GtkCanvasItem* item, GdkEvent* event, RangeMarkerOp);
-       void drag_range_markerbar_op (GtkCanvasItem* item, GdkEvent* event);
-       void end_range_markerbar_op (GtkCanvasItem* item, GdkEvent* event);
+       void start_range_markerbar_op (GnomeCanvasItem* item, GdkEvent* event, RangeMarkerOp);
+       void drag_range_markerbar_op (GnomeCanvasItem* item, GdkEvent* event);
+       void end_range_markerbar_op (GnomeCanvasItem* item, GdkEvent* event);
 
        
 
        
-       GtkCanvasItem      *range_bar_drag_rect;
-       GtkCanvasItem      *transport_bar_drag_rect;
-       GtkCanvasItem      *marker_drag_line;
-       GtkCanvasPoints    *marker_drag_line_points;
-       GtkCanvasItem      *range_marker_drag_rect;
+       GnomeCanvasItem      *range_bar_drag_rect;
+       GnomeCanvasItem      *transport_bar_drag_rect;
+       GnomeCanvasItem      *marker_drag_line;
+       GnomeCanvasPoints    *marker_drag_line_points;
+       GnomeCanvasItem      *range_marker_drag_rect;
 
        void update_marker_drag_item (ARDOUR::Location *);
        
 
        void update_marker_drag_item (ARDOUR::Location *);
        
-       GtkCanvasItem      *transport_bar_range_rect;
-       GtkCanvasItem      *transport_bar_preroll_rect;
-       GtkCanvasItem      *transport_bar_postroll_rect;
-       GtkCanvasItem      *transport_loop_range_rect;
-       GtkCanvasItem      *transport_punch_range_rect;
-       GtkCanvasItem      *transport_punchin_line;
-       GtkCanvasItem      *transport_punchout_line;
-       GtkCanvasItem      *transport_preroll_rect;
-       GtkCanvasItem      *transport_postroll_rect;
+       GnomeCanvasItem      *transport_bar_range_rect;
+       GnomeCanvasItem      *transport_bar_preroll_rect;
+       GnomeCanvasItem      *transport_bar_postroll_rect;
+       GnomeCanvasItem      *transport_loop_range_rect;
+       GnomeCanvasItem      *transport_punch_range_rect;
+       GnomeCanvasItem      *transport_punchin_line;
+       GnomeCanvasItem      *transport_punchout_line;
+       GnomeCanvasItem      *transport_preroll_rect;
+       GnomeCanvasItem      *transport_postroll_rect;
 
        ARDOUR::Location*  transport_loop_location();
        ARDOUR::Location*  transport_punch_location();
 
        ARDOUR::Location*  transport_loop_location();
        ARDOUR::Location*  transport_punch_location();
@@ -1470,21 +1470,21 @@ class Editor : public PublicEditor
        
        /* object rubberband select process */
        
        
        /* object rubberband select process */
        
-       void start_rubberband_select (GtkCanvasItem* item, GdkEvent* event);
-       void drag_rubberband_select (GtkCanvasItem* item, GdkEvent* event);
-       void end_rubberband_select (GtkCanvasItem* item, GdkEvent* event);
+       void start_rubberband_select (GnomeCanvasItem* item, GdkEvent* event);
+       void drag_rubberband_select (GnomeCanvasItem* item, GdkEvent* event);
+       void end_rubberband_select (GnomeCanvasItem* item, GdkEvent* event);
 
        bool select_all_within (jack_nframes_t start, jack_nframes_t end, gdouble topy, gdouble boty, bool add);
        
 
        bool select_all_within (jack_nframes_t start, jack_nframes_t end, gdouble topy, gdouble boty, bool add);
        
-       GtkCanvasItem   *rubberband_rect;
+       GnomeCanvasItem   *rubberband_rect;
        
        /* mouse zoom process */
 
        
        /* mouse zoom process */
 
-       void start_mouse_zoom (GtkCanvasItem* item, GdkEvent* event);
-       void drag_mouse_zoom (GtkCanvasItem* item, GdkEvent* event);
-       void end_mouse_zoom (GtkCanvasItem* item, GdkEvent* event);
+       void start_mouse_zoom (GnomeCanvasItem* item, GdkEvent* event);
+       void drag_mouse_zoom (GnomeCanvasItem* item, GdkEvent* event);
+       void end_mouse_zoom (GnomeCanvasItem* item, GdkEvent* event);
 
 
-       GtkCanvasItem   *zoom_rect;
+       GnomeCanvasItem   *zoom_rect;
        void reposition_zoom_rect (jack_nframes_t start, jack_nframes_t end);
        
        /* diskstream/route display management */
        void reposition_zoom_rect (jack_nframes_t start, jack_nframes_t end);
        
        /* diskstream/route display management */
@@ -1552,14 +1552,14 @@ class Editor : public PublicEditor
                ContentsTrim,
        } trim_op;
 
                ContentsTrim,
        } trim_op;
 
-       void start_trim (GtkCanvasItem*, GdkEvent*);
+       void start_trim (GnomeCanvasItem*, GdkEvent*);
        void point_trim (GdkEvent*);
        void point_trim (GdkEvent*);
-       void trim_motion_callback (GtkCanvasItem*, GdkEvent*);
+       void trim_motion_callback (GnomeCanvasItem*, GdkEvent*);
        void single_contents_trim (AudioRegionView&, jack_nframes_t, bool, bool, bool);
        void single_start_trim (AudioRegionView&, jack_nframes_t, bool, bool);
        void single_end_trim (AudioRegionView&, jack_nframes_t, bool, bool);
 
        void single_contents_trim (AudioRegionView&, jack_nframes_t, bool, bool, bool);
        void single_start_trim (AudioRegionView&, jack_nframes_t, bool, bool);
        void single_end_trim (AudioRegionView&, jack_nframes_t, bool, bool);
 
-       void trim_finished_callback (GtkCanvasItem*, GdkEvent*);
+       void trim_finished_callback (GnomeCanvasItem*, GdkEvent*);
        void thaw_region_after_trim (AudioRegionView& rv);
        
        void trim_region_to_edit_cursor ();
        void thaw_region_after_trim (AudioRegionView& rv);
        
        void trim_region_to_edit_cursor ();
@@ -1668,9 +1668,9 @@ class Editor : public PublicEditor
 
        jack_nframes_t event_frame (GdkEvent*, double* px = 0, double* py = 0);
 
 
        jack_nframes_t event_frame (GdkEvent*, double* px = 0, double* py = 0);
 
-       void time_fx_motion (GtkCanvasItem*, GdkEvent*);
-       void start_time_fx (GtkCanvasItem*, GdkEvent*);
-       void end_time_fx (GtkCanvasItem*, GdkEvent*);
+       void time_fx_motion (GnomeCanvasItem*, GdkEvent*);
+       void start_time_fx (GnomeCanvasItem*, GdkEvent*);
+       void end_time_fx (GnomeCanvasItem*, GdkEvent*);
 
        struct TimeStretchDialog : public ArdourDialog {
            ARDOUR::Session::TimeStretchRequest request;
 
        struct TimeStretchDialog : public ArdourDialog {
            ARDOUR::Session::TimeStretchRequest request;
@@ -1728,39 +1728,39 @@ class Editor : public PublicEditor
        void handle_new_imageframe_time_axis_view(std::string track_name, void* src) ;
        void handle_new_imageframe_marker_time_axis_view(std::string track_name, TimeAxisView* marked_track) ;
 
        void handle_new_imageframe_time_axis_view(std::string track_name, void* src) ;
        void handle_new_imageframe_marker_time_axis_view(std::string track_name, TimeAxisView* marked_track) ;
 
-       void start_imageframe_grab(GtkCanvasItem*, GdkEvent*) ;
-       void start_markerview_grab(GtkCanvasItem*, GdkEvent*) ;
-
-       void imageframe_drag_motion_callback(GtkCanvasItem*, GdkEvent*) ;
-       void markerview_drag_motion_callback(GtkCanvasItem*, GdkEvent*) ;
-       void timeaxis_item_drag_finished_callback(GtkCanvasItem*, GdkEvent*) ;
-
-       gint canvas_imageframe_item_view_event(GtkCanvasItem* item, GdkEvent* event, ImageFrameView* ifv);
-       gint canvas_imageframe_view_event(GtkCanvasItem* item, GdkEvent* event, ImageFrameTimeAxis* ifta);
-       gint canvas_imageframe_start_handle_event(GtkCanvasItem* item, GdkEvent* event, ImageFrameView* ifv);
-       gint canvas_imageframe_end_handle_event(GtkCanvasItem* item, GdkEvent* event, ImageFrameView* ifv);
-
-       gint canvas_marker_time_axis_view_event(GtkCanvasItem* item, GdkEvent* event, MarkerTimeAxis* mta);
-       gint canvas_markerview_item_view_event(GtkCanvasItem* item, GdkEvent* event, MarkerView* mv);
-       gint canvas_markerview_start_handle_event(GtkCanvasItem* item, GdkEvent* event, MarkerView* mv);
-       gint canvas_markerview_end_handle_event(GtkCanvasItem* item, GdkEvent* event, MarkerView* mv);
-
-       void imageframe_start_handle_op(GtkCanvasItem* item, GdkEvent* event) ;
-       void imageframe_end_handle_op(GtkCanvasItem* item, GdkEvent* event) ;
-       void imageframe_start_handle_trim_motion(GtkCanvasItem* item, GdkEvent* event) ;
-       void imageframe_start_handle_end_trim(GtkCanvasItem* item, GdkEvent* event) ;
-       void imageframe_end_handle_trim_motion(GtkCanvasItem* item, GdkEvent* event) ;
-       void imageframe_end_handle_end_trim(GtkCanvasItem* item, GdkEvent* event) ;
+       void start_imageframe_grab(GnomeCanvasItem*, GdkEvent*) ;
+       void start_markerview_grab(GnomeCanvasItem*, GdkEvent*) ;
+
+       void imageframe_drag_motion_callback(GnomeCanvasItem*, GdkEvent*) ;
+       void markerview_drag_motion_callback(GnomeCanvasItem*, GdkEvent*) ;
+       void timeaxis_item_drag_finished_callback(GnomeCanvasItem*, GdkEvent*) ;
+
+       gint canvas_imageframe_item_view_event(GnomeCanvasItem* item, GdkEvent* event, ImageFrameView* ifv);
+       gint canvas_imageframe_view_event(GnomeCanvasItem* item, GdkEvent* event, ImageFrameTimeAxis* ifta);
+       gint canvas_imageframe_start_handle_event(GnomeCanvasItem* item, GdkEvent* event, ImageFrameView* ifv);
+       gint canvas_imageframe_end_handle_event(GnomeCanvasItem* item, GdkEvent* event, ImageFrameView* ifv);
+
+       gint canvas_marker_time_axis_view_event(GnomeCanvasItem* item, GdkEvent* event, MarkerTimeAxis* mta);
+       gint canvas_markerview_item_view_event(GnomeCanvasItem* item, GdkEvent* event, MarkerView* mv);
+       gint canvas_markerview_start_handle_event(GnomeCanvasItem* item, GdkEvent* event, MarkerView* mv);
+       gint canvas_markerview_end_handle_event(GnomeCanvasItem* item, GdkEvent* event, MarkerView* mv);
+
+       void imageframe_start_handle_op(GnomeCanvasItem* item, GdkEvent* event) ;
+       void imageframe_end_handle_op(GnomeCanvasItem* item, GdkEvent* event) ;
+       void imageframe_start_handle_trim_motion(GnomeCanvasItem* item, GdkEvent* event) ;
+       void imageframe_start_handle_end_trim(GnomeCanvasItem* item, GdkEvent* event) ;
+       void imageframe_end_handle_trim_motion(GnomeCanvasItem* item, GdkEvent* event) ;
+       void imageframe_end_handle_end_trim(GnomeCanvasItem* item, GdkEvent* event) ;
        
        
-       void markerview_item_start_handle_op(GtkCanvasItem* item, GdkEvent* event) ;
-       void markerview_item_end_handle_op(GtkCanvasItem* item, GdkEvent* event) ;
-       void markerview_start_handle_trim_motion(GtkCanvasItem* item, GdkEvent* event) ;
-       void markerview_start_handle_end_trim(GtkCanvasItem* item, GdkEvent* event) ;
-       void markerview_end_handle_trim_motion(GtkCanvasItem* item, GdkEvent* event) ;
-       void markerview_end_handle_end_trim(GtkCanvasItem* item, GdkEvent* event) ;
-
-       void popup_imageframe_edit_menu(int button, int32_t time, GtkCanvasItem* ifv, bool with_frame) ;
-       void popup_marker_time_axis_edit_menu(int button, int32_t time, GtkCanvasItem* ifv, bool with_frame) ;
+       void markerview_item_start_handle_op(GnomeCanvasItem* item, GdkEvent* event) ;
+       void markerview_item_end_handle_op(GnomeCanvasItem* item, GdkEvent* event) ;
+       void markerview_start_handle_trim_motion(GnomeCanvasItem* item, GdkEvent* event) ;
+       void markerview_start_handle_end_trim(GnomeCanvasItem* item, GdkEvent* event) ;
+       void markerview_end_handle_trim_motion(GnomeCanvasItem* item, GdkEvent* event) ;
+       void markerview_end_handle_end_trim(GnomeCanvasItem* item, GdkEvent* event) ;
+
+       void popup_imageframe_edit_menu(int button, int32_t time, GnomeCanvasItem* ifv, bool with_frame) ;
+       void popup_marker_time_axis_edit_menu(int button, int32_t time, GnomeCanvasItem* ifv, bool with_frame) ;
 
        ImageFrameSocketHandler* image_socket_listener ;
        /* </CMT Additions> */
 
        ImageFrameSocketHandler* image_socket_listener ;
        /* </CMT Additions> */
index 858dcc32aeb98d3669ecbb277698b12109c155e0..09c03547b332ecfc3ac9ed45a0aaaf1747ca4f1e 100644 (file)
@@ -21,7 +21,7 @@
 #include <cstdlib>
 #include <cmath>
 
 #include <cstdlib>
 #include <cmath>
 
-#include <gtk-canvas.h>
+#include <libgnomecanvas/libgnomecanvas.h>
 
 #include <ardour/diskstream.h>
 #include <ardour/audioplaylist.h>
 
 #include <ardour/diskstream.h>
 #include <ardour/audioplaylist.h>
@@ -45,14 +45,14 @@ using namespace ARDOUR;
 using namespace Gtk;
 
 gint
 using namespace Gtk;
 
 gint
-Editor::_canvas_copy_region_event (GtkCanvasItem *item, GdkEvent *event, gpointer data)
+Editor::_canvas_copy_region_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
 {
        Editor* editor = (Editor*)data;
        return editor->canvas_copy_region_event (item, event);
 }
 
 gint
 {
        Editor* editor = (Editor*)data;
        return editor->canvas_copy_region_event (item, event);
 }
 
 gint
-Editor::_canvas_crossfade_view_event (GtkCanvasItem *item, GdkEvent *event, gpointer data)
+Editor::_canvas_crossfade_view_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
 {
        CrossfadeView* xfv = static_cast<CrossfadeView*> (data);
        Editor* editor = dynamic_cast<Editor*>(&xfv->get_time_axis_view().editor);
 {
        CrossfadeView* xfv = static_cast<CrossfadeView*> (data);
        Editor* editor = dynamic_cast<Editor*>(&xfv->get_time_axis_view().editor);
@@ -60,7 +60,7 @@ Editor::_canvas_crossfade_view_event (GtkCanvasItem *item, GdkEvent *event, gpoi
 }
 
 gint
 }
 
 gint
-Editor::_canvas_fade_in_event (GtkCanvasItem *item, GdkEvent *event, gpointer data)
+Editor::_canvas_fade_in_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
 {
        AudioRegionView* rv = static_cast<AudioRegionView*> (data);
        Editor* editor = dynamic_cast<Editor*>(&rv->get_time_axis_view().editor);
 {
        AudioRegionView* rv = static_cast<AudioRegionView*> (data);
        Editor* editor = dynamic_cast<Editor*>(&rv->get_time_axis_view().editor);
@@ -68,7 +68,7 @@ Editor::_canvas_fade_in_event (GtkCanvasItem *item, GdkEvent *event, gpointer da
 }
 
 gint
 }
 
 gint
-Editor::_canvas_fade_in_handle_event (GtkCanvasItem *item, GdkEvent *event, gpointer data)
+Editor::_canvas_fade_in_handle_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
 {
        AudioRegionView* rv = static_cast<AudioRegionView*> (data);
        Editor* editor = dynamic_cast<Editor*>(&rv->get_time_axis_view().editor);
 {
        AudioRegionView* rv = static_cast<AudioRegionView*> (data);
        Editor* editor = dynamic_cast<Editor*>(&rv->get_time_axis_view().editor);
@@ -76,7 +76,7 @@ Editor::_canvas_fade_in_handle_event (GtkCanvasItem *item, GdkEvent *event, gpoi
 }
 
 gint
 }
 
 gint
-Editor::_canvas_fade_out_event (GtkCanvasItem *item, GdkEvent *event, gpointer data)
+Editor::_canvas_fade_out_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
 {
        AudioRegionView* rv = static_cast<AudioRegionView*> (data);
        Editor* editor = dynamic_cast<Editor*>(&rv->get_time_axis_view().editor);
 {
        AudioRegionView* rv = static_cast<AudioRegionView*> (data);
        Editor* editor = dynamic_cast<Editor*>(&rv->get_time_axis_view().editor);
@@ -84,7 +84,7 @@ Editor::_canvas_fade_out_event (GtkCanvasItem *item, GdkEvent *event, gpointer d
 }
 
 gint
 }
 
 gint
-Editor::_canvas_fade_out_handle_event (GtkCanvasItem *item, GdkEvent *event, gpointer data)
+Editor::_canvas_fade_out_handle_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
 {
        AudioRegionView* rv = static_cast<AudioRegionView*> (data);
        Editor* editor = dynamic_cast<Editor*>(&rv->get_time_axis_view().editor);
 {
        AudioRegionView* rv = static_cast<AudioRegionView*> (data);
        Editor* editor = dynamic_cast<Editor*>(&rv->get_time_axis_view().editor);
@@ -92,7 +92,7 @@ Editor::_canvas_fade_out_handle_event (GtkCanvasItem *item, GdkEvent *event, gpo
 }
 
 gint
 }
 
 gint
-Editor::_canvas_region_view_event (GtkCanvasItem *item, GdkEvent *event, gpointer data)
+Editor::_canvas_region_view_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
 {
        AudioRegionView *rv = reinterpret_cast<AudioRegionView *>(data);
        Editor* editor = dynamic_cast<Editor*>(&rv->get_time_axis_view().editor);
 {
        AudioRegionView *rv = reinterpret_cast<AudioRegionView *>(data);
        Editor* editor = dynamic_cast<Editor*>(&rv->get_time_axis_view().editor);
@@ -101,7 +101,7 @@ Editor::_canvas_region_view_event (GtkCanvasItem *item, GdkEvent *event, gpointe
 }
 
 gint
 }
 
 gint
-Editor::_canvas_region_view_name_highlight_event (GtkCanvasItem *item, GdkEvent *event, gpointer data)
+Editor::_canvas_region_view_name_highlight_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
 {
        AudioRegionView *rv = reinterpret_cast<AudioRegionView *> (data);
        Editor* editor = dynamic_cast<Editor*>(&rv->get_time_axis_view().editor);
 {
        AudioRegionView *rv = reinterpret_cast<AudioRegionView *> (data);
        Editor* editor = dynamic_cast<Editor*>(&rv->get_time_axis_view().editor);
@@ -110,7 +110,7 @@ Editor::_canvas_region_view_name_highlight_event (GtkCanvasItem *item, GdkEvent
 }
 
 gint
 }
 
 gint
-Editor::_canvas_region_view_name_event (GtkCanvasItem *item, GdkEvent *event, gpointer data)
+Editor::_canvas_region_view_name_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
 {
        AudioRegionView *rv = reinterpret_cast<AudioRegionView *> (data);
        Editor* editor = dynamic_cast<Editor*>(&rv->get_time_axis_view().editor);
 {
        AudioRegionView *rv = reinterpret_cast<AudioRegionView *> (data);
        Editor* editor = dynamic_cast<Editor*>(&rv->get_time_axis_view().editor);
@@ -119,7 +119,7 @@ Editor::_canvas_region_view_name_event (GtkCanvasItem *item, GdkEvent *event, gp
 }
 
 gint
 }
 
 gint
-Editor::_canvas_stream_view_event (GtkCanvasItem *item, GdkEvent *event, gpointer data)
+Editor::_canvas_stream_view_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
 {
        /* note that stream views are by definition audio track views */
 
 {
        /* note that stream views are by definition audio track views */
 
@@ -130,7 +130,7 @@ Editor::_canvas_stream_view_event (GtkCanvasItem *item, GdkEvent *event, gpointe
 }
 
 gint
 }
 
 gint
-Editor::_canvas_automation_track_event (GtkCanvasItem *item, GdkEvent *event, gpointer data)
+Editor::_canvas_automation_track_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
 {
        AutomationTimeAxisView* atv = (AutomationTimeAxisView*) data;
        Editor* editor = dynamic_cast<Editor*>(&atv->editor);
 {
        AutomationTimeAxisView* atv = (AutomationTimeAxisView*) data;
        Editor* editor = dynamic_cast<Editor*>(&atv->editor);
@@ -139,7 +139,7 @@ Editor::_canvas_automation_track_event (GtkCanvasItem *item, GdkEvent *event, gp
 }
 
 gint
 }
 
 gint
-Editor::_canvas_control_point_event (GtkCanvasItem *item, GdkEvent *event, gpointer data)
+Editor::_canvas_control_point_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
 {
        ControlPoint *cp = reinterpret_cast<ControlPoint *>(data);
        Editor* editor = dynamic_cast<Editor*>(&cp->line.trackview.editor);
 {
        ControlPoint *cp = reinterpret_cast<ControlPoint *>(data);
        Editor* editor = dynamic_cast<Editor*>(&cp->line.trackview.editor);
@@ -162,7 +162,7 @@ Editor::_canvas_control_point_event (GtkCanvasItem *item, GdkEvent *event, gpoin
 }
 
 gint
 }
 
 gint
-Editor::_canvas_line_event (GtkCanvasItem *item, GdkEvent *event, gpointer data)
+Editor::_canvas_line_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
 {
        AutomationLine *line = reinterpret_cast<AutomationLine*> (data);
        Editor* editor = dynamic_cast<Editor*>(&line->trackview.editor);
 {
        AutomationLine *line = reinterpret_cast<AutomationLine*> (data);
        Editor* editor = dynamic_cast<Editor*>(&line->trackview.editor);
@@ -171,21 +171,21 @@ Editor::_canvas_line_event (GtkCanvasItem *item, GdkEvent *event, gpointer data)
 }
 
 gint
 }
 
 gint
-Editor::_canvas_tempo_marker_event (GtkCanvasItem *item, GdkEvent *event, gpointer data)
+Editor::_canvas_tempo_marker_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
 {
        Editor* editor = dynamic_cast<Editor*>((PublicEditor*) data);
        return editor->canvas_tempo_marker_event (item, event);
 }
 
 gint
 {
        Editor* editor = dynamic_cast<Editor*>((PublicEditor*) data);
        return editor->canvas_tempo_marker_event (item, event);
 }
 
 gint
-Editor::_canvas_meter_marker_event (GtkCanvasItem *item, GdkEvent *event, gpointer data)
+Editor::_canvas_meter_marker_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
 {
        Editor* editor = dynamic_cast<Editor*>((PublicEditor *) data);
        return editor->canvas_meter_marker_event (item, event);
 }
 
 gint
 {
        Editor* editor = dynamic_cast<Editor*>((PublicEditor *) data);
        return editor->canvas_meter_marker_event (item, event);
 }
 
 gint
-Editor::_canvas_tempo_bar_event (GtkCanvasItem *item, GdkEvent *event, gpointer data)
+Editor::_canvas_tempo_bar_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
 {
        /* XXX NO CAST */
        Editor* editor = (Editor*) data;
 {
        /* XXX NO CAST */
        Editor* editor = (Editor*) data;
@@ -193,7 +193,7 @@ Editor::_canvas_tempo_bar_event (GtkCanvasItem *item, GdkEvent *event, gpointer
 }
 
 gint
 }
 
 gint
-Editor::_canvas_meter_bar_event (GtkCanvasItem *item, GdkEvent *event, gpointer data)
+Editor::_canvas_meter_bar_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
 {
        /* XXX NO CAST */
        Editor* editor = (Editor*) data;
 {
        /* XXX NO CAST */
        Editor* editor = (Editor*) data;
@@ -201,14 +201,14 @@ Editor::_canvas_meter_bar_event (GtkCanvasItem *item, GdkEvent *event, gpointer
 }
 
 gint
 }
 
 gint
-Editor::_canvas_marker_event (GtkCanvasItem *item, GdkEvent *event, gpointer data)
+Editor::_canvas_marker_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
 {
        Editor* editor = dynamic_cast<Editor*>((PublicEditor*) data);
        return editor->canvas_marker_event (item, event);
 }
 
 gint
 {
        Editor* editor = dynamic_cast<Editor*>((PublicEditor*) data);
        return editor->canvas_marker_event (item, event);
 }
 
 gint
-Editor::_canvas_marker_bar_event (GtkCanvasItem *item, GdkEvent *event, gpointer data)
+Editor::_canvas_marker_bar_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
 {
        /* NO CAST */
        Editor* editor = (Editor*) data;
 {
        /* NO CAST */
        Editor* editor = (Editor*) data;
@@ -216,7 +216,7 @@ Editor::_canvas_marker_bar_event (GtkCanvasItem *item, GdkEvent *event, gpointer
 }
 
 gint
 }
 
 gint
-Editor::_canvas_range_marker_bar_event (GtkCanvasItem *item, GdkEvent *event, gpointer data)
+Editor::_canvas_range_marker_bar_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
 {
        /* NO CAST */
        Editor* editor = (Editor*) data;
 {
        /* NO CAST */
        Editor* editor = (Editor*) data;
@@ -224,7 +224,7 @@ Editor::_canvas_range_marker_bar_event (GtkCanvasItem *item, GdkEvent *event, gp
 }
 
 gint
 }
 
 gint
-Editor::_canvas_transport_marker_bar_event (GtkCanvasItem *item, GdkEvent *event, gpointer data)
+Editor::_canvas_transport_marker_bar_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
 {
        /* NO CAST */
        Editor* editor = (Editor*) data;
 {
        /* NO CAST */
        Editor* editor = (Editor*) data;
@@ -232,7 +232,7 @@ Editor::_canvas_transport_marker_bar_event (GtkCanvasItem *item, GdkEvent *event
 }
 
 gint
 }
 
 gint
-Editor::_canvas_playhead_cursor_event (GtkCanvasItem *item, GdkEvent *event, gpointer data)
+Editor::_canvas_playhead_cursor_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
 {
        /* NO CAST */
        Editor* editor = (Editor*) data;
 {
        /* NO CAST */
        Editor* editor = (Editor*) data;
@@ -240,7 +240,7 @@ Editor::_canvas_playhead_cursor_event (GtkCanvasItem *item, GdkEvent *event, gpo
 }
 
 gint
 }
 
 gint
-Editor::_canvas_edit_cursor_event (GtkCanvasItem *item, GdkEvent *event, gpointer data)
+Editor::_canvas_edit_cursor_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
 {
        /* NO CAST */
        Editor* editor = (Editor*) data;
 {
        /* NO CAST */
        Editor* editor = (Editor*) data;
@@ -248,35 +248,35 @@ Editor::_canvas_edit_cursor_event (GtkCanvasItem *item, GdkEvent *event, gpointe
 }
 
 gint
 }
 
 gint
-Editor::_canvas_zoom_rect_event (GtkCanvasItem *item, GdkEvent *event, gpointer data)
+Editor::_canvas_zoom_rect_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
 {
        Editor* editor = dynamic_cast<Editor*>((PublicEditor*) data);
        return editor->canvas_zoom_rect_event (item, event);
 }
 
 gint
 {
        Editor* editor = dynamic_cast<Editor*>((PublicEditor*) data);
        return editor->canvas_zoom_rect_event (item, event);
 }
 
 gint
-Editor::_canvas_selection_rect_event (GtkCanvasItem *item, GdkEvent *event, gpointer data)
+Editor::_canvas_selection_rect_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
 {
        Editor* editor = dynamic_cast<Editor*>((PublicEditor*) data);
        return editor->canvas_selection_rect_event (item, event);
 }
 
 gint
 {
        Editor* editor = dynamic_cast<Editor*>((PublicEditor*) data);
        return editor->canvas_selection_rect_event (item, event);
 }
 
 gint
-Editor::_canvas_selection_start_trim_event (GtkCanvasItem *item, GdkEvent *event, gpointer data)
+Editor::_canvas_selection_start_trim_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
 {
        Editor* editor = dynamic_cast<Editor*>((PublicEditor*) data);
        return editor->canvas_selection_start_trim_event (item, event);
 }
 
 gint
 {
        Editor* editor = dynamic_cast<Editor*>((PublicEditor*) data);
        return editor->canvas_selection_start_trim_event (item, event);
 }
 
 gint
-Editor::_canvas_selection_end_trim_event (GtkCanvasItem *item, GdkEvent *event, gpointer data)
+Editor::_canvas_selection_end_trim_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
 {
        Editor* editor = dynamic_cast<Editor*>((PublicEditor*) data);
        return editor->canvas_selection_end_trim_event (item, event);
 }
 
 gint
 {
        Editor* editor = dynamic_cast<Editor*>((PublicEditor*) data);
        return editor->canvas_selection_end_trim_event (item, event);
 }
 
 gint
-Editor::_track_canvas_event (GtkCanvasItem *item, GdkEvent *event, gpointer data)
+Editor::_track_canvas_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
 {
        /* NO CAST */
 
 {
        /* NO CAST */
 
@@ -287,7 +287,7 @@ Editor::_track_canvas_event (GtkCanvasItem *item, GdkEvent *event, gpointer data
 /********** END OF.TATIC EVENT HANDLERS */
 
 gint
 /********** END OF.TATIC EVENT HANDLERS */
 
 gint
-Editor::track_canvas_event (GtkCanvasItem *item, GdkEvent *event)
+Editor::track_canvas_event (GnomeCanvasItem *item, GdkEvent *event)
 {
        gint x, y;
 
 {
        gint x, y;
 
@@ -314,10 +314,10 @@ Editor::track_canvas_event (GtkCanvasItem *item, GdkEvent *event)
 }
 
 gint
 }
 
 gint
-Editor::track_canvas_motion (GtkCanvasItem *item, GdkEvent *ev)
+Editor::track_canvas_motion (GnomeCanvasItem *item, GdkEvent *ev)
 {
        if (verbose_cursor_visible) {
 {
        if (verbose_cursor_visible) {
-               gtk_canvas_item_set (verbose_canvas_cursor,
+               gnome_canvas_item_set (verbose_canvas_cursor,
                                     "x", ev->motion.x + 20,
                                     "y", ev->motion.y + 20,
                                     NULL);
                                     "x", ev->motion.x + 20,
                                     "y", ev->motion.y + 20,
                                     NULL);
@@ -326,7 +326,7 @@ Editor::track_canvas_motion (GtkCanvasItem *item, GdkEvent *ev)
 }
 
 gint
 }
 
 gint
-Editor::typed_event (GtkCanvasItem *item, GdkEvent *event, ItemType type)
+Editor::typed_event (GnomeCanvasItem *item, GdkEvent *event, ItemType type)
 {
        gint ret = FALSE;
        
 {
        gint ret = FALSE;
        
@@ -359,7 +359,7 @@ Editor::typed_event (GtkCanvasItem *item, GdkEvent *event, ItemType type)
 }
 
 gint
 }
 
 gint
-Editor::canvas_region_view_event (GtkCanvasItem *item, GdkEvent *event, AudioRegionView *rv)
+Editor::canvas_region_view_event (GnomeCanvasItem *item, GdkEvent *event, AudioRegionView *rv)
 {
        gint ret = FALSE;
        
 {
        gint ret = FALSE;
        
@@ -398,7 +398,7 @@ Editor::canvas_region_view_event (GtkCanvasItem *item, GdkEvent *event, AudioReg
 }
 
 gint
 }
 
 gint
-Editor::canvas_stream_view_event (GtkCanvasItem *item, GdkEvent *event, AudioTimeAxisView *tv)
+Editor::canvas_stream_view_event (GnomeCanvasItem *item, GdkEvent *event, AudioTimeAxisView *tv)
 {
        gint ret = FALSE;
        
 {
        gint ret = FALSE;
        
@@ -434,7 +434,7 @@ Editor::canvas_stream_view_event (GtkCanvasItem *item, GdkEvent *event, AudioTim
 
 
 gint
 
 
 gint
-Editor::canvas_automation_track_event (GtkCanvasItem *item, GdkEvent *event, AutomationTimeAxisView *atv)
+Editor::canvas_automation_track_event (GnomeCanvasItem *item, GdkEvent *event, AutomationTimeAxisView *atv)
 {
        gint ret = FALSE;
        
 {
        gint ret = FALSE;
        
@@ -473,7 +473,7 @@ Editor::canvas_automation_track_event (GtkCanvasItem *item, GdkEvent *event, Aut
 }
 
 gint
 }
 
 gint
-Editor::canvas_fade_in_event (GtkCanvasItem *item, GdkEvent *event, AudioRegionView *rv)
+Editor::canvas_fade_in_event (GnomeCanvasItem *item, GdkEvent *event, AudioRegionView *rv)
 {
        /* we handle only button 3 press/release events */
 
 {
        /* we handle only button 3 press/release events */
 
@@ -505,7 +505,7 @@ Editor::canvas_fade_in_event (GtkCanvasItem *item, GdkEvent *event, AudioRegionV
 }
 
 gint
 }
 
 gint
-Editor::canvas_fade_in_handle_event (GtkCanvasItem *item, GdkEvent *event, AudioRegionView *rv)
+Editor::canvas_fade_in_handle_event (GnomeCanvasItem *item, GdkEvent *event, AudioRegionView *rv)
 {
        gint ret = FALSE;
        
 {
        gint ret = FALSE;
        
@@ -544,7 +544,7 @@ Editor::canvas_fade_in_handle_event (GtkCanvasItem *item, GdkEvent *event, Audio
 }
 
 gint
 }
 
 gint
-Editor::canvas_fade_out_event (GtkCanvasItem *item, GdkEvent *event, AudioRegionView *rv)
+Editor::canvas_fade_out_event (GnomeCanvasItem *item, GdkEvent *event, AudioRegionView *rv)
 {
        /* we handle only button 3 press/release events */
 
 {
        /* we handle only button 3 press/release events */
 
@@ -576,7 +576,7 @@ Editor::canvas_fade_out_event (GtkCanvasItem *item, GdkEvent *event, AudioRegion
 }
 
 gint
 }
 
 gint
-Editor::canvas_fade_out_handle_event (GtkCanvasItem *item, GdkEvent *event, AudioRegionView *rv)
+Editor::canvas_fade_out_handle_event (GnomeCanvasItem *item, GdkEvent *event, AudioRegionView *rv)
 {
        gint ret = FALSE;
        
 {
        gint ret = FALSE;
        
@@ -621,7 +621,7 @@ struct DescendingRegionLayerSorter {
 };
 
 gint
 };
 
 gint
-Editor::canvas_crossfade_view_event (GtkCanvasItem* item, GdkEvent* event, CrossfadeView* xfv)
+Editor::canvas_crossfade_view_event (GnomeCanvasItem* item, GdkEvent* event, CrossfadeView* xfv)
 {
        /* we handle only button 3 press/release events */
 
 {
        /* we handle only button 3 press/release events */
 
@@ -682,7 +682,7 @@ Editor::canvas_crossfade_view_event (GtkCanvasItem* item, GdkEvent* event, Cross
 }
 
 gint
 }
 
 gint
-Editor::canvas_control_point_event (GtkCanvasItem *item, GdkEvent *event)
+Editor::canvas_control_point_event (GnomeCanvasItem *item, GdkEvent *event)
 {
        ItemType type;
        ControlPoint *cp;
 {
        ItemType type;
        ControlPoint *cp;
@@ -708,7 +708,7 @@ Editor::canvas_control_point_event (GtkCanvasItem *item, GdkEvent *event)
 }
 
 gint
 }
 
 gint
-Editor::canvas_line_event (GtkCanvasItem *item, GdkEvent *event)
+Editor::canvas_line_event (GnomeCanvasItem *item, GdkEvent *event)
 {
        ItemType type;
        AutomationLine *al;
 {
        ItemType type;
        AutomationLine *al;
@@ -735,7 +735,7 @@ Editor::canvas_line_event (GtkCanvasItem *item, GdkEvent *event)
 
 
 gint
 
 
 gint
-Editor::canvas_selection_rect_event (GtkCanvasItem *item, GdkEvent *event)
+Editor::canvas_selection_rect_event (GnomeCanvasItem *item, GdkEvent *event)
 {
        gint ret = FALSE;
        SelectionRect *rect = 0;
 {
        gint ret = FALSE;
        SelectionRect *rect = 0;
@@ -775,7 +775,7 @@ Editor::canvas_selection_rect_event (GtkCanvasItem *item, GdkEvent *event)
 }
 
 gint
 }
 
 gint
-Editor::canvas_selection_start_trim_event (GtkCanvasItem *item, GdkEvent *event)
+Editor::canvas_selection_start_trim_event (GnomeCanvasItem *item, GdkEvent *event)
 {
        gint ret = FALSE;
        SelectionRect *rect = 0;
 {
        gint ret = FALSE;
        SelectionRect *rect = 0;
@@ -814,7 +814,7 @@ Editor::canvas_selection_start_trim_event (GtkCanvasItem *item, GdkEvent *event)
 }
 
 gint
 }
 
 gint
-Editor::canvas_selection_end_trim_event (GtkCanvasItem *item, GdkEvent *event)
+Editor::canvas_selection_end_trim_event (GnomeCanvasItem *item, GdkEvent *event)
 {
        gint ret = FALSE;
        SelectionRect *rect = 0;
 {
        gint ret = FALSE;
        SelectionRect *rect = 0;
@@ -854,7 +854,7 @@ Editor::canvas_selection_end_trim_event (GtkCanvasItem *item, GdkEvent *event)
 
 
 gint
 
 
 gint
-Editor::canvas_region_view_name_highlight_event (GtkCanvasItem *item, GdkEvent *event)
+Editor::canvas_region_view_name_highlight_event (GnomeCanvasItem *item, GdkEvent *event)
 {
        gint ret = FALSE;
 
 {
        gint ret = FALSE;
 
@@ -890,7 +890,7 @@ Editor::canvas_region_view_name_highlight_event (GtkCanvasItem *item, GdkEvent *
 }
 
 gint
 }
 
 gint
-Editor::canvas_region_view_name_event (GtkCanvasItem *item, GdkEvent *event)
+Editor::canvas_region_view_name_event (GnomeCanvasItem *item, GdkEvent *event)
 {
        gint ret = FALSE;
 
 {
        gint ret = FALSE;
 
@@ -926,73 +926,73 @@ Editor::canvas_region_view_name_event (GtkCanvasItem *item, GdkEvent *event)
 }
 
 gint
 }
 
 gint
-Editor::canvas_marker_event (GtkCanvasItem *item, GdkEvent *event)
+Editor::canvas_marker_event (GnomeCanvasItem *item, GdkEvent *event)
 {
        return typed_event (item, event, MarkerItem);
 }
 
 gint
 {
        return typed_event (item, event, MarkerItem);
 }
 
 gint
-Editor::canvas_marker_bar_event (GtkCanvasItem *item, GdkEvent *event)
+Editor::canvas_marker_bar_event (GnomeCanvasItem *item, GdkEvent *event)
 {
        return typed_event (item, event, MarkerBarItem);
 }
 
 gint
 {
        return typed_event (item, event, MarkerBarItem);
 }
 
 gint
-Editor::canvas_range_marker_bar_event (GtkCanvasItem *item, GdkEvent *event)
+Editor::canvas_range_marker_bar_event (GnomeCanvasItem *item, GdkEvent *event)
 {
        return typed_event (item, event, RangeMarkerBarItem);
 }
 
 gint
 {
        return typed_event (item, event, RangeMarkerBarItem);
 }
 
 gint
-Editor::canvas_transport_marker_bar_event (GtkCanvasItem *item, GdkEvent *event)
+Editor::canvas_transport_marker_bar_event (GnomeCanvasItem *item, GdkEvent *event)
 {
        return typed_event (item, event, TransportMarkerBarItem);
 }
 
 gint
 {
        return typed_event (item, event, TransportMarkerBarItem);
 }
 
 gint
-Editor::canvas_tempo_marker_event (GtkCanvasItem *item, GdkEvent *event)
+Editor::canvas_tempo_marker_event (GnomeCanvasItem *item, GdkEvent *event)
 {
        return typed_event (item, event, TempoMarkerItem);
 }
 
 gint
 {
        return typed_event (item, event, TempoMarkerItem);
 }
 
 gint
-Editor::canvas_meter_marker_event (GtkCanvasItem *item, GdkEvent *event)
+Editor::canvas_meter_marker_event (GnomeCanvasItem *item, GdkEvent *event)
 {
        return typed_event (item, event, MeterMarkerItem);
 }
 
 gint
 {
        return typed_event (item, event, MeterMarkerItem);
 }
 
 gint
-Editor::canvas_tempo_bar_event (GtkCanvasItem *item, GdkEvent *event)
+Editor::canvas_tempo_bar_event (GnomeCanvasItem *item, GdkEvent *event)
 {
        return typed_event (item, event, TempoBarItem);
 }
 
 gint
 {
        return typed_event (item, event, TempoBarItem);
 }
 
 gint
-Editor::canvas_meter_bar_event (GtkCanvasItem *item, GdkEvent *event)
+Editor::canvas_meter_bar_event (GnomeCanvasItem *item, GdkEvent *event)
 {
        return typed_event (item, event, MeterBarItem);
 }
 
 gint
 {
        return typed_event (item, event, MeterBarItem);
 }
 
 gint
-Editor::canvas_playhead_cursor_event (GtkCanvasItem *item, GdkEvent *event)
+Editor::canvas_playhead_cursor_event (GnomeCanvasItem *item, GdkEvent *event)
 {
        return typed_event (item, event, PlayheadCursorItem);
 }
 
 gint
 {
        return typed_event (item, event, PlayheadCursorItem);
 }
 
 gint
-Editor::canvas_edit_cursor_event (GtkCanvasItem *item, GdkEvent *event)
+Editor::canvas_edit_cursor_event (GnomeCanvasItem *item, GdkEvent *event)
 {
        return typed_event (item, event, EditCursorItem);
 }
 
 gint
 {
        return typed_event (item, event, EditCursorItem);
 }
 
 gint
-Editor::canvas_zoom_rect_event (GtkCanvasItem *item, GdkEvent *event)
+Editor::canvas_zoom_rect_event (GnomeCanvasItem *item, GdkEvent *event)
 {
        return typed_event (item, event, NoItem);
 }
 
 gint
 {
        return typed_event (item, event, NoItem);
 }
 
 gint
-Editor::canvas_copy_region_event (GtkCanvasItem *item, GdkEvent *event)
+Editor::canvas_copy_region_event (GnomeCanvasItem *item, GdkEvent *event)
 {
        return typed_event (item, event, RegionItem);
 }
 {
        return typed_event (item, event, RegionItem);
 }
index f8388a3a3de8b28284e28e422e881fc50564ef11..edd300c67c5cef045f2ae3b2264b1ca39fff30f4 100644 (file)
@@ -21,7 +21,7 @@
 #include <cstdlib>
 #include <cmath>
 
 #include <cstdlib>
 #include <cmath>
 
-#include <gtk-canvas.h>
+#include <libgnomecanvas/libgnomecanvas.h>
 
 #include "utils.h"
 #include "editor.h"
 
 #include "utils.h"
 #include "editor.h"
@@ -33,8 +33,8 @@ using namespace Gtk;
 Editor::Cursor::Cursor (Editor& ed, const string& color, GtkSignalFunc callbck)
        : editor (ed), callback (callbck), length(1.0)
 {
 Editor::Cursor::Cursor (Editor& ed, const string& color, GtkSignalFunc callbck)
        : editor (ed), callback (callbck), length(1.0)
 {
-       GtkCanvasGroup *group;
-       points = gtk_canvas_points_new (2);
+       GnomeCanvasGroup *group;
+       points = gnome_canvas_points_new (2);
        
        /* "randomly" initialize coords */
 
        
        /* "randomly" initialize coords */
 
@@ -43,11 +43,11 @@ Editor::Cursor::Cursor (Editor& ed, const string& color, GtkSignalFunc callbck)
        points->coords[2] = 1.0;
        points->coords[3] = 0.0;
 
        points->coords[2] = 1.0;
        points->coords[3] = 0.0;
 
-       group = GTK_CANVAS_GROUP (editor.cursor_group);
+       group = GNOME_CANVAS_GROUP (editor.cursor_group);
 
        // cerr << "set cursor points, nc = " << points->num_points << endl;
 
        // cerr << "set cursor points, nc = " << points->num_points << endl;
-       canvas_item = gtk_canvas_item_new (group,
-                                          gtk_canvas_line_get_type(),
+       canvas_item = gnome_canvas_item_new (group,
+                                          gnome_canvas_line_get_type(),
                                           "points", points,
                                           "fill_color", color.c_str(),
                                           "width_pixels", 1,
                                           "points", points,
                                           "fill_color", color.c_str(),
                                           "width_pixels", 1,
@@ -70,7 +70,7 @@ Editor::Cursor::~Cursor ()
 
 {
        gtk_object_destroy (GTK_OBJECT(canvas_item));
 
 {
        gtk_object_destroy (GTK_OBJECT(canvas_item));
-       gtk_canvas_points_unref (points);
+       gnome_canvas_points_unref (points);
 }
 
 void
 }
 
 void
@@ -79,9 +79,9 @@ Editor::Cursor::set_position (jack_nframes_t frame)
        double new_pos =  editor.frame_to_unit (frame);
 
        if (editor.session == 0) {
        double new_pos =  editor.frame_to_unit (frame);
 
        if (editor.session == 0) {
-               gtk_canvas_item_hide (canvas_item);
+               gnome_canvas_item_hide (canvas_item);
        } else {
        } else {
-               gtk_canvas_item_show (canvas_item);
+               gnome_canvas_item_show (canvas_item);
        }
 
        current_frame = frame;
        }
 
        current_frame = frame;
@@ -90,7 +90,7 @@ Editor::Cursor::set_position (jack_nframes_t frame)
 
                /* change in position is not visible, so just raise it */
                
 
                /* change in position is not visible, so just raise it */
                
-               gtk_canvas_item_raise_to_top (canvas_item);
+               gnome_canvas_item_raise_to_top (canvas_item);
                return;
        } 
 
                return;
        } 
 
@@ -98,8 +98,8 @@ Editor::Cursor::set_position (jack_nframes_t frame)
        points->coords[2] = new_pos;
 
        // cerr << "set cursor2 al points, nc = " << points->num_points << endl;
        points->coords[2] = new_pos;
 
        // cerr << "set cursor2 al points, nc = " << points->num_points << endl;
-       gtk_canvas_item_set (canvas_item, "points", points, NULL);
-       gtk_canvas_item_raise_to_top (canvas_item);
+       gnome_canvas_item_set (canvas_item, "points", points, NULL);
+       gnome_canvas_item_raise_to_top (canvas_item);
 }
 
 void
 }
 
 void
@@ -108,7 +108,7 @@ Editor::Cursor::set_length (double units)
        length = units; 
        points->coords[3] = points->coords[1] + length;
        // cerr << "set cursor3 al points, nc = " << points->num_points << endl;
        length = units; 
        points->coords[3] = points->coords[1] + length;
        // cerr << "set cursor3 al points, nc = " << points->num_points << endl;
-       gtk_canvas_item_set (canvas_item, "points", points, NULL);
+       gnome_canvas_item_set (canvas_item, "points", points, NULL);
 }
 
 void 
 }
 
 void 
@@ -117,5 +117,5 @@ Editor::Cursor::set_y_axis (double position)
        points->coords[1] = position;
        points->coords[3] = position + length;
        // cerr << "set cursor4 al points, nc = " << points->num_points << endl;
        points->coords[1] = position;
        points->coords[3] = position + length;
        // cerr << "set cursor4 al points, nc = " << points->num_points << endl;
-       gtk_canvas_item_set (canvas_item, "points", points, NULL);
+       gnome_canvas_item_set (canvas_item, "points", points, NULL);
 }
 }
index 62785036ab0f37efe32dbcb63134cea88345be2e..fc23646aa9f3013b46c1765daba914c64a0f752f 100644 (file)
@@ -94,7 +94,7 @@ Editor::add_imageframe_marker_time_axis(std::string track_name, TimeAxisView* ma
 }
 
 void
 }
 
 void
-Editor::popup_imageframe_edit_menu(int button, int32_t time, GtkCanvasItem* ifv, bool with_item)
+Editor::popup_imageframe_edit_menu(int button, int32_t time, GnomeCanvasItem* ifv, bool with_item)
 {
        ImageFrameTimeAxis* ifta = dynamic_cast<ImageFrameTimeAxis*>(clicked_trackview) ;
        
 {
        ImageFrameTimeAxis* ifta = dynamic_cast<ImageFrameTimeAxis*>(clicked_trackview) ;
        
@@ -111,7 +111,7 @@ Editor::popup_imageframe_edit_menu(int button, int32_t time, GtkCanvasItem* ifv,
 }
 
 void
 }
 
 void
-Editor::popup_marker_time_axis_edit_menu(int button, int32_t time, GtkCanvasItem* ifv, bool with_item)
+Editor::popup_marker_time_axis_edit_menu(int button, int32_t time, GnomeCanvasItem* ifv, bool with_item)
 {
        MarkerTimeAxis* mta = dynamic_cast<MarkerTimeAxis*>(clicked_trackview) ;
        
 {
        MarkerTimeAxis* mta = dynamic_cast<MarkerTimeAxis*>(clicked_trackview) ;
        
@@ -153,12 +153,12 @@ Editor::get_named_time_axis(std::string name)
 /**
  * ---------------------------------------------------------------------------------------------------
  * Static event handlers
 /**
  * ---------------------------------------------------------------------------------------------------
  * Static event handlers
- * These handlers deal with events from the GtkCanvas, a c-based component
+ * These handlers deal with events from the GnomeCanvas, a c-based component
  */
 
 
 gint
  */
 
 
 gint
-Editor::_canvas_imageframe_start_handle_event(GtkCanvasItem *item, GdkEvent *event, gpointer data)
+Editor::_canvas_imageframe_start_handle_event(GnomeCanvasItem *item, GdkEvent *event, gpointer data)
 {
        ImageFrameView* ifv = (ImageFrameView*) data ;
        Editor* editor = dynamic_cast<Editor*> (&ifv->get_time_axis_view().editor);
 {
        ImageFrameView* ifv = (ImageFrameView*) data ;
        Editor* editor = dynamic_cast<Editor*> (&ifv->get_time_axis_view().editor);
@@ -166,7 +166,7 @@ Editor::_canvas_imageframe_start_handle_event(GtkCanvasItem *item, GdkEvent *eve
 }
 
 gint
 }
 
 gint
-Editor::_canvas_imageframe_end_handle_event(GtkCanvasItem *item, GdkEvent *event, gpointer data)
+Editor::_canvas_imageframe_end_handle_event(GnomeCanvasItem *item, GdkEvent *event, gpointer data)
 {
        ImageFrameView* ifv = (ImageFrameView*) data ;
        Editor* editor = dynamic_cast<Editor*> (&ifv->get_time_axis_view().editor);
 {
        ImageFrameView* ifv = (ImageFrameView*) data ;
        Editor* editor = dynamic_cast<Editor*> (&ifv->get_time_axis_view().editor);
@@ -175,7 +175,7 @@ Editor::_canvas_imageframe_end_handle_event(GtkCanvasItem *item, GdkEvent *event
 
 
 gint
 
 
 gint
-Editor::_canvas_imageframe_item_view_event(GtkCanvasItem *item, GdkEvent* event, gpointer data)
+Editor::_canvas_imageframe_item_view_event(GnomeCanvasItem *item, GdkEvent* event, gpointer data)
 {
        ImageFrameView *ifv = (ImageFrameView *) data ;
        Editor* editor = dynamic_cast<Editor*> (&ifv->get_time_axis_view().editor);
 {
        ImageFrameView *ifv = (ImageFrameView *) data ;
        Editor* editor = dynamic_cast<Editor*> (&ifv->get_time_axis_view().editor);
@@ -183,7 +183,7 @@ Editor::_canvas_imageframe_item_view_event(GtkCanvasItem *item, GdkEvent* event,
 }
 
 gint
 }
 
 gint
-Editor::_canvas_imageframe_view_event(GtkCanvasItem *item, GdkEvent* event, gpointer data)
+Editor::_canvas_imageframe_view_event(GnomeCanvasItem *item, GdkEvent* event, gpointer data)
 {
        ImageFrameTimeAxis *ifta = (ImageFrameTimeAxis*) data ;
        Editor* editor = dynamic_cast<Editor*> (&ifta->editor);
 {
        ImageFrameTimeAxis *ifta = (ImageFrameTimeAxis*) data ;
        Editor* editor = dynamic_cast<Editor*> (&ifta->editor);
@@ -191,7 +191,7 @@ Editor::_canvas_imageframe_view_event(GtkCanvasItem *item, GdkEvent* event, gpoi
 }
 
 gint
 }
 
 gint
-Editor::_canvas_marker_time_axis_view_event(GtkCanvasItem* item, GdkEvent* event, gpointer data)
+Editor::_canvas_marker_time_axis_view_event(GnomeCanvasItem* item, GdkEvent* event, gpointer data)
 {
        MarkerTimeAxis* mta = (MarkerTimeAxis*)data ;
        Editor* editor = dynamic_cast<Editor*> (&mta->editor);
 {
        MarkerTimeAxis* mta = (MarkerTimeAxis*)data ;
        Editor* editor = dynamic_cast<Editor*> (&mta->editor);
@@ -199,7 +199,7 @@ Editor::_canvas_marker_time_axis_view_event(GtkCanvasItem* item, GdkEvent* event
 }
 
 gint
 }
 
 gint
-Editor::_canvas_markerview_item_view_event(GtkCanvasItem *item, GdkEvent* event, gpointer data)
+Editor::_canvas_markerview_item_view_event(GnomeCanvasItem *item, GdkEvent* event, gpointer data)
 {
        MarkerView* mv = (MarkerView*) data ;
        Editor* editor = dynamic_cast<Editor*> (&mv->get_time_axis_view().editor);
 {
        MarkerView* mv = (MarkerView*) data ;
        Editor* editor = dynamic_cast<Editor*> (&mv->get_time_axis_view().editor);
@@ -207,7 +207,7 @@ Editor::_canvas_markerview_item_view_event(GtkCanvasItem *item, GdkEvent* event,
 }
  
 gint
 }
  
 gint
-Editor::_canvas_markerview_start_handle_event(GtkCanvasItem* item, GdkEvent* event, gpointer data)
+Editor::_canvas_markerview_start_handle_event(GnomeCanvasItem* item, GdkEvent* event, gpointer data)
 {
        MarkerView* mv = (MarkerView*)data ;
        Editor* editor = dynamic_cast<Editor*> (&mv->get_time_axis_view().editor);
 {
        MarkerView* mv = (MarkerView*)data ;
        Editor* editor = dynamic_cast<Editor*> (&mv->get_time_axis_view().editor);
@@ -215,7 +215,7 @@ Editor::_canvas_markerview_start_handle_event(GtkCanvasItem* item, GdkEvent* eve
 }
 
 gint
 }
 
 gint
-Editor::_canvas_markerview_end_handle_event(GtkCanvasItem* item, GdkEvent* event, gpointer data)
+Editor::_canvas_markerview_end_handle_event(GnomeCanvasItem* item, GdkEvent* event, gpointer data)
 {
        MarkerView* mv = (MarkerView*)data ;
        Editor* editor = dynamic_cast<Editor*> (&mv->get_time_axis_view().editor);
 {
        MarkerView* mv = (MarkerView*)data ;
        Editor* editor = dynamic_cast<Editor*> (&mv->get_time_axis_view().editor);
@@ -228,7 +228,7 @@ Editor::_canvas_markerview_end_handle_event(GtkCanvasItem* item, GdkEvent* event
  */
 
 gint
  */
 
 gint
-Editor::canvas_imageframe_item_view_event(GtkCanvasItem *item, GdkEvent *event, ImageFrameView *ifv)
+Editor::canvas_imageframe_item_view_event(GnomeCanvasItem *item, GdkEvent *event, ImageFrameView *ifv)
 {
        gint ret = FALSE ;
        ImageFrameTimeAxisGroup* iftag = 0 ;
 {
        gint ret = FALSE ;
        ImageFrameTimeAxisGroup* iftag = 0 ;
@@ -256,7 +256,7 @@ Editor::canvas_imageframe_item_view_event(GtkCanvasItem *item, GdkEvent *event,
 }
 
 gint
 }
 
 gint
-Editor::canvas_imageframe_start_handle_event(GtkCanvasItem *item, GdkEvent *event, ImageFrameView *ifv)
+Editor::canvas_imageframe_start_handle_event(GnomeCanvasItem *item, GdkEvent *event, ImageFrameView *ifv)
 {
        gint ret = FALSE ;
        ImageFrameTimeAxisGroup* iftag = 0 ;
 {
        gint ret = FALSE ;
        ImageFrameTimeAxisGroup* iftag = 0 ;
@@ -291,7 +291,7 @@ Editor::canvas_imageframe_start_handle_event(GtkCanvasItem *item, GdkEvent *even
 }
 
 gint
 }
 
 gint
-Editor::canvas_imageframe_end_handle_event(GtkCanvasItem *item, GdkEvent *event, ImageFrameView *ifv)
+Editor::canvas_imageframe_end_handle_event(GnomeCanvasItem *item, GdkEvent *event, ImageFrameView *ifv)
 {
        gint ret = FALSE ;
        ImageFrameTimeAxisGroup* iftag = 0 ;
 {
        gint ret = FALSE ;
        ImageFrameTimeAxisGroup* iftag = 0 ;
@@ -326,7 +326,7 @@ Editor::canvas_imageframe_end_handle_event(GtkCanvasItem *item, GdkEvent *event,
 }
 
 gint
 }
 
 gint
-Editor::canvas_imageframe_view_event(GtkCanvasItem* item, GdkEvent* event, ImageFrameTimeAxis* ifta)
+Editor::canvas_imageframe_view_event(GnomeCanvasItem* item, GdkEvent* event, ImageFrameTimeAxis* ifta)
 {
        gint ret = FALSE ;
        switch (event->type)
 {
        gint ret = FALSE ;
        switch (event->type)
@@ -349,7 +349,7 @@ Editor::canvas_imageframe_view_event(GtkCanvasItem* item, GdkEvent* event, Image
 }
 
 gint
 }
 
 gint
-Editor::canvas_marker_time_axis_view_event(GtkCanvasItem *item, GdkEvent* event, MarkerTimeAxis* mta)
+Editor::canvas_marker_time_axis_view_event(GnomeCanvasItem *item, GdkEvent* event, MarkerTimeAxis* mta)
 {
        gint ret = FALSE ;
        switch (event->type)
 {
        gint ret = FALSE ;
        switch (event->type)
@@ -372,7 +372,7 @@ Editor::canvas_marker_time_axis_view_event(GtkCanvasItem *item, GdkEvent* event,
 
 
 gint
 
 
 gint
-Editor::canvas_markerview_item_view_event(GtkCanvasItem *item, GdkEvent* event, MarkerView* mta)
+Editor::canvas_markerview_item_view_event(GnomeCanvasItem *item, GdkEvent* event, MarkerView* mta)
 {
        gint ret = FALSE ;
        switch (event->type)
 {
        gint ret = FALSE ;
        switch (event->type)
@@ -397,7 +397,7 @@ Editor::canvas_markerview_item_view_event(GtkCanvasItem *item, GdkEvent* event,
 }
 
 gint
 }
 
 gint
-Editor::canvas_markerview_start_handle_event(GtkCanvasItem* item, GdkEvent* event, MarkerView* mta)
+Editor::canvas_markerview_start_handle_event(GnomeCanvasItem* item, GdkEvent* event, MarkerView* mta)
 {
        gint ret = FALSE ;
        switch (event->type)
 {
        gint ret = FALSE ;
        switch (event->type)
@@ -428,7 +428,7 @@ Editor::canvas_markerview_start_handle_event(GtkCanvasItem* item, GdkEvent* even
 }
 
 gint
 }
 
 gint
-Editor::canvas_markerview_end_handle_event(GtkCanvasItem* item, GdkEvent* event, MarkerView* mta)
+Editor::canvas_markerview_end_handle_event(GnomeCanvasItem* item, GdkEvent* event, MarkerView* mta)
 {
        gint ret = FALSE ;
        switch (event->type)
 {
        gint ret = FALSE ;
        switch (event->type)
@@ -473,7 +473,7 @@ Editor::canvas_markerview_end_handle_event(GtkCanvasItem* item, GdkEvent* event,
 /* <CMT Additions file="editor_mouse.cc"> */
 
 void
 /* <CMT Additions file="editor_mouse.cc"> */
 
 void
-Editor::start_imageframe_grab(GtkCanvasItem* item, GdkEvent* event)
+Editor::start_imageframe_grab(GnomeCanvasItem* item, GdkEvent* event)
 {
        ImageFrameView* ifv = ((ImageFrameTimeAxis*)clicked_trackview)->get_view()->get_selected_imageframe_view() ;
        drag_info.copy = false ;
 {
        ImageFrameView* ifv = ((ImageFrameTimeAxis*)clicked_trackview)->get_view()->get_selected_imageframe_view() ;
        drag_info.copy = false ;
@@ -494,10 +494,10 @@ Editor::start_imageframe_grab(GtkCanvasItem* item, GdkEvent* event)
           so move them to the top afterwards.
        */
 
           so move them to the top afterwards.
        */
 
-       gtk_canvas_item_raise_to_top(drag_info.item) ;
-       gtk_canvas_item_raise_to_top(drag_info.last_trackview->canvas_display) ;
-       //gtk_canvas_item_raise_to_top(time_line_group) ;
-       gtk_canvas_item_raise_to_top (cursor_group);
+       gnome_canvas_item_raise_to_top(drag_info.item) ;
+       gnome_canvas_item_raise_to_top(drag_info.last_trackview->canvas_display) ;
+       //gnome_canvas_item_raise_to_top(time_line_group) ;
+       gnome_canvas_item_raise_to_top (cursor_group);
 
        start_grab(event) ;
 
 
        start_grab(event) ;
 
@@ -506,7 +506,7 @@ Editor::start_imageframe_grab(GtkCanvasItem* item, GdkEvent* event)
 
 
 void
 
 
 void
-Editor::start_markerview_grab(GtkCanvasItem* item, GdkEvent* event)
+Editor::start_markerview_grab(GnomeCanvasItem* item, GdkEvent* event)
 {
        MarkerView* mv = ((MarkerTimeAxis*)clicked_trackview)->get_view()->get_selected_time_axis_item() ;
        drag_info.copy = false ;
 {
        MarkerView* mv = ((MarkerTimeAxis*)clicked_trackview)->get_view()->get_selected_time_axis_item() ;
        drag_info.copy = false ;
@@ -527,10 +527,10 @@ Editor::start_markerview_grab(GtkCanvasItem* item, GdkEvent* event)
           so move them to the top afterwards.
        */
 
           so move them to the top afterwards.
        */
 
-       gtk_canvas_item_raise_to_top(drag_info.item) ;
-       gtk_canvas_item_raise_to_top(drag_info.last_trackview->canvas_display) ;
-       //gtk_canvas_item_raise_to_top(time_line_group) ;
-       gtk_canvas_item_raise_to_top (cursor_group);
+       gnome_canvas_item_raise_to_top(drag_info.item) ;
+       gnome_canvas_item_raise_to_top(drag_info.last_trackview->canvas_display) ;
+       //gnome_canvas_item_raise_to_top(time_line_group) ;
+       gnome_canvas_item_raise_to_top (cursor_group);
 
        start_grab(event) ;
   
 
        start_grab(event) ;
   
@@ -539,7 +539,7 @@ Editor::start_markerview_grab(GtkCanvasItem* item, GdkEvent* event)
 
 
 void
 
 
 void
-Editor::markerview_drag_motion_callback(GtkCanvasItem*, GdkEvent* event)
+Editor::markerview_drag_motion_callback(GnomeCanvasItem*, GdkEvent* event)
 {
        double cx, cy ;
 
 {
        double cx, cy ;
 
@@ -586,7 +586,7 @@ Editor::markerview_drag_motion_callback(GtkCanvasItem*, GdkEvent* event)
 }
 
 void
 }
 
 void
-Editor::imageframe_drag_motion_callback(GtkCanvasItem*, GdkEvent* event)
+Editor::imageframe_drag_motion_callback(GnomeCanvasItem*, GdkEvent* event)
 {
        double cx, cy ;
        
 {
        double cx, cy ;
        
@@ -625,7 +625,7 @@ Editor::imageframe_drag_motion_callback(GtkCanvasItem*, GdkEvent* event)
 }
 
 void
 }
 
 void
-Editor::timeaxis_item_drag_finished_callback(GtkCanvasItem*, GdkEvent* event)
+Editor::timeaxis_item_drag_finished_callback(GnomeCanvasItem*, GdkEvent* event)
 {
        jack_nframes_t where ;
        TimeAxisViewItem* tavi = reinterpret_cast<TimeAxisViewItem*>(drag_info.data) ;
 {
        jack_nframes_t where ;
        TimeAxisViewItem* tavi = reinterpret_cast<TimeAxisViewItem*>(drag_info.data) ;
@@ -663,7 +663,7 @@ Editor::timeaxis_item_drag_finished_callback(GtkCanvasItem*, GdkEvent* event)
 
 
 void
 
 
 void
-Editor::imageframe_start_handle_op(GtkCanvasItem* item, GdkEvent* event)
+Editor::imageframe_start_handle_op(GnomeCanvasItem* item, GdkEvent* event)
 {
        // get the selected item from the parent time axis
        ImageFrameTimeAxis* ifta = dynamic_cast<ImageFrameTimeAxis*>(clicked_trackview) ;
 {
        // get the selected item from the parent time axis
        ImageFrameTimeAxis* ifta = dynamic_cast<ImageFrameTimeAxis*>(clicked_trackview) ;
@@ -693,7 +693,7 @@ Editor::imageframe_start_handle_op(GtkCanvasItem* item, GdkEvent* event)
 }
 
 void
 }
 
 void
-Editor::imageframe_end_handle_op(GtkCanvasItem* item, GdkEvent* event)
+Editor::imageframe_end_handle_op(GnomeCanvasItem* item, GdkEvent* event)
 {
        // get the selected item from the parent time axis
        ImageFrameTimeAxis* ifta = dynamic_cast<ImageFrameTimeAxis*>(clicked_trackview) ;
 {
        // get the selected item from the parent time axis
        ImageFrameTimeAxis* ifta = dynamic_cast<ImageFrameTimeAxis*>(clicked_trackview) ;
@@ -725,7 +725,7 @@ Editor::imageframe_end_handle_op(GtkCanvasItem* item, GdkEvent* event)
 }
 
 void
 }
 
 void
-Editor::imageframe_start_handle_trim_motion(GtkCanvasItem* item, GdkEvent* event)
+Editor::imageframe_start_handle_trim_motion(GnomeCanvasItem* item, GdkEvent* event)
 {
        ImageFrameView* ifv = reinterpret_cast<ImageFrameView*> (drag_info.data) ;
        
 {
        ImageFrameView* ifv = reinterpret_cast<ImageFrameView*> (drag_info.data) ;
        
@@ -796,7 +796,7 @@ Editor::imageframe_start_handle_trim_motion(GtkCanvasItem* item, GdkEvent* event
 }
 
 void
 }
 
 void
-Editor::imageframe_start_handle_end_trim(GtkCanvasItem* item, GdkEvent* event)
+Editor::imageframe_start_handle_end_trim(GnomeCanvasItem* item, GdkEvent* event)
 {
        ImageFrameView* ifv = reinterpret_cast<ImageFrameView *> (drag_info.data) ;
        
 {
        ImageFrameView* ifv = reinterpret_cast<ImageFrameView *> (drag_info.data) ;
        
@@ -816,7 +816,7 @@ Editor::imageframe_start_handle_end_trim(GtkCanvasItem* item, GdkEvent* event)
 }
 
 void
 }
 
 void
-Editor::imageframe_end_handle_trim_motion(GtkCanvasItem* item, GdkEvent* event)
+Editor::imageframe_end_handle_trim_motion(GnomeCanvasItem* item, GdkEvent* event)
 {
        ImageFrameView* ifv = reinterpret_cast<ImageFrameView *> (drag_info.data) ;
        
 {
        ImageFrameView* ifv = reinterpret_cast<ImageFrameView *> (drag_info.data) ;
        
@@ -875,7 +875,7 @@ Editor::imageframe_end_handle_trim_motion(GtkCanvasItem* item, GdkEvent* event)
 
 
 void
 
 
 void
-Editor::imageframe_end_handle_end_trim (GtkCanvasItem* item, GdkEvent* event)
+Editor::imageframe_end_handle_end_trim (GnomeCanvasItem* item, GdkEvent* event)
 {
        ImageFrameView* ifv = reinterpret_cast<ImageFrameView *> (drag_info.data) ;
 
 {
        ImageFrameView* ifv = reinterpret_cast<ImageFrameView *> (drag_info.data) ;
 
@@ -897,7 +897,7 @@ Editor::imageframe_end_handle_end_trim (GtkCanvasItem* item, GdkEvent* event)
 
 
 void
 
 
 void
-Editor::markerview_item_start_handle_op(GtkCanvasItem* item, GdkEvent* event)
+Editor::markerview_item_start_handle_op(GnomeCanvasItem* item, GdkEvent* event)
 {
        MarkerView* mv = reinterpret_cast<MarkerTimeAxis*>(clicked_trackview)->get_view()->get_selected_time_axis_item() ;
 
 {
        MarkerView* mv = reinterpret_cast<MarkerTimeAxis*>(clicked_trackview)->get_view()->get_selected_time_axis_item() ;
 
@@ -922,7 +922,7 @@ Editor::markerview_item_start_handle_op(GtkCanvasItem* item, GdkEvent* event)
 }
 
 void
 }
 
 void
-Editor::markerview_item_end_handle_op(GtkCanvasItem* item, GdkEvent* event)
+Editor::markerview_item_end_handle_op(GnomeCanvasItem* item, GdkEvent* event)
 {
        MarkerView* mv = reinterpret_cast<MarkerTimeAxis*>(clicked_trackview)->get_view()->get_selected_time_axis_item() ;
        if (mv == 0)
 {
        MarkerView* mv = reinterpret_cast<MarkerTimeAxis*>(clicked_trackview)->get_view()->get_selected_time_axis_item() ;
        if (mv == 0)
@@ -947,7 +947,7 @@ Editor::markerview_item_end_handle_op(GtkCanvasItem* item, GdkEvent* event)
 
 
 void
 
 
 void
-Editor::markerview_start_handle_trim_motion(GtkCanvasItem* item, GdkEvent* event)
+Editor::markerview_start_handle_trim_motion(GnomeCanvasItem* item, GdkEvent* event)
 {
        MarkerView* mv = reinterpret_cast<MarkerView*> (drag_info.data) ;
        
 {
        MarkerView* mv = reinterpret_cast<MarkerView*> (drag_info.data) ;
        
@@ -1021,7 +1021,7 @@ Editor::markerview_start_handle_trim_motion(GtkCanvasItem* item, GdkEvent* event
 }
 
 void
 }
 
 void
-Editor::markerview_start_handle_end_trim(GtkCanvasItem* item, GdkEvent* event)
+Editor::markerview_start_handle_end_trim(GnomeCanvasItem* item, GdkEvent* event)
 {
        MarkerView* mv = reinterpret_cast<MarkerView*> (drag_info.data) ;
        
 {
        MarkerView* mv = reinterpret_cast<MarkerView*> (drag_info.data) ;
        
@@ -1041,7 +1041,7 @@ Editor::markerview_start_handle_end_trim(GtkCanvasItem* item, GdkEvent* event)
 }
 
 void
 }
 
 void
-Editor::markerview_end_handle_trim_motion(GtkCanvasItem* item, GdkEvent* event)
+Editor::markerview_end_handle_trim_motion(GnomeCanvasItem* item, GdkEvent* event)
 {
        MarkerView* mv = reinterpret_cast<MarkerView*> (drag_info.data) ;
        
 {
        MarkerView* mv = reinterpret_cast<MarkerView*> (drag_info.data) ;
        
@@ -1117,7 +1117,7 @@ Editor::markerview_end_handle_trim_motion(GtkCanvasItem* item, GdkEvent* event)
 
 
 void
 
 
 void
-Editor::markerview_end_handle_end_trim (GtkCanvasItem* item, GdkEvent* event)
+Editor::markerview_end_handle_end_trim (GnomeCanvasItem* item, GdkEvent* event)
 {
        MarkerView* mv = reinterpret_cast<MarkerView*> (drag_info.data) ;
 
 {
        MarkerView* mv = reinterpret_cast<MarkerView*> (drag_info.data) ;
 
index 36337f55ea246999bfa4a6cb1cbd1321816eaa14..ea739210ba4eb423a94b3f0c3f241acf4f632889 100644 (file)
@@ -49,7 +49,7 @@ Editor::kbd_driver (sigc::slot<void,GdkEvent*> theslot, bool use_track_canvas, b
                        selection->set (entered_regionview);
                }
 
                        selection->set (entered_regionview);
                }
 
-               gtk_canvas_window_to_world (GTK_CANVAS(track_gtk_canvas), x, y, &dx, &dy);
+               gnome_canvas_window_to_world (GNOME_CANVAS(track_gnome_canvas), x, y, &dx, &dy);
 
                ev.type = GDK_BUTTON_PRESS;
                ev.button.x = dx;
 
                ev.type = GDK_BUTTON_PRESS;
                ev.button.x = dx;
index e209f56841ca4e89111e931dbb15766f3da3df35..8c2cbabb787fffa7d565af3d1b3a20eb34c54ba5 100644 (file)
@@ -22,7 +22,7 @@
 #include <cstdlib>
 #include <cmath>
 
 #include <cstdlib>
 #include <cmath>
 
-#include <gtk-canvas.h>
+#include <libgnomecanvas/libgnomecanvas.h>
 #include <gtkmm2ext/gtk_ui.h>
 
 #include <ardour/location.h>
 #include <gtkmm2ext/gtk_ui.h>
 
 #include <ardour/location.h>
@@ -69,30 +69,30 @@ Editor::add_new_location (Location *location)
        }
 
        if (location->is_mark()) {
        }
 
        if (location->is_mark()) {
-               lam->start = new Marker (*this, GTK_CANVAS_GROUP(marker_group), color, 
+               lam->start = new Marker (*this, GNOME_CANVAS_GROUP(marker_group), color, 
                                         location->name(), Marker::Mark, PublicEditor::canvas_marker_event, location->start());
                lam->end   = 0;
 
        } else if (location->is_auto_loop()) {
                // transport marker
                                         location->name(), Marker::Mark, PublicEditor::canvas_marker_event, location->start());
                lam->end   = 0;
 
        } else if (location->is_auto_loop()) {
                // transport marker
-               lam->start = new Marker (*this, GTK_CANVAS_GROUP(transport_marker_group), color, 
+               lam->start = new Marker (*this, GNOME_CANVAS_GROUP(transport_marker_group), color, 
                                         location->name(), Marker::LoopStart, PublicEditor::canvas_marker_event, location->start());
                                         location->name(), Marker::LoopStart, PublicEditor::canvas_marker_event, location->start());
-               lam->end   = new Marker (*this, GTK_CANVAS_GROUP(transport_marker_group), color, 
+               lam->end   = new Marker (*this, GNOME_CANVAS_GROUP(transport_marker_group), color, 
                                         location->name(), Marker::LoopEnd, PublicEditor::canvas_marker_event, location->end());
                
        } else if (location->is_auto_punch()) {
                // transport marker
                                         location->name(), Marker::LoopEnd, PublicEditor::canvas_marker_event, location->end());
                
        } else if (location->is_auto_punch()) {
                // transport marker
-               lam->start = new Marker (*this, GTK_CANVAS_GROUP(transport_marker_group), color, 
+               lam->start = new Marker (*this, GNOME_CANVAS_GROUP(transport_marker_group), color, 
                                         location->name(), Marker::PunchIn, PublicEditor::canvas_marker_event, location->start());
                                         location->name(), Marker::PunchIn, PublicEditor::canvas_marker_event, location->start());
-               lam->end   = new Marker (*this, GTK_CANVAS_GROUP(transport_marker_group), color, 
+               lam->end   = new Marker (*this, GNOME_CANVAS_GROUP(transport_marker_group), color, 
                                         location->name(), Marker::PunchOut, PublicEditor::canvas_marker_event, location->end());
                
        } else {
 
                // range marker
                                         location->name(), Marker::PunchOut, PublicEditor::canvas_marker_event, location->end());
                
        } else {
 
                // range marker
-               lam->start = new Marker (*this, GTK_CANVAS_GROUP(range_marker_group), color, 
+               lam->start = new Marker (*this, GNOME_CANVAS_GROUP(range_marker_group), color, 
                                         location->name(), Marker::Start, PublicEditor::canvas_marker_event, location->start());
                                         location->name(), Marker::Start, PublicEditor::canvas_marker_event, location->start());
-               lam->end   = new Marker (*this, GTK_CANVAS_GROUP(range_marker_group), color, 
+               lam->end   = new Marker (*this, GNOME_CANVAS_GROUP(range_marker_group), color, 
                                         location->name(), Marker::End, PublicEditor::canvas_marker_event, location->end());
        }
 
                                         location->name(), Marker::End, PublicEditor::canvas_marker_event, location->end());
        }
 
@@ -293,7 +293,7 @@ Editor::mouse_add_new_marker (jack_nframes_t where)
 }
 
 void
 }
 
 void
-Editor::remove_marker (GtkCanvasItem* item, GdkEvent* event)
+Editor::remove_marker (GnomeCanvasItem* item, GdkEvent* event)
 {
        Marker* marker;
        bool is_start;
 {
        Marker* marker;
        bool is_start;
@@ -356,7 +356,7 @@ Editor::location_gone (Location *location)
 }
 
 void
 }
 
 void
-Editor::tm_marker_context_menu (GdkEventButton* ev, GtkCanvasItem* item)
+Editor::tm_marker_context_menu (GdkEventButton* ev, GnomeCanvasItem* item)
 {
        if (tm_marker_menu == 0) {
                build_tm_marker_menu ();
 {
        if (tm_marker_menu == 0) {
                build_tm_marker_menu ();
@@ -369,7 +369,7 @@ Editor::tm_marker_context_menu (GdkEventButton* ev, GtkCanvasItem* item)
 
 
 void
 
 
 void
-Editor::marker_context_menu (GdkEventButton* ev, GtkCanvasItem* item)
+Editor::marker_context_menu (GdkEventButton* ev, GnomeCanvasItem* item)
 {
        Marker * marker;
        if ((marker = reinterpret_cast<Marker *> (gtk_object_get_data (GTK_OBJECT(item), "marker"))) == 0) {
 {
        Marker * marker;
        if ((marker = reinterpret_cast<Marker *> (gtk_object_get_data (GTK_OBJECT(item), "marker"))) == 0) {
@@ -412,7 +412,7 @@ Editor::marker_context_menu (GdkEventButton* ev, GtkCanvasItem* item)
 
 
 void
 
 
 void
-Editor::new_transport_marker_context_menu (GdkEventButton* ev, GtkCanvasItem* item)
+Editor::new_transport_marker_context_menu (GdkEventButton* ev, GnomeCanvasItem* item)
 {
        if (new_transport_marker_menu == 0) {
                build_new_transport_marker_menu ();
 {
        if (new_transport_marker_menu == 0) {
                build_new_transport_marker_menu ();
@@ -423,7 +423,7 @@ Editor::new_transport_marker_context_menu (GdkEventButton* ev, GtkCanvasItem* it
 }
 
 void
 }
 
 void
-Editor::transport_marker_context_menu (GdkEventButton* ev, GtkCanvasItem* item)
+Editor::transport_marker_context_menu (GdkEventButton* ev, GnomeCanvasItem* item)
 {
        if (transport_marker_menu == 0) {
                build_transport_marker_menu ();
 {
        if (transport_marker_menu == 0) {
                build_transport_marker_menu ();
@@ -778,8 +778,8 @@ gint
 Editor::new_transport_marker_menu_popdown (GdkEventAny *ev)
 {
        // hide rects
 Editor::new_transport_marker_menu_popdown (GdkEventAny *ev)
 {
        // hide rects
-       gtk_canvas_item_hide (transport_bar_drag_rect);
-       gtk_canvas_item_hide (range_marker_drag_rect);
+       gnome_canvas_item_hide (transport_bar_drag_rect);
+       gnome_canvas_item_hide (range_marker_drag_rect);
 
        return FALSE;
 }
 
        return FALSE;
 }
@@ -849,14 +849,14 @@ Editor::update_loop_range_view (bool visibility)
                double x1 = frame_to_pixel (tll->start());
                double x2 = frame_to_pixel (tll->end());
                
                double x1 = frame_to_pixel (tll->start());
                double x2 = frame_to_pixel (tll->end());
                
-               gtk_canvas_item_set (transport_loop_range_rect, "x1", x1, "x2", x2, NULL);
+               gnome_canvas_item_set (transport_loop_range_rect, "x1", x1, "x2", x2, NULL);
                
                if (visibility) {
                
                if (visibility) {
-                       gtk_canvas_item_show (transport_loop_range_rect);
+                       gnome_canvas_item_show (transport_loop_range_rect);
                }
        }
        else if (visibility) {
                }
        }
        else if (visibility) {
-               gtk_canvas_item_hide (transport_loop_range_rect);
+               gnome_canvas_item_hide (transport_loop_range_rect);
        }
 }
 
        }
 }
 
@@ -874,38 +874,38 @@ Editor::update_punch_range_view (bool visibility)
                double x1 = frame_to_pixel (tpl->start());
                double x2 = frame_to_pixel (tpl->end());
                
                double x1 = frame_to_pixel (tpl->start());
                double x2 = frame_to_pixel (tpl->end());
                
-               gtk_canvas_item_set (transport_punch_range_rect, "x1", x1, "x2", x2, NULL);
+               gnome_canvas_item_set (transport_punch_range_rect, "x1", x1, "x2", x2, NULL);
                
                if (visibility) {
                
                if (visibility) {
-                       gtk_canvas_item_show (transport_punch_range_rect);
+                       gnome_canvas_item_show (transport_punch_range_rect);
                }
        }
        else if (visibility) {
                }
        }
        else if (visibility) {
-               gtk_canvas_item_hide (transport_punch_range_rect);
+               gnome_canvas_item_hide (transport_punch_range_rect);
        }
 
 //     if (session->get_punch_in()) {
 //             double x = frame_to_pixel (transport_punch_location->start());
        }
 
 //     if (session->get_punch_in()) {
 //             double x = frame_to_pixel (transport_punch_location->start());
-//             gtk_canvas_item_set (transport_punchin_line, "x1", x, "x2", x, NULL);
+//             gnome_canvas_item_set (transport_punchin_line, "x1", x, "x2", x, NULL);
                
 //             if (visibility) {
                
 //             if (visibility) {
-//                     gtk_canvas_item_show (transport_punchin_line);
+//                     gnome_canvas_item_show (transport_punchin_line);
 //             }
 //     }
 //     else if (visibility) {
 //             }
 //     }
 //     else if (visibility) {
-//             gtk_canvas_item_hide (transport_punchin_line);
+//             gnome_canvas_item_hide (transport_punchin_line);
 //     }
        
 //     if (session->get_punch_out()) {
 //             double x = frame_to_pixel (transport_punch_location->end());
                
 //     }
        
 //     if (session->get_punch_out()) {
 //             double x = frame_to_pixel (transport_punch_location->end());
                
-//             gtk_canvas_item_set (transport_punchout_line, "x1", x, "x2", x, NULL);
+//             gnome_canvas_item_set (transport_punchout_line, "x1", x, "x2", x, NULL);
                
 //             if (visibility) {
                
 //             if (visibility) {
-//                     gtk_canvas_item_show (transport_punchout_line);
+//                     gnome_canvas_item_show (transport_punchout_line);
 //             }
 //     }
 //     else if (visibility) {
 //             }
 //     }
 //     else if (visibility) {
-//             gtk_canvas_item_hide (transport_punchout_line);
+//             gnome_canvas_item_hide (transport_punchout_line);
 //     }
 }
 //     }
 }
index 8b6c81be5bb40820f7e798ba1be87081d58781a0..cd51182126af1228476032a79da020c013b12d89 100644 (file)
@@ -161,7 +161,7 @@ Editor::update_current_screen ()
 
                if (_follow_playhead) {
 
 
                if (_follow_playhead) {
 
-                       gtk_canvas_item_show (playhead_cursor->canvas_item);
+                       gnome_canvas_item_show (playhead_cursor->canvas_item);
 
                        if (frame != last_update_frame) {
 
 
                        if (frame != last_update_frame) {
 
@@ -185,7 +185,7 @@ Editor::update_current_screen ()
                        
                        if (frame != last_update_frame) {
                                if (frame < leftmost_frame || frame > leftmost_frame + current_page_frames()) {
                        
                        if (frame != last_update_frame) {
                                if (frame < leftmost_frame || frame > leftmost_frame + current_page_frames()) {
-                                       gtk_canvas_item_hide (playhead_cursor->canvas_item);
+                                       gnome_canvas_item_hide (playhead_cursor->canvas_item);
                                } else {
                                        playhead_cursor->set_position (frame);
                                }
                                } else {
                                        playhead_cursor->set_position (frame);
                                }
index 7eade9e793799b2dc02f9ac1981b3a31268255b2..904b76c3673ab8746eb24fbc7cdc1c15cc79ed8f 100644 (file)
@@ -86,14 +86,14 @@ Editor::event_frame (GdkEvent* event, double* pcx, double* pcy)
        case GDK_BUTTON_PRESS:
        case GDK_2BUTTON_PRESS:
        case GDK_3BUTTON_PRESS:
        case GDK_BUTTON_PRESS:
        case GDK_2BUTTON_PRESS:
        case GDK_3BUTTON_PRESS:
-               gtk_canvas_w2c_d (GTK_CANVAS(track_gtk_canvas), event->button.x, event->button.y, pcx, pcy);
+               gnome_canvas_w2c_d (GNOME_CANVAS(track_gnome_canvas), event->button.x, event->button.y, pcx, pcy);
                break;
        case GDK_MOTION_NOTIFY:
                break;
        case GDK_MOTION_NOTIFY:
-               gtk_canvas_w2c_d (GTK_CANVAS(track_gtk_canvas), event->motion.x, event->motion.y, pcx, pcy);
+               gnome_canvas_w2c_d (GNOME_CANVAS(track_gnome_canvas), event->motion.x, event->motion.y, pcx, pcy);
                break;
        case GDK_ENTER_NOTIFY:
        case GDK_LEAVE_NOTIFY:
                break;
        case GDK_ENTER_NOTIFY:
        case GDK_LEAVE_NOTIFY:
-               gtk_canvas_w2c_d (GTK_CANVAS(track_gtk_canvas), event->crossing.x, event->crossing.y, pcx, pcy);
+               gnome_canvas_w2c_d (GNOME_CANVAS(track_gnome_canvas), event->crossing.x, event->crossing.y, pcx, pcy);
                break;
        default:
                warning << compose (_("Editor::event_frame() used on unhandled event type %1"), event->type) << endmsg;
                break;
        default:
                warning << compose (_("Editor::event_frame() used on unhandled event type %1"), event->type) << endmsg;
@@ -284,7 +284,7 @@ Editor::step_mouse_mode (bool next)
 }
 
 gint
 }
 
 gint
-Editor::button_press_handler (GtkCanvasItem* item, GdkEvent* event, ItemType item_type)
+Editor::button_press_handler (GnomeCanvasItem* item, GdkEvent* event, ItemType item_type)
 {
        jack_nframes_t where = event_frame (event, 0, 0);
 
 {
        jack_nframes_t where = event_frame (event, 0, 0);
 
@@ -381,7 +381,7 @@ Editor::button_press_handler (GtkCanvasItem* item, GdkEvent* event, ItemType ite
                if (event->type == GDK_BUTTON_PRESS) {
 
                        if (drag_info.item) {
                if (event->type == GDK_BUTTON_PRESS) {
 
                        if (drag_info.item) {
-                               gtk_canvas_item_ungrab (drag_info.item, event->button.time);
+                               gnome_canvas_item_ungrab (drag_info.item, event->button.time);
                        }
 
                        /* single mouse clicks on any of these item types operate
                        }
 
                        /* single mouse clicks on any of these item types operate
@@ -784,7 +784,7 @@ Editor::button_press_handler (GtkCanvasItem* item, GdkEvent* event, ItemType ite
 }
 
 gint
 }
 
 gint
-Editor::button_release_handler (GtkCanvasItem* item, GdkEvent* event, ItemType item_type)
+Editor::button_release_handler (GnomeCanvasItem* item, GdkEvent* event, ItemType item_type)
 {
        jack_nframes_t where = event_frame (event, 0, 0);
 
 {
        jack_nframes_t where = event_frame (event, 0, 0);
 
@@ -1117,7 +1117,7 @@ Editor::maybe_autoscroll (GdkEvent* event)
 }
 
 gint
 }
 
 gint
-Editor::enter_handler (GtkCanvasItem* item, GdkEvent* event, ItemType item_type)
+Editor::enter_handler (GnomeCanvasItem* item, GdkEvent* event, ItemType item_type)
 {
        ControlPoint* cp;
        Marker * marker;
 {
        ControlPoint* cp;
        Marker * marker;
@@ -1132,7 +1132,7 @@ Editor::enter_handler (GtkCanvasItem* item, GdkEvent* event, ItemType item_type)
                        double at_x, at_y;
                        at_x = cp->get_x();
                        at_y = cp->get_y ();
                        double at_x, at_y;
                        at_x = cp->get_x();
                        at_y = cp->get_y ();
-                       gtk_canvas_item_i2w (cp->item, &at_x, &at_y);
+                       gnome_canvas_item_i2w (cp->item, &at_x, &at_y);
                        at_x += 20.0;
                        at_y += 20.0;
 
                        at_x += 20.0;
                        at_y += 20.0;
 
@@ -1156,7 +1156,7 @@ Editor::enter_handler (GtkCanvasItem* item, GdkEvent* event, ItemType item_type)
                double at_x, at_y;
                at_x = cp->get_x();
                at_y = cp->get_y ();
                double at_x, at_y;
                at_x = cp->get_x();
                at_y = cp->get_y ();
-               gtk_canvas_item_i2w (cp->item, &at_x, &at_y);
+               gnome_canvas_item_i2w (cp->item, &at_x, &at_y);
                at_x += 20.0;
                at_y += 20.0;
 
                at_x += 20.0;
                at_y += 20.0;
 
@@ -1172,7 +1172,7 @@ Editor::enter_handler (GtkCanvasItem* item, GdkEvent* event, ItemType item_type)
                
        case GainLineItem:
                if (mouse_mode == MouseGain) {
                
        case GainLineItem:
                if (mouse_mode == MouseGain) {
-                       gtk_canvas_item_set (item, "fill_color_rgba", color_map[cEnteredGainLine], NULL);
+                       gnome_canvas_item_set (item, "fill_color_rgba", color_map[cEnteredGainLine], NULL);
                        if (is_drawable()) {
                                gdk_window_set_cursor (track_canvas_scroller.get_window(), fader_cursor);
                        }
                        if (is_drawable()) {
                                gdk_window_set_cursor (track_canvas_scroller.get_window(), fader_cursor);
                        }
@@ -1182,7 +1182,7 @@ Editor::enter_handler (GtkCanvasItem* item, GdkEvent* event, ItemType item_type)
        case GainAutomationLineItem:
        case RedirectAutomationLineItem:
        case PanAutomationLineItem:
        case GainAutomationLineItem:
        case RedirectAutomationLineItem:
        case PanAutomationLineItem:
-               gtk_canvas_item_set (item, "fill_color_rgba", color_map[cEnteredAutomationLine], NULL);
+               gnome_canvas_item_set (item, "fill_color_rgba", color_map[cEnteredAutomationLine], NULL);
                if (is_drawable()) {
                        gdk_window_set_cursor (track_canvas_scroller.get_window(), fader_cursor);
                }
                if (is_drawable()) {
                        gdk_window_set_cursor (track_canvas_scroller.get_window(), fader_cursor);
                }
@@ -1277,7 +1277,7 @@ Editor::enter_handler (GtkCanvasItem* item, GdkEvent* event, ItemType item_type)
        case FadeInHandleItem:
        case FadeOutHandleItem:
                if (mouse_mode == MouseObject) {
        case FadeInHandleItem:
        case FadeOutHandleItem:
                if (mouse_mode == MouseObject) {
-                       gtk_canvas_item_set (item, "fill_color_rgba", 0, "outline_pixels", 1, NULL);
+                       gnome_canvas_item_set (item, "fill_color_rgba", 0, "outline_pixels", 1, NULL);
                }
                break;
 
                }
                break;
 
@@ -1314,7 +1314,7 @@ Editor::enter_handler (GtkCanvasItem* item, GdkEvent* event, ItemType item_type)
 }
 
 gint
 }
 
 gint
-Editor::leave_handler (GtkCanvasItem* item, GdkEvent* event, ItemType item_type)
+Editor::leave_handler (GnomeCanvasItem* item, GdkEvent* event, ItemType item_type)
 {
        AutomationLine* al;
        ControlPoint* cp;
 {
        AutomationLine* al;
        ControlPoint* cp;
@@ -1363,7 +1363,7 @@ Editor::leave_handler (GtkCanvasItem* item, GdkEvent* event, ItemType item_type)
        case RedirectAutomationLineItem:
        case PanAutomationLineItem:
                al = reinterpret_cast<AutomationLine*> (gtk_object_get_data (GTK_OBJECT(item),"line"));
        case RedirectAutomationLineItem:
        case PanAutomationLineItem:
                al = reinterpret_cast<AutomationLine*> (gtk_object_get_data (GTK_OBJECT(item),"line"));
-               gtk_canvas_item_set (item, "fill_color_rgba", al->get_line_color(), NULL);
+               gnome_canvas_item_set (item, "fill_color_rgba", al->get_line_color(), NULL);
                if (is_drawable()) {
                        gdk_window_set_cursor (track_canvas_scroller.get_window(), current_canvas_cursor);
                }
                if (is_drawable()) {
                        gdk_window_set_cursor (track_canvas_scroller.get_window(), current_canvas_cursor);
                }
@@ -1407,7 +1407,7 @@ Editor::leave_handler (GtkCanvasItem* item, GdkEvent* event, ItemType item_type)
        case FadeInHandleItem:
        case FadeOutHandleItem:
                rv = static_cast<AudioRegionView*>(gtk_object_get_data (GTK_OBJECT(item), "regionview"));
        case FadeInHandleItem:
        case FadeOutHandleItem:
                rv = static_cast<AudioRegionView*>(gtk_object_get_data (GTK_OBJECT(item), "regionview"));
-               gtk_canvas_item_set (item, "fill_color_rgba", rv->get_fill_color(), "outline_pixels", 0, NULL);
+               gnome_canvas_item_set (item, "fill_color_rgba", rv->get_fill_color(), "outline_pixels", 0, NULL);
                break;
 
        case AutomationTrackItem:
                break;
 
        case AutomationTrackItem:
@@ -1437,7 +1437,7 @@ Editor::left_automation_track ()
 }
 
 gint
 }
 
 gint
-Editor::motion_handler (GtkCanvasItem* item, GdkEvent* event, ItemType item_type)
+Editor::motion_handler (GnomeCanvasItem* item, GdkEvent* event, ItemType item_type)
 {
        gint x, y;
        
 {
        gint x, y;
        
@@ -1583,7 +1583,7 @@ Editor::start_grab (GdkEvent* event, GdkCursor *cursor)
        drag_info.brushing = false;
        drag_info.copied_location = 0;
 
        drag_info.brushing = false;
        drag_info.copied_location = 0;
 
-       gtk_canvas_item_grab (drag_info.item,
+       gnome_canvas_item_grab (drag_info.item,
                              Gdk::POINTER_MOTION_MASK|Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK,
                              cursor,
                              event->button.time);
                              Gdk::POINTER_MOTION_MASK|Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK,
                              cursor,
                              event->button.time);
@@ -1607,7 +1607,7 @@ Editor::start_grab (GdkEvent* event, GdkCursor *cursor)
 }
 
 bool
 }
 
 bool
-Editor::end_grab (GtkCanvasItem* item, GdkEvent* event)
+Editor::end_grab (GnomeCanvasItem* item, GdkEvent* event)
 {
        bool did_drag = false;
 
 {
        bool did_drag = false;
 
@@ -1617,7 +1617,7 @@ Editor::end_grab (GtkCanvasItem* item, GdkEvent* event)
                return false;
        }
        
                return false;
        }
        
-       gtk_canvas_item_ungrab (drag_info.item, event->button.time);
+       gnome_canvas_item_ungrab (drag_info.item, event->button.time);
 
        if (drag_info.finished_callback) {
                (this->*(drag_info.finished_callback)) (item, event);
 
        if (drag_info.finished_callback) {
                (this->*(drag_info.finished_callback)) (item, event);
@@ -1676,7 +1676,7 @@ Editor::set_playhead_cursor (GdkEvent* event)
 }
 
 void
 }
 
 void
-Editor::start_fade_in_grab (GtkCanvasItem* item, GdkEvent* event)
+Editor::start_fade_in_grab (GnomeCanvasItem* item, GdkEvent* event)
 {
        drag_info.item = item;
        drag_info.motion_callback = &Editor::fade_in_drag_motion_callback;
 {
        drag_info.item = item;
        drag_info.motion_callback = &Editor::fade_in_drag_motion_callback;
@@ -1695,7 +1695,7 @@ Editor::start_fade_in_grab (GtkCanvasItem* item, GdkEvent* event)
 }
 
 void
 }
 
 void
-Editor::fade_in_drag_motion_callback (GtkCanvasItem* item, GdkEvent* event)
+Editor::fade_in_drag_motion_callback (GnomeCanvasItem* item, GdkEvent* event)
 {
        AudioRegionView* arv = static_cast<AudioRegionView*>(drag_info.data);
        jack_nframes_t pos;
 {
        AudioRegionView* arv = static_cast<AudioRegionView*>(drag_info.data);
        jack_nframes_t pos;
@@ -1728,7 +1728,7 @@ Editor::fade_in_drag_motion_callback (GtkCanvasItem* item, GdkEvent* event)
 }
 
 void
 }
 
 void
-Editor::fade_in_drag_finished_callback (GtkCanvasItem* item, GdkEvent* event)
+Editor::fade_in_drag_finished_callback (GnomeCanvasItem* item, GdkEvent* event)
 {
        if (drag_info.first_move) return;
 
 {
        if (drag_info.first_move) return;
 
@@ -1766,7 +1766,7 @@ Editor::fade_in_drag_finished_callback (GtkCanvasItem* item, GdkEvent* event)
 }
 
 void
 }
 
 void
-Editor::start_fade_out_grab (GtkCanvasItem* item, GdkEvent* event)
+Editor::start_fade_out_grab (GnomeCanvasItem* item, GdkEvent* event)
 {
        drag_info.item = item;
        drag_info.motion_callback = &Editor::fade_out_drag_motion_callback;
 {
        drag_info.item = item;
        drag_info.motion_callback = &Editor::fade_out_drag_motion_callback;
@@ -1785,7 +1785,7 @@ Editor::start_fade_out_grab (GtkCanvasItem* item, GdkEvent* event)
 }
 
 void
 }
 
 void
-Editor::fade_out_drag_motion_callback (GtkCanvasItem* item, GdkEvent* event)
+Editor::fade_out_drag_motion_callback (GnomeCanvasItem* item, GdkEvent* event)
 {
        AudioRegionView* arv = static_cast<AudioRegionView*>(drag_info.data);
        jack_nframes_t pos;
 {
        AudioRegionView* arv = static_cast<AudioRegionView*>(drag_info.data);
        jack_nframes_t pos;
@@ -1820,7 +1820,7 @@ Editor::fade_out_drag_motion_callback (GtkCanvasItem* item, GdkEvent* event)
 }
 
 void
 }
 
 void
-Editor::fade_out_drag_finished_callback (GtkCanvasItem* item, GdkEvent* event)
+Editor::fade_out_drag_finished_callback (GnomeCanvasItem* item, GdkEvent* event)
 {
        if (drag_info.first_move) return;
 
 {
        if (drag_info.first_move) return;
 
@@ -1859,7 +1859,7 @@ Editor::fade_out_drag_finished_callback (GtkCanvasItem* item, GdkEvent* event)
 }
 
 void
 }
 
 void
-Editor::start_cursor_grab (GtkCanvasItem* item, GdkEvent* event)
+Editor::start_cursor_grab (GnomeCanvasItem* item, GdkEvent* event)
 {
        drag_info.item = item;
        drag_info.motion_callback = &Editor::cursor_drag_motion_callback;
 {
        drag_info.item = item;
        drag_info.motion_callback = &Editor::cursor_drag_motion_callback;
@@ -1886,7 +1886,7 @@ Editor::start_cursor_grab (GtkCanvasItem* item, GdkEvent* event)
 }
 
 void
 }
 
 void
-Editor::cursor_drag_motion_callback (GtkCanvasItem* item, GdkEvent* event)
+Editor::cursor_drag_motion_callback (GnomeCanvasItem* item, GdkEvent* event)
 {
        Cursor* cursor = (Cursor *) drag_info.data;
        jack_nframes_t adjusted_frame;
 {
        Cursor* cursor = (Cursor *) drag_info.data;
        jack_nframes_t adjusted_frame;
@@ -1919,7 +1919,7 @@ Editor::cursor_drag_motion_callback (GtkCanvasItem* item, GdkEvent* event)
 }
 
 void
 }
 
 void
-Editor::cursor_drag_finished_callback (GtkCanvasItem* item, GdkEvent* event)
+Editor::cursor_drag_finished_callback (GnomeCanvasItem* item, GdkEvent* event)
 {
        if (drag_info.first_move) return;
        
 {
        if (drag_info.first_move) return;
        
@@ -1944,15 +1944,15 @@ Editor::update_marker_drag_item (Location *location)
        if (location->is_mark()) {
                marker_drag_line_points->coords[0] = x1;
                marker_drag_line_points->coords[2] = x1;
        if (location->is_mark()) {
                marker_drag_line_points->coords[0] = x1;
                marker_drag_line_points->coords[2] = x1;
-               gtk_canvas_item_set (marker_drag_line, "points", marker_drag_line_points, NULL);
+               gnome_canvas_item_set (marker_drag_line, "points", marker_drag_line_points, NULL);
        }
        else {
        }
        else {
-               gtk_canvas_item_set (range_marker_drag_rect, "x1", x1, "x2", x2, NULL);
+               gnome_canvas_item_set (range_marker_drag_rect, "x1", x1, "x2", x2, NULL);
        }
 }
 
 void
        }
 }
 
 void
-Editor::start_marker_grab (GtkCanvasItem* item, GdkEvent* event)
+Editor::start_marker_grab (GnomeCanvasItem* item, GdkEvent* event)
 {
        Marker* marker;
 
 {
        Marker* marker;
 
@@ -1978,12 +1978,12 @@ Editor::start_marker_grab (GtkCanvasItem* item, GdkEvent* event)
        update_marker_drag_item (location);
 
        if (location->is_mark()) {
        update_marker_drag_item (location);
 
        if (location->is_mark()) {
-               gtk_canvas_item_show (marker_drag_line);
-               gtk_canvas_item_raise_to_top (marker_drag_line);
+               gnome_canvas_item_show (marker_drag_line);
+               gnome_canvas_item_raise_to_top (marker_drag_line);
        }
        else {
        }
        else {
-               gtk_canvas_item_show (range_marker_drag_rect);
-               gtk_canvas_item_raise_to_top (range_marker_drag_rect);
+               gnome_canvas_item_show (range_marker_drag_rect);
+               gnome_canvas_item_raise_to_top (range_marker_drag_rect);
        }
        
        if (is_start) show_verbose_time_cursor (location->start(), 10);
        }
        
        if (is_start) show_verbose_time_cursor (location->start(), 10);
@@ -1991,7 +1991,7 @@ Editor::start_marker_grab (GtkCanvasItem* item, GdkEvent* event)
 }
 
 void
 }
 
 void
-Editor::marker_drag_motion_callback (GtkCanvasItem* item, GdkEvent* event)
+Editor::marker_drag_motion_callback (GnomeCanvasItem* item, GdkEvent* event)
 {
        jack_nframes_t f_delta; 
        Marker* marker = (Marker *) drag_info.data;
 {
        jack_nframes_t f_delta; 
        Marker* marker = (Marker *) drag_info.data;
@@ -2070,7 +2070,7 @@ Editor::marker_drag_motion_callback (GtkCanvasItem* item, GdkEvent* event)
 }
 
 void
 }
 
 void
-Editor::marker_drag_finished_callback (GtkCanvasItem* item, GdkEvent* event)
+Editor::marker_drag_finished_callback (GnomeCanvasItem* item, GdkEvent* event)
 {
        if (drag_info.first_move) {
                marker_drag_motion_callback (item, event);
 {
        if (drag_info.first_move) {
                marker_drag_motion_callback (item, event);
@@ -2084,12 +2084,12 @@ Editor::marker_drag_finished_callback (GtkCanvasItem* item, GdkEvent* event)
                location->set (drag_info.copied_location->start(), drag_info.copied_location->end());
        }
        
                location->set (drag_info.copied_location->start(), drag_info.copied_location->end());
        }
        
-       gtk_canvas_item_hide (marker_drag_line);
-       gtk_canvas_item_hide (range_marker_drag_rect);
+       gnome_canvas_item_hide (marker_drag_line);
+       gnome_canvas_item_hide (range_marker_drag_rect);
 }
 
 void
 }
 
 void
-Editor::start_meter_marker_grab (GtkCanvasItem* item, GdkEvent* event)
+Editor::start_meter_marker_grab (GnomeCanvasItem* item, GdkEvent* event)
 {
        Marker* marker;
        MeterMarker* meter_marker;
 {
        Marker* marker;
        MeterMarker* meter_marker;
@@ -2120,7 +2120,7 @@ Editor::start_meter_marker_grab (GtkCanvasItem* item, GdkEvent* event)
 }
 
 void
 }
 
 void
-Editor::meter_marker_drag_motion_callback (GtkCanvasItem* item, GdkEvent* event)
+Editor::meter_marker_drag_motion_callback (GnomeCanvasItem* item, GdkEvent* event)
 {
        MeterMarker* marker = (MeterMarker *) drag_info.data;
        jack_nframes_t adjusted_frame;
 {
        MeterMarker* marker = (MeterMarker *) drag_info.data;
        jack_nframes_t adjusted_frame;
@@ -2148,7 +2148,7 @@ Editor::meter_marker_drag_motion_callback (GtkCanvasItem* item, GdkEvent* event)
 }
 
 void
 }
 
 void
-Editor::meter_marker_drag_finished_callback (GtkCanvasItem* item, GdkEvent* event)
+Editor::meter_marker_drag_finished_callback (GnomeCanvasItem* item, GdkEvent* event)
 {
        if (drag_info.first_move) return;
 
 {
        if (drag_info.first_move) return;
 
@@ -2168,7 +2168,7 @@ Editor::meter_marker_drag_finished_callback (GtkCanvasItem* item, GdkEvent* even
 }
 
 void
 }
 
 void
-Editor::start_tempo_marker_grab (GtkCanvasItem* item, GdkEvent* event)
+Editor::start_tempo_marker_grab (GnomeCanvasItem* item, GdkEvent* event)
 {
        Marker* marker;
        TempoMarker* tempo_marker;
 {
        Marker* marker;
        TempoMarker* tempo_marker;
@@ -2201,7 +2201,7 @@ Editor::start_tempo_marker_grab (GtkCanvasItem* item, GdkEvent* event)
 }
 
 void
 }
 
 void
-Editor::tempo_marker_drag_motion_callback (GtkCanvasItem* item, GdkEvent* event)
+Editor::tempo_marker_drag_motion_callback (GnomeCanvasItem* item, GdkEvent* event)
 {
        TempoMarker* marker = (TempoMarker *) drag_info.data;
        jack_nframes_t adjusted_frame;
 {
        TempoMarker* marker = (TempoMarker *) drag_info.data;
        jack_nframes_t adjusted_frame;
@@ -2230,7 +2230,7 @@ Editor::tempo_marker_drag_motion_callback (GtkCanvasItem* item, GdkEvent* event)
 }
 
 void
 }
 
 void
-Editor::tempo_marker_drag_finished_callback (GtkCanvasItem* item, GdkEvent* event)
+Editor::tempo_marker_drag_finished_callback (GnomeCanvasItem* item, GdkEvent* event)
 {
        if (drag_info.first_move) return;
        
 {
        if (drag_info.first_move) return;
        
@@ -2250,7 +2250,7 @@ Editor::tempo_marker_drag_finished_callback (GtkCanvasItem* item, GdkEvent* even
 }
 
 void
 }
 
 void
-Editor::remove_gain_control_point (GtkCanvasItem*item, GdkEvent* event)
+Editor::remove_gain_control_point (GnomeCanvasItem*item, GdkEvent* event)
 {
        ControlPoint* control_point;
 
 {
        ControlPoint* control_point;
 
@@ -2269,7 +2269,7 @@ Editor::remove_gain_control_point (GtkCanvasItem*item, GdkEvent* event)
 }
 
 void
 }
 
 void
-Editor::remove_control_point (GtkCanvasItem*item, GdkEvent* event)
+Editor::remove_control_point (GnomeCanvasItem*item, GdkEvent* event)
 {
        ControlPoint* control_point;
 
 {
        ControlPoint* control_point;
 
@@ -2282,7 +2282,7 @@ Editor::remove_control_point (GtkCanvasItem*item, GdkEvent* event)
 }
 
 void
 }
 
 void
-Editor::start_control_point_grab (GtkCanvasItem* item, GdkEvent* event)
+Editor::start_control_point_grab (GnomeCanvasItem* item, GdkEvent* event)
 {
        ControlPoint* control_point;
        
 {
        ControlPoint* control_point;
        
@@ -2308,7 +2308,7 @@ Editor::start_control_point_grab (GtkCanvasItem* item, GdkEvent* event)
 }
 
 void
 }
 
 void
-Editor::control_point_drag_motion_callback (GtkCanvasItem* item, GdkEvent* event)
+Editor::control_point_drag_motion_callback (GnomeCanvasItem* item, GdkEvent* event)
 {
        ControlPoint* cp = reinterpret_cast<ControlPoint *> (drag_info.data);
 
 {
        ControlPoint* cp = reinterpret_cast<ControlPoint *> (drag_info.data);
 
@@ -2331,7 +2331,7 @@ Editor::control_point_drag_motion_callback (GtkCanvasItem* item, GdkEvent* event
        
        } 
 
        
        } 
 
-       gtk_canvas_item_w2i (cp->line.parent_group(), &cx, &cy);
+       gnome_canvas_item_w2i (cp->line.parent_group(), &cx, &cy);
 
        cx = max (0.0, cx);
        cy = max (0.0, cy);
 
        cx = max (0.0, cx);
        cy = max (0.0, cy);
@@ -2360,7 +2360,7 @@ Editor::control_point_drag_motion_callback (GtkCanvasItem* item, GdkEvent* event
 }
 
 void
 }
 
 void
-Editor::control_point_drag_finished_callback (GtkCanvasItem* item, GdkEvent* event)
+Editor::control_point_drag_finished_callback (GnomeCanvasItem* item, GdkEvent* event)
 {
        ControlPoint* cp = reinterpret_cast<ControlPoint *> (drag_info.data);
        control_point_drag_motion_callback (item, event);
 {
        ControlPoint* cp = reinterpret_cast<ControlPoint *> (drag_info.data);
        control_point_drag_motion_callback (item, event);
@@ -2368,7 +2368,7 @@ Editor::control_point_drag_finished_callback (GtkCanvasItem* item, GdkEvent* eve
 }
 
 void
 }
 
 void
-Editor::start_line_grab_from_regionview (GtkCanvasItem* item, GdkEvent* event)
+Editor::start_line_grab_from_regionview (GnomeCanvasItem* item, GdkEvent* event)
 {
        switch (mouse_mode) {
        case MouseGain:
 {
        switch (mouse_mode) {
        case MouseGain:
@@ -2380,7 +2380,7 @@ Editor::start_line_grab_from_regionview (GtkCanvasItem* item, GdkEvent* event)
 }
 
 void
 }
 
 void
-Editor::start_line_grab_from_line (GtkCanvasItem* item, GdkEvent* event)
+Editor::start_line_grab_from_line (GnomeCanvasItem* item, GdkEvent* event)
 {
        AutomationLine* al;
        
 {
        AutomationLine* al;
        
@@ -2405,7 +2405,7 @@ Editor::start_line_grab (AutomationLine* line, GdkEvent* event)
 
        cx = event->button.x;
        cy = event->button.y;
 
        cx = event->button.x;
        cy = event->button.y;
-       gtk_canvas_item_w2i (line->parent_group(), &cx, &cy);
+       gnome_canvas_item_w2i (line->parent_group(), &cx, &cy);
        frame_within_region = (jack_nframes_t) floor (cx * frames_per_unit);
 
        if (!line->control_points_adjacent (frame_within_region, current_line_drag_info.before, 
        frame_within_region = (jack_nframes_t) floor (cx * frames_per_unit);
 
        if (!line->control_points_adjacent (frame_within_region, current_line_drag_info.before, 
@@ -2431,13 +2431,13 @@ Editor::start_line_grab (AutomationLine* line, GdkEvent* event)
 }
 
 void
 }
 
 void
-Editor::line_drag_motion_callback (GtkCanvasItem* item, GdkEvent* event)
+Editor::line_drag_motion_callback (GnomeCanvasItem* item, GdkEvent* event)
 {
        AutomationLine* line = reinterpret_cast<AutomationLine *> (drag_info.data);
        double cx = drag_info.current_pointer_x;
        double cy = drag_info.current_pointer_y;
 
 {
        AutomationLine* line = reinterpret_cast<AutomationLine *> (drag_info.data);
        double cx = drag_info.current_pointer_x;
        double cy = drag_info.current_pointer_y;
 
-       gtk_canvas_item_w2i (line->parent_group(), &cx, &cy);
+       gnome_canvas_item_w2i (line->parent_group(), &cx, &cy);
        
        double fraction;
        fraction = 1.0 - (cy / line->height());
        
        double fraction;
        fraction = 1.0 - (cy / line->height());
@@ -2456,7 +2456,7 @@ Editor::line_drag_motion_callback (GtkCanvasItem* item, GdkEvent* event)
 }
 
 void
 }
 
 void
-Editor::line_drag_finished_callback (GtkCanvasItem* item, GdkEvent* event)
+Editor::line_drag_finished_callback (GnomeCanvasItem* item, GdkEvent* event)
 {
        AutomationLine* line = reinterpret_cast<AutomationLine *> (drag_info.data);
        line_drag_motion_callback (item, event);
 {
        AutomationLine* line = reinterpret_cast<AutomationLine *> (drag_info.data);
        line_drag_motion_callback (item, event);
@@ -2464,7 +2464,7 @@ Editor::line_drag_finished_callback (GtkCanvasItem* item, GdkEvent* event)
 }
 
 void
 }
 
 void
-Editor::start_region_grab (GtkCanvasItem* item, GdkEvent* event)
+Editor::start_region_grab (GnomeCanvasItem* item, GdkEvent* event)
 {
        if (selection->audio_regions.empty() || clicked_regionview == 0) {
                return;
 {
        if (selection->audio_regions.empty() || clicked_regionview == 0) {
                return;
@@ -2498,7 +2498,7 @@ Editor::start_region_grab (GtkCanvasItem* item, GdkEvent* event)
 }
 
 void
 }
 
 void
-Editor::start_region_copy_grab (GtkCanvasItem* item, GdkEvent* event)
+Editor::start_region_copy_grab (GnomeCanvasItem* item, GdkEvent* event)
 {
        if (selection->audio_regions.empty() || clicked_regionview == 0) {
                return;
 {
        if (selection->audio_regions.empty() || clicked_regionview == 0) {
                return;
@@ -2580,7 +2580,7 @@ Editor::start_region_copy_grab (GtkCanvasItem* item, GdkEvent* event)
 }
 
 void
 }
 
 void
-Editor::start_region_brush_grab (GtkCanvasItem* item, GdkEvent* event)
+Editor::start_region_brush_grab (GnomeCanvasItem* item, GdkEvent* event)
 {
        if (selection->audio_regions.empty() || clicked_regionview == 0) {
                return;
 {
        if (selection->audio_regions.empty() || clicked_regionview == 0) {
                return;
@@ -2613,7 +2613,7 @@ Editor::start_region_brush_grab (GtkCanvasItem* item, GdkEvent* event)
 }
 
 void
 }
 
 void
-Editor::region_drag_motion_callback (GtkCanvasItem* item, GdkEvent* event)
+Editor::region_drag_motion_callback (GnomeCanvasItem* item, GdkEvent* event)
 {
        double x_delta;
        double y_delta = 0;
 {
        double x_delta;
        double y_delta = 0;
@@ -2719,8 +2719,8 @@ Editor::region_drag_motion_callback (GtkCanvasItem* item, GdkEvent* event)
                        double ix1, ix2, iy1, iy2;
                        int32_t n = 0;
 
                        double ix1, ix2, iy1, iy2;
                        int32_t n = 0;
 
-                       gtk_canvas_item_get_bounds (rv2->get_canvas_frame(), &ix1, &iy1, &ix2, &iy2);
-                       gtk_canvas_item_i2w (rv2->get_canvas_group(), &ix1, &iy1);
+                       gnome_canvas_item_get_bounds (rv2->get_canvas_frame(), &ix1, &iy1, &ix2, &iy2);
+                       gnome_canvas_item_i2w (rv2->get_canvas_group(), &ix1, &iy1);
                        TimeAxisView* tvp2 = trackview_by_y_position (iy1);
                        AudioTimeAxisView* atv2 = dynamic_cast<AudioTimeAxisView*>(tvp2);
 
                        TimeAxisView* tvp2 = trackview_by_y_position (iy1);
                        AudioTimeAxisView* atv2 = dynamic_cast<AudioTimeAxisView*>(tvp2);
 
@@ -2889,8 +2889,8 @@ Editor::region_drag_motion_callback (GtkCanvasItem* item, GdkEvent* event)
                        */
                        
                        double ix1, ix2, iy1, iy2;
                        */
                        
                        double ix1, ix2, iy1, iy2;
-                       gtk_canvas_item_get_bounds (rv2->get_canvas_frame(), &ix1, &iy1, &ix2, &iy2);
-                       gtk_canvas_item_i2w (rv2->get_canvas_group(), &ix1, &iy1);
+                       gnome_canvas_item_get_bounds (rv2->get_canvas_frame(), &ix1, &iy1, &ix2, &iy2);
+                       gnome_canvas_item_i2w (rv2->get_canvas_group(), &ix1, &iy1);
 
                        if (ix1 <= 1) {
                                x_delta = 0;
 
                        if (ix1 <= 1) {
                                x_delta = 0;
@@ -2917,8 +2917,8 @@ Editor::region_drag_motion_callback (GtkCanvasItem* item, GdkEvent* event)
                   the parent.
                */
 
                   the parent.
                */
 
-               gtk_canvas_item_get_bounds (rv->get_canvas_frame(), &ix1, &iy1, &ix2, &iy2);
-               gtk_canvas_item_i2w (rv->get_canvas_group(), &ix1, &iy1);
+               gnome_canvas_item_get_bounds (rv->get_canvas_frame(), &ix1, &iy1, &ix2, &iy2);
+               gnome_canvas_item_i2w (rv->get_canvas_group(), &ix1, &iy1);
                TimeAxisView* tvp2 = trackview_by_y_position (iy1);
                AudioTimeAxisView* canvas_atv = dynamic_cast<AudioTimeAxisView*>(tvp2);
                AudioTimeAxisView* temp_atv;
                TimeAxisView* tvp2 = trackview_by_y_position (iy1);
                AudioTimeAxisView* canvas_atv = dynamic_cast<AudioTimeAxisView*>(tvp2);
                AudioTimeAxisView* temp_atv;
@@ -3005,9 +3005,9 @@ Editor::region_drag_motion_callback (GtkCanvasItem* item, GdkEvent* event)
                           on the top, since its parent is the whole canvas.
                        */
 
                           on the top, since its parent is the whole canvas.
                        */
 
-                       gtk_canvas_item_raise_to_top (rv->get_canvas_group());
-                       gtk_canvas_item_raise_to_top (rv->get_time_axis_view().canvas_display);
-                       gtk_canvas_item_raise_to_top (cursor_group);
+                       gnome_canvas_item_raise_to_top (rv->get_canvas_group());
+                       gnome_canvas_item_raise_to_top (rv->get_time_axis_view().canvas_display);
+                       gnome_canvas_item_raise_to_top (cursor_group);
 
                        /* freeze the playlists from notifying till
                           the motion is done.
 
                        /* freeze the playlists from notifying till
                           the motion is done.
@@ -3036,7 +3036,7 @@ Editor::region_drag_motion_callback (GtkCanvasItem* item, GdkEvent* event)
        }
                
        if (drag_info.first_move) {
        }
                
        if (drag_info.first_move) {
-               gtk_canvas_item_raise_to_top (cursor_group);
+               gnome_canvas_item_raise_to_top (cursor_group);
        }
                
        drag_info.first_move = false;
        }
                
        drag_info.first_move = false;
@@ -3048,7 +3048,7 @@ Editor::region_drag_motion_callback (GtkCanvasItem* item, GdkEvent* event)
 } 
 
 void
 } 
 
 void
-Editor::region_drag_finished_callback (GtkCanvasItem* item, GdkEvent* event)
+Editor::region_drag_finished_callback (GnomeCanvasItem* item, GdkEvent* event)
 {
        jack_nframes_t where;
        AudioRegionView* rv = reinterpret_cast<AudioRegionView *> (drag_info.data);
 {
        jack_nframes_t where;
        AudioRegionView* rv = reinterpret_cast<AudioRegionView *> (drag_info.data);
@@ -3129,8 +3129,8 @@ Editor::region_drag_finished_callback (GtkCanvasItem* item, GdkEvent* event)
                                
                        double ix1, ix2, iy1, iy2;
            
                                
                        double ix1, ix2, iy1, iy2;
            
-                       gtk_canvas_item_get_bounds ((*i)->get_canvas_frame(), &ix1, &iy1, &ix2, &iy2);
-                       gtk_canvas_item_i2w ((*i)->get_canvas_group(), &ix1, &iy1);
+                       gnome_canvas_item_get_bounds ((*i)->get_canvas_frame(), &ix1, &iy1, &ix2, &iy2);
+                       gnome_canvas_item_i2w ((*i)->get_canvas_group(), &ix1, &iy1);
                        TimeAxisView* tvp2 = trackview_by_y_position (iy1);
                        AudioTimeAxisView* atv2 = dynamic_cast<AudioTimeAxisView*>(tvp2);
            
                        TimeAxisView* tvp2 = trackview_by_y_position (iy1);
                        AudioTimeAxisView* atv2 = dynamic_cast<AudioTimeAxisView*>(tvp2);
            
@@ -3164,8 +3164,8 @@ Editor::region_drag_finished_callback (GtkCanvasItem* item, GdkEvent* event)
                                
                        double ix1, ix2, iy1, iy2;
            
                                
                        double ix1, ix2, iy1, iy2;
            
-                       gtk_canvas_item_get_bounds ((*i)->get_canvas_frame(), &ix1, &iy1, &ix2, &iy2);
-                       gtk_canvas_item_i2w ((*i)->get_canvas_group(), &ix1, &iy1);
+                       gnome_canvas_item_get_bounds ((*i)->get_canvas_frame(), &ix1, &iy1, &ix2, &iy2);
+                       gnome_canvas_item_i2w ((*i)->get_canvas_group(), &ix1, &iy1);
                        TimeAxisView* tvp2 = trackview_by_y_position (iy1);
                        AudioTimeAxisView* atv2 = dynamic_cast<AudioTimeAxisView*>(tvp2);
            
                        TimeAxisView* tvp2 = trackview_by_y_position (iy1);
                        AudioTimeAxisView* atv2 = dynamic_cast<AudioTimeAxisView*>(tvp2);
            
@@ -3212,8 +3212,8 @@ Editor::region_drag_finished_callback (GtkCanvasItem* item, GdkEvent* event)
                                
                                double ix1, ix2, iy1, iy2;
                                
                                
                                double ix1, ix2, iy1, iy2;
                                
-                               gtk_canvas_item_get_bounds (rv->get_canvas_frame(), &ix1, &iy1, &ix2, &iy2);
-                               gtk_canvas_item_i2w (rv->get_canvas_group(), &ix1, &iy1);
+                               gnome_canvas_item_get_bounds (rv->get_canvas_frame(), &ix1, &iy1, &ix2, &iy2);
+                               gnome_canvas_item_i2w (rv->get_canvas_group(), &ix1, &iy1);
                                where = (jack_nframes_t) (unit_to_frame (ix1) * ownspeed);
                                
                        } else {
                                where = (jack_nframes_t) (unit_to_frame (ix1) * ownspeed);
                                
                        } else {
@@ -3389,7 +3389,7 @@ Editor::collect_new_region_view (AudioRegionView* rv)
 }
 
 void
 }
 
 void
-Editor::start_selection_grab (GtkCanvasItem* item, GdkEvent* event)
+Editor::start_selection_grab (GnomeCanvasItem* item, GdkEvent* event)
 {
        if (clicked_regionview == 0) {
                return;
 {
        if (clicked_regionview == 0) {
                return;
@@ -3468,7 +3468,7 @@ Editor::cancel_selection ()
 }      
 
 void
 }      
 
 void
-Editor::start_selection_op (GtkCanvasItem* item, GdkEvent* event, SelectionOp op)
+Editor::start_selection_op (GnomeCanvasItem* item, GdkEvent* event, SelectionOp op)
 {
        jack_nframes_t start = 0;
        jack_nframes_t end = 0;
 {
        jack_nframes_t start = 0;
        jack_nframes_t end = 0;
@@ -3523,7 +3523,7 @@ Editor::start_selection_op (GtkCanvasItem* item, GdkEvent* event, SelectionOp op
 }
 
 void
 }
 
 void
-Editor::drag_selection (GtkCanvasItem* item, GdkEvent* event)
+Editor::drag_selection (GnomeCanvasItem* item, GdkEvent* event)
 {
        jack_nframes_t start = 0;
        jack_nframes_t end = 0;
 {
        jack_nframes_t start = 0;
        jack_nframes_t end = 0;
@@ -3653,7 +3653,7 @@ Editor::drag_selection (GtkCanvasItem* item, GdkEvent* event)
 }
 
 void
 }
 
 void
-Editor::end_selection_op (GtkCanvasItem* item, GdkEvent* event)
+Editor::end_selection_op (GnomeCanvasItem* item, GdkEvent* event)
 {
        if (!drag_info.first_move) {
                drag_selection (item, event);
 {
        if (!drag_info.first_move) {
                drag_selection (item, event);
@@ -3678,7 +3678,7 @@ Editor::end_selection_op (GtkCanvasItem* item, GdkEvent* event)
 }
 
 void
 }
 
 void
-Editor::start_trim (GtkCanvasItem* item, GdkEvent* event)
+Editor::start_trim (GnomeCanvasItem* item, GdkEvent* event)
 {
        double speed = 1.0;
        TimeAxisView* tvp = clicked_trackview;
 {
        double speed = 1.0;
        TimeAxisView* tvp = clicked_trackview;
@@ -3728,7 +3728,7 @@ Editor::start_trim (GtkCanvasItem* item, GdkEvent* event)
 }
 
 void
 }
 
 void
-Editor::trim_motion_callback (GtkCanvasItem* item, GdkEvent* event)
+Editor::trim_motion_callback (GnomeCanvasItem* item, GdkEvent* event)
 {
        AudioRegionView* rv = clicked_regionview;
        jack_nframes_t frame_delta = 0;
 {
        AudioRegionView* rv = clicked_regionview;
        jack_nframes_t frame_delta = 0;
@@ -3954,7 +3954,7 @@ Editor::single_end_trim (AudioRegionView& rv, jack_nframes_t frame_delta, bool l
 }
        
 void
 }
        
 void
-Editor::trim_finished_callback (GtkCanvasItem* item, GdkEvent* event)
+Editor::trim_finished_callback (GnomeCanvasItem* item, GdkEvent* event)
 {
        if (!drag_info.first_move) {
                trim_motion_callback (item, event);
 {
        if (!drag_info.first_move) {
                trim_motion_callback (item, event);
@@ -4066,7 +4066,7 @@ Editor::thaw_region_after_trim (AudioRegionView& rv)
 }
 
 void
 }
 
 void
-Editor::hide_marker (GtkCanvasItem* item, GdkEvent* event)
+Editor::hide_marker (GnomeCanvasItem* item, GdkEvent* event)
 {
        Marker* marker;
        bool is_start;
 {
        Marker* marker;
        bool is_start;
@@ -4082,7 +4082,7 @@ Editor::hide_marker (GtkCanvasItem* item, GdkEvent* event)
 
 
 void
 
 
 void
-Editor::start_range_markerbar_op (GtkCanvasItem* item, GdkEvent* event, RangeMarkerOp op)
+Editor::start_range_markerbar_op (GnomeCanvasItem* item, GdkEvent* event, RangeMarkerOp op)
 {
 
        if (session == 0) {
 {
 
        if (session == 0) {
@@ -4117,12 +4117,12 @@ Editor::start_range_markerbar_op (GtkCanvasItem* item, GdkEvent* event, RangeMar
 }
 
 void
 }
 
 void
-Editor::drag_range_markerbar_op (GtkCanvasItem* item, GdkEvent* event)
+Editor::drag_range_markerbar_op (GnomeCanvasItem* item, GdkEvent* event)
 {
        jack_nframes_t start = 0;
        jack_nframes_t end = 0;
        
 {
        jack_nframes_t start = 0;
        jack_nframes_t end = 0;
        
-       GtkCanvasItem * crect = (range_marker_op == CreateRangeMarker) ? range_bar_drag_rect: transport_bar_drag_rect;
+       GnomeCanvasItem * crect = (range_marker_op == CreateRangeMarker) ? range_bar_drag_rect: transport_bar_drag_rect;
        
        if (!Keyboard::modifier_state_contains (event->button.state, Keyboard::snap_modifier())) {
                snap_to (drag_info.current_pointer_frame);
        
        if (!Keyboard::modifier_state_contains (event->button.state, Keyboard::snap_modifier())) {
                snap_to (drag_info.current_pointer_frame);
@@ -4157,11 +4157,11 @@ Editor::drag_range_markerbar_op (GtkCanvasItem* item, GdkEvent* event)
                        
                        temp_location->set (start, end);
                        
                        
                        temp_location->set (start, end);
                        
-                       gtk_canvas_item_show (crect);
+                       gnome_canvas_item_show (crect);
 
                        update_marker_drag_item (temp_location);
 
                        update_marker_drag_item (temp_location);
-                       gtk_canvas_item_show (range_marker_drag_rect);
-                       gtk_canvas_item_raise_to_top (range_marker_drag_rect);
+                       gnome_canvas_item_show (range_marker_drag_rect);
+                       gnome_canvas_item_raise_to_top (range_marker_drag_rect);
                        
                } 
                break;          
                        
                } 
                break;          
@@ -4177,7 +4177,7 @@ Editor::drag_range_markerbar_op (GtkCanvasItem* item, GdkEvent* event)
 
                double x1 = frame_to_pixel (start);
                double x2 = frame_to_pixel (end);
 
                double x1 = frame_to_pixel (start);
                double x2 = frame_to_pixel (end);
-               gtk_canvas_item_set (crect, "x1", x1, "x2", x2, NULL);
+               gnome_canvas_item_set (crect, "x1", x1, "x2", x2, NULL);
 
                update_marker_drag_item (temp_location);
        }
 
                update_marker_drag_item (temp_location);
        }
@@ -4190,7 +4190,7 @@ Editor::drag_range_markerbar_op (GtkCanvasItem* item, GdkEvent* event)
 }
 
 void
 }
 
 void
-Editor::end_range_markerbar_op (GtkCanvasItem* item, GdkEvent* event)
+Editor::end_range_markerbar_op (GnomeCanvasItem* item, GdkEvent* event)
 {
        Location * newloc = 0;
        
 {
        Location * newloc = 0;
        
@@ -4207,8 +4207,8 @@ Editor::end_range_markerbar_op (GtkCanvasItem* item, GdkEvent* event)
                        session->add_redo_no_execute (session->locations()->get_memento());
                        commit_reversible_command ();
                        
                        session->add_redo_no_execute (session->locations()->get_memento());
                        commit_reversible_command ();
                        
-                       gtk_canvas_item_hide (range_bar_drag_rect);
-                       gtk_canvas_item_hide (range_marker_drag_rect);
+                       gnome_canvas_item_hide (range_bar_drag_rect);
+                       gnome_canvas_item_hide (range_marker_drag_rect);
                        break;
 
                case CreateTransportMarker:
                        break;
 
                case CreateTransportMarker:
@@ -4233,7 +4233,7 @@ Editor::end_range_markerbar_op (GtkCanvasItem* item, GdkEvent* event)
 
 
 void
 
 
 void
-Editor::start_mouse_zoom (GtkCanvasItem* item, GdkEvent* event)
+Editor::start_mouse_zoom (GnomeCanvasItem* item, GdkEvent* event)
 {
        drag_info.item = item;
        drag_info.motion_callback = &Editor::drag_mouse_zoom;
 {
        drag_info.item = item;
        drag_info.motion_callback = &Editor::drag_mouse_zoom;
@@ -4245,7 +4245,7 @@ Editor::start_mouse_zoom (GtkCanvasItem* item, GdkEvent* event)
 }
 
 void
 }
 
 void
-Editor::drag_mouse_zoom (GtkCanvasItem* item, GdkEvent* event)
+Editor::drag_mouse_zoom (GnomeCanvasItem* item, GdkEvent* event)
 {
        jack_nframes_t start;
        jack_nframes_t end;
 {
        jack_nframes_t start;
        jack_nframes_t end;
@@ -4272,8 +4272,8 @@ Editor::drag_mouse_zoom (GtkCanvasItem* item, GdkEvent* event)
        if (start != end) {
 
                if (drag_info.first_move) {
        if (start != end) {
 
                if (drag_info.first_move) {
-                       gtk_canvas_item_show (zoom_rect);
-                       gtk_canvas_item_raise_to_top (zoom_rect);
+                       gnome_canvas_item_show (zoom_rect);
+                       gnome_canvas_item_raise_to_top (zoom_rect);
                }
 
                reposition_zoom_rect(start, end);
                }
 
                reposition_zoom_rect(start, end);
@@ -4286,7 +4286,7 @@ Editor::drag_mouse_zoom (GtkCanvasItem* item, GdkEvent* event)
 }
 
 void
 }
 
 void
-Editor::end_mouse_zoom (GtkCanvasItem* item, GdkEvent* event)
+Editor::end_mouse_zoom (GnomeCanvasItem* item, GdkEvent* event)
 {
        if (!drag_info.first_move) {
                drag_mouse_zoom (item, event);
 {
        if (!drag_info.first_move) {
                drag_mouse_zoom (item, event);
@@ -4304,7 +4304,7 @@ Editor::end_mouse_zoom (GtkCanvasItem* item, GdkEvent* event)
                */
        }
 
                */
        }
 
-       gtk_canvas_item_hide (zoom_rect);
+       gnome_canvas_item_hide (zoom_rect);
 }
 
 void
 }
 
 void
@@ -4323,7 +4323,7 @@ Editor::reposition_zoom_rect (jack_nframes_t start, jack_nframes_t end)
 }
 
 void
 }
 
 void
-Editor::start_rubberband_select (GtkCanvasItem* item, GdkEvent* event)
+Editor::start_rubberband_select (GnomeCanvasItem* item, GdkEvent* event)
 {
        drag_info.item = item;
        drag_info.motion_callback = &Editor::drag_rubberband_select;
 {
        drag_info.item = item;
        drag_info.motion_callback = &Editor::drag_rubberband_select;
@@ -4335,7 +4335,7 @@ Editor::start_rubberband_select (GtkCanvasItem* item, GdkEvent* event)
 }
 
 void
 }
 
 void
-Editor::drag_rubberband_select (GtkCanvasItem* item, GdkEvent* event)
+Editor::drag_rubberband_select (GnomeCanvasItem* item, GdkEvent* event)
 {
        jack_nframes_t start;
        jack_nframes_t end;
 {
        jack_nframes_t start;
        jack_nframes_t end;
@@ -4388,8 +4388,8 @@ Editor::drag_rubberband_select (GtkCanvasItem* item, GdkEvent* event)
                                "y2", y2,
                                NULL);
 
                                "y2", y2,
                                NULL);
 
-               gtk_canvas_item_show (rubberband_rect);
-               gtk_canvas_item_raise_to_top (rubberband_rect);
+               gnome_canvas_item_show (rubberband_rect);
+               gnome_canvas_item_raise_to_top (rubberband_rect);
                
                drag_info.last_pointer_frame = drag_info.current_pointer_frame;
                drag_info.first_move = false;
                
                drag_info.last_pointer_frame = drag_info.current_pointer_frame;
                drag_info.first_move = false;
@@ -4399,7 +4399,7 @@ Editor::drag_rubberband_select (GtkCanvasItem* item, GdkEvent* event)
 }
 
 void
 }
 
 void
-Editor::end_rubberband_select (GtkCanvasItem* item, GdkEvent* event)
+Editor::end_rubberband_select (GnomeCanvasItem* item, GdkEvent* event)
 {
        if (!drag_info.first_move) {
 
 {
        if (!drag_info.first_move) {
 
@@ -4437,12 +4437,12 @@ Editor::end_rubberband_select (GtkCanvasItem* item, GdkEvent* event)
                selection->clear_lines ();
        }
 
                selection->clear_lines ();
        }
 
-       gtk_canvas_item_hide (rubberband_rect);
+       gnome_canvas_item_hide (rubberband_rect);
 }
 
 
 gint
 }
 
 
 gint
-Editor::mouse_rename_region (GtkCanvasItem* item, GdkEvent* event)
+Editor::mouse_rename_region (GnomeCanvasItem* item, GdkEvent* event)
 {
        using namespace Gtkmm2ext;
 
 {
        using namespace Gtkmm2ext;
 
@@ -4468,7 +4468,7 @@ Editor::mouse_rename_region (GtkCanvasItem* item, GdkEvent* event)
 }
 
 void
 }
 
 void
-Editor::start_time_fx (GtkCanvasItem* item, GdkEvent* event)
+Editor::start_time_fx (GnomeCanvasItem* item, GdkEvent* event)
 {
        drag_info.item = item;
        drag_info.motion_callback = &Editor::time_fx_motion;
 {
        drag_info.item = item;
        drag_info.motion_callback = &Editor::time_fx_motion;
@@ -4480,7 +4480,7 @@ Editor::start_time_fx (GtkCanvasItem* item, GdkEvent* event)
 }
 
 void
 }
 
 void
-Editor::time_fx_motion (GtkCanvasItem *item, GdkEvent* event)
+Editor::time_fx_motion (GnomeCanvasItem *item, GdkEvent* event)
 {
        AudioRegionView* rv = clicked_regionview;
 
 {
        AudioRegionView* rv = clicked_regionview;
 
@@ -4503,7 +4503,7 @@ Editor::time_fx_motion (GtkCanvasItem *item, GdkEvent* event)
 }
 
 void
 }
 
 void
-Editor::end_time_fx (GtkCanvasItem* item, GdkEvent* event)
+Editor::end_time_fx (GnomeCanvasItem* item, GdkEvent* event)
 {
        clicked_regionview->get_time_axis_view().hide_timestretch ();
 
 {
        clicked_regionview->get_time_axis_view().hide_timestretch ();
 
index 18d4a4a37b0297d21ba25dcb60ec8dd6b04898fd..409165e879752796d477e5478275083d89f6011b 100644 (file)
@@ -1472,7 +1472,7 @@ Editor::insert_region_list_drag (AudioRegion& region)
        
        track_canvas->get_pointer (x, y);
 
        
        track_canvas->get_pointer (x, y);
 
-       gtk_canvas_window_to_world (GTK_CANVAS(track_gtk_canvas), x, y, &wx, &wy);
+       gnome_canvas_window_to_world (GNOME_CANVAS(track_gnome_canvas), x, y, &wx, &wy);
        
        GdkEvent event;
        event.type = GDK_BUTTON_RELEASE;
        
        GdkEvent event;
        event.type = GDK_BUTTON_RELEASE;
@@ -3173,7 +3173,7 @@ Editor::mouse_paste ()
        double wx, wy;
        track_canvas->get_pointer (x, y);
 
        double wx, wy;
        track_canvas->get_pointer (x, y);
 
-       gtk_canvas_window_to_world (GTK_CANVAS(track_gtk_canvas), x, y, &wx, &wy);
+       gnome_canvas_window_to_world (GNOME_CANVAS(track_gnome_canvas), x, y, &wx, &wy);
        
        GdkEvent event;
        event.type = GDK_BUTTON_RELEASE;
        
        GdkEvent event;
        event.type = GDK_BUTTON_RELEASE;
index 49540fbe0f7cffc92c31f69c7f59309584ba25f7..0f5838066e101dc3541e0396b32f55462cce2a9c 100644 (file)
@@ -245,8 +245,8 @@ Editor::route_list_reordered ()
        edit_controls_scroller.queue_resize ();
        reset_scrolling_region ();
 
        edit_controls_scroller.queue_resize ();
        reset_scrolling_region ();
 
-       //gtk_canvas_item_raise_to_top (time_line_group);
-       gtk_canvas_item_raise_to_top (cursor_group);
+       //gnome_canvas_item_raise_to_top (time_line_group);
+       gnome_canvas_item_raise_to_top (cursor_group);
        
        return FALSE;
 }
        
        return FALSE;
 }
index a879490415db407b44fc7253845261c1b173a25b..c306ad4dc94c9e4f1303eb243ee18169e83880ec 100644 (file)
@@ -225,8 +225,8 @@ Editor::ruler_mouse_motion (GdkEventMotion* ev)
        time_canvas_event_box.get_window().get_pointer (x, y, state);
 
        
        time_canvas_event_box.get_window().get_pointer (x, y, state);
 
        
-       gtk_canvas_window_to_world (GTK_CANVAS(track_gtk_canvas), x, y, &wcx, &wcy);
-       gtk_canvas_w2c_d (GTK_CANVAS(track_gtk_canvas), wcx, wcy, &cx, &cy);
+       gnome_canvas_window_to_world (GNOME_CANVAS(track_gnome_canvas), x, y, &wcx, &wcy);
+       gnome_canvas_w2c_d (GNOME_CANVAS(track_gnome_canvas), wcx, wcy, &cx, &cy);
        
        jack_nframes_t where = leftmost_frame + pixel_to_frame (x);
 
        
        jack_nframes_t where = leftmost_frame + pixel_to_frame (x);
 
@@ -608,16 +608,16 @@ Editor::update_ruler_visibility ()
                gtk_object_getv (GTK_OBJECT(meter_group), 1, args) ;
                old_unit_pos = GTK_VALUE_DOUBLE (args[0]) ;
                if (tbpos != old_unit_pos) {
                gtk_object_getv (GTK_OBJECT(meter_group), 1, args) ;
                old_unit_pos = GTK_VALUE_DOUBLE (args[0]) ;
                if (tbpos != old_unit_pos) {
-                       gtk_canvas_item_move (meter_group, 0.0, tbpos - old_unit_pos) ;
+                       gnome_canvas_item_move (meter_group, 0.0, tbpos - old_unit_pos) ;
                }
 
                }
 
-               //gtk_canvas_item_set (meter_group, "y", tbpos, NULL);
-               gtk_canvas_item_show (meter_group);
+               //gnome_canvas_item_set (meter_group, "y", tbpos, NULL);
+               gnome_canvas_item_show (meter_group);
                tbpos += timebar_height;
                visible_timebars++;
        }
        else {
                tbpos += timebar_height;
                visible_timebars++;
        }
        else {
-               gtk_canvas_item_hide (meter_group);
+               gnome_canvas_item_hide (meter_group);
        }
        
        if (ruler_shown[ruler_time_tempo]) {
        }
        
        if (ruler_shown[ruler_time_tempo]) {
@@ -625,15 +625,15 @@ Editor::update_ruler_visibility ()
                gtk_object_getv (GTK_OBJECT(tempo_group), 1, args) ;
                old_unit_pos = GTK_VALUE_DOUBLE (args[0]) ;
                if (tbpos != old_unit_pos) {
                gtk_object_getv (GTK_OBJECT(tempo_group), 1, args) ;
                old_unit_pos = GTK_VALUE_DOUBLE (args[0]) ;
                if (tbpos != old_unit_pos) {
-                       gtk_canvas_item_move (tempo_group, 0.0, tbpos - old_unit_pos) ;
+                       gnome_canvas_item_move (tempo_group, 0.0, tbpos - old_unit_pos) ;
                }
                }
-               //gtk_canvas_item_set (tempo_group, "y", tbpos, NULL);
-               gtk_canvas_item_show (tempo_group);
+               //gnome_canvas_item_set (tempo_group, "y", tbpos, NULL);
+               gnome_canvas_item_show (tempo_group);
                tbpos += timebar_height;
                visible_timebars++;
        }
        else {
                tbpos += timebar_height;
                visible_timebars++;
        }
        else {
-               gtk_canvas_item_hide (tempo_group);
+               gnome_canvas_item_hide (tempo_group);
        }
        
        if (ruler_shown[ruler_time_marker]) {
        }
        
        if (ruler_shown[ruler_time_marker]) {
@@ -641,15 +641,15 @@ Editor::update_ruler_visibility ()
                gtk_object_getv (GTK_OBJECT(marker_group), 1, args) ;
                old_unit_pos = GTK_VALUE_DOUBLE (args[0]) ;
                if (tbpos != old_unit_pos) {
                gtk_object_getv (GTK_OBJECT(marker_group), 1, args) ;
                old_unit_pos = GTK_VALUE_DOUBLE (args[0]) ;
                if (tbpos != old_unit_pos) {
-                       gtk_canvas_item_move (marker_group, 0.0, tbpos - old_unit_pos) ;
+                       gnome_canvas_item_move (marker_group, 0.0, tbpos - old_unit_pos) ;
                }
                }
-               //gtk_canvas_item_set (marker_group, "y", tbpos, NULL);
-               gtk_canvas_item_show (marker_group);
+               //gnome_canvas_item_set (marker_group, "y", tbpos, NULL);
+               gnome_canvas_item_show (marker_group);
                tbpos += timebar_height;
                visible_timebars++;
        }
        else {
                tbpos += timebar_height;
                visible_timebars++;
        }
        else {
-               gtk_canvas_item_hide (marker_group);
+               gnome_canvas_item_hide (marker_group);
        }
        
        if (ruler_shown[ruler_time_range_marker]) {
        }
        
        if (ruler_shown[ruler_time_range_marker]) {
@@ -657,15 +657,15 @@ Editor::update_ruler_visibility ()
                gtk_object_getv (GTK_OBJECT(range_marker_group), 1, args) ;
                old_unit_pos = GTK_VALUE_DOUBLE (args[0]) ;
                if (tbpos != old_unit_pos) {
                gtk_object_getv (GTK_OBJECT(range_marker_group), 1, args) ;
                old_unit_pos = GTK_VALUE_DOUBLE (args[0]) ;
                if (tbpos != old_unit_pos) {
-                       gtk_canvas_item_move (range_marker_group, 0.0, tbpos - old_unit_pos) ;
+                       gnome_canvas_item_move (range_marker_group, 0.0, tbpos - old_unit_pos) ;
                }
                }
-               //gtk_canvas_item_set (marker_group, "y", tbpos, NULL);
-               gtk_canvas_item_show (range_marker_group);
+               //gnome_canvas_item_set (marker_group, "y", tbpos, NULL);
+               gnome_canvas_item_show (range_marker_group);
                tbpos += timebar_height;
                visible_timebars++;
        }
        else {
                tbpos += timebar_height;
                visible_timebars++;
        }
        else {
-               gtk_canvas_item_hide (range_marker_group);
+               gnome_canvas_item_hide (range_marker_group);
        }
 
        if (ruler_shown[ruler_time_transport_marker]) {
        }
 
        if (ruler_shown[ruler_time_transport_marker]) {
@@ -673,15 +673,15 @@ Editor::update_ruler_visibility ()
                gtk_object_getv (GTK_OBJECT(transport_marker_group), 1, args) ;
                old_unit_pos = GTK_VALUE_DOUBLE (args[0]) ;
                if (tbpos != old_unit_pos) {
                gtk_object_getv (GTK_OBJECT(transport_marker_group), 1, args) ;
                old_unit_pos = GTK_VALUE_DOUBLE (args[0]) ;
                if (tbpos != old_unit_pos) {
-                       gtk_canvas_item_move (transport_marker_group, 0.0, tbpos - old_unit_pos) ;
+                       gnome_canvas_item_move (transport_marker_group, 0.0, tbpos - old_unit_pos) ;
                }
                }
-               //gtk_canvas_item_set (marker_group, "y", tbpos, NULL);
-               gtk_canvas_item_show (transport_marker_group);
+               //gnome_canvas_item_set (marker_group, "y", tbpos, NULL);
+               gnome_canvas_item_show (transport_marker_group);
                tbpos += timebar_height;
                visible_timebars++;
        }
        else {
                tbpos += timebar_height;
                visible_timebars++;
        }
        else {
-               gtk_canvas_item_hide (transport_marker_group);
+               gnome_canvas_item_hide (transport_marker_group);
        }
        
        time_canvas_vbox.set_size_request (-1, (int)(timebar_height * visible_timebars));
        }
        
        time_canvas_vbox.set_size_request (-1, (int)(timebar_height * visible_timebars));
index db62c8817e972eed65e808e22c449d4dc4d0aff6..fb662fa7b0995974c5fb20688e7832f0dfe83565 100644 (file)
@@ -24,7 +24,7 @@
 #include <string>
 #include <climits>
 
 #include <string>
 #include <climits>
 
-#include <gtk-canvas.h>
+#include <libgnomecanvas/libgnomecanvas.h>
 
 #include <pbd/error.h>
 
 
 #include <pbd/error.h>
 
@@ -71,11 +71,11 @@ Editor::draw_metric_marks (const Metrics& metrics)
                
                if ((ms = dynamic_cast<const MeterSection*>(*i)) != 0) {
                        snprintf (buf, sizeof(buf), "%g/%g", ms->beats_per_bar(), ms->note_divisor ());
                
                if ((ms = dynamic_cast<const MeterSection*>(*i)) != 0) {
                        snprintf (buf, sizeof(buf), "%g/%g", ms->beats_per_bar(), ms->note_divisor ());
-                       metric_marks.push_back (new MeterMarker (*this, GTK_CANVAS_GROUP(meter_group), color_map[cMeterMarker], buf, 
+                       metric_marks.push_back (new MeterMarker (*this, GNOME_CANVAS_GROUP(meter_group), color_map[cMeterMarker], buf, 
                                                                 *(const_cast<MeterSection*>(ms)), PublicEditor::canvas_meter_marker_event));
                } else if ((ts = dynamic_cast<const TempoSection*>(*i)) != 0) {
                        snprintf (buf, sizeof (buf), "%.2f", ts->beats_per_minute());
                                                                 *(const_cast<MeterSection*>(ms)), PublicEditor::canvas_meter_marker_event));
                } else if ((ts = dynamic_cast<const TempoSection*>(*i)) != 0) {
                        snprintf (buf, sizeof (buf), "%.2f", ts->beats_per_minute());
-                       metric_marks.push_back (new TempoMarker (*this, GTK_CANVAS_GROUP(tempo_group), color_map[cTempoMarker], buf, 
+                       metric_marks.push_back (new TempoMarker (*this, GNOME_CANVAS_GROUP(tempo_group), color_map[cTempoMarker], buf, 
                                                                 *(const_cast<TempoSection*>(ts)), PublicEditor::canvas_tempo_marker_event));
                }
                
                                                                 *(const_cast<TempoSection*>(ts)), PublicEditor::canvas_tempo_marker_event));
                }
                
@@ -120,20 +120,20 @@ void
 Editor::hide_measures ()
 {
        for (TimeLineList::iterator i = used_measure_lines.begin(); i != used_measure_lines.end(); ++i) {
 Editor::hide_measures ()
 {
        for (TimeLineList::iterator i = used_measure_lines.begin(); i != used_measure_lines.end(); ++i) {
-               gtk_canvas_item_hide (*i);
+               gnome_canvas_item_hide (*i);
                free_measure_lines.push_back (*i);
        }
        used_measure_lines.clear ();
 }
 
                free_measure_lines.push_back (*i);
        }
        used_measure_lines.clear ();
 }
 
-GtkCanvasItem *
+GnomeCanvasItem *
 Editor::get_time_line ()
 {
 Editor::get_time_line ()
 {
-       GtkCanvasItem *line;
+       GnomeCanvasItem *line;
 
        if (free_measure_lines.empty()) {
 
        if (free_measure_lines.empty()) {
-               line = gtk_canvas_item_new (GTK_CANVAS_GROUP(time_line_group),
-                                           gtk_canvas_simpleline_get_type(),
+               line = gnome_canvas_item_new (GNOME_CANVAS_GROUP(time_line_group),
+                                           gnome_canvas_simpleline_get_type(),
                                            NULL);
                // cerr << "measure line @ " << line << endl;
                used_measure_lines.push_back (line);
                                            NULL);
                // cerr << "measure line @ " << line << endl;
                used_measure_lines.push_back (line);
@@ -155,7 +155,7 @@ Editor::draw_measures ()
 
        TempoMap::BBTPointList::iterator i;
        TempoMap::BBTPointList *all_bbt_points;
 
        TempoMap::BBTPointList::iterator i;
        TempoMap::BBTPointList *all_bbt_points;
-       GtkCanvasItem *line;
+       GnomeCanvasItem *line;
        gdouble xpos, last_xpos;
        uint32_t cnt;
        uint32_t color;
        gdouble xpos, last_xpos;
        uint32_t cnt;
        uint32_t color;
@@ -223,8 +223,8 @@ Editor::draw_measures ()
                                                "y2", (gdouble) canvas_height,
                                                "color_rgba", color,
                                                NULL);
                                                "y2", (gdouble) canvas_height,
                                                "color_rgba", color,
                                                NULL);
-                               gtk_canvas_item_raise_to_top (line);
-                               gtk_canvas_item_show (line);
+                               gnome_canvas_item_raise_to_top (line);
+                               gnome_canvas_item_show (line);
                                last_xpos = xpos;       
                                ++cnt;
                        } 
                                last_xpos = xpos;       
                                ++cnt;
                        } 
@@ -236,8 +236,8 @@ Editor::draw_measures ()
 
        /* the cursors are always on top of everything */
 
 
        /* the cursors are always on top of everything */
 
-       gtk_canvas_item_raise_to_top (cursor_group);
-       gtk_canvas_item_lower_to_bottom (time_line_group);
+       gnome_canvas_item_raise_to_top (cursor_group);
+       gnome_canvas_item_lower_to_bottom (time_line_group);
 }
 
 void
 }
 
 void
@@ -326,7 +326,7 @@ Editor::mouse_add_new_meter_event (jack_nframes_t frame)
 }
 
 void
 }
 
 void
-Editor::remove_tempo_marker (GtkCanvasItem* item)
+Editor::remove_tempo_marker (GnomeCanvasItem* item)
 {
        Marker* marker;
        TempoMarker* tempo_marker;
 {
        Marker* marker;
        TempoMarker* tempo_marker;
@@ -411,7 +411,7 @@ Editor::edit_tempo_section (TempoSection* section)
 }
 
 void
 }
 
 void
-Editor::edit_tempo_marker (GtkCanvasItem *item)
+Editor::edit_tempo_marker (GnomeCanvasItem *item)
 {
        Marker* marker;
        TempoMarker* tempo_marker;
 {
        Marker* marker;
        TempoMarker* tempo_marker;
@@ -430,7 +430,7 @@ Editor::edit_tempo_marker (GtkCanvasItem *item)
 }
 
 void
 }
 
 void
-Editor::edit_meter_marker (GtkCanvasItem *item)
+Editor::edit_meter_marker (GnomeCanvasItem *item)
 {
        Marker* marker;
        MeterMarker* meter_marker;
 {
        Marker* marker;
        MeterMarker* meter_marker;
@@ -461,7 +461,7 @@ Editor::real_remove_tempo_marker (TempoSection *section)
 }
 
 void
 }
 
 void
-Editor::remove_meter_marker (GtkCanvasItem* item)
+Editor::remove_meter_marker (GnomeCanvasItem* item)
 {
        Marker* marker;
        MeterMarker* meter_marker;
 {
        Marker* marker;
        MeterMarker* meter_marker;
index 514a821662744652aa93de38e57464589d5e2887..3c868d67a599fe812bd243a2e13d2608ff6ca32c 100644 (file)
@@ -14,12 +14,12 @@ enum Width {
        Narrow,
 };
 
        Narrow,
 };
 
-#include <gtk-canvas/gtk-canvas.h>
+#include <libgnomecanvas/libgnomecanvas.h>
 
 struct SelectionRect {
 
 struct SelectionRect {
-    GtkCanvasItem *rect;
-    GtkCanvasItem *end_trim;
-    GtkCanvasItem *start_trim;
+    GnomeCanvasItem *rect;
+    GnomeCanvasItem *end_trim;
+    GnomeCanvasItem *start_trim;
     uint32_t id;
 };
 
     uint32_t id;
 };
 
index 70e1c3e5383220bd2040925e07198a86127dffd5..734fff271e2b1b325b3f9561902162dc469dad96 100644 (file)
@@ -24,7 +24,7 @@
 #include <sigc++/adaptor.h>
 #include <sigc++/scope.h>
 
 #include <sigc++/adaptor.h>
 #include <sigc++/scope.h>
 
-namespace SigC
+namespace sigc
 {
 
 /****************************************************************
 {
 
 /****************************************************************
index 2f739e0fad2232a87642f6ed9d78adab791c046f..13b710b157472562147c2aebfe080ce5de8a4743 100644 (file)
@@ -43,11 +43,11 @@ GainAutomationTimeAxisView::~GainAutomationTimeAxisView ()
 }
 
 void
 }
 
 void
-GainAutomationTimeAxisView::add_automation_event (GtkCanvasItem* item, GdkEvent* event, jack_nframes_t when, double y)
+GainAutomationTimeAxisView::add_automation_event (GnomeCanvasItem* item, GdkEvent* event, jack_nframes_t when, double y)
 {
        double x = 0;
 
 {
        double x = 0;
 
-       gtk_canvas_item_w2i (canvas_display, &x, &y);
+       gnome_canvas_item_w2i (canvas_display, &x, &y);
 
        /* compute vertical fractional position */
 
 
        /* compute vertical fractional position */
 
index b261e34d308af20490d197171c0df3f7ccb55ed0..f82822a04be5c7ad0b2e56f6293a8e11b7833b71 100644 (file)
@@ -21,7 +21,7 @@ class GainAutomationTimeAxisView : public AutomationTimeAxisView
        
        ~GainAutomationTimeAxisView();
 
        
        ~GainAutomationTimeAxisView();
 
-       void add_automation_event (GtkCanvasItem *item, GdkEvent *event, jack_nframes_t, double);
+       void add_automation_event (GnomeCanvasItem *item, GdkEvent *event, jack_nframes_t, double);
        
    private:
        ARDOUR::Curve& curve;
        
    private:
        ARDOUR::Curve& curve;
index 06ae0dafd99f697dcd273dbd85c962c4a6a1befb..49c7d611bf1a47940ccb3fe4c6cba8a884dbdd99 100644 (file)
@@ -25,9 +25,9 @@
 
 #include <ardour/types.h>
 
 
 #include <ardour/types.h>
 
-#include <gtk--.h>
-#include <gtkmmext/slider_controller.h>
-#include <gtkmmext/click_box.h>
+#include <gtkmm.h>
+#include <gtkmm2ext/slider_controller.h>
+#include <gtkmm2ext/click_box.h>
 
 #include "enums.h"
 
 
 #include "enums.h"
 
@@ -37,7 +37,7 @@ namespace ARDOUR {
        class Route;
        class RouteGroup;
 }
        class Route;
        class RouteGroup;
 }
-namespace Gtkmmext {
+namespace Gtkmm2ext {
        class FastMeter;
        class BarController;
        class Pix;
        class FastMeter;
        class BarController;
        class Pix;
@@ -68,10 +68,10 @@ class GainMeter : public Gtk::VBox
 
        bool ignore_toggle;
 
 
        bool ignore_toggle;
 
-       Gtkmmext::VSliderController *gain_slider;
+       Gtkmm2ext::VSliderController *gain_slider;
        Gtk::Adjustment              gain_adjustment;
        Gtk::Frame                   gain_display_frame;
        Gtk::Adjustment              gain_adjustment;
        Gtk::Frame                   gain_display_frame;
-       Gtkmmext::ClickBox           gain_display;
+       Gtkmm2ext::ClickBox           gain_display;
        Gtk::Frame                   peak_display_frame;
        Gtk::EventBox                peak_display;
        Gtk::Label                   peak_display_label;
        Gtk::Frame                   peak_display_frame;
        Gtk::EventBox                peak_display;
        Gtk::Label                   peak_display_label;
@@ -91,7 +91,7 @@ class GainMeter : public Gtk::VBox
        void gain_printer (char buf[32], Gtk::Adjustment&);
        
        struct MeterInfo {
        void gain_printer (char buf[32], Gtk::Adjustment&);
        
        struct MeterInfo {
-           Gtkmmext::FastMeter *meter;
+           Gtkmm2ext::FastMeter *meter;
            gint16          width;   
            bool            packed;
            
            gint16          width;   
            bool            packed;
            
@@ -145,10 +145,10 @@ class GainMeter : public Gtk::VBox
        void reset_peak_display ();
        void reset_group_peak_display (ARDOUR::RouteGroup*);
 
        void reset_peak_display ();
        void reset_group_peak_display (ARDOUR::RouteGroup*);
 
-       static SigC::Signal0<void> ResetAllPeakDisplays;
-       static SigC::Signal1<void,ARDOUR::RouteGroup*> ResetGroupPeakDisplays;
+       static sigc::signal<void> ResetAllPeakDisplays;
+       static sigc::signal<void,ARDOUR::RouteGroup*> ResetGroupPeakDisplays;
 
 
-       static Gtkmmext::Pix* slider_pix;
+       static Gtkmm2ext::Pix* slider_pix;
        static int setup_slider_pix ();
 };
 
        static int setup_slider_pix ();
 };
 
index 8caacac3b3d31b0dd1bb0f9acbe0eab2fce13990..32c25b74cc6483a750d259e101167301703ccb7b 100644 (file)
@@ -8,14 +8,14 @@ using namespace Editing;
 GhostRegion::GhostRegion (AutomationTimeAxisView& atv, double initial_pos)
        : trackview (atv)
 {
 GhostRegion::GhostRegion (AutomationTimeAxisView& atv, double initial_pos)
        : trackview (atv)
 {
-       group = gtk_canvas_item_new (GTK_CANVAS_GROUP(trackview.canvas_display),
-                                    gtk_canvas_group_get_type(),
+       group = gnome_canvas_item_new (GNOME_CANVAS_GROUP(trackview.canvas_display),
+                                    gnome_canvas_group_get_type(),
                                     "x", initial_pos,
                                     "y", 0.0,
                                     NULL);
 
                                     "x", initial_pos,
                                     "y", 0.0,
                                     NULL);
 
-       base_rect = gtk_canvas_item_new (GTK_CANVAS_GROUP(group),
-                                        gtk_canvas_simplerect_get_type(),
+       base_rect = gnome_canvas_item_new (GNOME_CANVAS_GROUP(group),
+                                        gnome_canvas_simplerect_get_type(),
                                         "x1", (double) 0.0,
                                         "y1", (double) 0.0,
                                         "y2", (double) trackview.height,
                                         "x1", (double) 0.0,
                                         "y1", (double) 0.0,
                                         "y2", (double) trackview.height,
@@ -24,7 +24,7 @@ GhostRegion::GhostRegion (AutomationTimeAxisView& atv, double initial_pos)
                                         "fill_color_rgba", color_map[cGhostTrackBaseFill],
                                         NULL);
 
                                         "fill_color_rgba", color_map[cGhostTrackBaseFill],
                                         NULL);
 
-       gtk_canvas_item_lower_to_bottom (group);
+       gnome_canvas_item_lower_to_bottom (group);
 
        atv.add_ghost (this);
 }
 
        atv.add_ghost (this);
 }
@@ -38,31 +38,31 @@ GhostRegion::~GhostRegion ()
 void
 GhostRegion::set_samples_per_unit (double spu)
 {
 void
 GhostRegion::set_samples_per_unit (double spu)
 {
-       for (vector<GtkCanvasItem*>::iterator i = waves.begin(); i != waves.end(); ++i) {
-               gtk_canvas_item_set ((*i), "samples_per_unit", spu, NULL);
+       for (vector<GnomeCanvasItem*>::iterator i = waves.begin(); i != waves.end(); ++i) {
+               gnome_canvas_item_set ((*i), "samples_per_unit", spu, NULL);
        }               
 }
 
 void
 GhostRegion::set_duration (double units)
 {
        }               
 }
 
 void
 GhostRegion::set_duration (double units)
 {
-       gtk_canvas_item_set (base_rect, "x2", units, NULL);
+       gnome_canvas_item_set (base_rect, "x2", units, NULL);
 }
 
 void
 GhostRegion::set_height ()
 {
        gdouble ht;
 }
 
 void
 GhostRegion::set_height ()
 {
        gdouble ht;
-       vector<GtkCanvasItem*>::iterator i;
+       vector<GnomeCanvasItem*>::iterator i;
        uint32_t n;
 
        uint32_t n;
 
-       gtk_canvas_item_set (base_rect, "y2", (double) trackview.height, NULL);
+       gnome_canvas_item_set (base_rect, "y2", (double) trackview.height, NULL);
 
        ht = ((trackview.height) / (double) waves.size());
        
        for (n = 0, i = waves.begin(); i != waves.end(); ++i, ++n) {
                gdouble yoff = n * ht;
 
        ht = ((trackview.height) / (double) waves.size());
        
        for (n = 0, i = waves.begin(); i != waves.end(); ++i, ++n) {
                gdouble yoff = n * ht;
-               gtk_canvas_item_set ((*i), "height", ht, "y", yoff, NULL);
+               gnome_canvas_item_set ((*i), "height", ht, "y", yoff, NULL);
        }
 }
 
        }
 }
 
index 3fc96384b3a7b051b01fdc754803c6a4e139c30b..120be39e007437faaac46447991dd1d125ca0266 100644 (file)
 
 #include <vector>
 #include <sigc++/signal.h>
 
 #include <vector>
 #include <sigc++/signal.h>
-#include <gtk-canvas.h>
+#include <libgnomecanvas/libgnomecanvas.h>
 
 class AutomationTimeAxisView;
 
 struct GhostRegion : public sigc::trackable
 {
     AutomationTimeAxisView& trackview;
 
 class AutomationTimeAxisView;
 
 struct GhostRegion : public sigc::trackable
 {
     AutomationTimeAxisView& trackview;
-    GtkCanvasItem* group;
-    GtkCanvasItem* base_rect;
-    std::vector<GtkCanvasItem*> waves;
+    GnomeCanvasItem* group;
+    GnomeCanvasItem* base_rect;
+    std::vector<GnomeCanvasItem*> waves;
 
     GhostRegion (AutomationTimeAxisView& tv, double initial_unit_pos);
     ~GhostRegion ();
 
     GhostRegion (AutomationTimeAxisView& tv, double initial_unit_pos);
     ~GhostRegion ();
index 840b17ece38dbbabdbb3c4ccb6000cbf03815be7..50e9453801c4da382b126bc6ce0d26ecac614a5a 100644 (file)
@@ -141,12 +141,12 @@ gtk_custom_hruler_draw_ticks (GtkCustomRuler * ruler)
 
        widget = GTK_WIDGET (ruler);
 
 
        widget = GTK_WIDGET (ruler);
 
-       gc = widget->style->fg_gc[GTK_STATE_NORMAL];
-       bg_gc = widget->style->bg_gc[GTK_STATE_NORMAL];
+       gc = widget->style->fg_gc[Gtk::STATE_NORMAL];
+       bg_gc = widget->style->bg_gc[Gtk::STATE_NORMAL];
        font = gtk_style_get_font(widget->style);
 
        gtk_paint_box (widget->style, ruler->backing_store,
        font = gtk_style_get_font(widget->style);
 
        gtk_paint_box (widget->style, ruler->backing_store,
-                      GTK_STATE_NORMAL, GTK_SHADOW_NONE,
+                      Gtk::STATE_NORMAL, GTK_SHADOW_NONE,
                       NULL, widget, "custom_hruler", 0, 0, widget->allocation.width, widget->allocation.height);
 
        gdk_draw_line (ruler->backing_store, gc, 0, widget->allocation.height - 1, 
                       NULL, widget, "custom_hruler", 0, 0, widget->allocation.width, widget->allocation.height);
 
        gdk_draw_line (ruler->backing_store, gc, 0, widget->allocation.height - 1, 
@@ -207,7 +207,7 @@ gtk_custom_hruler_draw_pos (GtkCustomRuler * ruler)
        g_return_if_fail (GTK_IS_CUSTOM_HRULER (ruler));
        if (GTK_WIDGET_DRAWABLE (ruler) && (ruler->upper - ruler->lower) > 0) {
                widget = GTK_WIDGET (ruler);
        g_return_if_fail (GTK_IS_CUSTOM_HRULER (ruler));
        if (GTK_WIDGET_DRAWABLE (ruler) && (ruler->upper - ruler->lower) > 0) {
                widget = GTK_WIDGET (ruler);
-               gc = widget->style->fg_gc[GTK_STATE_NORMAL];
+               gc = widget->style->fg_gc[Gtk::STATE_NORMAL];
                xthickness = widget->style->xthickness;
                ythickness = widget->style->ythickness;
                width = widget->allocation.width;
                xthickness = widget->style->xthickness;
                ythickness = widget->style->ythickness;
                width = widget->allocation.width;
index 4834be97f3bd973f7f7e63bb5caf2f1980062798..0c97a1bcfa9ea2757add8dbc945a3d5461081f63 100644 (file)
@@ -255,7 +255,7 @@ gtk_custom_ruler_realize (GtkWidget * widget)
        attributes.visual = gtk_widget_get_visual (widget);
        attributes.colormap = gtk_widget_get_colormap (widget);
        attributes.event_mask = gtk_widget_get_events (widget);
        attributes.visual = gtk_widget_get_visual (widget);
        attributes.colormap = gtk_widget_get_colormap (widget);
        attributes.event_mask = gtk_widget_get_events (widget);
-       attributes.event_mask |= (GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK);
+       attributes.event_mask |= (GDK_EXPOSURE_MASK | Gdk::POINTER_MOTION_MASK | Gdk::POINTER_MOTION_HINT_MASK);
 
        attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
 
 
        attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
 
index 329660c06ef125fba7a582e2c0c273bd10517791..0633483eae5a5ad1055660c6f4a28506c03deffd 100644 (file)
@@ -35,7 +35,7 @@
  *   to be best suited to display its contents, including children.
  *   the width and/or height reported from a widget upon size requisition
  *   may be overidden by the user by specifying a width and/or height
  *   to be best suited to display its contents, including children.
  *   the width and/or height reported from a widget upon size requisition
  *   may be overidden by the user by specifying a width and/or height
- *   other than 0 through gtk_widget_set_usize().
+ *   other than 0 through gtk_widget_set_size_request().
  *
  * a scrolled window needs (for imlementing all three policy types) to
  * request its width and height based on two different rationales.
  *
  * a scrolled window needs (for imlementing all three policy types) to
  * request its width and height based on two different rationales.
@@ -619,7 +619,7 @@ gtk_scrolled_window_size_request (GtkWidget      *widget,
 
       gtk_widget_size_request (bin->child, &child_requisition);
 
 
       gtk_widget_size_request (bin->child, &child_requisition);
 
-      if (scrolled_window->hscrollbar_policy == GTK_POLICY_NEVER)
+      if (scrolled_window->hscrollbar_policy == Gtk::POLICY_NEVER)
        requisition->width += child_requisition.width;
       else
        {
        requisition->width += child_requisition.width;
       else
        {
@@ -635,7 +635,7 @@ gtk_scrolled_window_size_request (GtkWidget      *widget,
            requisition->width += vscrollbar_requisition.width;
        }
 
            requisition->width += vscrollbar_requisition.width;
        }
 
-//      if (scrolled_window->vscrollbar_policy == GTK_POLICY_NEVER)
+//      if (scrolled_window->vscrollbar_policy == Gtk::POLICY_NEVER)
 //            requisition->height += child_requisition.height;
 //      else
        {
 //            requisition->height += child_requisition.height;
 //      else
        {
@@ -652,7 +652,7 @@ gtk_scrolled_window_size_request (GtkWidget      *widget,
        }
     }
 
        }
     }
 
-  if (scrolled_window->hscrollbar_policy == GTK_POLICY_AUTOMATIC ||
+  if (scrolled_window->hscrollbar_policy == Gtk::POLICY_AUTOMATIC ||
       scrolled_window->hscrollbar_policy == GTK_POLICY_ALWAYS)
     {
       requisition->width = MAX (requisition->width, hscrollbar_requisition.width);
       scrolled_window->hscrollbar_policy == GTK_POLICY_ALWAYS)
     {
       requisition->width = MAX (requisition->width, hscrollbar_requisition.width);
@@ -660,7 +660,7 @@ gtk_scrolled_window_size_request (GtkWidget      *widget,
        extra_height = SCROLLBAR_SPACING (scrolled_window) + hscrollbar_requisition.height;
     }
 
        extra_height = SCROLLBAR_SPACING (scrolled_window) + hscrollbar_requisition.height;
     }
 
-  if (scrolled_window->vscrollbar_policy == GTK_POLICY_AUTOMATIC ||
+  if (scrolled_window->vscrollbar_policy == Gtk::POLICY_AUTOMATIC ||
       scrolled_window->vscrollbar_policy == GTK_POLICY_ALWAYS)
     {
       requisition->height = MAX (requisition->height, vscrollbar_requisition.height);
       scrolled_window->vscrollbar_policy == GTK_POLICY_ALWAYS)
     {
       requisition->height = MAX (requisition->height, vscrollbar_requisition.height);
@@ -740,11 +740,11 @@ gtk_scrolled_window_size_allocate (GtkWidget     *widget,
 
   if (scrolled_window->hscrollbar_policy == GTK_POLICY_ALWAYS)
     scrolled_window->hscrollbar_visible = TRUE;
 
   if (scrolled_window->hscrollbar_policy == GTK_POLICY_ALWAYS)
     scrolled_window->hscrollbar_visible = TRUE;
-  else if (scrolled_window->hscrollbar_policy == GTK_POLICY_NEVER)
+  else if (scrolled_window->hscrollbar_policy == Gtk::POLICY_NEVER)
     scrolled_window->hscrollbar_visible = FALSE;
   if (scrolled_window->vscrollbar_policy == GTK_POLICY_ALWAYS)
     scrolled_window->vscrollbar_visible = TRUE;
     scrolled_window->hscrollbar_visible = FALSE;
   if (scrolled_window->vscrollbar_policy == GTK_POLICY_ALWAYS)
     scrolled_window->vscrollbar_visible = TRUE;
-  else if (scrolled_window->vscrollbar_policy == GTK_POLICY_NEVER)
+  else if (scrolled_window->vscrollbar_policy == Gtk::POLICY_NEVER)
     scrolled_window->vscrollbar_visible = FALSE;
 
   if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
     scrolled_window->vscrollbar_visible = FALSE;
 
   if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
@@ -862,7 +862,7 @@ gtk_scrolled_window_adjustment_changed (GtkAdjustment *adjustment,
 
   if (adjustment == gtk_range_get_adjustment (GTK_RANGE (scrolled_win->hscrollbar)))
     {
 
   if (adjustment == gtk_range_get_adjustment (GTK_RANGE (scrolled_win->hscrollbar)))
     {
-      if (scrolled_win->hscrollbar_policy == GTK_POLICY_AUTOMATIC)
+      if (scrolled_win->hscrollbar_policy == Gtk::POLICY_AUTOMATIC)
        {
          gboolean visible;
          
        {
          gboolean visible;
          
@@ -875,7 +875,7 @@ gtk_scrolled_window_adjustment_changed (GtkAdjustment *adjustment,
     }
   else if (adjustment == gtk_range_get_adjustment (GTK_RANGE (scrolled_win->vscrollbar)))
     {
     }
   else if (adjustment == gtk_range_get_adjustment (GTK_RANGE (scrolled_win->vscrollbar)))
     {
-      if (scrolled_win->vscrollbar_policy == GTK_POLICY_AUTOMATIC)
+      if (scrolled_win->vscrollbar_policy == Gtk::POLICY_AUTOMATIC)
        {
          gboolean visible;
 
        {
          gboolean visible;
 
index c31255db84ff9e24d5f9116e9fa916f3159dc947..cbfa50c77874acbef66f04cbf12b18f38c2dabc8 100644 (file)
@@ -61,8 +61,8 @@ ImageFrameTimeAxis::ImageFrameTimeAxis(std::string track_id, PublicEditor& ed, A
 {
        _color = unique_random_color() ;
        
 {
        _color = unique_random_color() ;
        
-       selection_group = gtk_canvas_item_new (GTK_CANVAS_GROUP(canvas_display), gtk_canvas_group_get_type (), NULL) ;
-       gtk_canvas_item_hide(selection_group) ;
+       selection_group = gnome_canvas_item_new (GNOME_CANVAS_GROUP(canvas_display), gnome_canvas_group_get_type (), NULL) ;
+       gnome_canvas_item_hide(selection_group) ;
 
        // intialize our data items
        _marked_for_display = true;
 
        // intialize our data items
        _marked_for_display = true;
index e561404716470528a01c070a8293229c93855ff2..7625851a0a1fd5c86a24402951222b6caad97637 100644 (file)
@@ -22,7 +22,7 @@
 #define __ardour_imageframe_time_axis_h__
 
 #include <gtkmm.h>
 #define __ardour_imageframe_time_axis_h__
 
 #include <gtkmm.h>
-#include <gtk-canvas.h>
+#include <libgnomecanvas/libgnomecanvas.h>
 
 #include "ardour_dialog.h"
 #include "enums.h"
 
 #include "ardour_dialog.h"
 #include "enums.h"
index 4c860f2a36576d42d9733baa6e6d483bf9198b15..1c6f670157fc0ed941ef68fb2859b3fbec928e47 100644 (file)
@@ -203,7 +203,7 @@ ImageFrameTimeAxisGroup::add_imageframe_item(std::string frame_id, jack_nframes_
        if(get_named_imageframe_item(frame_id) == 0)
        {
                ifv = new ImageFrameView(frame_id,
        if(get_named_imageframe_item(frame_id) == 0)
        {
                ifv = new ImageFrameView(frame_id,
-                       GTK_CANVAS_GROUP(_view_helper.canvas_item()),
+                       GNOME_CANVAS_GROUP(_view_helper.canvas_item()),
                        &(_view_helper.trackview()),
                        this,
                        _view_helper.trackview().editor.get_current_zoom(),
                        &(_view_helper.trackview()),
                        this,
                        _view_helper.trackview().editor.get_current_zoom(),
index 2eaeb0b66a9fb0d8e1675ed32f0c371aa0943643..e258a400476d840cd420bc037ff7b1e4301d5b42 100644 (file)
@@ -25,7 +25,7 @@
 #include <cmath>
 
 #include <gtkmm.h>
 #include <cmath>
 
 #include <gtkmm.h>
-#include <gtk-canvas.h>
+#include <libgnomecanvas/libgnomecanvas.h>
 #include <jack/jack.h>
 #include "imageframe_time_axis_view.h"
 
 #include <jack/jack.h>
 #include "imageframe_time_axis_view.h"
 
index f2a2c9b5afb28017cae5184a4912551443441acc..27852af55eeb79fcfc644d58730117db05b239fe 100644 (file)
@@ -53,10 +53,10 @@ ImageFrameTimeAxisView::ImageFrameTimeAxisView (ImageFrameTimeAxis& tv)
        region_color = _trackview.color() ;
        stream_base_color = color_map[cImageTrackBase] ;
 
        region_color = _trackview.color() ;
        stream_base_color = color_map[cImageTrackBase] ;
 
-       canvas_group = gtk_canvas_item_new (GTK_CANVAS_GROUP(_trackview.canvas_display), gtk_canvas_group_get_type (), 0) ;
+       canvas_group = gnome_canvas_item_new (GNOME_CANVAS_GROUP(_trackview.canvas_display), gnome_canvas_group_get_type (), 0) ;
 
 
-       canvas_rect = gtk_canvas_item_new (GTK_CANVAS_GROUP(canvas_group),
-               gtk_canvas_simplerect_get_type(),
+       canvas_rect = gnome_canvas_item_new (GNOME_CANVAS_GROUP(canvas_group),
+               gnome_canvas_simplerect_get_type(),
                "x1", 0.0,
                "y1", 0.0,
                "x2", 1000000.0,
                "x1", 0.0,
                "y1", 0.0,
                "x2", 1000000.0,
@@ -154,7 +154,7 @@ int
 ImageFrameTimeAxisView::set_position (gdouble x, gdouble y)
 
 {
 ImageFrameTimeAxisView::set_position (gdouble x, gdouble y)
 
 {
-       gtk_canvas_item_set (canvas_group, "x", x, "y", y, NULL);
+       gnome_canvas_item_set (canvas_group, "x", x, "y", y, NULL);
        return 0;
 }
 
        return 0;
 }
 
index 37b98b33c3fa2e033f3e02f990cffc5403c8ab4b..1aa1b0724c0525daaab76fa219637d1a3db1e822 100644 (file)
@@ -25,7 +25,7 @@
 #include <cmath>
 
 #include <gtkmm.h>
 #include <cmath>
 
 #include <gtkmm.h>
-#include <gtk-canvas.h>
+#include <libgnomecanvas/libgnomecanvas.h>
 #include <jack/jack.h>
 
 class PublicEditor ;
 #include <jack/jack.h>
 
 class PublicEditor ;
@@ -71,7 +71,7 @@ class ImageFrameTimeAxisView : public sigc::trackable
                /**
                 *
                 */
                /**
                 *
                 */
-               GtkCanvasItem* canvas_item() { return canvas_group; }
+               GnomeCanvasItem* canvas_item() { return canvas_group; }
                
                
                //---------------------------------------------------------------------------------------//
                
                
                //---------------------------------------------------------------------------------------//
@@ -256,8 +256,8 @@ class ImageFrameTimeAxisView : public sigc::trackable
                /* the TimeAxisView that this object is acting as the view helper for */
                ImageFrameTimeAxis& _trackview ;
                
                /* the TimeAxisView that this object is acting as the view helper for */
                ImageFrameTimeAxis& _trackview ;
                
-               GtkCanvasItem *canvas_group ;
-               GtkCanvasItem *canvas_rect; /* frame around the whole thing */
+               GnomeCanvasItem *canvas_group ;
+               GnomeCanvasItem *canvas_rect; /* frame around the whole thing */
                
                /** the current samples per unit */
                double _samples_per_unit ;
                
                /** the current samples per unit */
                double _samples_per_unit ;
index 8c0b75e71dba69259101b74c44cc6d8b67a15c55..1b13f5d145d418a645b4c568954a4fdd3e0a92be 100644 (file)
@@ -56,7 +56,7 @@ sigc::signal<void,ImageFrameView*> ImageFrameView::GoingAway;
  * @param num_channels the number of color channels within rgb_data
  */
 ImageFrameView::ImageFrameView(std::string item_id,
  * @param num_channels the number of color channels within rgb_data
  */
 ImageFrameView::ImageFrameView(std::string item_id,
-       GtkCanvasGroup *parent,
+       GnomeCanvasGroup *parent,
        ImageFrameTimeAxis* tv,
        ImageFrameTimeAxisGroup* item_group,
        double spu,
        ImageFrameTimeAxis* tv,
        ImageFrameTimeAxisGroup* item_group,
        double spu,
@@ -93,8 +93,8 @@ ImageFrameView::ImageFrameView(std::string item_id,
        double im_ratio = (double)width/(double)height ;
        int im_width = (int)((double)(trackview.height - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE) * im_ratio) ;
        
        double im_ratio = (double)width/(double)height ;
        int im_width = (int)((double)(trackview.height - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE) * im_ratio) ;
        
-       imageframe = gtk_canvas_item_new(GTK_CANVAS_GROUP(group),
-               gtk_canvas_imageframe_get_type(),
+       imageframe = gnome_canvas_item_new(GNOME_CANVAS_GROUP(group),
+               gnome_canvas_imageframe_get_type(),
                "pixbuf", pbuf,
                "x", (gdouble) 1.0,
                "y", (gdouble) 1.0,
                "pixbuf", pbuf,
                "x", (gdouble) 1.0,
                "y", (gdouble) 1.0,
@@ -117,8 +117,8 @@ ImageFrameView::ImageFrameView(std::string item_id,
 
        /* handle any specific details required by the initial start end duration values */
        
 
        /* handle any specific details required by the initial start end duration values */
        
-       gtk_canvas_item_raise_to_top(frame_handle_start) ;
-       gtk_canvas_item_raise_to_top(frame_handle_end) ;
+       gnome_canvas_item_raise_to_top(frame_handle_start) ;
+       gnome_canvas_item_raise_to_top(frame_handle_end) ;
        
     set_position(start, this) ;
     set_duration(duration, this) ;
        
     set_position(start, this) ;
     set_duration(duration, this) ;
@@ -230,7 +230,7 @@ ImageFrameView::set_duration(jack_nframes_t dur, void* src)
        if(ret)
        {
                /* handle setting the sizes of our canvas itesm based on the new duration */
        if(ret)
        {
                /* handle setting the sizes of our canvas itesm based on the new duration */
-               gtk_canvas_item_set(imageframe, "drawwidth", (gdouble) trackview.editor.frame_to_pixel(get_duration()), NULL) ;
+               gnome_canvas_item_set(imageframe, "drawwidth", (gdouble) trackview.editor.frame_to_pixel(get_duration()), NULL) ;
        }
        
        return(ret) ;
        }
        
        return(ret) ;
@@ -278,21 +278,21 @@ ImageFrameView::set_height (gdouble h)
        // @todo might have to re-get the image data, for a large height...hmmm.
        double im_ratio = (double)image_data_width/(double)image_data_height ;
        int im_width = (int)((double)(h - TimeAxisViewItem::NAME_Y_OFFSET) * im_ratio) ;
        // @todo might have to re-get the image data, for a large height...hmmm.
        double im_ratio = (double)image_data_width/(double)image_data_height ;
        int im_width = (int)((double)(h - TimeAxisViewItem::NAME_Y_OFFSET) * im_ratio) ;
-       gtk_canvas_item_set(imageframe, "width", (gdouble)im_width, NULL) ;
-       gtk_canvas_item_set(imageframe, "height",(gdouble) (h - TimeAxisViewItem::NAME_Y_OFFSET), NULL) ;
+       gnome_canvas_item_set(imageframe, "width", (gdouble)im_width, NULL) ;
+       gnome_canvas_item_set(imageframe, "height",(gdouble) (h - TimeAxisViewItem::NAME_Y_OFFSET), NULL) ;
 
        
 
        
-       gtk_canvas_item_raise_to_top(frame) ;
-       gtk_canvas_item_raise_to_top(imageframe) ;
-       gtk_canvas_item_raise_to_top(name_highlight) ;
-       gtk_canvas_item_raise_to_top(name_text) ;
-       gtk_canvas_item_raise_to_top(frame_handle_start) ;
-       gtk_canvas_item_raise_to_top(frame_handle_end) ;
+       gnome_canvas_item_raise_to_top(frame) ;
+       gnome_canvas_item_raise_to_top(imageframe) ;
+       gnome_canvas_item_raise_to_top(name_highlight) ;
+       gnome_canvas_item_raise_to_top(name_text) ;
+       gnome_canvas_item_raise_to_top(frame_handle_start) ;
+       gnome_canvas_item_raise_to_top(frame_handle_end) ;
  
  
-       gtk_canvas_item_set (name_text, "y", h - TimeAxisViewItem::NAME_Y_OFFSET, NULL);
-       gtk_canvas_item_set (frame, "y2", h, NULL);
+       gnome_canvas_item_set (name_text, "y", h - TimeAxisViewItem::NAME_Y_OFFSET, NULL);
+       gnome_canvas_item_set (frame, "y2", h, NULL);
 
 
-       gtk_canvas_item_set (name_highlight, "y1", (gdouble) h - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE, "y2", (gdouble) h - 1.0, NULL);
+       gnome_canvas_item_set (name_highlight, "y1", (gdouble) h - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE, "y2", (gdouble) h - 1.0, NULL);
 }
 
 
 }
 
 
index efc315428220aca45454920982a683e4058ec6b1..87bbba4a74997d9f226e2cb09467a71bd7b12273 100644 (file)
@@ -23,7 +23,7 @@
 
 #include <string>
 #include <gtkmm.h>
 
 #include <string>
 #include <gtkmm.h>
-#include <gtk-canvas.h>
+#include <libgnomecanvas/libgnomecanvas.h>
 #include <sigc++/signal.h>
 #include <list>
 
 #include <sigc++/signal.h>
 #include <list>
 
@@ -60,7 +60,7 @@ class ImageFrameView : public TimeAxisViewItem
                 * @param num_channels the number of color channels within rgb_data
                 */
                ImageFrameView(std::string item_id,
                 * @param num_channels the number of color channels within rgb_data
                 */
                ImageFrameView(std::string item_id,
-                       GtkCanvasGroup *parent,
+                       GnomeCanvasGroup *parent,
                        ImageFrameTimeAxis *tv,
                        ImageFrameTimeAxisGroup* group,
                        double spu,
                        ImageFrameTimeAxis *tv,
                        ImageFrameTimeAxisGroup* group,
                        double spu,
@@ -205,7 +205,7 @@ class ImageFrameView : public TimeAxisViewItem
                // ------- Our canvas element -----------
                
                /** the CanvasImageFrame to display the image */
                // ------- Our canvas element -----------
                
                /** the CanvasImageFrame to display the image */
-               GtkCanvasItem* imageframe ;
+               GnomeCanvasItem* imageframe ;
                
 } ; /* class ImageFrameView */
 
                
 } ; /* class ImageFrameView */
 
index b26220cccbeed07e49d3dda81d3bbd9861b3689e..262110286571fbc2e5d63a88f284d6c2a383a9e9 100644 (file)
@@ -27,8 +27,8 @@
 
 #include "i18n.h"
 
 
 #include "i18n.h"
 
-Marker::Marker (PublicEditor& ed, GtkCanvasGroup *parent, guint32 rgba, const string& annotation, 
-               Type type, gint (*callback)(GtkCanvasItem *, GdkEvent *, gpointer), jack_nframes_t frame)
+Marker::Marker (PublicEditor& ed, GnomeCanvasGroup *parent, guint32 rgba, const string& annotation, 
+               Type type, gint (*callback)(GnomeCanvasItem *, GdkEvent *, gpointer), jack_nframes_t frame)
 
        : editor (ed), _type(type)
 {
 
        : editor (ed), _type(type)
 {
@@ -122,7 +122,7 @@ Marker::Marker (PublicEditor& ed, GtkCanvasGroup *parent, guint32 rgba, const st
 
        switch (type) {
        case Mark:
 
        switch (type) {
        case Mark:
-               points = gtk_canvas_points_new (6);
+               points = gnome_canvas_points_new (6);
 
                points->coords[0] = 0.0;
                points->coords[1] = 0.0;
 
                points->coords[0] = 0.0;
                points->coords[1] = 0.0;
@@ -148,7 +148,7 @@ Marker::Marker (PublicEditor& ed, GtkCanvasGroup *parent, guint32 rgba, const st
 
        case Tempo:
        case Meter:
 
        case Tempo:
        case Meter:
-               points = gtk_canvas_points_new (6);
+               points = gnome_canvas_points_new (6);
 
                points->coords[0] = 3.0;
                points->coords[1] = 0.0;
 
                points->coords[0] = 3.0;
                points->coords[1] = 0.0;
@@ -173,7 +173,7 @@ Marker::Marker (PublicEditor& ed, GtkCanvasGroup *parent, guint32 rgba, const st
                break;
 
        case Start:
                break;
 
        case Start:
-               points = gtk_canvas_points_new (6);
+               points = gnome_canvas_points_new (6);
 
                points->coords[0] = 0.0;
                points->coords[1] = 0.0;
 
                points->coords[0] = 0.0;
                points->coords[1] = 0.0;
@@ -198,7 +198,7 @@ Marker::Marker (PublicEditor& ed, GtkCanvasGroup *parent, guint32 rgba, const st
                break;
 
        case End:
                break;
 
        case End:
-               points = gtk_canvas_points_new (6);
+               points = gnome_canvas_points_new (6);
 
                points->coords[0] = 5.0;
                points->coords[1] = 0.0;
 
                points->coords[0] = 5.0;
                points->coords[1] = 0.0;
@@ -223,7 +223,7 @@ Marker::Marker (PublicEditor& ed, GtkCanvasGroup *parent, guint32 rgba, const st
                break;
 
        case LoopStart:
                break;
 
        case LoopStart:
-               points = gtk_canvas_points_new (7);
+               points = gnome_canvas_points_new (7);
 
                points->coords[0] = 0.0;
                points->coords[1] = 0.0;
 
                points->coords[0] = 0.0;
                points->coords[1] = 0.0;
@@ -251,7 +251,7 @@ Marker::Marker (PublicEditor& ed, GtkCanvasGroup *parent, guint32 rgba, const st
                break;
 
        case LoopEnd:
                break;
 
        case LoopEnd:
-               points = gtk_canvas_points_new (7);
+               points = gnome_canvas_points_new (7);
 
                points->coords[0] = 8.0;
                points->coords[1] = 0.0;
 
                points->coords[0] = 8.0;
                points->coords[1] = 0.0;
@@ -279,7 +279,7 @@ Marker::Marker (PublicEditor& ed, GtkCanvasGroup *parent, guint32 rgba, const st
                break;
 
        case  PunchIn:
                break;
 
        case  PunchIn:
-               points = gtk_canvas_points_new (6);
+               points = gnome_canvas_points_new (6);
 
                points->coords[0] = 0.0;
                points->coords[1] = 0.0;
 
                points->coords[0] = 0.0;
                points->coords[1] = 0.0;
@@ -304,7 +304,7 @@ Marker::Marker (PublicEditor& ed, GtkCanvasGroup *parent, guint32 rgba, const st
                break;
                
        case  PunchOut:
                break;
                
        case  PunchOut:
-               points = gtk_canvas_points_new (6);
+               points = gnome_canvas_points_new (6);
 
                points->coords[0] = 0.0;
                points->coords[1] = 0.0;
 
                points->coords[0] = 0.0;
                points->coords[1] = 0.0;
@@ -337,15 +337,15 @@ Marker::Marker (PublicEditor& ed, GtkCanvasGroup *parent, guint32 rgba, const st
 
        unit_position -= shift;
 
 
        unit_position -= shift;
 
-       group = gtk_canvas_item_new (parent,
-                                    gtk_canvas_group_get_type(),
+       group = gnome_canvas_item_new (parent,
+                                    gnome_canvas_group_get_type(),
                                     "x", unit_position,
                                     "y", 1.0,
                                     NULL);
 
        // cerr << "set mark al points, nc = " << points->num_points << endl;
                                     "x", unit_position,
                                     "y", 1.0,
                                     NULL);
 
        // cerr << "set mark al points, nc = " << points->num_points << endl;
-       mark = gtk_canvas_item_new (GTK_CANVAS_GROUP(group),
-                                   gtk_canvas_polygon_get_type(),
+       mark = gnome_canvas_item_new (GNOME_CANVAS_GROUP(group),
+                                   gnome_canvas_polygon_get_type(),
                                    "points", points,
                                    "fill_color_rgba", rgba,
                                    "outline_color", "black",
                                    "points", points,
                                    "fill_color_rgba", rgba,
                                    "outline_color", "black",
@@ -353,8 +353,8 @@ Marker::Marker (PublicEditor& ed, GtkCanvasGroup *parent, guint32 rgba, const st
 
        string fontname = get_font_for_style (N_("MarkerText"));
 
 
        string fontname = get_font_for_style (N_("MarkerText"));
 
-       text = gtk_canvas_item_new (GTK_CANVAS_GROUP(group),
-                                   gtk_canvas_text_get_type (),
+       text = gnome_canvas_item_new (GNOME_CANVAS_GROUP(group),
+                                   gnome_canvas_text_get_type (),
                                    "text", annotation.c_str(),
                                    "x", label_offset,
                                    "y", 0.0,
                                    "text", annotation.c_str(),
                                    "x", label_offset,
                                    "y", 0.0,
@@ -373,13 +373,13 @@ Marker::~Marker ()
 {
        /* destroying the group destroys its contents */
        gtk_object_destroy (GTK_OBJECT(group));
 {
        /* destroying the group destroys its contents */
        gtk_object_destroy (GTK_OBJECT(group));
-       gtk_canvas_points_unref (points);
+       gnome_canvas_points_unref (points);
 }
 
 void
 Marker::set_name (const string& name)
 {
 }
 
 void
 Marker::set_name (const string& name)
 {
-       gtk_canvas_item_set (text, "text", name.c_str(), NULL);
+       gnome_canvas_item_set (text, "text", name.c_str(), NULL);
 }
 
 void
 }
 
 void
@@ -387,7 +387,7 @@ Marker::set_position (jack_nframes_t frame)
 {
        double new_unit_position = editor.frame_to_unit (frame);
        new_unit_position -= shift;
 {
        double new_unit_position = editor.frame_to_unit (frame);
        new_unit_position -= shift;
-       gtk_canvas_item_move (group, new_unit_position - unit_position, 0.0);
+       gnome_canvas_item_move (group, new_unit_position - unit_position, 0.0);
        frame_position = frame;
        unit_position = new_unit_position;
 }
        frame_position = frame;
        unit_position = new_unit_position;
 }
@@ -401,26 +401,26 @@ Marker::reposition ()
 void
 Marker::show ()
 {
 void
 Marker::show ()
 {
-       gtk_canvas_item_show (group);
+       gnome_canvas_item_show (group);
 }
 
 void
 Marker::hide ()
 {
 }
 
 void
 Marker::hide ()
 {
-       gtk_canvas_item_hide (group);
+       gnome_canvas_item_hide (group);
 }
 
 void
 Marker::set_color_rgba (uint32_t color)
 {
 }
 
 void
 Marker::set_color_rgba (uint32_t color)
 {
-       gtk_canvas_item_set (mark, "fill_color_rgba", color, NULL);
+       gnome_canvas_item_set (mark, "fill_color_rgba", color, NULL);
 }
 
 /***********************************************************************/
 
 }
 
 /***********************************************************************/
 
-TempoMarker::TempoMarker (PublicEditor& editor, GtkCanvasGroup *parent, guint32 rgba, const string& text, 
+TempoMarker::TempoMarker (PublicEditor& editor, GnomeCanvasGroup *parent, guint32 rgba, const string& text, 
                          ARDOUR::TempoSection& temp, 
                          ARDOUR::TempoSection& temp, 
-                         gint (*callback)(GtkCanvasItem *, GdkEvent *, gpointer))
+                         gint (*callback)(GnomeCanvasItem *, GdkEvent *, gpointer))
        : Marker (editor, parent, rgba, text, Tempo, callback, 0),
          _tempo (temp)
 {
        : Marker (editor, parent, rgba, text, Tempo, callback, 0),
          _tempo (temp)
 {
@@ -434,9 +434,9 @@ TempoMarker::~TempoMarker ()
 
 /***********************************************************************/
 
 
 /***********************************************************************/
 
-MeterMarker::MeterMarker (PublicEditor& editor, GtkCanvasGroup *parent, guint32 rgba, const string& text, 
+MeterMarker::MeterMarker (PublicEditor& editor, GnomeCanvasGroup *parent, guint32 rgba, const string& text, 
                          ARDOUR::MeterSection& m, 
                          ARDOUR::MeterSection& m, 
-                         gint (*callback)(GtkCanvasItem *, GdkEvent *, gpointer))
+                         gint (*callback)(GnomeCanvasItem *, GdkEvent *, gpointer))
        : Marker (editor, parent, rgba, text, Meter, callback, 0),
          _meter (m)
 {
        : Marker (editor, parent, rgba, text, Meter, callback, 0),
          _meter (m)
 {
index 8843f684274915e9a87b99fb799a64a743686a40..77d2976dd1742d2ebbd16732b5c5915880e5a036 100644 (file)
@@ -24,7 +24,7 @@
 #include <string>
 #include <glib.h>
 #include <ardour/ardour.h>
 #include <string>
 #include <glib.h>
 #include <ardour/ardour.h>
-#include <gtk-canvas.h>
+#include <libgnomecanvas/libgnomecanvas.h>
 #include <sigc++/signal.h>
 
 namespace ARDOUR {
 #include <sigc++/signal.h>
 
 namespace ARDOUR {
@@ -49,8 +49,8 @@ class Marker : public sigc::trackable
                PunchOut
        };
 
                PunchOut
        };
 
-       Marker (PublicEditor& editor, GtkCanvasGroup *parent, guint32 rgba, const string& text, Type, 
-               gint (*callback)(GtkCanvasItem *, GdkEvent *, gpointer), jack_nframes_t frame = 0);
+       Marker (PublicEditor& editor, GnomeCanvasGroup *parent, guint32 rgba, const string& text, Type, 
+               gint (*callback)(GnomeCanvasItem *, GdkEvent *, gpointer), jack_nframes_t frame = 0);
        virtual ~Marker ();
 
        void set_position (jack_nframes_t);
        virtual ~Marker ();
 
        void set_position (jack_nframes_t);
@@ -65,10 +65,10 @@ class Marker : public sigc::trackable
   protected:
        PublicEditor& editor;
 
   protected:
        PublicEditor& editor;
 
-       GtkCanvasItem *group;
-       GtkCanvasItem *mark;
-       GtkCanvasItem *text;
-       GtkCanvasPoints *points;
+       GnomeCanvasItem *group;
+       GnomeCanvasItem *mark;
+       GnomeCanvasItem *text;
+       GnomeCanvasPoints *points;
 
        double    unit_position;
        jack_nframes_t frame_position;
 
        double    unit_position;
        jack_nframes_t frame_position;
@@ -81,8 +81,8 @@ class Marker : public sigc::trackable
 class TempoMarker : public Marker
 {
   public:
 class TempoMarker : public Marker
 {
   public:
-       TempoMarker (PublicEditor& editor, GtkCanvasGroup *parent, guint32 rgba, const string& text, ARDOUR::TempoSection&, 
-                    gint (*callback)(GtkCanvasItem *, GdkEvent *, gpointer));
+       TempoMarker (PublicEditor& editor, GnomeCanvasGroup *parent, guint32 rgba, const string& text, ARDOUR::TempoSection&, 
+                    gint (*callback)(GnomeCanvasItem *, GdkEvent *, gpointer));
        ~TempoMarker ();
 
        ARDOUR::TempoSection& tempo() const { return _tempo; }
        ~TempoMarker ();
 
        ARDOUR::TempoSection& tempo() const { return _tempo; }
@@ -94,8 +94,8 @@ class TempoMarker : public Marker
 class MeterMarker : public Marker
 {
   public:
 class MeterMarker : public Marker
 {
   public:
-       MeterMarker (PublicEditor& editor, GtkCanvasGroup *parent, guint32 rgba, const string& text, ARDOUR::MeterSection&, 
-                    gint (*callback)(GtkCanvasItem *, GdkEvent *, gpointer));
+       MeterMarker (PublicEditor& editor, GnomeCanvasGroup *parent, guint32 rgba, const string& text, ARDOUR::MeterSection&, 
+                    gint (*callback)(GnomeCanvasItem *, GdkEvent *, gpointer));
        ~MeterMarker ();
 
        ARDOUR::MeterSection& meter() const { return _meter; }
        ~MeterMarker ();
 
        ARDOUR::MeterSection& meter() const { return _meter; }
index 44a169750d797d77ab5dbe2d8ebb00714ed9ac60..87a439980a3323d0cbc64a13d5872268e40b95e2 100644 (file)
@@ -65,8 +65,8 @@ MarkerTimeAxis::MarkerTimeAxis (PublicEditor& ed, ARDOUR::Session& sess, Widget
        _color = unique_random_color() ;
        time_axis_name = name ;
 
        _color = unique_random_color() ;
        time_axis_name = name ;
 
-       selection_group = gtk_canvas_item_new (GTK_CANVAS_GROUP(canvas_display), gtk_canvas_group_get_type (), 0) ;
-       gtk_canvas_item_hide(selection_group) ;
+       selection_group = gnome_canvas_item_new (GNOME_CANVAS_GROUP(canvas_display), gnome_canvas_group_get_type (), 0) ;
+       gnome_canvas_item_hide(selection_group) ;
 
        // intialize our data items
        name_prompter = 0 ;
 
        // intialize our data items
        name_prompter = 0 ;
index 56f8fc809d9f29594a5b2af7b412d7ca97ab97b1..099e100829a160b1e1dc94ae23b8aafca5413af3 100644 (file)
@@ -22,7 +22,7 @@
 #define __ardour_marker_time_axis_h__
 
 #include <gtkmm.h>
 #define __ardour_marker_time_axis_h__
 
 #include <gtkmm.h>
-#include <gtk-canvas.h>
+#include <libgnomecanvas/libgnomecanvas.h>
 
 #include "ardour_dialog.h"
 #include "route_ui.h"
 
 #include "ardour_dialog.h"
 #include "route_ui.h"
index 22b55d3ead0a8d466a0a87fc27b5581dd4d329c4..60216290f451a0226b2ea62afb4e4f9afebf70f5 100644 (file)
@@ -52,10 +52,10 @@ MarkerTimeAxisView::MarkerTimeAxisView(MarkerTimeAxis& tv)
        region_color = _trackview.color();
        stream_base_color = color_map[cMarkerTrackBase];
 
        region_color = _trackview.color();
        stream_base_color = color_map[cMarkerTrackBase];
 
-       canvas_group = gtk_canvas_item_new (GTK_CANVAS_GROUP(_trackview.canvas_display), gtk_canvas_group_get_type (), 0);
+       canvas_group = gnome_canvas_item_new (GNOME_CANVAS_GROUP(_trackview.canvas_display), gnome_canvas_group_get_type (), 0);
 
 
-       canvas_rect = gtk_canvas_item_new (GTK_CANVAS_GROUP(canvas_group),
-               gtk_canvas_simplerect_get_type(),
+       canvas_rect = gnome_canvas_item_new (GNOME_CANVAS_GROUP(canvas_group),
+               gnome_canvas_simplerect_get_type(),
                "x1", 0.0,
                "y1", 0.0,
                "x2", 1000000.0,
                "x1", 0.0,
                "y1", 0.0,
                "x2", 1000000.0,
@@ -142,7 +142,7 @@ MarkerTimeAxisView::set_height(gdouble h)
 int
 MarkerTimeAxisView::set_position(gdouble x, gdouble y)
 {
 int
 MarkerTimeAxisView::set_position(gdouble x, gdouble y)
 {
-       gtk_canvas_item_set (canvas_group, "x", x, "y", y, NULL);
+       gnome_canvas_item_set (canvas_group, "x", x, "y", y, NULL);
        return 0;
 }
 
        return 0;
 }
 
@@ -207,7 +207,7 @@ MarkerTimeAxisView::add_marker_view(ImageFrameView* ifv, std::string mark_type,
                return(0) ;
        }
        
                return(0) ;
        }
        
-       MarkerView* mv = new MarkerView(GTK_CANVAS_GROUP(canvas_group),
+       MarkerView* mv = new MarkerView(GNOME_CANVAS_GROUP(canvas_group),
                 &_trackview,
                 ifv,
                 _trackview.editor.get_current_zoom(),
                 &_trackview,
                 ifv,
                 _trackview.editor.get_current_zoom(),
index 26b070ef6ac3b6c67fdcac40985e193340863b8c..f611a38f2e6261cac8408fc8592d1eea2fcb9694 100644 (file)
@@ -24,7 +24,7 @@
 #include <list>
 
 #include <gtkmm.h>
 #include <list>
 
 #include <gtkmm.h>
-#include <gtk-canvas.h>
+#include <libgnomecanvas/libgnomecanvas.h>
 
 #include <ardour/location.h>
 
 
 #include <ardour/location.h>
 
@@ -73,7 +73,7 @@ class MarkerTimeAxisView : public sigc::trackable
                /**
                 *
                 */
                /**
                 *
                 */
-               GtkCanvasItem *canvas_item() { return canvas_group; }
+               GnomeCanvasItem *canvas_item() { return canvas_group; }
                
                
                //---------------------------------------------------------------------------------------//
                
                
                //---------------------------------------------------------------------------------------//
@@ -224,8 +224,8 @@ class MarkerTimeAxisView : public sigc::trackable
                /* the TimeAxisView that this object is acting as the view helper for */
                MarkerTimeAxis& _trackview ;
                
                /* the TimeAxisView that this object is acting as the view helper for */
                MarkerTimeAxis& _trackview ;
                
-               GtkCanvasItem *canvas_group ;
-               GtkCanvasItem *canvas_rect ; /* frame around the whole thing */
+               GnomeCanvasItem *canvas_group ;
+               GnomeCanvasItem *canvas_rect ; /* frame around the whole thing */
 
                /** the current samples per unit */
                double _samples_per_unit;
 
                /** the current samples per unit */
                double _samples_per_unit;
index 354f533e6b2d5b71fbfed5996437ed33af71bbd6..bf18c911dcaba9c07dfbbbc918207b466847cc8f 100644 (file)
@@ -47,7 +47,7 @@ sigc::signal<void,MarkerView*> MarkerView::GoingAway;
  * @param start the start time of this item
  * @param duration the duration of this item
  */
  * @param start the start time of this item
  * @param duration the duration of this item
  */
-MarkerView::MarkerView(GtkCanvasGroup *parent,
+MarkerView::MarkerView(GnomeCanvasGroup *parent,
        TimeAxisView* tv,
        ImageFrameView* marked,
        double spu,
        TimeAxisView* tv,
        ImageFrameView* marked,
        double spu,
index 1c69bdb334752cacdd5ada95d8f23866c854e877..3e5645bea512945070e0f69e310843c2012e2c07 100644 (file)
@@ -23,7 +23,7 @@
 
 #include <string>
 #include <gtkmm.h>
 
 #include <string>
 #include <gtkmm.h>
-#include <gtk-canvas.h>
+#include <libgnomecanvas/libgnomecanvas.h>
 #include "time_axis_view_item.h"
 
 class MarkerTimeAxisView ;
 #include "time_axis_view_item.h"
 
 class MarkerTimeAxisView ;
@@ -54,7 +54,7 @@ class MarkerView : public TimeAxisViewItem
                 * @param start the start time of this item
                 * @param duration the duration of this item
                 */
                 * @param start the start time of this item
                 * @param duration the duration of this item
                 */
-               MarkerView(GtkCanvasGroup *parent,
+               MarkerView(GnomeCanvasGroup *parent,
                        TimeAxisView *tv,
                        ImageFrameView* marked,
                        double spu,
                        TimeAxisView *tv,
                        ImageFrameView* marked,
                        double spu,
index 587a42f3e5b450201538bec2eee6ea4ac0b8d12c..ab1c00c14cb72dbae466353241de41de833a7c24 100644 (file)
@@ -44,7 +44,7 @@ PanAutomationTimeAxisView::~PanAutomationTimeAxisView ()
 }
 
 void
 }
 
 void
-PanAutomationTimeAxisView::add_automation_event (GtkCanvasItem* item, GdkEvent* event, jack_nframes_t when, double y)
+PanAutomationTimeAxisView::add_automation_event (GnomeCanvasItem* item, GdkEvent* event, jack_nframes_t when, double y)
 {
        if (lines.empty()) {
                /* no data, possibly caused by no outputs/inputs */
 {
        if (lines.empty()) {
                /* no data, possibly caused by no outputs/inputs */
@@ -63,7 +63,7 @@ PanAutomationTimeAxisView::add_automation_event (GtkCanvasItem* item, GdkEvent*
 
        double x = 0;
 
 
        double x = 0;
 
-       gtk_canvas_item_w2i (canvas_display, &x, &y);
+       gnome_canvas_item_w2i (canvas_display, &x, &y);
 
        /* compute vertical fractional position */
 
 
        /* compute vertical fractional position */
 
index 16b0808148ef1ea7252f9f8e09b5540eb2a64527..1f9a73acac1f4980b66e027157f2bc6544345576 100644 (file)
@@ -19,7 +19,7 @@ class PanAutomationTimeAxisView : public AutomationTimeAxisView
 
        ~PanAutomationTimeAxisView();
 
 
        ~PanAutomationTimeAxisView();
 
-       void add_automation_event (GtkCanvasItem *item, GdkEvent *event, jack_nframes_t, double);
+       void add_automation_event (GnomeCanvasItem *item, GdkEvent *event, jack_nframes_t, double);
        
    private:
         void automation_changed ();
        
    private:
         void automation_changed ();
index f14a216dcccfc3c09c095edadf7c73ac5a9ac02d..0526db14203787f4c10eef43ff4ad59e695d2c58 100644 (file)
@@ -14,131 +14,131 @@ PublicEditor::~PublicEditor()
 }
 
 gint
 }
 
 gint
-PublicEditor::canvas_fade_in_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) {
+PublicEditor::canvas_fade_in_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
        return instance()->_canvas_fade_in_event (item, event, data);
 }
 gint
        return instance()->_canvas_fade_in_event (item, event, data);
 }
 gint
-PublicEditor::canvas_fade_in_handle_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) {
+PublicEditor::canvas_fade_in_handle_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
        return instance()->_canvas_fade_in_handle_event (item, event, data);
 }
 gint
        return instance()->_canvas_fade_in_handle_event (item, event, data);
 }
 gint
-PublicEditor::canvas_fade_out_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) {
+PublicEditor::canvas_fade_out_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
        return instance()->_canvas_fade_out_event (item, event, data);
 }
 gint
        return instance()->_canvas_fade_out_event (item, event, data);
 }
 gint
-PublicEditor::canvas_fade_out_handle_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) {
+PublicEditor::canvas_fade_out_handle_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
        return instance()->_canvas_fade_out_handle_event (item, event, data);
 }
 gint
        return instance()->_canvas_fade_out_handle_event (item, event, data);
 }
 gint
-PublicEditor::canvas_crossfade_view_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) {
+PublicEditor::canvas_crossfade_view_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
        return instance()->_canvas_crossfade_view_event (item, event, data);
 }
 gint
        return instance()->_canvas_crossfade_view_event (item, event, data);
 }
 gint
-PublicEditor::canvas_region_view_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) {
+PublicEditor::canvas_region_view_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
        return instance()->_canvas_region_view_event (item, event, data);
 }
 gint
        return instance()->_canvas_region_view_event (item, event, data);
 }
 gint
-PublicEditor::canvas_region_view_name_highlight_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) {
+PublicEditor::canvas_region_view_name_highlight_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
        return instance()->_canvas_region_view_name_highlight_event (item, event, data);
 }
 gint
        return instance()->_canvas_region_view_name_highlight_event (item, event, data);
 }
 gint
-PublicEditor::canvas_region_view_name_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) {
+PublicEditor::canvas_region_view_name_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
        return instance()->_canvas_region_view_name_event (item, event, data);
 }
 gint
        return instance()->_canvas_region_view_name_event (item, event, data);
 }
 gint
-PublicEditor::canvas_stream_view_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) {
+PublicEditor::canvas_stream_view_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
        return instance()->_canvas_stream_view_event (item, event, data);
 }
 gint
        return instance()->_canvas_stream_view_event (item, event, data);
 }
 gint
-PublicEditor::canvas_automation_track_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) {
+PublicEditor::canvas_automation_track_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
        return instance()->_canvas_automation_track_event (item, event, data);
 }
 gint
        return instance()->_canvas_automation_track_event (item, event, data);
 }
 gint
-PublicEditor::canvas_marker_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) {
+PublicEditor::canvas_marker_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
        return instance()->_canvas_marker_event (item, event, data);
 }
 gint
        return instance()->_canvas_marker_event (item, event, data);
 }
 gint
-PublicEditor::canvas_zoom_rect_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) {
+PublicEditor::canvas_zoom_rect_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
        return instance()->_canvas_zoom_rect_event (item, event, data);
 }
 gint
        return instance()->_canvas_zoom_rect_event (item, event, data);
 }
 gint
-PublicEditor::canvas_selection_rect_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) {
+PublicEditor::canvas_selection_rect_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
        return instance()->_canvas_selection_rect_event (item, event, data);
 }
 gint
        return instance()->_canvas_selection_rect_event (item, event, data);
 }
 gint
-PublicEditor::canvas_selection_start_trim_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) {
+PublicEditor::canvas_selection_start_trim_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
        return instance()->_canvas_selection_start_trim_event (item, event, data);
 }
 gint
        return instance()->_canvas_selection_start_trim_event (item, event, data);
 }
 gint
-PublicEditor::canvas_selection_end_trim_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) {
+PublicEditor::canvas_selection_end_trim_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
        return instance()->_canvas_selection_end_trim_event (item, event, data);
 }
 gint
        return instance()->_canvas_selection_end_trim_event (item, event, data);
 }
 gint
-PublicEditor::canvas_control_point_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) {
+PublicEditor::canvas_control_point_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
        return instance()->_canvas_control_point_event (item, event, data);
 }
 gint
        return instance()->_canvas_control_point_event (item, event, data);
 }
 gint
-PublicEditor::canvas_line_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) {
+PublicEditor::canvas_line_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
        return instance()->_canvas_line_event (item, event, data);
 }
 gint
        return instance()->_canvas_line_event (item, event, data);
 }
 gint
-PublicEditor::canvas_tempo_marker_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) {
+PublicEditor::canvas_tempo_marker_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
        return instance()->_canvas_tempo_marker_event (item, event, data);
 }
 gint
        return instance()->_canvas_tempo_marker_event (item, event, data);
 }
 gint
-PublicEditor::canvas_meter_marker_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) {
+PublicEditor::canvas_meter_marker_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
        return instance()->_canvas_meter_marker_event (item, event, data);
 }
 gint
        return instance()->_canvas_meter_marker_event (item, event, data);
 }
 gint
-PublicEditor::canvas_tempo_bar_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) {
+PublicEditor::canvas_tempo_bar_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
        return instance()->_canvas_tempo_bar_event (item, event, data);
 }
 gint
        return instance()->_canvas_tempo_bar_event (item, event, data);
 }
 gint
-PublicEditor::canvas_meter_bar_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) {
+PublicEditor::canvas_meter_bar_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
        return instance()->_canvas_meter_bar_event (item, event, data);
 }
 gint
        return instance()->_canvas_meter_bar_event (item, event, data);
 }
 gint
-PublicEditor::canvas_marker_bar_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) {
+PublicEditor::canvas_marker_bar_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
        return instance()->_canvas_marker_bar_event (item, event, data);
 }
 gint
        return instance()->_canvas_marker_bar_event (item, event, data);
 }
 gint
-PublicEditor::canvas_range_marker_bar_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) {
+PublicEditor::canvas_range_marker_bar_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
        return instance()->_canvas_range_marker_bar_event (item, event, data);
 }
 gint
        return instance()->_canvas_range_marker_bar_event (item, event, data);
 }
 gint
-PublicEditor::canvas_transport_marker_bar_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) {
+PublicEditor::canvas_transport_marker_bar_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
        return instance()->_canvas_transport_marker_bar_event (item, event, data);
 }
        
 gint
        return instance()->_canvas_transport_marker_bar_event (item, event, data);
 }
        
 gint
-PublicEditor::canvas_imageframe_item_view_event(GtkCanvasItem *item, GdkEvent* event, gpointer data) {
+PublicEditor::canvas_imageframe_item_view_event(GnomeCanvasItem *item, GdkEvent* event, gpointer data) {
        return instance()->_canvas_imageframe_item_view_event(item, event, data);
 }
 gint
        return instance()->_canvas_imageframe_item_view_event(item, event, data);
 }
 gint
-PublicEditor::canvas_imageframe_view_event(GtkCanvasItem *item, GdkEvent* event, gpointer data) {
+PublicEditor::canvas_imageframe_view_event(GnomeCanvasItem *item, GdkEvent* event, gpointer data) {
        return instance()->_canvas_imageframe_view_event(item, event, data);
 }
 gint
        return instance()->_canvas_imageframe_view_event(item, event, data);
 }
 gint
-PublicEditor::canvas_imageframe_start_handle_event(GtkCanvasItem* item, GdkEvent* event, gpointer data) {
+PublicEditor::canvas_imageframe_start_handle_event(GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
        return instance()->_canvas_imageframe_start_handle_event(item, event, data);
 }
 gint
        return instance()->_canvas_imageframe_start_handle_event(item, event, data);
 }
 gint
-PublicEditor::canvas_imageframe_end_handle_event(GtkCanvasItem* item, GdkEvent* event, gpointer data) {
+PublicEditor::canvas_imageframe_end_handle_event(GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
        return instance()->_canvas_imageframe_end_handle_event(item, event, data);
 }
 gint
        return instance()->_canvas_imageframe_end_handle_event(item, event, data);
 }
 gint
-PublicEditor::canvas_marker_time_axis_view_event(GtkCanvasItem* item, GdkEvent* event, gpointer data) {
+PublicEditor::canvas_marker_time_axis_view_event(GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
        return instance()->_canvas_marker_time_axis_view_event(item, event, data);
 }
 gint
        return instance()->_canvas_marker_time_axis_view_event(item, event, data);
 }
 gint
-PublicEditor::canvas_markerview_item_view_event(GtkCanvasItem* item, GdkEvent* event, gpointer data) {
+PublicEditor::canvas_markerview_item_view_event(GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
        return instance()->_canvas_markerview_item_view_event(item, event, data);
 }
 gint
        return instance()->_canvas_markerview_item_view_event(item, event, data);
 }
 gint
-PublicEditor::canvas_markerview_start_handle_event(GtkCanvasItem* item, GdkEvent* event, gpointer data) {
+PublicEditor::canvas_markerview_start_handle_event(GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
        return instance()->_canvas_markerview_start_handle_event(item, event, data);
 }
 gint
        return instance()->_canvas_markerview_start_handle_event(item, event, data);
 }
 gint
-PublicEditor::canvas_markerview_end_handle_event(GtkCanvasItem* item, GdkEvent* event, gpointer data) {
+PublicEditor::canvas_markerview_end_handle_event(GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
        return instance()->_canvas_markerview_end_handle_event(item, event, data);
 }
        return instance()->_canvas_markerview_end_handle_event(item, event, data);
 }
index d75abb1d007308a4c876e887c750255fdbb5b5e8..42a68beea47f92014eec3f18f3f207b5bee8f704 100644 (file)
@@ -6,7 +6,7 @@
 #include <string>
 #include <glib.h>
 #include <gdk/gdktypes.h>
 #include <string>
 #include <glib.h>
 #include <gdk/gdktypes.h>
-#include <gtk-canvas.h>
+#include <libgnomecanvas/libgnomecanvas.h>
 #include <gtkmm/window.h>
 #include <jack/types.h>
 #include <sigc++/signal.h>
 #include <gtkmm/window.h>
 #include <jack/types.h>
 #include <sigc++/signal.h>
@@ -114,72 +114,72 @@ class PublicEditor : public Gtk::Window, public Stateful, public KeyboardTarget
        sigc::signal<void> XOriginChanged;
        sigc::signal<void> Resized;
 
        sigc::signal<void> XOriginChanged;
        sigc::signal<void> Resized;
 
-       static gint canvas_crossfade_view_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
-       static gint canvas_fade_in_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
-       static gint canvas_fade_in_handle_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
-       static gint canvas_fade_out_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
-       static gint canvas_fade_out_handle_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
-       static gint canvas_region_view_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
-       static gint canvas_region_view_name_highlight_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
-       static gint canvas_region_view_name_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
-       static gint canvas_stream_view_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
-       static gint canvas_marker_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
-       static gint canvas_zoom_rect_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
-       static gint canvas_selection_rect_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
-       static gint canvas_selection_start_trim_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
-       static gint canvas_selection_end_trim_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
-       static gint canvas_control_point_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
-       static gint canvas_line_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
-       static gint canvas_tempo_marker_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
-       static gint canvas_meter_marker_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
-       static gint canvas_tempo_bar_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
-       static gint canvas_meter_bar_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
-       static gint canvas_marker_bar_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
-       static gint canvas_range_marker_bar_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
-       static gint canvas_transport_marker_bar_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
-       static gint canvas_imageframe_item_view_event(GtkCanvasItem *item, GdkEvent* event, gpointer data) ;
-       static gint canvas_imageframe_view_event(GtkCanvasItem *item, GdkEvent* event, gpointer data) ;
-       static gint canvas_imageframe_start_handle_event(GtkCanvasItem* item, GdkEvent* event, gpointer data) ;
-       static gint canvas_imageframe_end_handle_event(GtkCanvasItem* item, GdkEvent* event, gpointer data) ;
-       static gint canvas_marker_time_axis_view_event(GtkCanvasItem* item, GdkEvent* event, gpointer data) ;
-       static gint canvas_markerview_item_view_event(GtkCanvasItem* item, GdkEvent* event, gpointer data) ;
-       static gint canvas_markerview_start_handle_event(GtkCanvasItem* item, GdkEvent* event, gpointer data) ;
-       static gint canvas_markerview_end_handle_event(GtkCanvasItem* item, GdkEvent* event, gpointer data) ;
-       static gint canvas_automation_track_event(GtkCanvasItem* item, GdkEvent* event, gpointer data) ;
+       static gint canvas_crossfade_view_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
+       static gint canvas_fade_in_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
+       static gint canvas_fade_in_handle_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
+       static gint canvas_fade_out_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
+       static gint canvas_fade_out_handle_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
+       static gint canvas_region_view_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
+       static gint canvas_region_view_name_highlight_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
+       static gint canvas_region_view_name_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
+       static gint canvas_stream_view_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
+       static gint canvas_marker_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
+       static gint canvas_zoom_rect_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
+       static gint canvas_selection_rect_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
+       static gint canvas_selection_start_trim_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
+       static gint canvas_selection_end_trim_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
+       static gint canvas_control_point_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
+       static gint canvas_line_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
+       static gint canvas_tempo_marker_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
+       static gint canvas_meter_marker_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
+       static gint canvas_tempo_bar_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
+       static gint canvas_meter_bar_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
+       static gint canvas_marker_bar_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
+       static gint canvas_range_marker_bar_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
+       static gint canvas_transport_marker_bar_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
+       static gint canvas_imageframe_item_view_event(GnomeCanvasItem *item, GdkEvent* event, gpointer data) ;
+       static gint canvas_imageframe_view_event(GnomeCanvasItem *item, GdkEvent* event, gpointer data) ;
+       static gint canvas_imageframe_start_handle_event(GnomeCanvasItem* item, GdkEvent* event, gpointer data) ;
+       static gint canvas_imageframe_end_handle_event(GnomeCanvasItem* item, GdkEvent* event, gpointer data) ;
+       static gint canvas_marker_time_axis_view_event(GnomeCanvasItem* item, GdkEvent* event, gpointer data) ;
+       static gint canvas_markerview_item_view_event(GnomeCanvasItem* item, GdkEvent* event, gpointer data) ;
+       static gint canvas_markerview_start_handle_event(GnomeCanvasItem* item, GdkEvent* event, gpointer data) ;
+       static gint canvas_markerview_end_handle_event(GnomeCanvasItem* item, GdkEvent* event, gpointer data) ;
+       static gint canvas_automation_track_event(GnomeCanvasItem* item, GdkEvent* event, gpointer data) ;
 
   protected:
 
   protected:
-       virtual gint _canvas_fade_in_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
-       virtual gint _canvas_fade_in_handle_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
-       virtual gint _canvas_fade_out_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
-       virtual gint _canvas_fade_out_handle_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
-       virtual gint _canvas_crossfade_view_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
-       virtual gint _canvas_region_view_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
-       virtual gint _canvas_region_view_name_highlight_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
-       virtual gint _canvas_region_view_name_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
-       virtual gint _canvas_stream_view_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
-       virtual gint _canvas_marker_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
-       virtual gint _canvas_zoom_rect_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
-       virtual gint _canvas_selection_rect_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
-       virtual gint _canvas_selection_start_trim_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
-       virtual gint _canvas_selection_end_trim_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
-       virtual gint _canvas_control_point_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
-       virtual gint _canvas_line_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
-       virtual gint _canvas_tempo_marker_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
-       virtual gint _canvas_meter_marker_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
-       virtual gint _canvas_tempo_bar_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
-       virtual gint _canvas_meter_bar_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
-       virtual gint _canvas_marker_bar_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
-       virtual gint _canvas_range_marker_bar_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
-       virtual gint _canvas_transport_marker_bar_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
-       virtual gint _canvas_imageframe_item_view_event(GtkCanvasItem *item, GdkEvent* event, gpointer data) = 0;
-       virtual gint _canvas_imageframe_view_event(GtkCanvasItem *item, GdkEvent* event, gpointer data) = 0;
-       virtual gint _canvas_imageframe_start_handle_event(GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
-       virtual gint _canvas_imageframe_end_handle_event(GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
-       virtual gint _canvas_marker_time_axis_view_event(GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
-       virtual gint _canvas_markerview_item_view_event(GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
-       virtual gint _canvas_markerview_start_handle_event(GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
-       virtual gint _canvas_markerview_end_handle_event(GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
-       virtual gint _canvas_automation_track_event(GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
+       virtual gint _canvas_fade_in_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
+       virtual gint _canvas_fade_in_handle_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
+       virtual gint _canvas_fade_out_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
+       virtual gint _canvas_fade_out_handle_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
+       virtual gint _canvas_crossfade_view_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
+       virtual gint _canvas_region_view_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
+       virtual gint _canvas_region_view_name_highlight_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
+       virtual gint _canvas_region_view_name_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
+       virtual gint _canvas_stream_view_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
+       virtual gint _canvas_marker_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
+       virtual gint _canvas_zoom_rect_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
+       virtual gint _canvas_selection_rect_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
+       virtual gint _canvas_selection_start_trim_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
+       virtual gint _canvas_selection_end_trim_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
+       virtual gint _canvas_control_point_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
+       virtual gint _canvas_line_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
+       virtual gint _canvas_tempo_marker_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
+       virtual gint _canvas_meter_marker_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
+       virtual gint _canvas_tempo_bar_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
+       virtual gint _canvas_meter_bar_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
+       virtual gint _canvas_marker_bar_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
+       virtual gint _canvas_range_marker_bar_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
+       virtual gint _canvas_transport_marker_bar_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
+       virtual gint _canvas_imageframe_item_view_event(GnomeCanvasItem *item, GdkEvent* event, gpointer data) = 0;
+       virtual gint _canvas_imageframe_view_event(GnomeCanvasItem *item, GdkEvent* event, gpointer data) = 0;
+       virtual gint _canvas_imageframe_start_handle_event(GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
+       virtual gint _canvas_imageframe_end_handle_event(GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
+       virtual gint _canvas_marker_time_axis_view_event(GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
+       virtual gint _canvas_markerview_item_view_event(GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
+       virtual gint _canvas_markerview_start_handle_event(GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
+       virtual gint _canvas_markerview_end_handle_event(GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
+       virtual gint _canvas_automation_track_event(GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
 
        static PublicEditor* _instance;
 };
 
        static PublicEditor* _instance;
 };
index 138d376a65f0928d53ef1a5d2443a1e6fb243ad9..fb79c1288b7398c08b7177b9ec1f24e054c621ac 100644 (file)
@@ -34,10 +34,10 @@ using namespace std;
 using namespace ARDOUR;
 
 RedirectAutomationLine::RedirectAutomationLine (string name, Redirect& rd, uint32_t port, Session& s,
 using namespace ARDOUR;
 
 RedirectAutomationLine::RedirectAutomationLine (string name, Redirect& rd, uint32_t port, Session& s,
-                                               TimeAxisView& tv, GtkCanvasItem* parent,
+                                               TimeAxisView& tv, GnomeCanvasItem* parent,
                                                AutomationList& l,
                                                AutomationList& l,
-                                               gint (*point_callback)(GtkCanvasItem*, GdkEvent*, gpointer),
-                                               gint (*line_callback)(GtkCanvasItem*, GdkEvent*, gpointer))
+                                               gint (*point_callback)(GnomeCanvasItem*, GdkEvent*, gpointer),
+                                               gint (*line_callback)(GnomeCanvasItem*, GdkEvent*, gpointer))
 
        : AutomationLine (name, tv, parent, l, point_callback, line_callback),
          session (s),
 
        : AutomationLine (name, tv, parent, l, point_callback, line_callback),
          session (s),
index 4583cbc20101831dba463f94a9ec54b10b511f9d..4b7d6a14d29d57937a6a00ee6b3fc015d00d8f9f 100644 (file)
@@ -22,7 +22,7 @@
 #define __ardour_gtk_redirect_automation_line_h__
 
 #include <ardour/ardour.h>
 #define __ardour_gtk_redirect_automation_line_h__
 
 #include <ardour/ardour.h>
-#include <gtk-canvas.h>
+#include <libgnomecanvas/libgnomecanvas.h>
 #include <gtkmm.h>
 
 #include "automation_line.h"
 #include <gtkmm.h>
 
 #include "automation_line.h"
@@ -37,10 +37,10 @@ class TimeAxisView;
 class RedirectAutomationLine : public AutomationLine
 {
   public:
 class RedirectAutomationLine : public AutomationLine
 {
   public:
-       RedirectAutomationLine (string name, ARDOUR::Redirect&, uint32_t port, ARDOUR::Session&, TimeAxisView&, GtkCanvasItem* parent,
+       RedirectAutomationLine (string name, ARDOUR::Redirect&, uint32_t port, ARDOUR::Session&, TimeAxisView&, GnomeCanvasItem* parent,
                                ARDOUR::AutomationList&, 
                                ARDOUR::AutomationList&, 
-                               gint (*point_callback)(GtkCanvasItem*, GdkEvent*, gpointer),
-                               gint (*line_callback)(GtkCanvasItem*, GdkEvent*, gpointer));
+                               gint (*point_callback)(GnomeCanvasItem*, GdkEvent*, gpointer),
+                               gint (*line_callback)(GnomeCanvasItem*, GdkEvent*, gpointer));
        
        uint32_t port() const { return _port; }
        ARDOUR::Redirect& redirect() const { return _redirect; }
        
        uint32_t port() const { return _port; }
        ARDOUR::Redirect& redirect() const { return _redirect; }
index 5bbd7e290fe9cfb75fbe7b586bfe166f8376ccf5..1f9c9f65908568afb20509a513fc9fa400993461 100644 (file)
@@ -70,11 +70,11 @@ RedirectAutomationTimeAxisView::~RedirectAutomationTimeAxisView ()
 }
 
 void
 }
 
 void
-RedirectAutomationTimeAxisView::add_automation_event (GtkCanvasItem* item, GdkEvent* event, jack_nframes_t when, double y)
+RedirectAutomationTimeAxisView::add_automation_event (GnomeCanvasItem* item, GdkEvent* event, jack_nframes_t when, double y)
 {
        double x = 0;
 
 {
        double x = 0;
 
-       gtk_canvas_item_w2i (canvas_display, &x, &y);
+       gnome_canvas_item_w2i (canvas_display, &x, &y);
 
        /* compute vertical fractional position */
 
 
        /* compute vertical fractional position */
 
index d4e7a46e71096c5cf29f68bcb5da0dd3920ed454..6fce580373ede6450b30221e33793674bcbb0683 100644 (file)
@@ -23,7 +23,7 @@ class RedirectAutomationTimeAxisView : public AutomationTimeAxisView
 
        ~RedirectAutomationTimeAxisView();
 
 
        ~RedirectAutomationTimeAxisView();
 
-       void add_automation_event (GtkCanvasItem *item, GdkEvent *event, jack_nframes_t, double);
+       void add_automation_event (GnomeCanvasItem *item, GdkEvent *event, jack_nframes_t, double);
 
        guint32 show_at (double y, int& nth, Gtk::VBox *parent);
        void hide ();
 
        guint32 show_at (double y, int& nth, Gtk::VBox *parent);
        void hide ();
index 0db191513fda5770221cb2d1f72a88944598d675..fcf84beb3b1247c3c755bf4090a8387a18d86406 100644 (file)
@@ -24,7 +24,7 @@
 #include <map>
 
 #include <gtkmm.h>
 #include <map>
 
 #include <gtkmm.h>
-#include <gtk-canvas.h>
+#include <libgnomecanvas/libgnomecanvas.h>
 #include <sigc++/signal.h>
 
 #include "audio_clock.h"
 #include <sigc++/signal.h>
 
 #include "audio_clock.h"
index 40ed9a63b91e9bbf07f26543106ac0a74279b2b8..32f891321e60177b64617eb102f404ee5fb3478d 100644 (file)
 using namespace std;
 using namespace ARDOUR;
 
 using namespace std;
 using namespace ARDOUR;
 
-AudioRegionGainLine::AudioRegionGainLine (string name, Session& s, AudioRegionView& r, GtkCanvasItem* parent,
+AudioRegionGainLine::AudioRegionGainLine (string name, Session& s, AudioRegionView& r, GnomeCanvasItem* parent,
                                          Curve& c, 
                                          Curve& c, 
-                                         gint (*point_callback)(GtkCanvasItem*, GdkEvent*, gpointer),
-                                         gint (*line_callback)(GtkCanvasItem*, GdkEvent*, gpointer))
+                                         gint (*point_callback)(GnomeCanvasItem*, GdkEvent*, gpointer),
+                                         gint (*line_callback)(GnomeCanvasItem*, GdkEvent*, gpointer))
        : AutomationLine (name, r.get_time_axis_view(), parent, c, point_callback, line_callback),
          session (s),
          rv (r)
 {
        : AutomationLine (name, r.get_time_axis_view(), parent, c, point_callback, line_callback),
          session (s),
          rv (r)
 {
-       gtk_canvas_item_raise_to_top (group);
+       gnome_canvas_item_raise_to_top (group);
        set_verbose_cursor_uses_gain_mapping (true);
        terminal_points_can_slide = false;
 }
        set_verbose_cursor_uses_gain_mapping (true);
        terminal_points_can_slide = false;
 }
index 807ffac7c4542d311d576f601ff39c875c584dd1..feff8abff3a73ef67b239d6431e0900ceaad5217 100644 (file)
@@ -2,7 +2,7 @@
 #define __ardour_gtk_region_gain_line_h__
 
 #include <ardour/ardour.h>
 #define __ardour_gtk_region_gain_line_h__
 
 #include <ardour/ardour.h>
-#include <gtk-canvas.h>
+#include <libgnomecanvas/libgnomecanvas.h>
 #include <gtkmm.h>
 
 #include "automation_line.h"
 #include <gtkmm.h>
 
 #include "automation_line.h"
@@ -17,10 +17,10 @@ class AudioRegionView;
 class AudioRegionGainLine : public AutomationLine
 {
   public:
 class AudioRegionGainLine : public AutomationLine
 {
   public:
-       AudioRegionGainLine (string name, ARDOUR::Session&, AudioRegionView&, GtkCanvasItem* parent,
+       AudioRegionGainLine (string name, ARDOUR::Session&, AudioRegionView&, GnomeCanvasItem* parent,
                             ARDOUR::Curve&, 
                             ARDOUR::Curve&, 
-                            gint (*point_callback)(GtkCanvasItem*, GdkEvent*, gpointer),
-                            gint (*line_callback)(GtkCanvasItem*, GdkEvent*, gpointer));
+                            gint (*point_callback)(GnomeCanvasItem*, GdkEvent*, gpointer),
+                            gint (*line_callback)(GnomeCanvasItem*, GdkEvent*, gpointer));
        
        void view_to_model_y (double&);
        void model_to_view_y (double&);
        
        void view_to_model_y (double&);
        void model_to_view_y (double&);
index 9ec42bd62b0f85aab9540a8f14dc65c9b445217b..34e80327c20074ddaf4dffa7e14a2fe07640d53d 100644 (file)
@@ -55,7 +55,7 @@ static const int32_t sync_mark_width = 9;
 
 sigc::signal<void,AudioRegionView*> AudioRegionView::AudioRegionViewGoingAway;
 
 
 sigc::signal<void,AudioRegionView*> AudioRegionView::AudioRegionViewGoingAway;
 
-AudioRegionView::AudioRegionView (GtkCanvasGroup *parent, AudioTimeAxisView &tv, 
+AudioRegionView::AudioRegionView (GnomeCanvasGroup *parent, AudioTimeAxisView &tv, 
                                  AudioRegion& r, 
                                  double spu, 
                                  double amplitude_above_axis,
                                  AudioRegion& r, 
                                  double spu, 
                                  double amplitude_above_axis,
@@ -69,7 +69,7 @@ AudioRegionView::AudioRegionView (GtkCanvasGroup *parent, AudioTimeAxisView &tv,
 
          region (r)
 {
 
          region (r)
 {
-       GtkCanvasPoints *shape;
+       GnomeCanvasPoints *shape;
        XMLNode *node;
 
        editor = 0;
        XMLNode *node;
 
        editor = 0;
@@ -100,7 +100,7 @@ AudioRegionView::AudioRegionView (GtkCanvasGroup *parent, AudioTimeAxisView &tv,
        gtk_object_set_data (GTK_OBJECT(name_highlight), "regionview", this);
        gtk_object_set_data (GTK_OBJECT(name_text), "regionview", this);
 
        gtk_object_set_data (GTK_OBJECT(name_highlight), "regionview", this);
        gtk_object_set_data (GTK_OBJECT(name_text), "regionview", this);
 
-       shape = gtk_canvas_points_new (4);
+       shape = gnome_canvas_points_new (4);
 
        /* an equilateral triangle */
 
 
        /* an equilateral triangle */
 
@@ -117,23 +117,23 @@ AudioRegionView::AudioRegionView (GtkCanvasGroup *parent, AudioTimeAxisView &tv,
        shape->coords[7] = 1;
 
        // cerr << "set sync mark al points, nc = " << shape->num_points << endl;
        shape->coords[7] = 1;
 
        // cerr << "set sync mark al points, nc = " << shape->num_points << endl;
-       sync_mark = gtk_canvas_item_new (GTK_CANVAS_GROUP(group),
-                                        gtk_canvas_polygon_get_type(),
+       sync_mark = gnome_canvas_item_new (GNOME_CANVAS_GROUP(group),
+                                        gnome_canvas_polygon_get_type(),
                                         "points", shape,
                                         "fill_color_rgba", fill_color,
                                         NULL);
                                         "points", shape,
                                         "fill_color_rgba", fill_color,
                                         NULL);
-       gtk_canvas_item_hide (sync_mark);
-       gtk_canvas_points_unref (shape);
+       gnome_canvas_item_hide (sync_mark);
+       gnome_canvas_points_unref (shape);
 
        
 
        
-       fade_in_shape = gtk_canvas_item_new (GTK_CANVAS_GROUP(group),
-                                            gtk_canvas_polygon_get_type(),
+       fade_in_shape = gnome_canvas_item_new (GNOME_CANVAS_GROUP(group),
+                                            gnome_canvas_polygon_get_type(),
                                             "fill_color_rgba", fade_color,
                                             NULL);
        gtk_object_set_data (GTK_OBJECT(fade_in_shape), "regionview", this);
 
                                             "fill_color_rgba", fade_color,
                                             NULL);
        gtk_object_set_data (GTK_OBJECT(fade_in_shape), "regionview", this);
 
-       fade_out_shape = gtk_canvas_item_new (GTK_CANVAS_GROUP(group),
-                                             gtk_canvas_polygon_get_type(),
+       fade_out_shape = gnome_canvas_item_new (GNOME_CANVAS_GROUP(group),
+                                             gnome_canvas_polygon_get_type(),
                                              "fill_color_rgba", fade_color,
                                              NULL);
        gtk_object_set_data (GTK_OBJECT(fade_out_shape), "regionview", this);
                                              "fill_color_rgba", fade_color,
                                              NULL);
        gtk_object_set_data (GTK_OBJECT(fade_out_shape), "regionview", this);
@@ -145,8 +145,8 @@ AudioRegionView::AudioRegionView (GtkCanvasGroup *parent, AudioTimeAxisView &tv,
                        UINT_TO_RGBA(fill_color,&r,&g,&b,&a);
        
 
                        UINT_TO_RGBA(fill_color,&r,&g,&b,&a);
        
 
-       fade_in_handle = gtk_canvas_item_new (GTK_CANVAS_GROUP(group),
-                                             gtk_canvas_simplerect_get_type(),
+       fade_in_handle = gnome_canvas_item_new (GNOME_CANVAS_GROUP(group),
+                                             gnome_canvas_simplerect_get_type(),
                                              "fill_color_rgba", RGBA_TO_UINT(r,g,b,0),
                                              "outline_pixels", 0,
                                              "y1", 2.0,
                                              "fill_color_rgba", RGBA_TO_UINT(r,g,b,0),
                                              "outline_pixels", 0,
                                              "y1", 2.0,
@@ -154,8 +154,8 @@ AudioRegionView::AudioRegionView (GtkCanvasGroup *parent, AudioTimeAxisView &tv,
                                              NULL);
        gtk_object_set_data (GTK_OBJECT(fade_in_handle), "regionview", this);
        
                                              NULL);
        gtk_object_set_data (GTK_OBJECT(fade_in_handle), "regionview", this);
        
-       fade_out_handle = gtk_canvas_item_new (GTK_CANVAS_GROUP(group),
-                                              gtk_canvas_simplerect_get_type(),
+       fade_out_handle = gnome_canvas_item_new (GNOME_CANVAS_GROUP(group),
+                                              gnome_canvas_simplerect_get_type(),
                                               "fill_color_rgba", RGBA_TO_UINT(r,g,b,0),
                                               "outline_pixels", 0,
                                               "y1", 2.0,
                                               "fill_color_rgba", RGBA_TO_UINT(r,g,b,0),
                                               "outline_pixels", 0,
                                               "y1", 2.0,
@@ -234,8 +234,8 @@ AudioRegionView::~AudioRegionView ()
 
        AudioRegionViewGoingAway (this); /* EMIT_SIGNAL */
 
 
        AudioRegionViewGoingAway (this); /* EMIT_SIGNAL */
 
-       for (vector<GtkCanvasWaveViewCache *>::iterator cache = wave_caches.begin(); cache != wave_caches.end() ; ++cache) {
-               gtk_canvas_waveview_cache_destroy (*cache);
+       for (vector<GnomeCanvasWaveViewCache *>::iterator cache = wave_caches.begin(); cache != wave_caches.end() ; ++cache) {
+               gnome_canvas_waveview_cache_destroy (*cache);
        }
 
        /* all waveviews will be destroyed when the group is destroyed */
        }
 
        /* all waveviews will be destroyed when the group is destroyed */
@@ -252,7 +252,7 @@ AudioRegionView::~AudioRegionView ()
 }
 
 gint
 }
 
 gint
-AudioRegionView::_lock_toggle (GtkCanvasItem* item, GdkEvent* ev, void* arg)
+AudioRegionView::_lock_toggle (GnomeCanvasItem* item, GdkEvent* ev, void* arg)
 {
        switch (ev->type) {
        case GDK_BUTTON_RELEASE:
 {
        switch (ev->type) {
        case GDK_BUTTON_RELEASE:
@@ -351,14 +351,14 @@ AudioRegionView::fade_in_active_changed ()
 
        if (region.fade_in_active()) {
                col = RGBA_TO_UINT(r,g,b,120);
 
        if (region.fade_in_active()) {
                col = RGBA_TO_UINT(r,g,b,120);
-               gtk_canvas_item_set (fade_in_shape, 
+               gnome_canvas_item_set (fade_in_shape, 
                                     "fill_color_rgba", col,
                                     "width_pixels", 0,
                                     "outline_color_rgba", RGBA_TO_UINT(r,g,b,0),
                                     NULL);
        } else { 
                col = RGBA_TO_UINT(r,g,b,0);
                                     "fill_color_rgba", col,
                                     "width_pixels", 0,
                                     "outline_color_rgba", RGBA_TO_UINT(r,g,b,0),
                                     NULL);
        } else { 
                col = RGBA_TO_UINT(r,g,b,0);
-               gtk_canvas_item_set (fade_in_shape, 
+               gnome_canvas_item_set (fade_in_shape, 
                                     "fill_color_rgba", col,
                                     "width_pixels", 1,
                                     "outline_color_rgba", RGBA_TO_UINT(r,g,b,255),
                                     "fill_color_rgba", col,
                                     "width_pixels", 1,
                                     "outline_color_rgba", RGBA_TO_UINT(r,g,b,255),
@@ -375,14 +375,14 @@ AudioRegionView::fade_out_active_changed ()
 
        if (region.fade_out_active()) {
                col = RGBA_TO_UINT(r,g,b,120);
 
        if (region.fade_out_active()) {
                col = RGBA_TO_UINT(r,g,b,120);
-               gtk_canvas_item_set (fade_out_shape, 
+               gnome_canvas_item_set (fade_out_shape, 
                                     "fill_color_rgba", col,
                                     "width_pixels", 0,
                                     "outline_color_rgba", RGBA_TO_UINT(r,g,b,0),
                                     NULL);
        } else { 
                col = RGBA_TO_UINT(r,g,b,0);
                                     "fill_color_rgba", col,
                                     "width_pixels", 0,
                                     "outline_color_rgba", RGBA_TO_UINT(r,g,b,0),
                                     NULL);
        } else { 
                col = RGBA_TO_UINT(r,g,b,0);
-               gtk_canvas_item_set (fade_out_shape, 
+               gnome_canvas_item_set (fade_out_shape, 
                                     "fill_color_rgba", col,
                                     "width_pixels", 1,
                                     "outline_color_rgba", RGBA_TO_UINT(r,g,b,255),
                                     "fill_color_rgba", col,
                                     "width_pixels", 1,
                                     "outline_color_rgba", RGBA_TO_UINT(r,g,b,255),
@@ -398,7 +398,7 @@ AudioRegionView::region_scale_amplitude_changed ()
 
        for (uint32_t n = 0; n < waves.size(); ++n) {
                // force a reload of the cache
 
        for (uint32_t n = 0; n < waves.size(); ++n) {
                // force a reload of the cache
-               gtk_canvas_item_set (waves[n], "data_src", &region, NULL);
+               gnome_canvas_item_set (waves[n], "data_src", &region, NULL);
        }
 }
 
        }
 }
 
@@ -427,15 +427,15 @@ AudioRegionView::region_resized (Change what_changed)
                reset_width_dependent_items (unit_length);
                
                for (uint32_t n = 0; n < waves.size(); ++n) {
                reset_width_dependent_items (unit_length);
                
                for (uint32_t n = 0; n < waves.size(); ++n) {
-                       gtk_canvas_item_set (waves[n], "region_start", (guint32) region.start(), NULL);
+                       gnome_canvas_item_set (waves[n], "region_start", (guint32) region.start(), NULL);
                }
                
                for (vector<GhostRegion*>::iterator i = ghosts.begin(); i != ghosts.end(); ++i) {
 
                        (*i)->set_duration (unit_length);
 
                }
                
                for (vector<GhostRegion*>::iterator i = ghosts.begin(); i != ghosts.end(); ++i) {
 
                        (*i)->set_duration (unit_length);
 
-                       for (vector<GtkCanvasItem*>::iterator w = (*i)->waves.begin(); w != (*i)->waves.end(); ++w) {
-                               gtk_canvas_item_set ((*w), "region_start", region.start(), NULL);
+                       for (vector<GnomeCanvasItem*>::iterator w = (*i)->waves.begin(); w != (*i)->waves.end(); ++w) {
+                               gnome_canvas_item_set ((*w), "region_start", region.start(), NULL);
                        }
                }
        }
                        }
                }
        }
@@ -448,19 +448,19 @@ AudioRegionView::reset_width_dependent_items (double pixel_width)
        _pixel_width = pixel_width;
 
        if (zero_line) {
        _pixel_width = pixel_width;
 
        if (zero_line) {
-               gtk_canvas_item_set (zero_line, "x2", pixel_width - 1.0, NULL);
+               gnome_canvas_item_set (zero_line, "x2", pixel_width - 1.0, NULL);
        }
 
        if (pixel_width <= 6.0) {
        }
 
        if (pixel_width <= 6.0) {
-               gtk_canvas_item_hide (fade_in_handle);
-               gtk_canvas_item_hide (fade_out_handle);
+               gnome_canvas_item_hide (fade_in_handle);
+               gnome_canvas_item_hide (fade_out_handle);
        } else {
                if (_height < 5.0) {
        } else {
                if (_height < 5.0) {
-                       gtk_canvas_item_hide (fade_in_handle);
-                       gtk_canvas_item_hide (fade_out_handle);
+                       gnome_canvas_item_hide (fade_in_handle);
+                       gnome_canvas_item_hide (fade_out_handle);
                } else {
                } else {
-                       gtk_canvas_item_show (fade_in_handle);
-                       gtk_canvas_item_show (fade_out_handle);
+                       gnome_canvas_item_show (fade_in_handle);
+                       gnome_canvas_item_show (fade_out_handle);
                }
        }
 
                }
        }
 
@@ -482,9 +482,9 @@ AudioRegionView::region_muted ()
 
        for (uint32_t n=0; n < waves.size(); ++n) {
                if (region.muted()) {
 
        for (uint32_t n=0; n < waves.size(); ++n) {
                if (region.muted()) {
-                       gtk_canvas_item_set (waves[n], "wave_color", color_map[cMutedWaveForm], NULL);
+                       gnome_canvas_item_set (waves[n], "wave_color", color_map[cMutedWaveForm], NULL);
                } else {
                } else {
-                       gtk_canvas_item_set (waves[n], "wave_color", color_map[cWaveForm], NULL);
+                       gnome_canvas_item_set (waves[n], "wave_color", color_map[cWaveForm], NULL);
                }
        }
 }
                }
        }
 }
@@ -535,7 +535,7 @@ AudioRegionView::set_position (jack_nframes_t pos, void* src, double* ignored)
 
        if (delta) {
                for (vector<GhostRegion*>::iterator i = ghosts.begin(); i != ghosts.end(); ++i) {
 
        if (delta) {
                for (vector<GhostRegion*>::iterator i = ghosts.begin(); i != ghosts.end(); ++i) {
-                       gtk_canvas_item_move ((*i)->group, delta, 0.0);
+                       gnome_canvas_item_move ((*i)->group, delta, 0.0);
                }
        }
 
                }
        }
 
@@ -562,8 +562,8 @@ AudioRegionView::set_height (gdouble height)
                
                gdouble yoff = n * (ht+1);
                
                
                gdouble yoff = n * (ht+1);
                
-               gtk_canvas_item_set (waves[n], "height", ht, NULL);
-               gtk_canvas_item_set (waves[n], "y", yoff + 2, NULL);
+               gnome_canvas_item_set (waves[n], "height", ht, NULL);
+               gnome_canvas_item_set (waves[n], "y", yoff + 2, NULL);
        }
 
        if ((height/wcnt) < NAME_HIGHLIGHT_SIZE) {
        }
 
        if ((height/wcnt) < NAME_HIGHLIGHT_SIZE) {
@@ -578,7 +578,7 @@ AudioRegionView::set_height (gdouble height)
        gain_line->set_height ((uint32_t) rint (height - NAME_HIGHLIGHT_SIZE));
        reset_fade_shapes ();
 
        gain_line->set_height ((uint32_t) rint (height - NAME_HIGHLIGHT_SIZE));
        reset_fade_shapes ();
 
-       gtk_canvas_item_raise_to_top (name_text) ;
+       gnome_canvas_item_raise_to_top (name_text) ;
 }
 
 void
 }
 
 void
@@ -590,13 +590,13 @@ AudioRegionView::manage_zero_line ()
 
        if (_height >= 100) {
                gdouble wave_midpoint = (_height - NAME_HIGHLIGHT_SIZE) / 2.0;
 
        if (_height >= 100) {
                gdouble wave_midpoint = (_height - NAME_HIGHLIGHT_SIZE) / 2.0;
-               gtk_canvas_item_set (zero_line, 
+               gnome_canvas_item_set (zero_line, 
                                     "y1", wave_midpoint, 
                                     "y2", wave_midpoint, 
                                     NULL);
                                     "y1", wave_midpoint, 
                                     "y2", wave_midpoint, 
                                     NULL);
-               gtk_canvas_item_show (zero_line);
+               gnome_canvas_item_show (zero_line);
        } else {
        } else {
-               gtk_canvas_item_hide (zero_line);
+               gnome_canvas_item_hide (zero_line);
        }
 }
 
        }
 }
 
@@ -620,14 +620,14 @@ AudioRegionView::reset_fade_in_shape_width (jack_nframes_t width)
 
        width = std::max ((jack_nframes_t) 64, width);
 
 
        width = std::max ((jack_nframes_t) 64, width);
 
-       GtkCanvasPoints* points;
+       GnomeCanvasPoints* points;
        double pwidth = width / samples_per_unit;
        uint32_t npoints = std::min (gdk_screen_width(), (int) pwidth);
        double h; 
        
        if (_height < 5) {
        double pwidth = width / samples_per_unit;
        uint32_t npoints = std::min (gdk_screen_width(), (int) pwidth);
        double h; 
        
        if (_height < 5) {
-               gtk_canvas_item_hide (fade_in_shape);
-               gtk_canvas_item_hide (fade_in_handle);
+               gnome_canvas_item_hide (fade_in_shape);
+               gnome_canvas_item_hide (fade_in_handle);
                return;
        }
 
                return;
        }
 
@@ -640,17 +640,17 @@ AudioRegionView::reset_fade_in_shape_width (jack_nframes_t width)
                handle_center = 3.0;
        }
        
                handle_center = 3.0;
        }
        
-       gtk_canvas_item_set (fade_in_handle, 
+       gnome_canvas_item_set (fade_in_handle, 
                             "x1",  handle_center - 3.0,
                             "x2",  handle_center + 3.0,
                             NULL);
        
        if (pwidth < 5) {
                             "x1",  handle_center - 3.0,
                             "x2",  handle_center + 3.0,
                             NULL);
        
        if (pwidth < 5) {
-               gtk_canvas_item_hide (fade_in_shape);
+               gnome_canvas_item_hide (fade_in_shape);
                return;
        }
 
                return;
        }
 
-       gtk_canvas_item_show (fade_in_shape);
+       gnome_canvas_item_show (fade_in_shape);
 
        float curve[npoints];
        region.fade_in().get_vector (0, region.fade_in().back()->when, curve, npoints);
 
        float curve[npoints];
        region.fade_in().get_vector (0, region.fade_in().back()->when, curve, npoints);
@@ -686,8 +686,8 @@ AudioRegionView::reset_fade_in_shape_width (jack_nframes_t width)
        points->coords[pi++] = points->coords[0];
        points->coords[pi] = points->coords[1];
        
        points->coords[pi++] = points->coords[0];
        points->coords[pi] = points->coords[1];
        
-       gtk_canvas_item_set (fade_in_shape, "points", points, NULL);
-       gtk_canvas_points_unref (points);
+       gnome_canvas_item_set (fade_in_shape, "points", points, NULL);
+       gnome_canvas_points_unref (points);
 }
 
 void
 }
 
 void
@@ -703,14 +703,14 @@ AudioRegionView::reset_fade_out_shape_width (jack_nframes_t width)
 
        width = std::max ((jack_nframes_t) 64, width);
 
 
        width = std::max ((jack_nframes_t) 64, width);
 
-       GtkCanvasPoints* points;
+       GnomeCanvasPoints* points;
        double pwidth = width / samples_per_unit;
        uint32_t npoints = std::min (gdk_screen_width(), (int) pwidth);
        double h;
 
        if (_height < 5) {
        double pwidth = width / samples_per_unit;
        uint32_t npoints = std::min (gdk_screen_width(), (int) pwidth);
        double h;
 
        if (_height < 5) {
-               gtk_canvas_item_hide (fade_out_shape);
-               gtk_canvas_item_hide (fade_out_handle);
+               gnome_canvas_item_hide (fade_out_shape);
+               gnome_canvas_item_hide (fade_out_handle);
                return;
        }
 
                return;
        }
 
@@ -723,7 +723,7 @@ AudioRegionView::reset_fade_out_shape_width (jack_nframes_t width)
                handle_center = 3.0;
        }
        
                handle_center = 3.0;
        }
        
-       gtk_canvas_item_set (fade_out_handle, 
+       gnome_canvas_item_set (fade_out_handle, 
                             "x1",  handle_center - 3.0,
                             "x2",  handle_center + 3.0,
                             NULL);
                             "x1",  handle_center - 3.0,
                             "x2",  handle_center + 3.0,
                             NULL);
@@ -731,11 +731,11 @@ AudioRegionView::reset_fade_out_shape_width (jack_nframes_t width)
        /* don't show shape if its too small */
        
        if (pwidth < 5) {
        /* don't show shape if its too small */
        
        if (pwidth < 5) {
-               gtk_canvas_item_hide (fade_out_shape);
+               gnome_canvas_item_hide (fade_out_shape);
                return;
        } 
        
                return;
        } 
        
-       gtk_canvas_item_show (fade_out_shape);
+       gnome_canvas_item_show (fade_out_shape);
 
        float curve[npoints];
        region.fade_out().get_vector (0, region.fade_out().back()->when, curve, npoints);
 
        float curve[npoints];
        region.fade_out().get_vector (0, region.fade_out().back()->when, curve, npoints);
@@ -771,8 +771,8 @@ AudioRegionView::reset_fade_out_shape_width (jack_nframes_t width)
        points->coords[pi++] = points->coords[0];
        points->coords[pi] = points->coords[1];
 
        points->coords[pi++] = points->coords[0];
        points->coords[pi] = points->coords[1];
 
-       gtk_canvas_item_set (fade_out_shape, "points", points, NULL);
-       gtk_canvas_points_unref (points);
+       gnome_canvas_item_set (fade_out_shape, "points", points, NULL);
+       gnome_canvas_points_unref (points);
 }
 
 void
 }
 
 void
@@ -781,7 +781,7 @@ AudioRegionView::set_samples_per_unit (gdouble spu)
        TimeAxisViewItem::set_samples_per_unit (spu);
 
        for (uint32_t n=0; n < waves.size(); ++n) {
        TimeAxisViewItem::set_samples_per_unit (spu);
 
        for (uint32_t n=0; n < waves.size(); ++n) {
-               gtk_canvas_item_set (waves[n], "samples_per_unit", spu, NULL);
+               gnome_canvas_item_set (waves[n], "samples_per_unit", spu, NULL);
        }
 
        for (vector<GhostRegion*>::iterator i = ghosts.begin(); i != ghosts.end(); ++i) {
        }
 
        for (vector<GhostRegion*>::iterator i = ghosts.begin(); i != ghosts.end(); ++i) {
@@ -812,7 +812,7 @@ void
 AudioRegionView::set_amplitude_above_axis (gdouble spp)
 {
        for (uint32_t n=0; n < waves.size(); ++n) {
 AudioRegionView::set_amplitude_above_axis (gdouble spp)
 {
        for (uint32_t n=0; n < waves.size(); ++n) {
-               gtk_canvas_item_set (waves[n], "amplitude_above_axis", spp, NULL);
+               gnome_canvas_item_set (waves[n], "amplitude_above_axis", spp, NULL);
        }
 }
 
        }
 }
 
@@ -834,13 +834,13 @@ AudioRegionView::set_colors ()
        TimeAxisViewItem::set_colors ();
        
        gain_line->set_line_color (region.envelope_active() ? color_map[cGainLine] : color_map[cGainLineInactive]);
        TimeAxisViewItem::set_colors ();
        
        gain_line->set_line_color (region.envelope_active() ? color_map[cGainLine] : color_map[cGainLineInactive]);
-       gtk_canvas_item_set (sync_mark, "fill_color_rgba", fill_color, NULL);
+       gnome_canvas_item_set (sync_mark, "fill_color_rgba", fill_color, NULL);
 
        for (uint32_t n=0; n < waves.size(); ++n) {
                if (region.muted()) {
 
        for (uint32_t n=0; n < waves.size(); ++n) {
                if (region.muted()) {
-                       gtk_canvas_item_set (waves[n], "wave_color", color_map[cMutedWaveForm], NULL);
+                       gnome_canvas_item_set (waves[n], "wave_color", color_map[cMutedWaveForm], NULL);
                } else {
                } else {
-                       gtk_canvas_item_set (waves[n], "wave_color", color_map[cWaveForm], NULL);
+                       gnome_canvas_item_set (waves[n], "wave_color", color_map[cWaveForm], NULL);
                }
        }
 }
                }
        }
 }
@@ -915,7 +915,7 @@ AudioRegionView::region_sync_changed ()
 
                /* no sync mark - its the start of the region */
 
 
                /* no sync mark - its the start of the region */
 
-               gtk_canvas_item_hide (sync_mark);
+               gnome_canvas_item_hide (sync_mark);
 
        } else {
 
 
        } else {
 
@@ -923,19 +923,19 @@ AudioRegionView::region_sync_changed ()
 
                        /* no sync mark - its out of the bounds of the region */
 
 
                        /* no sync mark - its out of the bounds of the region */
 
-                       gtk_canvas_item_hide (sync_mark);
+                       gnome_canvas_item_hide (sync_mark);
 
                } else {
 
                        /* lets do it */
 
                        GtkArg args[1];
 
                } else {
 
                        /* lets do it */
 
                        GtkArg args[1];
-                       GtkCanvasPoints* points;
+                       GnomeCanvasPoints* points;
                        
                        args[0].name = X_("points");
                        
                        gtk_object_getv (GTK_OBJECT(sync_mark), 1, args);
                        
                        args[0].name = X_("points");
                        
                        gtk_object_getv (GTK_OBJECT(sync_mark), 1, args);
-                       points = static_cast<GtkCanvasPoints *> (GTK_VALUE_POINTER(args[0]));
+                       points = static_cast<GnomeCanvasPoints *> (GTK_VALUE_POINTER(args[0]));
                        
                        double offset = sync_offset / samples_per_unit;
                        
                        
                        double offset = sync_offset / samples_per_unit;
                        
@@ -951,10 +951,10 @@ AudioRegionView::region_sync_changed ()
                        points->coords[6] = offset - ((sync_mark_width-1)/2);
                        points->coords[7] = 1;
                        
                        points->coords[6] = offset - ((sync_mark_width-1)/2);
                        points->coords[7] = 1;
                        
-                       gtk_canvas_item_show (sync_mark);
-                       gtk_canvas_item_set (sync_mark, "points", points, NULL);
+                       gnome_canvas_item_show (sync_mark);
+                       gnome_canvas_item_set (sync_mark, "points", points, NULL);
 
 
-                       gtk_canvas_points_unref (points);
+                       gnome_canvas_points_unref (points);
                }
        }
 }
                }
        }
 }
@@ -965,12 +965,12 @@ AudioRegionView::set_waveform_visible (bool yn)
        if (((_flags & WaveformVisible) != yn)) {
                if (yn) {
                        for (uint32_t n=0; n < waves.size(); ++n) {
        if (((_flags & WaveformVisible) != yn)) {
                if (yn) {
                        for (uint32_t n=0; n < waves.size(); ++n) {
-                               gtk_canvas_item_show (waves[n]);
+                               gnome_canvas_item_show (waves[n]);
                        }
                        _flags |= WaveformVisible;
                } else {
                        for (uint32_t n=0; n < waves.size(); ++n) {
                        }
                        _flags |= WaveformVisible;
                } else {
                        for (uint32_t n=0; n < waves.size(); ++n) {
-                               gtk_canvas_item_hide (waves[n]);
+                               gnome_canvas_item_hide (waves[n]);
                        }
                        _flags &= ~WaveformVisible;
                }
                        }
                        _flags &= ~WaveformVisible;
                }
@@ -1033,7 +1033,7 @@ AudioRegionView::create_waves ()
                        break;
                }
                
                        break;
                }
                
-               wave_caches.push_back (gtk_canvas_waveview_cache_new ());
+               wave_caches.push_back (gnome_canvas_waveview_cache_new ());
 
                if (wait_for_waves) {
                        if (region.source(n).peaks_ready (bind (mem_fun(*this, &AudioRegionView::peaks_ready_handler), n))) {
 
                if (wait_for_waves) {
                        if (region.source(n).peaks_ready (bind (mem_fun(*this, &AudioRegionView::peaks_ready_handler), n))) {
@@ -1047,8 +1047,8 @@ AudioRegionView::create_waves ()
        }
 
        if (create_zero_line) {
        }
 
        if (create_zero_line) {
-               zero_line = gtk_canvas_item_new (GTK_CANVAS_GROUP(group),
-                                                gtk_canvas_simpleline_get_type(),
+               zero_line = gnome_canvas_item_new (GNOME_CANVAS_GROUP(group),
+                                                gnome_canvas_simpleline_get_type(),
                                                 "x1", (gdouble) 1.0,
                                                 "x2", (gdouble) (region.length() / samples_per_unit) - 1.0,
                                                 "color_rgba", (guint) color_map[cZeroLine],
                                                 "x1", (gdouble) 1.0,
                                                 "x2", (gdouble) (region.length() / samples_per_unit) - 1.0,
                                                 "color_rgba", (guint) color_map[cZeroLine],
@@ -1073,8 +1073,8 @@ AudioRegionView::create_one_wave (uint32_t which, bool direct)
        }
        gdouble yoff = which * ht;
 
        }
        gdouble yoff = which * ht;
 
-       GtkCanvasItem *wave = gtk_canvas_item_new (GTK_CANVAS_GROUP(group),
-                                                  gtk_canvas_waveview_get_type (),
+       GnomeCanvasItem *wave = gnome_canvas_item_new (GNOME_CANVAS_GROUP(group),
+                                                  gnome_canvas_waveview_get_type (),
                                                   "data_src", (gpointer) &region,
                                                   "cache", wave_caches[which],
                                                   "cache_updater", (gboolean) true,
                                                   "data_src", (gpointer) &region,
                                                   "cache", wave_caches[which],
                                                   "cache_updater", (gboolean) true,
@@ -1092,7 +1092,7 @@ AudioRegionView::create_one_wave (uint32_t which, bool direct)
                                                   NULL);
        
        if (!(_flags & WaveformVisible)) {
                                                   NULL);
        
        if (!(_flags & WaveformVisible)) {
-               gtk_canvas_item_hide (wave);
+               gnome_canvas_item_hide (wave);
        }
 
        /* note: calling this function is serialized by the lock
        }
 
        /* note: calling this function is serialized by the lock
@@ -1122,8 +1122,8 @@ AudioRegionView::create_one_wave (uint32_t which, bool direct)
                tmp_waves.clear ();
                
                if (!zero_line) {
                tmp_waves.clear ();
                
                if (!zero_line) {
-                       zero_line = gtk_canvas_item_new (GTK_CANVAS_GROUP(group),
-                                                        gtk_canvas_simpleline_get_type(),
+                       zero_line = gnome_canvas_item_new (GNOME_CANVAS_GROUP(group),
+                                                        gnome_canvas_simpleline_get_type(),
                                                         "x1", (gdouble) 1.0,
                                                         "x2", (gdouble) (region.length() / samples_per_unit) - 1.0,
                                                         "color_rgba", (guint) color_map[cZeroLine],
                                                         "x1", (gdouble) 1.0,
                                                         "x2", (gdouble) (region.length() / samples_per_unit) - 1.0,
                                                         "color_rgba", (guint) color_map[cZeroLine],
@@ -1140,7 +1140,7 @@ AudioRegionView::peaks_ready_handler (uint32_t which)
 }
 
 void
 }
 
 void
-AudioRegionView::add_gain_point_event (GtkCanvasItem *item, GdkEvent *ev)
+AudioRegionView::add_gain_point_event (GnomeCanvasItem *item, GdkEvent *ev)
 {
        double x, y;
 
 {
        double x, y;
 
@@ -1151,7 +1151,7 @@ AudioRegionView::add_gain_point_event (GtkCanvasItem *item, GdkEvent *ev)
        x = ev->button.x;
        y = ev->button.y;
 
        x = ev->button.x;
        y = ev->button.y;
 
-       gtk_canvas_item_w2i (item, &x, &y);
+       gnome_canvas_item_w2i (item, &x, &y);
 
        jack_nframes_t fx = trackview.editor.pixel_to_frame (x);
 
 
        jack_nframes_t fx = trackview.editor.pixel_to_frame (x);
 
@@ -1184,7 +1184,7 @@ AudioRegionView::add_gain_point_event (GtkCanvasItem *item, GdkEvent *ev)
 }
 
 void
 }
 
 void
-AudioRegionView::remove_gain_point_event (GtkCanvasItem *item, GdkEvent *ev)
+AudioRegionView::remove_gain_point_event (GnomeCanvasItem *item, GdkEvent *ev)
 {
        ControlPoint *cp = reinterpret_cast<ControlPoint *> (gtk_object_get_data(GTK_OBJECT(item), "control_point"));
        region.envelope().erase (cp->model);
 {
        ControlPoint *cp = reinterpret_cast<ControlPoint *> (gtk_object_get_data(GTK_OBJECT(item), "control_point"));
        region.envelope().erase (cp->model);
@@ -1239,15 +1239,15 @@ AudioRegionView::set_waveform_shape (WaveformShape shape)
        }
 
        if (yn != (bool) (_flags & WaveformRectified)) {
        }
 
        if (yn != (bool) (_flags & WaveformRectified)) {
-               for (vector<GtkCanvasItem *>::iterator wave = waves.begin(); wave != waves.end() ; ++wave) {
-                       gtk_canvas_item_set ((*wave), "rectified", (gboolean) yn, NULL);
+               for (vector<GnomeCanvasItem *>::iterator wave = waves.begin(); wave != waves.end() ; ++wave) {
+                       gnome_canvas_item_set ((*wave), "rectified", (gboolean) yn, NULL);
                }
 
                if (zero_line) {
                        if (yn) {
                }
 
                if (zero_line) {
                        if (yn) {
-                               gtk_canvas_item_hide (zero_line);
+                               gnome_canvas_item_hide (zero_line);
                        } else {
                        } else {
-                               gtk_canvas_item_show (zero_line);
+                               gnome_canvas_item_show (zero_line);
                        }
                }
 
                        }
                }
 
@@ -1272,12 +1272,12 @@ AudioRegionView::move (double x_delta, double y_delta)
                return;
        }
 
                return;
        }
 
-       gtk_canvas_item_move (get_canvas_group(), x_delta, y_delta);
+       gnome_canvas_item_move (get_canvas_group(), x_delta, y_delta);
 
        /* note: ghosts never leave their tracks so y_delta for them is always zero */
 
        for (vector<GhostRegion*>::iterator i = ghosts.begin(); i != ghosts.end(); ++i) {
 
        /* note: ghosts never leave their tracks so y_delta for them is always zero */
 
        for (vector<GhostRegion*>::iterator i = ghosts.begin(); i != ghosts.end(); ++i) {
-               gtk_canvas_item_move ((*i)->group, x_delta, 0.0);
+               gnome_canvas_item_move ((*i)->group, x_delta, 0.0);
        }
 }
 
        }
 }
 
@@ -1297,8 +1297,8 @@ AudioRegionView::add_ghost (AutomationTimeAxisView& atv)
                        break;
                }
                
                        break;
                }
                
-               GtkCanvasItem *wave = gtk_canvas_item_new (GTK_CANVAS_GROUP(ghost->group),
-                                                          gtk_canvas_waveview_get_type (),
+               GnomeCanvasItem *wave = gnome_canvas_item_new (GNOME_CANVAS_GROUP(ghost->group),
+                                                          gnome_canvas_waveview_get_type (),
                                                           "data_src", (gpointer) &region,
                                                           "cache", wave_caches[n],
                                                           "cache_updater", (gboolean) false,
                                                           "data_src", (gpointer) &region,
                                                           "cache", wave_caches[n],
                                                           "cache_updater", (gboolean) false,
@@ -1358,8 +1358,8 @@ AudioRegionView::entered ()
        UINT_TO_RGBA(fade_color,&r,&g,&b,&a);
        a=255;
        
        UINT_TO_RGBA(fade_color,&r,&g,&b,&a);
        a=255;
        
-       gtk_canvas_item_set (fade_in_handle,  "fill_color_rgba", RGBA_TO_UINT(r,g,b,a), NULL);
-       gtk_canvas_item_set (fade_out_handle, "fill_color_rgba", RGBA_TO_UINT(r,g,b,a), NULL);
+       gnome_canvas_item_set (fade_in_handle,  "fill_color_rgba", RGBA_TO_UINT(r,g,b,a), NULL);
+       gnome_canvas_item_set (fade_out_handle, "fill_color_rgba", RGBA_TO_UINT(r,g,b,a), NULL);
 }
 
 void
 }
 
 void
@@ -1371,8 +1371,8 @@ AudioRegionView::exited ()
        UINT_TO_RGBA(fade_color,&r,&g,&b,&a);
        a=0;
        
        UINT_TO_RGBA(fade_color,&r,&g,&b,&a);
        a=0;
        
-       gtk_canvas_item_set (fade_in_handle,  "fill_color_rgba", RGBA_TO_UINT(r,g,b,a), NULL);
-       gtk_canvas_item_set (fade_out_handle, "fill_color_rgba", RGBA_TO_UINT(r,g,b,a), NULL);
+       gnome_canvas_item_set (fade_in_handle,  "fill_color_rgba", RGBA_TO_UINT(r,g,b,a), NULL);
+       gnome_canvas_item_set (fade_out_handle, "fill_color_rgba", RGBA_TO_UINT(r,g,b,a), NULL);
 }
 
 void
 }
 
 void
@@ -1389,15 +1389,15 @@ AudioRegionView::set_waveview_data_src()
 
        for (uint32_t n = 0; n < waves.size(); ++n) {
                // TODO: something else to let it know the channel
 
        for (uint32_t n = 0; n < waves.size(); ++n) {
                // TODO: something else to let it know the channel
-               gtk_canvas_item_set (waves[n], "data_src", &region, NULL);
+               gnome_canvas_item_set (waves[n], "data_src", &region, NULL);
        }
        
        for (vector<GhostRegion*>::iterator i = ghosts.begin(); i != ghosts.end(); ++i) {
                
                (*i)->set_duration (unit_length);
                
        }
        
        for (vector<GhostRegion*>::iterator i = ghosts.begin(); i != ghosts.end(); ++i) {
                
                (*i)->set_duration (unit_length);
                
-               for (vector<GtkCanvasItem*>::iterator w = (*i)->waves.begin(); w != (*i)->waves.end(); ++w) {
-                       gtk_canvas_item_set ((*w), "data_src", &region, NULL);
+               for (vector<GnomeCanvasItem*>::iterator w = (*i)->waves.begin(); w != (*i)->waves.end(); ++w) {
+                       gnome_canvas_item_set ((*w), "data_src", &region, NULL);
                }
        }
 
                }
        }
 
index 7703597b2b30cbccbd09cd8d4dfd0c0e17db98df..954180e9497ddffc2a76c84d84f45b0e830f8d0f 100644 (file)
@@ -23,7 +23,7 @@
 
 #include <vector>
 #include <gtkmm.h>
 
 #include <vector>
 #include <gtkmm.h>
-#include <gtk-canvas.h>
+#include <libgnomecanvas/libgnomecanvas.h>
 #include <sigc++/signal.h>
 #include <ardour/region.h>
 
 #include <sigc++/signal.h>
 #include <ardour/region.h>
 
@@ -46,7 +46,7 @@ class AutomationTimeAxisView;
 class AudioRegionView : public TimeAxisViewItem
 {
   public:
 class AudioRegionView : public TimeAxisViewItem
 {
   public:
-    AudioRegionView (GtkCanvasGroup *, 
+    AudioRegionView (GnomeCanvasGroup *, 
                     AudioTimeAxisView&,
                     ARDOUR::AudioRegion&,
                     double initial_samples_per_unit,
                     AudioTimeAxisView&,
                     ARDOUR::AudioRegion&,
                     double initial_samples_per_unit,
@@ -89,8 +89,8 @@ class AudioRegionView : public TimeAxisViewItem
     void show_region_editor ();
     void hide_region_editor();
 
     void show_region_editor ();
     void hide_region_editor();
 
-    void add_gain_point_event (GtkCanvasItem *item, GdkEvent *event);
-    void remove_gain_point_event (GtkCanvasItem *item, GdkEvent *event);
+    void add_gain_point_event (GnomeCanvasItem *item, GdkEvent *event);
+    void remove_gain_point_event (GnomeCanvasItem *item, GdkEvent *event);
 
     AudioRegionGainLine* get_gain_line() const { return gain_line; }
 
 
     AudioRegionGainLine* get_gain_line() const { return gain_line; }
 
@@ -120,15 +120,15 @@ class AudioRegionView : public TimeAxisViewItem
            WaveformRectified = 0x8
     };
 
            WaveformRectified = 0x8
     };
 
-    vector<GtkCanvasItem *> waves; /* waveviews */
-    vector<GtkCanvasItem *> tmp_waves; /* see ::create_waves()*/
-    GtkCanvasItem* sync_mark; /* polgyon for sync position */
-    GtkCanvasItem* no_wave_msg; /* text */
-    GtkCanvasItem* zero_line; /* simpleline */
-    GtkCanvasItem* fade_in_shape; /* polygon */
-    GtkCanvasItem* fade_out_shape; /* polygon */
-    GtkCanvasItem* fade_in_handle; /* simplerect */
-    GtkCanvasItem* fade_out_handle; /* simplerect */
+    vector<GnomeCanvasItem *> waves; /* waveviews */
+    vector<GnomeCanvasItem *> tmp_waves; /* see ::create_waves()*/
+    GnomeCanvasItem* sync_mark; /* polgyon for sync position */
+    GnomeCanvasItem* no_wave_msg; /* text */
+    GnomeCanvasItem* zero_line; /* simpleline */
+    GnomeCanvasItem* fade_in_shape; /* polygon */
+    GnomeCanvasItem* fade_out_shape; /* polygon */
+    GnomeCanvasItem* fade_in_handle; /* simplerect */
+    GnomeCanvasItem* fade_out_handle; /* simplerect */
 
     AudioRegionGainLine* gain_line;
     AudioRegionEditor *editor;
 
     AudioRegionGainLine* gain_line;
     AudioRegionEditor *editor;
@@ -163,7 +163,7 @@ class AudioRegionView : public TimeAxisViewItem
     void region_sync_changed ();
     void region_scale_amplitude_changed ();
 
     void region_sync_changed ();
     void region_scale_amplitude_changed ();
 
-    static gint _lock_toggle (GtkCanvasItem*, GdkEvent*, void*);
+    static gint _lock_toggle (GnomeCanvasItem*, GdkEvent*, void*);
     void lock_toggle ();
 
     void create_waves ();
     void lock_toggle ();
 
     void create_waves ();
@@ -180,7 +180,7 @@ class AudioRegionView : public TimeAxisViewItem
     void reset_width_dependent_items (double pixel_width);
     void set_waveview_data_src();
 
     void reset_width_dependent_items (double pixel_width);
     void set_waveview_data_src();
 
-    vector<GtkCanvasWaveViewCache*> wave_caches;
+    vector<GnomeCanvasWaveViewCache*> wave_caches;
     vector<GhostRegion*> ghosts;
 };
 
     vector<GhostRegion*> ghosts;
 };
 
index f0a67ec0bd7efca9672a48ccefeda0243c73d91b..310e0a224d47250ce14eae7fadbb3c39e7deb3a0 100644 (file)
@@ -125,7 +125,7 @@ UINT_TO_RGB((i), ((guchar*)p), ((guchar*)p)+1, ((guchar*)p)+2)
 }
 #define PAINT_HORIZ(inbuf, colr, colg, colb, ptx0, ptx1, pty) \
 { \
 }
 #define PAINT_HORIZ(inbuf, colr, colg, colb, ptx0, ptx1, pty) \
 { \
-  GtkCanvasBuf* ph_buf = (inbuf); \
+  GnomeCanvasBuf* ph_buf = (inbuf); \
   guchar* ph_p; \
   gint ph_a0, ph_a1; \
   gint ph_colr=(colr), ph_colg=(colg), ph_colb=(colb); \
   guchar* ph_p; \
   gint ph_a0, ph_a1; \
   gint ph_colr=(colr), ph_colg=(colg), ph_colb=(colb); \
@@ -144,7 +144,7 @@ UINT_TO_RGB((i), ((guchar*)p), ((guchar*)p)+1, ((guchar*)p)+2)
 }
 #define FAST_PAINT_HORIZ(inbuf, colr, colg, colb, ptx0, ptx1, pty) \
 { \
 }
 #define FAST_PAINT_HORIZ(inbuf, colr, colg, colb, ptx0, ptx1, pty) \
 { \
-  GtkCanvasBuf* ph_buf = (inbuf); \
+  GnomeCanvasBuf* ph_buf = (inbuf); \
   guchar* ph_p; \
   gint ph_a0, ph_a1; \
   gint ph_colr=(colr), ph_colg=(colg), ph_colb=(colb); \
   guchar* ph_p; \
   gint ph_a0, ph_a1; \
   gint ph_colr=(colr), ph_colg=(colg), ph_colb=(colb); \
@@ -163,7 +163,7 @@ UINT_TO_RGB((i), ((guchar*)p), ((guchar*)p)+1, ((guchar*)p)+2)
 }
 #define PAINT_HORIZA(inbuf, colr, colg, colb, cola, ptx0, ptx1, pty) \
 { \
 }
 #define PAINT_HORIZA(inbuf, colr, colg, colb, cola, ptx0, ptx1, pty) \
 { \
-  GtkCanvasBuf* ph_buf = (inbuf); \
+  GnomeCanvasBuf* ph_buf = (inbuf); \
   guchar* ph_p; \
   gint ph_a0, ph_a1; \
   gint ph_colr=(colr), ph_colg=(colg), ph_colb=(colb), ph_cola=(cola); \
   guchar* ph_p; \
   gint ph_a0, ph_a1; \
   gint ph_colr=(colr), ph_colg=(colg), ph_colb=(colb), ph_cola=(cola); \
@@ -182,7 +182,7 @@ UINT_TO_RGB((i), ((guchar*)p), ((guchar*)p)+1, ((guchar*)p)+2)
 }
 #define PAINT_VERT(inbuf, colr, colg, colb, ptx, pty0, pty1) \
 { \
 }
 #define PAINT_VERT(inbuf, colr, colg, colb, ptx, pty0, pty1) \
 { \
-  GtkCanvasBuf* pv_buf = (inbuf); \
+  GnomeCanvasBuf* pv_buf = (inbuf); \
   guchar* pv_p; \
   gint pv_b0, pv_b1; \
   gint pv_colr=(colr), pv_colg=(colg), pv_colb=(colb);\
   guchar* pv_p; \
   gint pv_b0, pv_b1; \
   gint pv_colr=(colr), pv_colg=(colg), pv_colb=(colb);\
@@ -201,7 +201,7 @@ UINT_TO_RGB((i), ((guchar*)p), ((guchar*)p)+1, ((guchar*)p)+2)
 }
 #define FAST_PAINT_VERT(inbuf, colr, colg, colb, ptx, pty0, pty1) \
 { \
 }
 #define FAST_PAINT_VERT(inbuf, colr, colg, colb, ptx, pty0, pty1) \
 { \
-  GtkCanvasBuf* fpv_buf = (inbuf); \
+  GnomeCanvasBuf* fpv_buf = (inbuf); \
   guchar* fpv_p; \
   gint fpv_b0, fpv_b1; \
 \
   guchar* fpv_p; \
   gint fpv_b0, fpv_b1; \
 \
@@ -218,7 +218,7 @@ UINT_TO_RGB((i), ((guchar*)p), ((guchar*)p)+1, ((guchar*)p)+2)
 }
 #define PAINT_VERTA(inbuf, colr, colg, colb, cola, ptx, pty0, pty1) \
 { \
 }
 #define PAINT_VERTA(inbuf, colr, colg, colb, cola, ptx, pty0, pty1) \
 { \
-  GtkCanvasBuf* pv_buf = (inbuf); \
+  GnomeCanvasBuf* pv_buf = (inbuf); \
   guchar* pv_p; \
   gint pv_b0, pv_b1; \
   gint pv_colr=(colr), pv_colg=(colg), pv_colb=(colb), pv_cola=(cola);\
   guchar* pv_p; \
   gint pv_b0, pv_b1; \
   gint pv_colr=(colr), pv_colg=(colg), pv_colb=(colb), pv_cola=(cola);\
@@ -236,12 +236,12 @@ UINT_TO_RGB((i), ((guchar*)p), ((guchar*)p)+1, ((guchar*)p)+2)
   } \
 }
 
   } \
 }
 
-/* Paint a solid-colored box into a GtkCanvasBuf (clipping as necessary).
+/* Paint a solid-colored box into a GnomeCanvasBuf (clipping as necessary).
    The box contains (ptx0,pty0), but not (ptx1, pty1).
    Each macro arg should appear exactly once in the body of the code. */
 #define PAINT_BOX(inbuf, colr, colg, colb, cola, ptx0, pty0, ptx1, pty1) \
 { \
    The box contains (ptx0,pty0), but not (ptx1, pty1).
    Each macro arg should appear exactly once in the body of the code. */
 #define PAINT_BOX(inbuf, colr, colg, colb, cola, ptx0, pty0, ptx1, pty1) \
 { \
-  GtkCanvasBuf* pb_buf = (inbuf); \
+  GnomeCanvasBuf* pb_buf = (inbuf); \
   guchar* pb_p; \
   guchar* pb_pp; \
   gint pb_a0, pb_a1, pb_b0, pb_b1, pb_i, pb_j; \
   guchar* pb_p; \
   guchar* pb_pp; \
   gint pb_a0, pb_a1, pb_b0, pb_b1, pb_i, pb_j; \
@@ -269,7 +269,7 @@ UINT_TO_RGB((i), ((guchar*)p), ((guchar*)p)+1, ((guchar*)p)+2)
 
 #define FAST_PAINT_BOX(inbuf, colr, colg, colb, cola, ptx0, pty0, ptx1, pty1) \
 { \
 
 #define FAST_PAINT_BOX(inbuf, colr, colg, colb, cola, ptx0, pty0, ptx1, pty1) \
 { \
-  GtkCanvasBuf* pb_buf = (inbuf); \
+  GnomeCanvasBuf* pb_buf = (inbuf); \
   guchar* pb_p; \
   guchar* pb_pp; \
   gint pb_i, pb_j; \
   guchar* pb_p; \
   guchar* pb_pp; \
   gint pb_i, pb_j; \
index 765772b34aada40beda59c85fe28b19a6d6bcecb..1d0ec63535c9b709ca09a03a5c755578d9ec9a50 100644 (file)
@@ -46,12 +46,12 @@ StreamView::StreamView (AudioTimeAxisView& tv)
 
        /* set_position() will position the group */
        
 
        /* set_position() will position the group */
        
-       canvas_group = gtk_canvas_item_new (GTK_CANVAS_GROUP(_trackview.canvas_display),
-                                           gtk_canvas_group_get_type (),
+       canvas_group = gnome_canvas_item_new (GNOME_CANVAS_GROUP(_trackview.canvas_display),
+                                           gnome_canvas_group_get_type (),
                                            NULL);
 
                                            NULL);
 
-       canvas_rect = gtk_canvas_item_new (GTK_CANVAS_GROUP(canvas_group),
-                                          gtk_canvas_simplerect_get_type(),
+       canvas_rect = gnome_canvas_item_new (GNOME_CANVAS_GROUP(canvas_group),
+                                          gnome_canvas_simplerect_get_type(),
                                           "x1", 0.0,
                                           "y1", 0.0,
                                           "x2", 1000000.0,
                                           "x1", 0.0,
                                           "y1", 0.0,
                                           "x2", 1000000.0,
@@ -100,7 +100,7 @@ int
 StreamView::set_position (gdouble x, gdouble y)
 
 {
 StreamView::set_position (gdouble x, gdouble y)
 
 {
-       gtk_canvas_item_set (canvas_group, "x", x, "y", y, NULL);
+       gnome_canvas_item_set (canvas_group, "x", x, "y", y, NULL);
        return 0;
 }
 
        return 0;
 }
 
@@ -156,8 +156,8 @@ StreamView::set_samples_per_unit (gdouble spp)
                gdouble xstart = _trackview.editor.frame_to_pixel ( recbox.start );
                gdouble xend = _trackview.editor.frame_to_pixel ( recbox.start + recbox.length );
 
                gdouble xstart = _trackview.editor.frame_to_pixel ( recbox.start );
                gdouble xend = _trackview.editor.frame_to_pixel ( recbox.start + recbox.length );
 
-               gtk_canvas_item_set (recbox.rectangle, "x1", xstart, NULL);
-               gtk_canvas_item_set (recbox.rectangle, "x2", xend, NULL);
+               gnome_canvas_item_set (recbox.rectangle, "x1", xstart, NULL);
+               gnome_canvas_item_set (recbox.rectangle, "x2", xend, NULL);
        }
 
        return 0;
        }
 
        return 0;
@@ -213,7 +213,7 @@ StreamView::add_region_view_internal (Region *r, bool wait_for_waves)
                }
        }
 
                }
        }
 
-       region_view = new AudioRegionView (GTK_CANVAS_GROUP(canvas_group),
+       region_view = new AudioRegionView (GNOME_CANVAS_GROUP(canvas_group),
                                           _trackview,
                                           *region,
                                           _samples_per_unit,
                                           _trackview,
                                           *region,
                                           _samples_per_unit,
@@ -329,7 +329,7 @@ StreamView::playlist_modified ()
        }
 
        for (list<CrossfadeView *>::iterator i = crossfade_views.begin(); i != crossfade_views.end(); ++i) {
        }
 
        for (list<CrossfadeView *>::iterator i = crossfade_views.begin(); i != crossfade_views.end(); ++i) {
-               gtk_canvas_item_raise_to_top ((*i)->get_canvas_group());
+               gnome_canvas_item_raise_to_top ((*i)->get_canvas_group());
        }
 }
 
        }
 }
 
@@ -393,7 +393,7 @@ StreamView::add_crossfade (Crossfade *crossfade)
                }
        }
 
                }
        }
 
-       CrossfadeView *cv = new CrossfadeView (GTK_CANVAS_GROUP(_trackview.canvas_display),
+       CrossfadeView *cv = new CrossfadeView (GNOME_CANVAS_GROUP(_trackview.canvas_display),
                                               _trackview,
                                               *crossfade,
                                               _samples_per_unit,
                                               _trackview,
                                               *crossfade,
                                               _samples_per_unit,
@@ -508,12 +508,12 @@ StreamView::apply_color (GdkColor& color, ColorTarget target)
                        (*i)->set_color (region_color);
                }
                // stream_base_color = RGBA_TO_UINT (color.red/256, color.green/256, color.blue/256, 255);
                        (*i)->set_color (region_color);
                }
                // stream_base_color = RGBA_TO_UINT (color.red/256, color.green/256, color.blue/256, 255);
-               // gtk_canvas_item_set (canvas_rect, "fill_color_rgba", stream_base_color, NULL);
+               // gnome_canvas_item_set (canvas_rect, "fill_color_rgba", stream_base_color, NULL);
                break;
                
        case StreamBaseColor:
                // stream_base_color = RGBA_TO_UINT (color.red/256, color.green/256, color.blue/256, 255);
                break;
                
        case StreamBaseColor:
                // stream_base_color = RGBA_TO_UINT (color.red/256, color.green/256, color.blue/256, 255);
-               // gtk_canvas_item_set (canvas_rect, "fill_color_rgba", stream_base_color, NULL);
+               // gnome_canvas_item_set (canvas_rect, "fill_color_rgba", stream_base_color, NULL);
                break;
        }
 }
                break;
        }
 }
@@ -576,13 +576,13 @@ StreamView::set_waveform_shape (WaveformShape shape)
 void
 StreamView::region_layered (AudioRegionView* rv)
 {
 void
 StreamView::region_layered (AudioRegionView* rv)
 {
-       gtk_canvas_item_lower_to_bottom (rv->get_canvas_group());
+       gnome_canvas_item_lower_to_bottom (rv->get_canvas_group());
 
        /* don't ever leave it at the bottom, since then it doesn't
           get events - the  parent group does instead ...
        */
        
 
        /* don't ever leave it at the bottom, since then it doesn't
           get events - the  parent group does instead ...
        */
        
-       gtk_canvas_item_raise (rv->get_canvas_group(), rv->region.layer() + 1);
+       gnome_canvas_item_raise (rv->get_canvas_group(), rv->region.layer() + 1);
 }
 
 void
 }
 
 void
@@ -660,8 +660,8 @@ StreamView::setup_rec_box ()
                        gdouble xstart = _trackview.editor.frame_to_pixel (frame_pos);
                        gdouble xend = xstart;
                        
                        gdouble xstart = _trackview.editor.frame_to_pixel (frame_pos);
                        gdouble xend = xstart;
                        
-                       GtkCanvasItem * rec_rect = gtk_canvas_item_new (GTK_CANVAS_GROUP(canvas_group),
-                                                                       gtk_canvas_simplerect_get_type(),
+                       GnomeCanvasItem * rec_rect = gnome_canvas_item_new (GNOME_CANVAS_GROUP(canvas_group),
+                                                                       gnome_canvas_simplerect_get_type(),
                                                                        "x1", xstart,
                                                                        "y1", 1.0,
                                                                        "x2", xend,
                                                                        "x1", xstart,
                                                                        "y1", 1.0,
                                                                        "x2", xend,
@@ -755,8 +755,8 @@ StreamView::update_rec_box ()
                gdouble xstart = _trackview.editor.frame_to_pixel ( rect.start );
                gdouble xend = _trackview.editor.frame_to_pixel ( at );
 
                gdouble xstart = _trackview.editor.frame_to_pixel ( rect.start );
                gdouble xend = _trackview.editor.frame_to_pixel ( at );
 
-               gtk_canvas_item_set (rect.rectangle, "x1", xstart, NULL);
-               gtk_canvas_item_set (rect.rectangle, "x2", xend, NULL);
+               gnome_canvas_item_set (rect.rectangle, "x1", xstart, NULL);
+               gnome_canvas_item_set (rect.rectangle, "x2", xend, NULL);
        }
 }
 
        }
 }
 
@@ -821,7 +821,7 @@ StreamView::update_rec_regions ()
                        tmp = iter;
                        ++tmp;
 
                        tmp = iter;
                        ++tmp;
 
-                       if ((GTK_OBJECT_FLAGS(GTK_OBJECT(rec_rects[n].rectangle)) & GTK_CANVAS_ITEM_VISIBLE) == 0) {
+                       if ((GTK_OBJECT_FLAGS(GTK_OBJECT(rec_rects[n].rectangle)) & GNOME_CANVAS_ITEM_VISIBLE) == 0) {
                                /* rect already hidden, this region is done */
                                iter = tmp;
                                continue;
                                /* rect already hidden, this region is done */
                                iter = tmp;
                                continue;
@@ -849,9 +849,9 @@ StreamView::update_rec_regions ()
                                                }
 
                                                /* also update rect */
                                                }
 
                                                /* also update rect */
-                                               GtkCanvasItem * rect = rec_rects[n].rectangle;
+                                               GnomeCanvasItem * rect = rec_rects[n].rectangle;
                                                gdouble xend = _trackview.editor.frame_to_pixel (region->position() + region->length());
                                                gdouble xend = _trackview.editor.frame_to_pixel (region->position() + region->length());
-                                               gtk_canvas_item_set (rect, "x2", xend, NULL);
+                                               gnome_canvas_item_set (rect, "x2", xend, NULL);
                                        }
                                }
 
                                        }
                                }
 
@@ -874,8 +874,8 @@ StreamView::update_rec_regions ()
                                                }
                                                
                                                /* also hide rect */
                                                }
                                                
                                                /* also hide rect */
-                                               GtkCanvasItem * rect = rec_rects[n].rectangle;
-                                               gtk_canvas_item_hide (rect);
+                                               GnomeCanvasItem * rect = rec_rects[n].rectangle;
+                                               gnome_canvas_item_hide (rect);
 
                                        }
                                }
 
                                        }
                                }
index 9eb26cb5a4e2cacab78bb95d390cba620716fefc..6466a664983e44fcedeb1443c8c2c2b73f05ff0d 100644 (file)
@@ -26,7 +26,7 @@
 #include <cmath>
 
 #include <gtkmm.h>
 #include <cmath>
 
 #include <gtkmm.h>
-#include <gtk-canvas.h>
+#include <libgnomecanvas/libgnomecanvas.h>
 
 #include <ardour/location.h>
 #include "enums.h"
 
 #include <ardour/location.h>
 #include "enums.h"
@@ -41,7 +41,7 @@ namespace ARDOUR {
 }
 
 struct RecBoxInfo {
 }
 
 struct RecBoxInfo {
-       GtkCanvasItem* rectangle;
+       GnomeCanvasItem* rectangle;
        jack_nframes_t start;
        jack_nframes_t length;
 };
        jack_nframes_t start;
        jack_nframes_t length;
 };
@@ -78,7 +78,7 @@ class StreamView : public sigc::trackable
        void set_show_waveforms (bool yn);
        void set_show_waveforms_recording (bool yn) { use_rec_regions = yn; }
 
        void set_show_waveforms (bool yn);
        void set_show_waveforms_recording (bool yn) { use_rec_regions = yn; }
 
-       GtkCanvasItem* canvas_item() { return canvas_group; }
+       GnomeCanvasItem* canvas_item() { return canvas_group; }
 
        sigc::signal<void,AudioRegionView*> AudioRegionViewAdded;
 
 
        sigc::signal<void,AudioRegionView*> AudioRegionViewAdded;
 
@@ -110,8 +110,8 @@ class StreamView : public sigc::trackable
   private:
        AudioTimeAxisView& _trackview;
 
   private:
        AudioTimeAxisView& _trackview;
 
-       GtkCanvasItem* canvas_group;
-       GtkCanvasItem* canvas_rect; /* frame around the whole thing */
+       GnomeCanvasItem* canvas_group;
+       GnomeCanvasItem* canvas_rect; /* frame around the whole thing */
 
        typedef list<AudioRegionView* > AudioRegionViewList;
        AudioRegionViewList region_views;
 
        typedef list<AudioRegionView* > AudioRegionViewList;
        AudioRegionViewList region_views;
index a43eb6d3b6621363fef784b1f23c1b6a25d0ade5..e90f5f6bc710ed219d52df4c8229d8defe9bb196 100644 (file)
@@ -58,16 +58,16 @@ TimeAxisView::TimeAxisView(ARDOUR::Session& sess, PublicEditor& ed, TimeAxisView
          editor(ed),
          controls_table (2, 9)
 {
          editor(ed),
          controls_table (2, 9)
 {
-       canvas_display = gtk_canvas_item_new (gtk_canvas_root(GTK_CANVAS(canvas->gobj())),
-                                             gtk_canvas_group_get_type(),
+       canvas_display = gnome_canvas_item_new (gnome_canvas_root(GNOME_CANVAS(canvas->gobj())),
+                                             gnome_canvas_group_get_type(),
                                              "x", 0.0,
                                              "y", 0.0,
                                              NULL);
 
                                              "x", 0.0,
                                              "y", 0.0,
                                              NULL);
 
-       selection_group = gtk_canvas_item_new (GTK_CANVAS_GROUP(canvas_display), 
-                                              gtk_canvas_group_get_type (), 
+       selection_group = gnome_canvas_item_new (GNOME_CANVAS_GROUP(canvas_display), 
+                                              gnome_canvas_group_get_type (), 
                                               NULL);
                                               NULL);
-       gtk_canvas_item_hide (selection_group);
+       gnome_canvas_item_hide (selection_group);
        
        control_parent = 0;
        display_menu = 0;
        
        control_parent = 0;
        display_menu = 0;
@@ -199,13 +199,13 @@ TimeAxisView::show_at (double y, int& nth, VBox *parent)
           item's parent ...
        */
 
           item's parent ...
        */
 
-       gtk_canvas_item_get_bounds (canvas_display, &ix1, &iy1, &ix2, &iy2);
-       gtk_canvas_item_i2w (canvas_display->parent, &ix1, &iy1);
+       gnome_canvas_item_get_bounds (canvas_display, &ix1, &iy1, &ix2, &iy2);
+       gnome_canvas_item_i2w (canvas_display->parent, &ix1, &iy1);
        if (iy1 < 0) {
                iy1 = 0;
        }
        if (iy1 < 0) {
                iy1 = 0;
        }
-       gtk_canvas_item_move (canvas_display, 0.0, y - iy1);
-       gtk_canvas_item_show (canvas_display); /* XXX not necessary */
+       gnome_canvas_item_move (canvas_display, 0.0, y - iy1);
+       gnome_canvas_item_show (canvas_display); /* XXX not necessary */
 
        y_position = y;
        order = nth;
 
        y_position = y;
        order = nth;
@@ -218,10 +218,10 @@ TimeAxisView::show_at (double y, int& nth, VBox *parent)
        for (vector<TimeAxisView*>::iterator i = children.begin(); i != children.end(); ++i) {
                
                if ((*i)->marked_for_display()) {
        for (vector<TimeAxisView*>::iterator i = children.begin(); i != children.end(); ++i) {
                
                if ((*i)->marked_for_display()) {
-                       gtk_canvas_item_show ((*i)->canvas_display);
+                       gnome_canvas_item_show ((*i)->canvas_display);
                }
                
                }
                
-               if (GTK_OBJECT_FLAGS(GTK_OBJECT((*i)->canvas_display)) & GTK_CANVAS_ITEM_VISIBLE) {
+               if (GTK_OBJECT_FLAGS(GTK_OBJECT((*i)->canvas_display)) & GNOME_CANVAS_ITEM_VISIBLE) {
                        ++nth;
                        effective_height += (*i)->show_at (y + effective_height, nth, parent);
                }
                        ++nth;
                        effective_height += (*i)->show_at (y + effective_height, nth, parent);
                }
@@ -288,7 +288,7 @@ TimeAxisView::hide ()
                return;
        }
 
                return;
        }
 
-       gtk_canvas_item_hide (canvas_display);
+       gnome_canvas_item_hide (canvas_display);
        controls_frame.hide ();
 
        if (control_parent) {
        controls_frame.hide ();
 
        if (control_parent) {
@@ -344,7 +344,7 @@ TimeAxisView::set_height (TrackHeight h)
        height = (guint32) h;
        controls_frame.set_size_request (-1, height);
 
        height = (guint32) h;
        controls_frame.set_size_request (-1, height);
 
-       if (GTK_OBJECT_FLAGS(GTK_OBJECT(selection_group)) & GTK_CANVAS_ITEM_VISIBLE) {
+       if (GTK_OBJECT_FLAGS(GTK_OBJECT(selection_group)) & GNOME_CANVAS_ITEM_VISIBLE) {
                /* resize the selection rect */
                show_selection (editor.get_selection().time);
        }
                /* resize the selection rect */
                show_selection (editor.get_selection().time);
        }
@@ -498,19 +498,19 @@ TimeAxisView::show_selection (TimeSelection& ts)
                (*i)->show_selection (ts);
        }
 
                (*i)->show_selection (ts);
        }
 
-       if (GTK_OBJECT_FLAGS(GTK_OBJECT(selection_group)) & GTK_CANVAS_ITEM_VISIBLE) {
+       if (GTK_OBJECT_FLAGS(GTK_OBJECT(selection_group)) & GNOME_CANVAS_ITEM_VISIBLE) {
                while (!used_selection_rects.empty()) {
                        free_selection_rects.push_front (used_selection_rects.front());
                        used_selection_rects.pop_front();
                while (!used_selection_rects.empty()) {
                        free_selection_rects.push_front (used_selection_rects.front());
                        used_selection_rects.pop_front();
-                       gtk_canvas_item_hide (free_selection_rects.front()->rect);
-                       gtk_canvas_item_hide (free_selection_rects.front()->start_trim);
-                       gtk_canvas_item_hide (free_selection_rects.front()->end_trim);
+                       gnome_canvas_item_hide (free_selection_rects.front()->rect);
+                       gnome_canvas_item_hide (free_selection_rects.front()->start_trim);
+                       gnome_canvas_item_hide (free_selection_rects.front()->end_trim);
                }
                }
-               gtk_canvas_item_hide (selection_group);
+               gnome_canvas_item_hide (selection_group);
        }
 
        }
 
-       gtk_canvas_item_show (selection_group);
-       gtk_canvas_item_raise_to_top (selection_group);
+       gnome_canvas_item_show (selection_group);
+       gnome_canvas_item_raise_to_top (selection_group);
        
        for (list<AudioRange>::iterator i = ts.begin(); i != ts.end(); ++i) {
                jack_nframes_t start, end, cnt;
        
        for (list<AudioRange>::iterator i = ts.begin(); i != ts.end(); ++i) {
                jack_nframes_t start, end, cnt;
@@ -547,14 +547,14 @@ TimeAxisView::show_selection (TimeSelection& ts)
                                        "x2", x2,
                                        "y2", 1.0 + trim_handle_size,
                                        NULL);
                                        "x2", x2,
                                        "y2", 1.0 + trim_handle_size,
                                        NULL);
-                       gtk_canvas_item_show (rect->start_trim);
-                       gtk_canvas_item_show (rect->end_trim);
+                       gnome_canvas_item_show (rect->start_trim);
+                       gnome_canvas_item_show (rect->end_trim);
                } else {
                } else {
-                       gtk_canvas_item_hide (rect->start_trim);
-                       gtk_canvas_item_hide (rect->end_trim);
+                       gnome_canvas_item_hide (rect->start_trim);
+                       gnome_canvas_item_hide (rect->end_trim);
                }
 
                }
 
-               gtk_canvas_item_show (rect->rect);
+               gnome_canvas_item_show (rect->rect);
                used_selection_rects.push_back (rect);
        }
 }
                used_selection_rects.push_back (rect);
        }
 }
@@ -572,15 +572,15 @@ TimeAxisView::reshow_selection (TimeSelection& ts)
 void
 TimeAxisView::hide_selection ()
 {
 void
 TimeAxisView::hide_selection ()
 {
-       if (GTK_OBJECT_FLAGS(GTK_OBJECT(selection_group)) & GTK_CANVAS_ITEM_VISIBLE) {
+       if (GTK_OBJECT_FLAGS(GTK_OBJECT(selection_group)) & GNOME_CANVAS_ITEM_VISIBLE) {
                while (!used_selection_rects.empty()) {
                        free_selection_rects.push_front (used_selection_rects.front());
                        used_selection_rects.pop_front();
                while (!used_selection_rects.empty()) {
                        free_selection_rects.push_front (used_selection_rects.front());
                        used_selection_rects.pop_front();
-                       gtk_canvas_item_hide (free_selection_rects.front()->rect);
-                       gtk_canvas_item_hide (free_selection_rects.front()->start_trim);
-                       gtk_canvas_item_hide (free_selection_rects.front()->end_trim);
+                       gnome_canvas_item_hide (free_selection_rects.front()->rect);
+                       gnome_canvas_item_hide (free_selection_rects.front()->start_trim);
+                       gnome_canvas_item_hide (free_selection_rects.front()->end_trim);
                }
                }
-               gtk_canvas_item_hide (selection_group);
+               gnome_canvas_item_hide (selection_group);
        }
        
        for (vector<TimeAxisView*>::iterator i = children.begin(); i != children.end(); ++i) {
        }
        
        for (vector<TimeAxisView*>::iterator i = children.begin(); i != children.end(); ++i) {
@@ -589,7 +589,7 @@ TimeAxisView::hide_selection ()
 }
 
 void
 }
 
 void
-TimeAxisView::order_selection_trims (GtkCanvasItem *item, bool put_start_on_top)
+TimeAxisView::order_selection_trims (GnomeCanvasItem *item, bool put_start_on_top)
 {
        /* find the selection rect this is for. we have the item corresponding to one
           of the trim handles.
 {
        /* find the selection rect this is for. we have the item corresponding to one
           of the trim handles.
@@ -602,9 +602,9 @@ TimeAxisView::order_selection_trims (GtkCanvasItem *item, bool put_start_on_top)
                           the top one is the one last used.
                        */
 
                           the top one is the one last used.
                        */
 
-                       gtk_canvas_item_raise_to_top ((*i)->rect);
-                       gtk_canvas_item_raise_to_top (put_start_on_top ? (*i)->start_trim : (*i)->end_trim);
-                       gtk_canvas_item_raise_to_top (put_start_on_top ? (*i)->end_trim : (*i)->start_trim);
+                       gnome_canvas_item_raise_to_top ((*i)->rect);
+                       gnome_canvas_item_raise_to_top (put_start_on_top ? (*i)->start_trim : (*i)->end_trim);
+                       gnome_canvas_item_raise_to_top (put_start_on_top ? (*i)->end_trim : (*i)->start_trim);
 
                        break;
                }
 
                        break;
                }
@@ -639,8 +639,8 @@ TimeAxisView::get_selection_rect (uint32_t id)
 
                rect = new SelectionRect;
 
 
                rect = new SelectionRect;
 
-               rect->rect = gtk_canvas_item_new (GTK_CANVAS_GROUP(selection_group),
-                                                 gtk_canvas_simplerect_get_type(),
+               rect->rect = gnome_canvas_item_new (GNOME_CANVAS_GROUP(selection_group),
+                                                 gnome_canvas_simplerect_get_type(),
                                                  "x1", 0.0,
                                                  "y1", 0.0,
                                                  "x2", 0.0,
                                                  "x1", 0.0,
                                                  "y1", 0.0,
                                                  "x2", 0.0,
@@ -650,16 +650,16 @@ TimeAxisView::get_selection_rect (uint32_t id)
                                                  NULL);
                
                
                                                  NULL);
                
                
-               rect->start_trim = gtk_canvas_item_new (GTK_CANVAS_GROUP(selection_group),
-                                                           gtk_canvas_simplerect_get_type(),
+               rect->start_trim = gnome_canvas_item_new (GNOME_CANVAS_GROUP(selection_group),
+                                                           gnome_canvas_simplerect_get_type(),
                                                            "x1", (gdouble) 0.0,
                                                            "x2", (gdouble) 0.0,
                                                            "fill_color_rgba" , color_map[cSelectionStartFill],
                                                            "outline_color_rgba" , color_map[cSelectionStartOutline],
                                                            NULL);
                
                                                            "x1", (gdouble) 0.0,
                                                            "x2", (gdouble) 0.0,
                                                            "fill_color_rgba" , color_map[cSelectionStartFill],
                                                            "outline_color_rgba" , color_map[cSelectionStartOutline],
                                                            NULL);
                
-               rect->end_trim = gtk_canvas_item_new (GTK_CANVAS_GROUP(selection_group),
-                                                         gtk_canvas_simplerect_get_type(),
+               rect->end_trim = gnome_canvas_item_new (GNOME_CANVAS_GROUP(selection_group),
+                                                         gnome_canvas_simplerect_get_type(),
                                                          "x1", 0.0,
                                                          "x2", 0.0,
                                                          "fill_color_rgba" , color_map[cSelectionEndFill],
                                                          "x1", 0.0,
                                                          "x2", 0.0,
                                                          "fill_color_rgba" , color_map[cSelectionEndFill],
index 754a7bbab7aab724ee661137fdf18bc060eaa1b7..a89fd7a87fec68a7182627a3b425e563388ade66 100644 (file)
@@ -25,7 +25,7 @@
 #include <list>
 
 #include <gtkmm.h>
 #include <list>
 
 #include <gtkmm.h>
-#include <gtk-canvas.h>
+#include <libgnomecanvas/libgnomecanvas.h>
 
 #include <ardour/types.h>
 #include <ardour/region.h>
 
 #include <ardour/types.h>
 #include <ardour/region.h>
@@ -87,7 +87,7 @@ class TimeAxisView : public virtual AxisView
        int     order;
 
        
        int     order;
 
        
-       GtkCanvasItem   *canvas_display;
+       GnomeCanvasItem   *canvas_display;
        Gtk::VBox       *control_parent;
 
        /* The Standard LHS Controls */
        Gtk::VBox       *control_parent;
 
        /* The Standard LHS Controls */
@@ -168,7 +168,7 @@ class TimeAxisView : public virtual AxisView
                return 0;
        }
 
                return 0;
        }
 
-       void order_selection_trims (GtkCanvasItem *item, bool put_start_on_top);
+       void order_selection_trims (GnomeCanvasItem *item, bool put_start_on_top);
 
        virtual void get_selectables (jack_nframes_t start, jack_nframes_t end, double top, double bot, list<Selectable*>& results);
        virtual void get_inverted_selectables (Selection&, list<Selectable *>& results);
 
        virtual void get_selectables (jack_nframes_t start, jack_nframes_t end, double top, double bot, list<Selectable*>& results);
        virtual void get_inverted_selectables (Selection&, list<Selectable *>& results);
@@ -272,7 +272,7 @@ class TimeAxisView : public virtual AxisView
 
        /* selection display */
 
 
        /* selection display */
 
-       GtkCanvasItem      *selection_group;
+       GnomeCanvasItem      *selection_group;
 
        list<SelectionRect*> free_selection_rects;
        list<SelectionRect*> used_selection_rects;
 
        list<SelectionRect*> free_selection_rects;
        list<SelectionRect*> used_selection_rects;
index 99d5cec4d9ff0a664bfc1238e223f667296e30d0..f47f8c81d93073e9ff01e17907bc24b43cb7b7e9 100644 (file)
@@ -60,7 +60,7 @@ const double TimeAxisViewItem::GRAB_HANDLE_LENGTH = 6 ;
  * @param start the start point of this item
  * @param duration the duration of this item
  */
  * @param start the start point of this item
  * @param duration the duration of this item
  */
-TimeAxisViewItem::TimeAxisViewItem(std::string it_name, GtkCanvasGroup* parent, TimeAxisView& tv, double spu, GdkColor& base_color, 
+TimeAxisViewItem::TimeAxisViewItem(std::string it_name, GnomeCanvasGroup* parent, TimeAxisView& tv, double spu, GdkColor& base_color, 
                                   jack_nframes_t start, jack_nframes_t duration,
                                   Visibility visibility)
        : trackview (tv)
                                   jack_nframes_t start, jack_nframes_t duration,
                                   Visibility visibility)
        : trackview (tv)
@@ -85,10 +85,10 @@ TimeAxisViewItem::TimeAxisViewItem(std::string it_name, GtkCanvasGroup* parent,
                warning << "Time Axis Item Duration == 0" << endl ;
        }
 
                warning << "Time Axis Item Duration == 0" << endl ;
        }
 
-       group = gtk_canvas_item_new(GTK_CANVAS_GROUP(parent),gtk_canvas_group_get_type(),NULL) ;
+       group = gnome_canvas_item_new(GNOME_CANVAS_GROUP(parent),gnome_canvas_group_get_type(),NULL) ;
 
 
-       vestigial_frame = gtk_canvas_item_new(GTK_CANVAS_GROUP(group),
-                                             gtk_canvas_simplerect_get_type(),
+       vestigial_frame = gnome_canvas_item_new(GNOME_CANVAS_GROUP(group),
+                                             gnome_canvas_simplerect_get_type(),
                                              "x1", (double) 0.0,
                                              "y1", (double) 1.0,
                                              "x2", 2.0,
                                              "x1", (double) 0.0,
                                              "y1", (double) 1.0,
                                              "x2", 2.0,
@@ -96,11 +96,11 @@ TimeAxisViewItem::TimeAxisViewItem(std::string it_name, GtkCanvasGroup* parent,
                                              "outline_color_rgba", color_map[cVestigialFrameOutline],
                                              "fill_color_rgba", color_map[cVestigialFrameFill],
                                              NULL);
                                              "outline_color_rgba", color_map[cVestigialFrameOutline],
                                              "fill_color_rgba", color_map[cVestigialFrameFill],
                                              NULL);
-       gtk_canvas_item_hide (vestigial_frame);
+       gnome_canvas_item_hide (vestigial_frame);
 
        if (visibility & ShowFrame) {
 
        if (visibility & ShowFrame) {
-               frame = gtk_canvas_item_new(GTK_CANVAS_GROUP(group),
-                                           gtk_canvas_simplerect_get_type(),
+               frame = gnome_canvas_item_new(GNOME_CANVAS_GROUP(group),
+                                           gnome_canvas_simplerect_get_type(),
                                            "x1", (double) 0.0,
                                            "y1", (double) 1.0,
                                            "x2", (double) trackview.editor.frame_to_pixel(duration),
                                            "x1", (double) 0.0,
                                            "y1", (double) 1.0,
                                            "x2", (double) trackview.editor.frame_to_pixel(duration),
@@ -113,8 +113,8 @@ TimeAxisViewItem::TimeAxisViewItem(std::string it_name, GtkCanvasGroup* parent,
        }
 
        if (visibility & ShowNameHighlight) {
        }
 
        if (visibility & ShowNameHighlight) {
-               name_highlight = gtk_canvas_item_new(GTK_CANVAS_GROUP(group),
-                                                    gtk_canvas_simplerect_get_type(),
+               name_highlight = gnome_canvas_item_new(GNOME_CANVAS_GROUP(group),
+                                                    gnome_canvas_simplerect_get_type(),
                                                     "x1", (double) 1.0,
                                                     "x2", (double) (trackview.editor.frame_to_pixel(item_duration)) - 1,
                                                     "y1", (double) (trackview.height - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE),
                                                     "x1", (double) 1.0,
                                                     "x2", (double) (trackview.editor.frame_to_pixel(item_duration)) - 1,
                                                     "y1", (double) (trackview.height - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE),
@@ -128,8 +128,8 @@ TimeAxisViewItem::TimeAxisViewItem(std::string it_name, GtkCanvasGroup* parent,
        }
 
        if (visibility & ShowNameText) {
        }
 
        if (visibility & ShowNameText) {
-               name_text = gtk_canvas_item_new(GTK_CANVAS_GROUP(group),
-                                               gtk_canvas_text_get_type(),
+               name_text = gnome_canvas_item_new(GNOME_CANVAS_GROUP(group),
+                                               gnome_canvas_text_get_type(),
                                                "x", (double) TimeAxisViewItem::NAME_X_OFFSET,
                                                "y", (double) trackview.height + 1.0 - TimeAxisViewItem::NAME_Y_OFFSET,
                                                "font", NAME_FONT.c_str(),
                                                "x", (double) TimeAxisViewItem::NAME_X_OFFSET,
                                                "y", (double) trackview.height + 1.0 - TimeAxisViewItem::NAME_Y_OFFSET,
                                                "font", NAME_FONT.c_str(),
@@ -144,8 +144,8 @@ TimeAxisViewItem::TimeAxisViewItem(std::string it_name, GtkCanvasGroup* parent,
        /* create our grab handles used for trimming/duration etc */
 
        if (visibility & ShowHandles) {
        /* create our grab handles used for trimming/duration etc */
 
        if (visibility & ShowHandles) {
-               frame_handle_start = gtk_canvas_item_new(GTK_CANVAS_GROUP(group),
-                                                        gtk_canvas_simplerect_get_type(),
+               frame_handle_start = gnome_canvas_item_new(GNOME_CANVAS_GROUP(group),
+                                                        gnome_canvas_simplerect_get_type(),
                                                         "x1", (double) 0.0,
                                                         "x2", (double) TimeAxisViewItem::GRAB_HANDLE_LENGTH,
                                                         "y1", (double) 1.0,
                                                         "x1", (double) 0.0,
                                                         "x2", (double) TimeAxisViewItem::GRAB_HANDLE_LENGTH,
                                                         "y1", (double) 1.0,
@@ -154,8 +154,8 @@ TimeAxisViewItem::TimeAxisViewItem(std::string it_name, GtkCanvasGroup* parent,
                                                         "fill_color_rgba", color_map[cFrameHandleStartFill],
                                                         NULL) ;
                
                                                         "fill_color_rgba", color_map[cFrameHandleStartFill],
                                                         NULL) ;
                
-               frame_handle_end = gtk_canvas_item_new(GTK_CANVAS_GROUP(group),
-                                                      gtk_canvas_simplerect_get_type(),
+               frame_handle_end = gnome_canvas_item_new(GNOME_CANVAS_GROUP(group),
+                                                      gnome_canvas_simplerect_get_type(),
                                                       "x1", (double) (trackview.editor.frame_to_pixel(get_duration())) - (TimeAxisViewItem::GRAB_HANDLE_LENGTH),
                                                       "x2", (double) trackview.editor.frame_to_pixel(get_duration()),
                                                       "y1", (double) 1,
                                                       "x1", (double) (trackview.editor.frame_to_pixel(get_duration())) - (TimeAxisViewItem::GRAB_HANDLE_LENGTH),
                                                       "x2", (double) trackview.editor.frame_to_pixel(get_duration()),
                                                       "y1", (double) 1,
@@ -203,11 +203,11 @@ TimeAxisViewItem::set_position(jack_nframes_t pos, void* src, double* delta)
 
        frame_position = pos;
        
 
        frame_position = pos;
        
-       /*  This sucks. The GtkCanvas version I am using
-           doesn't correctly implement gtk_canvas_group_set_arg(),
+       /*  This sucks. The GnomeCanvas version I am using
+           doesn't correctly implement gnome_canvas_group_set_arg(),
            so that simply setting the "x" arg of the group
            fails to move the group. Instead, we have to
            so that simply setting the "x" arg of the group
            fails to move the group. Instead, we have to
-           use gtk_canvas_item_move(), which does the right
+           use gnome_canvas_item_move(), which does the right
            thing. I see that in GNOME CVS, the current (Sept 2001)
            version of GNOME Canvas rectifies this issue cleanly.
        */
            thing. I see that in GNOME CVS, the current (Sept 2001)
            version of GNOME Canvas rectifies this issue cleanly.
        */
@@ -221,7 +221,7 @@ TimeAxisViewItem::set_position(jack_nframes_t pos, void* src, double* delta)
        old_unit_pos = GTK_VALUE_DOUBLE (args[0]) ;
 
        if (new_unit_pos != old_unit_pos) {
        old_unit_pos = GTK_VALUE_DOUBLE (args[0]) ;
 
        if (new_unit_pos != old_unit_pos) {
-               gtk_canvas_item_move (group, new_unit_pos - old_unit_pos, 0.0) ;
+               gnome_canvas_item_move (group, new_unit_pos - old_unit_pos, 0.0) ;
        }
 
        if (delta) {
        }
 
        if (delta) {
@@ -261,7 +261,7 @@ TimeAxisViewItem::set_duration (jack_nframes_t dur, void* src)
        }
 
        if (dur == 0) {
        }
 
        if (dur == 0) {
-               gtk_canvas_item_hide (group);
+               gnome_canvas_item_hide (group);
        }
 
        item_duration = dur;
        }
 
        item_duration = dur;
@@ -500,7 +500,7 @@ void
 TimeAxisViewItem::set_name_text(std::string new_name)
 {
        if (name_text) {
 TimeAxisViewItem::set_name_text(std::string new_name)
 {
        if (name_text) {
-               gtk_canvas_item_set (name_text, "text", new_name.c_str(), NULL);
+               gnome_canvas_item_set (name_text, "text", new_name.c_str(), NULL);
        }
 }
 
        }
 }
 
@@ -514,22 +514,22 @@ TimeAxisViewItem::set_height(double height)
 {
        if (name_highlight) {
                if (height < NAME_HIGHLIGHT_THRESH) {
 {
        if (name_highlight) {
                if (height < NAME_HIGHLIGHT_THRESH) {
-                       gtk_canvas_item_hide (name_highlight);
-                       gtk_canvas_item_hide (name_text);
+                       gnome_canvas_item_hide (name_highlight);
+                       gnome_canvas_item_hide (name_text);
                } else {
                } else {
-                       gtk_canvas_item_show (name_highlight);
-                       gtk_canvas_item_show (name_text);
+                       gnome_canvas_item_show (name_highlight);
+                       gnome_canvas_item_show (name_text);
                }
 
                if (height > NAME_HIGHLIGHT_SIZE) {
                }
 
                if (height > NAME_HIGHLIGHT_SIZE) {
-                       gtk_canvas_item_set (name_highlight, 
+                       gnome_canvas_item_set (name_highlight, 
                                             "y1", (double) height+1 - NAME_HIGHLIGHT_SIZE,
                                             "y2", (double) height,
                                             NULL);
                }
                else {
                        /* it gets hidden now anyway */
                                             "y1", (double) height+1 - NAME_HIGHLIGHT_SIZE,
                                             "y2", (double) height,
                                             NULL);
                }
                else {
                        /* it gets hidden now anyway */
-                       gtk_canvas_item_set (name_highlight, 
+                       gnome_canvas_item_set (name_highlight, 
                                             "y1", (double) 1.0,
                                             "y2", (double) height,
                                             NULL);
                                             "y1", (double) 1.0,
                                             "y2", (double) height,
                                             NULL);
@@ -537,20 +537,20 @@ TimeAxisViewItem::set_height(double height)
        }
 
        if (name_text) {
        }
 
        if (name_text) {
-               gtk_canvas_item_set (name_text, "y", height+1 - NAME_Y_OFFSET, NULL);
+               gnome_canvas_item_set (name_text, "y", height+1 - NAME_Y_OFFSET, NULL);
                if (height < NAME_HIGHLIGHT_THRESH) {
                if (height < NAME_HIGHLIGHT_THRESH) {
-                       gtk_canvas_item_set(name_text, "fill_color_rgba",  fill_color, NULL) ;
+                       gnome_canvas_item_set(name_text, "fill_color_rgba",  fill_color, NULL) ;
                }
                else {
                }
                else {
-                       gtk_canvas_item_set(name_text, "fill_color_rgba", label_color, NULL) ;
+                       gnome_canvas_item_set(name_text, "fill_color_rgba", label_color, NULL) ;
                }
        }
 
        if (frame) {
                }
        }
 
        if (frame) {
-               gtk_canvas_item_set (frame, "y2", height+1, NULL) ;
+               gnome_canvas_item_set (frame, "y2", height+1, NULL) ;
        }
 
        }
 
-       gtk_canvas_item_set (vestigial_frame, "y2", height+1, NULL) ;
+       gnome_canvas_item_set (vestigial_frame, "y2", height+1, NULL) ;
 }
 
 /**
 }
 
 /**
@@ -566,7 +566,7 @@ TimeAxisViewItem::set_color(GdkColor& base_color)
 /**
  * 
  */
 /**
  * 
  */
-GtkCanvasItem*
+GnomeCanvasItem*
 TimeAxisViewItem::get_canvas_frame()
 {
        return(frame) ;
 TimeAxisViewItem::get_canvas_frame()
 {
        return(frame) ;
@@ -575,7 +575,7 @@ TimeAxisViewItem::get_canvas_frame()
 /**
  * 
  */
 /**
  * 
  */
-GtkCanvasItem*
+GnomeCanvasItem*
 TimeAxisViewItem::get_canvas_group()
 {
        return(group) ;
 TimeAxisViewItem::get_canvas_group()
 {
        return(group) ;
@@ -584,7 +584,7 @@ TimeAxisViewItem::get_canvas_group()
 /**
  * 
  */
 /**
  * 
  */
-GtkCanvasItem*
+GnomeCanvasItem*
 TimeAxisViewItem::get_name_highlight()
 {
        return(name_highlight) ;
 TimeAxisViewItem::get_name_highlight()
 {
        return(name_highlight) ;
@@ -593,7 +593,7 @@ TimeAxisViewItem::get_name_highlight()
 /**
  * 
  */
 /**
  * 
  */
-GtkCanvasItem*
+GnomeCanvasItem*
 TimeAxisViewItem::get_name_text()
 {
        return(name_text) ;
 TimeAxisViewItem::get_name_text()
 {
        return(name_text) ;
@@ -711,16 +711,16 @@ TimeAxisViewItem::set_colors()
                }
 
                if (height < NAME_HIGHLIGHT_THRESH) {
                }
 
                if (height < NAME_HIGHLIGHT_THRESH) {
-                       gtk_canvas_item_set(name_text, "fill_color_rgba",  fill_color, NULL) ;
+                       gnome_canvas_item_set(name_text, "fill_color_rgba",  fill_color, NULL) ;
                }
                else {
                }
                else {
-                       gtk_canvas_item_set(name_text, "fill_color_rgba", label_color, NULL) ;
+                       gnome_canvas_item_set(name_text, "fill_color_rgba", label_color, NULL) ;
                }
        }
 
        if (name_highlight) {
                }
        }
 
        if (name_highlight) {
-               gtk_canvas_item_set(name_highlight, "fill_color_rgba", fill_color, NULL) ;
-               gtk_canvas_item_set(name_highlight, "outline_color_rgba", fill_color, NULL) ;
+               gnome_canvas_item_set(name_highlight, "fill_color_rgba", fill_color, NULL) ;
+               gnome_canvas_item_set(name_highlight, "outline_color_rgba", fill_color, NULL) ;
        }
        set_trim_handle_colors() ;
 }
        }
        set_trim_handle_colors() ;
 }
@@ -736,10 +736,10 @@ TimeAxisViewItem::set_frame_color()
                
                if (_selected && should_show_selection) {
                        UINT_TO_RGBA(color_map[cSelectedFrameBase], &r, &g, &b, &a);
                
                if (_selected && should_show_selection) {
                        UINT_TO_RGBA(color_map[cSelectedFrameBase], &r, &g, &b, &a);
-                       gtk_canvas_item_set(frame, "fill_color_rgba", RGBA_TO_UINT(r, g, b, fill_opacity), NULL) ;
+                       gnome_canvas_item_set(frame, "fill_color_rgba", RGBA_TO_UINT(r, g, b, fill_opacity), NULL) ;
                } else {
                        UINT_TO_RGBA(color_map[cFrameBase], &r, &g, &b, &a);
                } else {
                        UINT_TO_RGBA(color_map[cFrameBase], &r, &g, &b, &a);
-                       gtk_canvas_item_set(frame, "fill_color_rgba", RGBA_TO_UINT(r, g, b, fill_opacity), NULL) ;
+                       gnome_canvas_item_set(frame, "fill_color_rgba", RGBA_TO_UINT(r, g, b, fill_opacity), NULL) ;
                }
        }
 }
                }
        }
 }
@@ -753,11 +753,11 @@ TimeAxisViewItem::set_trim_handle_colors()
 {
        if (frame_handle_start) {
                if (position_locked) {
 {
        if (frame_handle_start) {
                if (position_locked) {
-                       gtk_canvas_item_set(frame_handle_start, "fill_color_rgba", color_map[cTrimHandleLockedStart], NULL);
-                       gtk_canvas_item_set(frame_handle_end, "fill_color_rgba", color_map[cTrimHandleLockedEnd], NULL) ;
+                       gnome_canvas_item_set(frame_handle_start, "fill_color_rgba", color_map[cTrimHandleLockedStart], NULL);
+                       gnome_canvas_item_set(frame_handle_end, "fill_color_rgba", color_map[cTrimHandleLockedEnd], NULL) ;
                } else {
                } else {
-                       gtk_canvas_item_set(frame_handle_start, "fill_color_rgba", color_map[cTrimHandleStart], NULL) ;
-                       gtk_canvas_item_set(frame_handle_end, "fill_color_rgba", color_map[cTrimHandleEnd], NULL) ;
+                       gnome_canvas_item_set(frame_handle_start, "fill_color_rgba", color_map[cTrimHandleStart], NULL) ;
+                       gnome_canvas_item_set(frame_handle_end, "fill_color_rgba", color_map[cTrimHandleEnd], NULL) ;
                }
        }
 }
                }
        }
 }
@@ -782,32 +782,32 @@ TimeAxisViewItem::reset_width_dependent_items (double pixel_width)
        if (pixel_width < GRAB_HANDLE_LENGTH * 2) {
 
                if (frame_handle_start) {
        if (pixel_width < GRAB_HANDLE_LENGTH * 2) {
 
                if (frame_handle_start) {
-                       gtk_canvas_item_hide (frame_handle_start);
-                       gtk_canvas_item_hide (frame_handle_end);
+                       gnome_canvas_item_hide (frame_handle_start);
+                       gnome_canvas_item_hide (frame_handle_end);
                }
 
        } if (pixel_width < 2.0) {
 
                if (show_vestigial) {
                }
 
        } if (pixel_width < 2.0) {
 
                if (show_vestigial) {
-                       gtk_canvas_item_show (vestigial_frame);
+                       gnome_canvas_item_show (vestigial_frame);
                }
 
                if (name_highlight) {
                }
 
                if (name_highlight) {
-                       gtk_canvas_item_hide (name_highlight);
-                       gtk_canvas_item_hide (name_text);
+                       gnome_canvas_item_hide (name_highlight);
+                       gnome_canvas_item_hide (name_text);
                }
 
                if (frame) {
                }
 
                if (frame) {
-                       gtk_canvas_item_hide (frame);
+                       gnome_canvas_item_hide (frame);
                }
 
                if (frame_handle_start) {
                }
 
                if (frame_handle_start) {
-                       gtk_canvas_item_hide (frame_handle_start);
-                       gtk_canvas_item_hide (frame_handle_end);
+                       gnome_canvas_item_hide (frame_handle_start);
+                       gnome_canvas_item_hide (frame_handle_end);
                }
                
        } else {
                }
                
        } else {
-               gtk_canvas_item_hide (vestigial_frame);
+               gnome_canvas_item_hide (vestigial_frame);
 
                if (name_highlight) {
 
 
                if (name_highlight) {
 
@@ -817,31 +817,31 @@ TimeAxisViewItem::reset_width_dependent_items (double pixel_width)
                        double height = GTK_VALUE_DOUBLE (args[0]);
 
                        if (height < NAME_HIGHLIGHT_THRESH) {
                        double height = GTK_VALUE_DOUBLE (args[0]);
 
                        if (height < NAME_HIGHLIGHT_THRESH) {
-                               gtk_canvas_item_hide (name_highlight);
-                               gtk_canvas_item_hide (name_text);
+                               gnome_canvas_item_hide (name_highlight);
+                               gnome_canvas_item_hide (name_text);
                        } else {
                        } else {
-                               gtk_canvas_item_show (name_highlight);
-                               gtk_canvas_item_show (name_text);
+                               gnome_canvas_item_show (name_highlight);
+                               gnome_canvas_item_show (name_text);
                                reset_name_width (pixel_width);
                        }
 
                                reset_name_width (pixel_width);
                        }
 
-                       gtk_canvas_item_set (name_highlight, "x2", pixel_width - 1.0, NULL);
+                       gnome_canvas_item_set (name_highlight, "x2", pixel_width - 1.0, NULL);
                }
 
                if (frame) {
                }
 
                if (frame) {
-                       gtk_canvas_item_show (frame);
-                       gtk_canvas_item_set (frame, "x2", pixel_width, NULL);
+                       gnome_canvas_item_show (frame);
+                       gnome_canvas_item_set (frame, "x2", pixel_width, NULL);
                }
 
                if (frame_handle_start) {
                        if (pixel_width < (2*TimeAxisViewItem::GRAB_HANDLE_LENGTH)) {
                }
 
                if (frame_handle_start) {
                        if (pixel_width < (2*TimeAxisViewItem::GRAB_HANDLE_LENGTH)) {
-                               gtk_canvas_item_hide (frame_handle_start);
-                               gtk_canvas_item_hide (frame_handle_end);
+                               gnome_canvas_item_hide (frame_handle_start);
+                               gnome_canvas_item_hide (frame_handle_end);
                        }
                        }
-                       gtk_canvas_item_show (frame_handle_start);
-                       gtk_canvas_item_set(GTK_CANVAS_ITEM(frame_handle_end), "x1", pixel_width - (TimeAxisViewItem::GRAB_HANDLE_LENGTH ), NULL) ;
-                       gtk_canvas_item_show (frame_handle_end);
-                       gtk_canvas_item_set(GTK_CANVAS_ITEM(frame_handle_end), "x2", pixel_width, NULL) ;
+                       gnome_canvas_item_show (frame_handle_start);
+                       gnome_canvas_item_set(GNOME_CANVAS_ITEM(frame_handle_end), "x1", pixel_width - (TimeAxisViewItem::GRAB_HANDLE_LENGTH ), NULL) ;
+                       gnome_canvas_item_show (frame_handle_end);
+                       gnome_canvas_item_set(GNOME_CANVAS_ITEM(frame_handle_end), "x2", pixel_width, NULL) ;
                }
        }
 }
                }
        }
 }
@@ -885,7 +885,7 @@ TimeAxisViewItem::reset_name_width (double pixel_width)
 
        if (namelen == 0) {
                
 
        if (namelen == 0) {
                
-               gtk_canvas_item_hide (name_text);
+               gnome_canvas_item_hide (name_text);
                
        } else {
                
                
        } else {
                
@@ -903,8 +903,8 @@ TimeAxisViewItem::reset_name_width (double pixel_width)
                        }
                }
                
                        }
                }
                
-               gtk_canvas_item_set (name_text, "text", cstr, NULL);
-               gtk_canvas_item_show (name_text);
+               gnome_canvas_item_set (name_text, "text", cstr, NULL);
+               gnome_canvas_item_show (name_text);
        }
 }
 
        }
 }
 
index 27f7a8de91bc46c9b3dfff8a959736329ea1d7f1..5152d3c65667e3c6b6876a9e4164755a38f253a3 100644 (file)
@@ -22,7 +22,7 @@
 #define __gtk_ardour_time_axis_view_item_h__
 
 #include <sigc++/signal.h>
 #define __gtk_ardour_time_axis_view_item_h__
 
 #include <sigc++/signal.h>
-#include <gtk-canvas.h>
+#include <libgnomecanvas/libgnomecanvas.h>
 #include <jack/jack.h>
 #include <string>
 
 #include <jack/jack.h>
 #include <string>
 
@@ -220,22 +220,22 @@ class TimeAxisViewItem : public sigc::trackable, public Selectable
     /**
      * 
      */
     /**
      * 
      */
-    GtkCanvasItem* get_canvas_frame() ;
+    GnomeCanvasItem* get_canvas_frame() ;
 
     /**
      * 
      */
 
     /**
      * 
      */
-    GtkCanvasItem* get_canvas_group();
+    GnomeCanvasItem* get_canvas_group();
 
     /**
      * 
      */
 
     /**
      * 
      */
-    GtkCanvasItem* get_name_highlight();
+    GnomeCanvasItem* get_name_highlight();
 
     /**
      * 
      */
 
     /**
      * 
      */
-    GtkCanvasItem* get_name_text();
+    GnomeCanvasItem* get_name_text();
 
     /**
      * Sets the samples per unit of this item.
 
     /**
      * Sets the samples per unit of this item.
@@ -334,7 +334,7 @@ class TimeAxisViewItem : public sigc::trackable, public Selectable
      * @param start the start point of this item
      * @param duration the duration of this item
      */
      * @param start the start point of this item
      * @param duration the duration of this item
      */
-    TimeAxisViewItem(std::string it_name, GtkCanvasGroup* parent, TimeAxisView& tv, double spu, GdkColor& base_color, 
+    TimeAxisViewItem(std::string it_name, GnomeCanvasGroup* parent, TimeAxisView& tv, double spu, GdkColor& base_color, 
                     jack_nframes_t start, jack_nframes_t duration, Visibility v = Visibility (0));
     
     /**
                     jack_nframes_t start, jack_nframes_t duration, Visibility v = Visibility (0));
     
     /**
@@ -440,13 +440,13 @@ class TimeAxisViewItem : public sigc::trackable, public Selectable
     uint32_t lock_handle_color_g ;
     uint32_t lock_handle_color_b ;
     
     uint32_t lock_handle_color_g ;
     uint32_t lock_handle_color_b ;
     
-    GtkCanvasItem* group ;               /* the group */
-    GtkCanvasItem* vestigial_frame ;     /* simplerect */
-    GtkCanvasItem* frame ;               /* simplerect */
-    GtkCanvasItem* name_text ;           /* text */
-    GtkCanvasItem* name_highlight ;      /* simplerect */
-    GtkCanvasItem* frame_handle_start ;  /* simplerect */
-    GtkCanvasItem* frame_handle_end ;    /* simplerect */
+    GnomeCanvasItem* group ;               /* the group */
+    GnomeCanvasItem* vestigial_frame ;     /* simplerect */
+    GnomeCanvasItem* frame ;               /* simplerect */
+    GnomeCanvasItem* name_text ;           /* text */
+    GnomeCanvasItem* name_highlight ;      /* simplerect */
+    GnomeCanvasItem* frame_handle_start ;  /* simplerect */
+    GnomeCanvasItem* frame_handle_end ;    /* simplerect */
 
 }; /* class TimeAxisViewItem */
 
 
 }; /* class TimeAxisViewItem */
 
index a1e317abd45c344543d1ae3e70b2dd3bbfc89fac..ee124db50ffde8d30c688752501c84111f0a6ba3 100644 (file)
@@ -313,7 +313,7 @@ xpm2rgba (const char** xpm, uint32_t& w, uint32_t& h)
        return (savergb);
 }
 
        return (savergb);
 }
 
-GtkCanvasPoints*
+GnomeCanvasPoints*
 get_canvas_points (string who, uint32_t npoints)
 {
        // cerr << who << ": wants " << npoints << " canvas points" << endl;
 get_canvas_points (string who, uint32_t npoints)
 {
        // cerr << who << ": wants " << npoints << " canvas points" << endl;
@@ -322,7 +322,7 @@ get_canvas_points (string who, uint32_t npoints)
                abort ();
        }
 #endif
                abort ();
        }
 #endif
-       return gtk_canvas_points_new (npoints);
+       return gnome_canvas_points_new (npoints);
 }
 
 int
 }
 
 int
index bc0f5cfdec0310207684fe833c5469eb45419de4..7596b2619014d5352fb3db18cedf2337a4d32548 100644 (file)
@@ -25,8 +25,8 @@
 #include <vector>
 #include <cmath>
 #include <ardour/types.h>
 #include <vector>
 #include <cmath>
 #include <ardour/types.h>
-#include <gtk-canvas.h>
-#include <gdk--/types.h>
+#include <libgnomecanvas/libgnomecanvas.h>
+#include <gdkmm/types.h>
 
 namespace Gtk {
        class Window;
 
 namespace Gtk {
        class Window;
@@ -63,7 +63,7 @@ void   allow_keyboard_focus (bool);
 unsigned char* xpm2rgb  (const char** xpm, uint32_t& w, uint32_t& h);
 unsigned char* xpm2rgba (const char** xpm, uint32_t& w, uint32_t& h);
 
 unsigned char* xpm2rgb  (const char** xpm, uint32_t& w, uint32_t& h);
 unsigned char* xpm2rgba (const char** xpm, uint32_t& w, uint32_t& h);
 
-GtkCanvasPoints* get_canvas_points (std::string who, uint32_t npoints);
+GnomeCanvasPoints* get_canvas_points (std::string who, uint32_t npoints);
 
 int channel_combo_get_channel_count (Gtk::Combo& combo);
 std::string get_font_for_style (std::string widgetname);
 
 int channel_combo_get_channel_count (Gtk::Combo& combo);
 std::string get_font_for_style (std::string widgetname);
index 1621c78f931d0eaf7ebd534e4ccd90843121e14d..a00deba5d249f6da839b21228856523d9cc743ad 100644 (file)
@@ -22,7 +22,7 @@
 #define __ardour_visual_time_axis_h__
 
 #include <gtkmm.h>
 #define __ardour_visual_time_axis_h__
 
 #include <gtkmm.h>
-#include <gtk-canvas.h>
+#include <libgnomecanvas/libgnomecanvas.h>
 #include <gtkmm2ext/selector.h>
 #include <gtkmm2ext/popup_selector.h>
 
 #include <gtkmm2ext/selector.h>
 #include <gtkmm2ext/popup_selector.h>