2009-09-16 11:00:23 +00:00
|
|
|
/**************************************************************************
|
|
|
|
*
|
|
|
|
* Copyright (C) 2009 Andreas.Fink (Andreas.Fink85@gmail.com)
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License version 2
|
|
|
|
* as published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
* 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 Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
**************************************************************************/
|
|
|
|
|
2009-09-14 21:28:17 +00:00
|
|
|
#ifndef TOOLTIP_H
|
|
|
|
#define TOOLTIP_H
|
|
|
|
|
|
|
|
#include <sys/time.h>
|
|
|
|
|
|
|
|
#include "task.h"
|
2009-11-16 17:17:53 +00:00
|
|
|
#include "panel.h"
|
2009-09-14 21:28:17 +00:00
|
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
2009-11-19 13:53:01 +00:00
|
|
|
Area* area; // never ever use the area attribut if you are not 100% sure that this area was not freed
|
|
|
|
char* tooltip_text;
|
2009-11-16 17:17:53 +00:00
|
|
|
Panel* panel;
|
2009-09-14 21:28:17 +00:00
|
|
|
Window window;
|
2009-11-16 07:27:28 +00:00
|
|
|
struct timespec show_timeout;
|
|
|
|
struct timespec hide_timeout;
|
2009-09-14 21:28:17 +00:00
|
|
|
Bool enabled;
|
|
|
|
Bool mapped;
|
|
|
|
int paddingx;
|
|
|
|
int paddingy;
|
|
|
|
PangoFontDescription* font_desc;
|
|
|
|
config_color font_color;
|
|
|
|
Color background_color;
|
|
|
|
Border border;
|
2009-11-16 07:27:28 +00:00
|
|
|
int show_timer_id;
|
|
|
|
int hide_timer_id;
|
2009-09-14 21:28:17 +00:00
|
|
|
} Tooltip;
|
|
|
|
|
|
|
|
extern Tooltip g_tooltip;
|
|
|
|
|
|
|
|
void init_tooltip();
|
2009-10-30 17:18:44 +00:00
|
|
|
void cleanup_tooltip();
|
2009-11-16 17:17:53 +00:00
|
|
|
void tooltip_trigger_show(Area* area, Panel* p, int x, int y);
|
2009-09-14 21:28:17 +00:00
|
|
|
void tooltip_show();
|
|
|
|
void tooltip_update();
|
|
|
|
void tooltip_trigger_hide();
|
|
|
|
void tooltip_hide();
|
|
|
|
|
|
|
|
#endif // TOOLTIP_H
|