SameBoy/gtk3/util.h

25 lines
651 B
C

#ifndef util_h
#define util_h
#include <stdbool.h>
#include <gtk/gtk.h>
#include <Core/gb.h>
#include "types.h"
bool test_gl_support(void);
void gl_check_realize(GtkWidget *w, gpointer user_data_ptr);
void replace_extension(const char *src, size_t length, char *dest, const char *ext);
double clamp_double(double min, double max, double value);
double max_double(double a, double b);
double min_double(double a, double b);
uint32_t convert_color(uint16_t color);
uint32_t rgb_encode(GB_gameboy_t *gb, uint8_t r, uint8_t g, uint8_t b);
GB_model_t config_get_model_type(GuiData *gui_data);
GtkWidget *menubar_to_menu(GtkMenuBar *menubar);
#endif