Questions tagged [gtkd]

Gtkd is a D binding and OO wrapper for the GTK+ toolkit.

Gtkd is a binding and object-oriented wrapper of the GTK+ widget toolkit for the D programming language.

37 questions
2
votes
1 answer

gtkd addOnClicked/g_signal_connect fails

I am looking to set up a button that loads function "NewItem" when the button is pressed. When I attempt to compile, I get the message: ./test.d:20: Error: function gtk.Button.Button.addOnClicked (void delegate(Button) dlg, GConnectFlags…
user3529893
  • 109
  • 6
2
votes
1 answer

Key Input using GtkD

I'm a beginner of both gtk and GtkD. Now, I'm trying to get input from keyboard with reference to this . But, It seems that three years have made some changes in Toolkits. I wrote code below. However, I got strange values of ev in callback function.…
ggkuron
  • 45
  • 1
  • 6
2
votes
2 answers

GtkD (the Gtk+bindings for the D language) why compile it?

I've recently been using GtkD with the D programming language to create native applications. I've downloaded all the necessary files and got everything running so i can now compile and produce sample apps. My question is that in some of the guides…
Gary Willoughby
  • 50,926
  • 41
  • 133
  • 199
2
votes
2 answers

gtkentry focus behaviour

Is there any existing mechanism for a GtkEntry to simply position the cursor at the end of the text when focused, rather than selecting its contents to be overwritten by the next key? It seems odd to have to add a signal handler to do something this…
Martin DeMello
  • 11,876
  • 7
  • 49
  • 64
1
vote
0 answers

GtkD on Linux - Segmentation Fault error runnig "HelloWorld"

I am trying to compile and run a "Hello World" GtkD application on Linux. I followed this guide: https://forum.gtkd.org/groups/GtkD/thread/1122/ Installed dmd compiler and gtkd3 with: sudo snap install --classic dmd sudo apt-get install…
marfalk20
  • 11
  • 2
1
vote
1 answer

SHIFT-F6 as menu shortcut

In my current code I have the code MenuItem runFileItem = new MenuItem( (MenuItem mi) => pm.runFile(), "_Run file", "activate", true, accelGroup, 'r', ModifierType.CONTROL_MASK | ModifierType.SHIFT_MASK, AccelFlags.VISIBLE); which…
DejanLekic
  • 18,787
  • 4
  • 46
  • 77
1
vote
1 answer

Why isn't Gtk Filechooser Button selecting any file in my flatpak build?

I have a file chooser button that triggers a change in the titlebar whenever a file is selected with it. And it seems to work fine in my non-flatpak build. import gtk.Application : Application; import gtk.ApplicationWindow :…
noconst
  • 639
  • 4
  • 15
1
vote
1 answer

Is there in D with GtkD an ObjectAttribute, e.g [UI] like in C#?

I had last used Mono (C#) with GTK, there is it possible to use ObjectAttributes. Is there in D with GtkD and Glade an ObjectAttribute, e.g [UI] like in C#? For example like: [UI] Gtk.Button button1; [UI] Gtk.Label label1; I did not understand the…
NiRu
  • 65
  • 4
1
vote
2 answers

GTK: How to ignore "can't open display" errors?

I have written some GTK programs using the gtkD bindings for the D programming language that are otherwise console apps, but are capable of displaying plots on the screen and saving them to a file. I'd like to run these on a machine that I only…
dsimcha
  • 67,514
  • 53
  • 213
  • 334
1
vote
1 answer

How to use gtkd on linux

I am trying to compile a hello world program using the gtkd library. I am using the dmd compiler (installed into my ~/ directory) and I have already checked that the compiler works flawlessly. Just in case, here is my source code: //pragma(lib,…
eralus
  • 13
  • 4
1
vote
1 answer

Plot2kill won't compile on Manjaro Linux

I'm trying to follow the instructions for compiling Plot2kill as given here. I used yaourt to install GtkD, so I know I definitely have the library. However, when I try dmd -lib -ofplot2kill.lib -O -inline -release *.d I get the following error…
Koz Ross
  • 3,040
  • 2
  • 24
  • 44
1
vote
1 answer

GtkD undefined reference

My code: import gtk.MainWindow; import gtk.Main; void main(string[] args) { Main.init(args); auto win=new MainWindow("Hello World"); win.setDefaultSize(200,100); win.showAll(); Main.run(); } When I try to compile with DMD (or…
user3529893
  • 109
  • 6
1
vote
1 answer

What is required to compile a simple gtk D application

I'm just getting started in D and am following the examples on dsource.org Specifically this one: http://www.dsource.org/projects/gtkd/wiki/CodeExamples which is a simple gtk program. As I am using fedora I installed gtkd and gtkd-devel using yum…
samael
  • 2,007
  • 1
  • 16
  • 34
1
vote
1 answer

D lang work with Gtk

I have trouble with gtk: I cloned from git: https://github.com/gtkd-developers/GtkD.git make & sudo make install added -I/usr/local/include/d to /etc/dmd.conf dmd main.d Code: //main.d import gtk.Main; import gtk.MainWindow; void main(string[]…
lito
  • 989
  • 8
  • 21
1
vote
2 answers

gtkd performance issue when adding a lot of textviews at once

Here's a minimal example to illustrate the problem. When the button is clicked, 500 TextView objects should get added, each containing some text. What actually happens is that there is a short delay, 500 empty TextViews get added, there is a much…
Martin DeMello
  • 11,876
  • 7
  • 49
  • 64