1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
/* ---------------------------------------------------------------------
*
* Giada - Your Hardcore Loopmachine
*
* gui_utils
*
* ---------------------------------------------------------------------
*
* Copyright (C) 2010-2015 Giovanni A. Zuliani | Monocasual
*
* This file is part of Giada - Your Hardcore Loopmachine.
*
* Giada - Your Hardcore Loopmachine 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.
*
* Giada - Your Hardcore Loopmachine 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 Giada - Your Hardcore Loopmachine. If not, see
* <http://www.gnu.org/licenses/>.
*
* ------------------------------------------------------------------ */
#ifndef GUI_UTILS_H
#define GUI_UTILS_H
#include <dirent.h>
#include <string>
#include <FL/x.H>
#include <FL/Fl.H>
#ifdef __APPLE__
#include <libgen.h> // in osx, for basename() (but linux?)
#endif
/* including stuff for the favicon (or whatever called) */
#if defined(_WIN32)
#include "resource.h"
#elif defined(__linux__)
#include <X11/xpm.h>
#endif
/* refresh
* refresh all GUI elements. */
void gu_refresh();
/* getBlinker
* return blinker value, used to make widgets blink. */
int gu_getBlinker();
/* updateControls
* update attributes of control elements (sample names, volumes, ...).
* Useful when loading a new patch. */
void gu_updateControls();
/* update_win_label
* update the name of the main window */
void gu_update_win_label(const char *c);
void gu_setFavicon(Fl_Window *w);
void gu_openSubWindow(class gWindow *parent, gWindow *child, int id);
/* refreshActionEditor
* reload the action editor window by closing and reopening it. It's used
* when you delete some actions from the mainWindow and the action editor
* window is open. */
void gu_refreshActionEditor();
/* closeAllSubwindows
* close all subwindows attached to mainWin. */
void gu_closeAllSubwindows();
/* getSubwindow
* return a pointer to an open subwindow, otherwise NULL. */
gWindow *gu_getSubwindow(class gWindow *parent, int id);
#endif
|