zori_button.h 866 B

1234567891011121314151617181920212223242526272829303132
  1. #ifndef zori_button_H_INCLUDED
  2. #define zori_button_H_INCLUDED
  3. #include "zori.h"
  4. #include "zori_caption.h"
  5. #define ZORI_WIDGET_TYPE_BUTTON ZORI_WIDGET_TYPE('z','b','u','t')
  6. struct zori_button {
  7. struct zori_widget widget;
  8. struct zori_caption caption;
  9. int align;
  10. };
  11. struct zori_button *zori_widget_to_button(struct zori_widget *widget);
  12. int zori_button_on_mouse_axes(union zori_event *event);
  13. int zori_button_on_mouse_click(union zori_event *event);
  14. void zori_draw_button(struct zori_button *button);
  15. int zori_button_on_draw(union zori_event *event);
  16. struct zori_button *zori_button_init(struct zori_button *button, const char *text);
  17. struct zori_button *zori_button_new(zori_id id, zori_id parent, zori_box *box, const char *text);
  18. zori_id zori_new_button(zori_id id, zori_id parent, zori_box *box, const char * text);
  19. #endif