LCOV - code coverage report
Current view: top level - vcl/inc - salsys.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 2 3 66.7 %
Date: 2012-08-25 Functions: 2 3 66.7 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2                 :            : /*************************************************************************
       3                 :            :  *
       4                 :            :  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       5                 :            :  *
       6                 :            :  * Copyright 2000, 2010 Oracle and/or its affiliates.
       7                 :            :  *
       8                 :            :  * OpenOffice.org - a multi-platform office productivity suite
       9                 :            :  *
      10                 :            :  * This file is part of OpenOffice.org.
      11                 :            :  *
      12                 :            :  * OpenOffice.org is free software: you can redistribute it and/or modify
      13                 :            :  * it under the terms of the GNU Lesser General Public License version 3
      14                 :            :  * only, as published by the Free Software Foundation.
      15                 :            :  *
      16                 :            :  * OpenOffice.org is distributed in the hope that it will be useful,
      17                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      18                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      19                 :            :  * GNU Lesser General Public License version 3 for more details
      20                 :            :  * (a copy is included in the LICENSE file that accompanied this code).
      21                 :            :  *
      22                 :            :  * You should have received a copy of the GNU Lesser General Public License
      23                 :            :  * version 3 along with OpenOffice.org.  If not, see
      24                 :            :  * <http://www.openoffice.org/license.html>
      25                 :            :  * for a copy of the LGPLv3 License.
      26                 :            :  *
      27                 :            :  ************************************************************************/
      28                 :            : 
      29                 :            : #ifndef _SV_SALSYS_HXX
      30                 :            : #define _SV_SALSYS_HXX
      31                 :            : 
      32                 :            : #include <tools/gen.hxx>
      33                 :            : #include <vcl/dllapi.h>
      34                 :            : 
      35                 :            : namespace rtl
      36                 :            : {
      37                 :            :     class OUString;
      38                 :            : }
      39                 :            : 
      40                 :            : /* Button combinations for ShowNativeMessageBox
      41                 :            : */
      42                 :            : const int SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_OK                 = 0;
      43                 :            : const int SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_OK_CANCEL          = 1;
      44                 :            : const int SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_ABORT_RETRY_IGNORE = 2;
      45                 :            : const int SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_YES_NO_CANCEL      = 3;
      46                 :            : const int SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_YES_NO             = 4;
      47                 :            : const int SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_RETRY_CANCEL       = 5;
      48                 :            : 
      49                 :            : /* Button identifier for ShowNativeMessageBox
      50                 :            : */
      51                 :            : const int SALSYSTEM_SHOWNATIVEMSGBOX_BTN_OK     = 1;
      52                 :            : const int SALSYSTEM_SHOWNATIVEMSGBOX_BTN_CANCEL = 2;
      53                 :            : const int SALSYSTEM_SHOWNATIVEMSGBOX_BTN_ABORT  = 3;
      54                 :            : const int SALSYSTEM_SHOWNATIVEMSGBOX_BTN_RETRY  = 4;
      55                 :            : const int SALSYSTEM_SHOWNATIVEMSGBOX_BTN_IGNORE = 5;
      56                 :            : const int SALSYSTEM_SHOWNATIVEMSGBOX_BTN_YES    = 6;
      57                 :            : const int SALSYSTEM_SHOWNATIVEMSGBOX_BTN_NO     = 7;
      58                 :            : 
      59                 :            : 
      60                 :            : // -------------
      61                 :            : // - SalSystem -
      62                 :            : // -------------
      63                 :            : class VCL_PLUGIN_PUBLIC SalSystem
      64                 :            : {
      65                 :            : public:
      66                 :        106 :             SalSystem() {}
      67                 :            :     virtual ~SalSystem();
      68                 :            : 
      69                 :            :     // get info about the display
      70                 :            : 
      71                 :            :     /*  Gets the number of active screens attached to the display
      72                 :            : 
      73                 :            :         @returns the number of active screens
      74                 :            :     */
      75                 :            :     virtual unsigned int GetDisplayScreenCount() = 0;
      76                 :            :     /*  Queries whether multiple screens are part of one bigger display
      77                 :            : 
      78                 :            :         @returns true if screens form one big display
      79                 :            :                  false if screens are distinct and windows cannot
      80                 :            :                  be moved between, or span multiple screens
      81                 :            :     */
      82                 :       3742 :     virtual bool IsUnifiedDisplay() { return true; }
      83                 :            :     /*  Queries the default screen number. The default screen is the
      84                 :            :         screen on which windows will appear if no special positioning
      85                 :            :         is made.
      86                 :            : 
      87                 :            :         @returns the default screen number
      88                 :            :     */
      89                 :          0 :     virtual unsigned int GetDisplayBuiltInScreen() { return 0; }
      90                 :            :     /*  Gets relative position and size of the screens attached to the display
      91                 :            : 
      92                 :            :         @param nScreen
      93                 :            :         The screen number to be queried
      94                 :            : 
      95                 :            :         @returns position: (0,0) in case of IsMultiscreen() == true
      96                 :            :                            else position relative to whole display
      97                 :            :                  size: size of the screen
      98                 :            :     */
      99                 :            :     virtual Rectangle GetDisplayScreenPosSizePixel( unsigned int nScreen ) = 0;
     100                 :            :     /*  Gets position and size of the work area of a screen attached to the display
     101                 :            : 
     102                 :            :         @param nScreen
     103                 :            :         The screen number to be queried
     104                 :            : 
     105                 :            :         @returns position and size relative to the scree
     106                 :            :     */
     107                 :            :     virtual Rectangle GetDisplayScreenWorkAreaPosSizePixel( unsigned int nScreen ) = 0;
     108                 :            :     /* Gets the name of a screen
     109                 :            : 
     110                 :            :        @param nScreen
     111                 :            :        The screen number to be queried
     112                 :            : 
     113                 :            :        @returns the name of the screen
     114                 :            :     */
     115                 :            :     virtual rtl::OUString GetDisplayScreenName( unsigned int nScreen ) = 0;
     116                 :            : 
     117                 :            :     /*  Shows a native message box with the specified title, message and button
     118                 :            :         combination.
     119                 :            : 
     120                 :            :         @param  rTitle
     121                 :            :         The title to be shown by the dialog box.
     122                 :            : 
     123                 :            :         @param  rMessage
     124                 :            :         The message to be shown by the dialog box.
     125                 :            : 
     126                 :            :         @param  nButtonCombination
     127                 :            :         Specify which button combination the message box should display.
     128                 :            :         See button combinations above.
     129                 :            : 
     130                 :            :         @param  nDefaultButton
     131                 :            :         Specifies which button has the focus initially.
     132                 :            :         See button identifiers above.
     133                 :            :         The effect of specifying a button that doesn't belong
     134                 :            :         to the specified button combination is undefined.
     135                 :            : 
     136                 :            :         @returns the identifier of the button that was pressed by the user.
     137                 :            :         See button identifier above. If the function fails the
     138                 :            :         return value is 0.
     139                 :            :     */
     140                 :            :     virtual int ShowNativeMessageBox( const rtl::OUString& rTitle,
     141                 :            :                                       const rtl::OUString& rMessage,
     142                 :            :                                       int nButtonCombination,
     143                 :            :                                       int nDefaultButton) = 0;
     144                 :            : };
     145                 :            : 
     146                 :            : SalSystem* ImplGetSalSystem();
     147                 :            : 
     148                 :            : #endif // _SV_SALSYS_HXX
     149                 :            : 
     150                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10