Use typedef

This commit is contained in:
Hajime Hoshi 2013-10-13 23:39:10 +09:00
parent ea6e88d06e
commit a6ebcbbda6
3 changed files with 4 additions and 4 deletions

View File

@ -55,7 +55,7 @@ func ebiten_EbitenOpenGLView_Updating() {
}
//export ebiten_EbitenOpenGLView_InputUpdated
func ebiten_EbitenOpenGLView_InputUpdated(inputType C.int, cx, cy C.int) {
func ebiten_EbitenOpenGLView_InputUpdated(inputType C.InputType, cx, cy C.int) {
if inputType == C.InputTypeMouseUp {
currentUI.input <- ebiten.InputState{-1, -1}
return

View File

@ -5,7 +5,7 @@
void ebiten_EbitenOpenGLView_Initialized(void);
void ebiten_EbitenOpenGLView_Updating(void);
void ebiten_EbitenOpenGLView_InputUpdated(enum InputType inputType, int x, int y);
void ebiten_EbitenOpenGLView_InputUpdated(InputType inputType, int x, int y);
// Reference:
// http://developer.apple.com/library/mac/#qa/qa1385/_index.html

View File

@ -1,10 +1,10 @@
#ifndef GO_EBITEN_UI_COCOA_INPUT_H_
#define GO_EBITEN_UI_COCOA_INPUT_H_
enum InputType {
typedef enum {
InputTypeMouseUp,
InputTypeMouseDragged,
InputTypeMouseDown,
};
} InputType;
#endif