Am Sat, 05 Aug 2017 20:17:23 +
schrieb bitwise :
> virtual DString getTitle() const {
> DString ret;
> ret.length = GetWindowTextLength(_hwnd) + 1;
> ret.ptr = (const char*)gc_malloc(ret.length, 0xA, NULL);
> GetWindowText(_hwnd,
On Sunday, 6 August 2017 at 02:32:05 UTC, Adam D. Ruppe wrote:
On Sunday, 6 August 2017 at 02:19:19 UTC, FoxyBrown wrote:
Also, does it do the allocation at compile time(reserve space
on the stack for the variable along with all the others or
does it "allocate" space on the stack at
On Sunday, 6 August 2017 at 02:19:19 UTC, FoxyBrown wrote:
Also, does it do the allocation at compile time(reserve space
on the stack for the variable along with all the others or does
it "allocate" space on the stack at runtime?... which is
slightly slower).
compile time. It works like a
On Sunday, 6 August 2017 at 02:10:31 UTC, Moritz Maxeiner wrote:
On Sunday, 6 August 2017 at 01:18:50 UTC, Johnson Jones wrote:
On Saturday, 5 August 2017 at 23:09:09 UTC, Moritz Maxeiner
wrote:
On Saturday, 5 August 2017 at 17:08:32 UTC, Johnson Jones
wrote:
using gtk, it has a type called
On Sunday, 6 August 2017 at 01:18:50 UTC, Johnson Jones wrote:
On Saturday, 5 August 2017 at 23:09:09 UTC, Moritz Maxeiner
wrote:
On Saturday, 5 August 2017 at 17:08:32 UTC, Johnson Jones
wrote:
using gtk, it has a type called value. One has to use it to
get the value of stuff but it is a
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 enter and leave are not paired equally is
On Saturday, 5 August 2017 at 23:09:09 UTC, Moritz Maxeiner wrote:
On Saturday, 5 August 2017 at 17:08:32 UTC, Johnson Jones wrote:
using gtk, it has a type called value. One has to use it to
get the value of stuff but it is a class. Once it is used, one
doesn't need it.
Ideally I'd like to
On Saturday, 5 August 2017 at 20:11:27 UTC, Matthew Remmel wrote:
On Saturday, 5 August 2017 at 18:26:10 UTC, Kreikey wrote:
On Saturday, 5 August 2017 at 15:33:57 UTC, Matthew Remmel
I'm annoyed that I didn't think of trying to cast it. That
works great if the value exists in the enum. It
On Saturday, 5 August 2017 at 17:08:32 UTC, Johnson Jones wrote:
using gtk, it has a type called value. One has to use it to get
the value of stuff but it is a class. Once it is used, one
doesn't need it.
Ideally I'd like to treat it as a struct since I'm using it in
a delegate I would like
On Saturday, 5 August 2017 at 20:17:23 UTC, bitwise wrote:
I have a Windows native window class in C++, and I need a
function to return the window title.
[...]
As long as you have a reachable reference to the GC memory
SOMEWHERE, the GC won't reclaim it. It doesn't have to be on the
stack
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 Pixbuf(r"C:\\a.jpg");
```
Thanks. Why
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
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:
On Saturday, 5 August 2017 at 17:08:32 UTC, Johnson Jones wrote:
using gtk, it has a type called value. One has to use it to get
the value of stuff but it is a class. Once it is used, one
doesn't need it.
Ideally I'd like to treat it as a struct since I'm using it in
a delegate I would like
I have a Windows native window class in C++, and I need a
function to return the window title.
So in D, I have this:
// isn't D's ABI stable enough to just return this from C++
// and call it a string in the extern(C++) interface? anyways..
struct DString
{
size_t length;
On Saturday, 5 August 2017 at 18:26:10 UTC, Kreikey wrote:
On Saturday, 5 August 2017 at 15:33:57 UTC, Matthew Remmel
wrote:
I feel like I'm missing something, but there has to be an
easier way to convert a value into an enum than switching over
every possible value: i.e
[...]
Capitals c =
On Saturday, 5 August 2017 at 19:19:06 UTC, Simon Bürger wrote:
On Saturday, 5 August 2017 at 18:54:22 UTC, ikod wrote:
Maybe std.functional.partial can help you.
Nope.
int i = 1;
alias dg = partial!(writeln, i);
i = 2;
dg();
still prints '2' as it should
On Saturday, 5 August 2017 at 18:54:22 UTC, ikod wrote:
Maybe std.functional.partial can help you.
Nope.
int i = 1;
alias dg = partial!(writeln, i);
i = 2;
dg();
still prints '2' as it should because 'partial' takes 'i' as a
symbol, which is - for this
On Saturday, 5 August 2017 at 18:54:22 UTC, ikod wrote:
On Saturday, 5 August 2017 at 18:45:34 UTC, Simon Bürger wrote:
On Saturday, 5 August 2017 at 18:22:38 UTC, Stefan Koch wrote:
[...]
No, sometimes I want i to be the value it has at the time the
delegate was defined. My actual usecase
On Saturday, 5 August 2017 at 18:45:34 UTC, Simon Bürger wrote:
On Saturday, 5 August 2017 at 18:22:38 UTC, Stefan Koch wrote:
[...]
No, sometimes I want i to be the value it has at the time the
delegate was defined. My actual usecase was more like this:
void delegate()[3] dgs;
On Saturday, 5 August 2017 at 18:22:38 UTC, Stefan Koch wrote:
On Saturday, 5 August 2017 at 18:19:05 UTC, Stefan Koch wrote:
On Saturday, 5 August 2017 at 18:17:49 UTC, Simon Bürger wrote:
If a lambda function uses a local variable, that variable is
captured using a hidden this-pointer. But
On Saturday, 5 August 2017 at 18:17:49 UTC, Simon Bürger wrote:
If a lambda function uses a local variable, that variable is
captured using a hidden this-pointer. But this capturing is
always by reference. Example:
int i = 1;
auto dg = (){ writefln("%s", i); };
i = 2;
dg(); //
On Saturday, 5 August 2017 at 15:33:57 UTC, Matthew Remmel wrote:
I feel like I'm missing something, but there has to be an
easier way to convert a value into an enum than switching over
every possible value: i.e
[...]
Capitals c = cast(Capitals)"Chicago";
writeln(c);// Illinois
On Saturday, 5 August 2017 at 18:19:05 UTC, Stefan Koch wrote:
On Saturday, 5 August 2017 at 18:17:49 UTC, Simon Bürger wrote:
If a lambda function uses a local variable, that variable is
captured using a hidden this-pointer. But this capturing is
always by reference. Example:
int i = 1;
On Saturday, 5 August 2017 at 18:17:49 UTC, Simon Bürger wrote:
If a lambda function uses a local variable, that variable is
captured using a hidden this-pointer. But this capturing is
always by reference. Example:
int i = 1;
auto dg = (){ writefln("%s", i); };
i = 2;
dg(); //
If a lambda function uses a local variable, that variable is
captured using a hidden this-pointer. But this capturing is
always by reference. Example:
int i = 1;
auto dg = (){ writefln("%s", i); };
i = 2;
dg(); // prints '2'
Is there a way to make the delegate "capture by
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 at
least be able to set coordinates
On 08/05/2017 07:05 PM, ag0aep6g wrote:
E enumFromValue(E)(string s)
The type of `s` should probably be a template parameter as well.
On 08/05/2017 05:33 PM, Matthew Remmel wrote:
I feel like I'm missing something, but there has to be an easier way to
convert a value into an enum than switching over every possible value: i.e
enum Capitals {
Indiana = "Indianapolis",
Illinois = "Chicago",
Ohio = "Columbus"
}
using gtk, it has a type called value. One has to use it to get
the value of stuff but it is a class. Once it is used, one
doesn't need it.
Ideally I'd like to treat it as a struct since I'm using it in a
delegate I would like to minimize unnecessary allocations. Is
there any way to get D to
On Saturday, 5 August 2017 at 15:42:53 UTC, Rene Zwanenburg wrote:
On Saturday, 5 August 2017 at 15:33:57 UTC, Matthew Remmel
wrote:
Any ideas?
You can use to! in std.conv:
import std.stdio;
import std.conv;
enum Foo
{
A = "A",
B = "B"
}
void main()
{
On Friday, 4 August 2017 at 20:38:16 UTC, Steven Schveighoffer
wrote:
On 8/4/17 4:16 PM, Jeremy DeHaan wrote:
I'm trying to do some binding code, and I know that C++ bool
isn't defined to be a specific size like D's bool. That said,
can I assume that the two are the same size on the most
On Saturday, 5 August 2017 at 15:23:15 UTC, Johnson Jones wrote:
I am trying to set positions of widgets automatically. e.g., I
have a paned widget and I to set the position of the handle
manually based on a percentage of the window. e.g., 0.5 will
set the handle midway and both children will
On Saturday, 5 August 2017 at 15:42:53 UTC, Rene Zwanenburg wrote:
On Saturday, 5 August 2017 at 15:33:57 UTC, Matthew Remmel
wrote:
Any ideas?
You can use to! in std.conv:
import std.stdio;
import std.conv;
enum Foo
{
A = "A",
B = "B"
}
void main()
{
thank you everybody for your time to answer my questions.
On Saturday, 5 August 2017 at 07:10:50 UTC, aberba wrote:
The DlangUI docs has you covered with everything you need to
set it up both on the github README file or the github wiki.
Its just:
dub init PROJECT_NAME dlangui
This will create project and add dlangui as dependency.
Creating a
On Saturday, 5 August 2017 at 15:33:57 UTC, Matthew Remmel wrote:
Any ideas?
You can use to! in std.conv:
import std.stdio;
import std.conv;
enum Foo
{
A = "A",
B = "B"
}
void main()
{
writeln("A".to!Foo);
}
On Saturday, 5 August 2017 at 15:33:57 UTC, Matthew Remmel wrote:
I feel like I'm missing something, but there has to be an
easier way to convert a value into an enum than switching over
every possible value: i.e
[...]
What you want is already in the standard library.
std.conv.to can
On Saturday, 5 August 2017 at 15:19:43 UTC, Gerald wrote:
On Saturday, 5 August 2017 at 15:08:21 UTC, Johnson Jones wrote:
I am trying to get the handle size of panned. Not sure if I'm
doing it right but
[...]
I'm using this in Tilix:
Value handleSize = new Value(0);
I feel like I'm missing something, but there has to be an easier
way to convert a value into an enum than switching over every
possible value: i.e
enum Capitals {
Indiana = "Indianapolis",
Illinois = "Chicago",
Ohio = "Columbus"
}
Capitals enumFromValue(string s) {
switch (s)
I am trying to set positions of widgets automatically. e.g., I
have a paned widget and I to set the position of the handle
manually based on a percentage of the window. e.g., 0.5 will set
the handle midway and both children will have the same height. I
0.2 will set it to to 20%.
I want it to
On Saturday, 5 August 2017 at 15:08:21 UTC, Johnson Jones wrote:
I am trying to get the handle size of panned. Not sure if I'm
doing it right but
[...]
I'm using this in Tilix:
Value handleSize = new Value(0);
paned.styleGetProperty("handle-size", handleSize);
I am trying to get the handle size of panned. Not sure if I'm
doing it right but
Value value = new Value();
paned.getProperty("handle-size", value);
GLib-GObject-CRITICAL **: g_object_get_property: assertion
'G_IS_VALUE (value)' failed
or I get stuff like
GLib-GObject-WARNING **:
On Wednesday, 5 July 2017 at 16:04:16 UTC, Jolly James wrote:
On Wednesday, 5 July 2017 at 15:56:45 UTC, Igor Shirkalin wrote:
On Wednesday, 5 July 2017 at 15:48:14 UTC, Jolly James wrote:
On Wednesday, 5 July 2017 at 15:44:47 UTC, Igor Shirkalin
wrote:
On Wednesday, 5 July 2017 at 15:30:08
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
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: "C:a.jpg".
And a.jpg is not a
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
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
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
On 2017-08-01 17:45, ashit wrote:
thank you James
i should try that.
i was always enjoy the pure and efficiency of C. that made me stubborn
to learn java.
Just to be clear, there's no Java code in DWT. Everything is ported to D.
--
/Jacob Carlborg
On Thursday, 3 August 2017 at 10:02:19 UTC, ashit wrote:
On Tuesday, 1 August 2017 at 16:12:45 UTC, Dukc wrote:
On Tuesday, 1 August 2017 at 15:18:12 UTC, ashit wrote:
i couldn't set control's width and height (Button widget)
shows error. maybe it works a different way.
1. Try
51 matches
Mail list logo