/* KWin - the KDE window manager This file is part of the KDE project. SPDX-FileCopyrightText: 2015 Martin Gräßlin SPDX-FileCopyrightText: 2019 Vlad Zahorodnii SPDX-License-Identifier: GPL-2.0-or-later */ #pragma once #include #include #include namespace KWin { template struct DrmDeleter; template<> struct DrmDeleter { void operator()(drmVersion *version) { drmFreeVersion(version); } }; template<> struct DrmDeleter { void operator()(drmModeAtomicReq *req) { drmModeAtomicFree(req); } }; template<> struct DrmDeleter { void operator()(drmModeConnector *connector) { drmModeFreeConnector(connector); } }; template<> struct DrmDeleter { void operator()(drmModeCrtc *crtc) { drmModeFreeCrtc(crtc); } }; template<> struct DrmDeleter { void operator()(drmModeFB *fb) { drmModeFreeFB(fb); } }; template<> struct DrmDeleter { void operator()(drmModeEncoder *encoder) { drmModeFreeEncoder(encoder); } }; template<> struct DrmDeleter { void operator()(drmModeModeInfo *info) { drmModeFreeModeInfo(info); } }; template<> struct DrmDeleter { void operator()(drmModeObjectProperties *properties) { drmModeFreeObjectProperties(properties); } }; template<> struct DrmDeleter { void operator()(drmModePlane *plane) { drmModeFreePlane(plane); } }; template<> struct DrmDeleter { void operator()(drmModePlaneRes *resources) { drmModeFreePlaneResources(resources); } }; template<> struct DrmDeleter { void operator()(drmModePropertyRes *property) { drmModeFreeProperty(property); } }; template<> struct DrmDeleter { void operator()(drmModePropertyBlobRes *blob) { drmModeFreePropertyBlob(blob); } }; template<> struct DrmDeleter { void operator()(drmModeRes *resources) { drmModeFreeResources(resources); } }; template<> struct DrmDeleter { void operator()(drmModeLesseeListRes *ptr) { drmFree(ptr); } }; template using DrmUniquePtr = std::unique_ptr>; }