On Wed, 25 Jan 2006 20:35:30 +0100
Danny Milosavljevic <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Am Dienstag, den 24.01.2006, 07:19 -0200 schrieb Felipe Monteiro de
> Carvalho:
> > On 1/21/06, Danny Milosavljevic <[EMAIL PROTECTED]> wrote:
> > > I would guess you only need to realize the window (so that it has a
> > > GDK - i.e. X - drawable, for example)
> > >
> > > You could also connect to the "realize" signal to only be notified
> > > when the window is realized and save the drawable there.
> >
>
> > Well ..... fell free to try those things and submit a patch if they work
> > =)
>
> Right after I did the ~4000 other things in my TODO queue ;)
>
> (f.e. I do not have a system tray anymore so it would be quite some
> work)
>
> I do answer questions quickly though :)
>
> >
> > I don´t know much about Gtk and X11. I just copyed the GtkTrayIcon
> > component form Andrew Heines and adapted it to my interface, changing
> > the code until it worked =P
>
> I see :)
>
> >
> > > If anything is unclear with gtk2 stuff, just ask me :)
> >
> > The following lines on gtk1 interface:
> >
> > procedure TWidgetTrayIcon.CreateForm(id: Integer);
> > begin
> > .....
> > fDisplay :=
> > GDK_WINDOW_XDISPLAY(Pointer(PGtkWidget(GtkForm.Handle)^.window));
> > // SHowMessage(IntToStr(Integer(fDisplay)));
> > fWindow := GDK_WINDOW_XWINDOW
> > (Pointer(PGtkWidget(GtkForm.Handle)^.window)); fScreen :=
> > XDefaultScreenOfDisplay(fDisplay); // get the screen fScreenID :=
> > XScreenNumberOfScreen(fScreen); // and it's number
> > end;
> >
> > GDK_WINDOW_XDISPLAY doesn´t exist on the Gtk2 interface. It´s a X11
> > specific MACRO. I tryed to substitute this with:
>
> It does exist in gtk2 itself... though it's a little bit TOO low-level
> for my taste :)
>
> Better just use gtk_widget_get_screen and then
> gdk_x11_screen_get_xscreen, the latter being missing from the
> bindings.... there is no gdkx.pas in the bindings yet (not many people
> use the pascal gtk2 bindings for X interfacing it seems),
They are not yet in the FPC sources, because I had not the time to test
them:
lazarus/components/opengl/gtk2x11/gdk2x11.lpk
unit gdk2x.pas
Mattias
[...]
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives