2014-06-19 16:29:10 -04:00
|
|
|
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Copyright (C) 2014 Red Hat
|
|
|
|
*
|
|
|
|
* 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, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|
|
|
* 02111-1307, USA.
|
|
|
|
*
|
|
|
|
* Author: Carlos Garnacho <carlosg@gnome.org>
|
|
|
|
*/
|
|
|
|
|
2023-07-21 09:37:20 -04:00
|
|
|
#pragma once
|
2014-06-19 16:29:10 -04:00
|
|
|
|
|
|
|
#include <glib-object.h>
|
2018-07-10 04:36:24 -04:00
|
|
|
|
2019-10-24 15:19:36 -04:00
|
|
|
#include "backends/meta-backend-private.h"
|
2018-07-10 04:36:24 -04:00
|
|
|
#include "clutter/clutter.h"
|
|
|
|
#include "meta/window.h"
|
2014-06-19 16:29:10 -04:00
|
|
|
|
|
|
|
#define META_TYPE_GESTURE_TRACKER (meta_gesture_tracker_get_type ())
|
|
|
|
#define META_GESTURE_TRACKER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_GESTURE_TRACKER, MetaGestureTracker))
|
|
|
|
#define META_GESTURE_TRACKER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), META_TYPE_GESTURE_TRACKER, MetaGestureTrackerClass))
|
|
|
|
#define META_IS_GESTURE_TRACKER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_TYPE_GESTURE_TRACKER))
|
|
|
|
#define META_IS_GESTURE_TRACKER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), META_TYPE_GESTURE_TRACKER))
|
|
|
|
#define META_GESTURE_TRACKER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_GESTURE_TRACKER, MetaGestureTrackerClass))
|
|
|
|
|
|
|
|
typedef struct _MetaGestureTracker MetaGestureTracker;
|
|
|
|
typedef struct _MetaGestureTrackerClass MetaGestureTrackerClass;
|
|
|
|
|
|
|
|
struct _MetaGestureTracker
|
|
|
|
{
|
|
|
|
GObject parent_instance;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _MetaGestureTrackerClass
|
|
|
|
{
|
|
|
|
GObjectClass parent_class;
|
|
|
|
|
|
|
|
void (* state_changed) (MetaGestureTracker *tracker,
|
|
|
|
ClutterEventSequence *sequence,
|
|
|
|
MetaSequenceState state);
|
|
|
|
};
|
|
|
|
|
|
|
|
GType meta_gesture_tracker_get_type (void) G_GNUC_CONST;
|
|
|
|
|
2014-07-08 13:27:38 -04:00
|
|
|
MetaGestureTracker * meta_gesture_tracker_new (void);
|
2014-06-19 16:29:10 -04:00
|
|
|
|
|
|
|
gboolean meta_gesture_tracker_handle_event (MetaGestureTracker *tracker,
|
|
|
|
const ClutterEvent *event);
|
|
|
|
gboolean meta_gesture_tracker_set_sequence_state (MetaGestureTracker *tracker,
|
|
|
|
ClutterEventSequence *sequence,
|
|
|
|
MetaSequenceState state);
|
|
|
|
MetaSequenceState meta_gesture_tracker_get_sequence_state (MetaGestureTracker *tracker,
|
|
|
|
ClutterEventSequence *sequence);
|
2014-07-24 08:32:28 -04:00
|
|
|
gint meta_gesture_tracker_get_n_current_touches (MetaGestureTracker *tracker);
|