Piano / res / edje /
piano.edc
/*
* Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#define PIANO_WHITE_NOTE_PART( NOTE_PART_NAME, PART_INDEX )\
part {\
name: NOTE_PART_NAME;\
type: SWALLOW;\
scale: 1;\
description {\
state: "default" 0.0;\
align: 0.0 0.0;\
visible: 1;\
fixed: 0 1;\
rel1 { relative: 0.0 (0.125*PART_INDEX);}\
rel2 { relative: 1.0 (0.125+(0.125*PART_INDEX));}\
}\
}
#define PIANO_BLACK_NOTE_PART( NOTE_PART_NAME, WHITE_NOTE_LEFT_PART_NAME, WHITE_NOTE_RIGHT_PART_NAME )\
part\
{\
name: NOTE_PART_NAME;\
type: SWALLOW;\
description\
{\
state: "default" 0.0;\
align: 0 0;\
visible: 1;\
rel1 { relative: 0.375 0.5; to:WHITE_NOTE_LEFT_PART_NAME; }\
rel2 { relative: 1.0 0.5; to_y:WHITE_NOTE_RIGHT_PART_NAME; }\
}\
}
collections
{
group
{
name:"piano.layout";
parts
{
PIANO_WHITE_NOTE_PART( "note_white_1", 0 );
PIANO_WHITE_NOTE_PART( "note_white_2", 1 );
PIANO_WHITE_NOTE_PART( "note_white_3", 2 );
PIANO_WHITE_NOTE_PART( "note_white_4", 3 );
PIANO_WHITE_NOTE_PART( "note_white_5", 4 );
PIANO_WHITE_NOTE_PART( "note_white_6", 5 );
PIANO_WHITE_NOTE_PART( "note_white_7", 6 );
PIANO_WHITE_NOTE_PART( "note_white_8", 7 );
PIANO_WHITE_NOTE_PART( "note_white_9", 8 );
PIANO_BLACK_NOTE_PART( "note_black_1", "note_white_1", "note_white_2" );
PIANO_BLACK_NOTE_PART( "note_black_2", "note_white_2", "note_white_3" );
PIANO_BLACK_NOTE_PART( "note_black_3", "note_white_4", "note_white_5" );
PIANO_BLACK_NOTE_PART( "note_black_4", "note_white_5", "note_white_6" );
PIANO_BLACK_NOTE_PART( "note_black_5", "note_white_6", "note_white_7" );
PIANO_BLACK_NOTE_PART( "note_black_6", "note_white_8", "note_white_9" );
}
}
}