add volume widget
This commit is contained in:
24
include/widgets/volumeWidget.hpp
Normal file
24
include/widgets/volumeWidget.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
#pragma once
|
||||
|
||||
#include <gtkmm.h>
|
||||
#include <string>
|
||||
#include <sigc++/sigc++.h>
|
||||
|
||||
class VolumeWidget : public Gtk::Box
|
||||
{
|
||||
public:
|
||||
VolumeWidget();
|
||||
virtual ~VolumeWidget();
|
||||
|
||||
// Refresh displayed volume from the system
|
||||
void update();
|
||||
|
||||
protected:
|
||||
// timeout handler for periodic polling; return true to keep polling
|
||||
bool on_timeout();
|
||||
|
||||
private:
|
||||
Gtk::Label m_label;
|
||||
Glib::RefPtr<Gtk::GestureClick> m_click;
|
||||
sigc::connection m_timeoutConn;
|
||||
};
|
||||
Reference in New Issue
Block a user