notify-wrapper.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /* notify.defs wrapper code.
  2. Copyright (C) 2008 Free Software Foundation, Inc.
  3. Written by FlÃvio Cruz <flaviocruz@gmail.com>
  4. This program is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU General Public License as
  6. published by the Free Software Foundation; either version 2, or (at
  7. your option) any later version.
  8. This program is distributed in the hope that it will be useful, but
  9. WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
  15. #ifndef NOTIFY_WRAPPER_H
  16. #define NOTIFY_WRAPPER_H
  17. /* module that enables lisp to change what
  18. * routines will be run on certain mach port
  19. * events. this header is specially made
  20. * to be used with swig
  21. */
  22. /* routines that can be set by the middle level */
  23. typedef enum
  24. {
  25. DO_MACH_NOTIFY_PORT_DELETED,
  26. DO_MACH_NOTIFY_MSG_ACCEPTED,
  27. DO_MACH_NOTIFY_PORT_DESTROYED,
  28. DO_MACH_NOTIFY_NO_SENDERS,
  29. DO_MACH_NOTIFY_SEND_ONCE,
  30. DO_MACH_NOTIFY_DEAD_NAME,
  31. _NUMBER_OF_ROUTINES
  32. } NotifyRoutine;
  33. /* we could make a function for every handler
  34. * but that would get kinda tedious
  35. * just use a generic pointer
  36. * that will be cast when needed
  37. */
  38. void set_notify_routine (const NotifyRoutine what, void *fun);
  39. #endif