• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# GLib类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中GLib的典型用法代码示例。如果您正苦于以下问题:C# GLib类的具体用法?C# GLib怎么用?C# GLib使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



GLib类属于命名空间,在下文中一共展示了GLib类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Write

		public unsafe long Write(byte[] buffer, ulong count, GLib.Cancellable cancellable) {
			IntPtr error = IntPtr.Zero;
			IntPtr raw_ret = g_output_stream_write(Handle, buffer, new UIntPtr (count), cancellable == null ? IntPtr.Zero : cancellable.Handle, out error);
			long ret = (long) raw_ret;
			if (error != IntPtr.Zero) throw new GLib.GException (error);
			return ret;
		}
开发者ID:Yetangitu,项目名称:f-spot,代码行数:7,代码来源:OutputStream.cs


示例2: AppChooserDialog

		public AppChooserDialog (Gtk.Window parent, Gtk.DialogFlags flags, GLib.IFile file) : base (IntPtr.Zero)
		{
			if (GetType () != typeof (AppChooserDialog)) {
				throw new InvalidOperationException ("Can't override this constructor.");
			}
			Raw = gtk_app_chooser_dialog_new(parent == null ? IntPtr.Zero : parent.Handle, (int) flags, file == null ? IntPtr.Zero : ((file is GLib.Object) ? (file as GLib.Object).Handle : (file as GLib.FileAdapter).Handle));
		}
开发者ID:akrisiun,项目名称:gtk-sharp,代码行数:7,代码来源:AppChooserDialog.cs


示例3: Load

		public GLib.InputStream Load(int size, string type, GLib.Cancellable cancellable) {
			IntPtr error = IntPtr.Zero;
			IntPtr raw_ret = g_loadable_icon_load(Handle, size, GLib.Marshaller.StringToPtrGStrdup(type), cancellable == null ? IntPtr.Zero : cancellable.Handle, out error);
			GLib.InputStream ret = GLib.Object.GetObject(raw_ret) as GLib.InputStream;
			if (error != IntPtr.Zero) throw new GLib.GException (error);
			return ret;
		}
开发者ID:Yetangitu,项目名称:f-spot,代码行数:7,代码来源:FileIcon.cs


示例4: Value

 public Value(GLib.GType gtype)
 {
     type = IntPtr.Zero;
     pad1 = new Padding ();
     pad2 = new Padding ();
     g_value_init (ref this, gtype.Val);
 }
开发者ID:saraa,项目名称:fishtastic,代码行数:7,代码来源:Value.cs


示例5: BufferedOutputStream

		public BufferedOutputStream (GLib.OutputStream base_stream, ulong size) : base (IntPtr.Zero)
		{
			if (GetType () != typeof (BufferedOutputStream)) {
				throw new InvalidOperationException ("Can't override this constructor.");
			}
			Raw = g_buffered_output_stream_new_sized(base_stream == null ? IntPtr.Zero : base_stream.Handle, new UIntPtr (size));
		}
开发者ID:akrisiun,项目名称:gtk-sharp,代码行数:7,代码来源:BufferedOutputStream.cs


示例6: AppendTo

		public GLib.FileOutputStream AppendTo(GLib.FileCreateFlags flags, GLib.Cancellable cancellable) {
			IntPtr error = IntPtr.Zero;
			IntPtr raw_ret = g_file_append_to(Handle, (int) flags, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error);
			GLib.FileOutputStream ret = GLib.Object.GetObject(raw_ret) as GLib.FileOutputStream;
			if (error != IntPtr.Zero) throw new GLib.GException (error);
			return ret;
		}
开发者ID:akrisiun,项目名称:gtk-sharp,代码行数:7,代码来源:FileAdapter.cs


示例7: DesktopAppInfo

		public DesktopAppInfo (GLib.KeyFile key_file) : base (IntPtr.Zero)
		{
			if (GetType () != typeof (DesktopAppInfo)) {
				throw new InvalidOperationException ("Can't override this constructor.");
			}
			Raw = g_desktop_app_info_new_from_keyfile(key_file == null ? IntPtr.Zero : key_file.Handle);
		}
开发者ID:akrisiun,项目名称:gtk-sharp,代码行数:7,代码来源:DesktopAppInfo.cs


示例8: Truncate

		public bool Truncate(long offset, GLib.Cancellable cancellable) {
			IntPtr error = IntPtr.Zero;
			bool raw_ret = g_seekable_truncate(Handle, offset, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error);
			bool ret = raw_ret;
			if (error != IntPtr.Zero) throw new GLib.GException (error);
			return ret;
		}
开发者ID:Yetangitu,项目名称:f-spot,代码行数:7,代码来源:MemoryInputStream.cs


示例9: MemoryInputStream

		public MemoryInputStream (IntPtr data, long len, GLib.DestroyNotify destroy) : base (IntPtr.Zero)
		{
			if (GetType () != typeof (MemoryInputStream)) {
				throw new InvalidOperationException ("Can't override this constructor.");
			}
			Raw = g_memory_input_stream_new_from_data(data, new IntPtr (len), destroy);
		}
开发者ID:akrisiun,项目名称:gtk-sharp,代码行数:7,代码来源:MemoryInputStream.cs


示例10: ConnectFinish

		public GLib.IOStream ConnectFinish(GLib.IAsyncResult result) {
			IntPtr error = IntPtr.Zero;
			IntPtr raw_ret = g_proxy_connect_finish(Handle, result == null ? IntPtr.Zero : ((result is GLib.Object) ? (result as GLib.Object).Handle : (result as GLib.AsyncResultAdapter).Handle), out error);
			GLib.IOStream ret = GLib.Object.GetObject(raw_ret) as GLib.IOStream;
			if (error != IntPtr.Zero) throw new GLib.GException (error);
			return ret;
		}
开发者ID:akrisiun,项目名称:gtk-sharp,代码行数:7,代码来源:Socks4aProxy.cs


示例11: Image

		public Image (GLib.IIcon icon, Gtk.IconSize size) : base (IntPtr.Zero)
		{
			if (GetType () != typeof (Image)) {
				throw new InvalidOperationException ("Can't override this constructor.");
			}
			Raw = gtk_image_new_from_gicon(icon == null ? IntPtr.Zero : ((icon is GLib.Object) ? (icon as GLib.Object).Handle : (icon as GLib.IconAdapter).Handle), (int) size);
		}
开发者ID:akrisiun,项目名称:gtk-sharp,代码行数:7,代码来源:Image.cs


示例12: Connect

		public GLib.IOStream Connect(GLib.IOStream connection, GLib.ProxyAddress proxy_address, GLib.Cancellable cancellable) {
			IntPtr error = IntPtr.Zero;
			IntPtr raw_ret = g_proxy_connect(Handle, connection == null ? IntPtr.Zero : connection.Handle, proxy_address == null ? IntPtr.Zero : proxy_address.Handle, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error);
			GLib.IOStream ret = GLib.Object.GetObject(raw_ret) as GLib.IOStream;
			if (error != IntPtr.Zero) throw new GLib.GException (error);
			return ret;
		}
开发者ID:akrisiun,项目名称:gtk-sharp,代码行数:7,代码来源:Socks4aProxy.cs


示例13: EmblemedIcon

		public EmblemedIcon (GLib.IIcon icon, GLib.Emblem emblem) : base (IntPtr.Zero)
		{
			if (GetType () != typeof (EmblemedIcon)) {
				throw new InvalidOperationException ("Can't override this constructor.");
			}
			Raw = g_emblemed_icon_new(icon == null ? IntPtr.Zero : ((icon is GLib.Object) ? (icon as GLib.Object).Handle : (icon as GLib.IconAdapter).Handle), emblem == null ? IntPtr.Zero : emblem.Handle);
		}
开发者ID:akrisiun,项目名称:gtk-sharp,代码行数:7,代码来源:EmblemedIcon.cs


示例14: CopyRecursive

        public static bool CopyRecursive(this GLib.File source, GLib.File target, GLib.FileCopyFlags flags, GLib.Cancellable cancellable, GLib.FileProgressCallback callback)
        {
            bool result = true;

            GLib.FileType ft = source.QueryFileType (GLib.FileQueryInfoFlags.None, cancellable);

            if (ft != GLib.FileType.Directory) {
                Hyena.Log.DebugFormat ("Copying \"{0}\" to \"{1}\"", source.Path, target.Path);
                return source.Copy (target, flags, cancellable, callback);
            }

            if (!target.Exists) {
                Hyena.Log.DebugFormat ("Creating directory: \"{0}\"", target.Path);
                result = result && target.MakeDirectoryWithParents (cancellable);
            }

            GLib.FileEnumerator fe = source.EnumerateChildren ("standard::name", GLib.FileQueryInfoFlags.None, cancellable);
            GLib.FileInfo fi = fe.NextFile ();
            while (fi != null) {
                GLib.File source_file = GLib.FileFactory.NewForPath (Path.Combine (source.Path, fi.Name));
                GLib.File target_file = GLib.FileFactory.NewForPath (Path.Combine (target.Path, fi.Name));
                result = result && source_file.CopyRecursive(target_file, flags, cancellable, callback);
                fi = fe.NextFile ();
            }
            fe.Close (cancellable);
            return result;
        }
开发者ID:nathansamson,项目名称:F-Spot-Album-Exporter,代码行数:27,代码来源:FileExtensions.cs


示例15: QueryInfoFinish

		public unsafe GLib.FileInfo QueryInfoFinish(GLib.AsyncResult result) {
			IntPtr error = IntPtr.Zero;
			IntPtr raw_ret = g_file_io_stream_query_info_finish(Handle, result == null ? IntPtr.Zero : result.Handle, out error);
			GLib.FileInfo ret = GLib.Object.GetObject(raw_ret) as GLib.FileInfo;
			if (error != IntPtr.Zero) throw new GLib.GException (error);
			return ret;
		}
开发者ID:Yetangitu,项目名称:f-spot,代码行数:7,代码来源:FileIOStream.cs


示例16: GetFinish

		public static unsafe GLib.DBusConnection GetFinish(GLib.IAsyncResult res) {
			IntPtr error = IntPtr.Zero;
			IntPtr raw_ret = g_bus_get_finish(res == null ? IntPtr.Zero : ((res is GLib.Object) ? (res as GLib.Object).Handle : (res as GLib.AsyncResultAdapter).Handle), out error);
			GLib.DBusConnection ret = GLib.Object.GetObject(raw_ret) as GLib.DBusConnection;
			if (error != IntPtr.Zero) throw new GLib.GException (error);
			return ret;
		}
开发者ID:akrisiun,项目名称:gtk-sharp,代码行数:7,代码来源:Bus.cs


示例17: NoOpObject

		public NoOpObject (GLib.Object obj) : base (IntPtr.Zero)
		{
			if (GetType () != typeof (NoOpObject)) {
				throw new InvalidOperationException ("Can't override this constructor.");
			}
			Raw = atk_no_op_object_new(obj == null ? IntPtr.Zero : obj.Handle);
		}
开发者ID:akrisiun,项目名称:gtk-sharp,代码行数:7,代码来源:NoOpObject.cs


示例18: GetSync

		public static unsafe GLib.DBusConnection GetSync(GLib.BusType bus_type, GLib.Cancellable cancellable) {
			IntPtr error = IntPtr.Zero;
			IntPtr raw_ret = g_bus_get_sync((int) bus_type, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error);
			GLib.DBusConnection ret = GLib.Object.GetObject(raw_ret) as GLib.DBusConnection;
			if (error != IntPtr.Zero) throw new GLib.GException (error);
			return ret;
		}
开发者ID:akrisiun,项目名称:gtk-sharp,代码行数:7,代码来源:Bus.cs


示例19: AddGlobalEventListener

		public static uint AddGlobalEventListener (GLib.Signal.EmissionHook hook, string event_type)
		{
			IntPtr native_event_type = GLib.Marshaller.StringToPtrGStrdup (event_type);
			uint id = atk_add_global_event_listener (new GLib.Signal.EmissionHookMarshaler (hook).Callback, native_event_type);
			GLib.Marshaller.Free (native_event_type);
			return id;
		}
开发者ID:liberostelios,项目名称:gtk-sharp,代码行数:7,代码来源:Global.cs


示例20: PutUint32

		public unsafe bool PutUint32(uint data, GLib.Cancellable cancellable) {
			IntPtr error = IntPtr.Zero;
			bool raw_ret = g_data_output_stream_put_uint32(Handle, data, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error);
			bool ret = raw_ret;
			if (error != IntPtr.Zero) throw new GLib.GException (error);
			return ret;
		}
开发者ID:Yetangitu,项目名称:f-spot,代码行数:7,代码来源:DataOutputStream.cs



注:本文中的GLib类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# GLib.Value类代码示例发布时间:2022-05-24
下一篇:
C# GLBatchTDS类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap