epoc32/include/coemain.inl
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
permissions -rw-r--r--
Final list of Symbian^2 public API header files
williamr@2
     1
// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
williamr@2
     2
// All rights reserved.
williamr@2
     3
// This component and the accompanying materials are made available
williamr@2
     4
// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
williamr@2
     5
// which accompanies this distribution, and is available
williamr@2
     6
// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
williamr@2
     7
//
williamr@2
     8
// Initial Contributors:
williamr@2
     9
// Nokia Corporation - initial contribution.
williamr@2
    10
//
williamr@2
    11
// Contributors:
williamr@2
    12
//
williamr@2
    13
// Description:
williamr@2
    14
//
williamr@2
    15
williamr@2
    16
williamr@2
    17
williamr@2
    18
/**
williamr@2
    19
 Gets the most recent standard event that was received by the application.
williamr@2
    20
 
williamr@2
    21
 Note: standard events are all events except redraw events and priority key events.
williamr@2
    22
 
williamr@2
    23
 @return The last event. 
williamr@2
    24
*/
williamr@2
    25
inline const TWsEvent& CCoeEnv::LastEvent() const
williamr@2
    26
	{ return(iLastEvent); }
williamr@2
    27
williamr@2
    28
/** Gets the application UI owned by this application.
williamr@2
    29
williamr@2
    30
@return Pointer to the app UI owned by the application. */
williamr@2
    31
inline CCoeAppUi* CCoeEnv::AppUi() const
williamr@2
    32
	{ return(iAppUi); }
williamr@2
    33
williamr@2
    34
/** Gets the file server session owned by this CCoeEnv. 
williamr@2
    35
williamr@2
    36
This session is normally only used for accessing the application's resource 
williamr@2
    37
file.
williamr@2
    38
williamr@2
    39
@return The file server session owned by this CCoeEnv. */
williamr@2
    40
inline RFs& CCoeEnv::FsSession() const
williamr@2
    41
	{ return((RFs&)iFsSession); }
williamr@2
    42
williamr@2
    43
/** Gets the window server session owned by the application. 
williamr@2
    44
williamr@2
    45
This provides access to window server functions not directly accessible via 
williamr@2
    46
the UI control framework.
williamr@2
    47
williamr@2
    48
@return The window server session opened by the application. */
williamr@2
    49
inline RWsSession& CCoeEnv::WsSession() const
williamr@2
    50
	{ return((RWsSession&)iWsSession); }
williamr@2
    51
williamr@2
    52
/** Gets the application's window group.
williamr@2
    53
williamr@2
    54
Note: a window group is an invisible window which acts as the parent window for 
williamr@2
    55
all other windows in an application. Typically, each application has one window 
williamr@2
    56
group. In the window server, window groups are also the unit of keyboard focus.
williamr@2
    57
williamr@2
    58
@return The application's window group. */inline RWindowGroup& CCoeEnv::RootWin() const
williamr@2
    59
	{ return((RWindowGroup&)iRootWin); }
williamr@2
    60
williamr@2
    61
/** Gets the system graphics context. 
williamr@2
    62
williamr@2
    63
This is the graphics context typically used for drawing controls, but an 
williamr@2
    64
alternative graphics context can be created if required using CreateGcL().
williamr@2
    65
williamr@2
    66
@return The system graphics context. */
williamr@2
    67
inline CWindowGc& CCoeEnv::SystemGc() const
williamr@2
    68
	{ return((CWindowGc&)*iSystemGc); }
williamr@2
    69
williamr@2
    70
/** Gets the normal environment font. 
williamr@2
    71
williamr@2
    72
This is the font created during construction of the control environment.
williamr@2
    73
williamr@2
    74
@return Pointer to the normal environment font.
williamr@2
    75
@see InitSystemFontsL() */
williamr@2
    76
inline const CFont* CCoeEnv::NormalFont() const
williamr@2
    77
	{ return(iNormalFont); }
williamr@2
    78
williamr@2
    79
/** Gets the default screen device owned by this CCoeEnv. 
williamr@2
    80
williamr@2
    81
This is typically used as the standard screen device for the CCoeEnv's application.
williamr@2
    82
williamr@2
    83
@return The default screen device owned by this CCoeEnv. */
williamr@2
    84
inline CWsScreenDevice* CCoeEnv::ScreenDevice() const
williamr@2
    85
	{ return(iScreen); }
williamr@2
    86
williamr@2
    87
/** Gets the current error message text.
williamr@2
    88
williamr@2
    89
@return The current error message text. */
williamr@2
    90
inline TDes& CCoeEnv::ErrorText() 
williamr@2
    91
	{ return *iErrorText; }
williamr@2
    92
williamr@2
    93
/** Gets the current error context text.
williamr@2
    94
williamr@2
    95
@return The current error context text. */
williamr@2
    96
inline TDes& CCoeEnv::ErrorContextText() 
williamr@2
    97
	{ return *iErrorContextText; }
williamr@2
    98
williamr@2
    99
#if defined(_UNICODE)
williamr@2
   100
/** Reads a resource into a descriptor. 
williamr@2
   101
williamr@2
   102
The descriptor must be long enough to contain the entire resource. No memory 
williamr@2
   103
is allocated by this function. If the read fails, the function sets an error 
williamr@2
   104
condition and performs any cleanup required. The error condition causes the 
williamr@2
   105
GUI to launch an alert window.
williamr@2
   106
williamr@2
   107
Deprecated - Use CCoeEnv::ReadResourceL() instead.
williamr@2
   108
williamr@2
   109
@deprecated 
williamr@2
   110
@param aDes On return, contains the resource data.
williamr@2
   111
@param aResourceId The numeric ID of the resource to be read.
williamr@2
   112
@see RResourceFile::ReadL()
williamr@2
   113
@see KErrCoeFailedToReadFromProgDisk */
williamr@2
   114
inline void CCoeEnv::ReadResource(TDes& aDes,TInt aResourceId) const
williamr@2
   115
	{ ReadResourceAsDes16(aDes,aResourceId); }
williamr@2
   116
williamr@2
   117
/** Reads a resource into a descriptor.
williamr@2
   118
williamr@2
   119
The descriptor must be long enough to contain the entire resource. 
williamr@2
   120
No memory is allocated by this function.
williamr@2
   121
williamr@2
   122
@param aDes On return, contains the resource data.
williamr@2
   123
@param aResourceId The numeric ID of the resource to be read.
williamr@2
   124
@return Pointer to a heap descriptor containing the resource. */
williamr@2
   125
inline void CCoeEnv::ReadResourceL(TDes& aDes,TInt aResourceId) const
williamr@2
   126
	{ ReadResourceAsDes16L(aDes,aResourceId); }
williamr@2
   127
williamr@2
   128
/** Reads a resource into a heap descriptor, allocating memory for it. 
williamr@2
   129
williamr@2
   130
Note: the calling program must destroy the heap descriptor when it is no longer 
williamr@2
   131
needed.
williamr@2
   132
williamr@2
   133
@param aResourceId The numeric ID of the resource to be read.
williamr@2
   134
@return Pointer to a heap descriptor containing the resource data.
williamr@2
   135
@see RResourceFile::AllocReadL() */
williamr@2
   136
inline  HBufC* CCoeEnv::AllocReadResourceL(TInt aResourceId) const
williamr@2
   137
	{ return AllocReadResourceAsDes16L(aResourceId); }
williamr@2
   138
williamr@2
   139
/** Reads a specified resource into a heap descriptor, allocating memory for it, 
williamr@2
   140
and pushing the descriptor onto the cleanup stack. 
williamr@2
   141
williamr@2
   142
The calling program should pop and destroy the heap descriptor when it is 
williamr@2
   143
no longer needed.
williamr@2
   144
williamr@2
   145
@param aResourceId The numeric ID of the resource to be read.
williamr@2
   146
@return Pointer to a heap descriptor containing the resource data.
williamr@2
   147
@see RResourceFile::AllocReadLC() */
williamr@2
   148
inline HBufC* CCoeEnv::AllocReadResourceLC(TInt aResourceId) const
williamr@2
   149
	{ return AllocReadResourceAsDes16LC(aResourceId); }
williamr@2
   150
williamr@2
   151
/** Reads a resource into a Unicode descriptor array.
williamr@2
   152
williamr@2
   153
@param aResourceId The numeric ID of the resource to be read.
williamr@2
   154
@return A pointer to the descriptor array containing the resource data.
williamr@2
   155
@see TResourceReader::ReadDesCArrayL() */
williamr@2
   156
inline CDesCArrayFlat* CCoeEnv::ReadDesCArrayResourceL(TInt aResourceId)
williamr@2
   157
	{ return ReadDesC16ArrayResourceL(aResourceId); }
williamr@2
   158
#else  // not UNICODE
williamr@2
   159
williamr@2
   160
/** Deprecated - use CCoeEnv::ReadResourceL() instead.
williamr@2
   161
williamr@2
   162
@deprecated */
williamr@2
   163
inline void CCoeEnv::ReadResource(TDes& aDes,TInt aResourceId) const
williamr@2
   164
	{ ReadResourceAsDes8(aDes,aResourceId); }
williamr@2
   165
williamr@2
   166
inline void CCoeEnv::ReadResourceL(TDes& aDes,TInt aResourceId) const
williamr@2
   167
	{ ReadResourceAsDes8L(aDes,aResourceId); }
williamr@2
   168
inline  HBufC* CCoeEnv::AllocReadResourceL(TInt aResourceId) const
williamr@2
   169
	{ return AllocReadResourceAsDes8L(aResourceId); }
williamr@2
   170
inline HBufC* CCoeEnv::AllocReadResourceLC(TInt aResourceId) const
williamr@2
   171
	{ return AllocReadResourceAsDes8LC(aResourceId); }
williamr@2
   172
inline CDesCArrayFlat* CCoeEnv::ReadDesCArrayResourceL(TInt aResourceId)
williamr@2
   173
	{ return ReadDesC8ArrayResourceL(aResourceId); }
williamr@2
   174
#endif // UNICODE
williamr@2
   175
williamr@2
   176
//
williamr@2
   177
// Tests if the Active Scheduler is started in the CCoeEnv::ExecuteD
williamr@2
   178
//
williamr@2
   179
// @return   "TBool"
williamr@2
   180
//            <code>ETrue</code> if Active Scheduler is started in
williamr@2
   181
//								 CCoeEnv::ExecuteD()	
williamr@2
   182
//            <code>EFalse</code> if Active Scheduler is not started in
williamr@2
   183
//								  CCoeEnv::ExecuteD()	
williamr@2
   184
//            
williamr@2
   185
inline TBool CCoeEnv::IsSchedulerRunning() const
williamr@2
   186
	{return iEnvFlags&ESchedulerIsRunning;}