summaryrefslogtreecommitdiff
path: root/src/meta/meta-cursor-tracker.h
blob: a3b71c4f6a66ea065674b7d14f06d93d32c7f688 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */

/*
 * Copyright (C) 2013 Red Hat, Inc.
 *
 * 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.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, see <http://www.gnu.org/licenses/>.
 *
 * Author: Giovanni Campagna <gcampagn@redhat.com>
 */

#ifndef META_CURSOR_TRACKER_H
#define META_CURSOR_TRACKER_H

#include <glib-object.h>

#include "clutter/clutter.h"
#include "cogl/cogl.h"
#include "meta/types.h"
#include "meta/workspace.h"

#define META_TYPE_CURSOR_TRACKER (meta_cursor_tracker_get_type ())

META_EXPORT
G_DECLARE_DERIVABLE_TYPE (MetaCursorTracker,
                          meta_cursor_tracker,
                          META, CURSOR_TRACKER,
                          GObject)

META_EXPORT
MetaCursorTracker *meta_cursor_tracker_get_for_display (MetaDisplay *display);

META_EXPORT
void           meta_cursor_tracker_get_hot    (MetaCursorTracker *tracker,
                                               int               *x,
                                               int               *y);

META_EXPORT
CoglTexture   *meta_cursor_tracker_get_sprite (MetaCursorTracker *tracker);

META_EXPORT
void           meta_cursor_tracker_get_pointer (MetaCursorTracker   *tracker,
                                                graphene_point_t    *coords,
                                                ClutterModifierType *mods);

META_EXPORT
gboolean       meta_cursor_tracker_get_pointer_visible (MetaCursorTracker *tracker);

META_EXPORT
void           meta_cursor_tracker_set_pointer_visible (MetaCursorTracker *tracker,
                                                        gboolean           visible);

#endif