1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444
|
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gdk {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class DeviceManager : GLib.Object {
public DeviceManager (IntPtr raw) : base(raw) {}
protected DeviceManager() : base(IntPtr.Zero)
{
CreateNativeObject (new string [0], new GLib.Value [0]);
}
[DllImport("gdk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gdk_device_manager_get_display(IntPtr raw);
[GLib.Property ("display")]
public Gdk.Display Display {
get {
IntPtr raw_ret = gdk_device_manager_get_display(Handle);
Gdk.Display ret = GLib.Object.GetObject(raw_ret) as Gdk.Display;
return ret;
}
}
[GLib.Signal("device-changed")]
public event Gdk.DeviceChangedHandler DeviceChanged {
add {
this.AddSignalHandler ("device-changed", value, typeof (Gdk.DeviceChangedArgs));
}
remove {
this.RemoveSignalHandler ("device-changed", value);
}
}
[GLib.Signal("device-added")]
public event Gdk.DeviceAddedHandler DeviceAdded {
add {
this.AddSignalHandler ("device-added", value, typeof (Gdk.DeviceAddedArgs));
}
remove {
this.RemoveSignalHandler ("device-added", value);
}
}
[GLib.Signal("device-removed")]
public event Gdk.DeviceRemovedHandler DeviceRemoved {
add {
this.AddSignalHandler ("device-removed", value, typeof (Gdk.DeviceRemovedArgs));
}
remove {
this.RemoveSignalHandler ("device-removed", value);
}
}
static DeviceAddedNativeDelegate DeviceAdded_cb_delegate;
static DeviceAddedNativeDelegate DeviceAddedVMCallback {
get {
if (DeviceAdded_cb_delegate == null)
DeviceAdded_cb_delegate = new DeviceAddedNativeDelegate (DeviceAdded_cb);
return DeviceAdded_cb_delegate;
}
}
static void OverrideDeviceAdded (GLib.GType gtype)
{
OverrideDeviceAdded (gtype, DeviceAddedVMCallback);
}
static void OverrideDeviceAdded (GLib.GType gtype, DeviceAddedNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("device_added"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void DeviceAddedNativeDelegate (IntPtr inst, IntPtr device);
static void DeviceAdded_cb (IntPtr inst, IntPtr device)
{
try {
DeviceManager __obj = GLib.Object.GetObject (inst, false) as DeviceManager;
__obj.OnDeviceAdded (GLib.Object.GetObject(device) as Gdk.Device);
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, false);
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gdk.DeviceManager), ConnectionMethod="OverrideDeviceAdded")]
protected virtual void OnDeviceAdded (Gdk.Device device)
{
InternalDeviceAdded (device);
}
private void InternalDeviceAdded (Gdk.Device device)
{
DeviceAddedNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("device_added"));
unmanaged = (DeviceAddedNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(DeviceAddedNativeDelegate));
}
if (unmanaged == null) return;
unmanaged (this.Handle, device == null ? IntPtr.Zero : device.Handle);
}
static DeviceRemovedNativeDelegate DeviceRemoved_cb_delegate;
static DeviceRemovedNativeDelegate DeviceRemovedVMCallback {
get {
if (DeviceRemoved_cb_delegate == null)
DeviceRemoved_cb_delegate = new DeviceRemovedNativeDelegate (DeviceRemoved_cb);
return DeviceRemoved_cb_delegate;
}
}
static void OverrideDeviceRemoved (GLib.GType gtype)
{
OverrideDeviceRemoved (gtype, DeviceRemovedVMCallback);
}
static void OverrideDeviceRemoved (GLib.GType gtype, DeviceRemovedNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("device_removed"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void DeviceRemovedNativeDelegate (IntPtr inst, IntPtr device);
static void DeviceRemoved_cb (IntPtr inst, IntPtr device)
{
try {
DeviceManager __obj = GLib.Object.GetObject (inst, false) as DeviceManager;
__obj.OnDeviceRemoved (GLib.Object.GetObject(device) as Gdk.Device);
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, false);
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gdk.DeviceManager), ConnectionMethod="OverrideDeviceRemoved")]
protected virtual void OnDeviceRemoved (Gdk.Device device)
{
InternalDeviceRemoved (device);
}
private void InternalDeviceRemoved (Gdk.Device device)
{
DeviceRemovedNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("device_removed"));
unmanaged = (DeviceRemovedNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(DeviceRemovedNativeDelegate));
}
if (unmanaged == null) return;
unmanaged (this.Handle, device == null ? IntPtr.Zero : device.Handle);
}
static DeviceChangedNativeDelegate DeviceChanged_cb_delegate;
static DeviceChangedNativeDelegate DeviceChangedVMCallback {
get {
if (DeviceChanged_cb_delegate == null)
DeviceChanged_cb_delegate = new DeviceChangedNativeDelegate (DeviceChanged_cb);
return DeviceChanged_cb_delegate;
}
}
static void OverrideDeviceChanged (GLib.GType gtype)
{
OverrideDeviceChanged (gtype, DeviceChangedVMCallback);
}
static void OverrideDeviceChanged (GLib.GType gtype, DeviceChangedNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("device_changed"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void DeviceChangedNativeDelegate (IntPtr inst, IntPtr device);
static void DeviceChanged_cb (IntPtr inst, IntPtr device)
{
try {
DeviceManager __obj = GLib.Object.GetObject (inst, false) as DeviceManager;
__obj.OnDeviceChanged (GLib.Object.GetObject(device) as Gdk.Device);
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, false);
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gdk.DeviceManager), ConnectionMethod="OverrideDeviceChanged")]
protected virtual void OnDeviceChanged (Gdk.Device device)
{
InternalDeviceChanged (device);
}
private void InternalDeviceChanged (Gdk.Device device)
{
DeviceChangedNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("device_changed"));
unmanaged = (DeviceChangedNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(DeviceChangedNativeDelegate));
}
if (unmanaged == null) return;
unmanaged (this.Handle, device == null ? IntPtr.Zero : device.Handle);
}
static ListDevicesNativeDelegate ListDevices_cb_delegate;
static ListDevicesNativeDelegate ListDevicesVMCallback {
get {
if (ListDevices_cb_delegate == null)
ListDevices_cb_delegate = new ListDevicesNativeDelegate (ListDevices_cb);
return ListDevices_cb_delegate;
}
}
static void OverrideListDevices (GLib.GType gtype)
{
OverrideListDevices (gtype, ListDevicesVMCallback);
}
static void OverrideListDevices (GLib.GType gtype, ListDevicesNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("list_devices"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr ListDevicesNativeDelegate (IntPtr inst, int type);
static IntPtr ListDevices_cb (IntPtr inst, int type)
{
try {
DeviceManager __obj = GLib.Object.GetObject (inst, false) as DeviceManager;
Gdk.Device[] __result;
__result = __obj.OnListDevices ((Gdk.DeviceType) type);
return new GLib.List(__result, typeof (Gdk.Device), true, false) == null ? IntPtr.Zero : new GLib.List(__result, typeof (Gdk.Device), true, false).Handle;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw e;
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gdk.DeviceManager), ConnectionMethod="OverrideListDevices")]
protected virtual Gdk.Device[] OnListDevices (Gdk.DeviceType type)
{
return InternalListDevices (type);
}
private Gdk.Device[] InternalListDevices (Gdk.DeviceType type)
{
ListDevicesNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("list_devices"));
unmanaged = (ListDevicesNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ListDevicesNativeDelegate));
}
if (unmanaged == null) return null;
IntPtr __result = unmanaged (this.Handle, (int) type);
return (Gdk.Device[]) GLib.Marshaller.ListPtrToArray (__result, typeof(GLib.List), true, false, typeof(Gdk.Device));
}
static GetClientPointerNativeDelegate GetClientPointer_cb_delegate;
static GetClientPointerNativeDelegate GetClientPointerVMCallback {
get {
if (GetClientPointer_cb_delegate == null)
GetClientPointer_cb_delegate = new GetClientPointerNativeDelegate (GetClientPointer_cb);
return GetClientPointer_cb_delegate;
}
}
static void OverrideGetClientPointer (GLib.GType gtype)
{
OverrideGetClientPointer (gtype, GetClientPointerVMCallback);
}
static void OverrideGetClientPointer (GLib.GType gtype, GetClientPointerNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("get_client_pointer"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr GetClientPointerNativeDelegate (IntPtr inst);
static IntPtr GetClientPointer_cb (IntPtr inst)
{
try {
DeviceManager __obj = GLib.Object.GetObject (inst, false) as DeviceManager;
Gdk.Device __result;
__result = __obj.OnGetClientPointer ();
return __result == null ? IntPtr.Zero : __result.Handle;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw e;
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gdk.DeviceManager), ConnectionMethod="OverrideGetClientPointer")]
protected virtual Gdk.Device OnGetClientPointer ()
{
return InternalGetClientPointer ();
}
private Gdk.Device InternalGetClientPointer ()
{
GetClientPointerNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("get_client_pointer"));
unmanaged = (GetClientPointerNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GetClientPointerNativeDelegate));
}
if (unmanaged == null) return null;
IntPtr __result = unmanaged (this.Handle);
return GLib.Object.GetObject(__result) as Gdk.Device;
}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _class_abi = null;
static public new GLib.AbiStruct class_abi {
get {
if (_class_abi == null)
_class_abi = new GLib.AbiStruct (new List<GLib.AbiField>{
new GLib.AbiField("device_added"
, GLib.Object.class_abi.Fields
, (uint) Marshal.SizeOf(typeof(IntPtr)) // device_added
, null
, "device_removed"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("device_removed"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // device_removed
, "device_added"
, "device_changed"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("device_changed"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // device_changed
, "device_removed"
, "list_devices"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("list_devices"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // list_devices
, "device_changed"
, "get_client_pointer"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("get_client_pointer"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // get_client_pointer
, "list_devices"
, null
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
});
return _class_abi;
}
}
// End of the ABI representation.
[DllImport("gdk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gdk_device_manager_get_client_pointer(IntPtr raw);
[Obsolete]
public Gdk.Device ClientPointer {
get {
IntPtr raw_ret = gdk_device_manager_get_client_pointer(Handle);
Gdk.Device ret = GLib.Object.GetObject(raw_ret) as Gdk.Device;
return ret;
}
}
[DllImport("gdk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gdk_device_manager_get_type();
public static new GLib.GType GType {
get {
IntPtr raw_ret = gdk_device_manager_get_type();
GLib.GType ret = new GLib.GType(raw_ret);
return ret;
}
}
[DllImport("gdk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gdk_device_manager_list_devices(IntPtr raw, int type);
[Obsolete]
public Gdk.Device[] ListDevices(Gdk.DeviceType type) {
IntPtr raw_ret = gdk_device_manager_list_devices(Handle, (int) type);
Gdk.Device[] ret = (Gdk.Device[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, false, typeof(Gdk.Device));
return ret;
}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public new GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (GLib.Object.abi_info.Fields);
return _abi_info;
}
}
// End of the ABI representation.
#endregion
}
}
|