~ubuntu-branches/ubuntu/trusty/geis/trusty

« back to all changes in this revision

Viewing changes to libgeis/backend/grail/geis_grail_window_grab.h

  • Committer: Package Import Robot
  • Author(s): Chase Douglas
  • Date: 2012-07-30 08:51:42 UTC
  • Revision ID: package-import@ubuntu.com-20120730085142-jrc33ygjvt0ob1wl
Tags: upstream-2.2.11
ImportĀ upstreamĀ versionĀ 2.2.11

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**
 
2
 * @file geis_grail_window_grab.h
 
3
 * @brief window grab handling for the GEIS grail back end
 
4
 */
 
5
/*
 
6
 * Copyright 2011 Canonical Ltd.
 
7
 *
 
8
 * This library is free software: you can redistribute it and/or modify it 
 
9
 * under the terms of the GNU Lesser General Public License version 3
 
10
 * as published by the Free Software Foundation.
 
11
 *
 
12
 * This library is distributed in the hope that it will be useful, but 
 
13
 * WITHOUT ANY WARRANTY; without even the implied warranties of 
 
14
 * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 
 
15
 * PURPOSE.  See the GNU Lesser General Public License for more details.
 
16
 *
 
17
 * You should have received a copy of the GNU Lesser General Public License
 
18
 * along with this library.  If not, see <http://www.gnu.org/licenses/>.
 
19
 */
 
20
#ifndef GEIS_BACKEND_GRAIL_WINDOW_GRAB_H_
 
21
#define GEIS_BACKEND_GRAIL_WINDOW_GRAB_H_
 
22
 
 
23
#include "geis/geis.h"
 
24
#include <X11/Xlib.h>
 
25
 
 
26
 
 
27
/**
 
28
 * The opaque Grail Window Grab Store.
 
29
 *
 
30
 * A "window grab" in this context refers to a passive grab of all multi-touch
 
31
 * input on a specified window.  There should be only a single grab of a window
 
32
 * with the X server, but it's possible for multiple GEIS subscriptions to exist
 
33
 * for the same region (window), so they need to multiplexed and refcounted
 
34
 * through a subscription-independent means.
 
35
 *
 
36
 * This is that means.
 
37
 */
 
38
typedef struct GeisGrailWindowGrabStore *GeisGrailWindowGrabStore;
 
39
 
 
40
/**
 
41
 * Constructs a new window grab store.
 
42
 */
 
43
GeisGrailWindowGrabStore
 
44
geis_grail_window_grab_store_new(Display *display);
 
45
 
 
46
/**
 
47
 * Destroys a window grab store.
 
48
 *
 
49
 * @param store  A window grab store.
 
50
 */
 
51
void
 
52
geis_grail_window_grab_store_delete(GeisGrailWindowGrabStore store);
 
53
 
 
54
/**
 
55
 * Grabs a window through a window grab store.
 
56
 *
 
57
 * @param store  A window grab store.
 
58
 * @param window The window to grab.
 
59
 *
 
60
 * @returns GEIS_STATUS_SUCCESS if the multi-touch for the window was grabbed
 
61
 * successfully, GEIS_STATUS_UNKNOWN_ERROR otherwise.
 
62
 */
 
63
GeisStatus
 
64
geis_grail_window_grab_store_grab(GeisGrailWindowGrabStore store,
 
65
                                  Window window);
 
66
 
 
67
/**
 
68
 * Ungrabs a window through a window grab store.
 
69
 *
 
70
 * @param store  A window grab store.
 
71
 * @param window The window to ungrab.
 
72
 */
 
73
void
 
74
geis_grail_window_grab_store_ungrab(GeisGrailWindowGrabStore store,
 
75
                                    Window window);
 
76
 
 
77
#endif /* GEIS_BACKEND_GRAIL_WINDOW_GRAB_H_ */
 
78