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 "task.h"
|
2009-11-16 17:17:53 +00:00
|
|
|
#include "panel.h"
|
2009-12-27 20:33:02 +00:00
|
|
|
#include "timer.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-12-27 20:33:02 +00:00
|
|
|
int show_timeout_msec;
|
|
|
|
int hide_timeout_msec;
|
2009-09-14 21:28:17 +00:00
|
|
|
Bool mapped;
|
|
|
|
int paddingx;
|
|
|
|
int paddingy;
|
|
|
|
PangoFontDescription* font_desc;
|
2010-01-09 00:11:01 +00:00
|
|
|
Color font_color;
|
|
|
|
Background* bg;
|
|
|
|
timeout* timeout;
|
2009-09-14 21:28:17 +00:00
|
|
|
} Tooltip;
|
|
|
|
|
|
|
|
extern Tooltip g_tooltip;
|
|
|
|
|
2010-04-18 12:07:36 +00:00
|
|
|
|
2010-04-18 14:28:45 +00:00
|
|
|
// default global data
|
2010-04-18 12:07:36 +00:00
|
|
|
void default_tooltip();
|
2010-04-18 14:28:45 +00:00
|
|
|
|
2010-04-18 12:07:36 +00:00
|
|
|
// freed memory
|
2009-10-30 17:18:44 +00:00
|
|
|
void cleanup_tooltip();
|
2010-04-18 12:07:36 +00:00
|
|
|
|
|
|
|
void init_tooltip();
|
2010-08-07 12:17:56 +00:00
|
|
|
void tooltip_trigger_show(Area* area, Panel* p, XEvent *e);
|
2010-01-05 20:38:49 +00:00
|
|
|
void tooltip_show(void* /*arg*/);
|
2009-09-14 21:28:17 +00:00
|
|
|
void tooltip_update();
|
|
|
|
void tooltip_trigger_hide();
|
2010-01-05 20:38:49 +00:00
|
|
|
void tooltip_hide(void* /*arg*/);
|
2010-01-15 15:31:07 +00:00
|
|
|
void tooltip_copy_text(Area* area);
|
2009-09-14 21:28:17 +00:00
|
|
|
|
|
|
|
#endif // TOOLTIP_H
|