Re: DMD Deimos || GDC Deimos?

2014-04-26 Thread Mike Wey via Digitalmars-d-learn
On 04/26/2014 08:18 PM, Entry wrote: I'd like to use GLFW from Deimos, but I couldn't get it to work (DMD said it cannot use libglfw.a) and I've read somewhere that only GDC can use these DLLs directly (with a D header, but that's still better than hooking the methods). So do I need GDC for that

Re: Working on a library: request for code review

2014-06-13 Thread Mike Wey via Digitalmars-d-learn
On 06/12/2014 09:30 PM, Rene Zwanenburg wrote: I remember a function which does something like only only + canFind on one go. It would look something like header.colorMapDepth.among(16, 32); but I can't find it right now.. Maybe it was only proposed but never added.

Re: DMD Fails with fPIC error

2014-06-14 Thread Mike Wey via Digitalmars-d-learn
On 06/14/2014 03:58 AM, Reuben wrote: Hi, I'm new to D and am trying to compile a simple hello world program. I get the following error when compiling it: dmd test.d /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../x86_64-pc-linux-gnu/bin/ld:

Re: DMD Fails with fPIC error

2014-06-14 Thread Mike Wey via Digitalmars-d-learn
On 06/14/2014 02:01 PM, Reuben wrote: On Saturday, 14 June 2014 at 10:45:25 UTC, Mike Wey wrote: On 06/14/2014 03:58 AM, Reuben wrote: Depending on the desired behavior you'll need to remove the -shared flag from the configuration or add -defaultlib=:libphobos2.so dmd.conf contains the

Re: DMD Fails with fPIC error

2014-06-15 Thread Mike Wey via Digitalmars-d-learn
On 06/14/2014 06:37 PM, Reuben wrote: It looks like the only difference is which version of Phobos we link. I think the reason for this might be that since my version of gcc is hardened, it uses -fPIE by default for linking.

Re: DMD Fails with fPIC error

2014-06-19 Thread Mike Wey via Digitalmars-d-learn
On 06/18/2014 08:51 AM, Reuben wrote: On Sunday, 15 June 2014 at 09:08:10 UTC, Mike Wey wrote: In that case the static Phobos needs to be build with -fPIC, which currently isn't the case looking at the Ebuild. Compiling DMD with PIC=1 doesn't seem to do the trick. -fPIC is used for the C

Re: Bizarre compile error in GtkD

2014-06-30 Thread Mike Wey via Digitalmars-d-learn
On 06/30/2014 01:32 PM, Chris wrote: Dunno if it's the ResponseType vs GtkResponseType ResponseType is an alias for GtkReponseType, so that isn't the problem. getParentWindow() returns an gdk.Window.Window while the FileChooserDialog constructor expects an gtk.Window.Window. you probably

Re: Thread-safety and lazy-initialization of libraries

2014-06-30 Thread Mike Wey via Digitalmars-d-learn
On 06/30/2014 11:05 PM, bearophile wrote: Sergey Protko: libmpg123 has mpg123_init and mpg123_exit functions, which are not thread-safe, so we should to call them only once per process. Most of useful libraries also has such stuff. But manual initialization is killing all beauty of high-level

Re: Problem Linking Phobos git master

2014-07-05 Thread Mike Wey via Digitalmars-d-learn
On 07/05/2014 12:13 AM, Nordlöw wrote: On Ubuntu 14.04 my git master build script for phobos now fails as below. Why? Help please. /usr/bin/ld points to /usr/bin/ld.bfd on my system Terminal echo and error message follows: ../dmd/src/dmd

Re: What hashing algorithm is used for the D implementation of associative arrays?

2014-08-09 Thread Mike Wey via Digitalmars-d-learn
On 08/09/2014 11:33 AM, Gary Willoughby wrote: What hashing algorithm is used for the D implementation of associative arrays? Where in the D source does the AA code live? Paul Hsieh's SuperFastHash: http://www.azillionmonkeys.com/qed/hash.html The source is here:

Re: What hashing algorithm is used for the D implementation of associative arrays?

2014-08-09 Thread Mike Wey via Digitalmars-d-learn
On 08/09/2014 01:43 PM, Gary Willoughby wrote: On Saturday, 9 August 2014 at 10:28:02 UTC, Mike Wey wrote: Paul Hsieh's SuperFastHash: http://www.azillionmonkeys.com/qed/hash.html Where is this implemented? https://github.com/D-Programming-Language/druntime/blob/master/src/rt/util/hash.d

Re: [dub] Size of executable

2014-11-27 Thread Mike Wey via Digitalmars-d-learn
On 11/27/2014 03:14 PM, Chris wrote: dub says: Compiling using dmd... Linking... I have the exact same setting, I think. I don't build for release with either method. dmd file1.d file2.d file3.d ... (dub compiles the same files, no release build) dub builds with --debug by default. --

Re: Hello World Example with Glade?

2015-09-11 Thread Mike Wey via Digitalmars-d-learn
On 09/11/2015 04:00 PM, Mike McKee wrote: On Friday, 11 September 2015 at 09:07:37 UTC, Jordi Sayol wrote: On there is the "pkg-config" section: I finally got it to compile with your help, guys! :) Here's what I had to type: # dmd test1.d -L-ldl

Re: GTKD Cairo get pixel color

2016-01-04 Thread Mike Wey via Digitalmars-d-learn
I think you are looking for something like this. Context.getTarget will get you the surface the Context is drawing to, this most likely isn't a ImageSurface. So you will need to create an pixbuf from the returned surface, with the Pixbuf you can then get the raw pixel data using

Re: GTKD Cairo get pixel color

2016-01-04 Thread Mike Wey via Digitalmars-d-learn
On 01/04/2016 09:13 PM, TheDGuy wrote: On Monday, 4 January 2016 at 19:27:48 UTC, Mike Wey wrote: I think you are looking for something like this. Context.getTarget will get you the surface the Context is drawing to, this most likely isn't a ImageSurface. So you will need to create an pixbuf

Re: GTKD Cairo get pixel color

2016-01-02 Thread Mike Wey via Digitalmars-d-learn
On 01/02/2016 12:32 AM, TheDGuy wrote: On Friday, 1 January 2016 at 22:00:04 UTC, TheDGuy wrote: On Friday, 1 January 2016 at 19:32:40 UTC, Basile B. wrote: On Wednesday, 30 December 2015 at 23:20:23 UTC, Basile B. wrote: On Wednesday, 30 December 2015 at 20:44:44 UTC, TheDGuy wrote: Hello,

Re: GTKD Cairo get pixel color

2016-01-01 Thread Mike Wey via Digitalmars-d-learn
On 01/01/2016 01:37 PM, TheDGuy wrote: On Wednesday, 30 December 2015 at 23:20:23 UTC, Basile B. wrote: On Wednesday, 30 December 2015 at 20:44:44 UTC, TheDGuy wrote: Hello, is there any way to get the pixel color of a single pixel by x and y coordinates of a context? render to a png back

Re: GTKD Cairo get pixel color

2016-01-05 Thread Mike Wey via Digitalmars-d-learn
On 01/04/2016 11:08 PM, TheDGuy wrote: On Monday, 4 January 2016 at 21:42:16 UTC, Mike Wey wrote: On 01/04/2016 09:13 PM, TheDGuy wrote: [...] I don't have any issues with either getPixelsWithLength and savev. for the savev call there is an missing \ just before test.jpg, but that might be a

Re: GTKD - Get the size of the context

2015-12-26 Thread Mike Wey via Digitalmars-d-learn
On 12/25/2015 11:55 AM, TheDGuy wrote: Hello, i want to draw something to a GTKD context and i need the size of the context in pixel but i don't know how i can get the pixel height and width? Any ideas? With best regards You could try getting the size of the widget the context is referring

Re: GTKD drawing area remains white even SourceRgb is changed

2015-12-28 Thread Mike Wey via Digitalmars-d-learn
On 12/28/2015 12:29 AM, TheDGuy wrote: My code: http://dpaste.com/1X3E1HW i store colors in the accumulator-array and draw them via "cr.rectangle()". Because i have some problems with the code i set the SourceRgb-color to a constant value but if i execute the program, the window remains white.

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

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 - 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 - 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 - 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-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-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-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: Status icon on Linux

2016-02-20 Thread Mike Wey via Digitalmars-d-learn
On 02/20/2016 06:13 AM, Chris Wright wrote: I want a status icon for a Linux application. gtk.StatusIcon notes that it's deprecated (and doesn't work on MATE 1.8.2). What should I be using? The GTK developers have decided that we don't need no status icon, it would presumably mess up there

Re: Status icon on Linux

2016-02-21 Thread Mike Wey via Digitalmars-d-learn
On 02/20/2016 06:32 PM, Gerald wrote: On Saturday, 20 February 2016 at 11:36:11 UTC, Mike Wey wrote: The documentation states we should use notifications, that means i'll probably need to add libnotify bindings to GtkD. Though sending notifications using DBus is also possible.

Re: Where do I learn to use GtkD

2016-04-04 Thread Mike Wey via Digitalmars-d-learn
On 04/04/2016 09:33 PM, Karabuta wrote: On Monday, 14 March 2016 at 03:46:02 UTC, Gerald wrote: On Sunday, 13 March 2016 at 19:53:35 UTC, karabuta wrote: On Sunday, 13 March 2016 at 19:34:36 UTC, WebFreak001 wrote: and in the (not quite complete) documentation you can find widgets you might

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: 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: 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-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: 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: 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: 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: 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: 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: 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: 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: 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

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-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: 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: 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 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: 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: 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-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: 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 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: 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: 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(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: 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: 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: 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 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 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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

  1   2   >