background.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. /** \file background.h
  2. * \brief Header: WBackground widget
  3. */
  4. #ifndef MC__WIDGET_BACKGROUND_H
  5. #define MC__WIDGET_BACKGROUND_H
  6. /*** typedefs(not structures) and defined constants **********************************************/
  7. #define BACKGROUND(x) ((WBackground *) (x))
  8. #define CONST_BACKGROUND(x) ((const WBackground *) (x))
  9. /*** enums ***************************************************************************************/
  10. /*** structures declarations (and typedefs of structures)*****************************************/
  11. typedef struct
  12. {
  13. Widget widget;
  14. int color; /* Color to fill area */
  15. unsigned char pattern; /* Symbol to fill area */
  16. } WBackground;
  17. /*** global variables defined in .c file *********************************************************/
  18. /*** declarations of public functions ************************************************************/
  19. WBackground *background_new (int y, int x, int lines, int cols, int color, unsigned char pattern,
  20. widget_cb_fn callback);
  21. cb_ret_t background_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *data);
  22. /*** inline functions ****************************************************************************/
  23. #endif /* MC__WIDGET_BACKGROUND_H */