gtk#

How do I access GUI (GTK) from multi threads?

谁都会走 提交于 2019-12-18 19:05:53
问题 I have a worker thread spawned from a GUI (for GUI performance), how do I access GUI, such as spawning new windows/widgets from the thread itself? I tried using delegates but it doesn't seem to be working. Any ideas? Possibly examples? Thank you. 回答1: According to their Best Practices: Gtk# is not a thread-safe toolkit, which means that only one thread at a time can safely invoke methods on Gtk#. This thread is typically the thread executing the main loop (which is when control has been

Global Hotkey in Mono and Gtk#

安稳与你 提交于 2019-12-18 04:21:30
问题 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(); //

Global Hotkey in Mono and Gtk#

≡放荡痞女 提交于 2019-12-18 04:21:27
问题 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(); //

Stetic GUI Designer Move to Glade for Gtk#3

懵懂的女人 提交于 2019-12-13 07:56:59
问题 I'm currently working at an audiobackend binding for my application. Since I want to use gstreamer, I found out, that I need to use GTK#3, because this is needed by gstreamer-sharp. Since I'm currently working with monodevelop, which uses stetic for GUI design, I wanted to ask, what is the best way, moving towards GTK#3. I see, that it uses .ui files for GUI definition, which can be generated by glade (I also tried a little bit around with glade). But my application has 4 windows with much

Can't start Gtk# Mono App without IDE (Unable to load DLL “intl”)

让人想犯罪 __ 提交于 2019-12-13 05:08:26
问题 Some Background information: Cross-Platform-Desktop-App written in C# with gtk# and mono. Target Framework: Mono / .Net 4.5 Runtime Environment: Microsoft .NET Problem I can build / debug / run the project in Xamarin Studio or Visual Studio 2012 perfectly fine. But whenever I try to start a debug/release build without it (open .exe), my app doesn't start at all. I tried HomeStream.exe 2> error.log as stated here. And error.log contained the following information: Unhandled Exception: System

TreeView: Column suddenly grey

青春壹個敷衍的年華 提交于 2019-12-13 00:03:49
问题 With 2 columns, everything works correct, all the background in the TreeView is white. But as soon as I add a third column (all three are default CellRendererText), the rows in the first one suddenly have a light grey background. To show what I mean, I have uploaded a picture: As you can see at the red arrow , the background in the first column is grey. I have NOT set this anywhere, so why does it do that? It looks really ugly. As you can see at the blue arrow , I have set the background

GTK# window not rendered completely

六眼飞鱼酱① 提交于 2019-12-12 22:04:03
问题 Right now, I am trying to develop a program using Mono and GTK# on a Debian (Raspbian) system. The issue I'm facing is, that, completely randomly, the GUI (generated by the Stetic designer or its dynamic elements) isn't completely drawn, missing either a few characters from a Label-element or whole widgets, mostly those that were dynamically created. This is how it looks on a dialog window: http://imgur.com/oEZRg7c (text is cut off) As soon as one window shows this issue, every other window

Issues with Gtk# 2.99.3

拥有回忆 提交于 2019-12-12 18:17:13
问题 I had to install Gtk# 2.99 because I must to use the CssProvider class. After install Gtk# 2.99.3 using the .msi installer I got these changes and some issues: Now I can use the CssProvider class. I needed to connect gio-sharp due to an error: The type "GLib.Application" is defined in an assembly that is not referenced. You must add a reference to assembly "gio-sharp, Version=3.0.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" (CS0012) I got next warning: Found conflicts between

Two Gtk TextView widgets with shared Scrollbar

霸气de小男生 提交于 2019-12-12 15:46:25
问题 I want to have two TextView widgets side by side which are scrolled together with a single scrollbar. I can put both TextView widgets in a Hbox and then add them to a Viewport and then to a ScrolledWindow. However this will not work how I want. Scrolling from the scrollbar will work. But actions occurring in the TextView wont change the scroll position. (arrow keys, page up, page down etc) and I also can't programatically change the scrolling with TextView.ScrollToMark and other other

Newbie Question: GTK# (Mono) on OSX

佐手、 提交于 2019-12-12 09:37:29
问题 I am taking my first steps (or perhaps my last steps) in GTK# on Mono for OSX. I write a .cs file and then try to compile with mono: gmcs -pkg:gtk-sharp-2.0 one.cs this results in this message error CS8027: Couldn't run pkg-config: ApplicationName='pkg-config', CommandLine='--libs gtk-sharp-2.0', CurrentDirectory='' Which would, apparently, require me to know what I'm doing. I do know that Mono's Installer for MacOS X comes with Gtk+ and Gtk# so you can start building and running cross