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

17gr08::eventモジュール

event.h

# ifndef _EVENT_H_<bt> # define _EVENT_H_

# include <stdlib.h>
# include <glib.h>
# include <glib/gprintf.h>
# include <gtk/gtk.h>
# include <gdk-pixbuf/gdk-pixbuf.h>
# include <gtk_lib.h>

typedef
struct {
GtkWidget *widget;

gpointer self;

GdkEventMotion *motion_event;
GdkEventButton *button_event;
GdkEventKey *key_event;

GSourceFunc m_notify;
GSourceFunc m_press;
GSourceFunc m_release;
GSourceFunc k_press;
GSourceFunc k_release;
}
myEvent;

myEvent *my_event_new(GtkWidget *widget);
void my_event_set(myEvent *ev, gpointer sprite);

# endif

event.c

主にキー入力やボタンクリック時の入力を読み取るソース


最終更新日:2017/08/04 03:33:26