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

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

Issue 15067012: Move chromeos specific utility functions for display to chromeos/display (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added test Created 7 years, 7 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
« no previous file with comments | « chromeos/display/real_output_configurator_delegate.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 7
8 // This file declares utility functions for X11 (Linux only). 8 // This file declares utility functions for X11 (Linux only).
9 // 9 //
10 // These functions do not require the Xlib headers to be included (which is why 10 // These functions do not require the Xlib headers to be included (which is why
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 XID pixmap, void* pixmap_gc, 264 XID pixmap, void* pixmap_gc,
265 const uint8* data, 265 const uint8* data,
266 int data_width, int data_height, 266 int data_width, int data_height,
267 int src_x, int src_y, 267 int src_x, int src_y,
268 int dst_x, int dst_y, 268 int dst_x, int dst_y,
269 int copy_width, int copy_height); 269 int copy_width, int copy_height);
270 270
271 void FreePicture(Display* display, XID picture); 271 void FreePicture(Display* display, XID picture);
272 void FreePixmap(Display* display, XID pixmap); 272 void FreePixmap(Display* display, XID pixmap);
273 273
274 // Gets some useful data from the specified output device, such like
275 // manufacturer's ID, product code, and human readable name. Returns false if it
276 // fails to get those data and doesn't touch manufacturer ID/product code/name.
277 // NULL can be passed for unwanted output parameters.
278 UI_EXPORT bool GetOutputDeviceData(XID output,
279 uint16* manufacturer_id,
280 uint16* product_code,
281 std::string* human_readable_name);
282
283 // Gets the overscan flag from |output| and stores to |flag|. Returns true if
284 // the flag is found. Otherwise returns false and doesn't touch |flag|. The
285 // output will produce overscan if |flag| is set to true, but the output may
286 // still produce overscan even though it returns true and |flag| is set to
287 // false.
288 UI_EXPORT bool GetOutputOverscanFlag(XID output, bool* flag);
289
290 // Parses |prop| as EDID data and stores extracted data into |manufacturer_id|,
291 // |product_code|, and |human_readable_name| and returns true. NULL can be
292 // passed for unwanted output parameters. This is exported for
293 // x11_util_unittest.cc.
294 UI_EXPORT bool ParseOutputDeviceData(const unsigned char* prop,
295 unsigned long nitems,
296 uint16* manufacturer_id,
297 uint16* product_code,
298 std::string* human_readable_name);
299
300 // Parses |prop| as EDID data and stores the overscan flag to |flag|. Returns
301 // true if the flag is found. This is exported for x11_util_unittest.cc.
302 UI_EXPORT bool ParseOutputOverscanFlag(const unsigned char* prop,
303 unsigned long nitems,
304 bool* flag);
305
306 enum WindowManagerName { 274 enum WindowManagerName {
307 WM_UNKNOWN, 275 WM_UNKNOWN,
308 WM_BLACKBOX, 276 WM_BLACKBOX,
309 WM_CHROME_OS, 277 WM_CHROME_OS,
310 WM_COMPIZ, 278 WM_COMPIZ,
311 WM_ENLIGHTENMENT, 279 WM_ENLIGHTENMENT,
312 WM_ICE_WM, 280 WM_ICE_WM,
313 WM_KWIN, 281 WM_KWIN,
314 WM_METACITY, 282 WM_METACITY,
315 WM_MUFFIN, 283 WM_MUFFIN,
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 private: 369 private:
402 ::Cursor cursor_; 370 ::Cursor cursor_;
403 Display* display_; 371 Display* display_;
404 372
405 DISALLOW_COPY_AND_ASSIGN(XScopedCursor); 373 DISALLOW_COPY_AND_ASSIGN(XScopedCursor);
406 }; 374 };
407 375
408 } // namespace ui 376 } // namespace ui
409 377
410 #endif // UI_BASE_X_X11_UTIL_H_ 378 #endif // UI_BASE_X_X11_UTIL_H_
OLDNEW
« no previous file with comments | « chromeos/display/real_output_configurator_delegate.cc ('k') | ui/base/x/x11_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698