Commit a2fd2d76 authored by Harry van Haaren's avatar Harry van Haaren

-Icon created & working, added transport.hxx

parent 3070b290
......@@ -26,6 +26,11 @@ pkg_check_modules(SAMPLERATE samplerate REQUIRED)
include_directories( ${SAMPLERATE_INCLUDE_DIRS} )
link_directories ( ${SAMPLERATE_LIBRARY_DIRS} )
# needed for setting icon in WM
pkg_check_modules(X11 x11 REQUIRED)
include_directories( ${X11_INCLUDE_DIRS} )
link_directories ( ${X11_LIBRARY_DIRS} )
# Check build type, adding coverage flags if needed
IF(BUILD_TESTS)
ADD_DEFINITIONS(-DBUILD_TESTS)
......@@ -56,6 +61,7 @@ target_link_libraries( luppp ${NTK_LIBRARIES} )
target_link_libraries( luppp ${CAIRO_LIBRARIES} )
target_link_libraries( luppp ${SNDFILE_LIBRARIES} )
target_link_libraries( luppp ${SAMPLERATE_LIBRARIES} )
target_link_libraries( luppp ${X11_LIBRARIES} )
# Check build type, linking with gcov for code analysis if needed
IF(BUILD_TESTS)
......
......@@ -19,6 +19,9 @@
#include "gtrack.hxx"
#include "gui.hxx"
int GTrack::privateID = 0;
int GMasterTrack::privateID = 0;
static void gtrack_vol_cb(Fl_Widget *w, void *data);
static void gtrack_key_cb(Fl_Widget *w, void *data);
static void gtrack_xsideDial_cb(Fl_Widget *w, void *data);
......
......@@ -33,6 +33,10 @@ extern Jack* jack;
#include "controller/nonseq.hxx"
#include "controller/genericmidi.hxx"
#include "icon.xpm"
#include <FL/x.H>
#include <FL/fl_draw.H>
#include <FL/Fl.H>
#include <stdlib.h>
#include <FL/Fl.H>
......@@ -49,14 +53,8 @@ extern Jack* jack;
#include "../planning/luppp.c"
#include "../planning/bg.c"
// Hack, move to gtrack.cpp
int GTrack::privateID = 0;
int GMasterTrack::privateID = 0;
//int AudioBuffer::privateID = 0;
using namespace std;
extern Gui* gui;
extern int signalHanlderInt;
......@@ -340,6 +338,20 @@ Gui::Gui(const char* argZero) :
gui = this;
// setup window icon before calling show()
fl_open_display();
Fl_Pixmap* pixmap = new Fl_Pixmap( icon_xpm );
Fl_Offscreen lupppIcon = XCreatePixmap(fl_display, RootWindow(fl_display, fl_screen),
pixmap->w(), pixmap->h(), fl_visual->depth);
fl_gc = XCreateGC(fl_display, lupppIcon, 0, 0);
fl_begin_offscreen(lupppIcon);
pixmap->draw(0,0);
fl_end_offscreen();
delete pixmap;
XFreeGC(fl_display, fl_gc);
window.icon( (void*)lupppIcon );
// setup callback to signalChecker()
Fl::add_timeout( 0.1, (Fl_Timeout_Handler)&signalChecker, 0 );
......
......@@ -96,9 +96,9 @@ class Gui
private:
vector<std::string> controllerVector;
Fl_Double_Window window;
Fl_Double_Window window;
Fl_Group* lupppGroup;
Fl_Group* lupppGroup;
OptionsWindow* optionWindow;
......
/* XPM */
static const char* icon_xpm[] = {
"32 32 250 2",
" c None",
". c #000000",
"+ c #020202",
"@ c #101010",
"# c #171717",
"$ c #181818",
"% c #191919",
"& c #1A1A1A",
"* c #1B1B1B",
"= c #151515",
"- c #131313",
"; c #121212",
"> c #111111",
", c #0F0F0F",
"' c #090909",
") c #040404",
"! c #222222",
"~ c #343434",
"{ c #383838",
"] c #343535",
"^ c #2B2E2F",
"/ c #212729",
"( c #191E20",
"_ c #151C1E",
": c #141B1D",
"< c #141A1C",
"[ c #151A1C",
"} c #181C1D",
"| c #202021",
"1 c #242424",
"2 c #252525",
"3 c #212121",
"4 c #141414",
"5 c #292929",
"6 c #414141",
"7 c #444444",
"8 c #393837",
"9 c #2F2725",
"0 c #2E1D17",
"a c #2D1D17",
"b c #291813",
"c c #271612",
"d c #261611",
"e c #261511",
"f c #271611",
"g c #241915",
"h c #222121",
"i c #2B2B2B",
"j c #2D2D2D",
"k c #282828",
"l c #3F3F3F",
"m c #3B3D3E",
"n c #2E2624",
"o c #471608",
"p c #841E00",
"q c #831F00",
"r c #821E00",
"s c #851F00",
"t c #801F00",
"u c #621D07",
"v c #241E1B",
"w c #2A2A2A",
"x c #2B2B2C",
"y c #2C2C2C",
"z c #272727",
"A c #343839",
"B c #311F19",
"C c #811E00",
"D c #FF3E00",
"E c #FF3D01",
"F c #F83C02",
"G c #B9320A",
"H c #31221E",
"I c #2B2A2A",
"J c #333739",
"K c #301F19",
"L c #7F1E00",
"M c #FF3D00",
"N c #FF3E01",
"O c #F73C02",
"P c #B6320A",
"Q c #30221E",
"R c #35393A",
"S c #311F1A",
"T c #7E1E00",
"U c #FF3C00",
"V c #F63B02",
"W c #B4320A",
"X c #30231E",
"Y c #2C2B2B",
"Z c #2C2D2D",
"` c #030303",
" . c #323232",
".. c #282C2E",
"+. c #2B1A15",
"@. c #7F1E01",
"#. c #F53B02",
"$. c #B33008",
"%. c #2B1D19",
"&. c #232323",
"*. c #232424",
"=. c #010101",
"-. c #0D0D0D",
";. c #0D1013",
">. c #21100B",
",. c #802003",
"'. c #FC3C01",
"). c #F93B01",
"!. c #F53B01",
"~. c #AF2C05",
"{. c #1E110D",
"]. c #0F0E0E",
"^. c #0E0E0E",
"/. c #080808",
"(. c #000405",
"_. c #1C0B06",
":. c #812103",
"<. c #EF3800",
"[. c #CB3000",
"}. c #B72B00",
"|. c #EE3901",
"1. c #AD2B03",
"2. c #170A07",
"3. c #040303",
"4. c #020203",
"5. c #292828",
"6. c #1F2425",
"7. c #281712",
"8. c #7F1F02",
"9. c #DD3400",
"0. c #701A00",
"a. c #100300",
"b. c #861F00",
"c. c #E13400",
"d. c #FB3C01",
"e. c #B12F07",
"f. c #271A15",
"g. c #1C1C1C",
"h. c #1C1D1D",
"i. c #1D1D1D",
"j. c #3E3E3E",
"k. c #323638",
"l. c #2F1E19",
"m. c #DF3400",
"n. c #731B00",
"o. c #070200",
"p. c #330C00",
"q. c #962300",
"r. c #E83700",
"s. c #B43109",
"t. c #2F211D",
"u. c #2A2929",
"v. c #2A2B2B",
"w. c #404040",
"x. c #301F1A",
"y. c #030100",
"z. c #180600",
"A. c #441000",
"B. c #912200",
"C. c #E63600",
"D. c #2F221E",
"E. c #2B2C2C",
"F. c #343739",
"G. c #1F0700",
"H. c #801E00",
"I. c #E43600",
"J. c #B4310A",
"K. c #721B00",
"L. c #160500",
"M. c #4F1200",
"N. c #902200",
"O. c #CA3000",
"P. c #F53A01",
"Q. c #020000",
"R. c #390D00",
"S. c #7B1D00",
"T. c #D33200",
"U. c #FF3F01",
"V. c #2B2B2A",
"W. c #262626",
"X. c #3D3D3D",
"Y. c #313536",
"Z. c #7E1E01",
"`. c #E23500",
" + c #8C2100",
".+ c #4E1200",
"++ c #C92F00",
"@+ c #2E211D",
"#+ c #292A2A",
"$+ c #1B1F21",
"%+ c #F93A00",
"&+ c #F03800",
"*+ c #EE3800",
"=+ c #B12E06",
"-+ c #251814",
";+ c #1A1A1B",
">+ c #000103",
",+ c #1B0A05",
"'+ c #812104",
")+ c #170A06",
"!+ c #111517",
"~+ c #23120D",
"{+ c #802002",
"]+ c #B02D05",
"^+ c #20130F",
"/+ c #121111",
"(+ c #0A0A0A",
"_+ c #363636",
":+ c #2B2F30",
"<+ c #2C1C16",
"[+ c #2C1E1A",
"}+ c #252424",
"|+ c #811D00",
"1+ c #FC3C00",
"2+ c #B93209",
"3+ c #31231E",
"4+ c #2C2C2D",
"5+ c #36393A",
"6+ c #6D1E06",
"7+ c #D83705",
"8+ c #D23605",
"9+ c #D13404",
"0+ c #D43403",
"a+ c #CB3304",
"b+ c #962C0B",
"c+ c #2E221E",
"d+ c #414040",
"e+ c #313233",
"f+ c #212527",
"g+ c #1C2327",
"h+ c #1C2326",
"i+ c #141B1E",
"j+ c #11191C",
"k+ c #11181B",
"l+ c #10181A",
"m+ c #11181A",
"n+ c #212222",
"o+ c #434343",
"p+ c #3F4040",
"q+ c #303131",
"r+ c #292A2B",
"s+ c #28292A",
"t+ c #454545",
"u+ c #353434",
"v+ c #2F2F2F",
"w+ c #2E2D2D",
"x+ c #2D2D2C",
"y+ c #202020",
"z+ c #313131",
"A+ c #333333",
". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
". + @ # $ % & * * = - ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; > @ @ > , ' ",
". ) ! ~ { ] ^ / / ( _ : < < < < < < < < < < < < [ } | 1 1 2 3 4 ",
". ) 5 6 7 8 9 0 a b c d e d d d d d d d d d d f f g h i j j k $ ",
". ) k l m n o p q r r r r r r r r r r r r r r s t u v w x y z # ",
". ) k l A B C D E E E E E E E E E E E E E E E E F G H I i y z # ",
". ) k l J K L M E E E E E E E E E E E E E E E N O P Q w i y z # ",
". ) 5 6 R S T U E E E E E E E E E E E E E E E N V W X Y Z j 5 $ ",
". ` 3 ...+.@.U E E E E N N E E E E E E E E E N #.$.%.&.*.1 3 4 ",
". =.-.- ;.>.,.U E E E '.).'.N E E E E E E E E N !.~.{.].^., -./.",
". . ` ) (._.:.U E E M <.[.}.|.E N E E E E E E N !.1.2.3.4.` ` + ",
". ` * 5.6.7.8.U E E M 9.0.a.b.c.d.E E E E E E N !.e.f.g.h.i.& @ ",
". ) z j.k.l.T U E E M m.n.. o.p.q.r.D E E E E N V s.t.u.v.i z # ",
". ) k w.A x.T U E E M m.n.. . y.z.A.B.C.E E E N V W D.I E.y k $ ",
". ) k l F.K T U E E M m.n.. . . . G.H.I.E E E N V J.D.w i y z # ",
". ) k l F.K T U E E M m.K.. . L.M.N.O.P.E E E N V J.D.w i y z # ",
". ) k w.A x.T U E E M m.n.Q.R.S.T.E U.E E E E N V W Q V.E.y k $ ",
". ) W.X.Y.l.Z.U E E M `. +.+++N U.E E E E E E N V s.@+5 #+w W.# ",
". ` $ 1 $+e 8.U E E M %+&+*+E E E E E E E E E N !.=+-+& ;+* $ , ",
". . =.+ >+,+'+U E E E E E E E E E E E E E E E N !.1.)++ =.=.=.=.",
". + > $ !+~+{+U E E E E E E E E E E E E E E E N !.]+^+/+> > @ (+",
". ) &._+:+<+@.M E E E E E E E E E E E E E E E N V $.[+}+2 W.! 4 ",
". ) 5 6 R B |+M M M M M M M M M M M M M M M M D 1+2+3+Y 4+j k $ ",
". ) k l 5+H 6+7+8+9+9+9+9+9+9+9+9+9+9+9+9+9+9+0+a+b+c+I i y z # ",
". ) k l d+e+f+g+h+i+j+k+l+l+l+l+l+l+l+l+l+l+l+l+m+[ n+w i y z # ",
". ) k l o+6 w.p+p+q+E.r+s+#+#+#+#+#+#+#+#+#+#+#+#+#+w i i y z # ",
". ) 5 6 t+7 t+t+t+u+v+w+x+j j j j j j j j j j j j j y y y j 5 $ ",
". ` y+z+~ A+A+A+A+W.1 &.! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! &.y+- ",
". =.-.- 4 4 4 4 4 ^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.-./.",
". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . "};
......@@ -56,6 +56,8 @@ static void gui_static_loadSession_cb(void* inst)
LUPPP_ERROR( "Error loading session" );
}
int main(int argc, char** argv)
{
LUPPP_NOTE("Git: %s", GIT_VERSION );
......@@ -118,6 +120,7 @@ int main(int argc, char** argv)
#endif
// Create a GUI, check for NSM integration
gui = new Gui( argv[0] );
......
/*
* Author: Harry van Haaren 2013
* harryhaaren@gmail.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef LUPPP_TRANSPORT_H
#define LUPPP_TRANSPORT_H
enum TRANSPORT_STATE
{
TRANSPORT_STOPPED = 0,
TRANSPORT_ROLLING,
};
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment