Skip to content

Commit 78a0d76

Browse files
committed
Make Trigger and Wobble buildable with cairo
1 parent 824e969 commit 78a0d76

File tree

10 files changed

+22
-40
lines changed

10 files changed

+22
-40
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ all: dgl plugins gen
1111
# --------------------------------------------------------------
1212

1313
dgl:
14-
ifeq ($(HAVE_DGL),true)
14+
ifeq ($(HAVE_CAIRO_OR_OPENGL),true)
1515
$(MAKE) -C dpf/dgl
1616
endif
1717

dpf

plugins/PowerJuice/Makefile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,6 @@ include ../../dpf/Makefile.plugins.mk
2727
# --------------------------------------------------------------
2828
# Enable all possible plugin types
2929

30-
ifeq ($(LINUX),true)
3130
all: jack lv2 vst
32-
else
33-
all: lv2 vst
34-
endif
3531

3632
# --------------------------------------------------------------

plugins/PowerJuiceX2/Makefile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,6 @@ include ../../dpf/Makefile.plugins.mk
2727
# --------------------------------------------------------------
2828
# Enable all possible plugin types
2929

30-
ifeq ($(LINUX),true)
3130
all: jack lv2 vst
32-
else
33-
all: lv2 vst
34-
endif
3531

3632
# --------------------------------------------------------------

plugins/StutterJuice/Makefile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,6 @@ include ../../dpf/Makefile.plugins.mk
2727
# --------------------------------------------------------------
2828
# Enable all possible plugin types
2929

30-
ifeq ($(LINUX),true)
3130
all: jack lv2_sep vst
32-
else
33-
all: lv2_sep vst
34-
endif
3531

3632
# --------------------------------------------------------------

plugins/TriggerJuice/Makefile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,12 @@ FILES_UI = \
2222
# --------------------------------------------------------------
2323
# Do some magic
2424

25+
UI_TYPE=generic
2526
include ../../dpf/Makefile.plugins.mk
2627

2728
# --------------------------------------------------------------
2829
# Enable all possible plugin types
2930

30-
ifeq ($(LINUX),true)
3131
all: jack lv2_sep vst
32-
else
33-
all: lv2_sep vst
34-
endif
3532

3633
# --------------------------------------------------------------

plugins/TriggerJuice/TriggerJuiceUI.cpp

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,21 @@ TriggerJuiceUI::TriggerJuiceUI()
3131
fAboutWindow(this)
3232
{
3333
// background
34-
fImgBackground = Image(TriggerJuiceArtwork::backgroundData, TriggerJuiceArtwork::backgroundWidth, TriggerJuiceArtwork::backgroundHeight, GL_BGRA);
34+
fImgBackground = Image(TriggerJuiceArtwork::backgroundData, TriggerJuiceArtwork::backgroundWidth, TriggerJuiceArtwork::backgroundHeight, kImageFormatBGRA);
3535

3636
// about
37-
Image imageAbout(TriggerJuiceArtwork::aboutData, TriggerJuiceArtwork::aboutWidth, TriggerJuiceArtwork::aboutHeight, GL_BGRA);
37+
Image imageAbout(TriggerJuiceArtwork::aboutData, TriggerJuiceArtwork::aboutWidth, TriggerJuiceArtwork::aboutHeight, kImageFormatBGRA);
3838
fAboutWindow.setImage(imageAbout);
3939

4040
// about button
41-
Image aboutImageNormal(TriggerJuiceArtwork::aboutButtonNormalData, TriggerJuiceArtwork::aboutButtonNormalWidth, TriggerJuiceArtwork::aboutButtonNormalHeight);
42-
Image aboutImageHover(TriggerJuiceArtwork::aboutButtonHoverData, TriggerJuiceArtwork::aboutButtonHoverWidth, TriggerJuiceArtwork::aboutButtonHoverHeight);
41+
Image aboutImageNormal(TriggerJuiceArtwork::aboutButtonNormalData, TriggerJuiceArtwork::aboutButtonNormalWidth, TriggerJuiceArtwork::aboutButtonNormalHeight, kImageFormatBGRA);
42+
Image aboutImageHover(TriggerJuiceArtwork::aboutButtonHoverData, TriggerJuiceArtwork::aboutButtonHoverWidth, TriggerJuiceArtwork::aboutButtonHoverHeight, kImageFormatBGRA);
4343
fButtonAbout = new ImageButton(this, aboutImageNormal, aboutImageHover, aboutImageHover);
4444
fButtonAbout->setAbsolutePos(358, 17);
4545
fButtonAbout->setCallback(this);
4646

4747
// knobs
48-
Image knobImage(TriggerJuiceArtwork::knobData, TriggerJuiceArtwork::knobWidth, TriggerJuiceArtwork::knobHeight);
48+
Image knobImage(TriggerJuiceArtwork::knobData, TriggerJuiceArtwork::knobWidth, TriggerJuiceArtwork::knobHeight, kImageFormatBGRA);
4949

5050
// knob KnobAttack
5151
fKnobAttack = new ImageKnob(this, knobImage);
@@ -64,7 +64,7 @@ TriggerJuiceUI::TriggerJuiceUI()
6464
fKnobRelease->setCallback(this);
6565

6666
// sliders
67-
Image sliderImage(TriggerJuiceArtwork::sliderData, TriggerJuiceArtwork::sliderWidth, TriggerJuiceArtwork::sliderHeight);
67+
Image sliderImage(TriggerJuiceArtwork::sliderData, TriggerJuiceArtwork::sliderWidth, TriggerJuiceArtwork::sliderHeight, kImageFormatBGRA);
6868
Point<int> sliderPosStart(293, 74);
6969
Point<int> sliderPosEnd(293+11, 74);
7070

@@ -146,7 +146,7 @@ void TriggerJuiceUI::imageButtonClicked(ImageButton* button, int)
146146
if (button != fButtonAbout)
147147
return;
148148

149-
fAboutWindow.exec();
149+
fAboutWindow.runAsModal();
150150
}
151151

152152
void TriggerJuiceUI::imageKnobDragStarted(ImageKnob* knob)
@@ -205,7 +205,9 @@ void TriggerJuiceUI::imageSliderValueChanged(ImageSlider* slider, float value)
205205

206206
void TriggerJuiceUI::onDisplay()
207207
{
208-
fImgBackground.draw();
208+
const GraphicsContext& context(getGraphicsContext());
209+
210+
fImgBackground.draw(context);
209211
}
210212

211213
// -----------------------------------------------------------------------

plugins/VectorJuice/Makefile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,6 @@ include ../../dpf/Makefile.plugins.mk
2727
# --------------------------------------------------------------
2828
# Enable all possible plugin types
2929

30-
ifeq ($(LINUX),true)
3130
all: jack lv2_sep vst
32-
else
33-
all: lv2_sep vst
34-
endif
3531

3632
# --------------------------------------------------------------

plugins/WobbleJuice/Makefile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,12 @@ FILES_UI = \
2222
# --------------------------------------------------------------
2323
# Do some magic
2424

25+
UI_TYPE=generic
2526
include ../../dpf/Makefile.plugins.mk
2627

2728
# --------------------------------------------------------------
2829
# Enable all possible plugin types
2930

30-
ifeq ($(LINUX),true)
3131
all: jack lv2_sep vst
32-
else
33-
all: lv2_sep vst
34-
endif
3532

3633
# --------------------------------------------------------------

plugins/WobbleJuice/WobbleJuiceUI.cpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ WobbleJuiceUI::WobbleJuiceUI()
2929
setSize(WobbleJuiceArtwork::backgroundWidth, WobbleJuiceArtwork::backgroundHeight);
3030

3131
// background
32-
fImgBackground = Image(WobbleJuiceArtwork::backgroundData, WobbleJuiceArtwork::backgroundWidth, WobbleJuiceArtwork::backgroundHeight, GL_BGR);
32+
fImgBackground = Image(WobbleJuiceArtwork::backgroundData, WobbleJuiceArtwork::backgroundWidth, WobbleJuiceArtwork::backgroundHeight, kImageFormatBGR);
3333

3434
// about
35-
Image aboutImage(WobbleJuiceArtwork::aboutData, WobbleJuiceArtwork::aboutWidth, WobbleJuiceArtwork::aboutHeight, GL_BGR);
35+
Image aboutImage(WobbleJuiceArtwork::aboutData, WobbleJuiceArtwork::aboutWidth, WobbleJuiceArtwork::aboutHeight, kImageFormatBGR);
3636
fAboutWindow.setImage(aboutImage);
3737

3838
// knobs
39-
Image knobImage(WobbleJuiceArtwork::knobData, WobbleJuiceArtwork::knobWidth, WobbleJuiceArtwork::knobHeight);
39+
Image knobImage(WobbleJuiceArtwork::knobData, WobbleJuiceArtwork::knobWidth, WobbleJuiceArtwork::knobHeight, kImageFormatBGRA);
4040

4141
// knob Division
4242
fKnobDivision = new ImageKnob(this, knobImage, ImageKnob::Vertical);
@@ -94,8 +94,8 @@ WobbleJuiceUI::WobbleJuiceUI()
9494
fKnobDrive->setCallback(this);
9595

9696
// about button
97-
Image aboutImageNormal(WobbleJuiceArtwork::aboutButtonNormalData, WobbleJuiceArtwork::aboutButtonNormalWidth, WobbleJuiceArtwork::aboutButtonNormalHeight);
98-
Image aboutImageHover(WobbleJuiceArtwork::aboutButtonHoverData, WobbleJuiceArtwork::aboutButtonHoverWidth, WobbleJuiceArtwork::aboutButtonHoverHeight);
97+
Image aboutImageNormal(WobbleJuiceArtwork::aboutButtonNormalData, WobbleJuiceArtwork::aboutButtonNormalWidth, WobbleJuiceArtwork::aboutButtonNormalHeight, kImageFormatBGRA);
98+
Image aboutImageHover(WobbleJuiceArtwork::aboutButtonHoverData, WobbleJuiceArtwork::aboutButtonHoverWidth, WobbleJuiceArtwork::aboutButtonHoverHeight, kImageFormatBGRA);
9999
fButtonAbout = new ImageButton(this, aboutImageNormal, aboutImageHover, aboutImageHover);
100100
fButtonAbout->setAbsolutePos(390, 20);
101101
fButtonAbout->setCallback(this);
@@ -174,7 +174,9 @@ void WobbleJuiceUI::imageKnobValueChanged(ImageKnob* knob, float value)
174174

175175
void WobbleJuiceUI::onDisplay()
176176
{
177-
fImgBackground.draw();
177+
const GraphicsContext& context(getGraphicsContext());
178+
179+
fImgBackground.draw(context);
178180
}
179181

180182
// -----------------------------------------------------------------------

0 commit comments

Comments
 (0)