implement wlr-gamma-control-unstable-v1
This commit is contained in:
parent
11b3f08514
commit
b1db715a90
26 changed files with 475 additions and 21 deletions
|
|
@ -380,7 +380,7 @@ impl DrmMaster {
|
|||
res
|
||||
}
|
||||
|
||||
pub fn create_blob<T>(self: &Rc<Self>, t: &T) -> Result<PropBlob, DrmError> {
|
||||
pub fn create_blob<T: ?Sized>(self: &Rc<Self>, t: &T) -> Result<PropBlob, DrmError> {
|
||||
match mode_create_blob(self.raw(), t) {
|
||||
Ok(b) => Ok(PropBlob {
|
||||
master: self.clone(),
|
||||
|
|
|
|||
|
|
@ -917,9 +917,9 @@ struct drm_mode_create_blob {
|
|||
|
||||
const DRM_IOCTL_MODE_CREATEPROPBLOB: u64 = drm_iowr::<drm_mode_create_blob>(0xbd);
|
||||
|
||||
pub fn mode_create_blob<T>(fd: c::c_int, t: &T) -> Result<DrmBlob, OsError> {
|
||||
pub fn mode_create_blob<T: ?Sized>(fd: c::c_int, t: &T) -> Result<DrmBlob, OsError> {
|
||||
let mut res = drm_mode_create_blob {
|
||||
data: t as *const T as _,
|
||||
data: t as *const T as *const () as _,
|
||||
length: size_of_val(t) as _,
|
||||
blob_id: 0,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue