SameBoy/gtk3/util.h

33 lines
999 B
C
Raw Normal View History

2020-05-16 15:48:29 +00:00
#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);
gboolean is_separator(GtkTreeModel *model, GtkTreeIter *iter, gpointer data);
void set_combo_box_row_separator_func(GtkContainer *container);
gboolean scroll_to_bottom(GtkTextView *textview, GtkTextMark *mark);
2021-01-01 16:03:16 +00:00
gchar* format_scale_value_pct(GtkScale *scale, gdouble value);
2021-01-01 17:12:32 +00:00
gchar* format_scale_color_temperature(GtkScale *scale, gdouble value);
2021-01-01 16:03:16 +00:00
2020-05-16 15:48:29 +00:00
#endif