idirectfb.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. /*
  2. (c) Copyright 2001-2010 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 __IDIRECTFB_H__
  24. #define __IDIRECTFB_H__
  25. #include <directfb.h>
  26. #include <fusion/reactor.h>
  27. #include <core/coredefs.h>
  28. #include <core/coretypes.h>
  29. /*
  30. * private data struct of IDirectFB
  31. */
  32. typedef struct {
  33. int ref; /* reference counter */
  34. CoreDFB *core;
  35. DFBCooperativeLevel level; /* current cooperative level */
  36. CoreLayer *layer; /* primary display layer */
  37. CoreLayerContext *context; /* shared context of primary layer */
  38. CoreWindowStack *stack; /* window stack of primary layer */
  39. struct {
  40. int width; /* IDirectFB stores window width */
  41. int height; /* and height and the pixel depth */
  42. DFBSurfacePixelFormat format; /* from SetVideoMode() parameters. */
  43. CoreWindow *window; /* implicitly created window */
  44. Reaction reaction; /* for the focus listener */
  45. bool focused; /* primary's window has the focus */
  46. CoreLayerContext *context; /* context for fullscreen primary */
  47. } primary; /* Used for DFSCL_NORMAL's primary. */
  48. bool app_focus;
  49. struct {
  50. CoreLayer *layer;
  51. CoreLayerContext *context;
  52. CoreLayerRegion *region;
  53. CoreSurface *surface;
  54. CorePalette *palette;
  55. } layers[MAX_LAYERS];
  56. } IDirectFB_data;
  57. /*
  58. * IDirectFB constructor/destructor
  59. */
  60. DFBResult IDirectFB_Construct ( IDirectFB *thiz,
  61. CoreDFB *core );
  62. void IDirectFB_Destruct ( IDirectFB *thiz );
  63. DFBResult IDirectFB_SetAppFocus( IDirectFB *thiz,
  64. DFBBoolean focused );
  65. /*
  66. * Remove the event buffer element from the internally managed linked list of
  67. * connections between event buffers created by
  68. * IDirectFB::CreateInputEventBuffer and input devices that are hot-plugged in.
  69. */
  70. void containers_remove_input_eventbuffer( IDirectFBEventBuffer *thiz );
  71. extern IDirectFB *idirectfb_singleton;
  72. #endif