Giter VIP home page Giter VIP logo

gtkd's People

Contributors

deadalnix avatar deviator avatar dlblv avatar dstankovic avatar ffy00 avatar gnunn1 avatar heromyth avatar hugo-dube avatar ibuclaw avatar jonathanballs avatar kirbyfan64 avatar kubo39 avatar marenz avatar martindemello avatar memreflect avatar mikewey avatar olafhering avatar qbazd avatar russel avatar seeschloss avatar shigekikarita avatar singingbush avatar thkoch2001 avatar timotheecour avatar tuxxi avatar valpackett avatar vild avatar ximion avatar yharuhi39 avatar yshui avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gtkd's Issues

Cant build test program

Just tried to compile simple hello world program (from here http://dsource.org/projects/gtkd/wiki/CodeExamples) and got a bunch of linking errors:

[1] rtgbnm@rtgbnm-laptop> dmd gui.d libs/GtkD/install/lib/libgtkd-2.a -Ilibs/GtkD/install/include/d/gtkd-2 -L-ldl -ofhelloworld
libs/GtkD/install/lib/libgtkd-2.a(Loader.o): In function `_D4gtkc6Loader12pLoadLibraryFAyaE4gtkc6Loader4RTLDZPv':
src/gtkc/Loader.d:(.text._D4gtkc6Loader12pLoadLibraryFAyaE4gtkc6Loader4RTLDZPv+0x14): undefined reference to `dlopen'
src/gtkc/Loader.d:(.text._D4gtkc6Loader12pLoadLibraryFAyaE4gtkc6Loader4RTLDZPv+0x1c): undefined reference to `dlerror'
libs/GtkD/install/lib/libgtkd-2.a(Loader.o): In function `_D4gtkc6Loader10pGetSymbolFPvAyaZPv':
src/gtkc/Loader.d:(.text._D4gtkc6Loader10pGetSymbolFPvAyaZPv+0x16): undefined reference to `dlsym'
src/gtkc/Loader.d:(.text._D4gtkc6Loader10pGetSymbolFPvAyaZPv+0x1e): undefined reference to `dlerror'
libs/GtkD/install/lib/libgtkd-2.a(Loader.o): In function `_D4gtkc6Loader14pUnloadLibraryFPvZi':
src/gtkc/Loader.d:(.text._D4gtkc6Loader14pUnloadLibraryFPvZi+0x8): undefined reference to `dlclose'
collect2: ошибка: выполнение ld завершилось с кодом возврата 1
--- errorlevel 1

Im using 32bit Ubuntu 12.10 and latest dmd 2.062 from official site. GtkD version is 2.1.1.

Thanks in advance.

gio.FileMonitor causes GObject errors

If you try to use gio.FileMonitor, you will get GObject errors on most calls of the "changed" callback function, because GtkD always calls getDObject on the other_file parameter in the callback wrapper. This can not work when other_file is NULL (which it is except for MOVED events). I'd propose either handling this as a special case in gio.FileMonitor.FileMonitor.callBackChanged by checking otherFile and not call getDObject if it is not set, or change getDObject to just return null for NULL objects, which also sounds reasonable to me.

Here's a simple test case, run and change a file in the working directory:

import std.stdio, glib.MainLoop, gio.FileMonitor, gobject.Type;
static import gio.File;

struct GioMonitor
{
    void onFileChanged(gio.File.File file, gio.File.File other_file, FileMonitorEvent event, FileMonitor monitor)
    {
        writefln("event %d, file: %s, other_file: %s", event, file.getPath(), (other_file !is null) ? other_file.getPath() : "[undef]");
    }

    void run()
    {
        auto fileObj = new gio.File.File(".");
        auto mon = fileObj.monitorDirectory(FileMonitorFlags.NONE, null);
        mon.addOnChanged(&onFileChanged);
        auto mainLoop = new MainLoop(null, false);
        mainLoop.run();
    }
};

void main(string[] args)
{
    Type.init();
    auto mon = new GioMonitor;
    mon.run();
}

You will get:

(process:13435): GLib-GObject-CRITICAL **: g_object_get_data: assertion `G_IS_OBJECT (object)' failed

(process:13435): GLib-GIO-CRITICAL **: g_file_get_path: assertion `G_IS_FILE (file)' failed

Demo Fail to build from makefile

Dear, when running make test` build fail from 3.x brancj

$ make -j4 test prefix=/home/builder/rpmbuild/BUILDROOT/gtkd-2.0.0-27.20120603gitcb35d25.fc17.x86_64/usr libdir=lib64
ldc2 -O -m64 -Isrc -Idemos/gtkD/TestWindow -c demos/gtkD/TestWindow/TestStock.d -ofdemos/gtkD/TestWindow/TestStock.o
ldc2 -O -m64 -Isrc -Idemos/gtkD/TestWindow -c demos/gtkD/TestWindow/TestTreeView1.d -ofdemos/gtkD/TestWindow/TestTreeView1.o
ldc2 -O -m64 -Isrc -Idemos/gtkD/TestWindow -c demos/gtkD/TestWindow/TestTreeView.d -ofdemos/gtkD/TestWindow/TestTreeView.o
ldc2 -O -m64 -Isrc -Idemos/gtkD/TestWindow -c demos/gtkD/TestWindow/TestScales.d -ofdemos/gtkD/TestWindow/TestScales.o
demos/gtkD/TestWindow/TestStock.d(25): Error: module ObjectGtk is in file 'gtk/ObjectGtk.d' which cannot be read
import path[0] = src
import path[1] = demos/gtkD/TestWindow
import path[2] = /usr/include/d/ldc
import path[3] = /usr/include/d
make: *** [demos/gtkD/TestWindow/TestStock.o] Error 1
make: *** Waiting for unfinished jobs....
demos/gtkD/TestWindow/TestScales.d(107): Error: undefined identifier 'setUpdatePolicy'
demos/gtkD/TestWindow/TestScales.d(107): Error: undefined identifier UpdateType
demos/gtkD/TestWindow/TestScales.d(128): Error: undefined identifier 'appendText'
demos/gtkD/TestWindow/TestScales.d(129): Error: undefined identifier 'appendText'
demos/gtkD/TestWindow/TestScales.d(130): Error: undefined identifier 'appendText'
demos/gtkD/TestWindow/TestScales.d(131): Error: undefined identifier 'appendText'
demos/gtkD/TestWindow/TestScales.d(148): Error: undefined identifier 'appendText'
demos/gtkD/TestWindow/TestScales.d(149): Error: undefined identifier 'appendText'
demos/gtkD/TestWindow/TestScales.d(150): Error: undefined identifier 'appendText'
demos/gtkD/TestWindow/TestScales.d(230): Error: undefined identifier 'getActiveText'
demos/gtkD/TestWindow/TestScales.d(256): Error: undefined identifier 'getActiveText'
demos/gtkD/TestWindow/TestScales.d(259): Error: undefined identifier 'setUpdatePolicy'
demos/gtkD/TestWindow/TestScales.d(259): Error: undefined identifier UpdateType
demos/gtkD/TestWindow/TestScales.d(260): Error: undefined identifier 'setUpdatePolicy'
demos/gtkD/TestWindow/TestScales.d(260): Error: undefined identifier UpdateType
demos/gtkD/TestWindow/TestScales.d(263): Error: undefined identifier 'setUpdatePolicy'
demos/gtkD/TestWindow/TestScales.d(263): Error: undefined identifier UpdateType
demos/gtkD/TestWindow/TestScales.d(264): Error: undefined identifier 'setUpdatePolicy'
demos/gtkD/TestWindow/TestScales.d(264): Error: undefined identifier UpdateType
demos/gtkD/TestWindow/TestScales.d(267): Error: undefined identifier 'setUpdatePolicy'
demos/gtkD/TestWindow/TestScales.d(267): Error: undefined identifier UpdateType
demos/gtkD/TestWindow/TestScales.d(268): Error: undefined identifier 'setUpdatePolicy'
demos/gtkD/TestWindow/TestScales.d(268): Error: undefined identifier UpdateType
make: *** [demos/gtkD/TestWindow/TestScales.o] Error 1

Make target «test» fail when multithread is requested

with 8 threads

$  make -j8 test 
ldc2 -O -m64 -Isrc -Idemos/gtkD/TestWindow -c demos/gtkD/TestWindow/TestIdle.d -ofdemos/gtkD/TestWindow/TestIdle.o
ldc2 -O -m64 -Isrc -Idemos/gtkD/TestWindow -c demos/gtkD/TestWindow/TestWindow.d -ofdemos/gtkD/TestWindow/TestWindow.o
ldc2 -O -m64 -Isrc -Idemos/gtkD/TestWindow -c demos/gtkD/TestWindow/TestText.d -ofdemos/gtkD/TestWindow/TestText.o
ldc2 -O -m64 -Isrc -Idemos/gtkD/TestWindow -c demos/gtkD/TestWindow/TTextView.d -ofdemos/gtkD/TestWindow/TTextView.o
ldc2 -O -m64 -Isrc -Idemos/gtkD/TestWindow -c demos/gtkD/TestWindow/TestDrawingArea.d -ofdemos/gtkD/TestWindow/TestDrawingArea.o
ldc2 -O -m64 -Isrc -Idemos/gtkD/TestWindow -c demos/gtkD/TestWindow/TestAspectFrame.d -ofdemos/gtkD/TestWindow/TestAspectFrame.o
ldc2 -O -m64 -Isrc -Idemos/gtkD/TestWindow -c demos/gtkD/TestWindow/TestImage.d -ofdemos/gtkD/TestWindow/TestImage.o
ldc2 -O -m64 -Isrc -Idemos/gtkD/TestWindow -c demos/gtkD/TestWindow/TestThemes.d -ofdemos/gtkD/TestWindow/TestThemes.o
make: *** [demos/gtkD/TestWindow/TestWindow.o] Processus stopped
make: *** waiting unfinished processus....

with 1 thread

$  make test 
ldc2 -O -m64 -Isrc -Idemos/gtkD/TestWindow -c demos/gtkD/TestWindow/TestIdle.d -ofdemos/gtkD/TestWindow/TestIdle.o
ldc2 -O -m64 -Isrc -Idemos/gtkD/TestWindow -c demos/gtkD/TestWindow/TestWindow.d -ofdemos/gtkD/TestWindow/TestWindow.o
ldc2 -O -m64 -Isrc -Idemos/gtkD/TestWindow -c demos/gtkD/TestWindow/TestText.d -ofdemos/gtkD/TestWindow/TestText.o
ldc2 -O -m64 -Isrc -Idemos/gtkD/TestWindow -c demos/gtkD/TestWindow/TTextView.d -ofdemos/gtkD/TestWindow/TTextView.o
ldc2 -O -m64 -Isrc -Idemos/gtkD/TestWindow -c demos/gtkD/TestWindow/TestDrawingArea.d -ofdemos/gtkD/TestWindow/TestDrawingArea.o
ldc2 -O -m64 -Isrc -Idemos/gtkD/TestWindow -c demos/gtkD/TestWindow/TestAspectFrame.d -ofdemos/gtkD/TestWindow/TestAspectFrame.o
ldc2 -O -m64 -Isrc -Idemos/gtkD/TestWindow -c demos/gtkD/TestWindow/TestImage.d -ofdemos/gtkD/TestWindow/TestImage.o
ldc2 -O -m64 -Isrc -Idemos/gtkD/TestWindow -c demos/gtkD/TestWindow/TestThemes.d -ofdemos/gtkD/TestWindow/TestThemes.o
ldc2 -O -m64 -Isrc -Idemos/gtkD/TestWindow -c demos/gtkD/TestWindow/TestStock.d -ofdemos/gtkD/TestWindow/TestStock.o
ldc2 -O -m64 -Isrc -Idemos/gtkD/TestWindow -c demos/gtkD/TestWindow/TEditableCells.d -ofdemos/gtkD/TestWindow/TEditableCells.o
ldc2 -O -m64 -Isrc -Idemos/gtkD/TestWindow -c demos/gtkD/TestWindow/TestTreeView1.d -ofdemos/gtkD/TestWindow/TestTreeView1.o
ldc2 -O -m64 -Isrc -Idemos/gtkD/TestWindow -c demos/gtkD/TestWindow/TestEntries.d -ofdemos/gtkD/TestWindow/TestEntries.o
ldc2 -O -m64 -Isrc -Idemos/gtkD/TestWindow -c demos/gtkD/TestWindow/TestScales.d -ofdemos/gtkD/TestWindow/TestScales.o
ldc2 -O -m64 -Isrc -Idemos/gtkD/TestWindow -c demos/gtkD/TestWindow/TestTreeView.d -ofdemos/gtkD/TestWindow/TestTreeView.o
ln: failed to create symbolic link 'libgtkd-2.so.0': File exists
ldc2 demos/gtkD/TestWindow/TestIdle.o demos/gtkD/TestWindow/TestWindow.o demos/gtkD/TestWindow/TestText.o demos/gtkD/TestWindow/TTextView.o demos/gtkD/TestWindow/TestDrawingArea.o demos/gtkD/TestWindow/TestAspectFrame.o demos/gtkD/TestWindow/TestImage.o demos/gtkD/TestWindow/TestThemes.o demos/gtkD/TestWindow/TestStock.o demos/gtkD/TestWindow/TEditableCells.o demos/gtkD/TestWindow/TestTreeView1.o demos/gtkD/TestWindow/TestEntries.o demos/gtkD/TestWindow/TestScales.o demos/gtkD/TestWindow/TestTreeView.o  -ofTestWindow -L-L. -L-lgtkd-2 -L-ldl -m64 -L-rpath=./

without thread building test is ok.
Notice that it try to create a soft link whereas it exist already

Delayed program crash because of incorrect Cairo call after using Widget.onDraw

Widget.callBackDraw creates a new CairoContext with its this(cairo_t* cairo) constructor for each listener. Such class instance incorrectly assumes it owns its cairo_t* and:

  • if it is finalized in listener (e.g. delete context;) GTK calling code will crash on cairo_destroy call as it assumes reference count hasn't decreased (initially 2 on my implementation);
  • if it is finalized by GC on collection, it will crash as its cairo_t* is already invalid.

Workaround 1:

bool onDraw(Context context, Widget)
{
    // Workaround GtkD bug
    static assert(is(typeof(context.tupleof[0]) == cairo_t*));
    scope(exit) context.tupleof[0] = null;

    // your code
}

Workaround 2:

bool onDraw(Context context, Widget)
{
    // Workaround GtkD bug
    import gtkc.cairo;
    cairo_reference(context.getContextStruct());

    // your code
}

package less with branch 3.x

Dear,
I see some package no longer existe into branch 3.x:
glade, glgdk, glgtk, gtkglc, libgtkdgl.so

I would like to know if these packages will come back or are useless?

Almost impossible to use documentation!

I need to create a VBox, but the documentation here:
http://api.gtkd.org/src/gtk/VBox.html
says it's deprecated and to use Box instead, passing in
GTK_ORIENTATION_VERTICAL.

However, upon search all the source files for occurrences of

GTK_ORIENTATION_VERTICAL

I found no info on what it's D equivalent is. Do you have to be the creator of GtkD to actually use it or what? This is ridiculous.

Accept only nothrow delegates for signal handlers.

Throwing an exception through C code results in undefined behavior. In my case Gtk was compiled with -fomit-frame-pointer (the default with gcc on amd64), which the druntime cannot work with when unwinding the stack. In such cases druntime terminates the application with a HLT instruction, which is printed as a segfault.

But even after recompiling gtk with -fno-omit-frame-pointer I remained suspicious of what happens inside the C code. Since it doesn't catch D exceptions, every time it happens there might be stale resources, or an invalid program state inside gtk.

I see no other way than to make every GtkD method taking delegates only accept nothrow delegates.

for SourceView class, maybe its useful to cache reference to SourceBuffer in first getBuffer call

The semantics of gtkd wrapper objects are confusing coming to gtk and gtkd for the first time. In trying to make an example application on linux, a simple syntax editor with multiple tabs (for D language of course), I found that multiple calls to a SourceView reference getBuffer(), always resulted in class reference from the previous call being cleaned out with destroyNotify at the ObjectG level (but not further up to TextBuffer, which is another issue).
The kind of behaviour I was naively expecting, was that SourceView always looks after the same underlying gtkTextBuffer object, and therefore I would expect always to get the same class reference with a call to getBuffer(). For simple convenience, to avoid the maddening situation that callbacks set on SourceBuffer ended up calling a cleaned out base ObjectG, and a getBuffer() expected to return a simple property, I changed the first call to getBuffer() to store the SourceBuffer class in a cachedBuffer member of SourceView. I note the applicable comment that the underlying gtk_text_view_get_buffer doesn't get a new reference. Caching the SourceBuffer works for my application, makes it work like Java.

Retrieving style properties problem

I need to retrieve default GtkTreeView row colors ("even-row-color" and "odd-row-color" style properties). Here is the way Im trying to do that:

Value v = new Value();
char* gdkColorStr = cast(char*)(toStringz("GdkColor"));
v.init(g_type_from_name(gdkColorStr));
m_uiTreeView.getStyleContext().getStyleProperty("even-row-color",v);
auto p = v.getBoxed();
assert(p !is null); //p is always null :(

But the value returned by Value.getBoxed() is always null. I tried to retrieve properties of fundamental types (such as gint and gfloat) and all worked fine. So I think I'm doing something wrong.

gtkD.d gl errors

Error in gtkD.d affecting both build and rdmd:

private import gtkglc.gl.d (line 826)
private import gtkglc.glu.d (line 826)

Error with Build looking to include gtkglc\gl\d.d

Fixed by removing .d suffix from the above two lines.

please do not commit generated files to source control

Hi,

I learned now that my last pull request modified generated files. From a Debian Maintainers perspective it is undesirable to have generated files in source control. If I go to package GtkD I'd rather have a source tarball without any generated stuff and build everything from scratch.

I'd recommend

  • to remove all generated files from Git,
  • make the D source code generation as easy, universal, stable as possible and
  • provide a source tarball without generated files and a separate binary tarball.

Thank you! I'll have another look in the wrap/ folder and try to build it from there on a Debian system with lib.*-dev packages from Debian.

override not marked

hi when trying to build with -w flag

src/gdk/Pixmap.d(348): Warning: overrides base class function gdk.Drawable.Drawable.getSize, but is not marked with 'override'
src/gdk/Window.d(330): Warning: overrides base class function gdk.Drawable.Drawable.getDisplay, but is not marked with 'override'
src/gdk/Window.d(345): Warning: overrides base class function gdk.Drawable.Drawable.getScreen, but is not marked with 'override'
src/gdk/Window.d(361): Warning: overrides base class function gdk.Drawable.Drawable.getVisual, but is not marked with 'override'
src/gdk/Pixmap.d(348): Warning: overrides base class function gdk.Drawable.Drawable.getSize, but is not marked with 'override'
src/gdk/Window.d(330): Warning: overrides base class function gdk.Drawable.Drawable.getDisplay, but is not marked with 'override'
src/gdk/Window.d(345): Warning: overrides base class function gdk.Drawable.Drawable.getScreen, but is not marked with 'override'
src/gdk/Window.d(361): Warning: overrides base class function gdk.Drawable.Drawable.getVisual, but is not marked with 'override'

I have do a branch issue2: https://github.com/gtkd-developers/GtkD/tree/issue2

$ git checkout -b issue2 origin/issue2

If it is ok you can merge it to master

TextIter should not call gtk_text_iter_free

In call backs, such as for TextBuffer.callBackMarkSet the same GtkTextIter struct pointer is given to multiple new instances of a TextIter. Calls to gtk_text_iter_free in TextIter destructor for same struct pointer, on garbage collection leads to SegFault. Also the GtkTextIter can be easily used as a struct, and should be used as such wherever possible, as that is the usage that was intended by design. This would be simpler than trying to enforce 1 struct to 1 wrapper, for something that shouldn't need much wrapping. Work around, comment out call to gtk_text_iter_free in ~this()
There does not appear to be verified situations where a GtkTextIter pointer on GTK heap is ownership acquired by TextIter warapper. D runtime intances if any, such as this() { new GtkTextIter; } will be taken care of by GC.

Compiling error

$make

Generates this message

dmd -O -m64 -Isrc -c src/atk/Image.d -ofsrc/atk/Image.o
src/gtkc/atktypes.d(939): Error: struct gtkc.atktypes.AtkRectangle conflicts with struct gtkc.atktypes.AtkRectangle at src/gtkc/atktypes.d(30)
make: *** [src/atk/Image.o] Error 1

My arch.:

$uname -m
x86_64
$dmd --help
DMD64 D Compiler v2.063.2

Build failure at phase of srcsv.

make -f GNUmakefile
/bin/sh: arch: command not found
dmd -O -m32 -Isrc -Isrcsv -c srcsv/gsv/SourceCompletionProviderT.d -ofsrcsv/gsv/SourceCompletionProviderT.o
srcsv/gsvc/gsv.d(145): Error: undefined identifier GtkSourceLanguage
srcsv/gsvc/gsv.d(148): Error: undefined identifier GtkSourceLanguage
srcsv/gsvc/gsv.d(149): Error: undefined identifier GtkSourceLanguage
srcsv/gsvc/gsv.d(152): Error: undefined identifier GtkSourceStyleScheme
srcsv/gsvc/gsv.d(153): Error: undefined identifier GtkSourceStyleScheme
srcsv/gsvc/gsv.d(163): Error: undefined identifier GtkSourceMark
srcsv/gsvc/gsv.d(173): Error: undefined identifier GtkSourceUndoManager
srcsv/gsvc/gsv.d(174): Error: undefined identifier GtkSourceUndoManager
srcsv/gsvc/gsv.d(184): Error: undefined identifier GtkSourceView
make: *** [srcsv/gsv/SourceCompletionProviderT.o] Error 1

DMD32 D Compiler v2.062
gtksourceview3 3.6.1-1

I try to build gtkd on arch linux.
However it seem to fail to build gsv.

Gtk 3.8.1/2.12 Version of the conflict!

OS: Windows 7
IDE: MonoDevelop 4.0.8 / GtkSharp 2.12.1
GtkD: 2.2.0
Gtk Runtime: gtk3-runtime_3.8.1_32-bit.exe

When I installed two different versions of the GTK at the same time:
object.Exception@src\gtkc\Loader.d(127): Library load failed: libgtk-3-0.dll

When I uninstall GTK 2.12:
Successed!

gtk

Error compiling test target

I've ArchLiniux on i686 machine. When I try to compile the test target I get the following errors:

$uname -m
i686
$git log 
commit 7e54919287cc7810aed7af27b5371551a3abd9cd
Author: Mike Wey
Date:   Mon Jan 28 22:47:00 2013 +0100
....

$make test

dmd demos/gtkD/TestWindow/TestImage.o demos/gtkD/TestWindow/TTextView.o
demos/gtkD/TestWindow/TestScales.o demos/gtkD/TestWindow/TestTreeView1.o
demos/gtkD/TestWindow/TestTreeView.o demos/gtkD/TestWindow/TestEntries.o
demos/gtkD/TestWindow/TestAspectFrame.o demos/gtkD/TestWindow/TestThemes.o
demos/gtkD/TestWindow/TestWindow.o demos/gtkD/TestWindow/TestDrawingArea.o
demos/gtkD/TestWindow/TestStock.o demos/gtkD/TestWindow/TestIdle.o
demos/gtkD/TestWindow/TEditableCells.o demos/gtkD/TestWindow/TestText.o
-ofTestWindow -L-L. -L-lgtkd-2 -m32

./libgtkd-2.a(Loader.o): In function `_D4gtkc6Loader12pLoadLibraryFAyaE4gtkc6Loader4RTLDZPv':
src/gtkc/Loader.d:(.text._D4gtkc6Loader12pLoadLibraryFAyaE4gtkc6Loader4RTLDZPv+0x14): undefined reference to `dlopen'
src/gtkc/Loader.d:(.text._D4gtkc6Loader12pLoadLibraryFAyaE4gtkc6Loader4RTLDZPv+0x1c): undefined reference to `dlerror'
./libgtkd-2.a(Loader.o): In function `_D4gtkc6Loader10pGetSymbolFPvAyaZPv':
src/gtkc/Loader.d:(.text._D4gtkc6Loader10pGetSymbolFPvAyaZPv+0x16): undefined reference to `dlsym'
src/gtkc/Loader.d:(.text._D4gtkc6Loader10pGetSymbolFPvAyaZPv+0x1e): undefined reference to `dlerror'
./libgtkd-2.a(Loader.o): In function `_D4gtkc6Loader14pUnloadLibraryFPvZi':
src/gtkc/Loader.d:(.text._D4gtkc6Loader14pUnloadLibraryFPvZi+0x8): undefined reference to `dlclose'
collect2: error: ld returned 1 exit status

--- errorlevel 1
make: *** [TestWindow] Error 1

makedocs.sh errors

Errors generating html from several modules.

A quick look revealed descriptions of tags that should have been escaped. They are part of documentation not html code.
(Not sure if "escaped" is the proper term but < > should have been &lt &gt)
(hope that shows up correctly)

gtkd from git master sept 29 2013

A visual :)

anthony@LinuxGen12:~/apps/gtkd/GtkD$ grep -n '<template>' ./docs/src/gtk/*.html
./docs/src/gtk/Builder.html:326: Additionally, since 3.10 a special <template> tag has been added to the format
./docs/src/gtk/Requisition.html:285: <template> tag as a direct child of the toplevel <interface>
./docs/src/gtk/Requisition.html:286: tag. The <template> tag must specify the "class" attribute which
./docs/src/gtk/Requisition.html:294: The XML which is contained inside the <template> tag behaves as if
./docs/src/gtk/Requisition.html:296: properties on widget by inserting <property> tags into the <template>
./docs/src/gtk/Requisition.html:302: after the initial <template> tag in the normal way, allowing
./docs/src/gtk/Requisition.html:304: widgets declared as children of the <template> tag.
./docs/src/gtk/WidgetClass.html:285: <template> tag as a direct child of the toplevel <interface>
./docs/src/gtk/WidgetClass.html:286: tag. The <template> tag must specify the "class" attribute which
./docs/src/gtk/WidgetClass.html:294: The XML which is contained inside the <template> tag behaves as if
./docs/src/gtk/WidgetClass.html:296: properties on widget by inserting <property> tags into the <template>
./docs/src/gtk/WidgetClass.html:302: after the initial <template> tag in the normal way, allowing
./docs/src/gtk/WidgetClass.html:304: widgets declared as children of the <template> tag.
./docs/src/gtk/Widget.html:285: <template> tag as a direct child of the toplevel <interface>
./docs/src/gtk/Widget.html:286: tag. The <template> tag must specify the "class" attribute which
./docs/src/gtk/Widget.html:294: The XML which is contained inside the <template> tag behaves as if
./docs/src/gtk/Widget.html:296: properties on widget by inserting <property> tags into the <template>
./docs/src/gtk/Widget.html:302: after the initial <template> tag in the normal way, allowing
./docs/src/gtk/Widget.html:304: widgets declared as children of the <template> tag.

GtkD 1.71 error in glib.ListSG

Unnecessary check for 'next' being null :)
Thanks.

void* data()
{
   if ( getListSGStruct().next is null )
   {
      return null;
   }

   return getListSGStruct().data;
}

HEAD doesn't build…

… at least on Fedora 19 with DMD 2.063.2:

dmd -O -m64 -Isrc -c src/atk/Image.d -ofsrc/atk/Image.o
src/gtkc/atktypes.d(939): Error: struct gtkc.atktypes.AtkRectangle conflicts with struct gtkc.atktypes.AtkRectangle at src/gtkc/atktypes.d(30)

Buttons in a window get selected while the window is being resized

Here's an example:
http://www.youtube.com/watch?v=_kl6hqiIEpI&feature=youtu.be

I'm on Win7 64bit, building in 32bit mode using DMD 2.063.2.
Tested using gtkD-2.3.0.zip and GTK Runtime version 3.8 (32 bits).

This was running the GtkD\demos\gtkD\TestWindow example.

The video doesn't show it, but if I resize the window rightwards only, the cancel button gets selected, and then if I further resize it rightwards the quit button gets selected. Then resizing it back leftwards selects the cancel button and then the ok button.

errors compiling with dmd 2.061 (beta)

With last dmd 2.061 beta, I got this error when compiling Gtk2 branch on Linux:

$ dmd -c -O -m32 -Isrc -ofobj/32/src/cairo/Context.o src/cairo/Context.d
src/cairo/Context.d(161): Error: struct gtkc.Loader.Linker member loadedLibraries is not accessible

No problem compiling Master branch.

make libs fails with class x use of y hiden by z is deprecated

Hi,

I try to compile git master on Debian testing with gdc and get:

Error: class gio.DBusInterfaceSkeleton.DBusInterfaceSkeleton use of gio.DBusInterfaceSkeleton.DBusInterfaceSkeleton.DBusInterfaceT!(GDBusInterfaceSkeleton).getInfo() hidden by DBusInterfaceSkeleton is deprecated

When I delete src/gio/DBusInterfaceSkeleton.d I get similar errors from other files. I found this kind of error message mentioned here:
http://www.digitalmars.com/d/archives/digitalmars/D/learn/How_does_one_correct_shadowing_hidden_by_errors_28397.html

Build fail with dmdfe 2.063

I build with -w flag because is needed to use it to put into fedora repo
so when i try to build gtkd i got this error message:

src/glib/Str.d(164): Warning: explicit element-wise assignment copy[cast(ulong)0..s.length] = (_adDupT(& _D12TypeInfo_Aya6__initZ, s))[] is better than copy[cast(ulong)0..s.length] = _adDupT(& _D12TypeInfo_Aya6__initZ, s)

errors compiling with dmd 2.060 (beta)

I got these errors:

$ dmd -c -O -m32 -Isrc -ofobj/32/src/gtk/Builder.o src/gtk/Builder.d
src/gtk/Builder.d(482): Error: cannot implicitly convert expression (find(cast(const(char[]))type)) of type const(TypeInfo_Class) to object.TypeInfo_Class
src/gtk/Builder.d(487): Error: cannot implicitly convert expression (find(cast(const(char[]))("gio" ~ type[7u..__dollar]))) of type const(TypeInfo_Class) to object.TypeInfo_Class

list of test that faiiling

I do not know if is normal or not so i put the ./TestWindow output

$ ./TestWindow
Loaded lib = libgobject-2.0.so.0./TestWindow
Loaded lib = libgtk-3.so.0
Loaded lib = libgdk-3.so.0
Loaded lib = libgio-2.0.so.0
Loaded lib = libgthread-2.0.so.0
Loaded lib = libglib-2.0.so.0
Loaded lib = libpango-1.0.so.0
Loaded lib = libpangocairo-1.0.so.0
Loaded lib = libgmodule-2.0.so.0
Loaded lib = libgdk_pixbuf-2.0.so.0
Loaded lib = libcairo.so.2
Loaded lib = libatk-1.0.so.0
failed (libgobject-2.0.so.0) g_type_get_type_registration_serial
failed (libgtk-3.so.0) gtk_style_context_get_frame_clock
failed (libgtk-3.so.0) gtk_style_context_set_frame_clock
failed (libgtk-3.so.0) gtk_icon_info_load_icon_async
failed (libgtk-3.so.0) gtk_icon_info_load_icon_finish
failed (libgtk-3.so.0) gtk_icon_info_load_symbolic_async
failed (libgtk-3.so.0) gtk_icon_info_load_symbolic_finish
failed (libgtk-3.so.0) gtk_icon_info_load_symbolic_for_context_async
failed (libgtk-3.so.0) gtk_icon_info_load_symbolic_for_context_finish
failed (libgtk-3.so.0) gtk_level_bar_set_inverted
failed (libgtk-3.so.0) gtk_level_bar_get_inverted
failed (libgtk-3.so.0) gtk_tree_view_set_activate_on_single_click
failed (libgtk-3.so.0) gtk_tree_view_get_activate_on_single_click
failed (libgtk-3.so.0) gtk_icon_view_set_activate_on_single_click
failed (libgtk-3.so.0) gtk_icon_view_get_activate_on_single_click
failed (libgtk-3.so.0) gtk_cell_renderer_class_set_accessible_type
failed (libgtk-3.so.0) gtk_widget_get_frame_clock
failed (libgtk-3.so.0) gtk_widget_add_tick_callback
failed (libgtk-3.so.0) gtk_widget_remove_tick_callback
failed (libgtk-3.so.0) gtk_widget_register_window
failed (libgtk-3.so.0) gtk_widget_unregister_window
failed (libgtk-3.so.0) gtk_widget_is_visible
failed (libgtk-3.so.0) gtk_widget_get_opacity
failed (libgtk-3.so.0) gtk_widget_set_opacity
failed (libgtk-3.so.0) gtk_builder_expose_object
failed (libgdk-3.so.0) gdk_window_get_fullscreen_mode
failed (libgdk-3.so.0) gdk_window_set_fullscreen_mode
failed (libgdk-3.so.0) gdk_window_get_frame_clock
failed (libgdk-3.so.0) gdk_frame_clock_get_frame_time
failed (libgdk-3.so.0) gdk_frame_clock_request_phase
failed (libgdk-3.so.0) gdk_frame_clock_begin_updating
failed (libgdk-3.so.0) gdk_frame_clock_end_updating
failed (libgdk-3.so.0) gdk_frame_clock_get_frame_counter
failed (libgdk-3.so.0) gdk_frame_clock_get_history_start
failed (libgdk-3.so.0) gdk_frame_clock_get_timings
failed (libgdk-3.so.0) gdk_frame_clock_get_current_timings
failed (libgdk-3.so.0) gdk_frame_clock_get_refresh_info
failed (libgdk-3.so.0) gdk_frame_timings_ref
failed (libgdk-3.so.0) gdk_frame_timings_unref
failed (libgdk-3.so.0) gdk_frame_timings_get_frame_counter
failed (libgdk-3.so.0) gdk_frame_timings_get_complete
failed (libgdk-3.so.0) gdk_frame_timings_get_frame_time
failed (libgdk-3.so.0) gdk_frame_timings_get_presentation_time
failed (libgdk-3.so.0) gdk_frame_timings_get_refresh_interval
failed (libgdk-3.so.0) gdk_frame_timings_get_predicted_presentation_time
failed (libgio-2.0.so.0) g_file_new_for_commandline_arg_and_cwd
failed (libgio-2.0.so.0) g_file_info_get_deletion_date
failed (libgio-2.0.so.0) g_file_enumerator_get_child
failed (libgio-2.0.so.0) g_io_error_from_win32_error
failed (libgio-2.0.so.0) g_task_new
failed (libgio-2.0.so.0) g_task_set_task_data
failed (libgio-2.0.so.0) g_task_set_priority
failed (libgio-2.0.so.0) g_task_set_check_cancellable
failed (libgio-2.0.so.0) g_task_set_return_on_cancel
failed (libgio-2.0.so.0) g_task_set_source_tag
failed (libgio-2.0.so.0) g_task_report_error
failed (libgio-2.0.so.0) g_task_report_new_error
failed (libgio-2.0.so.0) g_task_get_task_data
failed (libgio-2.0.so.0) g_task_get_priority
failed (libgio-2.0.so.0) g_task_get_cancellable
failed (libgio-2.0.so.0) g_task_get_check_cancellable
failed (libgio-2.0.so.0) g_task_get_return_on_cancel
failed (libgio-2.0.so.0) g_task_get_context
failed (libgio-2.0.so.0) g_task_get_source_object
failed (libgio-2.0.so.0) g_task_get_source_tag
failed (libgio-2.0.so.0) g_task_return_boolean
failed (libgio-2.0.so.0) g_task_return_int
failed (libgio-2.0.so.0) g_task_return_pointer
failed (libgio-2.0.so.0) g_task_return_error
failed (libgio-2.0.so.0) g_task_return_new_error
failed (libgio-2.0.so.0) g_task_return_error_if_cancelled
failed (libgio-2.0.so.0) g_task_propagate_boolean
failed (libgio-2.0.so.0) g_task_propagate_int
failed (libgio-2.0.so.0) g_task_propagate_pointer
failed (libgio-2.0.so.0) g_task_had_error
failed (libgio-2.0.so.0) g_task_run_in_thread
failed (libgio-2.0.so.0) g_task_run_in_thread_sync
failed (libgio-2.0.so.0) g_task_attach_source
failed (libgio-2.0.so.0) g_task_is_valid
failed (libgio-2.0.so.0) g_memory_output_stream_new_resizable
failed (libgio-2.0.so.0) g_desktop_app_info_get_string
failed (libgio-2.0.so.0) g_desktop_app_info_get_boolean
failed (libgio-2.0.so.0) g_desktop_app_info_has_key
failed (libgio-2.0.so.0) g_socket_get_option
failed (libgio-2.0.so.0) g_socket_set_option
failed (libgio-2.0.so.0) g_credentials_get_unix_pid
failed (libgio-2.0.so.0) g_socket_client_set_proxy_resolver
failed (libgio-2.0.so.0) g_socket_client_get_proxy_resolver
failed (libgio-2.0.so.0) g_simple_proxy_resolver_new
failed (libgio-2.0.so.0) g_simple_proxy_resolver_set_default_proxy
failed (libgio-2.0.so.0) g_simple_proxy_resolver_set_ignore_hosts
failed (libgio-2.0.so.0) g_simple_proxy_resolver_set_uri_proxy
failed (libgio-2.0.so.0) g_application_command_line_get_stdin
failed (libgio-2.0.so.0) g_application_command_line_create_file_for_arg
failed (libgio-2.0.so.0) g_io_module_load
failed (libgio-2.0.so.0) g_io_module_unload
failed (libgio-2.0.so.0) g_io_module_query
failed (libgthread-2.0.so.0) g_get_num_processors
failed (libglib-2.0.so.0) g_source_set_ready_time
failed (libglib-2.0.so.0) g_source_get_ready_time
failed (libglib-2.0.so.0) g_source_add_unix_fd
failed (libglib-2.0.so.0) g_source_remove_unix_fd
failed (libglib-2.0.so.0) g_source_modify_unix_fd
failed (libglib-2.0.so.0) g_source_query_unix_fd
failed (libglib-2.0.so.0) g_io_channel_win32_new_fd
failed (libglib-2.0.so.0) g_io_channel_win32_new_socket
failed (libglib-2.0.so.0) g_io_channel_win32_new_messages
failed (libglib-2.0.so.0) g_ascii_isalnum
failed (libglib-2.0.so.0) g_ascii_isalpha
failed (libglib-2.0.so.0) g_ascii_iscntrl
failed (libglib-2.0.so.0) g_ascii_isdigit
failed (libglib-2.0.so.0) g_ascii_isgraph
failed (libglib-2.0.so.0) g_ascii_islower
failed (libglib-2.0.so.0) g_ascii_isprint
failed (libglib-2.0.so.0) g_ascii_ispunct
failed (libglib-2.0.so.0) g_ascii_isspace
failed (libglib-2.0.so.0) g_ascii_isupper
failed (libglib-2.0.so.0) g_ascii_isxdigit
failed (libglib-2.0.so.0) g_close
failed (libglib-2.0.so.0) g_markup_parse_context_ref
failed (libglib-2.0.so.0) g_markup_parse_context_unref
failed (libglib-2.0.so.0) g_unix_fd_add
failed (libglib-2.0.so.0) g_unix_fd_add_full
failed (libglib-2.0.so.0) g_unix_fd_source_new
failed (libglib-2.0.so.0) g_win32_error_message
failed (libglib-2.0.so.0) g_win32_getlocale
failed (libglib-2.0.so.0) g_win32_get_package_installation_directory
failed (libglib-2.0.so.0) g_win32_get_package_installation_directory_of_module
failed (libglib-2.0.so.0) g_win32_get_package_installation_subdirectory
failed (libglib-2.0.so.0) g_win32_get_windows_version
failed (libglib-2.0.so.0) g_win32_locale_filename_from_utf8
failed (libglib-2.0.so.0) g_variant_get_data_as_bytes
failed (libglib-2.0.so.0) g_variant_new_from_bytes
failed (libpango-1.0.so.0) pango_context_changed
failed (libpango-1.0.so.0) pango_context_get_serial
failed (libpango-1.0.so.0) pango_font_map_get_serial
failed (libpango-1.0.so.0) pango_markup_parser_new
failed (libpango-1.0.so.0) pango_markup_parser_finish
failed (libpango-1.0.so.0) pango_layout_get_serial
failed (libpango-1.0.so.0) script_engine_list
failed (libpango-1.0.so.0) script_engine_init
failed (libpango-1.0.so.0) script_engine_exit
failed (libpango-1.0.so.0) script_engine_create
failed (libgdk_pixbuf-2.0.so.0) gdk_window_get_fullscreen_mode
failed (libgdk_pixbuf-2.0.so.0) gdk_window_set_fullscreen_mode
failed (libgdk_pixbuf-2.0.so.0) gdk_window_get_frame_clock
failed (libgdk_pixbuf-2.0.so.0) gdk_frame_clock_get_frame_time
failed (libgdk_pixbuf-2.0.so.0) gdk_frame_clock_request_phase
failed (libgdk_pixbuf-2.0.so.0) gdk_frame_clock_begin_updating
failed (libgdk_pixbuf-2.0.so.0) gdk_frame_clock_end_updating
failed (libgdk_pixbuf-2.0.so.0) gdk_frame_clock_get_frame_counter
failed (libgdk_pixbuf-2.0.so.0) gdk_frame_clock_get_history_start
failed (libgdk_pixbuf-2.0.so.0) gdk_frame_clock_get_timings
failed (libgdk_pixbuf-2.0.so.0) gdk_frame_clock_get_current_timings
failed (libgdk_pixbuf-2.0.so.0) gdk_frame_clock_get_refresh_info
failed (libgdk_pixbuf-2.0.so.0) gdk_frame_timings_ref
failed (libgdk_pixbuf-2.0.so.0) gdk_frame_timings_unref
failed (libgdk_pixbuf-2.0.so.0) gdk_frame_timings_get_frame_counter
failed (libgdk_pixbuf-2.0.so.0) gdk_frame_timings_get_complete
failed (libgdk_pixbuf-2.0.so.0) gdk_frame_timings_get_frame_time
failed (libgdk_pixbuf-2.0.so.0) gdk_frame_timings_get_presentation_time
failed (libgdk_pixbuf-2.0.so.0) gdk_frame_timings_get_refresh_interval
failed (libgdk_pixbuf-2.0.so.0) gdk_frame_timings_get_predicted_presentation_time
failed (libgdk_pixbuf-2.0.so.0) gdk_pixbuf_animation_new_from_resource
failed (libgdk_pixbuf-2.0.so.0) gdk_pixbuf_animation_new_from_resource
failed (libgdk_pixbuf-2.0.so.0) gdk_pixbuf_animation_new_from_stream
failed (libgdk_pixbuf-2.0.so.0) gdk_pixbuf_animation_new_from_stream
failed (libgdk_pixbuf-2.0.so.0) gdk_pixbuf_animation_new_from_stream_async
failed (libgdk_pixbuf-2.0.so.0) gdk_pixbuf_animation_new_from_stream_async
failed (libgdk_pixbuf-2.0.so.0) gdk_pixbuf_animation_new_from_stream_finish
failed (libgdk_pixbuf-2.0.so.0) gdk_pixbuf_animation_new_from_stream_finish

Cannot make all as file missing

This used to work, but now when I run make all I get this error:

/usr/bin/ld: warning: libcurl-gnutls.so.4, needed by /lib64/libphobos2.so.0.2, not found (try using -rpath or -rpath-link)

On fedora 19 64bit. Tried finding a package for libcurl-gnutls.so.4 but there's nothing obvious.

Can't compile with latest dmd

With dmd/druntime/phobos cloned from their repositories I can't compile GtkD.
It seems that certain functionality is no longer compatible.

dmd -O -m64 -Isrc -c src/atk/Action.d -ofsrc/atk/Action.o src/atk/Action.d(116): Error: Cannot modify 'this' make: *** [src/atk/Action.o] Error 1

Library load failed: libgtk-3-0.dll

OS: Windows 7 x64
DMD: 2.060
GTK Runtime: GTK 3.4.2 installed

ERROR:
C:\Users\Administrator>D:\Projects\DLang\gtk1\bin\Release\gtk1.exe
object.Exception@..\gtkc\Loader.d(123): Library load failed: libgtk-3-0.dll

make fails

On i686 Arch Linux with the latest dmd.

dmd demos/gtkD/TestWindow/TestTreeView1.o demos/gtkD/TestWindow/TestImage.o demos/gtkD/TestWindow/TestScales.o demos/gtkD/TestWindow/TestTreeView.o demos/gtkD/TestWindow/TestStock.o demos/gtkD/TestWindow/TestWindow.o demos/gtkD/TestWindow/TestEntries.o demos/gtkD/TestWindow/TEditableCells.o demos/gtkD/TestWindow/TestIdle.o demos/gtkD/TestWindow/app.o demos/gtkD/TestWindow/TestDrawingArea.o demos/gtkD/TestWindow/TTextView.o demos/gtkD/TestWindow/TestAspectFrame.o demos/gtkD/TestWindow/TestThemes.o demos/gtkD/TestWindow/TestText.o -ofTestWindow -L-L. -L-lgtkd -L-ldl -m32
--- errorlevel 127
make: *** [TestWindow] Error 127

Not all that descriptive, sorry. Good luck! :P

License

The license is still unclear. The COPYING file says LGPLv3 with exceptions, and the source code says LGPLv3+.

Fedora review are blocked on this issue.

Since compiler can use shared lib these exception seem to be unless in more i do not know if is LGPL compatible

GDC crashes a test program

I think I may have found a bug that occurs when you try to use a menu item in GTK2 2.3.0, and then try to compile the program with GDC.

I have constructed a minimal example. I tried compiling it in both DMD and GDC. In DMD it works fine. In GDC, attempting to use the mitQuit object produces a segfault.

Note that this problem only seems to affect MenuItem objects. Buttons, for example, work fine in both.

System: Debian testing (Jessie)
DMD: 2.063.2-0, from the SourceForge debian repository (the latest, as far as I know).
GDC: 4.8.2-1 from Debian Testing repository
GtkD version: 2.3.0 (which I compiled myself using the same version of GDC).

Commands used to compile:

For DMD:

dmd -oftestdmd main.d -I/usr/include/dmd/gtkd2  -defaultlib=libphobos2.so -L-L/usr/lib/x86_64-linux-gnu -L-L/usr/lib/i386-linux-gnu -L-l:libgtkd2.so -L-ldl

For GDC:

gdc -o testgdc main.d -I/home/sgc65/gtkd/include/d/gtkd-2/  -Xlinker -L/home/sgc65/gtkd/lib/ -lgtkd-2 -ldl

Both DMD and GDC compile without any error messages. The binary produced by DMD runs perfectly; the one made by GDC produces a segfault.

If I comment out the line indicated in the code, however, the GDC-compiled binary runs fine. (Of course, I can't connect a signal to the Quit item....)

Files:

main.d

module main;

import gtk.Main;
import gtk.Window;
import gtk.Builder;
import gtk.MenuItem;
import gtk.Button;
import std.stdio;

void main(string[] args)
{
    Main.init(args);

    // Set up the builder.
    auto builder = new Builder();
    builder.addFromFile("main_window.glade");

    // Get the main window so as to show it below.
    auto window = cast(Window)builder.getObject("main_window");

    // Get the menu item "mitQuit" in order to connect a signal.
    // Works with DMD, but GDC produces a segfault.
    auto mitQuit = cast(MenuItem)builder.getObject("mitQuit");
    // Comment out the following line to get it to work in GDC.
    mitQuit.addOnActivate(delegate (MenuItem) { writeln("Exited from menu."); Main.quit(); });

    // Get the "btnQuit" button and connect a signal. Works in both DMD and GDC.
    auto btnQuit = cast(Button)builder.getObject("btnQuit");
    btnQuit.addOnClicked(delegate (Button) { writeln("Exited from button."); Main.quit(); });

    window.showAll();

    Main.run();
}

main_window.glade

<?xml version="1.0" encoding="UTF-8"?>
<interface>
  <!-- interface-requires gtk+ 3.0 -->
  <object class="GtkWindow" id="main_window">
    <property name="can_focus">False</property>
    <child>
      <object class="GtkBox" id="box">
        <property name="visible">True</property>
        <property name="can_focus">False</property>
        <property name="orientation">vertical</property>
        <child>
          <object class="GtkMenuBar" id="menubar">
            <property name="visible">True</property>
            <property name="can_focus">False</property>
            <child>
              <object class="GtkMenuItem" id="menuFile">
                <property name="visible">True</property>
                <property name="can_focus">False</property>
                <property name="label" translatable="yes">_File</property>
                <property name="use_underline">True</property>
                <child type="submenu">
                  <object class="GtkMenu" id="menu1">
                    <property name="visible">True</property>
                    <property name="can_focus">False</property>
                    <child>
                      <object class="GtkImageMenuItem" id="mitQuit">
                        <property name="label">gtk-quit</property>
                        <property name="visible">True</property>
                        <property name="can_focus">False</property>
                        <property name="use_underline">True</property>
                        <property name="use_stock">True</property>
                      </object>
                    </child>
                  </object>
                </child>
              </object>
            </child>
          </object>
          <packing>
            <property name="expand">False</property>
            <property name="fill">True</property>
            <property name="position">0</property>
          </packing>
        </child>
        <child>
          <object class="GtkButton" id="btnQuit">
            <property name="label">gtk-quit</property>
            <property name="width_request">100</property>
            <property name="visible">True</property>
            <property name="can_focus">True</property>
            <property name="receives_default">True</property>
            <property name="use_stock">True</property>
          </object>
          <packing>
            <property name="expand">False</property>
            <property name="fill">True</property>
            <property name="position">1</property>
          </packing>
        </child>
      </object>
    </child>
  </object>
</interface>

Thanks for your help!

Louis Melahn, L.C.

Source View test segfault

#0  0xb7c7d400 in gtkc.gtk._sharedStaticCtor3() () from libgtkd.so.1.6
#1  0xb7e2edd9 in gtkc.gtk.__modsharedctor() () from libgtkd.so.1.6
#2  0xb7e90fee in rt.minfo.ModuleGroup.runCtors() () from libgtkd.so.1.6
#3  0xb7e90a9d in rt.minfo.ModuleGroup.runCtors() () from libgtkd.so.1.6
#4  0x08081af6 in rt_moduleCtor ()
#5  0x080819fa in rt.dmain2.main() ()
#6  0x080814e4 in rt.dmain2.main() ()
#7  0x08081494 in main ()

here is the backtrace for the segfault
I'm obviously on the gtkd 1.6 branch (my desktop is a gnome-2 fork)
I'm no expert, but the problem seems to be with the colors :D

EDIT:
I think I'll compile with debug symbols and see if I can get some more information as to why this isn't working

DLL load fail, Entry point not found

See update at bottom.

I get this error after compiling a tiny program, (an included example):

object.Exception@gtkc\Loader.d(123): Library load failed: libgtk-3-0.dll

I have the DLL's in the system path.

I looked at an issue that looked the same, and tried stuff from there. Now I get another error, that comes before first error:

program.exe - Entry Point Not Found (title) - The procedure entry point cairo_device_destroy could not be located in the dynamic link library libcaire-2.dll.

Update:
Got it going! I installed GTK+3.6.1 at http://www.tarnyko.net/en/ - unofficial release

GtkD HEAD as at 2013-10-21T11:13+01:00 fails to build with LDC HEAD

I have just pulled GtkD HEAD ac4f2f5 and this compiles and installs fine using DMD 2.063.2, and after an initial scare GDC 4.8.2.

With LDC2 (compiled from HEAD), I get:


ldc2 -O -m64 -Isrc -c src/gtk/BuildableT.d -ofsrc/gtk/BuildableT.o
ldc2 -O -m64 -Isrc -c src/gtk/Builder.d -ofsrc/gtk/Builder.o
src/gtkc/gtktypes.d(39): Error: Function type does not match previously declared function with the same mangled name: _d_newclass
make: *** [src/gtk/Builder.o] Error 1

Compilation error on `make all`

On Ubuntu 12.04, libgtk-3-dev and libcairo2-dev installed, make all does:

demos/gtkD/TestWindow/TestDrawingArea.d:363: Error: no property 'setSourcePixbuf' for type 'cairo.Context.Context'
make: *** [demos/gtkD/TestWindow/TestDrawingArea.o] Error 1

This is at treeish db8f535

Typo in the README file

I just noticed a typo in the README file, when you have a chance.

The last small paragraph of the "Windows" section reads as follows:

To specify if it should build for 64 or 32 bits, pass eighter

The last word should be either.

GDI object leak in example cairo_clock (& in DrawingArea)

under win7 32bit. compiled with dmd 2.063.2. using gtk+ 3.6.1

  • compile and run the example cairo_clock.
  • during 30 seconds, resize the window in an "unrealistic way" (like a nut)
  • check the GDI objects count in the task man, it can stop on increasing.

remove the onDraw listener, recompile, recheck: no more leak.
The problem append even in a simple window with an empty onDraw event.

Best way to disconnect event handlers?

I have some code where I sometimes need an event handler and sometimes do not.

So when I need an event handler I will do:
treeView.addOnRowActivated(&handlerCode);

And to remove the handler I can use either
treeView.onRowActivatedListeners.destroy();
or
treeView.onRowActivatedListeners.length = 0;
and probably
treeView.onRowActivatedListeners = null;

These work, but it looks like the signal created in Signals.connectData (using g_signal_connect_data) is left behind and there is no direct way of removing it.

What's the best way to remove event handlers and not have any loose ends floating around without destroying the object the handlers are on itself?

Thanks,
Alex

pkgconfig should to go to /usr/share/pkgconfig

currently pkgconfig files are installed into

${DESTDIR}/${prefix}/lib/pkgconfig

but that is a wrong location for these files they should to go to

${DESTDIR}/${datadir}/pkgconfig

where datadir is usually /usr/share

$ LANG=C ls /usr/lib/pkgconfig
ls: cannot access /usr/lib/pkgconfig: No such file or directory
$ LANG=C ls /usr/share/pkgconfig
bash-completion.pc  dri2proto.pc   gnome-icon-theme.pc     kbproto.pc          resourceproto.pc     usbutils.pc          xf86dgaproto.pc      xproto.pc
bigreqsproto.pc     evieproto.pc   gnome-keybindings.pc    libquvi-scripts.pc  scrnsaverproto.pc    videoproto.pc        xf86driproto.pc      xproxymngproto.pc
compositeproto.pc   fixesproto.pc  gnome-video-effects.pc  randrproto.pc       shared-mime-info.pc  xcmiscproto.pc       xf86miscproto.pc
damageproto.pc      fontsproto.pc  ibus-typing-booster.pc  recordproto.pc      systemd.pc           xextproto.pc         xf86vidmodeproto.pc

GtkD 2.1 demos/builderTest segmentation fault

Hi,

I compiled builderTest with dmd 2.061 on Debian 32 without error.
But when I run it, I get a segfault at startup.

it seems to come from addFromFile call.

I tried with GtkD 1.7 and it works well.

any idea ?

Build gtkd lib failed on Windows 8 x64

D:\Develop\GtkD\src>dgen.exe
glib\Spawn.d(244): Error: core.stdc.stdio.fdopen at D:\Develop\DMD\src\druntime
import\core\stdc\stdio.d(758) conflicts with gtkc.glibtypes.fdopen at gtkc\glibt
ypes.d(114)
glib\Spawn.d(245): Error: core.stdc.stdio.fdopen at D:\Develop\DMD\src\druntime
import\core\stdc\stdio.d(758) conflicts with gtkc.glibtypes.fdopen at gtkc\glibt
ypes.d(114)
glib\Spawn.d(246): Error: core.stdc.stdio.fdopen at D:\Develop\DMD\src\druntime
import\core\stdc\stdio.d(758) conflicts with gtkc.glibtypes.fdopen at gtkc\glibt
ypes.d(114)
Digital Mars Librarian Version 8.02n
Copyright (C) Digital Mars 2000-2007 All Rights Reserved
http://www.digitalmars.com/ctg/lib.html

Error: GtkD.o : No such file or directory
std.file.FileException@std\file.d(419): GtkD.o: 绯荤粺鎵句笉鍒版寚瀹氱殑鏂囦欢銆


0x00423A20
0x004238AB
0x0040E0BC
0x0040201C
0x00409E06
0x00409A09
0x00406978
0x75978543 in BaseThreadInitThunk
0x77D6AC69 in RtlInitializeExceptionChain

0x77D6AC3C in RtlInitializeExceptionChain

D:\Develop\GtkD\src>

Please wrap Widget.addTickCallback with delegate support

What it says on the tin.

While it's not stressful or anything to just go ahead and do what I've always done for good ol' C code and set up my user data pointers and clean-up functions and such when using the current manifestation of addTickCallback, it'd be really nice for it to be D-ified the same way addOnDraw and company are.

Annnnnd the obligatory: thanks for this awesome awesome project~! It makes me feel warm and fuzzy inside. Like I'm a cat who's finished a happy hunt of field mice. Or something like that. :-D

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.