summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/aqua/inc/saldata.hxx6
-rw-r--r--vcl/aqua/inc/saltimer.h75
-rw-r--r--vcl/aqua/source/app/makefile.mk6
-rw-r--r--vcl/aqua/source/app/saltimer.cxx44
-rw-r--r--vcl/aqua/source/window/salframe.cxx135
5 files changed, 16 insertions, 250 deletions
diff --git a/vcl/aqua/inc/saldata.hxx b/vcl/aqua/inc/saldata.hxx
index 8327d8eb548d..313cf1f64d74 100644
--- a/vcl/aqua/inc/saldata.hxx
+++ b/vcl/aqua/inc/saldata.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: saldata.hxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: pluby $ $Date: 2000-12-06 03:11:31 $
+ * last change: $Author: pluby $ $Date: 2000-12-08 01:28:57 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -114,8 +114,6 @@ struct SalData
long* mpDitherDiff; // Dither mapping table
BYTE* mpDitherLow; // Dither mapping table
BYTE* mpDitherHigh; // Dither mapping table
- double mnTimerExpiration; // Current expiration time (in seconds) of the Timer
- double mnTimerInterval; // Current interval (in seconds) of the Timer
SALTIMERPROC mpTimerProc; // timer callback proc
VCLWINDOW mhWantLeaveMsg; // window handle, that want a MOUSELEAVE message
AutoTimer* mpMouseLeaveTimer; // Timer for MouseLeave Test
diff --git a/vcl/aqua/inc/saltimer.h b/vcl/aqua/inc/saltimer.h
deleted file mode 100644
index 34116b8ffa16..000000000000
--- a/vcl/aqua/inc/saltimer.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*************************************************************************
- *
- * $RCSfile: saltimer.h,v $
- *
- * $Revision: 1.1 $
- *
- * last change: $Author: pluby $ $Date: 2000-11-30 00:01:50 $
- *
- * The Contents of this file are made available subject to the terms of
- * either of the following licenses
- *
- * - GNU Lesser General Public License Version 2.1
- * - Sun Industry Standards Source License Version 1.1
- *
- * Sun Microsystems Inc., October, 2000
- *
- * GNU Lesser General Public License Version 2.1
- * =============================================
- * Copyright 2000 by Sun Microsystems, Inc.
- * 901 San Antonio Road, Palo Alto, CA 94303, USA
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- *
- *
- * Sun Industry Standards Source License Version 1.1
- * =================================================
- * The contents of this file are subject to the Sun Industry Standards
- * Source License Version 1.1 (the "License"); You may not use this file
- * except in compliance with the License. You may obtain a copy of the
- * License at http://www.openoffice.org/license.html.
- *
- * Software provided under this License is provided on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
- * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
- * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
- * See the License for the specific provisions governing your rights and
- * obligations concerning the Software.
- *
- * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
- *
- * Copyright: 2000 by Sun Microsystems, Inc.
- *
- * All Rights Reserved.
- *
- * Contributor(s): _______________________________________
- *
- *
- ************************************************************************/
-
-#ifndef _SV_SALTIMER_H
-#define _SV_SALTIMER_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif // __cplusplus
-
-void CallSalTimerCallbackProc();
-
-#ifdef __cplusplus
-}
-#endif // __cplusplus
-
-#endif // _SV_SALTIMER_H
diff --git a/vcl/aqua/source/app/makefile.mk b/vcl/aqua/source/app/makefile.mk
index 2b327207b7ba..be657fa03e05 100644
--- a/vcl/aqua/source/app/makefile.mk
+++ b/vcl/aqua/source/app/makefile.mk
@@ -2,9 +2,9 @@
#
# $RCSfile: makefile.mk,v $
#
-# $Revision: 1.8 $
+# $Revision: 1.9 $
#
-# last change: $Author: pluby $ $Date: 2000-12-01 22:29:20 $
+# last change: $Author: pluby $ $Date: 2000-12-08 01:28:59 $
#
# The Contents of this file are made available subject to the terms of
# either of the following licenses
@@ -93,7 +93,7 @@ SLOFILES= $(SLO)$/salinst.obj \
$(SLO)$/salmain.obj \
$(SLO)$/VCLApplication.obj \
$(SLO)$/VCLAutoreleasePool.obj \
- $(SLO)$/VCLDate.obj
+ $(SLO)$/VCLEvent.obj
EXCEPTIONSFILES=$(SLO)$/salmain.obj \
$(OBJ)$/salmain.obj
diff --git a/vcl/aqua/source/app/saltimer.cxx b/vcl/aqua/source/app/saltimer.cxx
index cad742a354fc..c19b7bd2173f 100644
--- a/vcl/aqua/source/app/saltimer.cxx
+++ b/vcl/aqua/source/app/saltimer.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: saltimer.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: pluby $ $Date: 2000-12-04 00:10:12 $
+ * last change: $Author: pluby $ $Date: 2000-12-08 01:28:59 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -61,56 +61,28 @@
#define _SV_SALTIMER_CXX
-#ifndef _SV_SALDATA_HXX
-#include <saldata.hxx>
-#endif
#ifndef _SV_SALTIMER_HXX
#include <saltimer.hxx>
#endif
-#ifndef _SV_SALTIMER_HXX
-#include <saltimer.h>
+#ifndef _SV_SALDATA_HXX
+#include <saldata.hxx>
#endif
-#ifndef _SV_VCLDATE_H
-#include <VCLDate.h>
+#ifndef _SV_VCLEVENT_H
+#include <VCLEvent.h>
#endif
// =======================================================================
-#ifdef __cplusplus
-extern "C" {
-#endif // __cplusplus
-
-void CallSalTimerCallbackProc()
-{
- SalData* pSalData = GetSalData();
-
- if ( pSalData->mpTimerProc )
- pSalData->mpTimerProc();
-}
-
-#ifdef __cplusplus
-}
-#endif // __cplusplus
-
-// =======================================================================
-
void SalTimer::Start( ULONG nMS )
{
- SalData* pSalData = GetSalData();
-
- pSalData->mnTimerInterval = (double)nMS / 1000;
- pSalData->mnTimerExpiration =
- VCLDate_TimeIntervalSince1970() + pSalData->mnTimerInterval;
+ VCLApplication_StartPeriodicEvents( nMS );
}
// -----------------------------------------------------------------------
void SalTimer::Stop()
{
- SalData* pSalData = GetSalData();
-
- pSalData->mnTimerInterval = 0;
- pSalData->mnTimerExpiration = 0;
+ VCLApplication_StopPeriodicEvents();
}
// -----------------------------------------------------------------------
diff --git a/vcl/aqua/source/window/salframe.cxx b/vcl/aqua/source/window/salframe.cxx
index 49e3d3a84163..889887295b8e 100644
--- a/vcl/aqua/source/window/salframe.cxx
+++ b/vcl/aqua/source/window/salframe.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: salframe.cxx,v $
*
- * $Revision: 1.34 $
+ * $Revision: 1.35 $
*
- * last change: $Author: pluby $ $Date: 2000-12-02 02:33:11 $
+ * last change: $Author: pluby $ $Date: 2000-12-08 01:29:02 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -96,7 +96,7 @@ SalFrame::SalFrame()
{
SalData* pSalData = GetSalData();
- maFrameData.mhWnd = 0;
+ maFrameData.mhWnd = NULL;
maFrameData.mpGraphics = NULL;
maFrameData.mpInst = NULL;
maFrameData.mpProc = ImplSalFrameCallbackDummy;
@@ -238,135 +238,6 @@ void SalFrame::Show( BOOL bVisible )
if ( maFrameData.mhWnd )
VCLWindow_Close( maFrameData.mhWnd );
} // else
-
-#ifdef 0
- // This is temporary code for testing only and should be removed
- // when development of the SalObject class is complete. This code
- // allows us to test our SalGraphics drawing methods.
-
- RGBColor rectFillColor = { 65535, 25000, 25000 }; // shade of red
- RGBColor polyFillColor = { 25000, 25000, 65535 }; // shade of blue
- RGBColor linePenColor = { 25000, 65535, 25000 }; // shade of green
- RGBColor pixelColor = { 60000, 40000, 20000 }; // shade of orange
-
- ULONG polyVertexCount = 7;
- long polyVertexXCoors[polyVertexCount];
- long polyVertexYCoors[polyVertexCount];
- long pixelXCoor;
- long pixelYCoor;
- long pixelXCnt;
- long pixelYCnt;
-
- // Get this window's cached handle to its native content view
-
- VCLVIEW hView = VCLWindow_ContentView ( maFrameData.mhWnd );
-
- // Draw a line on the native content view (no color)
-
- VCLGraphics_DrawLine ( hView, 15L, 15L, 150L, 150L );
-
- // Draw a line on the native content view (color)
-
- VCLGraphics_DrawColorLine ( hView, 55L, 15L, 190L, 150L, &linePenColor );
-
- // Draw a rectangle on the native content view (no color)
-
- VCLGraphics_DrawRect ( hView, 200L, 15L, 100L, 150L );
-
- // Draw a rectangle on the native content view (color)
-
- VCLGraphics_DrawColorRect ( hView, 325L, 15L, 100L, 150L, &rectFillColor );
-
- // Draw a polygon on the native content view (no color)
-
- polyVertexXCoors[0] = 350;
- polyVertexYCoors[0] = 250;
-
- polyVertexXCoors[1] = 450;
- polyVertexYCoors[1] = 250;
-
- polyVertexXCoors[2] = 375;
- polyVertexYCoors[2] = 350;
-
- polyVertexXCoors[3] = 400;
- polyVertexYCoors[3] = 200;
-
- polyVertexXCoors[4] = 425;
- polyVertexYCoors[4] = 350;
-
- polyVertexCount = 5;
-
- VCLGraphics_DrawPolygon ( hView,
- polyVertexCount,
- polyVertexXCoors,
- polyVertexYCoors
- );
-
- // Draw a polygon on the native content view (color)
-
- polyVertexXCoors[0] = 15;
- polyVertexYCoors[0] = 250;
-
- polyVertexXCoors[1] = 145;
- polyVertexYCoors[1] = 250;
-
- polyVertexXCoors[2] = 165;
- polyVertexYCoors[2] = 200;
-
- polyVertexXCoors[3] = 185;
- polyVertexYCoors[3] = 250;
-
- polyVertexXCoors[4] = 325;
- polyVertexYCoors[4] = 250;
-
- polyVertexXCoors[5] = 215;
- polyVertexYCoors[5] = 320;
-
- polyVertexXCoors[6] = 125;
- polyVertexYCoors[6] = 320;
-
- polyVertexCount = 7;
-
- VCLGraphics_DrawColorPolygon ( hView,
- polyVertexCount,
- polyVertexXCoors,
- polyVertexYCoors,
- &polyFillColor
- );
-
- // Draw a polygon on the native content view (no color)
-
- pixelXCnt = 235;
- pixelYCnt = 390;
-
- for ( pixelXCoor = 135; pixelXCoor < pixelXCnt; pixelXCoor++ )
- {
- for ( pixelYCoor = 355; pixelYCoor < pixelYCnt; pixelYCoor++ )
- {
- VCLGraphics_DrawPixel ( hView, pixelXCoor, pixelYCoor );
- } // for
- } // for
-
- // Draw a polygon on the native content view (color)
-
- pixelXCnt = 115;
-
- for ( pixelXCoor = 15; pixelXCoor < pixelXCnt; pixelXCoor++ )
- {
- for ( pixelYCoor = 355; pixelYCoor < pixelYCnt; pixelYCoor++ )
- {
- pixelColor.red = pixelYCoor + pixelXCoor + pixelColor.red;
- pixelColor.green = pixelYCoor + pixelXCoor + pixelColor.green;
- pixelColor.blue = pixelYCoor + pixelXCoor + pixelColor.blue;
-
- VCLGraphics_DrawColorPixel ( hView,
- pixelXCoor,
- pixelYCoor,
- &pixelColor
- );
- } // for
- } // for
-#endif // 0
} // SalFrame::Show
// -----------------------------------------------------------------------