Piano / res / edje /

piano.edc

  1. /*
  2. * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the License);
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16.  
  17. #define PIANO_WHITE_NOTE_PART( NOTE_PART_NAME, PART_INDEX )\
  18. part {\
  19. name: NOTE_PART_NAME;\
  20. type: SWALLOW;\
  21. scale: 1;\
  22. description {\
  23. state: "default" 0.0;\
  24. align: 0.0 0.0;\
  25. visible: 1;\
  26. fixed: 0 1;\
  27. rel1 { relative: 0.0 (0.125*PART_INDEX);}\
  28. rel2 { relative: 1.0 (0.125+(0.125*PART_INDEX));}\
  29. }\
  30. }
  31.  
  32. #define PIANO_BLACK_NOTE_PART( NOTE_PART_NAME, WHITE_NOTE_LEFT_PART_NAME, WHITE_NOTE_RIGHT_PART_NAME )\
  33. part\
  34. {\
  35. name: NOTE_PART_NAME;\
  36. type: SWALLOW;\
  37. description\
  38. {\
  39. state: "default" 0.0;\
  40. align: 0 0;\
  41. visible: 1;\
  42. rel1 { relative: 0.375 0.5; to:WHITE_NOTE_LEFT_PART_NAME; }\
  43. rel2 { relative: 1.0 0.5; to_y:WHITE_NOTE_RIGHT_PART_NAME; }\
  44. }\
  45. }
  46.  
  47. collections
  48. {
  49. group
  50. {
  51. name:"piano.layout";
  52. parts
  53. {
  54. PIANO_WHITE_NOTE_PART( "note_white_1", 0 );
  55. PIANO_WHITE_NOTE_PART( "note_white_2", 1 );
  56. PIANO_WHITE_NOTE_PART( "note_white_3", 2 );
  57. PIANO_WHITE_NOTE_PART( "note_white_4", 3 );
  58. PIANO_WHITE_NOTE_PART( "note_white_5", 4 );
  59. PIANO_WHITE_NOTE_PART( "note_white_6", 5 );
  60. PIANO_WHITE_NOTE_PART( "note_white_7", 6 );
  61. PIANO_WHITE_NOTE_PART( "note_white_8", 7 );
  62. PIANO_WHITE_NOTE_PART( "note_white_9", 8 );
  63.  
  64. PIANO_BLACK_NOTE_PART( "note_black_1", "note_white_1", "note_white_2" );
  65. PIANO_BLACK_NOTE_PART( "note_black_2", "note_white_2", "note_white_3" );
  66. PIANO_BLACK_NOTE_PART( "note_black_3", "note_white_4", "note_white_5" );
  67. PIANO_BLACK_NOTE_PART( "note_black_4", "note_white_5", "note_white_6" );
  68. PIANO_BLACK_NOTE_PART( "note_black_5", "note_white_6", "note_white_7" );
  69. PIANO_BLACK_NOTE_PART( "note_black_6", "note_white_8", "note_white_9" );
  70. }
  71. }
  72. }