/src/os/sylixos/ftk_sylixos.h

http://ftk.googlecode.com/ · C Header · 93 lines · 48 code · 16 blank · 29 comment · 0 complexity · 027b282b3a3e8b7e5ed8426ea1a91545 MD5 · raw file

  1. /*
  2. * File: ftk_sylixos.h
  3. * Author: Han.hui <sylixos@gmail.com>
  4. * Brief: sylixos specific functions.
  5. *
  6. * Copyright (c) 2009 - 2010 Li XianJing <xianjimli@hotmail.com>
  7. *
  8. * Licensed under the Academic Free License version 2.1
  9. *
  10. * This program is free software; you can redistribute it and/or modify
  11. * it under the terms of the GNU General Public License as published by
  12. * the Free Software Foundation; either version 2 of the License, or
  13. * (at your option) any later version.
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU General Public License
  21. * along with this program; if not, write to the Free Software
  22. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  23. */
  24. /*
  25. * History:
  26. * ================================================================
  27. * 2011-05-15 Han.hui <sylixos@gmail.com> created
  28. *
  29. */
  30. #ifndef FTK_SYLIXOS_H
  31. #define FTK_SYLIXOS_H
  32. #include <fcntl.h>
  33. #include <dirent.h>
  34. #include <sys/types.h>
  35. #include <sys/types.h>
  36. #include <sys/stat.h>
  37. #include <unistd.h>
  38. #include <ctype.h>
  39. #include <mouse.h>
  40. #include <keyboard.h>
  41. #include <sys/select.h>
  42. #include <sys/time.h>
  43. #include <sys/types.h>
  44. #include <sys/socket.h>
  45. #define div_t lib_div_t
  46. #define FTK_ROOT_DIR "/ftk"
  47. #define DATA_DIR FTK_ROOT_DIR
  48. #define LOCAL_DATA_DIR FTK_ROOT_DIR
  49. #define FTK_DATA_ROOT FTK_ROOT_DIR"/data"
  50. #define TESTDATA_DIR FTK_ROOT_DIR"/testdata"
  51. #define FTK_FONT_DIR FTK_ROOT_DIR"/data"
  52. #define APP_DATA_DIR FTK_ROOT_DIR"/apps"
  53. #define APP_LOCAL_DATA_DIR FTK_ROOT_DIR"/apps"
  54. #define FTK_FONT "font.ttf"
  55. #define FTK_CNF FTK_ROOT_DIR"/ftk.conf"
  56. #define ftk_strncpy strncpy
  57. #define ftk_snprintf snprintf
  58. #define ftk_vsnprintf vsnprintf
  59. #define ftk_getcwd getcwd
  60. #define ftk_sscanf sscanf
  61. #define ftk_pipe_pair(fds) pipe(fds)
  62. #define ftk_pipe_close(fd) close(fd)
  63. #define ftk_pipe_recv(fd, buf, length) read(fd, buf, length)
  64. #define ftk_pipe_send(fd, buf, length) write(fd, buf, length)
  65. #ifndef __cplusplus
  66. void ftk_assert(int cond, const char* func, const char* file, int line);
  67. #undef assert
  68. #define assert(cond) ftk_assert(cond, __func__, __FILE__, __LINE__)
  69. #endif
  70. #define min(a,b) ((a) < (b) ? (a) : (b))
  71. #include "./config_ftk.h"
  72. #define FTK_PATH_DELIM '/'
  73. #define FTK_HAS_MAIN 0
  74. #define FTK_HAS_DLOPEN 1
  75. #define FTK_HAS_LUA 1
  76. #define FTK_OPTIMIZE_WIDGET_PAINT 0
  77. #endif /* FTK_SYLIXOS_H */