data/renderingplugin/src/renderer.cpp
author jake
Wed, 27 Oct 2010 12:06:29 +0300
changeset 9 6967ff0a31f5
parent 0 b856a9924bbc
permissions -rw-r--r--
renderer updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
b856a9924bbc initial contribution
jake
parents:
diff changeset
     1
/*
b856a9924bbc initial contribution
jake
parents:
diff changeset
     2
* Copyright (c) {Year(s)} {Copyright owner}.
b856a9924bbc initial contribution
jake
parents:
diff changeset
     3
* All rights reserved.
b856a9924bbc initial contribution
jake
parents:
diff changeset
     4
* This component and the accompanying materials are made available
b856a9924bbc initial contribution
jake
parents:
diff changeset
     5
* under the terms of the "Eclipse Public License v1.0"
b856a9924bbc initial contribution
jake
parents:
diff changeset
     6
* which accompanies this distribution, and is available
b856a9924bbc initial contribution
jake
parents:
diff changeset
     7
* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
b856a9924bbc initial contribution
jake
parents:
diff changeset
     8
*
b856a9924bbc initial contribution
jake
parents:
diff changeset
     9
* Initial Contributors:
b856a9924bbc initial contribution
jake
parents:
diff changeset
    10
* {Name} {Company} ? Initial contribution
b856a9924bbc initial contribution
jake
parents:
diff changeset
    11
*
b856a9924bbc initial contribution
jake
parents:
diff changeset
    12
* Contributors:
b856a9924bbc initial contribution
jake
parents:
diff changeset
    13
* {Name} {Company} ? {{Description of contribution}}
b856a9924bbc initial contribution
jake
parents:
diff changeset
    14
*
b856a9924bbc initial contribution
jake
parents:
diff changeset
    15
* Description:
b856a9924bbc initial contribution
jake
parents:
diff changeset
    16
* {{Description of the file}}
b856a9924bbc initial contribution
jake
parents:
diff changeset
    17
*
b856a9924bbc initial contribution
jake
parents:
diff changeset
    18
*/
b856a9924bbc initial contribution
jake
parents:
diff changeset
    19
b856a9924bbc initial contribution
jake
parents:
diff changeset
    20
#include <ecom/implementationproxy.h>
9
6967ff0a31f5 renderer updated
jake
parents: 0
diff changeset
    21
#include "#replace#renderer.h"
0
b856a9924bbc initial contribution
jake
parents:
diff changeset
    22
b856a9924bbc initial contribution
jake
parents:
diff changeset
    23
// ============================ MEMBER FUNCTIONS ===============================
b856a9924bbc initial contribution
jake
parents:
diff changeset
    24
b856a9924bbc initial contribution
jake
parents:
diff changeset
    25
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
    26
// Symbian static 1st phase constructor
b856a9924bbc initial contribution
jake
parents:
diff changeset
    27
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
    28
//
9
6967ff0a31f5 renderer updated
jake
parents: 0
diff changeset
    29
C#replace#Renderer* C#replace#Renderer::NewL()
0
b856a9924bbc initial contribution
jake
parents:
diff changeset
    30
    {
9
6967ff0a31f5 renderer updated
jake
parents: 0
diff changeset
    31
    C#replace#Renderer* self = C#replace#Renderer::NewLC();
0
b856a9924bbc initial contribution
jake
parents:
diff changeset
    32
    CleanupStack::Pop( self );
b856a9924bbc initial contribution
jake
parents:
diff changeset
    33
    return self;
b856a9924bbc initial contribution
jake
parents:
diff changeset
    34
    }
b856a9924bbc initial contribution
jake
parents:
diff changeset
    35
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
    36
// Symbian static 1st phase constructor
b856a9924bbc initial contribution
jake
parents:
diff changeset
    37
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
    38
//
9
6967ff0a31f5 renderer updated
jake
parents: 0
diff changeset
    39
C#replace#Renderer* C#replace#Renderer::NewLC()
0
b856a9924bbc initial contribution
jake
parents:
diff changeset
    40
    {
9
6967ff0a31f5 renderer updated
jake
parents: 0
diff changeset
    41
    C#replace#Renderer* self = new( ELeave ) C#replace#Renderer();
0
b856a9924bbc initial contribution
jake
parents:
diff changeset
    42
    CleanupStack::PushL( self );
b856a9924bbc initial contribution
jake
parents:
diff changeset
    43
    self->ConstructL();
b856a9924bbc initial contribution
jake
parents:
diff changeset
    44
    return self;
b856a9924bbc initial contribution
jake
parents:
diff changeset
    45
    }
b856a9924bbc initial contribution
jake
parents:
diff changeset
    46
b856a9924bbc initial contribution
jake
parents:
diff changeset
    47
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
    48
// C++ destructor
b856a9924bbc initial contribution
jake
parents:
diff changeset
    49
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
    50
//
9
6967ff0a31f5 renderer updated
jake
parents: 0
diff changeset
    51
C#replace#Renderer::~C#replace#Renderer()
0
b856a9924bbc initial contribution
jake
parents:
diff changeset
    52
    {
b856a9924bbc initial contribution
jake
parents:
diff changeset
    53
    }
b856a9924bbc initial contribution
jake
parents:
diff changeset
    54
b856a9924bbc initial contribution
jake
parents:
diff changeset
    55
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
    56
// Handles key events.
b856a9924bbc initial contribution
jake
parents:
diff changeset
    57
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
    58
//
9
6967ff0a31f5 renderer updated
jake
parents: 0
diff changeset
    59
TKeyResponse C#replace#Renderer::OfferKeyEventL( const TKeyEvent& aKeyEvent,
0
b856a9924bbc initial contribution
jake
parents:
diff changeset
    60
    TEventCode aType )
b856a9924bbc initial contribution
jake
parents:
diff changeset
    61
    {
b856a9924bbc initial contribution
jake
parents:
diff changeset
    62
    }
b856a9924bbc initial contribution
jake
parents:
diff changeset
    63
b856a9924bbc initial contribution
jake
parents:
diff changeset
    64
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
    65
// Set window for this control
b856a9924bbc initial contribution
jake
parents:
diff changeset
    66
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
    67
//
9
6967ff0a31f5 renderer updated
jake
parents: 0
diff changeset
    68
void C#replace#Renderer::SetContainerWindowL( const CCoeControl &aContainer )
0
b856a9924bbc initial contribution
jake
parents:
diff changeset
    69
    {
b856a9924bbc initial contribution
jake
parents:
diff changeset
    70
    CCoeControl::SetContainerWindowL( aContainer );
b856a9924bbc initial contribution
jake
parents:
diff changeset
    71
    }
b856a9924bbc initial contribution
jake
parents:
diff changeset
    72
b856a9924bbc initial contribution
jake
parents:
diff changeset
    73
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
    74
// (other items were commented in a header).
b856a9924bbc initial contribution
jake
parents:
diff changeset
    75
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
    76
//
9
6967ff0a31f5 renderer updated
jake
parents: 0
diff changeset
    77
void C#replace#Renderer::HandlePointerEventL( const TPointerEvent& aPointerEvent )
0
b856a9924bbc initial contribution
jake
parents:
diff changeset
    78
    {
b856a9924bbc initial contribution
jake
parents:
diff changeset
    79
    CCoeControl::HandlePointerEventL( aPointerEvent );
b856a9924bbc initial contribution
jake
parents:
diff changeset
    80
    }
b856a9924bbc initial contribution
jake
parents:
diff changeset
    81
b856a9924bbc initial contribution
jake
parents:
diff changeset
    82
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
    83
// Returns the number of component controls
b856a9924bbc initial contribution
jake
parents:
diff changeset
    84
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
    85
//
9
6967ff0a31f5 renderer updated
jake
parents: 0
diff changeset
    86
TInt C#replace#Renderer::CountComponentControls() const
0
b856a9924bbc initial contribution
jake
parents:
diff changeset
    87
    {
b856a9924bbc initial contribution
jake
parents:
diff changeset
    88
    return 0;
b856a9924bbc initial contribution
jake
parents:
diff changeset
    89
    }
b856a9924bbc initial contribution
jake
parents:
diff changeset
    90
b856a9924bbc initial contribution
jake
parents:
diff changeset
    91
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
    92
// Returns the specified control
b856a9924bbc initial contribution
jake
parents:
diff changeset
    93
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
    94
//
9
6967ff0a31f5 renderer updated
jake
parents: 0
diff changeset
    95
CCoeControl* C#replace#Renderer::ComponentControl( TInt aIndex ) const
0
b856a9924bbc initial contribution
jake
parents:
diff changeset
    96
    {
b856a9924bbc initial contribution
jake
parents:
diff changeset
    97
    return NULL;
b856a9924bbc initial contribution
jake
parents:
diff changeset
    98
    }
b856a9924bbc initial contribution
jake
parents:
diff changeset
    99
b856a9924bbc initial contribution
jake
parents:
diff changeset
   100
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
   101
// Skin change notification.
b856a9924bbc initial contribution
jake
parents:
diff changeset
   102
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
   103
//
9
6967ff0a31f5 renderer updated
jake
parents: 0
diff changeset
   104
void C#replace#Renderer::SkinChanged()
0
b856a9924bbc initial contribution
jake
parents:
diff changeset
   105
    {
b856a9924bbc initial contribution
jake
parents:
diff changeset
   106
    }
b856a9924bbc initial contribution
jake
parents:
diff changeset
   107
b856a9924bbc initial contribution
jake
parents:
diff changeset
   108
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
   109
// EnterPowerSaveModeL
b856a9924bbc initial contribution
jake
parents:
diff changeset
   110
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
   111
//
9
6967ff0a31f5 renderer updated
jake
parents: 0
diff changeset
   112
void C#replace#Renderer::EnterPowerSaveModeL()
0
b856a9924bbc initial contribution
jake
parents:
diff changeset
   113
    {
b856a9924bbc initial contribution
jake
parents:
diff changeset
   114
    }
b856a9924bbc initial contribution
jake
parents:
diff changeset
   115
b856a9924bbc initial contribution
jake
parents:
diff changeset
   116
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
   117
// ExitPowerSaveModeL
b856a9924bbc initial contribution
jake
parents:
diff changeset
   118
//
b856a9924bbc initial contribution
jake
parents:
diff changeset
   119
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
   120
//
9
6967ff0a31f5 renderer updated
jake
parents: 0
diff changeset
   121
void C#replace#Renderer::ExitPowerSaveModeL()
0
b856a9924bbc initial contribution
jake
parents:
diff changeset
   122
    {
b856a9924bbc initial contribution
jake
parents:
diff changeset
   123
    }
b856a9924bbc initial contribution
jake
parents:
diff changeset
   124
b856a9924bbc initial contribution
jake
parents:
diff changeset
   125
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
   126
// Called if focus changes
b856a9924bbc initial contribution
jake
parents:
diff changeset
   127
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
   128
//
9
6967ff0a31f5 renderer updated
jake
parents: 0
diff changeset
   129
void C#replace#Renderer::FocusChanged( TDrawNow /*aDrawNow*/ )
0
b856a9924bbc initial contribution
jake
parents:
diff changeset
   130
    {
b856a9924bbc initial contribution
jake
parents:
diff changeset
   131
    }
b856a9924bbc initial contribution
jake
parents:
diff changeset
   132
b856a9924bbc initial contribution
jake
parents:
diff changeset
   133
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
   134
// Called if position or size changes
b856a9924bbc initial contribution
jake
parents:
diff changeset
   135
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
   136
//
9
6967ff0a31f5 renderer updated
jake
parents: 0
diff changeset
   137
void C#replace#Renderer::SizeChanged()
0
b856a9924bbc initial contribution
jake
parents:
diff changeset
   138
    {
b856a9924bbc initial contribution
jake
parents:
diff changeset
   139
    }
b856a9924bbc initial contribution
jake
parents:
diff changeset
   140
b856a9924bbc initial contribution
jake
parents:
diff changeset
   141
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
   142
// Draws the carousel component
b856a9924bbc initial contribution
jake
parents:
diff changeset
   143
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
   144
//
9
6967ff0a31f5 renderer updated
jake
parents: 0
diff changeset
   145
void C#replace#Renderer::Draw( const TRect& aRect ) const
0
b856a9924bbc initial contribution
jake
parents:
diff changeset
   146
    {
b856a9924bbc initial contribution
jake
parents:
diff changeset
   147
    CWindowGc& gc( SystemGc() );
b856a9924bbc initial contribution
jake
parents:
diff changeset
   148
    gc.DrawEllipse( aRect );
b856a9924bbc initial contribution
jake
parents:
diff changeset
   149
    }
b856a9924bbc initial contribution
jake
parents:
diff changeset
   150
b856a9924bbc initial contribution
jake
parents:
diff changeset
   151
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
   152
// C++ default constructor
b856a9924bbc initial contribution
jake
parents:
diff changeset
   153
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
   154
//
9
6967ff0a31f5 renderer updated
jake
parents: 0
diff changeset
   155
C#replace#Renderer::C#replace#Renderer()
0
b856a9924bbc initial contribution
jake
parents:
diff changeset
   156
    {
b856a9924bbc initial contribution
jake
parents:
diff changeset
   157
    // Do nothing
b856a9924bbc initial contribution
jake
parents:
diff changeset
   158
    }
b856a9924bbc initial contribution
jake
parents:
diff changeset
   159
b856a9924bbc initial contribution
jake
parents:
diff changeset
   160
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
   161
// Symbian 2nd phase constructor can leave.
b856a9924bbc initial contribution
jake
parents:
diff changeset
   162
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
   163
//
9
6967ff0a31f5 renderer updated
jake
parents: 0
diff changeset
   164
void C#replace#Renderer::ConstructL()
0
b856a9924bbc initial contribution
jake
parents:
diff changeset
   165
    {
b856a9924bbc initial contribution
jake
parents:
diff changeset
   166
    }
b856a9924bbc initial contribution
jake
parents:
diff changeset
   167
b856a9924bbc initial contribution
jake
parents:
diff changeset
   168
// ============================ PUBLIC FUNCTIONS ===============================
b856a9924bbc initial contribution
jake
parents:
diff changeset
   169
b856a9924bbc initial contribution
jake
parents:
diff changeset
   170
const TImplementationProxy KImplementationTable[] =
b856a9924bbc initial contribution
jake
parents:
diff changeset
   171
    {
b856a9924bbc initial contribution
jake
parents:
diff changeset
   172
#ifdef __EABI__
9
6967ff0a31f5 renderer updated
jake
parents: 0
diff changeset
   173
    IMPLEMENTATION_PROXY_ENTRY( 0x22334455, C#replace#Renderer::NewL )
0
b856a9924bbc initial contribution
jake
parents:
diff changeset
   174
#else
9
6967ff0a31f5 renderer updated
jake
parents: 0
diff changeset
   175
    { { 0x22334455 }, C#replace#Renderer::NewL }
0
b856a9924bbc initial contribution
jake
parents:
diff changeset
   176
#endif
b856a9924bbc initial contribution
jake
parents:
diff changeset
   177
    };
b856a9924bbc initial contribution
jake
parents:
diff changeset
   178
b856a9924bbc initial contribution
jake
parents:
diff changeset
   179
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
   180
// Returns the list of implementations provided by the plugin
b856a9924bbc initial contribution
jake
parents:
diff changeset
   181
// -----------------------------------------------------------------------------
b856a9924bbc initial contribution
jake
parents:
diff changeset
   182
//
b856a9924bbc initial contribution
jake
parents:
diff changeset
   183
EXPORT_C const TImplementationProxy* ImplementationGroupProxy(
b856a9924bbc initial contribution
jake
parents:
diff changeset
   184
    TInt& aTableCount )
b856a9924bbc initial contribution
jake
parents:
diff changeset
   185
    {
b856a9924bbc initial contribution
jake
parents:
diff changeset
   186
    aTableCount = sizeof( KImplementationTable ) / sizeof( TImplementationProxy );
b856a9924bbc initial contribution
jake
parents:
diff changeset
   187
    return KImplementationTable;
b856a9924bbc initial contribution
jake
parents:
diff changeset
   188
    }
b856a9924bbc initial contribution
jake
parents:
diff changeset
   189