OLD | NEW |
1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium OS 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 WINDOW_MANAGER_X11_X_CONNECTION_H_ | 5 #ifndef WINDOW_MANAGER_X11_X_CONNECTION_H_ |
6 #define WINDOW_MANAGER_X11_X_CONNECTION_H_ | 6 #define WINDOW_MANAGER_X11_X_CONNECTION_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
13 #include "base/logging.h" | 13 #include "base/logging.h" |
14 #include "base/scoped_ptr.h" | 14 #include "base/scoped_ptr.h" |
15 #include "base/time.h" | 15 #include "base/time.h" |
16 #include "window_manager/geometry.h" | 16 #include "window_manager/geometry.h" |
| 17 #include "window_manager/image_container.h" |
17 #include "window_manager/image_enums.h" | 18 #include "window_manager/image_enums.h" |
| 19 #include "window_manager/math_types.h" |
18 #include "window_manager/x11/x_types.h" | 20 #include "window_manager/x11/x_types.h" |
19 | 21 |
20 namespace window_manager { | 22 namespace window_manager { |
21 | 23 |
22 class ByteMap; // from util.h | 24 class ByteMap; // from util.h |
23 struct Rect; | 25 struct Rect; |
24 template<class T> class Stacker; // from util.h | 26 template<class T> class Stacker; // from util.h |
25 | 27 |
26 // This is an abstract base class representing a connection to the X | 28 // This is an abstract base class representing a connection to the X |
27 // server. | 29 // server. |
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
538 } | 540 } |
539 | 541 |
540 // Query the pointer's current position relative to the root window. | 542 // Query the pointer's current position relative to the root window. |
541 virtual bool QueryPointerPosition(Point* absolute_pos_out) = 0; | 543 virtual bool QueryPointerPosition(Point* absolute_pos_out) = 0; |
542 | 544 |
543 // Set the background pixmap of a window. This is tiled across the window | 545 // Set the background pixmap of a window. This is tiled across the window |
544 // automatically by the server when the window is exposed. Set to 'None' | 546 // automatically by the server when the window is exposed. Set to 'None' |
545 // to disable automatic window-clearing by the server. | 547 // to disable automatic window-clearing by the server. |
546 virtual bool SetWindowBackgroundPixmap(XWindow xid, XPixmap pixmap) = 0; | 548 virtual bool SetWindowBackgroundPixmap(XWindow xid, XPixmap pixmap) = 0; |
547 | 549 |
| 550 // Query the presence of the Render extension. |
| 551 virtual bool RenderQueryExtension() = 0; |
| 552 |
| 553 // Create an XRender Picture. |
| 554 virtual XPicture RenderCreatePicture(XDrawable drawable, int depth) = 0; |
| 555 |
| 556 // Create an XPixmap from |container|. |
| 557 virtual XPixmap CreatePixmapFromContainer( |
| 558 const ImageContainer& container) = 0; |
| 559 |
| 560 // Perform an XRender Composite operation. |
| 561 virtual void RenderComposite(bool blend, |
| 562 XPicture src, |
| 563 XPicture mask, |
| 564 XPicture dst, |
| 565 const Point& srcpos, |
| 566 const Point& maskpos, |
| 567 const Matrix4& transform, |
| 568 const Size& size) = 0; |
| 569 |
| 570 // Free an XRender Picture. |
| 571 virtual bool RenderFreePicture(XPicture pict) = 0; |
| 572 |
| 573 // Do an XRender solid fill. |
| 574 virtual void RenderFillRectangle(XPicture dst, |
| 575 float red, |
| 576 float green, |
| 577 float blue, |
| 578 const Point& pos, |
| 579 const Size& size) = 0; |
| 580 |
548 // Value that should be used in event and property |format| fields for | 581 // Value that should be used in event and property |format| fields for |
549 // byte and long arguments. | 582 // byte and long arguments. |
550 static const int kByteFormat; | 583 static const int kByteFormat; |
551 static const int kLongFormat; | 584 static const int kLongFormat; |
552 | 585 |
553 // Maximum allowed onscreen position. Hardcoded in the X protocol. | 586 // Maximum allowed onscreen position. Hardcoded in the X protocol. |
554 static const int kMaxPosition; | 587 static const int kMaxPosition; |
555 | 588 |
556 protected: | 589 protected: |
557 // Base IDs for extension events. Implementations should initialize | 590 // Base IDs for extension events. Implementations should initialize |
(...skipping 12 matching lines...) Expand all Loading... |
570 | 603 |
571 // Time at which the server grab started. | 604 // Time at which the server grab started. |
572 base::TimeTicks server_grab_time_; | 605 base::TimeTicks server_grab_time_; |
573 | 606 |
574 DISALLOW_COPY_AND_ASSIGN(XConnection); | 607 DISALLOW_COPY_AND_ASSIGN(XConnection); |
575 }; | 608 }; |
576 | 609 |
577 } // namespace window_manager | 610 } // namespace window_manager |
578 | 611 |
579 #endif // WINDOW_MANAGER_X11_X_CONNECTION_H_ | 612 #endif // WINDOW_MANAGER_X11_X_CONNECTION_H_ |
OLD | NEW |