• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

タグ
未設定

よく使われているワード(クリックで追加)

javaandroidc++linuxc#windowsobjective-ccocoaqtpython誰得phprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Cross-Platform OpenGL Windowing Library


コミットメタ情報

リビジョン0a26d6e1874912b667116c8cca95542fa285ba55 (tree)
日時2018-12-12 17:34:24
作者AlaskanEmily <emily@alas...>
コミッターAlaskanEmily

ログメッセージ

Add mouse movement event type

変更サマリ

差分

--- a/glow.h
+++ b/glow.h
@@ -39,6 +39,7 @@ extern "C" {
3939 enum Glow_EventType {
4040 eGlowKeyboardPressed,
4141 eGlowKeyboardReleased,
42+ eGlowMouseMoved,
4243 eGlowMousePressed,
4344 eGlowMouseReleased,
4445 eGlowResized,
--- a/glow_win32.c
+++ b/glow_win32.c
@@ -402,6 +402,11 @@ static BOOL glow_translate_event(const MSG *msg, struct Glow_Window *window,
402402 out_event->type = pressed ?
403403 eGlowMousePressed : eGlowMouseReleased;
404404 return TRUE;
405+ case WM_MOUSEMOVE:
406+ glow_translate_local_mouse_pos(&msg->pt,
407+ window, out_event->value.mouse.xy);
408+ out_event->type = eGlowMouseMoved;
409+ return TRUE;
405410 case WM_DESTROY:
406411 case WM_CLOSE:
407412 case WM_QUIT:
--- a/glow_x11.c
+++ b/glow_x11.c
@@ -318,6 +318,11 @@ glow_get_event_start:
318318 return 0;
319319 }
320320 return 1;
321+ case MotionNotify:
322+ out->type = eGlowMouseMoved;
323+ out->value.mouse.xy[0] = event.xmotion.x;
324+ out->value.mouse.xy[1] = event.xmotion.y;
325+ return 1;
321326 case UnmapNotify:
322327 case DestroyNotify:
323328 out->type = eGlowQuit;