No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /*
  2. * libcaca Colour ASCII-Art library
  3. * Copyright (c) 2002-2009 Sam Hocevar <sam@hocevar.net>
  4. * All Rights Reserved
  5. *
  6. * $Id$
  7. *
  8. * This library is free software. It comes without any warranty, to
  9. * the extent permitted by applicable law. You can redistribute it
  10. * and/or modify it under the terms of the Do What The Fuck You Want
  11. * To Public License, Version 2, as published by Sam Hocevar. See
  12. * http://sam.zoy.org/wtfpl/COPYING for more details.
  13. */
  14. /*
  15. * This file contains a null libcaca input and output driver
  16. */
  17. #include "config.h"
  18. #if !defined(__KERNEL__)
  19. #include "caca.h"
  20. #include "caca_internals.h"
  21. static int null_init_graphics(caca_display_t *dp)
  22. {
  23. return 0;
  24. }
  25. static int null_end_graphics(caca_display_t *dp)
  26. {
  27. return 0;
  28. }
  29. static int null_set_display_title(caca_display_t *dp, char const *title)
  30. {
  31. return -1;
  32. }
  33. static int null_get_display_width(caca_display_t const *dp)
  34. {
  35. return 0;
  36. }
  37. static int null_get_display_height(caca_display_t const *dp)
  38. {
  39. return 0;
  40. }
  41. static void null_display(caca_display_t *dp)
  42. {
  43. ;
  44. }
  45. static void null_handle_resize(caca_display_t *dp)
  46. {
  47. ;
  48. }
  49. static int null_get_event(caca_display_t *dp, caca_privevent_t *ev)
  50. {
  51. ev->type = CACA_EVENT_NONE;
  52. return 0;
  53. }
  54. /*
  55. * Driver initialisation
  56. */
  57. int null_install(caca_display_t *dp)
  58. {
  59. dp->drv.id = CACA_DRIVER_NULL;
  60. dp->drv.driver = "null";
  61. dp->drv.init_graphics = null_init_graphics;
  62. dp->drv.end_graphics = null_end_graphics;
  63. dp->drv.set_display_title = null_set_display_title;
  64. dp->drv.get_display_width = null_get_display_width;
  65. dp->drv.get_display_height = null_get_display_height;
  66. dp->drv.display = null_display;
  67. dp->drv.handle_resize = null_handle_resize;
  68. dp->drv.get_event = null_get_event;
  69. dp->drv.set_mouse = NULL;
  70. dp->drv.set_cursor = NULL;
  71. return 0;
  72. }
  73. #endif /* !__KERNEL__ */