about the path, I just found that there is pkg-config support so it does not matter anyway - I just build with "gcc `pkg-config --cflags --libs gobject-2.0 libwacom` test.c -o./test" now. Also, adding g_type_init() at the beginning of test program made libwacom_new_from_path work just like libwacom_new_from_usbid (giving WERROR_UNKNOWN_MODEL for me) - so got some progress :) Just curious, is the end user supposed to call this g_type_init(), or it got missing from the source?
Anyway, now that I was able to get past this block, I allowed it to fallback to generic, and tried doing some probes - it found stylus and 4 buttons even that it did not found the device type. I already see how useful this will be in near future, when database will be more complete. On Sat, Dec 17, 2011 at 7:39 PM, Andrzej Giniewicz <[email protected]> wrote: > Hi, > > today I found libwacom 0.1 on sf.net page, it looks great and I > already made an Arch Linux package so people can start using it in > their projects. I also wanted to check if I will be able to find some > details on my device using this lib (actually I made this as part of > learning Python ctypes and calling functions from C libs, but that's > another story :)) - anyway, I was unable to get device by path, is > this already known thing? I did simple: > > #include "libwacom/libwacom.h" > > int main() { > WacomError* error = libwacom_error_new(); > WacomDeviceDatabase* database = libwacom_database_new(); > WacomDevice* device = libwacom_new_from_path(database, > "/dev/input/wacom", 0, error); > return 0; > } > > with device correctly created, connected and working (link made by > udev, it is pointing to event7 which is stylus of my 0xD1 Bamboo > Pen&Touch). I built it using "gcc -I /usr/include/libwacom-1.0 -lwacom > test.c -o test" (btw, I believe the libwacom-1.0 could be removed from > path, i.e. it would be easier to find if it was in > /usr/include/libwacom/libwacom.h for example), anyway, it builds > without issue, but when I run the simple thing that should return > device or NULL on error, at least according to documentation, the app > hangs forever with following output: > > (process:6319): GLib-GObject-CRITICAL **: gtype.c:2715: You forgot to > call g_type_init() > > (process:6319): GLib-CRITICAL **: g_once_init_leave: assertion > `initialization_value != 0' failed > > (process:6319): GLib-GObject-CRITICAL **: g_object_new: assertion > `G_TYPE_IS_OBJECT (object_type)' failed > > if this is new thing, I'd be happy in helping to track it down :) > > Cheers, > Andrzej. ------------------------------------------------------------------------------ Learn Windows Azure Live! Tuesday, Dec 13, 2011 Microsoft is holding a special Learn Windows Azure training event for developers. It will provide a great way to learn Windows Azure and what it provides. You can attend the event by watching it streamed LIVE online. Learn more at http://p.sf.net/sfu/ms-windowsazure _______________________________________________ Linuxwacom-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel
