Re: [AD] Patch to prototype _xwin_handle_input |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Fri, Jan 21, 2000 at 08:57:38AM +0600, Michael Bukin wrote:
> It will be necessary to test that Xlib function is called before
> calling any X function, because someone can call X functions from
> xwin.c (directly or indirectly) inside timer procedure (e.g. vsync,
> blit or set_palette).
I thought that was illegal anyway though. I know that in DOS
some Allegro routines are used in this context, and in the past
people have asked whether they can call Allegro functions, and I
don't think Shawn's given a positive answer -- IIRC it was more
like `if Allegro does it internally, you may be able to do it,
but we don't guarrantee that it will work'.
I have no idea whether Linux console Allegro would be OK with
these sorts of things, either -- I just made no attempt to make
it safe in that way.
> Why do you need to disable interrupts for a long time (and for how
> long)?.
I don't know the exact duration. AllegroGL intercepts Allegro's
startup and creates the window in such a way that the user can
make OpenGL calls to render onto it. The OpenGL calls are
basically X calls, though, so you have to disable the interrupts
or the whole rendering period, while you do your drawing.
> All public routines should be prototyped in src/x/xwin.h, those
> routines that were not prototyped should be static (or prototyped).
> Perhaps, prototypes should be moved to public X specific header and
> xwin.h can be removed completely.
Oops! Sorry, I didn't notice that header file at all. I was
wondering why the X version didn't have a specific
`allegro/aintx.h' header file. `_xwin_handle_input' was
prototyped in `src/x/xwin.h', yes.
George