mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 00:11:14 +02:00
* Rework handling muteicon
- Integrated for monitoring the mute icon into the frame buffer class. If the icon is overwritten by an element, it is restored from the framebuffer. Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
@@ -2,23 +2,23 @@
|
||||
Neutrino-GUI - DBoxII-Project
|
||||
|
||||
Copyright (C) 2001 Steffen Hehn 'McClean'
|
||||
Homepage: http://dbox.cyberphoria.org/
|
||||
|
||||
License: GPL
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This program 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 General Public License for more details.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
You should have received a copy of the GNU General Public
|
||||
License along with this program; if not, write to the
|
||||
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include <linux/vt.h>
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <OpenThreads/Mutex>
|
||||
#include <OpenThreads/ScopedLock>
|
||||
@@ -243,6 +244,51 @@ class CFrameBuffer
|
||||
};
|
||||
void SetTransparent(int t){ m_transparent = t; }
|
||||
void SetTransparentDefault(){ m_transparent = m_transparent_default; }
|
||||
|
||||
// ## AudioMute / Clock ######################################
|
||||
private:
|
||||
enum {
|
||||
FB_PAINTAREA_MATCH_NO,
|
||||
FB_PAINTAREA_MATCH_OK
|
||||
};
|
||||
|
||||
typedef struct fb_area_t
|
||||
{
|
||||
int x;
|
||||
int y;
|
||||
int dx;
|
||||
int dy;
|
||||
int element;
|
||||
} fb_area_struct_t;
|
||||
|
||||
bool fbAreaActiv;
|
||||
typedef std::vector<fb_area_t> v_fbarea_t;
|
||||
typedef v_fbarea_t::iterator fbarea_iterator_t;
|
||||
v_fbarea_t v_fbarea;
|
||||
bool fb_no_check;
|
||||
bool do_paint_mute_icon;
|
||||
|
||||
bool _checkFbArea(int _x, int _y, int _dx, int _dy, bool prev);
|
||||
int checkFbAreaElement(int _x, int _y, int _dx, int _dy, fb_area_t *area);
|
||||
|
||||
public:
|
||||
enum {
|
||||
FB_PAINTAREA_INFOCLOCK,
|
||||
FB_PAINTAREA_MUTEICON1,
|
||||
FB_PAINTAREA_MUTEICON2,
|
||||
|
||||
FB_PAINTAREA_MAX
|
||||
};
|
||||
|
||||
#if defined(FB_HW_ACCELERATION)
|
||||
inline bool checkFbArea(int, int, int, int, bool) { return true; }
|
||||
#else
|
||||
inline bool checkFbArea(int _x, int _y, int _dx, int _dy, bool prev) { return (fbAreaActiv && !fb_no_check) ? _checkFbArea(_x, _y, _dx, _dy, prev) : true; }
|
||||
#endif
|
||||
|
||||
void setFbArea(int element, int _x=0, int _y=0, int _dx=0, int _dy=0);
|
||||
void fbNoCheck(bool noCheck) { fb_no_check = noCheck; }
|
||||
void doPaintMuteIcon(bool mode) { do_paint_mute_icon = mode; }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user