Re: gtkd , addondraw is deprecated

2021-05-21 Thread Mike Wey via Digitalmars-d-learn
On 21-05-2021 12:35, Alain De Vos wrote: What is the advised function to use instead of gtk.Widget.Widget.addOnDraw ? ``` this()     { addOnDraw();} ``` Change the `Context` passed to the drawCallback to a `Scoped!Context` only the non scoped overload is deprecated. ``` bool

Re: GtkD - how to list 0..100K strings

2020-04-26 Thread Mike Wey via Digitalmars-d-learn
On 26-04-2020 10:06, mark wrote: I'm trying to develop an application in GtkD. I need a widget to display a list of strings: there could be anything from 0 to 100K strings, but typically a few hundred or thousand. Using the DemoCustomList as a model I have created this code: ... When

Re: How to compile with GtkD

2020-02-09 Thread Mike Wey via Digitalmars-d-learn
On 09-02-2020 12:52, mark wrote: I am trying to build a simple "hello world" app (from the gtkDcoding blog) in $HOME/app/d/gtktest (which is a dub init created directory) and have this dub.sdl: name "gtktest" description "Gtk Test" authors "Mark" targetType "executable" dependency

Re: Running GtkD programs on macOS

2019-11-29 Thread Mike Wey via Digitalmars-d-learn
On 29-11-2019 04:40, Joel wrote: Oh, I used 'brew install gtk+3', and the test program worked, but (see below) I don't know about all that installing - is that alright? They all look like GTK+ dependencies so that would be alright/ -- Mike Wey

Re: Gtkd and libgtksourceview

2019-10-31 Thread Mike Wey via Digitalmars-d-learn
On 31-10-2019 12:16, Ron Tarrant wrote: On Wednesday, 30 October 2019 at 22:26:41 UTC, Mike Wey wrote: --- girtod -i src --use-runtime-linker --use-bind-dir --- Hmmm... I'll need more information, I'm afraid. I Googled, but I'm not finding any instructions for building these DLLs. girtod

Re: Gtkd and libgtksourceview

2019-10-30 Thread Mike Wey via Digitalmars-d-learn
On 30-10-2019 20:17, Ron Tarrant wrote: On Wednesday, 30 October 2019 at 18:00:24 UTC, Mike Wey wrote: GtkSourceview was updated to 4.x in GtkD version 3.9.0, so any older version should work with GtkSourceview 3. Welcome back, Mike... Thanks. The latest Windows runtime available on the

Re: Gtkd and libgtksourceview

2019-10-30 Thread Mike Wey via Digitalmars-d-learn
On 30-10-2019 15:48, bioinfornatics wrote: Dear, I tried the latest gtkd release and it try to open dynamically libgtksourceview-4.so.0 however  I have only libgtksourceview-3.so.1 so which version should I used to be compatible with libgtksourceview-3 (I use centos 7) GtkSourceview was

Re: Options for unit testing in D?

2019-06-21 Thread Mike Wey via Digitalmars-d-learn
On 21-06-2019 06:08, Mike Brockus wrote: If you never herd about Meson before: 樂. https://mesonbuild.com/ I am wondering as to what options are available for a Meson build user when unit testing? What I am trying todo is simply rewrite my C17 project reference templates to D versions so I

Re: GtkD slows down visual D keyboard

2019-04-26 Thread Mike Wey via Digitalmars-d-learn
On 26-04-2019 10:31, Amex wrote: When debugging under visual D, the keyboard response is slowed down to the extreme. This is a Gtk issue I believe. It only has to do with the keyboard. For example, if I hit F10 to step, it takes the ide about 10 seconds to "respond" and move to the next

Re: GTK Scale/Volume Buttons Show Muted Icon on Startup

2019-04-25 Thread Mike Wey via Digitalmars-d-learn
On 25-04-2019 15:19, Ron Tarrant wrote: On Thursday, 25 April 2019 at 12:40:00 UTC, number wrote: On Thursday, 25 April 2019 at 11:36:26 UTC, Ron Tarrant wrote: When running this example of a VolumeButton, ... When using `setValue(initialValue)` after `setAdjustment()` the scale seems have

Re: Retrieving Column Data from a ListStore?

2019-04-24 Thread Mike Wey via Digitalmars-d-learn
On 24-04-2019 16:38, Ron Tarrant wrote: Another thing I've been struggling with is fetching data from a TreeIter. Getting the iter itself is no problem, but when it comes to getting the contents of a specific column within the iter, none of the methods I've tried have worked. In fact, it

Re: D threading and shared variables

2019-04-07 Thread Mike Wey via Digitalmars-d-learn
On 07-04-2019 16:49, Archie Allison wrote: The codebase is a reasonable size so too big (and proprietary) to share. It's always run with a GUI (GTKD), it's just the difference in linking so launching (a)GUI + attached console for stdout.writeln vs. (b)just the GUI window. There's nothing I'd

Re: gtkDcoding Blog Post for 2019-03-29 - Grid

2019-04-02 Thread Mike Wey via Digitalmars-d-learn
On 02-04-2019 17:48, Ron Tarrant wrote: On Tuesday, 2 April 2019 at 14:13:09 UTC, number wrote: Can somebody explain why getRgba() (apparently inherited from ColorChooser) does take an out parameter instead of returning an Gdk.RGBA? My understanding is this: Returning an object (as opposed

Re: Request some GtkD Assistance

2019-03-27 Thread Mike Wey via Digitalmars-d-learn
On 27-03-2019 11:01, Andrew Edwards wrote: This would is already included in dlang.conf no? Yes furnishing an explicit path works. dmd -de -w -L/Users/edwarac/dlang/dmd-2.085.0/osx/lib/libgtkd-3.a nufsaid But why do I need to do that if it's sitting right next to phobos and DMD is already

Re: gtkD: How to paint to screen for animation

2019-03-19 Thread Mike Wey via Digitalmars-d-learn
On 19-03-2019 01:54, Michelle Long wrote: I've added a function to addOnDraw for a DrawingArea and it paints using the code I have when I resize. I added a queueDraw in threadsAddIdle and it seems to draws the screen immediately but it does not seem to be called again. If I put queueDraw

Re: problem extracting data from GtkSourceView using Gtkd

2019-01-17 Thread Mike Wey via Digitalmars-d-learn
On 17-01-2019 00:31, Chris Bare wrote: Are the widgets destroyed before onShutdown? The onShutdown callback is run after the GTK main loop terminates, so most objects would be finalized. -- Mike Wey

Re: problem extracting data from GtkSourceView using Gtkd

2019-01-15 Thread Mike Wey via Digitalmars-d-learn
On 14-01-2019 23:52, Chris Bare wrote: I would have posted this in the Gtkd forum, but it has been down for a while. I'm porting a GTK2/C program to Gtkd. I'm trying to read the data from a GtkSourceView, but when I try to get the bounds, it's always zero. Here's the c version that works:  

Re: DMD32 compiling gtkd out of memory on 32bit Windows 7 machine

2018-09-14 Thread Mike Wey via Digitalmars-d-learn
On 9/14/18 4:02 AM, dangbinghoo wrote: thanks timoses , singleFile mode works for building, but when linking, I got this: -- OPTLINK (R) for Win32  Release 8.00.17 Copyright (C) Digital Mars 1989-2013  All rights reserved. http://www.digitalmars.com/ctg/optlink.html OPTLINK :

Re: Load D shared library on windows x64

2018-08-18 Thread Mike Wey via Digitalmars-d-learn
On 18-08-18 02:31, Tofu Ninja wrote: On Friday, 17 August 2018 at 20:27:05 UTC, Tofu Ninja wrote: Its this part that fails... always returns null HMODULE h = cast(HMODULE) Runtime.loadLibrary(dllName); if (h is null) { writeln("error loading"); return; } I there any way to see why

Re: Elegant way to use dynamic bindings

2018-02-09 Thread Mike Wey via Digitalmars-d-learn
On 09-02-18 15:04, Dennis wrote: I read the Derelict documentation a while ago, I didn't grasp all of it. Reading it again, I can now make sense of it though. :) On Friday, 9 February 2018 at 12:53:44 UTC, Mike Parker wrote: Did you link with the library you created with implib? That linker

Re: What's the proper way to use std.getopt?

2017-12-12 Thread Mike Wey via Digitalmars-d-learn
On 12-12-17 00:35, Seb wrote: D style would be to use sth. like this (instead of try/catch): ``` scope(failure) {   e.msg.writeln;   1.exit; } ``` I might have missed something, but where is `e` defined in this case? -- Mike Wey

Re: What's the proper way to use std.getopt?

2017-12-11 Thread Mike Wey via Digitalmars-d-learn
On 11-12-17 21:58, Jordi Gutiérrez Hermoso wrote: but instead, the docstring from getopt is only generated if all arguments are valid, i.e. when it's the least needed because the user already knew what to input. What's the proper style, then? Can someone show me a good example of how to use

Re: .LIB pagesize exceeds 512

2017-12-10 Thread Mike Wey via Digitalmars-d-learn
On 10-12-17 16:57, user wrote: Could someone please list some workarounds? I am trying to compile a demo app from gtkd. I tried compiling gtkd using dub with --build=plain option and still got that error when compiling the demo app. Using the latest dmd. Thanks in advance. As far as i

Re: Email validation

2017-11-28 Thread Mike Wey via Digitalmars-d-learn
On 28-11-17 20:32, Vino wrote: On Tuesday, 28 November 2017 at 18:51:50 UTC, Rene Zwanenburg wrote: On Tuesday, 28 November 2017 at 18:47:06 UTC, Vino wrote: Hi All, You can do this easily using the std.net.isemail module: https://dlang.org/phobos/std_net_isemail.html Hi Rene,  Can you

Re: GtkD help

2017-11-19 Thread Mike Wey via Digitalmars-d-learn
On 18-11-17 22:57, Ivan Trombley wrote: I have this small application for viewing select log data from a certain game that I originally wrote in C++/Qt. For various reasons, I decided to rewrite this app in D using gtk-d. First, I have to say that the documentation for gtk-d is atrocious!

Re: Unable to compile GtkD on windows

2017-11-15 Thread Mike Wey via Digitalmars-d-learn
On 15-11-17 20:25, user wrote: I tried compiling GtkD, I get the error message: rdmd Build.d Error: more than 32767 symbols in object file 1. How to work around this? 2. Is D still unfriendly to newbies? I am disappoint :-( Using: DMD 2.077 GtkD 3.7.1 gtk3-runtime_3.22.24-1, 32bit It

Re: opCast fails when this is null.

2017-10-28 Thread Mike Wey via Digitalmars-d-learn
On 28-10-17 16:22, Nicholas Wilson wrote: On Saturday, 28 October 2017 at 14:19:01 UTC, Nicholas Wilson wrote: As Basile mentioned, this is compiler sticking checks in behind your back. The reason it works on new LDC is because #6982 was cherry picked to LDC (1.3?) before it was merged into

opCast fails when this is null.

2017-10-28 Thread Mike Wey via Digitalmars-d-learn
The following code runs correctly when compiled with ldc (1.4.0) but fails with an assert error when compiled with dmd (2.076 and ldc 1.2.0) ``` class A { } class B { T opCast(T)() { return this; } } void main() { A a = null; B b =

Re: Best way to display images with GTKD

2017-10-01 Thread Mike Wey via Digitalmars-d-learn
On 01-10-17 01:56, Psychological Cleanup wrote: I have to display images with a few controls: alpha channel, rotation, scaling, cropping. Generally it should be png but I want to be able to handle many images. The images will be memory based(I'll load the file in to memory then) and will be

Re: Creating a dynamic library

2017-09-30 Thread Mike Wey via Digitalmars-d-learn
On 30-09-17 03:27, Tony wrote: One thing I picked up from SCons is creating dynamic object files with a .os extension and static object files with the standard .o extension. That way they can be compiled in the same directory in the same build step. But dmd rejects the files that are named

Re: how to build project with locally compiled phobos

2017-09-23 Thread Mike Wey via Digitalmars-d-learn
On 23-09-17 13:58, Mengu wrote: hi all i've successfully compiled phobos master with gmake on freebsd. (make fails, i've no clue at all as to why) how do i compile my project now against my local phobos with dub? with plain dmd? i tried (in dub.sdl): - full path to new libphobos.so with

Re: Gtk toArray List funkiness

2017-09-17 Thread Mike Wey via Digitalmars-d-learn
On 16-09-17 23:08, Joseph wrote: On Saturday, 16 September 2017 at 20:54:21 UTC, Mike Wey wrote: On 16-09-17 20:58, Joseph wrote: https://github.com/gtkd-developers/GtkD/blob/master/demos/gtkD/TestWindow/TestWindow.d has the code foreach ( int i, string selection ; fs.getSelections()) {

Re: Gtk toArray List funkiness

2017-09-16 Thread Mike Wey via Digitalmars-d-learn
On 16-09-17 20:58, Joseph wrote: https://github.com/gtkd-developers/GtkD/blob/master/demos/gtkD/TestWindow/TestWindow.d has the code foreach ( int i, string selection ; fs.getSelections()) {   writeln("File(s) selected [%d] %s",i,selection); } which is invalid for the demo, but foreach

Re: How to get DnD to work in GTKD?

2017-09-16 Thread Mike Wey via Digitalmars-d-learn
On 16-09-17 06:33, Joseph wrote: I've used null in place of [te]. I'm not sure what target entry is for and if that is the problem or what. I am trying to drag files from windows explorer to a grid or label(I duplicated the code above for the label) and none the callbacks are ever called. I

Re: GtkD mouse latency issues

2017-09-11 Thread Mike Wey via Digitalmars-d-learn
On 11-09-17 06:29, Joseph wrote: I have a GTK paned element and when I click to drag the handler, it does not respond immediately. I have to hold the left mouse button down for about 1 second and not move it before it "catches" and lets me drag, else I does not move. I'm using Glade and the

Re: vibed services stop response after several days of work

2017-09-01 Thread Mike Wey via Digitalmars-d-learn
On 01-09-17 10:01, Suliman wrote: I got same problem on Windows Server 2016 and on Linux Debian 8.5. I have few very simple backend based on vibed 0.8.1, compiler dmd 2.075.1. nginx servise is do port forwarding. Nothing more is used. After several days of working I am begining to get "502 Bad

Re: Building (and including libraries) without dub

2017-08-26 Thread Mike Wey via Digitalmars-d-learn
On 26-08-17 12:02, drug wrote: 26.08.2017 12:03, Hasen Judy пишет: Building simple programs without dub is easy, just pass a list of .d source files to `dmd` or `ldc2`. What if I want to include a 3rd party library? Surely before dub existed, people were incorporating other libraries in

Re: GStreamer issues.

2017-08-22 Thread Mike Wey via Digitalmars-d-learn
On 22-08-17 02:13, Johnson wrote: I can't get the example to work(although slightly modified). The installed version of GStreamer is 1.12.2 The file is: D:\temp\test.ogg Loading Setting to PLAYING. Running. XError: Could not demultiplex stream. dbug: gstoggdemux.c(4418):

Re: GtkD: New widget

2017-08-22 Thread Mike Wey via Digitalmars-d-learn
On 22-08-17 01:38, Johnson wrote: On Monday, 21 August 2017 at 20:54:04 UTC, Mike Wey wrote: On 21-08-17 03:45, Johnson Jones wrote: [...] If you want gtk to know about the functions you override you could use gtkd.Implement.ImplementCLass. [...] Thanks, I'll test it out when I get a

Re: GtkD: New widget

2017-08-21 Thread Mike Wey via Digitalmars-d-learn
On 21-08-17 03:45, Johnson Jones wrote: Hey Mike, I bet you can answer this! I'd like to extend a widget to add some functionality. class MyBox : Box { protected GtkBox* gtkBox; import std.typecons; _gtk.Box Wrapped; mixin Proxy!Wrapped; public this(Box b) {

Re: GtkD: Build script

2017-08-20 Thread Mike Wey via Digitalmars-d-learn
On 20-08-17 20:41, Johnson Jones wrote: I guess I see why now you did what you did! ;) .LIB pagesize exceeds 512 https://issues.dlang.org/show_bug.cgi?id=15418 Wanna take bets on how many *years* this takes to get fixed?!? That one happens when GtkD is build with debug symbols. The main

Re: Module Info error

2017-08-19 Thread Mike Wey via Digitalmars-d-learn
On 19-08-17 04:07, Johnson Jones wrote: Still getting this! What I don't understand is why I can import certain libraries and they compile fine while others don't! So, moduleInfo is a "function" per module that is created at compilation, right? If one doesn't compile the module then the

Re: GtkD on android

2017-08-19 Thread Mike Wey via Digitalmars-d-learn
On 19-08-17 01:55, Johnson wrote: Hey Mike, have you put in thought or effort in to getting GtkD working on android? e.g., https://github.com/eugals/GTKAndroid/wiki/Building If I get around to it and no one has beating me before, I will try to compile something like the above and get the

Re: GtkD: How to respond to cell edit's?

2017-08-18 Thread Mike Wey via Digitalmars-d-learn
On 18-08-17 02:30, Johnson Jones wrote: On Friday, 18 August 2017 at 00:27:05 UTC, Johnson Jones wrote: I should also mention that when I use an ID to do what I want(again, something I don't want to do), I also need to get the column that was edited. This is because I'm using one delegate for

Re: Fix gtkD api display

2017-08-10 Thread Mike Wey via Digitalmars-d-learn
On 10-08-17 15:57, Adam D. Ruppe wrote: On Saturday, 5 August 2017 at 14:02:09 UTC, Mike Wey wrote: One issue is the shear size of the generated documentation, though the current version of ddox no longer generates a ton of unused files bringing the size down from 15-20GB to a mere 2GB.

Re: gtkD window centering message up and no app on taskbar

2017-08-10 Thread Mike Wey via Digitalmars-d-learn
On 09-08-17 23:54, Johnson Jones wrote: Ok, I added import core.sys.windows.winuser; __gshared extern(C) core.sys.windows.winuser.HANDLE function(GdkWindow*) gdk_win32_window_get_handle; Linker.link(gdk_win32_window_get_handle, "gdk_win32_window_get_handle", LIBRARY_GDK); to

Re: gtkD window centering message up and no app on taskbar

2017-08-09 Thread Mike Wey via Digitalmars-d-learn
On 09-08-17 01:00, Johnson Jones wrote: But, finally, this does seem to work: // Fixup missing taskbar icon void SetTaskBarIcon(gtk.ApplicationWindow window) { version(Windows) version(X86) { import core.sys.windows.winuser, gdk.Window; auto

Re: gtkD window centering message up and no app on taskbar

2017-08-08 Thread Mike Wey via Digitalmars-d-learn
On 07-08-17 23:52, Johnson Jones wrote: On Monday, 7 August 2017 at 20:57:08 UTC, Mike Wey wrote: On 07-08-17 22:46, Johnson Jones wrote: [...] This appears to be a GTK issue, a work around might be to get the Window handle from gtk and use the Windows API to set the taskbar visibility.

Re: gtkD: events being triggered twice

2017-08-07 Thread Mike Wey via Digitalmars-d-learn
On 06-08-17 21:27, FoxyBrown wrote: On Sunday, 6 August 2017 at 18:26:20 UTC, Mike Wey wrote: On 06-08-17 16:58, FoxyBrown wrote: I don't really(my code is a bit more complex) but basically all it boils down to is a UI with some nested widgets (an overlay, an box, and a box and one contains

Re: gtkD window centering message up and no app on taskbar

2017-08-07 Thread Mike Wey via Digitalmars-d-learn
On 07-08-17 22:46, Johnson Jones wrote: On Saturday, 5 August 2017 at 20:56:10 UTC, Mike Wey wrote: Windows will only show the taskbar icon if you are not running the application from the console. Now in x64 it is showing, not in x86. So, not sure what's going on but at least it is

Re: gtkD: events being triggered twice

2017-08-06 Thread Mike Wey via Digitalmars-d-learn
On 06-08-17 16:58, FoxyBrown wrote: I don't really(my code is a bit more complex) but basically all it boils down to is a UI with some nested widgets (an overlay, an box, and a box and one contains the eventbox which I added those callbacks on. I think that something like

Re: gtkD: events being triggered twice

2017-08-06 Thread Mike Wey via Digitalmars-d-learn
On 06-08-17 03:25, Johnson Jones wrote: GtkEventBox - Enter GtkEventBox - Enter Down GtkEventBox - Leave Up GtkEventBox - Leave GtkEventBox - Leave That is when I move the mouse over the event box then click then move out out then release. I would expect Enter Down Leave Up The fact that

Re: gtkD load images

2017-08-06 Thread Mike Wey via Digitalmars-d-learn
On 05-08-17 22:59, ag0aep6g wrote: On 08/05/2017 10:30 PM, Mike Wey wrote: On 05-08-17 15:23, Johnson Jones wrote: On Saturday, 5 August 2017 at 12:51:13 UTC, Mike Wey wrote: [...] There are two issues here, you need to properly escape the slash: "C:a.jpg". [...] ``` Pixbuf p = new

Re: gtkD window centering message up and no app on taskbar

2017-08-05 Thread Mike Wey via Digitalmars-d-learn
On 05-08-17 20:14, Johnson Jones wrote: When trying to center the window. If one uses ALWAYS_CENTERED any resizing of the window is totally busted. CENTER also does not work. move(0,0) seems to not be relative to the main display. I'd basically like to center the window on the main display or

Re: gtkD load images

2017-08-05 Thread Mike Wey via Digitalmars-d-learn
On 05-08-17 15:23, Johnson Jones wrote: On Saturday, 5 August 2017 at 12:51:13 UTC, Mike Wey wrote: On 03-08-17 21:56, Johnson Jones wrote: If I do something like import gdkpixbuf.Pixbuf; Pixbuf.newFromResource("C:\\a.jpg"); There are two issues here, you need to properly escape the slash:

Re: Fix gtkD api display

2017-08-05 Thread Mike Wey via Digitalmars-d-learn
On 04-08-17 17:24, Gerald wrote: On Friday, 4 August 2017 at 15:08:27 UTC, Mike Wey wrote: Improving the documentation is something i want to do but there are always some more important things to do. Like the Questions/Issues you posted earlier. So unless somebody volunteers it won't happen

Re: GtkD custom theme on Windows

2017-08-05 Thread Mike Wey via Digitalmars-d-learn
On 04-08-17 05:06, Andres Clari wrote: I've made a linux program with GtkD, and so far, it's been pretty awesome, however I'm thinking about porting it to Windows also, but the Adwaita theme is too fugly, and cringy, so I'd want to use a compatible theme, which is supposed to be doable. What

Re: gtkD load images

2017-08-05 Thread Mike Wey via Digitalmars-d-learn
On 03-08-17 21:56, Johnson Jones wrote: If I do something like import gdkpixbuf.Pixbuf; Pixbuf.newFromResource("C:\\a.jpg"); There are two issues here, you need to properly escape the slash: "C:a.jpg". And a.jpg is not a resource file, so you would use the Pixbuf constuctor to load an

Re: Bug in gtkd?

2017-08-05 Thread Mike Wey via Digitalmars-d-learn
On 03-08-17 23:11, Johnson Jones wrote: On Thursday, 3 August 2017 at 21:00:17 UTC, Mike Wey wrote: On 03-08-17 22:40, Johnson Jones wrote: Ok, so, I linked the gtk to the msys gtk that I installed before when trying to get glade to work and it worked! seems that msys is much more up to date

Re: Fix gtkD api display

2017-08-04 Thread Mike Wey via Digitalmars-d-learn
On 04-08-17 03:51, Johnson Jones wrote: https://api.gtkd.org It is difficult to navigate. 1. clicking the documentation on the main site takes it to the gtk.AboutDialog api. That is all it shows, I was confused at first, as I'm sure most people would be. 2. The packages list lists all the

Re: Bug in gtkd?

2017-08-03 Thread Mike Wey via Digitalmars-d-learn
On 03-08-17 22:40, Johnson Jones wrote: Ok, so, I linked the gtk to the msys gtk that I installed before when trying to get glade to work and it worked! seems that msys is much more up to date than anything else as it just works(I need to remember than in the future). The problem I see is

Re: Bug in gtkd?

2017-08-03 Thread Mike Wey via Digitalmars-d-learn
On 03-08-17 05:00, Johnson Jones wrote: On Wednesday, 2 August 2017 at 14:51:45 UTC, Mike Wey wrote: On 02-08-17 08:04, Johnson Jones wrote: Ok, Using msys I was able to get glade 3.20 running. Maybe that will fix everything. Great, unfortunately "Use msys2" seems to be the official way to

Re: gtk arch issues(fixed)

2017-08-02 Thread Mike Wey via Digitalmars-d-learn
On 01-08-17 22:50, Johnson Jones wrote: So, the problem is simple(but unfortunately a lot of wasted time). gtkD needs to be updated to work well with x64 and x86. I think all one has to do is be able to specify which path of gtk to use rather than have it search the windows path. While I

Re: Bug in gtkd?

2017-08-02 Thread Mike Wey via Digitalmars-d-learn
On 02-08-17 08:04, Johnson Jones wrote: Ok, Using msys I was able to get glade 3.20 running. Maybe that will fix everything. Great, unfortunately "Use msys2" seems to be the official way to install anything GTK related on windows. -- Mike Wey

Re: custom drawing with gktd?

2017-08-02 Thread Mike Wey via Digitalmars-d-learn
On 02-08-17 08:35, Johnson Jones wrote: I have a need to draw custom objects with gtkD, is this possible? I see that with drawing area one can use cario, and it seems that gtkD supports this. I'd rather use openGL if possible. I see there is a gtkDGL but no reference to how to use it. I need

Re: gtk arch issues

2017-08-01 Thread Mike Wey via Digitalmars-d-learn
On 01-08-17 22:16, Johnson Jones wrote: nvm, the file exists. Why it is not being found is unknown. I did some stuff and it says it is not a valid win32, this is using that gtk3 runtime I linked to... says it's x64 version but probably x86. Would be nice if the error message printed the

Re: Bug in gtkd?

2017-08-01 Thread Mike Wey via Digitalmars-d-learn
On 01-08-17 21:44, Johnson Jones wrote: On Tuesday, 1 August 2017 at 15:20:08 UTC, Mike Wey wrote: On 01-08-17 05:53, Johnson Jones wrote: GtkD is currently based on GTK 3 the properties it complains about were removed in GTK 3.0. Which version of glade are you using? The latest: Glade

Re: Bug in gtkd?

2017-08-01 Thread Mike Wey via Digitalmars-d-learn
On 01-08-17 05:53, Johnson Jones wrote: GtkD is currently based on GTK 3 the properties it complains about were removed in GTK 3.0. Which version of glade are you using? -- Mike Wey

Re: gtk arch issues

2017-08-01 Thread Mike Wey via Digitalmars-d-learn
On 01-08-17 01:37, Johnson Jones wrote: So, the question is, is this a gtkd problem or a gtk problem? In either case, what's the way to get them both to work. Do you guys actually test out both versions installed on the same system? Gtk also loads some of it's own libraries at start up

Re: gtk arch issues

2017-07-31 Thread Mike Wey via Digitalmars-d-learn
On 31-07-17 19:53, Johnson Jones wrote: Also, why is gtkD even using gtksharp? That's for mono and .net! We don't. only the (C) Gtk runtime is needed. Where did you see gtksharp? -- Mike Wey

Re: gtk arch issues

2017-07-31 Thread Mike Wey via Digitalmars-d-learn
On 31-07-17 19:16, Johnson Jones wrote: how does one allow both gtk x86 and x64 to work side by side seamlessly? I installed x64 first and it seems, because whatever is using the path to find the gtk runtime, it looks for that first even in x86 build. Seems like gtkd's dll resolution is not

Re: dmd can't build gtk x64

2017-07-29 Thread Mike Wey via Digitalmars-d-learn
On 29-07-17 01:57, FoxyBrown wrote: On Friday, 28 July 2017 at 22:45:58 UTC, FoxyBrown wrote: Error: can't run 'C:\VS\VC\Tools\MSVC\14.10.25017\bin\HostX64\x64', check PATH It is trying to run some x64.exe/com/bat file... why? What is this file? simply doing dmd -m64 build.d Works fine for

Re: GtkD on android?

2017-07-26 Thread Mike Wey via Digitalmars-d-learn
On 25-07-17 20:06, Joakim wrote: On Saturday, 22 July 2017 at 18:59:44 UTC, FoxyBrown wrote: With LDC's new ability to do android/arm, we are missing the ability to do GUI's? Can any of the current D solutions work such as GtkD or QtD? I'm looking for something somewhat lightweight, easy to

Re: GStreamer and D

2017-06-17 Thread Mike Wey via Digitalmars-d-learn
On 06/17/2017 01:34 AM, Jay Norwood wrote: gst_plugin_feature_get_name This is a macro, the alternative: ``` import gobject.Value; Value name; feature.getProperty("name", name); name.getString(); ``` or if you don't want to use GValue. ```

Re: Dub or Dmd trying to use some funny path to find linker.exe

2017-06-10 Thread Mike Wey via Digitalmars-d-learn
On 06/10/2017 07:04 PM, WhatMeWorry wrote: Dub or Dmd dies when it can't find the linker. Like so: C:\Users\kheaser\Git\Delivery\projects\00_01_print_ogl_ver>dub run --arch=x86_64 --force Performing "debug" build using dmd for x86_64. derelict-util 2.0.6: building configuration "library"...

Re: The reason for SIGSEGV function pointer problem

2017-06-07 Thread Mike Wey via Digitalmars-d-learn
On 06/07/2017 06:50 PM, Russel Winder via Digitalmars-d-learn wrote: So why isn't a thing of type check_frontend_t* AFAIK, you would usually translate: typedef int (check_frontend_t*)(void *args, struct dvb_v5_fe_parms *parms); into: alias check_frontend_t = extern(C) int function (void*

Re: gdc and shared objects

2017-06-06 Thread Mike Wey via Digitalmars-d-learn
On 06/06/2017 05:07 PM, Russel Winder via Digitalmars-d-learn wrote: I hope I am just missing an option as everything seems to be there fore this to work. You are missing the `-shared-libphobos` option. -- Mike Wey

Re: D and GDB

2017-06-05 Thread Mike Wey via Digitalmars-d-learn
On 06/05/2017 03:07 AM, H. S. Teoh via Digitalmars-d-learn wrote: It can't be any more trivial than just running ddemangle, which is found in the dlang/tools repo on github. (Arguably this should be shipped by default with dmd... or is it already?) Recent? versions of gdb also support

Re: gtkd build fail on windows with dmd 2.074.0

2017-05-28 Thread Mike Wey via Digitalmars-d-learn
On 05/28/2017 03:30 PM, Mike Wey wrote: On 05/28/2017 03:20 PM, Mike Wey wrote: On 05/27/2017 11:42 PM, greatsam4sure wrote: rdmd Build.d fail on windows with dmd 2.074.0,dmd 2.073.0. it says std.file.FileException@std\file.d(814)gtkd2.obj:The system cannot find the file specifield. I have

Re: gtkd build fail on windows with dmd 2.074.0

2017-05-28 Thread Mike Wey via Digitalmars-d-learn
On 05/28/2017 03:20 PM, Mike Wey wrote: On 05/27/2017 11:42 PM, greatsam4sure wrote: rdmd Build.d fail on windows with dmd 2.074.0,dmd 2.073.0. it says std.file.FileException@std\file.d(814)gtkd2.obj:The system cannot find the file specifield. I have to use dmd 2.071.0 to build it I will

Re: gtkd build fail on windows with dmd 2.074.0

2017-05-28 Thread Mike Wey via Digitalmars-d-learn
On 05/27/2017 11:42 PM, greatsam4sure wrote: rdmd Build.d fail on windows with dmd 2.074.0,dmd 2.073.0. it says std.file.FileException@std\file.d(814)gtkd2.obj:The system cannot find the file specifield. I have to use dmd 2.071.0 to build it I will appreciate your help sorry for the mistake

Re: Get name of current function

2017-04-23 Thread Mike Wey via Digitalmars-d-learn
On 04/23/2017 10:34 PM, Mike B Johnson wrote: I'd like to get the symbolic name of the current function I'm in void foo() { writeln(thisFunc.stringof()); // prints foo } I need something short, elegant and doesn't require modifying preexisting code... I'm sure D has something along those

Re: foreach for string[string]AA

2017-03-02 Thread Mike Wey via Digitalmars-d-learn
On 03/02/2017 09:09 AM, Anton Pastukhov wrote: On Wednesday, 1 March 2017 at 19:26:23 UTC, Mike Wey wrote: On 02/28/2017 07:16 PM, Anton Pastukhov wrote: On Tuesday, 28 February 2017 at 17:16:43 UTC, Daniel Kozák wrote: [...] Thank you for the link, it was informative reading. It's a pity

Re: foreach for string[string]AA

2017-03-01 Thread Mike Wey via Digitalmars-d-learn
On 02/28/2017 07:16 PM, Anton Pastukhov wrote: On Tuesday, 28 February 2017 at 17:16:43 UTC, Daniel Kozák wrote: V Tue, 28 Feb 2017 15:15:00 + Anton Pastukhov via Digitalmars-d-learn napsáno: I can't see the logic in AA foreach order. Consider this

Re: Parsing a UTF-16LE file line by line, BUG?

2017-01-06 Thread Mike Wey via Digitalmars-d-learn
On 01/06/2017 11:33 AM, pineapple wrote: On Friday, 6 January 2017 at 06:24:12 UTC, rumbu wrote: I'm not sure if this works quite as intended, but I was at least able to produce a UTF-16 decode error rather than a UTF-8 decode error by setting the file orientation before reading it.

Re: Gui programing in D

2016-12-27 Thread Mike Wey via Digitalmars-d-learn
On 12/27/2016 01:47 PM, Samson Akomire wrote: I am working with GTKD for GUI Application in D programing language. D programing Language is truly wholesome in all definitions.I have a great difficulty in setting widgets width and height. I will also appreciate any direction to resources to learn

Re: Getting GtkD working with OpenGL

2016-10-06 Thread Mike Wey via Digitalmars-d-learn
On 10/06/2016 05:18 PM, Chalix wrote: On Thursday, 6 October 2016 at 13:35:01 UTC, Mike Parker wrote: So, change DerelictGL3.load to DerelictGL.load, then add a call to DerelictGL.reload after creating and activating the context. Thank you! That fixed the segmentation fault problem and the

Re: Getting GtkD working with OpenGL

2016-10-04 Thread Mike Wey via Digitalmars-d-learn
On 10/03/2016 11:46 PM, Chalix wrote: On Monday, 3 October 2016 at 18:00:53 UTC, Mike Wey wrote: The signal functions can be found in the gobject.Signals module. But you should use the GLArea.addOnCreateContext / addOnRender / addOnResize functions to attach a D delegate to the signal. You

Re: Why using wrappers for D?

2016-10-03 Thread Mike Wey via Digitalmars-d-learn
On 10/03/2016 07:19 PM, Chalix wrote: On Monday, 3 October 2016 at 13:51:28 UTC, Mike Parker wrote: // wrapfoo.d import foo; // import the foo module from above void myFunc(string s) { import std.string : toStringz; my_func(s.toStringz()); } Thank you for the example, Mike! And

Re: Getting GtkD working with OpenGL

2016-10-03 Thread Mike Wey via Digitalmars-d-learn
On 10/03/2016 01:50 PM, Chalix wrote: On Sunday, 18 September 2016 at 21:41:45 UTC, Mike Wey wrote: The demo still uses the old GtkGLExt binding, which usually isn't available in de distributions repositories. The newer GLArea is easier to use since it's part of GTK. As for the linker errors,

Re: Getting GtkD working with OpenGL

2016-09-18 Thread Mike Wey via Digitalmars-d-learn
On 09/18/2016 09:36 PM, Chalix wrote: Hi All! This weekend I explored Dlang and I think it's very promising. So I wanted to create some projects I've created with C++ already - for the sake of comparison. I wanted to create a new class which inherits from DrawingArea (from the Gtk library).

Re: GTKD - CSS class color "flash" delay

2016-06-30 Thread Mike Wey via Digitalmars-d-learn
On 06/30/2016 08:53 AM, TheDGuy wrote: On Wednesday, 29 June 2016 at 10:41:21 UTC, TheDGuy wrote: I tried to debug a little and what i don't understand is, that i get two times 'blue' on the console, even though yellow and blue lit up but yellow stayed at the flash color: private void

Re: GTKD - CSS class color "flash" delay

2016-06-26 Thread Mike Wey via Digitalmars-d-learn
On 06/26/2016 05:03 PM, TheDGuy wrote: On Sunday, 26 June 2016 at 12:30:22 UTC, Mike Wey wrote: You should probably increment the index in the timeout_delay function. This leads to a Range violation exception... How about this: private void letButtonsFlash(){ foreach(Button btn;bArr){

Re: GTKD - CSS class color "flash" delay

2016-06-26 Thread Mike Wey via Digitalmars-d-learn
On 06/26/2016 12:10 AM, TheDGuy wrote: On Saturday, 25 June 2016 at 21:57:35 UTC, TheDGuy wrote: But i want to flash (e.g. change the CSS class) the buttons one by one and not all at the sime time? How am i going to do that? Okay, i tried it with a new private int-variable which contains the

Re: GTKD - CSS class color "flash" delay

2016-06-25 Thread Mike Wey via Digitalmars-d-learn
On 06/25/2016 05:26 PM, TheDGuy wrote: On Saturday, 25 June 2016 at 13:01:09 UTC, TheDGuy wrote: Thanks for your answer. I have to pass the Button object to my timeout function to change the CSS class. But how do i do that within the Timeout constructor? I mean: I have to pass my function

Re: GTKD - CSS class color "flash" delay

2016-06-25 Thread Mike Wey via Digitalmars-d-learn
On 06/24/2016 10:03 PM, TheDGuy wrote: On Friday, 24 June 2016 at 16:44:59 UTC, Gerald wrote: Other then the obvious multi-threaded, using glib.Timeout to trigger the reversion of the color change could be an option. http://api.gtkd.org/src/glib/Timeout.html Thanks! I tried this so far:

Re: GTKD - addOnButtonPress faulty?

2016-06-23 Thread Mike Wey via Digitalmars-d-learn
On 06/23/2016 10:30 AM, TheDGuy wrote: Hi, sorry for my next thread but i did encounter a strange behaviour of the "Button.addOnButtnPress" - Event. Sometimes if i click very fast on the GTKD button, it reacts twice! I am working on a small game and i noticed that if i click slowly everything

Re: GTKD - get CSS class for button

2016-06-22 Thread Mike Wey via Digitalmars-d-learn
On 06/22/2016 05:16 PM, TheDGuy wrote: On Wednesday, 22 June 2016 at 13:47:01 UTC, Gerald wrote: On Wednesday, 22 June 2016 at 12:57:51 UTC, TheDGuy wrote: widget.getStyleContext().listClasses() to get a list of all classes assigned to the widget. If you just want to see if a specific class is

Re: GTKD - Attach Button to Grid in specific column and row

2016-06-14 Thread Mike Wey via Digitalmars-d-learn
On 06/14/2016 04:54 PM, TheDGuy wrote: On Saturday, 11 June 2016 at 21:14:43 UTC, Mike Wey wrote: The way GTK manages width and height, usually widgets are given the minimum size they need. So when the button is the only widget in the grid the other rows and columns have a height/width of 0.

Re: GTKD - Attach Button to Grid in specific column and row

2016-06-11 Thread Mike Wey via Digitalmars-d-learn
On 06/11/2016 04:57 PM, TheDGuy wrote: Hi, i am wondering why this code doesn't work, even though i set the column and row position of the button it is always placed at the top left (so basically first row and first column): ... Code ... The way GTK manages width and height, usually

  1   2   >