gtk#

Global Hotkey in Mono and Gtk#

佐手、 提交于 2019-11-29 05:02:56
I'm trying to get a global hotkey working in Linux using Mono. I found the signatures of XGrabKey and XUngrabKey , but I can't seem to get them working. Whenever I try to invoke XGrabKey , the application crashes with a SIGSEGV. This is what I have so far: using System; using Gtk; using System.Runtime.InteropServices; namespace GTKTest { class MainClass { const int GrabModeAsync = 1; public static void Main(string[] args) { Application.Init(); MainWindow win = new MainWindow(); win.Show(); // Crashes here XGrabKey( win.Display.Handle, (int)Gdk.Key.A, (uint)KeyMasks.ShiftMask, win.Handle, true,

save current window as image using gtk#

自古美人都是妖i 提交于 2019-11-28 10:31:43
问题 How can I save the current window as an image file such as a png? I know I can get a gdkWindow from current windows. I can even get an image. From this image struct I can even query each pixel. But from what I understand what I really need is to get a pixbuf. int width; int height; this.GetSize(width, height); this.GdkWindow.GetImage(0,0,width,height).? How do I get a pixbuf from a gtk window or a gdk window or a gdk image ? EDIT int width; int height; this.GetSize(out width, out height);

How to build gstreamer-sharp with monodevelop/xamarin?

旧时模样 提交于 2019-11-28 08:49:38
i'm developer of AudioCuesheetEditor, an application for editing audio cuesheets. The new Version should be able to play back sound, so I would like to use gstreamer as backend. I investigated a bit in gstreamer and found out, that I need to use version 1.x with gstreamer-sharp 0.99.x binding. No problem, downloaded gstreamer-sharp 0.99.0, opened the solution with monodevelop (on linux) or xamarin (on windows) and tried to build the dll, but that didn't work. I get the error "namespace Gst.GLib" not found. I'm developing with xamarin/monodevelop and need to have a portable app (working with

How to build gstreamer-sharp with monodevelop/xamarin?

为君一笑 提交于 2019-11-27 02:33:21
问题 i'm developer of AudioCuesheetEditor, an application for editing audio cuesheets. The new Version should be able to play back sound, so I would like to use gstreamer as backend. I investigated a bit in gstreamer and found out, that I need to use version 1.x with gstreamer-sharp 0.99.x binding. No problem, downloaded gstreamer-sharp 0.99.0, opened the solution with monodevelop (on linux) or xamarin (on windows) and tried to build the dll, but that didn't work. I get the error "namespace Gst