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 <stdbool.h>
14
15#include "utils/types.h"
16
17#include <gtk/gtk.h>
18
19#define ACTIVE_HARDWARE_MB_WIDGET_TYPE (active_hardware_mb_widget_get_type ())
20G_DECLARE_FINAL_TYPE (
22 active_hardware_mb_widget,
23 Z,
24 ACTIVE_HARDWARE_MB_WIDGET,
25 GtkWidget)
26
27
33typedef struct _ActiveHardwarePopoverWidget ActiveHardwarePopoverWidget;
34
39typedef struct _ActiveHardwareMbWidget
40{
41 GtkWidget parent_instance;
42
44 GtkMenuButton * mbutton;
45
46 // GtkBox * box;
47
49 // GtkImage * img;
50
52 // GtkLabel * label;
53
56
58 bool is_midi;
59
61 bool input;
62
64 GSettings * settings;
65
67 const char * key;
68
70 GtkBox * content;
71
72 GenericCallback callback;
73 void * object;
75
76void
77active_hardware_mb_widget_setup (
79 bool is_input,
80 bool is_midi,
81 GSettings * settings,
82 const char * key);
83
88void
90
91void
92active_hardware_mb_widget_refresh (ActiveHardwareMbWidget * self);
93
95active_hardware_mb_widget_new (void);
96
101#endif
void(* GenericCallback)(void *object)
Generic callback.
Definition types.h:99
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.