summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2013-04-12 21:46:44 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2013-04-12 21:46:44 -0400
commit4e84bc3a39ca624d62be590c532a8bc33b33baa4 (patch)
treee81eda4a9f866590e1a4bb5891fba057c9b86ccc /gtk2_ardour
parentb05968fb4e303ce47b6e09cd1bc713f3af28a6f9 (diff)
changes to get cairocanvas branch to build on OS X, with its stupid nil and Rect macros, plus some const_cast<> and unused variable fixes that should really be in master but will have to wait till we rebase master
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/editor_drag.cc2
-rw-r--r--gtk2_ardour/gtk_pianokeyboard.c10
-rw-r--r--gtk2_ardour/hit.cc8
-rw-r--r--gtk2_ardour/midi_tracer.cc8
-rw-r--r--gtk2_ardour/note_base.cc2
5 files changed, 19 insertions, 11 deletions
diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc
index 707a0884f0..0d64d940f2 100644
--- a/gtk2_ardour/editor_drag.cc
+++ b/gtk2_ardour/editor_drag.cc
@@ -3334,7 +3334,7 @@ FeatureLineDrag::motion (GdkEvent*, bool)
cx = 0;
}
- boost::optional<Rect> bbox = _line->bounding_box ();
+ boost::optional<ArdourCanvas::Rect> bbox = _line->bounding_box ();
assert (bbox);
_line->set (ArdourCanvas::Duple (cx, 2.0), ArdourCanvas::Duple (cx, bbox.get().height ()));
diff --git a/gtk2_ardour/gtk_pianokeyboard.c b/gtk2_ardour/gtk_pianokeyboard.c
index 1e5768040e..5101bd8aff 100644
--- a/gtk2_ardour/gtk_pianokeyboard.c
+++ b/gtk2_ardour/gtk_pianokeyboard.c
@@ -244,7 +244,7 @@ bind_key(PianoKeyboard *pk, const char *key, int note)
{
assert(pk->key_bindings != NULL);
- g_hash_table_insert(pk->key_bindings, (gpointer)key, (gpointer)((intptr_t)note));
+ g_hash_table_insert(pk->key_bindings, key, (gpointer)((intptr_t)note));
}
static void
@@ -360,6 +360,8 @@ keyboard_event_handler(GtkWidget *mk, GdkEventKey *event, gpointer ignored)
GdkKeymapKey kk;
PianoKeyboard *pk = PIANO_KEYBOARD(mk);
+ (void) ignored;
+
/* We're not using event->keyval, because we need keyval with level set to 0.
E.g. if user holds Shift and presses '7', we want to get a '7', not '&'. */
kk.keycode = event->hardware_keycode;
@@ -440,6 +442,8 @@ mouse_button_event_handler(PianoKeyboard *pk, GdkEventButton *event, gpointer ig
int note = get_note_for_xy(pk, x, y);
+ (void) ignored;
+
if (event->button != 1)
return TRUE;
@@ -477,6 +481,8 @@ mouse_motion_event_handler(PianoKeyboard *pk, GdkEventMotion *event, gpointer ig
{
int note;
+ (void) ignored;
+
if ((event->state & GDK_BUTTON1_MASK) == 0)
return TRUE;
@@ -529,6 +535,8 @@ piano_keyboard_expose(GtkWidget *widget, GdkEventExpose *event)
static void
piano_keyboard_size_request(GtkWidget* w, GtkRequisition *requisition)
{
+ (void) w;
+
requisition->width = PIANO_KEYBOARD_DEFAULT_WIDTH;
requisition->height = PIANO_KEYBOARD_DEFAULT_HEIGHT;
}
diff --git a/gtk2_ardour/hit.cc b/gtk2_ardour/hit.cc
index a7d1a9b47b..257a3cd4f0 100644
--- a/gtk2_ardour/hit.cc
+++ b/gtk2_ardour/hit.cc
@@ -48,7 +48,7 @@ Hit::move_event (double dx, double dy)
Coord
Hit::x0 () const
{
- boost::optional<Rect> bbox = _polygon->bounding_box ();
+ boost::optional<ArdourCanvas::Rect> bbox = _polygon->bounding_box ();
assert (bbox);
return bbox.get().x0;
}
@@ -56,7 +56,7 @@ Hit::x0 () const
Coord
Hit::x1 () const
{
- boost::optional<Rect> bbox = _polygon->bounding_box ();
+ boost::optional<ArdourCanvas::Rect> bbox = _polygon->bounding_box ();
assert (bbox);
return bbox.get().x1;
}
@@ -64,7 +64,7 @@ Hit::x1 () const
Coord
Hit::y0 () const
{
- boost::optional<Rect> bbox = _polygon->bounding_box ();
+ boost::optional<ArdourCanvas::Rect> bbox = _polygon->bounding_box ();
assert (bbox);
return bbox.get().y0;
}
@@ -72,7 +72,7 @@ Hit::y0 () const
Coord
Hit::y1 () const
{
- boost::optional<Rect> bbox = _polygon->bounding_box ();
+ boost::optional<ArdourCanvas::Rect> bbox = _polygon->bounding_box ();
assert (bbox);
return bbox.get().y1;
}
diff --git a/gtk2_ardour/midi_tracer.cc b/gtk2_ardour/midi_tracer.cc
index 70d7c24da6..2515bef08d 100644
--- a/gtk2_ardour/midi_tracer.cc
+++ b/gtk2_ardour/midi_tracer.cc
@@ -362,9 +362,9 @@ MidiTracer::tracer (Parser&, byte* msg, size_t len)
fifo.write (&buf, 1);
- if (g_atomic_int_get (&_update_queued) == 0) {
- gui_context()->call_slot (invalidator (*this), boost::bind (&MidiTracer::update, this));
- g_atomic_int_inc (&_update_queued);
+ if (g_atomic_int_get (const_cast<gint*>(&_update_queued)) == 0) {
+ gui_context()->call_slot (invalidator (*this), boost::bind (&MidiTracer::update, this));
+ g_atomic_int_inc (const_cast<gint*>(&_update_queued));
}
}
@@ -372,7 +372,7 @@ void
MidiTracer::update ()
{
bool updated = false;
- g_atomic_int_dec_and_test (&_update_queued);
+ g_atomic_int_dec_and_test (const_cast<gint*>(&_update_queued));
RefPtr<TextBuffer> buf (text.get_buffer());
diff --git a/gtk2_ardour/note_base.cc b/gtk2_ardour/note_base.cc
index b8587e16da..d4a2a63a92 100644
--- a/gtk2_ardour/note_base.cc
+++ b/gtk2_ardour/note_base.cc
@@ -279,7 +279,7 @@ NoteBase::set_mouse_fractions (GdkEvent* ev)
return;
}
- boost::optional<Rect> bbox = _item->bounding_box ();
+ boost::optional<ArdourCanvas::Rect> bbox = _item->bounding_box ();
assert (bbox);
_item->canvas_to_item (ix, iy);