Zrythm
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
10#ifndef __GUI_WIDGETS_CHANNEL_SLOT_H__
11#define __GUI_WIDGETS_CHANNEL_SLOT_H__
12
13#include "plugins/plugin.h"
14#include "utils/types.h"
15
16#include <gtk/gtk.h>
17
18#define CHANNEL_SLOT_WIDGET_TYPE (channel_slot_widget_get_type ())
19G_DECLARE_FINAL_TYPE (
21 channel_slot_widget,
22 Z,
23 CHANNEL_SLOT_WIDGET,
24 GtkWidget)
25
26TYPEDEF_STRUCT (Plugin);
27TYPEDEF_STRUCT (Channel);
28TYPEDEF_STRUCT_UNDERSCORED (ChannelSlotActivateButtonWidget);
29
36typedef struct _ChannelSlotWidget
37{
38 GtkWidget parent_instance;
39
40 PluginSlotType type;
41
44
47 GtkGestureClick * click;
48 GtkGestureDrag * drag;
49
55 char * pl_name;
56
59
60 GtkGestureClick * right_mouse_mp;
61
62 PangoLayout * txt_layout;
63
67
71
75
77 GtkPopoverMenu * popover_menu;
78
80
81 GtkImage * bridge_icon;
83
90
97 int slot_index,
98 Track * track,
99 PluginSlotType type,
100 bool open_plugin_inspector_on_click);
101
102void
103channel_slot_widget_set_instrument (ChannelSlotWidget * self, Track * track);
104
105Plugin *
106channel_slot_widget_get_plugin (ChannelSlotWidget * self);
107
112#endif
PluginSlotType
ChannelSlotWidget * channel_slot_widget_new(int slot_index, Track *track, PluginSlotType type, bool open_plugin_inspector_on_click)
Creates a new ChannelSlot widget and binds it to the given value.
ChannelSlotWidget * channel_slot_widget_new_instrument(void)
Creates a new ChannelSlot widget whose track and plugin can change.
Base plugin.
int n_press
For multipress.
bool was_empty
Flag used for adding/removing .empty CSS class.
int slot_index
The Channel slot index.
GtkPopoverMenu * popover_menu
Popover to be reused for context menus.
Track * track
The Track this belongs to.
bool was_selected
Cache to check if the selection state was changed.
bool open_plugin_inspector_on_click
Whether to open the plugin inspector on click or not.
char * pl_name
Previous plugin name at this slot in the last draw callback, or NULL.
A Channel is part of a Track (excluding Tracks that don't have Channels) and contains information rel...
Definition channel.h:61
The base plugin Inheriting plugins must have this as a child.
Definition plugin.h:74
Track to be inserted into the Project's Tracklist.
Definition track.h:186
Custom types.