After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 3.8 KiB |
@ -0,0 +1,30 @@
@@ -0,0 +1,30 @@
|
||||
GTK Tips |
||||
======== |
||||
|
||||
# dispose() vs finalize() vs destroy() |
||||
|
||||
According to ebassi from GTK: |
||||
Rule of thumb: use dispose() |
||||
for releasing references to objects you acquired |
||||
from the outside, and finalize() to release |
||||
memory/references you allocated internally. |
||||
|
||||
There's basically no reason to |
||||
override `destroy()`; always use `dispose`/`finalize`. |
||||
The "destroy" signal is for |
||||
other code, using your widget, to release |
||||
references they might have. |
||||
|
||||
# Specify menu for GtkMenuButton in XML |
||||
|
||||
Specify the id of the menu, like: |
||||
|
||||
```xml |
||||
<property name="menu">my_menu_id</property> |
||||
``` |
||||
|
||||
---- |
||||
|
||||
Copyright (C) 2019-2020 Alexandros Theodotou |
||||
|
||||
Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without any warranty. |
@ -0,0 +1,88 @@
@@ -0,0 +1,88 @@
|
||||
/*
|
||||
* Copyright (C) 2020 Alexandros Theodotou <alex at zrythm dot org> |
||||
* |
||||
* This file is part of Zrythm |
||||
* |
||||
* Zrythm is free software: you can redistribute it and/or modify |
||||
* it under the terms of the GNU Affero General Public License as published by |
||||
* the Free Software Foundation, either version 3 of the License, or |
||||
* (at your option) any later version. |
||||
* |
||||
* Zrythm 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 Affero General Public License for more details. |
||||
* |
||||
* You should have received a copy of the GNU Affero General Public License |
||||
* along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/ |
||||
|
||||
/**
|
||||
* \file |
||||
* |
||||
* MIDI functions. |
||||
* |
||||
* TODO move to a more appropriate directory. |
||||
*/ |
||||
|
||||
#ifndef __AUDIO_MIDI_FUNCTION_H__ |
||||
#define __AUDIO_MIDI_FUNCTION_H__ |
||||
|
||||
#include "utils/yaml.h" |
||||
|
||||
typedef struct ArrangerSelections ArrangerSelections; |
||||
|
||||
/**
|
||||
* @addtogroup audio |
||||
* |
||||
* @{ |
||||
*/ |
||||
|
||||
typedef enum MidiFunctionType |
||||
{ |
||||
MIDI_FUNCTION_CRESCENDO, |
||||
MIDI_FUNCTION_FLAM, |
||||
MIDI_FUNCTION_FLIP_HORIZONTAL, |
||||
MIDI_FUNCTION_FLIP_VERTICAL, |
||||
MIDI_FUNCTION_LEGATO, |
||||
MIDI_FUNCTION_PORTATO, |
||||
MIDI_FUNCTION_STACCATO, |
||||
MIDI_FUNCTION_STRUM, |
||||
} MidiFunctionType; |
||||
|
||||
static const cyaml_strval_t |
||||
midi_function_type_strings[] = |
||||
{ |
||||
{ __("Crescendo"), MIDI_FUNCTION_CRESCENDO }, |
||||
{ __("Flam"), MIDI_FUNCTION_FLAM }, |
||||
{ __("Flip H"), MIDI_FUNCTION_FLIP_HORIZONTAL }, |
||||
{ __("Flip V"), MIDI_FUNCTION_FLIP_VERTICAL }, |
||||
{ __("Legato"), MIDI_FUNCTION_LEGATO }, |
||||
{ __("Portato"), MIDI_FUNCTION_PORTATO }, |
||||
{ __("Staccato"), MIDI_FUNCTION_STACCATO }, |
||||
{ __("Strum"), MIDI_FUNCTION_STRUM }, |
||||
}; |
||||
|
||||
static inline const char * |
||||
midi_function_type_to_string ( |
||||
MidiFunctionType type) |
||||
{ |
||||
return midi_function_type_strings[type].str; |
||||
} |
||||
|
||||
/**
|
||||
* Applies the given action to the given selections. |
||||
* |
||||
* @param sel Selections to edit. |
||||
* @param type Function type. |
||||
*/ |
||||
void |
||||
midi_function_apply ( |
||||
ArrangerSelections * sel, |
||||
MidiFunctionType type); |
||||
|
||||
/**
|
||||
* @} |
||||
*/ |
||||
|
||||
#endif |
@ -0,0 +1,51 @@
@@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!-- |
||||
|
||||
Copyright (C) 2020 Alexandros Theodotou <alex at zrythm dot org> |
||||
|
||||
This file is part of Zrythm |
||||
|
||||
Zrythm is free software: you can redistribute it and/or modify |
||||
it under the terms of the GNU Affero General Public License as published by |
||||
the Free Software Foundation, either version 3 of the License, or |
||||
(at your option) any later version. |
||||
|
||||
Zrythm 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 Affero General Public License for more details. |
||||
|
||||
You should have received a copy of the GNU Affero General Public License |
||||
along with Zrythm. If not, see <https://www.gnu.org/licenses/>. |
||||
|
||||
--> |
||||
<interface> |
||||
<menu id="app-menu"> |
||||
<item> |
||||
<attribute name="label">Shortcuts</attribute> |
||||
<attribute name="action">win.show-help-overlay</attribute> |
||||
</item> |
||||
<item> |
||||
<attribute name="label">Preferences</attribute> |
||||
<attribute name="action">app.preferences</attribute> |
||||
</item> |
||||
</menu> |
||||
<menu id="menubar"> |
||||
<section> |
||||
<item> |
||||
<attribute name="label">Shortcuts</attribute> |
||||
<attribute name="action">win.show-help-overlay</attribute> |
||||
</item> |
||||
<item> |
||||
<attribute name="label" translatable="yes">Preferences</attribute> |
||||
<attribute name="action">app.preferences</attribute> |
||||
</item> |
||||
</section> |
||||
<section> |
||||
<item> |
||||
<attribute name="label">Quit</attribute> |
||||
<attribute name="action">app.quit</attribute> |
||||
</item> |
||||
</section> |
||||
</menu> |
||||
</interface> |
@ -0,0 +1,96 @@
@@ -0,0 +1,96 @@
|
||||
# Copyright (C) 2020 Alexandros Theodotou <alex at zrythm dot org> |
||||
# |
||||
# This file is part of Zrythm |
||||
# |
||||
# Zrythm is free software: you can redistribute it and/or modify |
||||
# it under the terms of the GNU Affero General Public License as published by |
||||
# the Free Software Foundation, either version 3 of the License, or |
||||
# (at your option) any later version. |
||||
# |
||||
# Zrythm 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 Affero General Public License for more details. |
||||
# |
||||
# You should have received a copy of the GNU Affero General Public License |
||||
# along with Zrythm. If not, see <https://www.gnu.org/licenses/>. |
||||
|
||||
resource_files += files ([ |
||||
'arranger_object_info_dialog.ui', |
||||
'audio_editor_space.ui', |
||||
'automatable_selector.ui', |
||||
'automation_editor_space.ui', |
||||
'automation_track.ui', |
||||
'bind_cc_dialog.ui', |
||||
'bot_bar.ui', |
||||
'bot_dock_edge.ui', |
||||
'bounce_dialog.ui', |
||||
'center_dock.ui', |
||||
'channel.ui', |
||||
'chord_editor_space.ui', |
||||
'chord_key.ui', |
||||
'chord_pad.ui', |
||||
'chord_selector_window.ui', |
||||
'clip_editor_inner.ui', |
||||
'clip_editor.ui', |
||||
'control_room.ui', |
||||
'create_project_dialog.ui', |
||||
'editor_toolbar.ui', |
||||
'event_viewer.ui', |
||||
'expander_box.ui', |
||||
'export_dialog.ui', |
||||
'export_midi_file_dialog.ui', |
||||
'export_progress_dialog.ui', |
||||
'fader_buttons.ui', |
||||
'fader_controls_grid.ui', |
||||
'file_browser.ui', |
||||
'first_run_assistant.ui', |
||||
'fishbowl_window.ui', |
||||
'header.ui', |
||||
'help_toolbar.ui', |
||||
'home_toolbar.ui', |
||||
'inspector_ap.ui', |
||||
'inspector_chord.ui', |
||||
'inspector_editor.ui', |
||||
'inspector_master.ui', |
||||
'inspector_midi.ui', |
||||
'inspector_plugin.ui', |
||||
'inspector_track.ui', |
||||
'left_dock_edge.ui', |
||||
'log_viewer.ui', |
||||
'main_window.ui', |
||||
'midi_controller_popover.ui', |
||||
'midi_editor_space.ui', |
||||
'mixer.ui', |
||||
'modulator_view.ui', |
||||
'panel_file_browser.ui', |
||||
'plugin_browser.ui', |
||||
'port_info_dialog.ui', |
||||
'port_selector_popover.ui', |
||||
'preferences.ui', |
||||
'project_assistant.ui', |
||||
'project_scale_popover.ui', |
||||
'project_toolbar.ui', |
||||
'quantize_box.ui', |
||||
'quantize_dialog.ui', |
||||
'range_action_buttons.ui', |
||||
'right_dock_edge.ui', |
||||
'route_target_selector.ui', |
||||
'scale_selector_window.ui', |
||||
'scripting_window.ui', |
||||
'snap_box.ui', |
||||
'snap_grid_popover.ui', |
||||
'splash.ui', |
||||
'string_entry_dialog.ui', |
||||
'timeline_bot_box.ui', |
||||
'timeline_panel.ui', |
||||
'timeline_toolbar.ui', |
||||
'toolbox.ui', |
||||
'top_bar.ui', |
||||
'track_lane.ui', |
||||
'tracklist_header.ui', |
||||
'track_top_grid.ui', |
||||
'track.ui', |
||||
'transport_controls.ui', |
||||
'view_toolbar.ui', |
||||
]) |