Gooey GUI Library
Loading...
Searching...
No Matches
gooey_image.h File Reference

Image handling functions for the Gooey GUI library. More...

#include "common/gooey_common.h"

Go to the source code of this file.

Functions

GooeyImage * GooeyImage_Create (const char *image_path, int x, int y, int width, int height, void(*callback)(void))
 Adds an image to a Gooey window.
 
void GooeyImage_SetImage (GooeyImage *image, const char *image_path)
 

Detailed Description

Image handling functions for the Gooey GUI library.

Author
Yassine Ahmed Ali

This file contains functions for adding and drawing images in a Gooey window.

Function Documentation

◆ GooeyImage_Create()

GooeyImage * GooeyImage_Create ( const char *  image_path,
int  x,
int  y,
int  width,
int  height,
void(*)(void)  callback 
)

Adds an image to a Gooey window.

This function loads an image from the specified path and adds it to the given window at the specified position and dimensions. A callback function can be provided to handle interactions with the image.

Parameters
image_pathThe file path of the image to load.
xThe x-coordinate of the image's position.
yThe y-coordinate of the image's position.
widthThe width of the image.
heightThe height of the image.
callbackA callback function to handle interactions with the image (e.g., clicks).

◆ GooeyImage_SetImage()

void GooeyImage_SetImage ( GooeyImage *  image,
const char *  image_path 
)