diff options
35 files changed, 273 insertions, 299 deletions
diff --git a/intern/ghost/GHOST_C-api.h b/intern/ghost/GHOST_C-api.h index 2574b84e51c..35191c4e45d 100644 --- a/intern/ghost/GHOST_C-api.h +++ b/intern/ghost/GHOST_C-api.h @@ -28,6 +28,11 @@ * * ***** END GPL/BL DUAL LICENSE BLOCK ***** */ +/** + * @file GHOST_C-api.h + * GHOST C-API function and type declarations. + * The C-API wraps the C++ objects with the + */ #ifndef GHOST_C_API_H #define GHOST_C_API_H @@ -38,6 +43,12 @@ extern "C" { #endif +/** + * Creates a "handle" for a C++ GHOST object. + * A handle is just an opaque pointer to an empty struct. + * In the API the pointer is casted to the actual C++ class. + * @param name Name of the handle to create. + */ #define GHOST_DECLARE_HANDLE(name) typedef struct name##__ { int unused; } *name GHOST_DECLARE_HANDLE(GHOST_SystemHandle); diff --git a/intern/ghost/GHOST_IEvent.h b/intern/ghost/GHOST_IEvent.h index eb60b5d2e53..4ec47c6d732 100644 --- a/intern/ghost/GHOST_IEvent.h +++ b/intern/ghost/GHOST_IEvent.h @@ -28,13 +28,9 @@ * * ***** END GPL/BL DUAL LICENSE BLOCK ***** */ - /** - - * $Id$ - * Copyright (C) 2001 NaN Technologies B.V. - * @author Maarten Gribnau - * @date May 31, 2001 + * @file GHOST_IEvent.h + * Declaration of GHOST_IEvent interface class. */ #ifndef _GHOST_IEVENT_H_ @@ -45,7 +41,14 @@ class GHOST_IWindow; /** - * Interface class for events received the operating system. + * Interface class for events received from GHOST. + * You should not need to inherit this class. The system will pass these events + * to the GHOST_IEventConsumer::processEvent() method of event consumers.<br> + * Use the getType() method to retrieve the type of event and the getData() + * method to get the event data out. Using the event type you can cast the + * event data to the correct event dat structure. + * @see GHOST_IEventConsumer#processEvent + * @see GHOST_TEventType * @author Maarten Gribnau * @date May 31, 2001 */ diff --git a/intern/ghost/GHOST_IEventConsumer.h b/intern/ghost/GHOST_IEventConsumer.h index ddb3de99953..4186d4c1cab 100644 --- a/intern/ghost/GHOST_IEventConsumer.h +++ b/intern/ghost/GHOST_IEventConsumer.h @@ -28,13 +28,9 @@ * * ***** END GPL/BL DUAL LICENSE BLOCK ***** */ - /** - - * $Id$ - * Copyright (C) 2001 NaN Technologies B.V. - * @author Maarten Gribnau - * @date May 14, 2001 + * @file GHOST_IEventConsumer.h + * Declaration of GHOST_IEventConsumer interface class. */ #ifndef _GHOST_IEVENT_CONSUMER_H_ @@ -44,6 +40,13 @@ /** * Interface class for objects interested in receiving events. + * Objects interested in events should inherit this class and implement the + * processEvent() method. They should then be registered with the system that + * they want to receive events. The system will call the processEvent() method + * for every installed event consumer to pass events. + * @see GHOST_ISystem#addEventConsumer + * @author Maarten Gribnau + * @date May 14, 2001 */ class GHOST_IEventConsumer { @@ -56,9 +59,10 @@ public: } /** - * This method is called by an event producer when an event is available. - * @param event The event that can be handled or ignored. - * @return Indication as to whether the event was handled. + * This method is called by the system when it has events to dispatch. + * @see GHOST_ISystem#dispatchEvents + * @param event The event that can be handled or ignored. + * @return Indication as to whether the event was handled. */ virtual bool processEvent(GHOST_IEvent* event) = 0; }; diff --git a/intern/ghost/GHOST_ISystem.h b/intern/ghost/GHOST_ISystem.h index 56c32ee870a..29c37561604 100644 --- a/intern/ghost/GHOST_ISystem.h +++ b/intern/ghost/GHOST_ISystem.h @@ -28,13 +28,11 @@ * * ***** END GPL/BL DUAL LICENSE BLOCK ***** */ - /** - - * $Id$ - * Copyright (C) 2001 NaN Technologies B.V. - * @author Maarten Gribnau - * @date May 30, 2001 + * @file GHOST_ISystem.h + * Main interface file for C++ Api with declaration of GHOST_ISystem interface + * class. + * Contains the doxygen documentation main page. */ #ifndef _GHOST_ISYSTEM_H_ @@ -47,18 +45,94 @@ class GHOST_IEventConsumer; /** + *! \mainpage GHOST Main Page + * + * \section intro Introduction + * + * GHOST is yet another acronym. It stands for "Generic Handy Operating System + * Toolkit". It has been created to replace the OpenGL utility tool kit + * <a href="http://www.opengl.org/developers/documentation/glut.html">GLUT</a>. + * GLUT was used in <a href="http://www.blender3d.com">Blender</a> until the + * point that Blender needed to be ported to Apple's Mac OSX. Blender needed a + * number of modifications in GLUT to work but the GLUT sources for OSX were + * unavailable at the time. The decision was made to build our own replacement + * for GLUT. In those days, NaN Technologies BV was the company that developed + * Blender. + * <br><br> + * Enough history. What does GHOST have to offer?<br> + * In short: everything that Blender needed from GLUT to run on all it's supported + * operating systems and some extra's. + * This includes : + * <ul> + * <li> Time(r) management.</li> + * <li> Display/window management (windows are only created on the main display). + * <li> Event management.</li> + * <li> Cursor shape management (no custom cursors for now).</li> + * <li> Access to the state of the mouse buttons and the keyboard.</li> + * <li> Menus for windows with events generated when they are accessed (this is + * work in progress).</li> + * </ul> + * Font management has been moved to a separate library. + * + * \section Platforms + * + * \section Building GHOST + * + * \section interface Interface + * GHOST has two programming interfaces: + * <ul> + * <li>The C-API. For programs written in C.</li> + * <li>The C++-API. For programs written in C++.</li> + * </ul> + * GHOST itself is writtem in C++ and the C-API is a wrapper around the C++ + * API. + * + * \subsection cplusplus_api The C++ API consists of the following files: + * <ul> + * <li>GHOST_IEvent.h</li> + * <li>GHOST_IEventConsumer.h</li> + * <li>GHOST_IMenu.h (in progress)</li> + * <li>GHOST_IMenuBar.h (in progress)</li> + * <li>GHOST_ISystem.h</li> + * <li>GHOST_ITimerTask.h</li> + * <li>GHOST_IWindow.h</li> + * <li>GHOST_Rect.h</li> + * <li>GHOST_Types.h</li> + * </ul> + * For an example of using the C++-API, have a look at the GHOST_C-Test.cpp + * program in the ?/ghost/test/gears/ directory. + * + * \subsection c_api The C-API + * To use GHOST in programs written in C, include the file GHOST_C-API.h in + * your program. This file includes the GHOST_Types.h file for all GHOST types + * and defines functions that give you access to the same functionality present + * in the C++ API.<br> + * For an example of using the C-API, have a look at the GHOST_C-Test.c program + * in the ?/ghost/test/gears/ directory. + * + * \section work Work in progress + * + * \subsection menus Menu functionality + * Menu bars with pull-down menu's for windows are in development in the + * current version of GHOST. The file GHOST_MenuDependKludge.h contains a + * setting to turn menu functionality on or off. + */ + +/** * Interface for classes that provide access to the operating system. * There should be only one system class in an application. * Therefore, the routines to create and dispose the system are static. * Provides: - * 1. Time(r) management. - * 2. Display/window management (windows are only created on the main display for now). - * 3. Event management. - * 4. Access to the state of the mouse buttons and the keyboard. + * -# Time(r) management. + * -# Display/window management (windows are only created on the main display). + * -# Event management. + * -# Cursor shape management (no custom cursors for now). + * -# Access to the state of the mouse buttons and the keyboard. + * -# Menus for windows with events generated when they are accessed (this is + * work in progress). * @author Maarten Gribnau * @date May 30, 2001 */ - class GHOST_ISystem { public: diff --git a/intern/ghost/GHOST_ITimerTask.h b/intern/ghost/GHOST_ITimerTask.h index a9adb447ee2..61a2b83011b 100644 --- a/intern/ghost/GHOST_ITimerTask.h +++ b/intern/ghost/GHOST_ITimerTask.h @@ -28,13 +28,9 @@ * * ***** END GPL/BL DUAL LICENSE BLOCK ***** */ - /** - - * $Id$ - * Copyright (C) 2001 NaN Technologies B.V. - * @author Maarten Gribnau - * @date May 31, 2001 + * @file GHOST_ITimerTask.h + * Declaration of GHOST_ITimerTask interface class. */ #ifndef _GHOST_ITIMER_TASK_H_ @@ -45,6 +41,15 @@ /** * Interface for a timer task. + * Timer tasks are created by the system and can be installed by the system. + * After installation, the timer callback-procedure or "timerProc" will be called + * periodically. You should not need to inherit this class. It is passed to the + * application in the timer-callback.<br> + * <br> + * Note that GHOST processes timers in the UI thread. You should ask GHOST + * process messages in order for the timer-callbacks to be called. + * @see GHOST_ISystem#installTimer + * @see GHOST_TimerProcPtr * @author Maarten Gribnau * @date May 31, 2001 */ diff --git a/intern/ghost/GHOST_IWindow.h b/intern/ghost/GHOST_IWindow.h index ee576230890..a9331fadf59 100644 --- a/intern/ghost/GHOST_IWindow.h +++ b/intern/ghost/GHOST_IWindow.h @@ -28,13 +28,9 @@ * * ***** END GPL/BL DUAL LICENSE BLOCK ***** */ - /** - - * $Id$ - * Copyright (C) 2001 NaN Technologies B.V. - * @author Maarten Gribnau - * @date May 31, 2001 + * @file GHOST_IWindow.h + * Declaration of GHOST_IWindow interface class. */ #ifndef _GHOST_IWINDOW_H_ @@ -47,11 +43,22 @@ /** * Interface for GHOST windows. - * Dimensions are given in screen coordinates that are relative to the upper-left corner of the screen. + * + * You can create a window with the system's GHOST_ISystem::createWindow + * method. + * @see GHOST_ISystem#createWindow + * + * There are two coordinate systems: + * <ul> + * <li>The screen coordinate system. The origin of the screen is located in the + * upper left corner of the screen.</li> + * <li>The client rectangle coordinate system. The client rectangle of a window + * is the area that is drawable by the application (excluding title bars etc.). + * </li> + * </ul> * @author Maarten Gribnau * @date May 31, 2001 */ - class GHOST_IWindow { public: diff --git a/intern/ghost/GHOST_Rect.h b/intern/ghost/GHOST_Rect.h index fdf88697d94..6b303504572 100644 --- a/intern/ghost/GHOST_Rect.h +++ b/intern/ghost/GHOST_Rect.h @@ -28,13 +28,9 @@ * * ***** END GPL/BL DUAL LICENSE BLOCK ***** */ - /** - - * $Id$ - * Copyright (C) 2001 NaN Technologies B.V. - * @author Maarten Gribnau - * @date May 10, 2001 + * @file GHOST_Rect.h + * Declaration of GHOST_Rect rectangle class. */ #ifndef _H_GHOST_Rect diff --git a/intern/ghost/GHOST_Types.h b/intern/ghost/GHOST_Types.h index b48e8f2054c..cf148adea10 100644 --- a/intern/ghost/GHOST_Types.h +++ b/intern/ghost/GHOST_Types.h @@ -29,14 +29,6 @@ * ***** END GPL/BL DUAL LICENSE BLOCK ***** */ -/** - - * $Id$ - * Copyright (C) 2001 NaN Technologies B.V. - * @author Maarten Gribnau - * @date May 31, 2001 - */ - #ifndef _GHOST_TYPES_H_ #define _GHOST_TYPES_H_ diff --git a/intern/ghost/intern/GHOST_Buttons.cpp b/intern/ghost/intern/GHOST_Buttons.cpp index fb878ee6244..96ac87925db 100644 --- a/intern/ghost/intern/GHOST_Buttons.cpp +++ b/intern/ghost/intern/GHOST_Buttons.cpp @@ -29,14 +29,6 @@ * ***** END GPL/BL DUAL LICENSE BLOCK ***** */ -/** - - * $Id$ - * Copyright (C) 2001 NaN Technologies B.V. - * @author Maarten Gribnau - * @date May 31, 2001 - */ - #include "GHOST_Buttons.h" #ifdef HAVE_CONFIG_H diff --git a/intern/ghost/intern/GHOST_Buttons.h b/intern/ghost/intern/GHOST_Buttons.h index d803ace4352..ddf5eebe6dd 100644 --- a/intern/ghost/intern/GHOST_Buttons.h +++ b/intern/ghost/intern/GHOST_Buttons.h @@ -28,13 +28,9 @@ * * ***** END GPL/BL DUAL LICENSE BLOCK ***** */ - /** - - * $Id$ - * Copyright (C) 2001 NaN Technologies B.V. - * @author Maarten Gribnau - * @date May 15, 2001 + * @file GHOST_Buttons.h + * Declaration of GHOST_Buttons struct. */ #ifndef _GHOST_BUTTONS_H_ @@ -43,6 +39,12 @@ #include "GHOST_Types.h" +/** + * This struct stores the state of the mouse buttons. + * Buttons can be set using button masks. + * @author Maarten Gribnau + * @date May 15, 2001 + */ struct GHOST_Buttons { /** * Constructor. diff --git a/intern/ghost/intern/GHOST_CallbackEventConsumer.h b/intern/ghost/intern/GHOST_CallbackEventConsumer.h index bdbbb7d7fea..eb54d1c0e14 100644 --- a/intern/ghost/intern/GHOST_CallbackEventConsumer.h +++ b/intern/ghost/intern/GHOST_CallbackEventConsumer.h @@ -28,13 +28,9 @@ * * ***** END GPL/BL DUAL LICENSE BLOCK ***** */ - /** - - * $Id$ - * Copyright (C) 2001 NaN Technologies B.V. - * @author Maarten Gribnau - * @date October 25, 2001 + * @file GHOST_CallbackEventConsumer.h + * Declaration of GHOST_CallbackEventConsumer class. */ #ifndef _GHOST_CALLBACK_EVENT_CONSUMER_H_ @@ -44,16 +40,22 @@ #include "GHOST_C-api.h" /** - * Interface class for objects interested in receiving events. + * Event consumer that will forward events to a call-back routine. + * Especially useful for the C-API. + * @author Maarten Gribnau + * @date October 25, 2001 */ class GHOST_CallbackEventConsumer : public GHOST_IEventConsumer { public: /** * Constructor. + * @param eventCallback The call-back routine invoked. + * @param userData The data passed back though the call-back routine. */ - GHOST_CallbackEventConsumer(GHOST_EventCallbackProcPtr eventCallback, - GHOST_TUserDataPtr userData); + GHOST_CallbackEventConsumer( + GHOST_EventCallbackProcPtr eventCallback, + GHOST_TUserDataPtr userData); /** * Destructor. @@ -70,7 +72,9 @@ public: virtual bool processEvent(GHOST_IEvent* event); protected: + /** The call-back routine invoked. */ GHOST_EventCallbackProcPtr m_eventCallback; + /** The data passed back though the call-back routine. */ GHOST_TUserDataPtr m_userData; }; diff --git a/intern/ghost/intern/GHOST_Debug.h b/intern/ghost/intern/GHOST_Debug.h index b63aaedfdec..ceb29b92df3 100644 --- a/intern/ghost/intern/GHOST_Debug.h +++ b/intern/ghost/intern/GHOST_Debug.h @@ -30,11 +30,8 @@ */ /** - - * $Id$ - * Copyright (C) 2001 NaN Technologies B.V. - * @author Maarten Gribnau - * @date June 1, 2001 + * @file GHOST_Debug.h + * Macro's used in GHOST debug target. */ #ifndef _GHOST_DEBUG_H_ diff --git a/intern/ghost/intern/GHOST_DisplayManager.h b/intern/ghost/intern/GHOST_DisplayManager.h index a206243df79..d7133f4401f 100644 --- a/intern/ghost/intern/GHOST_DisplayManager.h +++ b/intern/ghost/intern/GHOST_DisplayManager.h @@ -28,13 +28,9 @@ * * ***** END GPL/BL DUAL LICENSE BLOCK ***** */ - /** - - * $Id$ - * Copyright (C) 2001 NaN Technologies B.V. - * @author Maarten Gribnau - * @date September 21, 2001 + * @file GHOST_DisplayManager.h + * Declaration of GHOST_DisplayManager class. */ #ifndef _GHOST_DISPLAY_MANAGER_H_ @@ -50,8 +46,9 @@ /** * Manages system displays (platform independent implementation). + * @author Maarten Gribnau + * @date September 21, 2001 */ - class GHOST_DisplayManager { public: diff --git a/intern/ghost/intern/GHOST_DisplayManagerCarbon.h b/intern/ghost/intern/GHOST_DisplayManagerCarbon.h index 644761f5c2a..1523980f38f 100644 --- a/intern/ghost/intern/GHOST_DisplayManagerCarbon.h +++ b/intern/ghost/intern/GHOST_DisplayManagerCarbon.h @@ -28,13 +28,9 @@ * * ***** END GPL/BL DUAL LICENSE BLOCK ***** */ - /** - - * $Id$ - * Copyright (C) 2001 NaN Technologies B.V. - * @author Maarten Gribnau - * @date September 21, 2001 + * @file GHOST_DisplayManagerCarbon.h + * Declaration of GHOST_DisplayManagerCarbon class. */ #ifndef _GHOST_DISPLAY_MANAGER_CARBON_H_ @@ -50,8 +46,10 @@ /** * Manages system displays (Mac OSX/Carbon implementation). + * @see GHOST_DisplayManager + * @author Maarten Gribnau + * @date September 21, 2001 */ - class GHOST_DisplayManagerCarbon : public GHOST_DisplayManager { public: diff --git a/intern/ghost/intern/GHOST_DisplayManagerWin32.h b/intern/ghost/intern/GHOST_DisplayManagerWin32.h index 93be57c72cd..71fc56257f8 100644 --- a/intern/ghost/intern/GHOST_DisplayManagerWin32.h +++ b/intern/ghost/intern/GHOST_DisplayManagerWin32.h @@ -28,13 +28,9 @@ * * ***** END GPL/BL DUAL LICENSE BLOCK ***** */ - /** - - * $Id$ - * Copyright (C) 2001 NaN Technologies B.V. - * @author Maarten Gribnau - * @date September 21, 2001 + * @file GHOST_DisplayManagerWin32.h + * Declaration of GHOST_DisplayManagerWin32 class. */ #ifndef _GHOST_DISPLAY_MANAGER_WIN32_H_ @@ -49,8 +45,9 @@ /** * Manages system displays (WIN32 implementation). + * @author Maarten Gribnau + * @date September 21, 2001 */ - class GHOST_DisplayManagerWin32 : public GHOST_DisplayManager { public: diff --git a/intern/ghost/intern/GHOST_DisplayManagerX11.h b/intern/ghost/intern/GHOST_DisplayManagerX11.h index c6babfc6b02..18226a25e74 100755 --- a/intern/ghost/intern/GHOST_DisplayManagerX11.h +++ b/intern/ghost/intern/GHOST_DisplayManagerX11.h @@ -28,13 +28,9 @@ * * ***** END GPL/BL DUAL LICENSE BLOCK ***** */ - /** - - * $Id$ - * Copyright (C) 2001 NaN Technologies B.V. - * @author Maarten Gribnau - * @date September 21, 2001 + * @file GHOST_DisplayManagerX11.h + * Declaration of GHOST_DisplayManagerX11 class. */ #ifndef _GHOST_DISPLAY_MANAGER_X11_H_ @@ -47,8 +43,9 @@ class GHOST_SystemX11; /** * Manages system displays (X11 implementation). + * @author Laurence Bourn + * @date October 26, 2001 */ - class GHOST_DisplayManagerX11 : public GHOST_DisplayManager { public: diff --git a/intern/ghost/intern/GHOST_Event.h b/intern/ghost/intern/GHOST_Event.h index 05c133cb332..e4844f9bab5 100644 --- a/intern/ghost/intern/GHOST_Event.h +++ b/intern/ghost/intern/GHOST_Event.h @@ -28,13 +28,9 @@ * * ***** END GPL/BL DUAL LICENSE BLOCK ***** */ - /** - - * $Id$ - * Copyright (C) 2001 NaN Technologies B.V. - * @author Maarten Gribnau - * @date May 11, 2001 + * @file GHOST_Event.h + * Declaration of GHOST_Event class. */ #ifndef _GHOST_EVENT_H_ @@ -48,7 +44,6 @@ * @author Maarten Gribnau * @date May 11, 2001 */ - class GHOST_Event : public GHOST_IEvent { public: diff --git a/intern/ghost/intern/GHOST_EventButton.h b/intern/ghost/intern/GHOST_EventButton.h index 013aa92e2fb..c808fd44430 100644 --- a/intern/ghost/intern/GHOST_EventButton.h +++ b/intern/ghost/intern/GHOST_EventButton.h @@ -28,13 +28,9 @@ * * ***** END GPL/BL DUAL LICENSE BLOCK ***** */ - /** - - * $Id$ - * Copyright (C) 2001 NaN Technologies B.V. - * @author Maarten Gribnau - * @date May 11, 2001 + * @file GHOST_EventButton.h + * Declaration of GHOST_EventButton class. */ #ifndef _GHOST_EVENT_BUTTON_H_ diff --git a/intern/ghost/intern/GHOST_EventCursor.h b/intern/ghost/intern/GHOST_EventCursor.h index 5d14e289715..a174242653e 100644 --- a/intern/ghost/intern/GHOST_EventCursor.h +++ b/intern/ghost/intern/GHOST_EventCursor.h @@ -28,13 +28,9 @@ * * ***** END GPL/BL DUAL LICENSE BLOCK ***** */ - /** - - * $Id$ - * Copyright (C) 2001 NaN Technologies B.V. - * @author Maarten Gribnau - * @date May 11, 2001 + * @file GHOST_EventCursor.h + * Declaration of GHOST_EventCursor class. */ #ifndef _GHOST_EVENT_CURSOR_H_ diff --git a/intern/ghost/intern/GHOST_EventKey.h b/intern/ghost/intern/GHOST_EventKey.h index d31ba845426..b170d5a9a48 100644 --- a/intern/ghost/intern/GHOST_EventKey.h +++ b/intern/ghost/intern/GHOST_EventKey.h @@ -28,13 +28,9 @@ * * ***** END GPL/BL DUAL LICENSE BLOCK ***** */ - /** - - * $Id$ - * Copyright (C) 2001 NaN Technologies B.V. - * @author Maarten Gribnau - * @date May 11, 2001 + * @file GHOST_EventKey.h + * Declaration of GHOST_EventKey class. */ #ifndef _GHOST_EVENT_KEY_H_ diff --git a/intern/ghost/intern/GHOST_EventManager.h b/intern/ghost/intern/GHOST_EventManager.h index 7f955eb42df..b8c3812b8e1 100644 --- a/intern/ghost/intern/GHOST_EventManager.h +++ b/intern/ghost/intern/GHOST_EventManager.h @@ -28,13 +28,9 @@ * * ***** END GPL/BL DUAL LICENSE BLOCK ***** */ - /** - - * $Id$ - * Copyright (C) 2001 NaN Technologies B.V. - * @author Maarten Gribnau - * @date May 14, 2001 + * @file GHOST_EventManager.h + * Declaration of GHOST_EventManager class. */ #ifndef _GHOST_EVENT_MANAGER_H_ diff --git a/intern/ghost/intern/GHOST_EventPrinter.h b/intern/ghost/intern/GHOST_EventPrinter.h index a943742026d..9838d2fb6d5 100644 --- a/intern/ghost/intern/GHOST_EventPrinter.h +++ b/intern/ghost/intern/GHOST_EventPrinter.h @@ -28,13 +28,9 @@ * * ***** END GPL/BL DUAL LICENSE BLOCK ***** */ - /** - - * $Id$ - * Copyright (C) 2001 NaN Technologies B.V. - * @author Maarten Gribnau - * @date May 14, 2001 + * @file GHOST_EventPrinter.h + * Declaration of GHOST_EventPrinter class. */ #ifndef _GHOST_EVENT_PRINTER_H_ diff --git a/intern/ghost/intern/GHOST_ModifierKeys.h b/intern/ghost/intern/GHOST_ModifierKeys.h index 6b1e3c2e970..067b66dd106 100644 --- a/intern/ghost/intern/GHOST_ModifierKeys.h +++ b/intern/ghost/intern/GHOST_ModifierKeys.h @@ -28,13 +28,9 @@ * * ***** END GPL/BL DUAL LICENSE BLOCK ***** */ - /** - - * $Id$ - * Copyright (C) 2001 NaN Technologies B.V. - * @author Maarten Gribnau - * @date May 17, 2001 + * @file GHOST_ModifierKeys.h + * Declaration of GHOST_ModifierKeys struct. */ #ifndef _GHOST_MODIFIER_KEYS_H_ @@ -42,6 +38,12 @@ #include "GHOST_Types.h" +/** + * Stores the state of modifier keys. + * Discriminates between left and right modifier keys. + * @author Maarten Gribnau + * @date May 17, 2001 + */ struct GHOST_ModifierKeys { /** diff --git a/intern/ghost/intern/GHOST_System.h b/intern/ghost/intern/GHOST_System.h index 533665b6671..85e7b2d6b44 100644 --- a/intern/ghost/intern/GHOST_System.h +++ b/intern/ghost/intern/GHOST_System.h @@ -28,13 +28,9 @@ * * ***** END GPL/BL DUAL LICENSE BLOCK ***** */ - /** - - * $Id$ - * Copyright (C) 2001 NaN Technologies B.V. - * @author Maarten Gribnau - * @date May 7, 2001 + * @file GHOST_System.h + * Declaration of GHOST_System class. */ #ifndef _GHOST_SYSTEM_H_ @@ -57,21 +53,14 @@ class GHOST_Window; class GHOST_WindowManager; /** - * Implementation of platform independent functionality of the GHOST_ISystem interface. - * GHOST_System is an abstract base class because not all methods of GHOST_ISystem are implemented. - * There should be only one system class in an application. - * Therefore, the routines to create and dispose the system are static. - * Provides: - * 1. Time(r) management. - * 2. Display/window management (windows are only created on the main display for now). - * 3. Event management. - * 4. Cursor shape management (no custom cursors for now). - * 5. Access to the state of the mouse buttons and the keyboard. + * Implementation of platform independent functionality of the GHOST_ISystem + * interface. + * GHOST_System is an abstract class because not all methods of GHOST_ISystem + * are implemented. * @see GHOST_ISystem. * @author Maarten Gribnau * @date May 7, 2001 */ - class GHOST_System : public GHOST_ISystem { protected: diff --git a/intern/ghost/intern/GHOST_SystemCarbon.h b/intern/ghost/intern/GHOST_SystemCarbon.h index b8316a2d46c..ec1ff338c8f 100644 --- a/intern/ghost/intern/GHOST_SystemCarbon.h +++ b/intern/ghost/intern/GHOST_SystemCarbon.h @@ -28,13 +28,9 @@ * * ***** END GPL/BL DUAL LICENSE BLOCK ***** */ - /** - - * $Id$ - * Copyright (C) 2001 NaN Technologies B.V. - * @author Maarten Gribnau - * @date May 10, 2001 + * @file GHOST_SystemCarbon.h + * Declaration of GHOST_SystemCarbon class. */ #ifndef _GHOST_SYSTEM_CARBON_H_ diff --git a/intern/ghost/intern/GHOST_SystemCocoa.h b/intern/ghost/intern/GHOST_SystemCocoa.h deleted file mode 100644 index 96199af6346..00000000000 --- a/intern/ghost/intern/GHOST_SystemCocoa.h +++ /dev/null @@ -1,66 +0,0 @@ -/** - * $Id$ - * ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. The Blender - * Foundation also sells licenses for use in proprietary software under - * the Blender License. See http://www.blender.org/BL/ for information - * about this. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL/BL DUAL LICENSE BLOCK ***** - */ - -/** - - * $Id$ - * Copyright (C) 2001 NaN Technologies B.V. - * @author Maarten Gribnau - * @date May 22, 2001 - */ - -#ifndef _GHOST_SYSTEM_CARBON_H_ -#define _GHOST_SYSTEM_CARBON_H_ - -#ifndef __APPLE__ -#error Apple OSX only! -#endif // __APPLE__ - -#include "GHOST_System.h" -#include "GHOST_Keys.h" - -#include <Carbon/Carbon.h> - -class GHOST_EventCursor; -class GHOST_EventKey; -class GHOST_EventWindow; - -/** - * OSX/Cocoa Implementation of GHOST_System class. - * @see GHOST_System. - * @author Maarten Gribnau - * @date May 21, 2001 - */ -class GHOST_SystemCarbon : public GHOST_System { -}; - -#endif // _GHOST_SYSTEM_CARBON_H_ - diff --git a/intern/ghost/intern/GHOST_SystemWin32.h b/intern/ghost/intern/GHOST_SystemWin32.h index f38a104de3d..9d48c5c7cdc 100644 --- a/intern/ghost/intern/GHOST_SystemWin32.h +++ b/intern/ghost/intern/GHOST_SystemWin32.h @@ -28,13 +28,9 @@ * * ***** END GPL/BL DUAL LICENSE BLOCK ***** */ - /** - - * $Id$ - * Copyright (C) 2001 NaN Technologies B.V. - * @author Maarten Gribnau - * @date May 10, 2001 + * @file GHOST_SystemWin32.h + * Declaration of GHOST_SystemWin32 class. */ #ifndef _GHOST_SYSTEM_WIN32_H_ diff --git a/intern/ghost/intern/GHOST_SystemX11.h b/intern/ghost/intern/GHOST_SystemX11.h index ae828a9d4da..6c98ba71433 100755 --- a/intern/ghost/intern/GHOST_SystemX11.h +++ b/intern/ghost/intern/GHOST_SystemX11.h @@ -28,13 +28,9 @@ * * ***** END GPL/BL DUAL LICENSE BLOCK ***** */ - /** - - * $Id$ - * Copyright (C) 2001 NaN Technologies B.V. - * @author Maarten Gribnau - * @date May 10, 2001 + * @file GHOST_SystemCarbon.h + * Declaration of GHOST_SystemCarbon class. */ #ifndef _GHOST_SYSTEM_X11_H_ diff --git a/intern/ghost/intern/GHOST_TimerManager.h b/intern/ghost/intern/GHOST_TimerManager.h index fe843442661..31016032dd2 100644 --- a/intern/ghost/intern/GHOST_TimerManager.h +++ b/intern/ghost/intern/GHOST_TimerManager.h @@ -28,13 +28,15 @@ * * ***** END GPL/BL DUAL LICENSE BLOCK ***** */ +/** + * @file GHOST_SystemX11.h + * Declaration of GHOST_SystemX11 class. + */ /** * $Id$ * Copyright (C) 2001 NaN Technologies B.V. - * @author Maarten Gribnau - * @date May 31, 2001 */ #ifndef _GHOST_TIMER_MANAGER_H_ @@ -55,6 +57,8 @@ class GHOST_TimerTask; * Manages a list of timer tasks. * Timer tasks added are owned by the manager. * Don't delete timer task objects. + * @author Maarten Gribnau + * @date May 31, 2001 */ class GHOST_TimerManager { diff --git a/intern/ghost/intern/GHOST_TimerTask.h b/intern/ghost/intern/GHOST_TimerTask.h index bbcb75f4dcd..49bbe5e09ab 100644 --- a/intern/ghost/intern/GHOST_TimerTask.h +++ b/intern/ghost/intern/GHOST_TimerTask.h @@ -28,13 +28,9 @@ * * ***** END GPL/BL DUAL LICENSE BLOCK ***** */ - /** - - * $Id$ - * Copyright (C) 2001 NaN Technologies B.V. - * @author Maarten Gribnau - * @date May 28, 2001 + * @file GHOST_TimerTask.h + * Declaration of GHOST_TimerTask class. */ #ifndef _GHOST_TIMER_TASK_H_ diff --git a/intern/ghost/intern/GHOST_Window.h b/intern/ghost/intern/GHOST_Window.h index 2947f94802b..be4dc808981 100644 --- a/intern/ghost/intern/GHOST_Window.h +++ b/intern/ghost/intern/GHOST_Window.h @@ -28,13 +28,9 @@ * * ***** END GPL/BL DUAL LICENSE BLOCK ***** */ - /** - - * $Id$ - * Copyright (C) 2001 NaN Technologies B.V. - * @author Maarten Gribnau - * @date May 7, 2001 + * @file GHOST_Window.h + * Declaration of GHOST_Window class. */ #ifndef _GHOST_WINDOW_H_ @@ -46,15 +42,39 @@ class STR_String; /** * Platform independent implementation of GHOST_IWindow. - * Dimensions are given in screen coordinates that are relative to the upper-left corner of the screen. + * Dimensions are given in screen coordinates that are relative to the + * upper-left corner of the screen. + * Implements part of the GHOST_IWindow interface and adds some methods to + * be implemented by childs of this class. * @author Maarten Gribnau * @date May 7, 2001 */ - class GHOST_Window : public GHOST_IWindow { public: /** + * @section Interface inherited from GHOST_IWindow left for derived class + * implementation. + * virtual bool getValid() const = 0; + * virtual void setTitle(const STR_String& title) = 0; + * virtual void getTitle(STR_String& title) const = 0; + * virtual void getWindowBounds(GHOST_Rect& bounds) const = 0; + * virtual void getClientBounds(GHOST_Rect& bounds) const = 0; + * virtual GHOST_TSuccess setClientWidth(GHOST_TUns32 width) = 0; + * virtual GHOST_TSuccess setClientHeight(GHOST_TUns32 height) = 0; + * virtual GHOST_TSuccess setClientSize(GHOST_TUns32 width, GHOST_TUns32 height) = 0; + * virtual void screenToClient(GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32& outX, GHOST_TInt32& outY) const = 0; + * virtual void clientToScreen(GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32& outX, GHOST_TInt32& outY) const = 0; + * virtual GHOST_TWindowState getState() const = 0; + * virtual GHOST_TSuccess setState(GHOST_TWindowState state) = 0; + * virtual GHOST_TWindowOrder getOrder(void) = 0; + * virtual GHOST_TSuccess setOrder(GHOST_TWindowOrder order) = 0; + * virtual GHOST_TSuccess swapBuffers() = 0; + * virtual GHOST_TSuccess activateDrawingContext() = 0; + * virtual GHOST_TSuccess invalidate() = 0; + */ + + /** * Constructor. * Creates a new window and opens it. * To check if the window was created properly, use the getValid() method. diff --git a/intern/ghost/intern/GHOST_WindowCarbon.h b/intern/ghost/intern/GHOST_WindowCarbon.h index 8fb4663b3df..ce1dd7c1007 100644 --- a/intern/ghost/intern/GHOST_WindowCarbon.h +++ b/intern/ghost/intern/GHOST_WindowCarbon.h @@ -28,13 +28,9 @@ * * ***** END GPL/BL DUAL LICENSE BLOCK ***** */ - /** - - * $Id$ - * Copyright (C) 2001 NaN Technologies B.V. - * @author Maarten Gribnau - * @date May 10, 2001 + * @file GHOST_WindowCarbon.h + * Declaration of GHOST_WindowCarbon class. */ #ifndef _GHOST_WINDOW_CARBON_H_ @@ -53,10 +49,17 @@ /** * Window on Mac OSX/Carbon. + * WILL BE ADDED: + * Carbon windows have a size widget in the lower right corner of the window. + * To force it to be visible, the height of the client rectangle is reduced so + * that applications do not draw in that area. GHOST will manage that area + * which is called the gutter. + * END WILL BE ADDED + * When OpenGL contexts are active, GHOST will use AGL_BUFFER_RECT to prevent + * OpenGL drawing outside the reduced client rectangle. * @author Maarten Gribnau * @date May 23, 2001 */ - class GHOST_WindowCarbon : public GHOST_Window { public: /** diff --git a/intern/ghost/intern/GHOST_WindowManager.h b/intern/ghost/intern/GHOST_WindowManager.h index f5af43e5cdc..a88b3f792ea 100644 --- a/intern/ghost/intern/GHOST_WindowManager.h +++ b/intern/ghost/intern/GHOST_WindowManager.h @@ -28,13 +28,9 @@ * * ***** END GPL/BL DUAL LICENSE BLOCK ***** */ - /** - - * $Id$ - * Copyright (C) 2001 NaN Technologies B.V. - * @author Maarten Gribnau - * @date May 11, 2001 + * @file GHOST_WindowManager.h + * Declaration of GHOST_WindowManager class. */ #ifndef _GHOST_WINDOW_MANAGER_H_ @@ -49,12 +45,12 @@ #include "GHOST_Rect.h" #include "GHOST_IWindow.h" -//class GHOST_Window; /** * Manages system windows (platform independent implementation). + * @author Maarten Gribnau + * @date May 11, 2001 */ - class GHOST_WindowManager { public: diff --git a/intern/ghost/intern/GHOST_WindowWin32.h b/intern/ghost/intern/GHOST_WindowWin32.h index 2663869ea47..3d45d2afa5d 100644 --- a/intern/ghost/intern/GHOST_WindowWin32.h +++ b/intern/ghost/intern/GHOST_WindowWin32.h @@ -28,13 +28,9 @@ * * ***** END GPL/BL DUAL LICENSE BLOCK ***** */ - /** - - * $Id$ - * Copyright (C) 2001 NaN Technologies B.V. - * @author Maarten Gribnau - * @date May 10, 2001 + * @file GHOST_WindowWin32.h + * Declaration of GHOST_WindowWin32 class. */ #ifndef _GHOST_WINDOW_WIN32_H_ @@ -54,7 +50,6 @@ * @author Maarten Gribnau * @date May 10, 2001 */ - class GHOST_WindowWin32 : public GHOST_Window { public: /** diff --git a/intern/ghost/intern/GHOST_WindowX11.h b/intern/ghost/intern/GHOST_WindowX11.h index 5a56a9a82e9..0b0b8d596d5 100755 --- a/intern/ghost/intern/GHOST_WindowX11.h +++ b/intern/ghost/intern/GHOST_WindowX11.h @@ -28,13 +28,9 @@ * * ***** END GPL/BL DUAL LICENSE BLOCK ***** */ - /** - - * $Id$ - * Copyright (C) 2001 NaN Technologies B.V. - * @author Maarten Gribnau - * @date May 7, 2001 + * @file GHOST_WindowX11.h + * Declaration of GHOST_WindowX11 class. */ #ifndef _GHOST_WINDOWX11_H_ |