LCOV - code coverage report
Current view: top level - vcl/inc - salwtype.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 3 10 30.0 %
Date: 2015-06-13 12:38:46 Functions: 1 5 20.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #ifndef INCLUDED_VCL_INC_SALWTYPE_HXX
      21             : #define INCLUDED_VCL_INC_SALWTYPE_HXX
      22             : 
      23             : #include <i18nlangtag/lang.h>
      24             : #include <rtl/ustring.hxx>
      25             : #include <tools/solar.h>
      26             : 
      27             : class SalGraphics;
      28             : class SalFrame;
      29             : class SalObject;
      30             : namespace vcl { class Window; }
      31             : 
      32             : class FontSelectPattern;
      33             : enum class InputContextFlags;
      34             : 
      35             : // - SalEvent -
      36             : 
      37             : #define SALEVENT_MOUSEMOVE              ((sal_uInt16)1)
      38             : #define SALEVENT_MOUSELEAVE             ((sal_uInt16)2)
      39             : #define SALEVENT_MOUSEBUTTONDOWN        ((sal_uInt16)3)
      40             : #define SALEVENT_MOUSEBUTTONUP          ((sal_uInt16)4)
      41             : #define SALEVENT_KEYINPUT               ((sal_uInt16)5)
      42             : #define SALEVENT_KEYUP                  ((sal_uInt16)6)
      43             : #define SALEVENT_KEYMODCHANGE           ((sal_uInt16)7)
      44             : #define SALEVENT_PAINT                  ((sal_uInt16)8)
      45             : #define SALEVENT_RESIZE                 ((sal_uInt16)9)
      46             : #define SALEVENT_GETFOCUS               ((sal_uInt16)10)
      47             : #define SALEVENT_LOSEFOCUS              ((sal_uInt16)11)
      48             : #define SALEVENT_CLOSE                  ((sal_uInt16)12)
      49             : #define SALEVENT_SHUTDOWN               ((sal_uInt16)13)
      50             : #define SALEVENT_SETTINGSCHANGED        ((sal_uInt16)14)
      51             : #define SALEVENT_PRINTERCHANGED         ((sal_uInt16)16)
      52             : #define SALEVENT_DISPLAYCHANGED         ((sal_uInt16)17)
      53             : #define SALEVENT_FONTCHANGED            ((sal_uInt16)18)
      54             : #define SALEVENT_WHEELMOUSE             ((sal_uInt16)21)
      55             : #define SALEVENT_USEREVENT              ((sal_uInt16)22)
      56             : #define SALEVENT_MOUSEACTIVATE          ((sal_uInt16)23)
      57             : #define SALEVENT_EXTTEXTINPUT           ((sal_uInt16)24)
      58             : #define SALEVENT_ENDEXTTEXTINPUT        ((sal_uInt16)25)
      59             : #define SALEVENT_EXTTEXTINPUTPOS        ((sal_uInt16)26)
      60             : #define SALEVENT_INPUTCONTEXTCHANGE     ((sal_uInt16)27)
      61             : #define SALEVENT_MOVE                   ((sal_uInt16)28)
      62             : #define SALEVENT_MOVERESIZE             ((sal_uInt16)29)
      63             : #define SALEVENT_CLOSEPOPUPS            ((sal_uInt16)30)
      64             : #define SALEVENT_EXTERNALKEYINPUT       ((sal_uInt16)31)
      65             : #define SALEVENT_EXTERNALKEYUP          ((sal_uInt16)32)
      66             : #define SALEVENT_MENUCOMMAND            ((sal_uInt16)33)
      67             : #define SALEVENT_MENUHIGHLIGHT          ((sal_uInt16)34)
      68             : #define SALEVENT_MENUACTIVATE           ((sal_uInt16)35)
      69             : #define SALEVENT_MENUDEACTIVATE         ((sal_uInt16)36)
      70             : #define SALEVENT_EXTERNALMOUSEMOVE      ((sal_uInt16)37)
      71             : #define SALEVENT_EXTERNALMOUSEBUTTONDOWN ((sal_uInt16)38)
      72             : #define SALEVENT_EXTERNALMOUSEBUTTONUP  ((sal_uInt16)39)
      73             : #define SALEVENT_INPUTLANGUAGECHANGE    ((sal_uInt16)40)
      74             : #define SALEVENT_SHOWDIALOG             ((sal_uInt16)41)
      75             : #define SALEVENT_MENUBUTTONCOMMAND      ((sal_uInt16)42)
      76             : #define SALEVENT_SURROUNDINGTEXTREQUEST ((sal_uInt16)43)
      77             : #define SALEVENT_SURROUNDINGTEXTSELECTIONCHANGE ((sal_uInt16)44)
      78             : #define SALEVENT_STARTRECONVERSION      ((sal_uInt16)45)
      79             : #define SALEVENT_EXTERNALZOOM           ((sal_uInt16)46)
      80             : #define SALEVENT_EXTERNALSCROLL         ((sal_uInt16)47)
      81             : #define SALEVENT_QUERYCHARPOSITION      ((sal_uInt16)48)
      82             : #define SALEVENT_SWIPE                  ((sal_uInt16)49)
      83             : #define SALEVENT_LONGPRESS              ((sal_uInt16)50)
      84             : 
      85             : // MOUSELEAVE must send, when the pointer leave the client area and
      86             : // the mouse is not captured
      87             : // MOUSEMOVE, MOUSELEAVE, MOUSEBUTTONDOWN and MOUSEBUTTONUP
      88             : // MAC: Ctrl+Button is MOUSE_RIGHT
      89             : struct SalMouseEvent
      90             : {
      91             :     sal_uInt64      mnTime;         // Time in ms, when event is created
      92             :     long            mnX;            // X-Position (Pixel, TopLeft-Output)
      93             :     long            mnY;            // Y-Position (Pixel, TopLeft-Output)
      94             :     sal_uInt16      mnButton;       // 0-MouseMove/MouseLeave, MOUSE_LEFT, MOUSE_RIGHT, MOUSE_MIDDLE
      95             :     sal_uInt16      mnCode;         // SV-Modifiercode (KEY_SHIFT|KEY_MOD1|KEY_MOD2|MOUSE_LEFT|MOUSE_MIDDLE|MOUSE_RIGHT)
      96             : };
      97             : 
      98             : // KEYINPUT and KEYUP
      99             : struct SalKeyEvent
     100             : {
     101             :     sal_uInt64      mnTime;         // Time in ms, when event is created
     102             :     sal_uInt16      mnCode;         // SV-KeyCode (KEY_xxx | KEY_SHIFT | KEY_MOD1 | KEY_MOD2)
     103             :     sal_uInt16      mnCharCode;     // SV-CharCode
     104             :     sal_uInt16      mnRepeat;       // Repeat-Count (KeyInputs-1)
     105             : };
     106             : 
     107             : // MENUEVENT
     108             : struct SalMenuEvent
     109             : {
     110             :     sal_uInt16      mnId;           // Menu item ID
     111             :     void*           mpMenu;         // pointer to VCL menu (class Menu)
     112             : 
     113             :     SalMenuEvent() : mnId( 0 ), mpMenu( NULL ) {}
     114             :     SalMenuEvent( sal_uInt16 i_nId, void* i_pMenu )
     115             :     : mnId( i_nId ), mpMenu( i_pMenu ) {}
     116             : };
     117             : 
     118             : // KEYMODCHANGE
     119             : struct SalKeyModEvent
     120             : {
     121             :     sal_uInt64      mnTime;         // Time in ms, when event is created
     122             :     sal_uInt16      mnCode;         // SV-Modifiercode (KEY_SHIFT|KEY_MOD1|KEY_MOD2)
     123             :     sal_uInt16      mnModKeyCode;   // extended Modifier (MODKEY_LEFT,MODKEY_RIGHT,MODKEY_PRESS,MODKEY_RELEASE)
     124             : };
     125             : 
     126             : // PAINT
     127             : struct SalPaintEvent
     128             : {
     129             :     long            mnBoundX;           // BoundRect - X
     130             :     long            mnBoundY;           // BoundRect - Y
     131             :     long            mnBoundWidth;       // BoundRect - Width
     132             :     long            mnBoundHeight;      // BoundRect - Height
     133             :     bool            mbImmediateUpdate;  // set to true to force an immediate update
     134             : 
     135        2944 :     SalPaintEvent( long x, long y, long w, long h, bool bImmediate = false ) :
     136             :         mnBoundX( x ), mnBoundY( y ),
     137             :         mnBoundWidth( w ), mnBoundHeight( h ),
     138        2944 :         mbImmediateUpdate( bImmediate )
     139        2944 :     {}
     140             : };
     141             : 
     142             : // USEREVENT
     143             : // pEvent == pData
     144             : 
     145             : // WHEELMOUSE
     146             : #define SAL_WHEELMOUSE_EVENT_PAGESCROLL     ((sal_uLong)0xFFFFFFFF)
     147             : struct SalWheelMouseEvent
     148             : {
     149             :     sal_uInt64      mnTime;         // Time in ms, when event is created
     150             :     long            mnX;            // X-Position (Pixel, TopLeft-Output)
     151             :     long            mnY;            // Y-Position (Pixel, TopLeft-Output)
     152             :     long            mnDelta;        // Number of rotations
     153             :     long            mnNotchDelta;   // Number of fixed rotations
     154             :     sal_uLong       mnScrollLines;  // Actual number of lines to scroll
     155             :     sal_uInt16      mnCode;         // SV-Modifiercode (KEY_SHIFT|KEY_MOD1|KEY_MOD2|MOUSE_LEFT|MOUSE_MIDDLE|MOUSE_RIGHT)
     156             :     bool        mbHorz;         // Horizontal
     157             :     bool        mbDeltaIsPixel; // delta value is a pixel value (on touch devices)
     158             : 
     159           0 :     SalWheelMouseEvent()
     160           0 :     : mnTime( 0 ), mnX( 0 ), mnY( 0 ), mnDelta( 0 ), mnNotchDelta( 0 ), mnScrollLines( 0 ), mnCode( 0 ), mbHorz( false ), mbDeltaIsPixel( false )
     161           0 :     {}
     162             : };
     163             : 
     164             : // MOUSEACTIVATE
     165             : struct SalMouseActivateEvent
     166             : {
     167             :     long            mnX;            // X-Position (Pixel, TopLeft-Output)
     168             :     long            mnY;            // Y-Position (Pixel, TopLeft-Output)
     169             : };
     170             : 
     171             : // EXTTEXTINPUT
     172           0 : struct SalExtTextInputEvent
     173             : {
     174             :     sal_uInt64          mnTime;         // Time in ms, when event is created
     175             :     OUString            maText;         // Text
     176             :     const sal_uInt16*   mpTextAttr;     // Text-Attribute
     177             :     sal_Int32           mnCursorPos;    // Cursor-Position
     178             :     sal_uInt8           mnCursorFlags;  // EXTTEXTINPUT_CURSOR_xxx
     179             :     bool                mbOnlyCursor;   // true: Only Cursor-Position has been changed
     180             : };
     181             : 
     182             : // EXTTEXTINPUTPOS
     183             : struct SalExtTextInputPosEvent
     184             : {
     185             :     long            mnX;            // Cursor-X-Position to upper left corner of frame
     186             :     long            mnY;            // Cursor-Y-Position to upper left corner of frame
     187             :     long            mnWidth;        // Cursor-Width in Pixel
     188             :     long            mnHeight;       // Cursor-Height in Pixel
     189             :     long            mnExtWidth;     // Width of the PreEdit area
     190             :     bool            mbVertical;     // true if in vertical mode
     191           0 :     SalExtTextInputPosEvent()
     192             :         : mnX(0)
     193             :         , mnY(0)
     194             :         , mnWidth(0)
     195             :         , mnHeight(0)
     196             :         , mnExtWidth(0)
     197           0 :         , mbVertical(false)
     198             :     {
     199           0 :     }
     200             : };
     201             : 
     202             : // INPUTCONTEXTCHANGE
     203             : struct SalInputContextChangeEvent
     204             : {
     205             :     LanguageType    meLanguage;     // new language
     206             : };
     207             : 
     208             : // SURROUNDINGTEXTREQUEST
     209             : struct SalSurroundingTextRequestEvent
     210             : {
     211             :     OUString        maText;         // Text
     212             :     sal_uLong       mnStart;        // The beginning index of selected range
     213             :     sal_uLong       mnEnd;          // The end index of selected range
     214             : };
     215             : 
     216             : // SURROUNDINGTEXTSELECTIONCHANGE
     217             : struct SalSurroundingTextSelectionChangeEvent
     218             : {
     219             :     sal_uLong       mnStart;        // The beginning index of selected range
     220             :     sal_uLong       mnEnd;          // The end index of selected range
     221             : };
     222             : 
     223             : // QUERYCHARPOSITION
     224             : struct SalQueryCharPositionEvent
     225             : {
     226             :     bool            mbValid;                // The data is valid or not.
     227             :     sal_uLong       mnCharPos;              // The index of character in a composition.
     228             :     bool            mbVertical;             // The text is vertical or not.
     229             :     long            mnCursorBoundX;         // The cursor bounds corresponding to the character specified by mnCharPos - X
     230             :     long            mnCursorBoundY;         // The cursor bounds corresponding to the character specified by mnCharPos - Y
     231             :     long            mnCursorBoundWidth;     // The cursor bounds corresponding to the character specified by mnCharPos - Width
     232             :     long            mnCursorBoundHeight;    // The cursor bounds corresponding to the character specified by mnCharPos - Height
     233             : };
     234             : 
     235             : // - SalFrame-Types -
     236             : 
     237             : typedef bool (*SALFRAMEPROC)( vcl::Window* pInst, SalFrame* pFrame,
     238             :                               sal_uInt16 nEvent, const void* pEvent );
     239             : 
     240             : // - SalObject-Events -
     241             : 
     242             : #define SALOBJ_EVENT_GETFOCUS           ((sal_uInt16)1)
     243             : #define SALOBJ_EVENT_LOSEFOCUS          ((sal_uInt16)2)
     244             : #define SALOBJ_EVENT_TOTOP              ((sal_uInt16)3)
     245             : #define SALOBJ_EVENT_COUNT              ((sal_uInt16)4)
     246             : 
     247             : // - SalObject-Types -
     248             : 
     249             : typedef long (*SALOBJECTPROC)( void* pInst, SalObject* pObject,
     250             :                                sal_uInt16 nEvent, const void* pEvent );
     251             : 
     252             : // - SalFrameState -
     253             : 
     254             : struct SalFrameState
     255             : {
     256             :     sal_uLong       mnMask;
     257             :     long            mnX;
     258             :     long            mnY;
     259             :     long            mnWidth;
     260             :     long            mnHeight;
     261             :     long            mnMaximizedX;
     262             :     long            mnMaximizedY;
     263             :     long            mnMaximizedWidth;
     264             :     long            mnMaximizedHeight;
     265             :     sal_uLong       mnState;
     266             : };
     267             : 
     268             : // - SalInputContext -
     269             : 
     270             : struct SalInputContext
     271             : {
     272             :     FontSelectPattern*     mpFont;
     273             :     LanguageType           meLanguage;
     274             :     InputContextFlags      mnOptions;
     275             : };
     276             : 
     277             : struct SalSwipeEvent
     278             : {
     279             :     double mnVelocityX;
     280             :     double mnVelocityY;
     281             :     long mnX;
     282             :     long mnY;
     283             : };
     284             : 
     285             : struct SalLongPressEvent
     286             : {
     287             :     long mnX;
     288             :     long mnY;
     289             : };
     290             : 
     291             : typedef void (*SALTIMERPROC)( bool idle );
     292             : 
     293             : #endif // INCLUDED_VCL_INC_SALWTYPE_HXX
     294             : 
     295             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11