2013-08-13 06:57:41 -04:00
|
|
|
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Copyright 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
|
2014-01-11 20:42:06 -05:00
|
|
|
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
2013-08-13 06:57:41 -04:00
|
|
|
*
|
|
|
|
* Author: Giovanni Campagna <gcampagn@redhat.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef META_CURSOR_TRACKER_PRIVATE_H
|
|
|
|
#define META_CURSOR_TRACKER_PRIVATE_H
|
|
|
|
|
|
|
|
#include <meta/meta-cursor-tracker.h>
|
|
|
|
|
2014-03-31 15:21:19 -04:00
|
|
|
#include "meta-cursor.h"
|
2014-04-21 18:05:59 -04:00
|
|
|
#include "meta-cursor-renderer.h"
|
2014-03-31 15:21:19 -04:00
|
|
|
|
|
|
|
struct _MetaCursorTracker {
|
|
|
|
GObject parent_instance;
|
|
|
|
|
2014-04-21 18:05:59 -04:00
|
|
|
MetaCursorRenderer *renderer;
|
2014-03-31 15:21:19 -04:00
|
|
|
|
|
|
|
gboolean is_showing;
|
|
|
|
|
2015-03-09 23:23:00 -04:00
|
|
|
MetaCursorSprite *displayed_cursor;
|
2014-03-31 15:21:19 -04:00
|
|
|
|
2014-05-02 09:34:02 -04:00
|
|
|
/* Wayland clients can set a NULL buffer as their cursor
|
2014-03-31 15:21:19 -04:00
|
|
|
* explicitly, which means that we shouldn't display anything.
|
|
|
|
* So, we can't simply store a NULL in window_cursor to
|
|
|
|
* determine an unset window cursor; we need an extra boolean.
|
|
|
|
*/
|
|
|
|
gboolean has_window_cursor;
|
2015-03-09 23:23:00 -04:00
|
|
|
MetaCursorSprite *window_cursor;
|
2014-03-31 15:21:19 -04:00
|
|
|
|
2015-03-09 23:23:00 -04:00
|
|
|
MetaCursorSprite *root_cursor;
|
2014-05-13 15:44:02 -04:00
|
|
|
|
|
|
|
/* The cursor from the X11 server. */
|
2015-03-09 23:23:00 -04:00
|
|
|
MetaCursorSprite *xfixes_cursor;
|
2014-03-31 15:21:19 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _MetaCursorTrackerClass {
|
|
|
|
GObjectClass parent_class;
|
|
|
|
};
|
|
|
|
|
2013-08-13 06:57:41 -04:00
|
|
|
gboolean meta_cursor_tracker_handle_xevent (MetaCursorTracker *tracker,
|
|
|
|
XEvent *xevent);
|
|
|
|
|
2015-03-09 23:23:00 -04:00
|
|
|
void meta_cursor_tracker_set_window_cursor (MetaCursorTracker *tracker,
|
|
|
|
MetaCursorSprite *cursor_sprite);
|
|
|
|
void meta_cursor_tracker_unset_window_cursor (MetaCursorTracker *tracker);
|
|
|
|
void meta_cursor_tracker_set_root_cursor (MetaCursorTracker *tracker,
|
|
|
|
MetaCursorSprite *cursor_sprite);
|
2013-08-13 06:57:41 -04:00
|
|
|
|
|
|
|
void meta_cursor_tracker_update_position (MetaCursorTracker *tracker,
|
|
|
|
int new_x,
|
|
|
|
int new_y);
|
2014-03-11 17:22:08 -04:00
|
|
|
|
2015-03-09 23:23:00 -04:00
|
|
|
MetaCursorSprite * meta_cursor_tracker_get_displayed_cursor (MetaCursorTracker *tracker);
|
2014-04-23 11:12:04 -04:00
|
|
|
|
2013-08-13 06:57:41 -04:00
|
|
|
#endif
|