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
|
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gtk {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class Accelerator {
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern int gtk_accelerator_get_default_mod_mask();
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_accelerator_set_default_mod_mask(int default_mod_mask);
public static Gdk.ModifierType DefaultModMask {
get {
int raw_ret = gtk_accelerator_get_default_mod_mask();
Gdk.ModifierType ret = (Gdk.ModifierType) raw_ret;
return ret;
}
set {
gtk_accelerator_set_default_mod_mask((int) value);
}
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gtk_accelerator_get_label(uint accelerator_key, int accelerator_mods);
public static string GetLabel(uint accelerator_key, Gdk.ModifierType accelerator_mods) {
IntPtr raw_ret = gtk_accelerator_get_label(accelerator_key, (int) accelerator_mods);
string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
return ret;
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gtk_accelerator_get_label_with_keycode(IntPtr display, uint accelerator_key, uint keycode, int accelerator_mods);
public static string GetLabelWithKeycode(Gdk.Display display, uint accelerator_key, uint keycode, Gdk.ModifierType accelerator_mods) {
IntPtr raw_ret = gtk_accelerator_get_label_with_keycode(display == null ? IntPtr.Zero : display.Handle, accelerator_key, keycode, (int) accelerator_mods);
string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
return ret;
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gtk_accelerator_name(uint accelerator_key, int accelerator_mods);
public static string Name(uint accelerator_key, Gdk.ModifierType accelerator_mods) {
IntPtr raw_ret = gtk_accelerator_name(accelerator_key, (int) accelerator_mods);
string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
return ret;
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gtk_accelerator_name_with_keycode(IntPtr display, uint accelerator_key, uint keycode, int accelerator_mods);
public static string NameWithKeycode(Gdk.Display display, uint accelerator_key, uint keycode, Gdk.ModifierType accelerator_mods) {
IntPtr raw_ret = gtk_accelerator_name_with_keycode(display == null ? IntPtr.Zero : display.Handle, accelerator_key, keycode, (int) accelerator_mods);
string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
return ret;
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_accelerator_parse(IntPtr accelerator, out uint accelerator_key, out int accelerator_mods);
public static void Parse(string accelerator, out uint accelerator_key, out Gdk.ModifierType accelerator_mods) {
IntPtr native_accelerator = GLib.Marshaller.StringToPtrGStrdup (accelerator);
int native_accelerator_mods;
gtk_accelerator_parse(native_accelerator, out accelerator_key, out native_accelerator_mods);
GLib.Marshaller.Free (native_accelerator);
accelerator_mods = (Gdk.ModifierType) native_accelerator_mods;
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_accelerator_parse_with_keycode(IntPtr accelerator, out uint accelerator_key, out uint accelerator_codes, out int accelerator_mods);
public static void ParseWithKeycode(string accelerator, out uint accelerator_key, out uint accelerator_codes, out Gdk.ModifierType accelerator_mods) {
IntPtr native_accelerator = GLib.Marshaller.StringToPtrGStrdup (accelerator);
int native_accelerator_mods;
gtk_accelerator_parse_with_keycode(native_accelerator, out accelerator_key, out accelerator_codes, out native_accelerator_mods);
GLib.Marshaller.Free (native_accelerator);
accelerator_mods = (Gdk.ModifierType) native_accelerator_mods;
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gtk_accelerator_valid(uint keyval, int modifiers);
public static bool Valid(uint keyval, Gdk.ModifierType modifiers) {
bool raw_ret = gtk_accelerator_valid(keyval, (int) modifiers);
bool ret = raw_ret;
return ret;
}
#endregion
}
}
|