gtkgestureprivate.h 2.58 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
/* GTK - The GIMP Toolkit
 * Copyright (C) 2014, Red Hat, Inc.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library 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
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
 *
 * Author(s): Carlos Garnacho <carlosg@gnome.org>
 */
#ifndef __GTK_GESTURE_PRIVATE_H__
#define __GTK_GESTURE_PRIVATE_H__

22
#include "gtkeventcontrollerprivate.h"
23 24
#include "gtkgesture.h"

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
struct _GtkGesture
{
  GtkEventController parent_instance;
};

struct _GtkGestureClass
{
  GtkEventControllerClass parent_class;

  gboolean (* check)  (GtkGesture       *gesture);

  void     (* begin)  (GtkGesture       *gesture,
                       GdkEventSequence *sequence);
  void     (* update) (GtkGesture       *gesture,
                       GdkEventSequence *sequence);
  void     (* end)    (GtkGesture       *gesture,
                       GdkEventSequence *sequence);

  void     (* cancel) (GtkGesture       *gesture,
                       GdkEventSequence *sequence);

  void     (* sequence_state_changed) (GtkGesture            *gesture,
                                       GdkEventSequence      *sequence,
                                       GtkEventSequenceState  state);

  /*< private >*/
  gpointer padding[10];
};


55 56
G_BEGIN_DECLS

57 58
gboolean _gtk_gesture_check                  (GtkGesture       *gesture);

59 60 61
gboolean _gtk_gesture_handled_sequence_press (GtkGesture       *gesture,
                                              GdkEventSequence *sequence);

62
gboolean _gtk_gesture_get_pointer_emulating_sequence
63 64
                                                (GtkGesture        *gesture,
                                                 GdkEventSequence **sequence);
65

66 67 68
gboolean _gtk_gesture_cancel_sequence        (GtkGesture       *gesture,
                                              GdkEventSequence *sequence);

69 70 71 72
gboolean _gtk_gesture_get_last_update_time   (GtkGesture       *gesture,
                                              GdkEventSequence *sequence,
                                              guint32          *evtime);

73 74 75
G_END_DECLS

#endif /* __GTK_GESTURE_PRIVATE_H__ */