150 lines
6.9 KiB
C#
150 lines
6.9 KiB
C#
// This file was generated by the Gtk# code generator.
|
|
// Any changes made will be lost if regenerated.
|
|
|
|
namespace GLib {
|
|
|
|
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using System.Runtime.InteropServices;
|
|
using static GLib.AbiStructExtension;
|
|
|
|
#region Autogenerated code
|
|
public partial class Notification : GLib.Object {
|
|
|
|
public Notification (IntPtr raw) : base(raw) {}
|
|
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate IntPtr d_g_notification_new(IntPtr title);
|
|
static d_g_notification_new g_notification_new = FuncLoader.LoadFunction<d_g_notification_new>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_notification_new"));
|
|
|
|
public Notification (string title) : base (IntPtr.Zero)
|
|
{
|
|
if (GetType () != typeof (Notification)) {
|
|
var vals = new List<GLib.Value> ();
|
|
var names = new List<string> ();
|
|
CreateNativeObject (names.ToArray (), vals.ToArray ());
|
|
return;
|
|
}
|
|
IntPtr native_title = GLib.Marshaller.StringToPtrGStrdup (title);
|
|
Raw = g_notification_new(native_title);
|
|
GLib.Marshaller.Free (native_title);
|
|
}
|
|
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate void d_g_notification_add_button(IntPtr raw, IntPtr label, IntPtr detailed_action);
|
|
static d_g_notification_add_button g_notification_add_button = FuncLoader.LoadFunction<d_g_notification_add_button>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_notification_add_button"));
|
|
|
|
public void AddButton(string label, string detailed_action) {
|
|
IntPtr native_label = GLib.Marshaller.StringToPtrGStrdup (label);
|
|
IntPtr native_detailed_action = GLib.Marshaller.StringToPtrGStrdup (detailed_action);
|
|
g_notification_add_button(Handle, native_label, native_detailed_action);
|
|
GLib.Marshaller.Free (native_label);
|
|
GLib.Marshaller.Free (native_detailed_action);
|
|
}
|
|
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate void d_g_notification_add_button_with_target_value(IntPtr raw, IntPtr label, IntPtr action, IntPtr target);
|
|
static d_g_notification_add_button_with_target_value g_notification_add_button_with_target_value = FuncLoader.LoadFunction<d_g_notification_add_button_with_target_value>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_notification_add_button_with_target_value"));
|
|
|
|
public void AddButtonWithTargetValue(string label, string action, GLib.Variant target) {
|
|
IntPtr native_label = GLib.Marshaller.StringToPtrGStrdup (label);
|
|
IntPtr native_action = GLib.Marshaller.StringToPtrGStrdup (action);
|
|
g_notification_add_button_with_target_value(Handle, native_label, native_action, target == null ? IntPtr.Zero : target.Handle);
|
|
GLib.Marshaller.Free (native_label);
|
|
GLib.Marshaller.Free (native_action);
|
|
}
|
|
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate IntPtr d_g_notification_get_type();
|
|
static d_g_notification_get_type g_notification_get_type = FuncLoader.LoadFunction<d_g_notification_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_notification_get_type"));
|
|
|
|
public static new GLib.GType GType {
|
|
get {
|
|
IntPtr raw_ret = g_notification_get_type();
|
|
GLib.GType ret = new GLib.GType(raw_ret);
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate void d_g_notification_set_body(IntPtr raw, IntPtr body);
|
|
static d_g_notification_set_body g_notification_set_body = FuncLoader.LoadFunction<d_g_notification_set_body>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_notification_set_body"));
|
|
|
|
public string Body {
|
|
set {
|
|
IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value);
|
|
g_notification_set_body(Handle, native_value);
|
|
GLib.Marshaller.Free (native_value);
|
|
}
|
|
}
|
|
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate void d_g_notification_set_default_action(IntPtr raw, IntPtr detailed_action);
|
|
static d_g_notification_set_default_action g_notification_set_default_action = FuncLoader.LoadFunction<d_g_notification_set_default_action>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_notification_set_default_action"));
|
|
|
|
public string DefaultAction {
|
|
set {
|
|
IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value);
|
|
g_notification_set_default_action(Handle, native_value);
|
|
GLib.Marshaller.Free (native_value);
|
|
}
|
|
}
|
|
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate void d_g_notification_set_default_action_and_target_value(IntPtr raw, IntPtr action, IntPtr target);
|
|
static d_g_notification_set_default_action_and_target_value g_notification_set_default_action_and_target_value = FuncLoader.LoadFunction<d_g_notification_set_default_action_and_target_value>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_notification_set_default_action_and_target_value"));
|
|
|
|
public void SetDefaultActionAndTargetValue(string action, GLib.Variant target) {
|
|
IntPtr native_action = GLib.Marshaller.StringToPtrGStrdup (action);
|
|
g_notification_set_default_action_and_target_value(Handle, native_action, target == null ? IntPtr.Zero : target.Handle);
|
|
GLib.Marshaller.Free (native_action);
|
|
}
|
|
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate void d_g_notification_set_icon(IntPtr raw, IntPtr icon);
|
|
static d_g_notification_set_icon g_notification_set_icon = FuncLoader.LoadFunction<d_g_notification_set_icon>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_notification_set_icon"));
|
|
|
|
public GLib.IIcon Icon {
|
|
set {
|
|
g_notification_set_icon(Handle, value == null ? IntPtr.Zero : ((value is GLib.Object) ? (value as GLib.Object).Handle : (value as GLib.IconAdapter).Handle));
|
|
}
|
|
}
|
|
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate void d_g_notification_set_priority(IntPtr raw, int priority);
|
|
static d_g_notification_set_priority g_notification_set_priority = FuncLoader.LoadFunction<d_g_notification_set_priority>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_notification_set_priority"));
|
|
|
|
public GLib.NotificationPriority Priority {
|
|
set {
|
|
g_notification_set_priority(Handle, (int) value);
|
|
}
|
|
}
|
|
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate void d_g_notification_set_title(IntPtr raw, IntPtr title);
|
|
static d_g_notification_set_title g_notification_set_title = FuncLoader.LoadFunction<d_g_notification_set_title>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_notification_set_title"));
|
|
|
|
public string Title {
|
|
set {
|
|
IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value);
|
|
g_notification_set_title(Handle, native_value);
|
|
GLib.Marshaller.Free (native_value);
|
|
}
|
|
}
|
|
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate void d_g_notification_set_urgent(IntPtr raw, bool urgent);
|
|
static d_g_notification_set_urgent g_notification_set_urgent = FuncLoader.LoadFunction<d_g_notification_set_urgent>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_notification_set_urgent"));
|
|
|
|
[Obsolete]
|
|
public bool Urgent {
|
|
set {
|
|
g_notification_set_urgent(Handle, value);
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
}
|