Example #1
0
 public unsafe XIEventMask(int id, XIEventMasks m)
 {
     this.deviceid = id;
       this.mask_len = 4;
       this.mask = (XIEventMasks*) (void*) Marshal.AllocHGlobal(this.mask_len);
       *this.mask = m;
 }
Example #2
0
 public unsafe XIEventMask(int id, XIEventMasks m)
 {
     this.deviceid = id;
     this.mask_len = 4;
     this.mask     = (XIEventMasks *)(void *)Marshal.AllocHGlobal(this.mask_len);
     *this.mask    = m;
 }
Example #3
0
 public XIEventMask(int id, XIEventMasks m)
 {
     deviceid = id;
     mask_len = sizeof(XIEventMasks);
     unsafe
     {
         mask = (XIEventMasks*)Marshal.AllocHGlobal(mask_len);
         *mask = m;
     }
 }
Example #4
0
 public XIEventMask(int id, XIEventMasks m)
 {
     deviceid = id;
     mask_len = sizeof(XIEventMasks);
     unsafe
     {
         mask = (byte*)Marshal.AllocHGlobal(mask_len);
         for (int i = 0; i < mask_len; i++)
             mask[i] = (byte)((uint)m >> i*8);
     }
 }