Zrythm
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
active_hardware_mb.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: © 2019-2021 Alexandros Theodotou <alex@zrythm.org>
2// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
10#ifndef __GUI_WIDGETS_ACTIVE_HARDWARE_MB_H__
11#define __GUI_WIDGETS_ACTIVE_HARDWARE_MB_H__
12
13#include "utils/types.h"
14
15#include "gtk_wrapper.h"
16
17#define ACTIVE_HARDWARE_MB_WIDGET_TYPE (active_hardware_mb_widget_get_type ())
18G_DECLARE_FINAL_TYPE (
20 active_hardware_mb_widget,
21 Z,
22 ACTIVE_HARDWARE_MB_WIDGET,
23 GtkWidget)
24
25
31typedef struct _ActiveHardwarePopoverWidget ActiveHardwarePopoverWidget;
32
37typedef struct _ActiveHardwareMbWidget
38{
39 GtkWidget parent_instance;
40
42 GtkMenuButton * mbutton;
43
44 // GtkBox * box;
45
47 // GtkImage * img;
48
50 // GtkLabel * label;
51
54
56 bool is_midi;
57
59 bool input;
60
62 GSettings * settings;
63
65 const char * key;
66
68 GtkBox * content;
69
70 GenericCallback callback;
71 void * object;
73
74void
75active_hardware_mb_widget_setup (
77 bool is_input,
78 bool is_midi,
79 GSettings * settings,
80 const char * key);
81
86void
88
89void
90active_hardware_mb_widget_refresh (ActiveHardwareMbWidget * self);
91
93active_hardware_mb_widget_new (void);
94
99#endif
void(* GenericCallback)(void *object)
Generic callback.
Definition types.h:103
void active_hardware_mb_widget_save_settings(ActiveHardwareMbWidget *self)
Called from PreferencesWidget to save the settings.
A menu button that allows selecting active hardware ports.
bool is_midi
True for MIDI, false for audio.
ActiveHardwarePopoverWidget * popover
Image to show next to the label.
GSettings * settings
The settings to save to.
GtkBox * content
Popover content holder.
GtkMenuButton * mbutton
The actual menu button.
bool input
True for input, false for output.
const char * key
The key in the settings to save to.
Custom types.