1
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
3
* st-tooltip.h: Plain tooltip actor
5
* Copyright 2008, 2009 Intel Corporation.
7
* This program is free software; you can redistribute it and/or modify it
8
* under the terms and conditions of the GNU Lesser General Public License,
9
* version 2.1, as published by the Free Software Foundation.
11
* This program is distributed in the hope it will be useful, but WITHOUT ANY
12
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
16
* You should have received a copy of the GNU Lesser General Public License
17
* along with this program. If not, see <http://www.gnu.org/licenses/>.
20
#if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION)
21
#error "Only <st/st.h> can be included directly.h"
24
#ifndef __ST_TOOLTIP_H__
25
#define __ST_TOOLTIP_H__
29
#include <st/st-bin.h>
31
#define ST_TYPE_TOOLTIP (st_tooltip_get_type ())
32
#define ST_TOOLTIP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ST_TYPE_TOOLTIP, StTooltip))
33
#define ST_IS_TOOLTIP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ST_TYPE_TOOLTIP))
34
#define ST_TOOLTIP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ST_TYPE_TOOLTIP, StTooltipClass))
35
#define ST_IS_TOOLTIP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ST_TYPE_TOOLTIP))
36
#define ST_TOOLTIP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ST_TYPE_TOOLTIP, StTooltipClass))
38
typedef struct _StTooltip StTooltip;
39
typedef struct _StTooltipPrivate StTooltipPrivate;
40
typedef struct _StTooltipClass StTooltipClass;
45
* The contents of this structure is private and should only be accessed using
51
StWidget parent_instance;
53
StTooltipPrivate *priv;
56
struct _StTooltipClass
58
StWidgetClass parent_class;
61
GType st_tooltip_get_type (void) G_GNUC_CONST;
63
const gchar * st_tooltip_get_label (StTooltip *tooltip);
64
void st_tooltip_set_label (StTooltip *tooltip,
67
void st_tooltip_set_tip_area (StTooltip *tooltip,
68
const ClutterGeometry *area);
69
const ClutterGeometry* st_tooltip_get_tip_area (StTooltip *tooltip);
72
* StTooltipConstrainFunc:
73
* @tooltip: the #StTooltip that is being positioned
74
* @geometry: size and position of the tooltip without any constraints
75
* @adjusted_geometry: (out): new position of the tooltip.
76
* The width and height fields will be ignored.
77
* @data: (closure): user data passed to st_tooltip_set_constrain_func()
79
typedef void (*StTooltipConstrainFunc) (StTooltip *tooltip,
80
const ClutterGeometry *geometry,
81
ClutterGeometry *adjusted_geometry,
84
void st_tooltip_set_constrain_func (ClutterStage *stage,
85
StTooltipConstrainFunc func,
87
GDestroyNotify notify);
91
#endif /* __ST_TOOLTIP_H__ */