LCOV - code coverage report
Current view: top level - libreoffice/vcl/inc - salwtype.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 3 7 42.9 %
Date: 2012-12-27 Functions: 1 4 25.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 _SV_SALWTYPE_HXX
      21             : #define _SV_SALWTYPE_HXX
      22             : 
      23             : #include <i18npool/lang.h>
      24             : #include <tools/string.hxx>
      25             : #include <tools/solar.h>
      26             : 
      27             : class SalGraphics;
      28             : class SalFrame;
      29             : class SalObject;
      30             : class Window;
      31             : 
      32             : class FontSelectPattern;
      33             : 
      34             : // ---------------
      35             : // - SalExtInput -
      36             : // ---------------
      37             : 
      38             : // Have to match DEFINEs in cmdevt.hxx, as these will not be converted
      39             : 
      40             : #define SAL_EXTTEXTINPUT_ATTR_GRAYWAVELINE          ((sal_uInt16)0x0100)
      41             : #define SAL_EXTTEXTINPUT_ATTR_UNDERLINE             ((sal_uInt16)0x0200)
      42             : #define SAL_EXTTEXTINPUT_ATTR_BOLDUNDERLINE         ((sal_uInt16)0x0400)
      43             : #define SAL_EXTTEXTINPUT_ATTR_DOTTEDUNDERLINE       ((sal_uInt16)0x0800)
      44             : #define SAL_EXTTEXTINPUT_ATTR_DASHDOTUNDERLINE      ((sal_uInt16)0x1000)
      45             : #define SAL_EXTTEXTINPUT_ATTR_HIGHLIGHT             ((sal_uInt16)0x2000)
      46             : #define SAL_EXTTEXTINPUT_ATTR_REDTEXT               ((sal_uInt16)0x4000)
      47             : #define SAL_EXTTEXTINPUT_ATTR_HALFTONETEXT          ((sal_uInt16)0x8000)
      48             : 
      49             : #define SAL_EXTTEXTINPUT_CURSOR_INVISIBLE           ((sal_uInt16)0x0001)
      50             : #define SAL_EXTTEXTINPUT_CURSOR_OVERWRITE           ((sal_uInt16)0x0002)
      51             : 
      52             : // ------------
      53             : // - SalEvent -
      54             : // ------------
      55             : 
      56             : #define SALEVENT_MOUSEMOVE              ((sal_uInt16)1)
      57             : #define SALEVENT_MOUSELEAVE             ((sal_uInt16)2)
      58             : #define SALEVENT_MOUSEBUTTONDOWN        ((sal_uInt16)3)
      59             : #define SALEVENT_MOUSEBUTTONUP          ((sal_uInt16)4)
      60             : #define SALEVENT_KEYINPUT               ((sal_uInt16)5)
      61             : #define SALEVENT_KEYUP                  ((sal_uInt16)6)
      62             : #define SALEVENT_KEYMODCHANGE           ((sal_uInt16)7)
      63             : #define SALEVENT_PAINT                  ((sal_uInt16)8)
      64             : #define SALEVENT_RESIZE                 ((sal_uInt16)9)
      65             : #define SALEVENT_GETFOCUS               ((sal_uInt16)10)
      66             : #define SALEVENT_LOSEFOCUS              ((sal_uInt16)11)
      67             : #define SALEVENT_CLOSE                  ((sal_uInt16)12)
      68             : #define SALEVENT_SHUTDOWN               ((sal_uInt16)13)
      69             : #define SALEVENT_SETTINGSCHANGED        ((sal_uInt16)14)
      70             : #define SALEVENT_VOLUMECHANGED          ((sal_uInt16)15)
      71             : #define SALEVENT_PRINTERCHANGED         ((sal_uInt16)16)
      72             : #define SALEVENT_DISPLAYCHANGED         ((sal_uInt16)17)
      73             : #define SALEVENT_FONTCHANGED            ((sal_uInt16)18)
      74             : #define SALEVENT_DATETIMECHANGED        ((sal_uInt16)19)
      75             : #define SALEVENT_KEYBOARDCHANGED        ((sal_uInt16)20)
      76             : #define SALEVENT_WHEELMOUSE             ((sal_uInt16)21)
      77             : #define SALEVENT_USEREVENT              ((sal_uInt16)22)
      78             : #define SALEVENT_MOUSEACTIVATE          ((sal_uInt16)23)
      79             : #define SALEVENT_EXTTEXTINPUT           ((sal_uInt16)24)
      80             : #define SALEVENT_ENDEXTTEXTINPUT        ((sal_uInt16)25)
      81             : #define SALEVENT_EXTTEXTINPUTPOS        ((sal_uInt16)26)
      82             : #define SALEVENT_INPUTCONTEXTCHANGE     ((sal_uInt16)27)
      83             : #define SALEVENT_MOVE                   ((sal_uInt16)28)
      84             : #define SALEVENT_MOVERESIZE             ((sal_uInt16)29)
      85             : #define SALEVENT_CLOSEPOPUPS            ((sal_uInt16)30)
      86             : #define SALEVENT_EXTERNALKEYINPUT       ((sal_uInt16)31)
      87             : #define SALEVENT_EXTERNALKEYUP          ((sal_uInt16)32)
      88             : #define SALEVENT_MENUCOMMAND            ((sal_uInt16)33)
      89             : #define SALEVENT_MENUHIGHLIGHT          ((sal_uInt16)34)
      90             : #define SALEVENT_MENUACTIVATE           ((sal_uInt16)35)
      91             : #define SALEVENT_MENUDEACTIVATE         ((sal_uInt16)36)
      92             : #define SALEVENT_EXTERNALMOUSEMOVE      ((sal_uInt16)37)
      93             : #define SALEVENT_EXTERNALMOUSEBUTTONDOWN ((sal_uInt16)38)
      94             : #define SALEVENT_EXTERNALMOUSEBUTTONUP  ((sal_uInt16)39)
      95             : #define SALEVENT_INPUTLANGUAGECHANGE    ((sal_uInt16)40)
      96             : #define SALEVENT_SHOWDIALOG             ((sal_uInt16)41)
      97             : #define SALEVENT_MENUBUTTONCOMMAND      ((sal_uInt16)42)
      98             : #define SALEVENT_SURROUNDINGTEXTREQUEST ((sal_uInt16)43)
      99             : #define SALEVENT_SURROUNDINGTEXTSELECTIONCHANGE ((sal_uInt16)44)
     100             : #define SALEVENT_STARTRECONVERSION      ((sal_uInt16)45)
     101             : #define SALEVENT_COUNT                  ((sal_uInt16)45)
     102             : 
     103             : // MOUSELEAVE must send, when the pointer leave the client area and
     104             : // the mouse is not captured
     105             : // MOUSEMOVE, MOUSELEAVE, MOUSEBUTTONDOWN and MOUSEBUTTONUP
     106             : // MAC: Ctrl+Button is MOUSE_RIGHT
     107             : struct SalMouseEvent
     108             : {
     109             :     sal_uLong       mnTime;         // Time in ms, when event is created
     110             :     long            mnX;            // X-Position (Pixel, TopLeft-Output)
     111             :     long            mnY;            // Y-Position (Pixel, TopLeft-Output)
     112             :     sal_uInt16      mnButton;       // 0-MouseMove/MouseLeave, MOUSE_LEFT, MOUSE_RIGHT, MOUSE_MIDDLE
     113             :     sal_uInt16      mnCode;         // SV-Modifiercode (KEY_SHIFT|KEY_MOD1|KEY_MOD2|MOUSE_LEFT|MOUSE_MIDDLE|MOUSE_RIGHT)
     114             : };
     115             : 
     116             : // KEYINPUT and KEYUP
     117             : struct SalKeyEvent
     118             : {
     119             :     sal_uLong       mnTime;         // Time in ms, when event is created
     120             :     sal_uInt16      mnCode;         // SV-KeyCode (KEY_xxx | KEY_SHIFT | KEY_MOD1 | KEY_MOD2)
     121             :     sal_uInt16      mnCharCode;     // SV-CharCode
     122             :     sal_uInt16      mnRepeat;       // Repeat-Count (KeyInputs-1)
     123             : };
     124             : 
     125             : // MENUEVENT
     126             : struct SalMenuEvent
     127             : {
     128             :     sal_uInt16      mnId;           // Menu item ID
     129             :     void*           mpMenu;         // pointer to VCL menu (class Menu)
     130             : 
     131             :     SalMenuEvent() : mnId( 0 ), mpMenu( NULL ) {}
     132             :     SalMenuEvent( sal_uInt16 i_nId, void* i_pMenu )
     133             :     : mnId( i_nId ), mpMenu( i_pMenu ) {}
     134             : };
     135             : 
     136             : // KEYMODCHANGE
     137             : struct SalKeyModEvent
     138             : {
     139             :     sal_uLong       mnTime;         // Time in ms, when event is created
     140             :     sal_uInt16      mnCode;         // SV-Modifiercode (KEY_SHIFT|KEY_MOD1|KEY_MOD2)
     141             :     sal_uInt16      mnModKeyCode;   // extended Modifier (MODKEY_LEFT,MODKEY_RIGHT,MODKEY_PRESS,MODKEY_RELEASE)
     142             : };
     143             : 
     144             : // PAINT
     145             : struct SalPaintEvent
     146             : {
     147             :     long            mnBoundX;           // BoundRect - X
     148             :     long            mnBoundY;           // BoundRect - Y
     149             :     long            mnBoundWidth;       // BoundRect - Width
     150             :     long            mnBoundHeight;      // BoundRect - Height
     151             :     bool            mbImmediateUpdate;  // set to true to force an immediate update
     152             : 
     153         164 :     SalPaintEvent( long x, long y, long w, long h, bool bImmediate = false ) :
     154             :         mnBoundX( x ), mnBoundY( y ),
     155             :         mnBoundWidth( w ), mnBoundHeight( h ),
     156         164 :         mbImmediateUpdate( bImmediate )
     157         164 :     {}
     158             : };
     159             : 
     160             : // USEREVENT
     161             : // pEvent == pData
     162             : 
     163             : // WHEELMOUSE
     164             : #define SAL_WHEELMOUSE_EVENT_PAGESCROLL     ((sal_uLong)0xFFFFFFFF)
     165             : struct SalWheelMouseEvent
     166             : {
     167             :     sal_uLong       mnTime;         // Time in ms, when event is created
     168             :     long            mnX;            // X-Position (Pixel, TopLeft-Output)
     169             :     long            mnY;            // Y-Position (Pixel, TopLeft-Output)
     170             :     long            mnDelta;        // Number of rotations
     171             :     long            mnNotchDelta;   // Number of fixed rotations
     172             :     sal_uLong       mnScrollLines;  // Actual number of lines to scroll
     173             :     sal_uInt16      mnCode;         // SV-Modifiercode (KEY_SHIFT|KEY_MOD1|KEY_MOD2|MOUSE_LEFT|MOUSE_MIDDLE|MOUSE_RIGHT)
     174             :     sal_Bool        mbHorz;         // Horizontal
     175             :     sal_Bool        mbDeltaIsPixel; // delta value is a pixel value (on mac)
     176             : 
     177           0 :     SalWheelMouseEvent()
     178           0 :     : mnTime( 0 ), mnX( 0 ), mnY( 0 ), mnDelta( 0 ), mnNotchDelta( 0 ), mnScrollLines( 0 ), mnCode( 0 ), mbHorz( sal_False ), mbDeltaIsPixel( sal_False )
     179           0 :     {}
     180             : };
     181             : 
     182             : // MOUSEACTIVATE
     183             : struct SalMouseActivateEvent
     184             : {
     185             :     long            mnX;            // X-Position (Pixel, TopLeft-Output)
     186             :     long            mnY;            // Y-Position (Pixel, TopLeft-Output)
     187             : };
     188             : 
     189             : #ifdef __cplusplus
     190             : 
     191             : // EXTTEXTINPUT
     192           0 : struct SalExtTextInputEvent
     193             : {
     194             :     sal_uLong           mnTime;         // Time in ms, when event is created
     195             :     UniString           maText;         // Text
     196             :     const sal_uInt16*   mpTextAttr;     // Text-Attribute
     197             :     sal_uLong           mnCursorPos;    // Cursor-Position
     198             :     sal_uLong           mnDeltaStart;   // Start-Position of last change
     199             :     sal_uInt8           mnCursorFlags;  // SAL_EXTTEXTINPUT_CURSOR_xxx
     200             :     sal_Bool            mbOnlyCursor;   // sal_True: Only Cursor-Position has been changed
     201             : };
     202             : 
     203             : #endif // __cplusplus
     204             : 
     205             : // EXTTEXTINPUTPOS
     206             : struct SalExtTextInputPosEvent
     207             : {
     208             :     long            mnX;            // Cursor-X-Position to upper left corner of frame
     209             :     long            mnY;            // Cursor-Y-Position to upper left corner of frame
     210             :     long            mnWidth;        // Cursor-Width in Pixel
     211             :     long            mnHeight;       // Cursor-Height in Pixel
     212             :     long            mnExtWidth;     // Width of the PreEdit area
     213             :     bool            mbVertical;     // true if in vertical mode
     214             : };
     215             : 
     216             : #ifdef __cplusplus
     217             : 
     218             : // INPUTCONTEXTCHANGE
     219             : struct SalInputContextChangeEvent
     220             : {
     221             :     LanguageType    meLanguage;     // new language
     222             : };
     223             : 
     224             : #endif // __cplusplus
     225             : 
     226             : #ifdef __cplusplus
     227             : 
     228             : // SURROUNDINGTEXTREQUEST
     229             : struct SalSurroundingTextRequestEvent
     230             : {
     231             :     UniString       maText;         // Text
     232             :     sal_uLong       mnStart;        // The beginning index of selected range
     233             :     sal_uLong       mnEnd;          // The end index of selected range
     234             : };
     235             : 
     236             : #endif // __cplusplus
     237             : 
     238             : #ifdef __cplusplus
     239             : 
     240             : // SURROUNDINGTEXTSELECTIONCHANGE
     241             : struct SalSurroundingTextSelectionChangeEvent
     242             : {
     243             :     sal_uLong       mnStart;        // The beginning index of selected range
     244             :     sal_uLong       mnEnd;          // The end index of selected range
     245             : };
     246             : 
     247             : #endif // __cplusplus
     248             : 
     249             : // ------------------
     250             : // - SalFrame-Types -
     251             : // ------------------
     252             : 
     253             : typedef long (*SALFRAMEPROC)( Window* pInst, SalFrame* pFrame,
     254             :                               sal_uInt16 nEvent, const void* pEvent );
     255             : 
     256             : // --------------------
     257             : // - SalObject-Events -
     258             : // --------------------
     259             : 
     260             : #define SALOBJ_EVENT_GETFOCUS           ((sal_uInt16)1)
     261             : #define SALOBJ_EVENT_LOSEFOCUS          ((sal_uInt16)2)
     262             : #define SALOBJ_EVENT_TOTOP              ((sal_uInt16)3)
     263             : #define SALOBJ_EVENT_COUNT              ((sal_uInt16)4)
     264             : 
     265             : // ------------------
     266             : // - SalObject-Types -
     267             : // ------------------
     268             : 
     269             : typedef long (*SALOBJECTPROC)( void* pInst, SalObject* pObject,
     270             :                                sal_uInt16 nEvent, const void* pEvent );
     271             : 
     272             : // -----------------
     273             : // - SalFrameState -
     274             : // -----------------
     275             : 
     276             : // Must be the same as in syswin.hxx
     277             : #define SAL_FRAMESTATE_MASK_X                   ((sal_uLong)0x00000001)
     278             : #define SAL_FRAMESTATE_MASK_Y                   ((sal_uLong)0x00000002)
     279             : #define SAL_FRAMESTATE_MASK_WIDTH               ((sal_uLong)0x00000004)
     280             : #define SAL_FRAMESTATE_MASK_HEIGHT              ((sal_uLong)0x00000008)
     281             : #define SAL_FRAMESTATE_MASK_MAXIMIZED_X         ((sal_uLong)0x00000100)
     282             : #define SAL_FRAMESTATE_MASK_MAXIMIZED_Y         ((sal_uLong)0x00000200)
     283             : #define SAL_FRAMESTATE_MASK_MAXIMIZED_WIDTH     ((sal_uLong)0x00000400)
     284             : #define SAL_FRAMESTATE_MASK_MAXIMIZED_HEIGHT    ((sal_uLong)0x00000800)
     285             : #define SAL_FRAMESTATE_MASK_STATE               ((sal_uLong)0x00000010)
     286             : 
     287             : #define SAL_FRAMESTATE_NORMAL               ((sal_uLong)0x00000001)
     288             : #define SAL_FRAMESTATE_MINIMIZED            ((sal_uLong)0x00000002)
     289             : #define SAL_FRAMESTATE_MAXIMIZED            ((sal_uLong)0x00000004)
     290             : #define SAL_FRAMESTATE_ROLLUP               ((sal_uLong)0x00000008)
     291             : #define SAL_FRAMESTATE_MAXIMIZED_HORZ       ((sal_uLong)0x00000010)
     292             : #define SAL_FRAMESTATE_MAXIMIZED_VERT       ((sal_uLong)0x00000020)
     293             : #define SAL_FRAMESTATE_SYSTEMMASK           ((sal_uLong)0x0000FFFF)
     294             : 
     295             : struct SalFrameState
     296             : {
     297             :     sal_uLong       mnMask;
     298             :     long            mnX;
     299             :     long            mnY;
     300             :     long            mnWidth;
     301             :     long            mnHeight;
     302             :     long            mnMaximizedX;
     303             :     long            mnMaximizedY;
     304             :     long            mnMaximizedWidth;
     305             :     long            mnMaximizedHeight;
     306             :     sal_uLong       mnState;
     307             : };
     308             : 
     309             : // -------------------
     310             : // - SalInputContext -
     311             : // -------------------
     312             : 
     313             : // Have to match DEFINEs in inputctx.hxx, as these are not converted
     314             : #define SAL_INPUTCONTEXT_TEXT               ((sal_uLong)0x00000001)
     315             : #define SAL_INPUTCONTEXT_EXTTEXTINPUT       ((sal_uLong)0x00000002)
     316             : #define SAL_INPUTCONTEXT_EXTTEXTINPUT_ON    ((sal_uLong)0x00000004)
     317             : #define SAL_INPUTCONTEXT_EXTTEXTINPUT_OFF   ((sal_uLong)0x00000008)
     318             : #define SAL_INPUTCONTEXT_CHANGELANGUAGE     ((sal_uLong)0x00000010)
     319             : 
     320             : #ifdef __cplusplus
     321             : 
     322             : struct SalInputContext
     323             : {
     324             :     FontSelectPattern*     mpFont;
     325             :     LanguageType           meLanguage;
     326             :     sal_uLong              mnOptions;
     327             : };
     328             : 
     329             : #endif // __cplusplus
     330             : 
     331             : // ------------------
     332             : // - SalTimer-Types -
     333             : // ------------------
     334             : 
     335             : typedef void (*SALTIMERPROC)();
     336             : 
     337             : #endif // _SV_SALWTYPE_HXX
     338             : 
     339             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10