mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-12-29 00:15:40 +00:00
0b60ffe89f
* gconf/GConf/ChangeSet.cs, Client.cs: Change SetValue from protected to internal, as it references an internal type. * gconf/GConf/ClientBase.cs: The same; additionally remove some commented-out code. Change Initialize from protected to internal. svn path=/trunk/gtk-sharp/; revision=14922
35 lines
686 B
C#
35 lines
686 B
C#
namespace GConf
|
|
{
|
|
using System;
|
|
using System.Runtime.InteropServices;
|
|
|
|
public abstract class ClientBase
|
|
{
|
|
public abstract object Get (string key);
|
|
internal abstract void SetValue (string key, Value val);
|
|
|
|
public void Set (string key, object val)
|
|
{
|
|
SetValue (key, new Value (val));
|
|
}
|
|
|
|
[DllImport("gconf-2")]
|
|
static extern bool gconf_is_initialized ();
|
|
|
|
[DllImport("gconf-2")]
|
|
static extern bool gconf_init (int argc, IntPtr argv, out IntPtr err);
|
|
|
|
internal void Initialize ()
|
|
{
|
|
if (!gconf_is_initialized ())
|
|
{
|
|
IntPtr err;
|
|
gconf_init (0, IntPtr.Zero, out err);
|
|
if (err != IntPtr.Zero)
|
|
throw new GLib.GException (err);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|