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_enums.h" | 17 #include "window_manager/image_enums.h" |
18 #include "window_manager/image_container.h" | |
Daniel Erat
2011/04/04 21:16:35
nit: this should come before image_enums
marcheu
2011/04/05 00:23:40
Done.
| |
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, XPicture src, XPicture mask, | |
562 XPicture dst, Point srcpos, Point maskpos, | |
563 Matrix4 transform, Size size) = 0; | |
564 | |
565 // Free an XRender Picture. | |
566 virtual void RenderFreePicture(XPicture pict) = 0; | |
567 | |
568 // Do an XRender solid fill. | |
569 virtual void RenderFillRectangle(XPicture dst, float red, float green, | |
570 float blue, Point pos, Size size) = 0; | |
571 | |
548 // Value that should be used in event and property |format| fields for | 572 // Value that should be used in event and property |format| fields for |
549 // byte and long arguments. | 573 // byte and long arguments. |
550 static const int kByteFormat; | 574 static const int kByteFormat; |
551 static const int kLongFormat; | 575 static const int kLongFormat; |
552 | 576 |
553 // Maximum allowed onscreen position. Hardcoded in the X protocol. | 577 // Maximum allowed onscreen position. Hardcoded in the X protocol. |
554 static const int kMaxPosition; | 578 static const int kMaxPosition; |
555 | 579 |
556 protected: | 580 protected: |
557 // Base IDs for extension events. Implementations should initialize | 581 // Base IDs for extension events. Implementations should initialize |
(...skipping 12 matching lines...) Expand all Loading... | |
570 | 594 |
571 // Time at which the server grab started. | 595 // Time at which the server grab started. |
572 base::TimeTicks server_grab_time_; | 596 base::TimeTicks server_grab_time_; |
573 | 597 |
574 DISALLOW_COPY_AND_ASSIGN(XConnection); | 598 DISALLOW_COPY_AND_ASSIGN(XConnection); |
575 }; | 599 }; |
576 | 600 |
577 } // namespace window_manager | 601 } // namespace window_manager |
578 | 602 |
579 #endif // WINDOW_MANAGER_X11_X_CONNECTION_H_ | 603 #endif // WINDOW_MANAGER_X11_X_CONNECTION_H_ |
OLD | NEW |