The area is programs/dtsystemsettings/sound.c now (as MCDE-PROGRAMS.md
planned), with the reference's tabs:
* Sound Effects: "Choose an alert sound" and the events of the session's
theme in a list (Launch, Start, End, Error, Warning, Beep, ...); a click
sends the event through mcdesoundd (McdeSoundEvent). The theme is an
option menu of the directories next to the current one (it replaces the
row of buttons).
* Output: the volume of the default output and Mute
(mcde_sys_volume_get/_set/_mute), and "Show the volume in the bar": it
writes ~/.dt/bar (showvolume=), which dtbar reads at start -- with 0 the
speaker is not managed (the status area is one icon narrower).
* Input: a note, because McdeSys has no capture API (no level meter, no
input volume); that belongs to the same addition as a sound-device list.
Measured under Xvfb with xdotool:
- the three tabs (docs/screenshots/leopard/System-Preferences-Sound-mcde
.png, ...-Sound-Output-mcde.png, ...-Sound-Input-mcde.png); Output shows
the volume read from the server (100) and the two switches;
- unchecking "Show the volume in the bar" writes "showvolume=0" into
~/.dt/bar (cat); dtbar started with that file shows no speaker in the
status area, with "showvolume=1" it does;
- a click on an event reaches mcdesoundd: its log names the theme and the
file ("Error -> .../Camouflage/error.wav"); PulseAudio is not there in
the Xvfb session ("Connection refused"), the daemon's own player is the
fallback.
Not measurable here: hearing a sound (no audio device in the session), and
choosing an output device (McdeSys has no device list; two Pulse sinks are
not there). A separate alert volume and the input level wait for that API.
80 lines
3.3 KiB
C
80 lines
3.3 KiB
C
/*
|
|
* ui.h -- dtsystemsettings: what the panes share (main.c)
|
|
*
|
|
* Copyright (c) 2026 The Makronix project. GNU LGPL 2.0 or later, as CDE.
|
|
*/
|
|
|
|
#ifndef _dtsystemsettings_ui_h
|
|
#define _dtsystemsettings_ui_h
|
|
|
|
#include <X11/Intrinsic.h>
|
|
#include <Xm/Xm.h>
|
|
|
|
extern XtAppContext app;
|
|
|
|
XmRenderTable PaneFont(Widget w, int size, Boolean bold);
|
|
Widget Text(Widget parent, const char *name, const char *text);
|
|
void SetText(Widget w, const char *text);
|
|
Widget Button(Widget parent, const char *label, XtCallbackProc cb,
|
|
XtPointer data);
|
|
Widget PaneButton(Widget parent, const char *label, XtCallbackProc cb,
|
|
XtPointer data);
|
|
Widget Table(Widget parent, const char *const *rows, int n, Widget *values);
|
|
Pixmap Icon(Widget w, const char *file);
|
|
void Spawn(const char *command);
|
|
|
|
/* a message in a small window; ERROR: an error */
|
|
void Message(Widget parent, const char *text, int error);
|
|
/* the command line that runs COMMAND as root in a terminal, after su(1)
|
|
* asked for the password there ("Unlock..."); into BUF */
|
|
void AsRoot(const char *title, const char *command, char *buf, size_t len);
|
|
|
|
/* the panes in accounts.c and update.c */
|
|
Widget MakeAccounts(Widget parent);
|
|
Widget MakeUpdate(Widget parent);
|
|
/* the value of a resource in the server's RESOURCE_MANAGER, read anew
|
|
* (Xlib keeps the string of the connection's start); DEF when none */
|
|
void ServerResource(Display *dpy, const char *name, const char *class,
|
|
const char *def, char *buf, size_t len);
|
|
/* the Desktop & Screen Saver pane (desktop.c), opened on its desktop (0) or
|
|
* its screen saver page (1) */
|
|
Widget MakeDesktopPane(Widget parent, int saver);
|
|
/* the Network pane (network.c); dtsystemsettings -renew-dhcp IF */
|
|
Widget MakeNetwork(Widget parent);
|
|
int RenewDhcpCommand(const char *ifname);
|
|
/* the Wi-Fi tab of a card in the Network pane (wifi.c); IFNAME NULL: the
|
|
* first Wi-Fi card, NULL returned without one */
|
|
Widget MakeWifi(Widget parent, const char *ifname);
|
|
/* dtsystemsettings -join-wifi IF [SSID in hex]: the terminal of "Join..." */
|
|
int JoinWifiCommand(const char *ifname, const char *hexssid);
|
|
/* the Backup pane (backup.c) */
|
|
Widget MakeBackup(Widget parent);
|
|
/* the Sharing pane (sharing.c) */
|
|
Widget MakeSharing(Widget parent);
|
|
/* the Startup pane (startup.c) */
|
|
Widget MakeStartup(Widget parent);
|
|
/* the time zone in Date & Time (timezone.c) */
|
|
Widget MakeZoneChooser(Widget parent);
|
|
/* dtsystemsettings -set-timezone ZONE: what the terminal of "Set Time Zone"
|
|
* runs */
|
|
int SetTimezoneCommand(const char *zone);
|
|
/* the panes in appearance.c */
|
|
Widget MakeAppearance(Widget parent);
|
|
Widget MakeFonts(Widget parent);
|
|
/* the Language pane (language.c), ~/.dt/language at login
|
|
* (Xsession.d/0010.language) */
|
|
Widget MakeLanguage(Widget parent);
|
|
/* the Keyboard & Mouse pane (input.c): three tabs, WHICH is "keyboard"
|
|
* (the default), "mouse" or "shortcuts" */
|
|
Widget MakeInput(Widget parent, const char *which);
|
|
/* the Sound pane (sound.c): Sound Effects | Output | Input */
|
|
Widget MakeSound(Widget parent);
|
|
/* the Displays pane (displays.c) and dtsystemsettings -apply-displays,
|
|
* ~/.dt/displays at login (Xsession.d/0071.displays) */
|
|
Widget MakeDisplays(Widget parent);
|
|
int ApplyDisplaysCommand(Display *dpy);
|
|
/* dtsystemsettings -apply-update: what the terminal of "Update Now" runs */
|
|
int ApplyUpdate(void);
|
|
|
|
#endif /* _dtsystemsettings_ui_h */
|