* 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, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __GDK_DISPLAY_PRIVATE_H__
GdkWindow *native_window;
gulong serial_start;
gulong serial_end; /* exclusive, i.e. not active on serial_end */
- gboolean owner_events;
guint event_mask;
- gboolean implicit;
guint32 time;
GdkGrabOwnership ownership;
guint activated : 1;
guint implicit_ungrab : 1;
+ guint owner_events : 1;
+ guint implicit : 1;
} GdkDeviceGrabInfo;
+/* Tracks information about a touch implicit grab on this display */
+typedef struct
+{
+ GdkDevice *device;
+ GdkEventSequence *sequence;
+
+ GdkWindow *window;
+ GdkWindow *native_window;
+ gulong serial;
+ guint event_mask;
+ guint32 time;
+} GdkTouchGrabInfo;
+
/* Tracks information about which window and position the pointer last was in.
* This is useful when we need to synthesize events later.
* Note that we track toplevel_under_pointer using enter/leave events,
gdouble toplevel_x, toplevel_y;
guint32 state;
guint32 button;
+ GdkDevice *last_slave;
+ guint need_touch_press_enter : 1;
} GdkPointerWindowInfo;
typedef struct
guint double_click_time; /* Maximum time between clicks in msecs */
GdkDevice *core_pointer; /* Core pointer device */
- guint closed : 1; /* Whether this display has been closed */
- guint ignore_core_events : 1; /* Don't send core motion and button event */
+ guint event_pause_count; /* How many times events are blocked */
- guint double_click_distance; /* Maximum distance between clicks in pixels */
+ guint closed : 1; /* Whether this display has been closed */
+ guint flushing_events : 1; /* Inside gdk_display_flush_events */
+ GArray *touch_implicit_grabs;
GHashTable *device_grabs;
GHashTable *motion_hint_info;
+ GdkDeviceManager *device_manager;
GHashTable *pointers_info; /* GdkPointerWindowInfo for each device */
guint32 last_event_time; /* Last reported event time from server */
- GdkDeviceManager *device_manager;
+ guint double_click_distance; /* Maximum distance between clicks in pixels */
};
struct _GdkDisplayClass
GType window_type; /* type for native windows for this display, set in class_init */
- G_CONST_RETURN gchar * (*get_name) (GdkDisplay *display);
+ const gchar * (*get_name) (GdkDisplay *display);
gint (*get_n_screens) (GdkDisplay *display);
GdkScreen * (*get_screen) (GdkDisplay *display,
gint screen_num);
gboolean _gdk_display_check_grab_ownership (GdkDisplay *display,
GdkDevice *device,
gulong serial);
+void _gdk_display_add_touch_grab (GdkDisplay *display,
+ GdkDevice *device,
+ GdkEventSequence *sequence,
+ GdkWindow *window,
+ GdkWindow *native_window,
+ GdkEventMask event_mask,
+ unsigned long serial_start,
+ guint32 time);
+GdkTouchGrabInfo * _gdk_display_has_touch_grab (GdkDisplay *display,
+ GdkDevice *device,
+ GdkEventSequence *sequence,
+ gulong serial);
+gboolean _gdk_display_end_touch_grab (GdkDisplay *display,
+ GdkDevice *device,
+ GdkEventSequence *sequence);
void _gdk_display_enable_motion_hints (GdkDisplay *display,
GdkDevice *device);
GdkPointerWindowInfo * _gdk_display_get_pointer_info (GdkDisplay *display,
GdkDisplayPointerInfoForeach func,
gpointer user_data);
gulong _gdk_display_get_next_serial (GdkDisplay *display);
+void _gdk_display_pause_events (GdkDisplay *display);
+void _gdk_display_unpause_events (GdkDisplay *display);
+void _gdk_display_flush_events (GdkDisplay *display);
void _gdk_display_event_data_copy (GdkDisplay *display,
const GdkEvent *event,
GdkEvent *new_event);