⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hxevent.h

📁 著名的 helix realplayer 基于手机 symbian 系统的 播放器全套源代码
💻 H
📖 第 1 页 / 共 2 页
字号:
/* ***** BEGIN LICENSE BLOCK ***** 
 * Version: RCSL 1.0/RPSL 1.0 
 *  
 * Portions Copyright (c) 1995-2002 RealNetworks, Inc. All Rights Reserved. 
 *      
 * The contents of this file, and the files included with this file, are 
 * subject to the current version of the RealNetworks Public Source License 
 * Version 1.0 (the "RPSL") available at 
 * http://www.helixcommunity.org/content/rpsl unless you have licensed 
 * the file under the RealNetworks Community Source License Version 1.0 
 * (the "RCSL") available at http://www.helixcommunity.org/content/rcsl, 
 * in which case the RCSL will apply. You may also obtain the license terms 
 * directly from RealNetworks.  You may not use this file except in 
 * compliance with the RPSL or, if you have a valid RCSL with RealNetworks 
 * applicable to this file, the RCSL.  Please see the applicable RPSL or 
 * RCSL for the rights, obligations and limitations governing use of the 
 * contents of the file.  
 *  
 * This file is part of the Helix DNA Technology. RealNetworks is the 
 * developer of the Original Code and owns the copyrights in the portions 
 * it created. 
 *  
 * This file, and the files included with this file, is distributed and made 
 * available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 
 * EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ALL SUCH WARRANTIES, 
 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS 
 * FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 
 * 
 * Technology Compatibility Kit Test Suite(s) Location: 
 *    http://www.helixcommunity.org/content/tck 
 * 
 * Contributor(s): 
 *  
 * ***** END LICENSE BLOCK ***** */ 

#if defined(_UNIX) && !defined(_MAC_UNIX) && !defined(QWS)
#include "X11/keysymdef.h" //for the virtual key definitions below.
#endif

#ifndef _HXEVENT_H_
#define _HXEVENT_H_

#define HX_BASE_EVENT  0x00001000UL

// --------------------------- SURFACE EVENTS --------------------------

// This class of events are events sent to site users of windowless
// sites to notify them of events on the site with platform independent
// messages.
#define HX_SURFACE_EVENTS      (HX_BASE_EVENT + 0x00001000)
#define HX_SURFACE_UPDATE      (HX_SURFACE_EVENTS + 1)
#define HX_SURFACE_MODE_CHANGE (HX_SURFACE_EVENTS + 2)
#define HX_SURFACE_UPDATE2     (HX_SURFACE_EVENTS + 3)
#define HX_SURFACE_NEXT_EVENT  (HX_SURFACE_EVENTS + 4)

// HX_SURFACE_UPDATE is sent by the site to the renderer when the
// surface has damage and needs to be updated.  The event struct is
// filled out as follows:
//
//    ULONG32 event;      HX_SURFACE_UPDATE
//    void*   window;     Native Window - may be null if no window is
//                        associated with the site
//    void*   param1;     IHXVideoSurface*
//    void*   param2;     UNIX - HXxWindow, Mac/Win - UNUSED
//    void*   result;     HRESULT result code of message handling
//    BOOL    handled;    TRUE if handled, FALSE if not handled

// HX_SURFACE_UPDATE2
// --------------------
//
// This event is like HX_SURFACE_UPDATE except that it contains info
// on the dirty rects/region assiciated with this site.
// This event is passed before HX_SURFACE_UPDATE. If this event is not
// handled it is converted into a HX_SURFACE_UPDATE and sent again.
//
// window  -- Native Window handle of the nearest parent window. May be NULL
// param1  -- IHXVideoSurface* associated with this site.
// param2  -- HXxExposeInfo* associated with this event. Defined in hxwintyp.h
// result  -- Result code os message handling.
// handled -- TRUE if handled, FALSE if not. If renderer returns TRUE for
//            handled then the system will automatically validate the 
//            entire client area associated with this video surface.


// HX_SURFACE_MODE_CHANGE is sent by the site to the renderer when the
// surface mode should be changed.  This event is optional, but for
// best playback quality it should be processed.  The event struct is
// filled out as follows:
//
//    ULONG32   event;      HX_SURFACE_MODE_CHANGE
//    void*     window;     null
//    void*     param1;     null
//    void*     param2;     HX_VIDEOSURFACE1_RECOMMENDED or
//                          HX_VIDEOSURFACE1_NOT_RECOMMENDED
//    void*     result;     HRESULT result code of message handling
//    BOOL      handled;    TRUE if handled, FALSE if not handled
#define HX_VIDEOSURFACE1_RECOMMENDED       1         
#define HX_VIDEOSURFACE1_NOT_RECOMMENDED   2


//------------------------- MOUSE EVENTS ----------------------------

// This class of events are sent to site users to
// notify them of mouse events.
// All mouse events have the event structure filled out as follows:
//
//    UINT32    event;
//    void*     window;
//    void*     param1;     HXxPoint struct with mouse position local to the renderer
//    void*     param2;     UINT32 of flags for modifier keys
//       BITS      DESCRIPTION
//     -------   -------------------------------
//        0       Shift key down while moving or clicking
//        1       Control key down while moving or clicking
//        2       Alt key donw while moving or clicking
//        3       Primary mouse button down while moving.
//        4       Context mouse button down while moving.
//        5       Third mouse button down while moving.
//    void*     result;     HRESULT result code of message handling
//    BOOL      handled;    TRUE if handled, FALSE if not handled
//
#define HX_MOUSE_EVENTS        (HX_BASE_EVENT + 0x00002000)

#define HX_SHIFT_KEY           (1<<0) //is the Shift key down while moving?
#define HX_CTRL_KEY            (1<<1) //is the Control key down while moving?
#define HX_ALT_COMMAND_KEY     (1<<2) //is the  Apple/Splat or PC/ALT key down?
#define HX_PRIMARY_BUTTON      (1<<3) //Is the primary button down while moving?
#define HX_CONTEXT_BUTTON      (1<<4) //is the context button down while moving?
#define HX_THIRD_BUTTON        (1<<5) //is the third button down while moving?

#define HX_PRIMARY_BUTTON_DOWN (HX_MOUSE_EVENTS + 1)
#define HX_PRIMARY_BUTTON_UP   (HX_MOUSE_EVENTS + 2)
#define HX_CONTEXT_BUTTON_DOWN (HX_MOUSE_EVENTS + 3)
#define HX_CONTEXT_BUTTON_UP   (HX_MOUSE_EVENTS + 4)
#define HX_MOUSE_MOVE          (HX_MOUSE_EVENTS + 5)
#define HX_MOUSE_ENTER         (HX_MOUSE_EVENTS + 6)
#define HX_MOUSE_LEAVE         (HX_MOUSE_EVENTS + 7)
#define HX_THIRD_BUTTON_DOWN   (HX_MOUSE_EVENTS + 8)
#define HX_THIRD_BUTTON_UP     (HX_MOUSE_EVENTS + 9)
#define HX_SET_CURSOR          (HX_MOUSE_EVENTS + 10)
#define HX_SET_STATUS          (HX_MOUSE_EVENTS + 11)
#define HX_PRIMARY_DBLCLK      (HX_MOUSE_EVENTS + 12)
#define HX_CONTEXT_DBLCLK      (HX_MOUSE_EVENTS + 13)
#define HX_THIRD_DBLCLK        (HX_MOUSE_EVENTS + 14)

// This class of events are sent to renderers to
// notify them of the validation of the window
// All window events have the event structure filled out as follows:
//
//    UINT32    event;
//    void*     window;
//    void*     UNUSED;
//    void*     UNUSED;
//    void*     result;     HRESULT result code of message handling
//    BOOL      handled;    TRUE if handled, FALSE if not handled
//
#define HX_WINDOW_EVENTS       HX_BASE_EVENT + 0x00003000

#define HX_ATTACH_WINDOW       HX_WINDOW_EVENTS + 1
#define HX_DETACH_WINDOW       HX_WINDOW_EVENTS + 2

// This class of events are sent to site users to
// notify them of keyboard events.
// All keyboard events have the event structure filled out as follows:
//
//    UINT32    event;
//    void*     window;
//    BOOL      handled;    TRUE if handled, FALSE if not handled
//    void*     result;     HRESULT result code of message handling
//    void *    param1;     Contents depends on keyboard event:
//
//HX_CHAR event.
//    param1   Translated ASCII Char Code.
//   --------  HX_CHAR events will have this as the translated char
//             of the key acted upon and the result of any modifiers
//             like the shift key, control key, caps lock, etc. If a
//             virtual key has been pressed (like an arrow key) then
//             param1 will be set to a HX_VK code representing the
//             virtual key pressed and the bit-field in param2 will
//             indicate that a virtual key was pressed.
//HX_KEY_DOWN or HX_KEY_UP
//    param1   Non-translated ASCII Char Code of the key pressed or
//             released. 
//   --------  
//             This is the same as HX_CHAR except that the ASCII char
//             has not been translated by the modifiers.
//
//    void *    param2;     Description bit field.
//       BITS      DESCRIPTION
//     -------   -------------------------------
//     
// WIN   0-7     OEM specific scan code.
// UNIX  0-7     keycode. For 1-0x58 they equal scancode.
//       8       Shift key down
//       9       Control key down
//       10      ALT key down or Apple/Splat key
//       11      Caps-Lock on.
//       12      Scroll-Lock on.
//       13      Num-Lock on.
//       14      1 if event represents a virtual key. 0 if not.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -