cairomm 1.19.0
Public Member Functions | List of all members
Cairo::XcbDevice Class Reference

An XCB device. More...

#include <cairomm/xcb_device.h>

Inheritance diagram for Cairo::XcbDevice:
Inheritance graph
[legend]

Public Member Functions

 XcbDevice (cairo_device_t *cobject, bool has_reference=false)
 Create a C++ wrapper for the C instance.
 
 ~XcbDevice () override
 
xcb_connection_tget_connection ()
 Returns the connection for the XCB device.
 
void debug_cap_xrender_version (int major_version, int minor_version)
 Restricts all future XCB surfaces for this device to the specified version of the RENDER extension.
 
void debug_cap_xshm_version (int major_version, int minor_version)
 Restricts all future XCB surfaces for this device to the specified version of the SHM extension.
 
int debug_get_precision () const
 Returns the Xrender precision mode.
 
void debug_set_precision (int precision)
 The Render extension supports two modes of precision when rendering trapezoids.
 
- Public Member Functions inherited from Cairo::Device
 Device (cairo_device_t *cobject, bool has_reference=false)
 Create a C++ wrapper for the C instance.
 
virtual ~Device ()
 
DeviceType get_type () const
 This function returns the type of the device.
 
void flush ()
 Finish any pending operations for the device and also restore any temporary modifications cairo has made to the device's state.
 
void finish ()
 This function finishes the device and drops all references to external resources.
 
void acquire ()
 Acquires the device for the current thread.
 
void release ()
 Releases a device previously acquired using acquire().
 
cobjectcobj ()
 
const cobjectcobj () const
 
void reference () const
 
void unreference () const
 

Additional Inherited Members

- Public Types inherited from Cairo::Device
enum class  DeviceType {
  DRM = CAIRO_DEVICE_TYPE_DRM ,
  GL = CAIRO_DEVICE_TYPE_GL ,
  SCRIPT = CAIRO_DEVICE_TYPE_SCRIPT ,
  XCB = CAIRO_DEVICE_TYPE_XCB ,
  XLIB = CAIRO_DEVICE_TYPE_XLIB ,
  XML = CAIRO_DEVICE_TYPE_XML
}
 
typedef cairo_device_t cobject
 
- Protected Attributes inherited from Cairo::Device
cobjectm_cobject
 

Detailed Description

An XCB device.

An XcbDevice object can be created from an XcbSurface object with Surface::get_device(). It returns a RefPtr<Device>, which can be cast to a RefPtr<XcbDevice> if the Surface is an XcbSurface.

Cairo::RefPtr<XcbDevice> xcb_device = std::dynamic_pointer_cast<Cairo::XcbDevice>(device);
RefPtr< T_CppObject > make_refptr_for_instance(T_CppObject *object)
Create a RefPtr<> to an instance of any reference-counted class whose destructor is noexcept (the def...
Definition refptr.h:54
Note
For this Device to be available, cairo must have been compiled with XCB support.
Since cairomm 1.20:

Constructor & Destructor Documentation

◆ XcbDevice()

Cairo::XcbDevice::XcbDevice ( cairo_device_t cobject,
bool  has_reference = false 
)
explicit

Create a C++ wrapper for the C instance.

This C++ instance should then be given to a RefPtr.

Parameters
cobjectThe C instance.
has_referenceWhether we already have a reference. Otherwise, the constructor will take an extra reference.
Since cairomm 1.20:

◆ ~XcbDevice()

Cairo::XcbDevice::~XcbDevice ( )
override

Member Function Documentation

◆ debug_cap_xrender_version()

void Cairo::XcbDevice::debug_cap_xrender_version ( int  major_version,
int  minor_version 
)

Restricts all future XCB surfaces for this device to the specified version of the RENDER extension.

This function exists solely for debugging purpose. It lets you find out how Cairomm would behave with an older version of the RENDER extension.

Use the special values -1 and -1 for disabling the RENDER extension.

Parameters
major_versionMajor version to restrict to.
minor_versionMinor version to restrict to.
Since cairomm 1.20:

◆ debug_cap_xshm_version()

void Cairo::XcbDevice::debug_cap_xshm_version ( int  major_version,
int  minor_version 
)

Restricts all future XCB surfaces for this device to the specified version of the SHM extension.

This function exists solely for debugging purpose. It lets you find out how cairo would behave with an older version of the SHM extension.

Use the special values -1 and -1 for disabling the SHM extension.

Parameters
major_versionMajor version to restrict to.
minor_versionMinor version to restrict to.
Since cairomm 1.20:

◆ debug_get_precision()

int Cairo::XcbDevice::debug_get_precision ( ) const

Returns the Xrender precision mode.

Since cairomm 1.20:

◆ debug_set_precision()

void Cairo::XcbDevice::debug_set_precision ( int  precision)

The Render extension supports two modes of precision when rendering trapezoids.

Set the precision to the desired mode.

Since cairomm 1.20:

◆ get_connection()

xcb_connection_t * Cairo::XcbDevice::get_connection ( )

Returns the connection for the XCB device.

Since cairomm 1.20:

The documentation for this class was generated from the following file: