diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-05-13 16:39:41 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-05-13 16:39:41 -0700 |
commit | 8aa1eac606d8e5030de6509f5d5d66e90db521f4 (patch) | |
tree | fe5722129198e83f2c96c5fd928b9e29fe3bc6fa /public/fpdf_fwlevent.h | |
parent | fdc5e691745cf16fb105f3ad4a9fb5f8f64f56b4 (diff) | |
download | pdfium-8aa1eac606d8e5030de6509f5d5d66e90db521f4.tar.xz |
Tidy public/ directory.
- Make include guards consistent with standard and filenames.
- Remove stray semicolon folowing extern "C" section close-brace.
- Untabify.
- Delete trailing whitespace.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1128003005
Diffstat (limited to 'public/fpdf_fwlevent.h')
-rw-r--r-- | public/fpdf_fwlevent.h | 176 |
1 files changed, 87 insertions, 89 deletions
diff --git a/public/fpdf_fwlevent.h b/public/fpdf_fwlevent.h index f27499a1c6..fa4f144fcc 100644 --- a/public/fpdf_fwlevent.h +++ b/public/fpdf_fwlevent.h @@ -1,11 +1,11 @@ // Copyright 2014 PDFium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. - + // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#ifndef _FWL_EVENT_H -#define _FWL_EVENT_H +#ifndef PUBLIC_FPDF_FWLEVENT_H_ +#define PUBLIC_FPDF_FWLEVENT_H_ #include "fpdfview.h" @@ -13,90 +13,90 @@ extern "C" { #endif -typedef int FPDF_INT32; +typedef int FPDF_INT32; typedef unsigned int FPDF_UINT32; -typedef float FPDF_FLOAT; +typedef float FPDF_FLOAT; //event type typedef enum { - FWL_EVENTTYPE_Mouse = 0 , - FWL_EVENTTYPE_MouseWheel, - FWL_EVENTTYPE_Key , + FWL_EVENTTYPE_Mouse = 0 , + FWL_EVENTTYPE_MouseWheel, + FWL_EVENTTYPE_Key , } FWL_EVENTTYPE; //key flag typedef enum -{ - FWL_EVENTFLAG_ShiftKey = 1 << 0, - FWL_EVENTFLAG_ControlKey = 1 << 1, - FWL_EVENTFLAG_AltKey = 1 << 2, - FWL_EVENTFLAG_MetaKey = 1 << 3, - FWL_EVENTFLAG_KeyPad = 1 << 4, - FWL_EVENTFLAG_AutoRepeat = 1 << 5, - FWL_EVENTFLAG_LeftButtonDown = 1 << 6, - FWL_EVENTFLAG_MiddleButtonDown = 1 << 7, - FWL_EVENTFLAG_RightButtonDown = 1 << 8, -} FWL_EVENTFLAG; +{ + FWL_EVENTFLAG_ShiftKey = 1 << 0, + FWL_EVENTFLAG_ControlKey = 1 << 1, + FWL_EVENTFLAG_AltKey = 1 << 2, + FWL_EVENTFLAG_MetaKey = 1 << 3, + FWL_EVENTFLAG_KeyPad = 1 << 4, + FWL_EVENTFLAG_AutoRepeat = 1 << 5, + FWL_EVENTFLAG_LeftButtonDown = 1 << 6, + FWL_EVENTFLAG_MiddleButtonDown = 1 << 7, + FWL_EVENTFLAG_RightButtonDown = 1 << 8, +} FWL_EVENTFLAG; // Mouse message command typedef enum { - FWL_EVENTMOUSECMD_LButtonDown = 1 , - FWL_EVENTMOUSECMD_LButtonUp , - FWL_EVENTMOUSECMD_LButtonDblClk , - FWL_EVENTMOUSECMD_RButtonDown , - FWL_EVENTMOUSECMD_RButtonUp , - FWL_EVENTMOUSECMD_RButtonDblClk , - FWL_EVENTMOUSECMD_MButtonDown , - FWL_EVENTMOUSECMD_MButtonUp , - FWL_EVENTMOUSECMD_MButtonDblClk , - FWL_EVENTMOUSECMD_MouseMove , - FWL_EVENTMOUSECMD_MouseEnter , - FWL_EVENTMOUSECMD_MouseHover , - FWL_EVENTMOUSECMD_MouseLeave , + FWL_EVENTMOUSECMD_LButtonDown = 1, + FWL_EVENTMOUSECMD_LButtonUp, + FWL_EVENTMOUSECMD_LButtonDblClk, + FWL_EVENTMOUSECMD_RButtonDown, + FWL_EVENTMOUSECMD_RButtonUp, + FWL_EVENTMOUSECMD_RButtonDblClk, + FWL_EVENTMOUSECMD_MButtonDown, + FWL_EVENTMOUSECMD_MButtonUp, + FWL_EVENTMOUSECMD_MButtonDblClk, + FWL_EVENTMOUSECMD_MouseMove, + FWL_EVENTMOUSECMD_MouseEnter, + FWL_EVENTMOUSECMD_MouseHover, + FWL_EVENTMOUSECMD_MouseLeave, } FWL_EVENT_MOUSECMD; //mouse event -struct FWL_EVENT_MOUSE +struct FWL_EVENT_MOUSE { - FPDF_UINT32 command; - FPDF_DWORD flag; - FPDF_FLOAT x; - FPDF_FLOAT y; + FPDF_UINT32 command; + FPDF_DWORD flag; + FPDF_FLOAT x; + FPDF_FLOAT y; }; //mouse wheel -struct FWL_EVENT_MOUSEWHEEL -{ - FPDF_DWORD flag; - FPDF_FLOAT x; - FPDF_FLOAT y; - FPDF_FLOAT deltaX; - FPDF_FLOAT deltaY; +struct FWL_EVENT_MOUSEWHEEL +{ + FPDF_DWORD flag; + FPDF_FLOAT x; + FPDF_FLOAT y; + FPDF_FLOAT deltaX; + FPDF_FLOAT deltaY; }; //virtual keycode -typedef enum +typedef enum { - FWL_VKEY_Back = 0x08, - FWL_VKEY_Tab = 0x09, - FWL_VKEY_Clear = 0x0C, - FWL_VKEY_Return = 0x0D, - FWL_VKEY_Shift = 0x10, - FWL_VKEY_Control = 0x11, - FWL_VKEY_Menu = 0x12, - FWL_VKEY_Pause = 0x13, - FWL_VKEY_Capital = 0x14, - FWL_VKEY_Kana = 0x15, - FWL_VKEY_Hangul = 0x15, - FWL_VKEY_Junja = 0x17, - FWL_VKEY_Final = 0x18, - FWL_VKEY_Hanja = 0x19, - FWL_VKEY_Kanji = 0x19, - FWL_VKEY_Escape = 0x1B, - FWL_VKEY_Convert = 0x1C, + FWL_VKEY_Back = 0x08, + FWL_VKEY_Tab = 0x09, + FWL_VKEY_Clear = 0x0C, + FWL_VKEY_Return = 0x0D, + FWL_VKEY_Shift = 0x10, + FWL_VKEY_Control = 0x11, + FWL_VKEY_Menu = 0x12, + FWL_VKEY_Pause = 0x13, + FWL_VKEY_Capital = 0x14, + FWL_VKEY_Kana = 0x15, + FWL_VKEY_Hangul = 0x15, + FWL_VKEY_Junja = 0x17, + FWL_VKEY_Final = 0x18, + FWL_VKEY_Hanja = 0x19, + FWL_VKEY_Kanji = 0x19, + FWL_VKEY_Escape = 0x1B, + FWL_VKEY_Convert = 0x1C, FWL_VKEY_NonConvert = 0x1D, - FWL_VKEY_Accept = 0x1E, + FWL_VKEY_Accept = 0x1E, FWL_VKEY_ModeChange = 0x1F, FWL_VKEY_Space = 0x20, FWL_VKEY_Prior = 0x21, @@ -251,44 +251,42 @@ typedef enum //key event command typedef enum { - FWL_EVENTKEYCMD_KeyDown = 1 , - FWL_EVENTKEYCMD_KeyUp , - FWL_EVENTKEYCMD_Char , + FWL_EVENTKEYCMD_KeyDown = 1, + FWL_EVENTKEYCMD_KeyUp, + FWL_EVENTKEYCMD_Char, } FWL_EVENTKEYCMD; //key event struct FWL_EVENT_KEY { - FPDF_UINT32 command; - FPDF_DWORD flag; - union - { - //Virtual key code. - FPDF_UINT32 vkcode; - //Character code. - FPDF_DWORD charcode; - }code; + FPDF_UINT32 command; + FPDF_DWORD flag; + union + { + //Virtual key code. + FPDF_UINT32 vkcode; + //Character code. + FPDF_DWORD charcode; + }code; }; //event type -struct FWL_EVENT +struct FWL_EVENT { - //structure size. - FPDF_UINT32 size; - //FWL_EVENTTYPE. + //structure size. + FPDF_UINT32 size; + //FWL_EVENTTYPE. FPDF_UINT32 type; - union - { - struct FWL_EVENT_MOUSE mouse; - struct FWL_EVENT_MOUSEWHEEL wheel; - struct FWL_EVENT_KEY key; - }s; -}; + union + { + struct FWL_EVENT_MOUSE mouse; + struct FWL_EVENT_MOUSEWHEEL wheel; + struct FWL_EVENT_KEY key; + }s; +}; #ifdef __cplusplus } #endif -#endif //_FWL_EVENT_H - - +#endif // PUBLIC_FPDF_FWLEVENT_H_ |