diff options
| author | Connor Thomson <blumatrikz@gmail.com> | 2026-09-08 18:27:39 -0700 |
|---|---|---|
| committer | Connor Thomson <blumatrikz@gmail.com> | 2026-09-08 18:27:39 -0700 |
| commit | f1ddc12b68b4e4c8087962de25260470e6df2bea (patch) | |
| tree | 7d0440a6402a9b0ef75ded23fa64b68534255bba /src/widget/widget_image.c | |
| parent | 6025860a61386bf767b29c3ec5fd0d31285f1056 (diff) | |
Add tuxanci2 files
Diffstat (limited to 'src/widget/widget_image.c')
| -rw-r--r-- | src/widget/widget_image.c | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/src/widget/widget_image.c b/src/widget/widget_image.c deleted file mode 100644 index 51f935a..0000000 --- a/src/widget/widget_image.c +++ /dev/null @@ -1,51 +0,0 @@ -#include <stdlib.h> -#include <assert.h> - -#include <stdlib.h> -#include "main.h" -#include "image.h" -#include "interface.h" -#include "font.h" - -#include "widget.h" -#include "widget_image.h" - -widget_t *wid_image_new(int x, int y, image_t *image) -{ - widget_image_t *new; - - new = malloc(sizeof(widget_image_t)); - new->image = image; - - return widget_new(WIDGET_TYPE_IMAGE, x, y, image->w, image->h, new); -} - -void wid_image_draw(widget_t *widget) -{ - widget_image_t *p; - - assert(widget != NULL); - assert(widget->type == WIDGET_TYPE_IMAGE); - - p = (widget_image_t *) widget->private_data; - image_draw(p->image, widget->x, widget->y, 0, 0, p->image->w, p->image->h); -} - -void wid_image_event(widget_t *widget) -{ - assert(widget != NULL); - assert(widget->type == WIDGET_TYPE_IMAGE); -} - -void wid_image_destroy(widget_t *widget) -{ - widget_image_t *p; - - assert(widget != NULL); - assert(widget->type == WIDGET_TYPE_IMAGE); - - p = (widget_image_t *) widget->private_data; - - free(p); - widget_destroy(widget); -} |