mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-02 18:31:12 +02:00
- Is only needed in this class, not global.
- move scope of variable x_corr. (style) scope of the variable x_corr
can be limited
- move declaration of framebuffer into header file
Origin commit data
------------------
Branch: ni/coolstream
Commit: f3ac0b9fd9
Author: Thilo Graf <dbt@novatux.de>
Date: 2012-07-29 (Sun, 29 Jul 2012)
Origin message was:
------------------
*CVolume: move static g_volscale to volscale
- Is only needed in this class, not global.
- move scope of variable x_corr. (style) scope of the variable x_corr
can be limited
- move declaration of framebuffer into header file
------------------
This commit was generated by Migit
77 lines
2.2 KiB
C++
77 lines
2.2 KiB
C++
/*
|
|
volume bar - Neutrino-GUI
|
|
|
|
Copyright (C) 2001 Steffen Hehn 'McClean'
|
|
and some other guys
|
|
Homepage: http://dbox.cyberphoria.org/
|
|
|
|
Copyright (C) 2011-2012 M. Liebmann (micha-bbg)
|
|
|
|
License: GPL
|
|
|
|
This library is free software; you can redistribute it and/or
|
|
modify it under the terms of the GNU Library General Public
|
|
License as published by the Free Software Foundation; either
|
|
version 2 of the License, or (at your option) any later version.
|
|
|
|
This library is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Library General Public License for more details.
|
|
|
|
You should have received a copy of the GNU Library General Public
|
|
License along with this library; if not, write to the
|
|
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
Boston, MA 02110-1301, USA.
|
|
*/
|
|
|
|
#ifndef __CVOLUME__
|
|
#define __CVOLUME__
|
|
|
|
#include <driver/framebuffer.h>
|
|
|
|
#define ROUNDED g_settings.rounded_corners ? vbar_h/2 : 0
|
|
|
|
class CVolume : public CChangeObserver
|
|
{
|
|
private:
|
|
CFrameBuffer * frameBuffer;
|
|
CProgressBar *volscale;
|
|
void refreshVolumebar(int current_volume);
|
|
|
|
int x, y, sy, sw, sh;
|
|
int mute_ax, mute_ay, mute_dy, mute_ay_old;
|
|
int mute_icon_dx, mute_icon_dy;
|
|
int icon_w, icon_h, icon_x, icon_y;
|
|
int vbar_w, vbar_h;
|
|
int progress_w, progress_h, progress_x, progress_y, pB;
|
|
int digit_w, digit_h, digit_offset, digit_x, digit_y, digit_b_x, digit_b_w;
|
|
int VolumeFont, colShadow, colBar, colFrame, colContent;
|
|
int ShadowOffset;
|
|
int rounded;
|
|
int m_mode;
|
|
bool paintShadow, paintDigits, MuteIconFrame;
|
|
/* volume adjustment variables */
|
|
t_channel_id channel_id;
|
|
int apid;
|
|
|
|
public:
|
|
CVolume();
|
|
~CVolume();
|
|
static CVolume* getInstance();
|
|
|
|
int spacer, mute_dx;
|
|
void Init();
|
|
void AudioMute(int newValue, bool isEvent= false);
|
|
void setvol(int vol);
|
|
void setVolume(const neutrino_msg_t key, const bool bDoPaint = true, bool nowait = false);
|
|
int getStartPosTop(){ return sy; }
|
|
int getEndPosRight(){ return sw; }
|
|
|
|
void SetCurrentPid(int pid) { apid = pid; }
|
|
void SetCurrentChannel(t_channel_id id) { channel_id = id; }
|
|
bool changeNotify(const neutrino_locale_t OptionName, void *);
|
|
};
|
|
|
|
#endif // __CVOLUME__
|