[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Friday 17 December 2004 03:18, Jon Rafkind wrote:
> I have hacked on xwin.c to enable window resizing in X11 which works
> fine but I have not found a clean way yet to update the graphics driver
> and the current screen bitmap. Im not familiar enough with the Allegro
> internals to know of a good way to do this. Would a callback work? The
> way I imagine it is when the ConfigureNotify event is received in the X
> event handler, it calls a function pointer much like what
> _xwin_mouse_interrupt is, to reconfigure the gfx driver and update the
> screen bitmap. It would also call a user supplied call back( if one is
> set ) to let the user update their own stuff.
Very cool. The Window resizing function is a new entry in the gfx_vtable?
The way I would assume this works from a user perspective is that the user
registers a callback function that gets called when the screen is resized
(with the new (and possibly old) dimensions as parameter. I do think you
need to enable window resizing for it to work though (ie, the default is a
window that cannot be resized).
I'd imagine a set_resize_callback(...) function similar to
set_close_button_callback(...).
> The xwin code doesnt seem to "know" about the current graphics driver,
> though, except for the times that it is passed into a function such as
> _xwin_create_screen. Is there some way to get the current gfx driver?
You can use the gfx_driver global.
Evert