On Tue, 15 Aug 2006 13:19:51 -0400 Andrew Haines <[EMAIL PROTECTED]> wrote:
> A.J. Venter wrote: > >>> Basically I don't know if lazarus CAN do what I need for this > >>> part... and before I can finalize design, I need to know if this > >>> will be a form inside the app or a sepperate program altogether > >>> acting as a plugin. > >> I'm not sure that X/The Window manager can do what you want ? > >> This is not a Lazarus matter alone. > > That part at least I CAN answer. It can, there is a wm hint for > > this. The reason I know is that I have done it before. > > If you use SDL and create your screen with OR SDL_FullScreen it > > does exactly that . > > The real question is if you can do this in lazarus - I am pretty > > sure GTK ALSO has a function for it (not ABSOLUTELY sure in this > > case though). > > > > I used the SDL plugin mechanism in direqcafe up to and including > > version 3.x - as I am starting on version 4.0 (with new name > > zycafe) I would LIKE if possible to do that WITHOUT the SDL > > dependency though. > > > > In theory somebody with sufficient knowledge of C and xlib should > > be able to figure out how it's done by looking at the SDL code, and > > possibly implementing something like an fs_FullScreen or perhaps a > > TFullScreen component based on it (e.g. a nonvisual component you > > can drop on a form to make the form fullscreen which also lets you > > set parameters like 'grab keyboard' or such) ? > > For windows the sheer AMOUNT of existing full-screen apps suggest > > there is a almost certainly a win32 API call for it. > > > > I won't lie and pretend I am good enough at C and Xlib to do it by > > myself (I could but I don't have the TIME for all the research I > > would need to do first) but if anybody else would have a use for > > such a function, we could work together on it. > > I have done some xlib work in lazarus before TScreenSize uses it > > under Linux. > > > > Either way - the consensus seems to be that lazarus cannot do it at > > present ? > > > > A.J. > > > > Hi, the attached tar.bz2 project shows how to use a lcl x11/gtk1 form > fullscreen and have exclusivly the mouse and keyboard. > > Gtk2 is possible as well, you just need to make minor changes to > Form2X11Window Thanks. I added those functions to gtkproc.pp: procedure SetWindowFullScreen(AForm: TCustomForm; const AValue: Boolean); procedure GrabKeyBoardToForm(AForm: TCustomForm); procedure ReleaseKeyBoardFromForm(AForm: TCustomForm); procedure GrabMouseToForm(AForm: TCustomForm); procedure ReleaseMouseFromForm(AForm: TCustomForm); function FormToX11Window(const AForm: TCustomForm): X.TWindow; Now we need some nice function names for the LCL. In some sense fullscreen is a windowstate. So maybe we should add it 'wsFullScreen' to TWindowState. OTOH a fullscreen is just a special wsMaximized, so a FullScreen boolean property might be better. Comments? The exclusive grab of mouse and keyboard functions for TCustomForm: procedure GrabKeyboard; // grab even winow manager keys procedure ReleaseKeyboard;// undo GrabKeyboard procedure GrabMouse; // grab mouse for form and childs procedure ReleaseMouse;// undo GrabMouse Comments? Mattias _________________________________________________________________ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives