Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
channel_slot.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: © 2019-2023 Alexandros Theodotou <alex@zrythm.org>
2// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
9
10#ifndef __GUI_WIDGETS_CHANNEL_SLOT_H__
11#define __GUI_WIDGETS_CHANNEL_SLOT_H__
12
13#include "common/plugins/plugin.h"
14#include "common/utils/types.h"
15#include "gui/backend/gtk_widgets/gtk_wrapper.h"
16
17#define CHANNEL_SLOT_WIDGET_TYPE (channel_slot_widget_get_type ())
18G_DECLARE_FINAL_TYPE (
19 ChannelSlotWidget,
20 channel_slot_widget,
21 Z,
22 CHANNEL_SLOT_WIDGET,
23 GtkWidget)
24
25namespace zrythm::plugins
26{
27class Plugin;
28}
29class Channel;
30class ChannelTrack;
31TYPEDEF_STRUCT_UNDERSCORED (ChannelSlotActivateButtonWidget);
32
38
39using ChannelSlotWidget = struct _ChannelSlotWidget
40{
41 GtkWidget parent_instance;
42
43 zrythm::plugins::PluginSlotType type;
44
46 ChannelTrack * track;
47
49 int slot_index;
50 GtkGestureClick * click;
51 GtkGestureDrag * drag;
52
58 char * pl_name;
59
61 int n_press;
62
63 GtkGestureClick * right_mouse_mp;
64
65 PangoLayout * txt_layout;
66
69 bool was_empty;
70
73 bool was_selected;
74
77 bool open_plugin_inspector_on_click;
78
80 GtkPopoverMenu * popover_menu;
81
82 ChannelSlotActivateButtonWidget * activate_btn;
83
84 GtkImage * bridge_icon;
85};
86
91ChannelSlotWidget *
93
98ChannelSlotWidget *
100 int slot_index,
101 ChannelTrack * track,
102 zrythm::plugins::PluginSlotType type,
103 bool open_plugin_inspector_on_click);
104
105void
106channel_slot_widget_set_instrument (
107 ChannelSlotWidget * self,
108 ChannelTrack * track);
109
111channel_slot_widget_get_plugin (ChannelSlotWidget * self);
112
116
117#endif
DSP processing plugin.
Definition plugin.h:30
ChannelSlotWidget * channel_slot_widget_new_instrument()
Creates a new ChannelSlot widget whose track and plugin can change.
ChannelSlotWidget * channel_slot_widget_new(int slot_index, ChannelTrack *track, zrythm::plugins::PluginSlotType type, bool open_plugin_inspector_on_click)
Creates a new ChannelSlot widget and binds it to the given value.