Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(181)

Side by Side Diff: ui/wayland/wayland_message_pump.h

Issue 7457023: Adding a Wayland basic toolkit (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef WAYLAND_MESSAGE_PUMP_H_
6 #define WAYLAND_MESSAGE_PUMP_H_
7
8 #include <glib.h>
9 #include <stdint.h>
10
11 class WaylandDisplay;
12
13 class WaylandMessagePump {
14 public:
15 WaylandMessagePump(WaylandDisplay* display);
16 virtual ~WaylandMessagePump();
17
18 protected:
19 virtual int HandlePrepare();
20 virtual bool HandleCheck();
21 virtual void HandleDispatch();
22 private:
23 struct WorkSource : public GSource {
24 WaylandMessagePump* pump;
25 };
26
27 static gboolean SourcePrepare(GSource* source, gint* timeout);
28 static gboolean SourceCheck(GSource* source);
29 static gboolean SourceDispatch(GSource* source,
30 GSourceFunc callback,
31 gpointer data);
32 static int SourceUpdate(uint32_t mask, void* data);
33
34 WaylandDisplay* display_;
35 WorkSource* source_;
36 GPollFD pfd_;
37 uint32_t mask_;
38 };
39
40 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698