Re: [fpc-pascal] D-Bus. Non blocking listening for signals

2011-01-13 Thread dibo20
W dniu 13.01.2011 21:12, Henry Vermaak pisze: On 13 January 2011 19:51, wrote: I'm trying with "dbus_connection_set_watch_functions" but this is not easy like it look. I thought that I must only register my event procedures by calling this functions but there is much more work. I have a headach

Re: [fpc-pascal] D-Bus. Non blocking listening for signals

2011-01-13 Thread Henry Vermaak
On 13 January 2011 19:51, wrote: > > I'm trying with "dbus_connection_set_watch_functions" but this is not easy > like it look. I thought that I must only register my event procedures by > calling this functions but there is much more work. I have a headache. Now I > understand why dbus documenta

Re: [fpc-pascal] D-Bus. Non blocking listening for signals

2011-01-13 Thread dibo20
W dniu 13.01.2011 16:02, Henry Vermaak pisze: On 13/01/11 15:00, Henry Vermaak wrote: On 13/01/11 12:24, dib...@wp.pl wrote: "integrate the GLib event loop with an external event loop" - I think this is what I want. What you want to do is to integrate the dbus connection into your main loop

Re: [fpc-pascal] D-Bus. Non blocking listening for signals

2011-01-13 Thread Matthias Klumpp
On Thu, 13 Jan 2011 15:20:47 +0100, dib...@wp.pl wrote: > W dniu 13.01.2011 14:41, Matthias Klumpp pisze: >> Hi! >> I developed the Listaller Project, a cross-distro Linux software manager, >> which uses techniques like D-BUS and PolicyKit and had very similar >> problems. You can run Qt4 applicati

Re: [fpc-pascal] Re: FPC programs in Android without JNI

2011-01-13 Thread Felipe Monteiro de Carvalho
On Thu, Jan 13, 2011 at 4:38 PM, Jeppe Johansen wrote: > I think you can put the units there if you want. I can't figure that site > out It's a source forge project. I added the files here: http://lazarus-ccr.svn.sourceforge.net/viewvc/lazarus-ccr/bindings/android-ndk/ If you would like to main

Re: [fpc-pascal] Re: FPC programs in Android without JNI

2011-01-13 Thread Jeppe Johansen
Den 13-01-2011 15:58, Felipe Monteiro de Carvalho skrev: Hello, On Tue, Dec 28, 2010 at 4:17 AM, Jeppe Johansen wrote: They are C APIs indeed. I just took a stab at it, and after a long day of pointer errors in converted C code and really, really badly descriptions of error messages, I managed

Re: [fpc-pascal] D-Bus. Non blocking listening for signals

2011-01-13 Thread Henry Vermaak
On 13/01/11 15:00, Henry Vermaak wrote: On 13/01/11 12:24, dib...@wp.pl wrote: "integrate the GLib event loop with an external event loop" - I think this is what I want. What you want to do is to integrate the dbus connection into your main loop (in this case glib). Let me quote from the docu

Re: [fpc-pascal] D-Bus. Non blocking listening for signals

2011-01-13 Thread Henry Vermaak
On 13/01/11 12:24, dib...@wp.pl wrote: "integrate the GLib event loop with an external event loop" - I think this is what I want. What you want to do is to integrate the dbus connection into your main loop (in this case glib). Let me quote from the documentation: "If you're using GLib or Q

Re: [fpc-pascal] Re: FPC programs in Android without JNI

2011-01-13 Thread Felipe Monteiro de Carvalho
Hello, On Tue, Dec 28, 2010 at 4:17 AM, Jeppe Johansen wrote: > They are C APIs indeed. I just took a stab at it, and after a long day of > pointer errors in converted C code and really, really badly descriptions of > error messages, I managed to port the example from here > http://developer.andr

Re: [fpc-pascal] D-Bus. Non blocking listening for signals

2011-01-13 Thread dibo20
W dniu 13.01.2011 15:17, michael.vancann...@wisa.be pisze: On Thu, 13 Jan 2011, dib...@wp.pl wrote: This code work too: TMyObj = class private procedure EventProc(AData: PtrInt; AFlags: dword); end; var Sock: cint; p: PEventHandler; const GLIB_SYSDEF_POLLIN = 1; GLIB_SYSDEF_POLLOUT = 4; GL

Re: [fpc-pascal] D-Bus. Non blocking listening for signals

2011-01-13 Thread dibo20
W dniu 13.01.2011 14:41, Matthias Klumpp pisze: Hi! I developed the Listaller Project, a cross-distro Linux software manager, which uses techniques like D-BUS and PolicyKit and had very similar problems. You can run Qt4 applications which use GLib (but only GLib!), but you need to call g_type_ini

Re: [fpc-pascal] D-Bus. Non blocking listening for signals

2011-01-13 Thread michael . vancanneyt
On Thu, 13 Jan 2011, dib...@wp.pl wrote: This code work too: TMyObj = class private procedure EventProc(AData: PtrInt; AFlags: dword); end; var Sock: cint; p: PEventHandler; const GLIB_SYSDEF_POLLIN = 1; GLIB_SYSDEF_POLLOUT = 4; GLIB_SYSDEF_POLLPRI = 2; GLIB_SYSDEF_POLLERR = 8; GLIB_SYSDEF_

Re: [fpc-pascal] D-Bus. Non blocking listening for signals

2011-01-13 Thread michael . vancanneyt
On Thu, 13 Jan 2011, Matthias Klumpp wrote: g_main_context_set_poll_func is only used for the GTK widget set. You'll have to test separately with Qt. Hi! I developed the Listaller Project, a cross-distro Linux software manager, which uses techniques like D-BUS and PolicyKit and had very simil

Re: [fpc-pascal] D-Bus. Non blocking listening for signals

2011-01-13 Thread dibo20
This code work too: TMyObj = class private procedure EventProc(AData: PtrInt; AFlags: dword); end; var Sock: cint; p: PEventHandler; const GLIB_SYSDEF_POLLIN = 1; GLIB_SYSDEF_POLLOUT = 4; GLIB_SYSDEF_POLLPRI = 2; GLIB_SYSDEF_POLLERR = 8; GLIB_SYSDEF_POLLHUP = 16; GLIB_SYSDEF_POLLNVAL = 32; ALL

Re: [fpc-pascal] D-Bus. Non blocking listening for signals

2011-01-13 Thread Matthias Klumpp
On Thu, 13 Jan 2011 13:32:29 +0100 (CET), michael.vancann...@wisa.be wrote: > On Thu, 13 Jan 2011, dib...@wp.pl wrote: > >> W dniu 10.01.2011 20:41, Michael Van Canneyt pisze: >>> >>> >>> On Mon, 10 Jan 2011, dib...@wp.pl wrote: >>> Sorry for refreshing, but the problem is still present :(

Re: [fpc-pascal] D-Bus. Non blocking listening for signals

2011-01-13 Thread dibo20
W dniu 13.01.2011 13:40, Henry Vermaak pisze: On 13/01/11 12:24, dib...@wp.pl wrote: Did you receive my mail with demo? I think I found temporary solution. Can you send me the source for this, too? Thanks Henry ___ fpc-pascal maillist - fpc-pascal@

Re: [fpc-pascal] D-Bus. Non blocking listening for signals

2011-01-13 Thread Henry Vermaak
On 13/01/11 12:24, dib...@wp.pl wrote: Did you receive my mail with demo? I think I found temporary solution. Can you send me the source for this, too? Thanks Henry ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.

Re: [fpc-pascal] D-Bus. Non blocking listening for signals

2011-01-13 Thread michael . vancanneyt
On Thu, 13 Jan 2011, dib...@wp.pl wrote: W dniu 10.01.2011 20:41, Michael Van Canneyt pisze: On Mon, 10 Jan 2011, dib...@wp.pl wrote: Sorry for refreshing, but the problem is still present :( . It works perfect on my mashine (ubuntu 10.10 64 bit) but doesn't work on my friends computer.

Re: [fpc-pascal] D-Bus. Non blocking listening for signals

2011-01-13 Thread dibo20
W dniu 10.01.2011 20:41, Michael Van Canneyt pisze: On Mon, 10 Jan 2011, dib...@wp.pl wrote: Sorry for refreshing, but the problem is still present :( . It works perfect on my mashine (ubuntu 10.10 64 bit) but doesn't work on my friends computer. For example, one of my friend have this same

Re: [fpc-pascal] Re: Lo

2011-01-13 Thread Tomas Hajny
On Thu, January 13, 2011 11:53, Jonas Maebe wrote: > > On 13 Jan 2011, at 09:32, Tomas Hajny wrote: > >> On Thu, January 13, 2011 09:01, _-jan...@web.de wrote: >>> A simple but fully functional kludge to make lo compatible with >>> Delphi is >>> >>> type lo=byte; >>> >>> Unfortunately for the simil

Re: [fpc-pascal] Re: Lo

2011-01-13 Thread Jonas Maebe
On 13 Jan 2011, at 09:32, Tomas Hajny wrote: On Thu, January 13, 2011 09:01, _-jan...@web.de wrote: A simple but fully functional kludge to make lo compatible with Delphi is type lo=byte; Unfortunately for the similar cases of hi and swap you must provide a function which cannot be used in

Re: [fpc-pascal] Re: Lo

2011-01-13 Thread Carsten Bager
> Well, you should probably mention that this replacement solution is not > portable to big endian platforms / targets. > > Tomas If one want to write portable code, what would be best, or would both work on a big endian platform. Carsten var b:byte; i:LongInt; b := i and 255; b:= i m

Re: [fpc-pascal] Re: Lo

2011-01-13 Thread Tomas Hajny
On Thu, January 13, 2011 09:01, _-jan...@web.de wrote: > A simple but fully functional kludge to make lo compatible with Delphi is > > type lo=byte; > > Unfortunately for the similar cases of hi and swap you must provide a > function which cannot be used in a manifest constant expression. Well, y

[fpc-pascal] Re: Lo

2011-01-13 Thread _-jane-_
A simple but fully functional kludge to make lo compatible with Delphi is type lo=byte; Unfortunately for the similar cases of hi and swap you must provide a function which cannot be used in a manifest constant expression. ___ WEB.DE DSL D