mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-09-09 00:13:20 +02:00
2003-11-27 Miguel de Icaza <miguel@ximian.com>
* glib/Log.cs: Make LogLevelFlags CLS compliant. * glib/SignalCallback.cs: Set the constructor protection level to protected, since it can not be instantiate.d * glib/Marshaller.cs: Do not allow instances of this class as it only exposes static methods. * glib/Source.cs, glib/FileUtils.cs, glib/Timeout.cs, glib/Thread.cs, glib/Markup.cs, glib/TypeConverter.cs: Ditto. svn path=/trunk/gtk-sharp/; revision=20573
This commit is contained in:
parent
c2d44cbb6a
commit
f1e095a87b
@ -25,5 +25,7 @@ namespace GLib {
|
||||
|
||||
return Marshal.PtrToStringAnsi (contents, length);
|
||||
}
|
||||
|
||||
private FileUtils () {}
|
||||
}
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ namespace GLib {
|
||||
public delegate void PrintFunc (string message);
|
||||
|
||||
[Flags]
|
||||
public enum LogLevelFlags : uint
|
||||
public enum LogLevelFlags : int
|
||||
{
|
||||
/* log flags */
|
||||
FlagRecursion = 1 << 0,
|
||||
@ -40,7 +40,7 @@ namespace GLib {
|
||||
All = 255,
|
||||
|
||||
FlagMask = 3,
|
||||
LevelMask = (uint) 0xFFFFFFFC
|
||||
LevelMask = unchecked ((int) 0xFFFFFFFC)
|
||||
}
|
||||
|
||||
public class Log {
|
||||
|
@ -13,6 +13,8 @@ namespace GLib {
|
||||
|
||||
|
||||
public class Markup {
|
||||
private Markup () {}
|
||||
|
||||
[DllImport("libglib-2.0-0.dll")]
|
||||
static extern IntPtr g_markup_escape_text (string text, int len);
|
||||
|
||||
|
@ -17,7 +17,12 @@ namespace GLibSharp {
|
||||
/// </remarks>
|
||||
|
||||
public class Marshaller {
|
||||
|
||||
|
||||
//
|
||||
// Do not allow instances of this
|
||||
//
|
||||
private Marshaller () {}
|
||||
|
||||
[DllImport("libglib-2.0-0.dll")]
|
||||
static extern void g_free (IntPtr mem);
|
||||
|
||||
|
@ -16,7 +16,7 @@ namespace GLib {
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
[AttributeUsage(AttributeTargets.All)]
|
||||
public class WrapperClassAttribute : Attribute {
|
||||
public sealed class WrapperClassAttribute : Attribute {
|
||||
|
||||
public WrapperClassAttribute () : base () {}
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ namespace GLib {
|
||||
/// and allows obtaining its original name.
|
||||
/// </remarks>
|
||||
[Serializable]
|
||||
public class SignalAttribute : Attribute
|
||||
public sealed class SignalAttribute : Attribute
|
||||
{
|
||||
private string cname;
|
||||
|
||||
|
@ -40,7 +40,7 @@ namespace GtkSharp {
|
||||
/// Initializes instance data.
|
||||
/// </remarks>
|
||||
|
||||
public SignalCallback (GLib.Object obj, Delegate eh, System.Type argstype)
|
||||
protected SignalCallback (GLib.Object obj, Delegate eh, System.Type argstype)
|
||||
{
|
||||
_key = _NextKey++;
|
||||
_obj = obj;
|
||||
|
@ -10,6 +10,7 @@ namespace GLib {
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
public class Source {
|
||||
private Source () {}
|
||||
|
||||
[DllImport("libglib-2.0-0.dll")]
|
||||
static extern bool g_source_remove (uint tag);
|
||||
|
@ -11,6 +11,8 @@ namespace GLib
|
||||
|
||||
public class Thread
|
||||
{
|
||||
private Thread () {}
|
||||
|
||||
[DllImport("libgthread-2.0-0.dll")]
|
||||
static extern void g_thread_init (IntPtr i);
|
||||
|
||||
|
@ -32,6 +32,7 @@ namespace GLib {
|
||||
|
||||
public class Timeout {
|
||||
|
||||
private Timeout () {}
|
||||
[DllImport("libglib-2.0-0.dll")]
|
||||
static extern uint g_timeout_add (uint interval, TimeoutHandler d, IntPtr data);
|
||||
|
||||
|
@ -17,6 +17,9 @@ namespace GLibSharp {
|
||||
/// Utilities for converting between TypeFundamentals and System.Type
|
||||
/// </remarks>
|
||||
public class TypeConverter {
|
||||
|
||||
private TypeConverter () {}
|
||||
|
||||
public static TypeFundamentals LookupType (System.Type type)
|
||||
{
|
||||
if (type.Equals (typeof (string)))
|
||||
|
Loading…
Reference in New Issue
Block a user