label.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /** \file label.h
  2. * \brief Header: WLabel widget
  3. */
  4. #ifndef MC__WIDGET_LABEL_H
  5. #define MC__WIDGET_LABEL_H
  6. /*** typedefs(not structures) and defined constants **********************************************/
  7. #define LABEL(x) ((WLabel *)(x))
  8. /*** enums ***************************************************************************************/
  9. /*** structures declarations (and typedefs of structures)*****************************************/
  10. typedef struct
  11. {
  12. Widget widget;
  13. gboolean auto_adjust_cols; /* compute widget.cols from strlen(text)? */
  14. char *text;
  15. gboolean transparent; /* Paint in the default color fg/bg */
  16. } WLabel;
  17. /*** global variables defined in .c file *********************************************************/
  18. /*** declarations of public functions ************************************************************/
  19. WLabel *label_new (int y, int x, const char *text);
  20. void label_set_text (WLabel * label, const char *text);
  21. /* *INDENT-OFF* */
  22. void label_set_textv (WLabel * label, const char *format, ...) G_GNUC_PRINTF (2, 3);
  23. /* *INDENT-ON* */
  24. /*** inline functions ****************************************************************************/
  25. #endif /* MC__WIDGET_LABEL_H */