$> brew install sdl2
and optionally:
$> brew install sdl2_image
$> brew install sdl2_mixer
$> brew install sdl2_gfx
$> brew install sdl2_ttf
CC=gcc | |
CFLAGS=-std=c99 -lm | |
MRUBY_INCLUDE=../../mruby-3.1.0/include | |
MRUBY_LIB=../../mruby-3.1.0/build/host/lib/libmruby.a | |
SOURCE=c_from_ruby | |
all: | |
$(CC) $(CFLAGS) -I$(MRUBY_INCLUDE) $(SOURCE).c -o $(SOURCE) $(MRUBY_LIB) | |
clean: |
module KeyMap | |
def self.set(mapping) | |
mapping.each_pair do |command,key| | |
GTK::KeyboardKeys.send :alias_method, command, key | |
end | |
end | |
def self.unset(mapping) | |
mapping.each_pair do |command,key| | |
GTK::KeyboardKeys.send :undef_method, command |