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

Side by Side Diff: ui/gfx/x/x11_types.h

Issue 297983005: linux_aura: Bail early if we can't connect to the X11 server. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Talked to brettw; this should fix it. Created 6 years, 6 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
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_GFX_X_X11_UTIL_H_ 5 #ifndef UI_GFX_X_X11_UTIL_H_
6 #define UI_GFX_X_X11_UTIL_H_ 6 #define UI_GFX_X_X11_UTIL_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "ui/gfx/gfx_export.h" 9 #include "ui/gfx/gfx_export.h"
10 10
11 typedef unsigned long XID; 11 typedef unsigned long XID;
12 typedef struct _XImage XImage; 12 typedef struct _XImage XImage;
13 typedef struct _XGC *GC; 13 typedef struct _XGC *GC;
14 typedef struct _XDisplay XDisplay; 14 typedef struct _XDisplay XDisplay;
15 15
16 namespace gfx { 16 namespace gfx {
17 17
18 // TODO(oshima|evan): This assume there is one display and doesn't work 18 // TODO(oshima|evan): This assume there is one display and doesn't work
19 // undef multiple displays/monitor environment. Remove this and change the 19 // undef multiple displays/monitor environment. Remove this and change the
20 // chrome codebase to get the display from window. 20 // chrome codebase to get the display from window.
21 GFX_EXPORT XDisplay* GetXDisplay(); 21 GFX_EXPORT XDisplay* GetXDisplay();
22 22
23 // This opens a new X11 XDisplay*, taking command line arguments into account.
24 GFX_EXPORT XDisplay* OpenNewXDisplay();
25
23 // Return the number of bits-per-pixel for a pixmap of the given depth 26 // Return the number of bits-per-pixel for a pixmap of the given depth
24 GFX_EXPORT int BitsPerPixelForPixmapDepth(XDisplay* display, int depth); 27 GFX_EXPORT int BitsPerPixelForPixmapDepth(XDisplay* display, int depth);
25 28
26 // Draws ARGB data on the given pixmap using the given GC, converting to the 29 // Draws ARGB data on the given pixmap using the given GC, converting to the
27 // server side visual depth as needed. Destination is assumed to be the same 30 // server side visual depth as needed. Destination is assumed to be the same
28 // dimensions as |data| or larger. |data| is also assumed to be in row order 31 // dimensions as |data| or larger. |data| is also assumed to be in row order
29 // with each line being exactly |width| * 4 bytes long. 32 // with each line being exactly |width| * 4 bytes long.
30 GFX_EXPORT void PutARGBImage(XDisplay* display, 33 GFX_EXPORT void PutARGBImage(XDisplay* display,
31 void* visual, int depth, 34 void* visual, int depth,
32 XID pixmap, void* pixmap_gc, 35 XID pixmap, void* pixmap_gc,
(...skipping 10 matching lines...) Expand all
43 const uint8* data, 46 const uint8* data,
44 int data_width, int data_height, 47 int data_width, int data_height,
45 int src_x, int src_y, 48 int src_x, int src_y,
46 int dst_x, int dst_y, 49 int dst_x, int dst_y,
47 int copy_width, int copy_height); 50 int copy_width, int copy_height);
48 51
49 } // namespace gfx 52 } // namespace gfx
50 53
51 #endif // UI_GFX_X_X11_UTIL_H_ 54 #endif // UI_GFX_X_X11_UTIL_H_
52 55
OLDNEW
« no previous file with comments | « ui/gfx/x/x11_switches.cc ('k') | ui/gfx/x/x11_types.cc » ('j') | ui/gfx/x/x11_types.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698