~ubuntu-branches/ubuntu/trusty/gnome-shell/trusty-proposed

« back to all changes in this revision

Viewing changes to src/st/st-tooltip.h

Tags: upstream-3.3.90
ImportĀ upstreamĀ versionĀ 3.3.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
2
 
/*
3
 
 * st-tooltip.h: Plain tooltip actor
4
 
 *
5
 
 * Copyright 2008, 2009 Intel Corporation.
6
 
 *
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.
10
 
 *
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
14
 
 * more details.
15
 
 *
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/>.
18
 
 */
19
 
 
20
 
#if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION)
21
 
#error "Only <st/st.h> can be included directly.h"
22
 
#endif
23
 
 
24
 
#ifndef __ST_TOOLTIP_H__
25
 
#define __ST_TOOLTIP_H__
26
 
 
27
 
G_BEGIN_DECLS
28
 
 
29
 
#include <st/st-bin.h>
30
 
 
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))
37
 
 
38
 
typedef struct _StTooltip              StTooltip;
39
 
typedef struct _StTooltipPrivate       StTooltipPrivate;
40
 
typedef struct _StTooltipClass         StTooltipClass;
41
 
 
42
 
/**
43
 
 * StTooltip:
44
 
 *
45
 
 * The contents of this structure is private and should only be accessed using
46
 
 * the provided API.
47
 
 */
48
 
struct _StTooltip
49
 
{
50
 
  /*< private >*/
51
 
  StWidget parent_instance;
52
 
 
53
 
  StTooltipPrivate *priv;
54
 
};
55
 
 
56
 
struct _StTooltipClass
57
 
{
58
 
  StWidgetClass parent_class;
59
 
};
60
 
 
61
 
GType st_tooltip_get_type (void) G_GNUC_CONST;
62
 
 
63
 
const gchar * st_tooltip_get_label (StTooltip   *tooltip);
64
 
void          st_tooltip_set_label (StTooltip   *tooltip,
65
 
                                    const gchar *text);
66
 
 
67
 
void                   st_tooltip_set_tip_area (StTooltip             *tooltip,
68
 
                                                const ClutterGeometry *area);
69
 
const ClutterGeometry* st_tooltip_get_tip_area (StTooltip             *tooltip);
70
 
 
71
 
/**
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()
78
 
 */
79
 
typedef void (*StTooltipConstrainFunc) (StTooltip             *tooltip,
80
 
                                        const ClutterGeometry *geometry,
81
 
                                        ClutterGeometry       *adjusted_geometry,
82
 
                                        gpointer               data);
83
 
 
84
 
void st_tooltip_set_constrain_func (ClutterStage           *stage,
85
 
                                    StTooltipConstrainFunc  func,
86
 
                                    gpointer                data,
87
 
                                    GDestroyNotify          notify);
88
 
 
89
 
G_END_DECLS
90
 
 
91
 
#endif /* __ST_TOOLTIP_H__ */