mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
Use of Cotire tool is introduced for acceleration of CMake builds, by usage of precompiled headers. CMake option BUILD_USE_PCH is added to enable / disable use of precompiled headers When precompiled headers are used, additional compiler macros are defined globally in the build system to avoid problems due to different order of included files: - NOMINMAX is defined on Windows to prevent defining "min" and "max" as macros by windows.h - STRSAFE_NO_DEPRECATE and _SCL_SECURE_NO_WARNINGS are defined on Windows to prevent declaring functions of standard C library as deprecated by #pragma, and other warnings in system headers - GL_GLEXT_LEGACY and GLX_GLEXT_LEGACY are defined to ensure that only OCCT's own glext.h is used - __STDC_FORMAT_MACROS is defined to have standard C print format macros always defined Code is corrected to avoid conflicts with system headers and in case of compiling together as unity builds (partially): - Some locally defined variables in TKV3d, TKHLR are renamed to be unique - Duplicated definitions of macros and global functions are eliminated in TKSTEP - Useless header WNT_UInt.hxx is removed - Usage of local variables conflicting with X11 macro is avoided in Draw_Viewer.cxx - Local variables in AIS_ConcentricRelation.cxx are renamed to avoid conflict with macros defined in windows.h - HXX files containing code are renamed to PXX or merged with corresponding CXX files. IVtkTools classes are corrected to avoid compiler warnings disabled in non-PCH builds by inclusion of VTK headers. Useless pragmas disabling warnings on MSVC are removed
91 lines
3.5 KiB
C++
91 lines
3.5 KiB
C++
// Created on: 1996-01-26
|
|
// Created by: PLOTNIKOV Eugeny
|
|
// Copyright (c) 1996-1999 Matra Datavision
|
|
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
|
//
|
|
// This file is part of Open CASCADE Technology software library.
|
|
//
|
|
// 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, with special exception defined in the file
|
|
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
|
// distribution for complete text of the license and disclaimer of any warranty.
|
|
//
|
|
// Alternatively, this file may be used under the terms of Open CASCADE
|
|
// commercial license or contractual agreement.
|
|
|
|
#ifndef _WNT_WClass_HeaderFile
|
|
#define _WNT_WClass_HeaderFile
|
|
|
|
#include <Standard.hxx>
|
|
|
|
#if defined(_WIN32) && !defined(OCCT_UWP)
|
|
|
|
#include <Aspect_Handle.hxx>
|
|
#include <Standard_Address.hxx>
|
|
#include <Standard_CString.hxx>
|
|
#include <Standard_Integer.hxx>
|
|
#include <Standard_Transient.hxx>
|
|
#include <Standard_Type.hxx>
|
|
#include <TCollection_AsciiString.hxx>
|
|
|
|
//! This class defines a Windows NT window class.
|
|
//! A window in Windows NT is always created based on a
|
|
//! window class. The window class identifies the window
|
|
//! procedure that processes messages to the window. Each
|
|
//! window class has unique name ( character string ). More
|
|
//! than one window can be created based on a single window
|
|
//! class. For example, all button windows in Windows NT
|
|
//! are created based on the same window class. The window
|
|
//! class defines the window procedure and some other
|
|
//! characteristics ( background, mouse cursor shape etc. )
|
|
//! of the windows that are created based on that class.
|
|
//! When we create a window, we define additional
|
|
//! characteristics of the window that are unique to that
|
|
//! window. So, we have to create and register window
|
|
//! class before creation of any window. Of course, it's possible
|
|
//! to create a new window class for each window inside
|
|
//! the Window class and do not use the WClass at all.
|
|
//! We implemented this class for sake of flexibility of
|
|
//! event processing.
|
|
class WNT_WClass : public Standard_Transient
|
|
{
|
|
friend class WNT_Window;
|
|
DEFINE_STANDARD_RTTIEXT(WNT_WClass, Standard_Transient)
|
|
public:
|
|
|
|
//! Creates a Windows NT window class and registers it.
|
|
Standard_EXPORT WNT_WClass (const TCollection_AsciiString& theClassName,
|
|
const Standard_Address theWndProc,
|
|
const unsigned int theStyle,
|
|
const Standard_Integer theClassExtra = 0,
|
|
const Standard_Integer theWindowExtra = 0,
|
|
const Aspect_Handle theCursor = NULL,
|
|
const Aspect_Handle theIcon = NULL,
|
|
const TCollection_AsciiString& theMenuName = TCollection_AsciiString());
|
|
|
|
//! Destroys all resources attached to the class
|
|
Standard_EXPORT ~WNT_WClass();
|
|
|
|
//! Returns address of window procedure.
|
|
Standard_Address WndProc() const { return myWndProc; }
|
|
|
|
//! Returns a class name.
|
|
const TCollection_AsciiString& Name() const { return myClassName; }
|
|
|
|
//! Returns a program instance handle.
|
|
Aspect_Handle Instance() const { return myAppInstance; }
|
|
|
|
protected:
|
|
|
|
TCollection_AsciiString myClassName;
|
|
Aspect_Handle myAppInstance;
|
|
Standard_Address myWndProc;
|
|
|
|
};
|
|
|
|
DEFINE_STANDARD_HANDLE(WNT_WClass, Standard_Transient)
|
|
|
|
#endif // _WIN32
|
|
#endif // _WNT_WClass_HeaderFile
|