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

An Xlib device. More...

#include <cairomm/xlib_device.h>

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

Public Member Functions

 XlibDevice (cairo_device_t *cobject, bool has_reference=false)
 Create a C++ wrapper for the C instance.
 
 ~XlibDevice () override
 
void debug_cap_xrender_version (int major_version, int minor_version)
 Restricts all future Xlib surfaces for this device to the specified version of the RENDER extension.
 
int debug_get_precision () const
 Returns the Xrender precision mode.
 
void debug_set_precision (int precision)
 The Xrender 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 Xlib device.

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

Cairo::RefPtr<XlibDevice> xlib_device = std::dynamic_pointer_cast<Cairo::XlibDevice>(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 Xlib support.
Since cairomm 1.20:

Constructor & Destructor Documentation

◆ XlibDevice()

Cairo::XlibDevice::XlibDevice ( 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:

◆ ~XlibDevice()

Cairo::XlibDevice::~XlibDevice ( )
override

Member Function Documentation

◆ debug_cap_xrender_version()

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

Restricts all future Xlib 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_get_precision()

int Cairo::XlibDevice::debug_get_precision ( ) const

Returns the Xrender precision mode.

Since cairomm 1.20:

◆ debug_set_precision()

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

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

Set the precision to the desired mode.

Since cairomm 1.20:

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