arena.h 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*
  2. (c) Copyright 2001-2009 The world wide DirectFB Open Source Community (directfb.org)
  3. (c) Copyright 2000-2004 Convergence (integrated media) GmbH
  4. All rights reserved.
  5. Written by Denis Oliver Kropp <dok@directfb.org>,
  6. Andreas Hundt <andi@fischlustig.de>,
  7. Sven Neumann <neo@directfb.org>,
  8. Ville Syrjälä <syrjala@sci.fi> and
  9. Claudio Ciccani <klan@users.sf.net>.
  10. This library is free software; you can redistribute it and/or
  11. modify it under the terms of the GNU Lesser General Public
  12. License as published by the Free Software Foundation; either
  13. version 2 of the License, or (at your option) any later version.
  14. This library is distributed in the hope that it will be useful,
  15. but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  17. Lesser General Public License for more details.
  18. You should have received a copy of the GNU Lesser General Public
  19. License along with this library; if not, write to the
  20. Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  21. Boston, MA 02111-1307, USA.
  22. */
  23. #ifndef __FUSION__ARENA_H__
  24. #define __FUSION__ARENA_H__
  25. #include <fusion/types.h>
  26. typedef int (*ArenaEnterFunc) (FusionArena *arena, void *ctx);
  27. typedef int (*ArenaExitFunc) (FusionArena *arena, void *ctx, bool emergency);
  28. DirectResult fusion_arena_enter (FusionWorld *world,
  29. const char *name,
  30. ArenaEnterFunc initialize,
  31. ArenaEnterFunc join,
  32. void *ctx,
  33. FusionArena **ret_arena,
  34. int *ret_error);
  35. DirectResult fusion_arena_add_shared_field (FusionArena *arena,
  36. const char *name,
  37. void *data);
  38. DirectResult fusion_arena_get_shared_field (FusionArena *arena,
  39. const char *name,
  40. void **data);
  41. DirectResult fusion_arena_exit (FusionArena *arena,
  42. ArenaExitFunc shutdown,
  43. ArenaExitFunc leave,
  44. void *ctx,
  45. bool emergency,
  46. int *ret_error);
  47. #endif