2015 ソフトウェア設計及び演習用の班Wiki

15::gr05::gtk_lib.h

# ifndef _MY_GTK_LIB_H_
# define _MY_GTK_LIB_H_
# include <gtk/gtk.h>

# define WIDTH 800
# define HEIGHT 600

typedef PangoFontDescription My_Font_Desc;

void my_init(int argc, char *argv[]);

GtkWidget * my_window_new(gint width, gint height);

GtkWidget * my_label_new(char *label, My_Font_Desc *fontdescription);
GtkWidget * my_button_new(char *label, My_Font_Desc *fontdescription);
GtkWidget * my_image_new(char *path);

My_Font_Desc *my_font_description(const gchar *fontname);

GdkPixmap *my_pixmap_new_from_data(GtkWidget *window, char *path);

GtkWidget *my_drawing_area_new(int w, int h, GdkPixmap *pixmap, gboolean relative);

int
my_animation(GtkWidget *window, GtkWidget *drawin_area, gboolean (*handler)(gpointer), int timeout);

gint my_close_handler(GtkWidget *widget, gpointer gdata);
void my_button_clicked_handler(GtkWidget *widget, gpointer data);
gboolean my_set_click_and_remove(gboolean);
void my_widget_remove(GtkWidget *);

int my_timeout_add(int timeout, GSourceFunc handler, gpointer widget);

# endif


最終更新日:2015/06/26 15:31:28