• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Cross-Platform OpenGL Windowing Library


Commit MetaInfo

修订版b24c243c2b46b87cd865db972591ae5d6b771f3a (tree)
时间2020-01-04 16:57:07
作者AlaskanEmily <emily@alas...>
CommiterAlaskanEmily

Log Message

Slightly nicer formatting

更改概述

差异

--- a/glow.h
+++ b/glow.h
@@ -12,6 +12,8 @@
1212 extern "C" {
1313 #endif
1414
15+/******************************************************************************/
16+
1517 #if defined ( __GNUC__ ) && ( __GNUC__ > 4 )
1618 #define GLOW_CONST __attribute__((const))
1719 #define GLOW_PURE __attribute__((pure))
@@ -22,9 +24,13 @@ extern "C" {
2224 #define GLOW_RETURNS_NOT_NULL
2325 #endif
2426
27+/******************************************************************************/
28+/* Flags for Glow_CreateWindow */
2529 #define GLOW_RESIZABLE (1<<0)
2630 #define GLOW_UNDECORATED (1<<1)
2731
32+/******************************************************************************/
33+
2834 #if defined _WIN32 && defined GLOW_DLL
2935 #ifdef GLOW_EXPORTS
3036 #define GLOW_EXPORT __declspec(dllexport)
@@ -35,6 +41,7 @@ extern "C" {
3541 #define GLOW_EXPORT
3642 #endif
3743
44+/******************************************************************************/
3845
3946 enum Glow_EventType {
4047 eGlowKeyboardPressed,
@@ -46,6 +53,8 @@ enum Glow_EventType {
4653 eGlowQuit = 0xFF
4754 };
4855
56+/******************************************************************************/
57+
4958 enum Glow_MouseButton{
5059 eGlowLeft,
5160 eGlowRight,
@@ -53,14 +62,22 @@ enum Glow_MouseButton{
5362 eGlow_NUM_BUTTONS
5463 };
5564
65+/******************************************************************************/
66+
5667 #define GLOW_COORD_X 0
5768 #define GLOW_COORD_Y 1
5869
70+/******************************************************************************/
71+
5972 #define GLOW_GET_X(THAT) (THAT[0])
6073 #define GLOW_GET_Y(THAT) (THAT[1])
6174
75+/******************************************************************************/
76+
6277 typedef unsigned short glow_pixel_coords_t[2];
6378
79+/******************************************************************************/
80+
6481 /* Key constants */
6582 #define GLOW_ESCAPE "escape"
6683 #define GLOW_SHIFT "shift"
@@ -75,6 +92,8 @@ typedef unsigned short glow_pixel_coords_t[2];
7592 #define GLOW_RETURN GLOW_ENTER
7693 #define GLOW_TAB "tab"
7794
95+/******************************************************************************/
96+
7897 #define GLOW_MAX_KEY_NAME_SIZE 16
7998 struct Glow_Event{
8099 enum Glow_EventType type;
--- a/glow_win32.c
+++ b/glow_win32.c
@@ -386,6 +386,8 @@ GLOW_PURE static enum Glow_MouseButton glow_message_button(const MSG *msg){
386386 }
387387 }
388388
389+/******************************************************************************/
390+
389391 static BOOL glow_translate_event(const MSG *msg, struct Glow_Window *window,
390392 struct Glow_Event *out_event){
391393 BOOL pressed = FALSE;