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

Side by Side Diff: ui/base/x/x11_util.h

Issue 8834014: Move CreateFakeXEvent to x11_util.{h,cc}. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move the functions to x11_util Created 9 years 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
« no previous file with comments | « content/test/render_view_test.cc ('k') | ui/base/x/x11_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_BASE_X_X11_UTIL_H_ 5 #ifndef UI_BASE_X_X11_UTIL_H_
6 #define UI_BASE_X_X11_UTIL_H_ 6 #define UI_BASE_X_X11_UTIL_H_
7 #pragma once 7 #pragma once
8 8
9 // This file declares utility functions for X11 (Linux only). 9 // This file declares utility functions for X11 (Linux only).
10 // 10 //
11 // These functions do not require the Xlib headers to be included (which is why 11 // These functions do not require the Xlib headers to be included (which is why
12 // we use a void* for Visual*). The Xlib headers are highly polluting so we try 12 // we use a void* for Visual*). The Xlib headers are highly polluting so we try
13 // hard to limit their spread into the rest of the code. 13 // hard to limit their spread into the rest of the code.
14 14
15 #include <string> 15 #include <string>
16 #include <vector> 16 #include <vector>
17 17
18 #include "base/basictypes.h" 18 #include "base/basictypes.h"
19 #include "ui/base/events.h"
19 #include "ui/base/ui_export.h" 20 #include "ui/base/ui_export.h"
20 21
21 typedef unsigned long Atom; 22 typedef unsigned long Atom;
22 typedef unsigned long XID; 23 typedef unsigned long XID;
23 typedef unsigned long XSharedMemoryId; // ShmSeg in the X headers. 24 typedef unsigned long XSharedMemoryId; // ShmSeg in the X headers.
24 typedef struct _XDisplay Display; 25 typedef struct _XDisplay Display;
25 typedef unsigned long Cursor; 26 typedef unsigned long Cursor;
26 27
27 #if defined(TOOLKIT_USES_GTK) 28 #if defined(TOOLKIT_USES_GTK)
28 typedef struct _GdkDrawable GdkWindow; 29 typedef struct _GdkDrawable GdkWindow;
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 // Return true if a given window is in full-screen mode. 229 // Return true if a given window is in full-screen mode.
229 UI_EXPORT bool IsX11WindowFullScreen(XID window); 230 UI_EXPORT bool IsX11WindowFullScreen(XID window);
230 231
231 // Returns the mapped button. 232 // Returns the mapped button.
232 int GetMappedButton(int button); 233 int GetMappedButton(int button);
233 234
234 // Updates button mapping. This is usually called when a MappingNotify event is 235 // Updates button mapping. This is usually called when a MappingNotify event is
235 // received. 236 // received.
236 UI_EXPORT void UpdateButtonMap(); 237 UI_EXPORT void UpdateButtonMap();
237 238
239 // Initializes a XEvent that holds XKeyEvent for testing.
240 UI_EXPORT void InitXKeyEventForTesting(EventType type,
241 KeyboardCode key_code,
242 int flags,
243 XEvent* event);
244
238 } // namespace ui 245 } // namespace ui
239 246
240 #endif // UI_BASE_X_X11_UTIL_H_ 247 #endif // UI_BASE_X_X11_UTIL_H_
OLDNEW
« no previous file with comments | « content/test/render_view_test.cc ('k') | ui/base/x/x11_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698