gui.h
124 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
/*****************************************************************************
* Copyright Statement:
* --------------------
* This software is protected by Copyright and the information contained
* herein is confidential. The software may not be copied and the information
* contained herein may not be used or disclosed except with the written
* permission of MediaTek Inc. (C) 2005
*
* BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
* THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
* RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
* AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
* NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
* SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
* SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
* THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
* NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
* SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
*
* BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
* LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
* AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
* OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
* MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
*
* THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
* WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
* LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
* RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
* THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
*
*****************************************************************************/
/*****************************************************************************
*
* Filename:
* ---------
* gui.h
*
* Project:
* --------
* MAUI
*
* Description:
* ------------
* Primitive UI variables & wrappers
*
* Author:
* -------
* -------
* -------
* -------
*
*==============================================================================
* HISTORY
* Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
*------------------------------------------------------------------------------
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
*------------------------------------------------------------------------------
* Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
*==============================================================================
*******************************************************************************/
/**
* Copyright Notice
* ?2002 - 2003, Pixtel Communications, Inc., 1489 43rd Ave. W.,
* Vancouver, B.C. V6M 4K8 Canada. All Rights Reserved.
* (It is illegal to remove this copyright notice from this software or any
* portion of it)
*/
/**********************************************************************************
Filename: gui.h
Author: manju
Date Created: August-13-2002
Contains: PixTel UI routines header
Contains several parts and has been split to multiple
code files. See other files named gui_*.c and gui_*.h
This file contains common functions and data (prototypes only).
**********************************************************************************/
#ifndef __GUI_H__
#define __GUI_H__
#include "stdC.h"
#include "mmi_platform.h"
#include "CustDataRes.h"
#include "gui_config.h"
#include "CustThemesRes.h"
#include "MMI_features.h"
#include "gui_resource_type.h"
#include "gdi_datatype.h"
#ifdef __cplusplus
extern "C"
{
#endif /* __cplusplus */
/* <group dom_utility_variables>
* global device screen size */
extern S32 UI_device_width;
/* <group dom_utility_variables> */
extern S32 UI_device_height;
/* <group dom_utility_variables>
* UI globals */
#if 0
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
#endif//0
/* <group dom_utility_variables> */
extern S32 UI_text_x;
/* <group dom_utility_variables> */
extern S32 UI_text_y;
/* <group dom_utility_variables> */
extern S32 UI_text_height;
/* <group dom_utility_variables> */
//extern S32 UI_pointer_x;
/* <group dom_utility_variables> */
//extern S32 UI_pointer_y;
/* <group dom_utility_variables> */
extern U8 UI_printf_buffer[];
/* <group dom_utility_macro>
* MACRO: calculates the percentage */
#define pixtel_percent(x,p) ((x)*(p)/(100))
/* <group dom_utility_macro>
* MACRO: toggles a value */
#define pixtel_toggle(x) x=(U8)((x)?0:1)
/* <group dom_utility_macro>
* MACRO: divides, adds 1 if there is a remainder */
#define pixtel_highdivide(x,y) ((((x)%(y))>0)?(((x)/(y))+1):((x)/(y)))
/* Base functions required by the UI system: */
/* All UI components will use these functions */
/* And will not directly use any other OS/system */
/* related functions. */
#define MMI_status_bar_height MMI_STATUS_BAR_HEIGHT
#define UI_set_current_text_color UI_set_text_color
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_putpixel
* DESCRIPTION
* Draw color at a point
* PARAMETERS
* x : [IN] The x coordinate of point
* y : [IN] The y coordinate of point
* c : [IN] The color of point
* RETURNS
* void
*****************************************************************************/
extern void UI_putpixel(S32 x, S32 y, color c);
//extern void (*gui_putpixel) (S32 x, S32 y, color c);
#define gui_putpixel UI_putpixel
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_draw_vertical_line
* DESCRIPTION
* Draw a vertical line by color
* PARAMETERS
* x : [IN] The x coordinate of vertical line
* y1 : [IN] The top y coordinate of vertical line
* y2 : [IN] The bottom y coordinate of vertical line
* c : [IN] The color of vertical line
* RETURNS
* void
*****************************************************************************/
extern void UI_draw_vertical_line(
S32 y1,
S32 y2,
S32 x,
color c);
//extern void (*gui_draw_vertical_line) (S32 y1, S32 y2, S32 x, color c);
#define gui_draw_vertical_line UI_draw_vertical_line
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_draw_horizontal_line
* DESCRIPTION
* Use color to draw a horizontal line
* PARAMETERS
* x1 : [IN] The left cooridnate of horizontal line
* x2 : [IN] The right cooridnate of horizotnal line
* y : [IN] The y coordinate of horizontal line
* c : [IN] The color of horizontal line
* RETURNS
* void
*****************************************************************************/
extern void UI_draw_horizontal_line(
S32 x1,
S32 x2,
S32 y,
color c);
//extern void (*gui_draw_horizontal_line) (S32 x1, S32 x2, S32 y, color c);
#define gui_draw_horizontal_line UI_draw_horizontal_line
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_line
* DESCRIPTION
* Draw a line from one point to other point
* PARAMETERS
* x1 : [IN] The x coordinate of point1
* y1 : [IN] The y coordinate of point1
* x2 : [IN] The x coordinate of point2
* y2 : [IN] The y coordinate of point2
* c : [IN] The color of line
* RETURNS
* void
*****************************************************************************/
extern void UI_line(
S32 x1,
S32 y1,
S32 x2,
S32 y2,
color c);
//extern void (*gui_line) (S32 x1, S32 y1, S32 x2, S32 y2, color c);
#define gui_line UI_line
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_wline
* DESCRIPTION
* Draw a wider line
* PARAMETERS
* x1 : [IN] The x cooridnate of point1
* y1 : [IN] The y cooridnate of point1
* x2 : [IN] The x cooridnate of point2
* y2 : [IN] The y cooridnate of point2
* c : [IN] The color of line
* width : [IN] The width of line
* RETURNS
* void
*****************************************************************************/
extern void UI_wline(
S32 x1,
S32 y1,
S32 x2,
S32 y2,
color c,
S32 w);
//extern void (*gui_wline) (S32 x1, S32 y1, S32 x2, S32 y2, color c, S32 w);
#define gui_wline UI_wline
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_draw_rectangle
* DESCRIPTION
* Use color draw a rectangle
* PARAMETERS
* x1 : [IN] The x coordinate of left-top corner
* y1 : [IN] The y coordinate of left-top corner
* x2 : [IN] The x coordinate of right-bottom corner
* y2 : [IN] The y cooridnate of right-bottom corner
* c : [IN] The color of rectangle
* RETURNS
* void
*****************************************************************************/
extern void UI_draw_rectangle(
S32 x1,
S32 y1,
S32 x2,
S32 y2,
color c);
//extern void (*gui_draw_rectangle) (S32 x1, S32 y1, S32 x2, S32 y2, color c);
#define gui_draw_rectangle UI_draw_rectangle
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_fill_rectangle
* DESCRIPTION
* Use color fill a rectangle
* PARAMETERS
* x1 : [IN] The x coordinate of left-top corner
* y1 : [IN] The y coordinate of left-top corner
* x2 : [IN] The x coordinate of right-bottom corner
* y2 : [IN] The y coordinate of right-bottom corner
* c : [IN] The color of rectangle
* RETURNS
* void
*****************************************************************************/
extern void UI_fill_rectangle(
S32 x1,
S32 y1,
S32 x2,
S32 y2,
color c);
//extern void (*gui_fill_rectangle) (S32 x1, S32 y1, S32 x2, S32 y2, color c);
#define gui_fill_rectangle UI_fill_rectangle
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_cross_hatch_fill_rectangle
* DESCRIPTION
* Use color fill rectangle with cross hatch
* PARAMETERS
* x1 : [IN] The x coordinate of left-top corner
* y1 : [IN] The y coordinate of left-top corner
* x2 : [IN] The x coordinate of right-bottom corner
* y2 : [IN] The y coordinate of right-bottom corner
* c : [IN] The color of rectangle
* RETURNS
* void
*****************************************************************************/
//extern void (*gui_cross_hatch_fill_rectangle) (S32 x1, S32 y1, S32 x2, S32 y2, color c);
extern void UI_cross_hatch_fill_rectangle(
S32 x1,
S32 y1,
S32 x2,
S32 y2,
color c);
#define gui_cross_hatch_fill_rectangle UI_cross_hatch_fill_rectangle
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_hatch_fill_rectangle
* DESCRIPTION
* Use color fill rectangle with hatch
* PARAMETERS
* x1 : [IN] The x coordinate of left-top corner
* y1 : [IN] The y coordinate of left-top corner
* x2 : [IN] The x coordinate of right-bottom corner
* y2 : [IN] The y coordinate of right-bottom corner
* c : [IN] The color of rectangle
* RETURNS
* void
*****************************************************************************/
extern void UI_hatch_fill_rectangle(
S32 x1,
S32 y1,
S32 x2,
S32 y2,
color c);
//extern void (*gui_hatch_fill_rectangle) (S32 x1, S32 y1, S32 x2, S32 y2, color c);
#define gui_hatch_fill_rectangle UI_hatch_fill_rectangle
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_alternate_cross_hatch_fill_rectangle
* DESCRIPTION
* Use color fill a rectangle with alternate cross hatch
* PARAMETERS
* x1 : [IN] The x coordinate of left-top corner
* y1 : [IN] The y coordinate of left-top corner
* x2 : [IN] The x coordinate of right-bottom corner
* y2 : [IN] The y coordinate of right-bottom corner
* c1 : [IN] The color of rectangle
* c2 : [IN] The color of alternate cross hatch
* RETURNS
* void
*****************************************************************************/
extern void UI_alternate_cross_hatch_fill_rectangle(
S32 x1,
S32 y1,
S32 x2,
S32 y2,
color c1,
color c2);
//extern void (*gui_alternate_cross_hatch_fill_rectangle) (S32 x1, S32 y1, S32 x2, S32 y2, color c1, color c2);
#define gui_alternate_cross_hatch_fill_rectangle UI_alternate_cross_hatch_fill_rectangle
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_alternate_hatch_fill_rectangle
* DESCRIPTION
* Use color fill a rectangle with alternate hatch
* PARAMETERS
* x1 : [IN] The x coordinate of left-top corner
* y1 : [IN] The y coordinate of left-top corner
* x2 : [IN] The x coordinate of right-bottom corner
* y2 : [IN] The y coordinate of right-bottom corner
* c1 : [IN] The color of rectangle
* c2 : [IN] The color of alternate hatch
* RETURNS
* void
*****************************************************************************/
extern void UI_alternate_hatch_fill_rectangle(
S32 x1,
S32 y1,
S32 x2,
S32 y2,
color c1,
color c2);
//extern void (*gui_alternate_hatch_fill_rectangle) (S32 x1, S32 y1, S32 x2, S32 y2, color c1, color c2);
#define gui_alternate_hatch_fill_rectangle UI_alternate_hatch_fill_rectangle
/*****************************************************************************
* <group dom_utility_gui_layer_property_setting>
* FUNCTION
* gui_set_text_clip
* DESCRIPTION
* Set the clip of layer, the effect same as gdi_layer_set_clip
* PARAMETERS
* x1 : [IN] The x1 of clip area
* y1 : [IN] The y1 of clip area
* x2 : [IN] The x2 of clip area
* y2 : [IN] The y2 of clip area
* RETURNS
* void
*****************************************************************************/
//extern void (*gui_set_text_clip) (S32 x1, S32 y1, S32 x2, S32 y2);
#define gui_set_text_clip gdi_layer_set_clip
/*****************************************************************************
* <group dom_utility_gui_layer_property_setting>
* FUNCTION
* gui_get_text_clip
* DESCRIPTION
* Get the layer of clip
* PARAMETERS
* x1 : [OUT] The pointer to store the x1 of clip area
* y1 : [OUT] The pointer to store the y1 of clip area
* x2 : [OUT] The pointer to store the x2 of clip area
* y2 : [OUT] The pointer to store the y2 of clip area
* RETURNS
* void
*****************************************************************************/
//extern void (*gui_get_text_clip) (S32 *x1, S32 *y1, S32 *x2, S32 *y2);
#define gui_get_text_clip gdi_layer_get_clip
/*****************************************************************************
* <group dom_utility_gui_layer_property_setting>
* FUNCTION
* gui_set_text_clip_preset
* DESCRIPTION
* Set the clip interset with preset clip
* PARAMETERS
* x1 : [IN] The x1 of clip area
* y1 : [IN] The y1 of clip area
* x2 : [IN] The x2 of clip area
* y2 : [IN] The y2 of clip area
* RETURNS
* void
*****************************************************************************/
//extern void (*gui_set_text_clip_preset) (S32 x1, S32 y1, S32 x2, S32 y2);
extern void UI_set_clip_preset(
S32 x1,
S32 y1,
S32 x2,
S32 y2);
#define gui_set_text_clip_preset UI_set_clip_preset
/*****************************************************************************
* <group dom_utility_gui_layer_property_setting>
* FUNCTION
* gui_set_clip
* DESCRIPTION
* Set the clip of active layer
* PARAMETERS
* x1 : [IN] The x1 of clip area
* y1 : [IN] The y1 of clip area
* x2 : [IN] The x2 of clip area
* y2 : [IN] The y2 of clip area
* RETURNS
* void
*****************************************************************************/
//extern void (*gui_set_clip) (S32 x1, S32 y1, S32 x2, S32 y2);
#define gui_set_clip gdi_layer_set_clip
#define UI_set_clip gdi_layer_set_clip
/*****************************************************************************
* <group dom_utility_gui_layer_property_setting>
* FUNCTION
* gui_set_clip_with_bounding_box
* DESCRIPTION
* Set the clip interset with given bound box
* PARAMETERS
* x1 : [IN] The x1 of clip area
* y1 : [IN] The y1 of clip area
* x2 : [IN] The x2 of clip area
* y2 : [IN] The y2 of clip area
* bx1 : [IN] The x1 of bound box
* by1 : [IN] The y1 of bound box
* bx2 : [IN] The x2 of bound box
* by2 : [IN] The y2 of bound box
* RETURNS
* void
*****************************************************************************/
extern void UI_set_clip_with_bounding_box(
S32 x1,
S32 y1,
S32 x2,
S32 y2,
S32 bx1,
S32 by1,
S32 bx2,
S32 by2);
//extern void (*gui_set_clip_with_bounding_box) (S32 x1, S32 y1, S32 x2, S32 y2, S32 bx1, S32 by1, S32 bx2, S32 by2);
#define gui_set_clip_with_bounding_box UI_set_clip_with_bounding_box
/*****************************************************************************
* <group dom_utility_gui_layer_property_setting>
* FUNCTION
* gui_get_clip
* DESCRIPTION
* Get the active layer's clip
* PARAMETERS
* x1 : [IN] The pointer to store the x1 of clip area
* y1 : [IN] The pointer to store the y1 of clip area
* x2 : [IN] The pointer to store the x2 of clip area
* y2 : [IN] The pointer to store the y2 of clip area
* RETURNS
* void
*****************************************************************************/
//extern void (*gui_get_clip) (S32 *x1, S32 *y1, S32 *x2, S32 *y2);
#define gui_get_clip gdi_layer_get_clip
/*****************************************************************************
* <group dom_utility_gui_layer_property_setting>
* FUNCTION
* gui_set_clip_preset
* DESCRIPTION
* Set the clip interset with preset clip
* PARAMETERS
* x1 : [IN] The x1 of clip area
* y1 : [IN] The y1 of clip area
* x2 : [IN] The x2 of clip area
* y2 : [IN] The y2 of clip area
* RETURNS
* void
*****************************************************************************/
//extern void UI_set_clip_preset(S32 x1, S32 y1, S32 x2, S32 y2);
#define gui_set_clip_preset UI_set_clip_preset
//extern void (*gui_set_clip_preset) (S32 x1, S32 y1, S32 x2, S32 y2);
/*****************************************************************************
* <group dom_utility_gui_layer_property_setting>
* FUNCTION
* gui_reset_clip
* DESCRIPTION
* Reset the active layer's clip.
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
//extern void (*gui_reset_clip) (void);
#define gui_reset_clip gdi_layer_reset_clip
/*****************************************************************************
* <group dom_utility_gui_layer_property_setting>
* FUNCTION
* gui_push_text_clip
* DESCRIPTION
* Push the active layer's clip into stack
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
//extern void (*gui_push_text_clip) (void);
#define gui_push_text_clip gdi_layer_push_clip
/*****************************************************************************
* <group dom_utility_gui_layer_property_setting>
* FUNCTION
* gui_pop_text_clip
* DESCRIPTION
* Pop active layer's clip for stack
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
//extern void (*gui_pop_text_clip) (void);
#define gui_pop_text_clip gdi_layer_pop_clip
/*****************************************************************************
* <group dom_utility_gui_layer_property_setting>
* FUNCTION
* gui_push_clip
* DESCRIPTION
* Push the active layer's clip into stack
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
//extern void (*gui_push_clip) (void);
#define gui_push_clip gdi_layer_push_clip
/*----------------------------------------------------------------------------
Function Pointer: gui_push_and_set_clip
Description: Saves the graphics clipping boundary and set clip of active layer
Input Parameters: none
Output Parameters: none
Returns: void
Remarks: Currently not a stack type implementation
----------------------------------------------------------------------------*/
//extern void (*gui_push_and_set_clip) (S32 x1, S32 y1, S32 x2, S32 y2);
#define gui_push_and_set_clip gdi_layer_push_and_set_clip
/*****************************************************************************
* <group dom_utility_gui_layer_property_setting>
* FUNCTION
* gui_pop_clip
* DESCRIPTION
* Pop the active layer's clip from stack
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
//extern void (*gui_pop_clip) (void);
#define gui_pop_clip gdi_layer_pop_clip
/*****************************************************************************
* <group dom_utility_gui_layer_property_setting>
* FUNCTION
* gui_reset_text_clip
* DESCRIPTION
* Reset active layer's clip
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
//extern void (*gui_reset_text_clip) (void);
#define gui_reset_text_clip gdi_layer_reset_clip
#define UI_reset_text_clip gdi_layer_reset_clip
/*****************************************************************************
* <group dom_utility_gui_layer_property_setting>
* FUNCTION
* gui_set_line_height
* DESCRIPTION
* Set the text's line height
* PARAMETERS
* height : [IN] The new line height of text
* RETURNS
* void
*****************************************************************************/
extern void UI_set_line_height(S32 height);
//extern void (*gui_set_line_height) (S32 height);
#define gui_set_line_height UI_set_line_height
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_move_text_cursor
* DESCRIPTION
* Move the text cursor
* PARAMETERS
* x : [IN] The new x coordinate of text cursor
* y : [IN] The new y coordinate of text cursor
* RETURNS
* void
*****************************************************************************/
extern void UI_move_text_cursor(S32 x, S32 y);
//extern void (*gui_move_text_cursor) (S32 x, S32 y);
#define gui_move_text_cursor UI_move_text_cursor
/*****************************************************************************
* <group dom_utility_gui_layer_property_setting>
* FUNCTION
* gui_set_text_color
* DESCRIPTION
* Set the color of text
* PARAMETERS
* c : [IN] The color of text
* RETURNS
* void
*****************************************************************************/
extern void UI_set_text_color(color c);
//extern void (*gui_set_text_color) (color c);
#define gui_set_text_color UI_set_text_color
/*****************************************************************************
* <group dom_utility_gui_layer_property_setting>
* FUNCTION
* gui_set_text_border_color
* DESCRIPTION
* Set the border color of text
* PARAMETERS
* c : [IN] The color of text's border
* RETURNS
* void
*****************************************************************************/
extern void UI_set_text_border_color(color c);
//extern void (*gui_set_text_border_color) (color c);
#define gui_set_text_border_color UI_set_text_border_color
/*****************************************************************************
* <group dom_utility_gui_layer_property_setting>
* FUNCTION
* gui_get_text_color
* DESCRIPTION
* Get the text's color
* PARAMETERS
* void
* RETURNS
* The color of text
*****************************************************************************/
extern color UI_get_text_color(void);
//extern color (*gui_get_text_color) (void);
#define gui_get_text_color UI_get_text_color
/*****************************************************************************
* <group dom_utility_gui_layer_property_setting>
* FUNCTION
* gui_get_text_border_color
* DESCRIPTION
* Get the border color of text
* PARAMETERS
* void
* RETURNS
* The color of text's border
*****************************************************************************/
extern color UI_get_text_border_color(void);
//extern color (*gui_get_text_border_color) (void);
#define gui_get_text_border_color UI_get_text_border_color
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_printf
* DESCRIPTION
* Output some string in format, this function is same as c-function printf
* PARAMETERS
* format : [IN] The format of string
* RETURNS
* void
*****************************************************************************/
extern S32 UI_printf(const S8 *format, ...);
//extern S32 (*gui_printf) (const S8 *format, ...);
#define gui_printf UI_printf
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_sprintf
* DESCRIPTION
* Output some string in format into a given buffer
* PARAMETERS
* _text : [OUT] The buffer to store the result
* format : [IN] The format of string
* RETURNS
* void
*****************************************************************************/
extern S32 UI_sprintf(UI_string_type s, const S8 *format, ...);
//extern S32(*gui_sprintf) (UI_string_type _text, const S8 *format, ...);
#define gui_sprintf UI_sprintf
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_print_text
* DESCRIPTION
* Print some string into LCD
* PARAMETERS
* _text : [IN] The text want to be print out
* RETURNS
* void
*****************************************************************************/
extern void UI_print_text(UI_string_type text);
//extern void (*gui_print_text) (UI_string_type _text);
#define gui_print_text UI_print_text
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_print_text_n
* DESCRIPTION
* Print some string into LCD with above limition
* PARAMETERS
* _text : [IN] The text want to be print out
* n : [IN] The max count of char that will be print out
* RETURNS
* void
*****************************************************************************/
extern void UI_print_text_n(UI_string_type text, int n);
//extern void (*gui_print_text_n) (UI_string_type _text, int _n);
#define gui_print_text_n UI_print_text_n
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_print_bordered_text_n
* DESCRIPTION
* Print some string with border into LCD with above limition
* PARAMETERS
* _text : [IN] The text want to be print out
* n : [IN] The max count of char that will be print out
* RETURNS
* void
*****************************************************************************/
extern void UI_print_text_n(UI_string_type text, int n);
//extern void (*gui_print_bordered_text_n) (UI_string_type _text, int _n);
#define gui_print_bordered_text_n UI_print_text_n
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_print_bordered_text
* DESCRIPTION
* Print some string with border into LCD
* PARAMETERS
* _text : [IN] The text want to be print out
* RETURNS
* void
*****************************************************************************/
extern void UI_print_bordered_text(UI_string_type text);
//extern void (*gui_print_bordered_text) (UI_string_type _text);
#define gui_print_bordered_text UI_print_bordered_text
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_print_character
* DESCRIPTION
* Print out a character into LCD
* PARAMETERS
* c : [IN] The char that will be print out
* RETURNS
* void
*****************************************************************************/
extern void UI_print_character(UI_character_type c);
//extern void (*gui_print_character) (UI_character_type _c);
#define gui_print_character UI_print_character
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_print_character_at_xy
* DESCRIPTION
* Print out a character at a given point
* PARAMETERS
* c : [IN] The char that will be print out
* x : [IN] The x coordinate of point
* y : [IN] The y coordinate of point
* RETURNS
* void
*****************************************************************************/
//extern void (*gui_print_character_at_xy) (UI_character_type c, S32 x, S32 y);
#define gui_print_character_at_xy mmi_fe_show_char_at_xy
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_print_bordered_character
* DESCRIPTION
* Print out a character with border
* PARAMETERS
* c : [IN] The char that will be print out
* RETURNS
* void
*****************************************************************************/
extern void UI_print_bordered_character(UI_character_type c);
//extern void (*gui_print_bordered_character) (UI_character_type _c);
#define gui_print_bordered_character UI_print_bordered_character
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_print_truncated_text2
* DESCRIPTION
* Displays truncated text (Does not display ...)
* PARAMETERS
* x : [IN] Top left corner of text display
* y : [IN] Top left corner of text display
* xwidth : [IN] Width (in pixels) available for text display
* s : [IN] Text to be displayed
* RETURNS
* Non-zero if the complete string was displayed
* zero if the complete string could not be displayed
*****************************************************************************/
extern U8 gui_print_truncated_text2(
S32 x,
S32 y,
S32 xwidth,
UI_string_type *s);
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_print_truncated_bordered_text2
* DESCRIPTION
* Displays truncated bordered text (Does not display ...)
* PARAMETERS
* x : [IN] Top left corner of text display
* y : [IN] Top left corner of text display
* xwidth : [IN] Width (in pixels) available for text display
* s : [IN] Text to be displayed
* RETURNS
* Non-zero if the complete string was displayed
* zero if the complete string could not be displayed
*****************************************************************************/
extern U8 gui_print_truncated_bordered_text2(
S32 x,
S32 y,
S32 xwidth,
UI_string_type *s);
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_malloc
* DESCRIPTION
* Malloc a give size memory
* PARAMETERS
* size : [IN] The size of memory want to get
* RETURNS
* void
*****************************************************************************/
//extern void *(*gui_malloc) (size_t size);
#define gui_malloc OslMalloc
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_free
* DESCRIPTION
* Free the memory
* PARAMETERS
* ptr : [IN] The pointer of memory
* RETURNS
* void
*****************************************************************************/
extern void UI_free(void *ptr);
//extern void (*gui_free) (void *ptr);
#define gui_free UI_free
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_get_character_width
* DESCRIPTION
* Get a character's width
* PARAMETERS
* c : [IN] The char that will be measure
* RETURNS
* The width of character
*****************************************************************************/
extern S32 UI_get_character_width(UI_character_type c);
//extern S32(*gui_get_character_width) (UI_character_type c);
#define gui_get_character_width UI_get_character_width
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_measure_character
* DESCRIPTION
* Get a character's width and height
* PARAMETERS
* c : [IN] The char that will be measure
* width : [OUT] The pointer to store the width of char
* height : [OUT] The pointer to store the height of char
* RETURNS
* void
*****************************************************************************/
//extern void (*gui_measure_character) (UI_character_type c, S32 *width, S32 *height);
#define gui_measure_character Get_CharWidthHeight
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_get_character_height
* DESCRIPTION
* Get the char of height
* PARAMETERS
* void
* RETURNS
* The height of char
*****************************************************************************/
//extern S32 (*gui_get_character_height) (void);
#define gui_get_character_height Get_CharHeight
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
*
* DESCRIPTION
*
* PARAMETERS
* text : [IN]
* RETURNS
* void
*****************************************************************************/
extern S32 UI_get_string_width(UI_string_type text);
//extern S32(*gui_get_string_width) (UI_string_type text);
#define gui_get_string_width UI_get_string_width
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_get_string_width_n
* DESCRIPTION
* Get the string's width
* PARAMETERS
* text : [IN] The text that will be measure
* n : [IN] The number of text
* RETURNS
* void
*****************************************************************************/
extern S32 UI_get_string_width_n(UI_string_type text, S32 n);
//extern S32 (*gui_get_string_width_n) (UI_string_type text, S32 n);
#define gui_get_string_width_n UI_get_string_width_n
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_get_string_width_w
* DESCRIPTION
* Get the string's width with give gap
* PARAMETERS
* text : [IN] The text that will be measure
* w : [IN] The gap between char
* RETURNS
* void
*****************************************************************************/
extern S32 UI_get_string_width_w(UI_string_type text, S32 w);
//extern S32 (*gui_get_string_width_w) (UI_string_type text, S32 w);
#define gui_get_string_width_w UI_get_string_width_w
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_get_string_width_wn
* DESCRIPTION
* Get the string's width with give gap and number
* PARAMETERS
* text : [IN] The text that will be measure
* w : [IN] The gap between char
* n : [IN] The number of string
* RETURNS
* void
*****************************************************************************/
extern S32 UI_get_string_width_wn(
UI_string_type text,
S32 w,
S32 n);
//extern S32 (*gui_get_string_width_wn) (UI_string_type text, S32 w, S32 n);
#define gui_get_string_width_wn UI_get_string_width_wn
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_get_string_height
* DESCRIPTION
* Get the string's height
* PARAMETERS
* text : [IN] The text that will be measure
* RETURNS
* The height of text
*****************************************************************************/
//extern S32 (*gui_get_string_height) (UI_string_type text);
#define gui_get_string_height(_arg) Get_CharHeight()
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_measure_string
* DESCRIPTION
* Get the string's width and height
* PARAMETERS
* text : [IN] The text that will be measure
* width : [OUT] The pointer to store the width of string
* height : [OUT] The pointer to store the height of string
* RETURNS
* void
*****************************************************************************/
extern void UI_measure_string(
UI_string_type text,
S32 *width,
S32 *height);
//extern void (*gui_measure_string) (UI_string_type text, S32 *width, S32 *height);
#define gui_measure_string UI_measure_string
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_measure_string_n
* DESCRIPTION
* Get the string's width and height with given the number of char
* PARAMETERS
* text : [IN] The text that will be measure
* n : [IN] The number of char
* width : [OUT] The pointer to store the width of string
* height : [OUT] The pointer to store the height of string
* RETURNS
* void
*****************************************************************************/
extern void UI_measure_string_n(
UI_string_type text,
S32 n,
S32 *width,
S32 *height);
//extern void (*gui_measure_string_n) (UI_string_type text, S32 n, S32 *width, S32 *height);
#define gui_measure_string_n UI_measure_string_n
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_measure_string_w
* DESCRIPTION
* Get the string's width and height with given gap between chars
* PARAMETERS
* text : [IN] The text that will be measure
* w : [IN] The gap between char
* width : [OUT] The pointer to store the width of string
* height : [OUT] The pointer to store the height of string
* RETURNS
* void
*****************************************************************************/
extern void UI_measure_string_w(
UI_string_type text,
S32 w,
S32 *width,
S32 *height);
//extern void (*gui_measure_string_w) (UI_string_type text, S32 w, S32 *width, S32 *height);
#define gui_measure_string_w UI_measure_string_w
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_measure_string_wn
* DESCRIPTION
* Get the string's width and height with given gap and char count
* PARAMETERS
* text : [IN] The text that will be measure
* w : [IN] The gap between char
* n : [IN] The count of char
* width : [IN] The pointer to store the width of string
* height : [IN] The pointer to store the height of string
* RETURNS
* void
*****************************************************************************/
extern void UI_measure_string_wn(
UI_string_type text,
S32 w,
S32 n,
S32 *width,
S32 *height);
//extern void (*gui_measure_string_wn) (UI_string_type text, S32 w, S32 n, S32 *width, S32 *height);
#define gui_measure_string_wn UI_measure_string_wn
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_set_font
* DESCRIPTION
* Set the string's font
* PARAMETERS
* f : [IN] The font of string to be set
* RETURNS
* void
*****************************************************************************/
extern void UI_set_font(UI_font_type f);
//extern void (*gui_set_font) (UI_font_type f);
#define gui_set_font UI_set_font
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_show_image
* DESCRIPTION
* Show a image at a special position
* PARAMETERS
* x : [IN] The x coordinate of position
* y : [IN] The y coordinate of position
* i : [IN] The pointer of image will be shown
* RETURNS
* void
*****************************************************************************/
extern void (*gui_show_image) (S32 x, S32 y, PU8 i);
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_show_transparent_image
* DESCRIPTION
* Show a image at a special position, it same as gui_show_image
* PARAMETERS
* x : [IN] The x cooridnate of position
* y : [IN] The y coordinate of position
* i : [IN] The pointer of image will be shown
* t : [IN] The transparent color
* RETURNS
* void
*****************************************************************************/
extern void (*gui_show_transparent_image) (S32 x, S32 y, PU8 i, UI_transparent_color_type t);
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_measure_image
* DESCRIPTION
* Get the image's width and height
* PARAMETERS
* i : [IN] The pointer of image that will be measure
* width : [IN] The pointer to store the image's width
* height : [IN] The pointer to store the image's height
* RETURNS
* void
*****************************************************************************/
extern void _measure_image(
U8 *image,
S32 *width,
S32 *height);
//extern void (*gui_measure_image) (PU8 i, S32 *width, S32 *height);
#define gui_measure_image _measure_image
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_image_n_frames
* DESCRIPTION
* Get the image's frame number
* PARAMETERS
* i : [IN] The pointer of image that will be measure
* RETURNS
* The image's frame count
*****************************************************************************/
extern S32 UI_get_image_n_frames(U8 *image);
//extern S32 (*gui_image_n_frames) (PU8 i);
#define gui_image_n_frames UI_get_image_n_frames
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_start_timer
* DESCRIPTION
* Start a UI timer with give cycle time and callback
* PARAMETERS
* count : [IN] The cycle time of timer, the unit is ms
* callback : [IN] The callback will be invoke when the time out
* RETURNS
* void
*****************************************************************************/
extern void UI_start_timer(S32 count, FuncPtr callback);
//extern void (*gui_start_timer) (S32 count, void (*callback) (void));
#define gui_start_timer UI_start_timer
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_start_timer_ex
* DESCRIPTION
* Start a UI timer with give cycle time and callback, the callback with parameter
* PARAMETERS
* count : [IN] The cycle time of timer, the unit is ms
* callback : [IN] The callback will be invoke when the time out
* arg : [IN] The parameter of callback
* RETURNS
* void
*****************************************************************************/
typedef void (*gui_timer_funcptr_type)(void *);
extern void UI_start_timer_ex(
S32 count,
gui_timer_funcptr_type callback,
void *arg);
//extern void (*gui_start_timer_ex) (S32 count, void (*callback)(void *arg), void *arg);
#define gui_start_timer_ex UI_start_timer_ex
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_cancel_timer
* DESCRIPTION
* Cancel a UI timer
* PARAMETERS
* callback : [IN] The callback of timer
* RETURNS
* void
*****************************************************************************/
extern void UI_cancel_timer(void (*callback) (void));
//extern void (*gui_cancel_timer) (void (*callback) (void));
#define gui_cancel_timer UI_cancel_timer
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_hide_animated_image
* DESCRIPTION
* Hide a animated image
* PARAMETERS
* x : [IN] The x coordinate of image
* y : [IN] The y coordinate of image
* i : [IN] The handler of animated image
* RETURNS
* void
*****************************************************************************/
//extern void (*gui_hide_animated_image) (
// S32 x,
// S32 y,
// UI_animated_image_handle i);
/*****************************************************************************
* <group dom_utility_gui_layer_property_setting>
* FUNCTION
* gui_register_hide_animation_frame
* DESCRIPTION
* Register a callback to hide animation frame
* PARAMETERS
* i : [IN] The handler of animation image
* f : [IN] The callback of hide animation frame
* RETURNS
* void
*****************************************************************************/
//extern void (*gui_register_hide_animation_frame) (
// UI_animated_image_handle i,
// void (*f) (S32 x1, S32 y1, S32 x2, S32 y2));
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_show_transparent_animated_image_frame
* DESCRIPTION
* Show a animated image
* PARAMETERS
* x : [IN] The x coordinate of image will be shown
* y : [IN] The y coordinate of image will be shown
* i : [IN] The pointer of image that will be shown
* t : [IN] The color of transparent
* frame_number : [IN] The index of frame that will be shown
* RETURNS
* void
*****************************************************************************/
//extern U8(*gui_show_transparent_animated_image_frame) (S32 x, S32 y, PU8 i, UI_transparent_color_type t,
// S16 frame_number);
#define gui_show_transparent_animated_image_frame _show_animation_frame
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_show_animated_image_frame
* DESCRIPTION
* Show a animated image's single frame
* PARAMETERS
* x : [IN] The x coordinate of image
* y : [IN] The y coordinate of image
* i : [IN] The pointer of image
* frame_number : [IN] The index of frame that will be shown
* RETURNS
* void
*****************************************************************************/
extern U8 _show_animation_frame(
S32 x,
S32 y,
U8 *image,
S16 frame_number);
//extern U8(*gui_show_animated_image_frame) (S32 x, S32 y, PU8 i, S16 frame_number);
#define gui_show_animated_image_frame _show_animation_frame
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_hide_animations
* DESCRIPTION
* Hide all animations
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
//extern void (*gui_hide_animations) (void);
#define gui_hide_animations gdi_image_stop_animation_all
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_show_transparent_animated_image_frames
* DESCRIPTION
* Show a animated image's mutil frame
* PARAMETERS
* x : [IN] The x coordinate of image
* y : [IN] The y coordinate of image
* t : [IN] The color of transparent
* start_frame : [IN] The index of start frame
* end_frame : [IN] The index of end frame
* RETURNS
* void
*****************************************************************************/
extern UI_animated_image_handle (*gui_show_transparent_animated_image_frames) (
S32 x,
S32 y,
PU8 i,
UI_transparent_color_type t,
S16 start_frame,
S16 end_frame);
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_transparent_color
* DESCRIPTION
* Convert a color from RGB to color struct
* PARAMETERS
* r : [IN] The value of red
* g : [IN] The value of green
* b : [IN] The value of blue
* RETURNS
* The color
*****************************************************************************/
//extern UI_transparent_color_type(*gui_transparent_color) (U8 r, U8 g, U8 b);
#define gui_transparent_color(_arg1, _arg2, _arg3) 0
/************************************************************* ****************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_color
* DESCRIPTION
* Convert a color from RGB to color struct
* PARAMETERS
* r : [IN] The value of red
* g : [IN] The value of green
* b : [IN] The value of blue
* RETURNS
* The color
*****************************************************************************/
extern color UI_color(U8 r, U8 g, U8 b);
//extern color(*gui_color) (U8 r, U8 g, U8 b);
#define gui_color UI_color
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_color32
* DESCRIPTION
* Convert a color from ARGB to color struct
* PARAMETERS
* r : [IN] The value of red
* g : [IN] The value of green
* b : [IN] The value of blue
* alpha : [IN] The value of alpha
* RETURNS
* The color
*****************************************************************************/
extern color UI_color32(
U8 r,
U8 g,
U8 b,
U8 alpha);
//extern color(*gui_color32) (U8 r, U8 g, U8 b, U8 alpha);
#define gui_color32 UI_color32
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_color_RGB
* DESCRIPTION
* Convert a color to RGB
* PARAMETERS
* c : [IN] The color that will be convert
* r : [IN] The pointer to store the color's red value
* g : [IN] The pointer to store the color's green value
* b : [IN] The pointer to store the color's blue value
* RETURNS
* void
*****************************************************************************/
extern void UI_color_RGB(
color c,
U8 *r,
U8 *g,
U8 *b);
//extern void (*gui_color_RGB) (color c, U8 *r, U8 *g, U8 *b);
#define gui_color_RGB UI_color_RGB
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_strcpy
* DESCRIPTION
* Copy a string from source to desitination
* PARAMETERS
* text1 : [IN] The src string
* text2 : [IN] The des string
* RETURNS
* void
*****************************************************************************/
extern UI_string_type UI_strcpy(UI_string_type text1, UI_string_type text2);
//extern UI_string_type(*gui_strcpy) (UI_string_type text1, UI_string_type text2);
#define gui_strcpy UI_strcpy
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_strncpy
* DESCRIPTION
* Copy a string from source to desitination with above limition
* PARAMETERS
* text1 : [IN] The src string
* text2 : [IN] The des string
* n : [IN] The max number of char will be copy
* RETURNS
* void
*****************************************************************************/
extern UI_string_type UI_strncpy(
UI_string_type text1,
UI_string_type text2,
S32 n);
//extern UI_string_type(*gui_strncpy) (UI_string_type text1, UI_string_type text2, S32 n);
#define gui_strncpy UI_strncpy
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_strcmp
* DESCRIPTION
* Compare two string is equal or not
* PARAMETERS
* text1 : [IN] The first string
* text2 : [IN] The second string
* RETURNS
* The compare result of two string
*****************************************************************************/
extern S32 UI_strcmp(UI_string_type text1, UI_string_type text2);
//extern S32 (*gui_strcmp) (UI_string_type text1, UI_string_type text2);
#define gui_strcmp UI_strcmp
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_strlen
* DESCRIPTION
* Get the string's length
* PARAMETERS
* text : [IN] The string that will be measure
* RETURNS
* The length of string
*****************************************************************************/
extern S32 UI_strlen(UI_string_type text);
//extern S32(*gui_strlen) (UI_string_type text);
#define gui_strlen UI_strlen
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_strncmp
* DESCRIPTION
* Compare two string with given above limition
* PARAMETERS
* text1 : [IN] The first string
* text2 : [IN] The second string
* n : [IN] The max number of compare char
* RETURNS
* void
*****************************************************************************/
extern S32 UI_strncmp(UI_string_type text1, UI_string_type text2, S32 n);
//extern S32(*gui_strncmp) (UI_string_type text1, UI_string_type text2, S32 n);
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_strcat
* DESCRIPTION
* Contact two string
* PARAMETERS
* text1 : [IN] The first string
* text2 : [IN] The second string
* RETURNS
* The result of contact
*****************************************************************************/
extern UI_string_type UI_strcat(UI_string_type text1, UI_string_type text2);
//extern UI_string_type(*gui_strcat) (UI_string_type text1, UI_string_type text2);
#define gui_strcat UI_strcat
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_itoa
* DESCRIPTION
* Convert a natural number into a string
* PARAMETERS
* value : [IN] The natural number
* s : [OUT] The buffer to store the string
* radix : [IN] The radix of value
* RETURNS
* The pointer to store the string
*****************************************************************************/
//extern WCHAR *(*gui_itoa) (S32 value, WCHAR * s, U32 radix);
#define gui_itoa mmi_wcs_itow
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_atoi
* DESCRIPTION
* Convert a string to a natural number
* PARAMETERS
* s : [IN] The string that will be convert
* RETURNS
* The natural value
*****************************************************************************/
//extern S32(*gui_atoi) (UI_string_type s);
#define gui_atoi mmi_wcs_wtoi
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_memcpy
* DESCRIPTION
* Copy memory from source to desitination
* PARAMETERS
* d : [OUT] The desitination memory pointer
* s : [IN] The source memory pointer
* n : [IN] The size of memory will be copy
* RETURNS
* void
*****************************************************************************/
//extern void* (*gui_memcpy) (void *d, const void *s, S32 n);
#define gui_memcpy memcpy//UI_memcpy
/*****************************************************************************
* <group dom_utility_gui_layer_misc>
* FUNCTION
* gui_get_next_character
* DESCRIPTION
* Get the next character form a string
* PARAMETERS
* s : [IN] The string
* RETURNS
* The next character
*****************************************************************************/
extern UI_character_type UI_get_next_UCS2_character(UI_string_type *s);
//extern UI_character_type(*gui_get_next_character) (UI_string_type *s);
#define gui_get_next_character UI_get_next_UCS2_character
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_get_previous_character
* DESCRIPTION
* Get the previous character form a string
* PARAMETERS
* s : [IN] The string
* RETURNS
* The previous character
*****************************************************************************/
extern UI_character_type UI_get_previous_UCS2_character(UI_string_type *s);
//extern UI_character_type(*gui_get_previous_character) (UI_string_type *s);
#define gui_get_previous_character UI_get_previous_UCS2_character
/* Double buffer */
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_BLT_double_buffer
* DESCRIPTION
* Blt gdi layer to LCD, it is same as gdi_layer_blt_previous
* PARAMETERS
* x1 : [IN] The x1 of blt range
* y1 : [IN] The y1 of blt range
* x2 : [IN] The x2 of blt range
* y2 : [IN] The y2 of blt range
* RETURNS
* void
*****************************************************************************/
//extern void (*gui_BLT_double_buffer) (S32 x1, S32 y1, S32 x2, S32 y2);
#define gui_BLT_double_buffer gdi_layer_blt_previous
#define UI_BLT_double_buffer gdi_layer_blt_previous
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_lock_double_buffer
* DESCRIPTION
* Lock the gdi layer buffer, so that,blt operator won't blt the result into LCD
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
//extern void (*gui_lock_double_buffer) (void);
#define gui_lock_double_buffer gdi_layer_lock_frame_buffer
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_unlock_double_buffer
* DESCRIPTION
* Unlock the gdi layer buffer, this function should be used with gui_lock_double_buffer
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
//extern void (*gui_unlock_double_buffer) (void);
#define gui_unlock_double_buffer gdi_layer_unlock_frame_buffer
/* Layout */
/*****************************************************************************
* <group dom_utility_gui_layer_property_setting>
* FUNCTION
* gui_setup_default_layout
* DESCRIPTION
* Setup UI layout context to "Default Layout"
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
extern void gui_setup_default_layout(void);
/*****************************************************************************
* <group dom_utility_gui_layer_property_setting>
* FUNCTION
* gui_setup_common_layout
* DESCRIPTION
* Setup UI layout context to "Common Layout"
*
* The major differences between "Default Layout" and "Common Layout" is that
* category screens using "Common Layout" need to call gui_setup_common_layout()
* explicitly, but "Default Layout" does not.
*
* "Common Layout" is used for category screens which can be customized for
* layout other than PlutoMMI's default.
*
* "Default Layout" is used for category screens which always use PlutoMMI's default
* because it may be difficult to be scalable. (e.g. need to change images)
*
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
extern void gui_setup_common_layout(void);
/*****************************************************************************
* <group dom_utility_gui_layer_property_setting>
* FUNCTION
* gui_setup_mainmenu_layout
* DESCRIPTION
* Setup UI layout context to "Main Menu Layout"
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
extern void gui_setup_mainmenu_layout(void);
/*****************************************************************************
* <group dom_utility_gui_layer_property_setting>
* FUNCTION
* gui_setup_submenu_layout
* DESCRIPTION
* Setup UI layout context to "Sub Menu Layout"
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
extern void gui_setup_submenu_layout(void);
/* <group dom_utility_variables>
* Right-to-left flag */
extern BOOL r2lMMIFlag;
/* Some standard functions: Need to be implemented through wrappers. */
/* See the character set support functions, gui_get_next_character */
/* and gui_get_previous_character */
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_linebreak_character
* DESCRIPTION
* Returns true if a given character is a line break character
* PARAMETERS
* c : [IN] Character to be tested
* RETURNS
* true if c is a line break character
* false if c is not a line break character
*****************************************************************************/
extern U8 gui_linebreak_character(UI_character_type c);
/*****************************************************************************
* <group dom_utility_gui_layer_misc>
* FUNCTION
* gui_endofstring_character
* DESCRIPTION
* Returns true if a given character is an end of string character
* PARAMETERS
* c : [IN] Character to be tested
* RETURNS
* true if c is an end of string character
* false if c is not an end of string character
* See UI_character_type (Abstract type)
*****************************************************************************/
extern U8 gui_endofstring_character(UI_character_type c);
/*****************************************************************************
* <group dom_utility_gui_layer_misc>
* FUNCTION
* gui_blend_two_color
* DESCRIPTION
* Blend two color together.
* PARAMETERS
* c1 : [IN] Color 1
* c2 : [IN] Color 2
* weight1 : [IN] Weighting of color 1
* weight2 : [IN] Weighting of color 2
* RETURNS
* blended color
*****************************************************************************/
extern color gui_blend_two_color(
color c1,
color c2,
S32 weight1,
S32 weight2);
#define UI_GRADIENT_COLOR_VERTICAL 0x00000100
#define UI_GRADIENT_COLOR_HORIZONTAL 0x00000000
#define UI_GRADIENT_COLOR_FLIP 0x00000200
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_initialize_gradient_color
* DESCRIPTION
* Creates a gradient color
*
* Note: gc must be allocated before calling this function.
* PARAMETERS
* gc : [OUT] Is the gradient color (pre-allocated)
* c : [IN] Is an array of colors (n elements)
* p : [IN] Is an array of percentages (n-1 elements)
* n : [IN] Is the number of colors
* RETURNS
* void
*****************************************************************************/
extern void gui_initialize_gradient_color(
gradient_color *gc,
color *c,
U8 *p,
U8 n);
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_gradient_fill_rectangle
* DESCRIPTION
* Gradient color fills a rectangle
* PARAMETERS
* x1 : [IN] Left-top corner of the rectangle
* y1 : [IN] Left-top corner of the rectangle
* x2 : [IN] Right-bottom corner of the rectangle
* y2 : [IN] Right-bottom corner of the rectangle
* gc : [IN] Is the gradient color
* flags : [IN] Can have the following values:
* RETURNS
* void
*****************************************************************************/
#if 0
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
#endif//0
#define gui_gradient_fill_rectangle(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6)
/* <group dom_utility_struct>
* Filled Area border theme */
typedef struct _UI_filled_area_border_theme
{
color filled_area_outer_light_border;
color filled_area_inner_light_border;
color filled_area_outer_dark_border;
color filled_area_inner_dark_border;
} UI_filled_area_border_theme;
//extern UI_filled_area_border_theme *current_filled_area_border_theme;
/*
* UI filled area structure
* -------------------
* bits 0-7: filler types
* bit 8: 1=vertical filler, 0=horizontal filler (used for gradients and textures)
* bit 9: flip filler
* bit 10: (reserved)
* bit 11: (reserved)
* bit 12: border yes/no
* bit 13: border size 0=single line, 1=double line
* bit 14: 3D border
* bit 15: rounded border
* bit 16: 1=elevated border, 0=depressed border
* bit 17: 1=filled area with shadow
* bit 18: 1=filled area with double line shadow, 0=single line shadow
* bit 19: (reserved)
* bit 20: left rounded border
* bit 21: right rounded border
* bit 22: Draw only horizontal lines in borders
* bit 24: transparent color
*/
/* <group dom_utility_macro>
* Bits 0-7: filler type */
#define UI_FILLED_AREA_MASK_TYPE 0x000000FF
/* <group dom_utility_macro>
* --- */
#define UI_FILLED_AREA_TYPE_COLOR 0x00000000
/* <group dom_utility_macro> */
#define UI_FILLED_AREA_TYPE_GRADIENT_COLOR 0x00000001
/* <group dom_utility_macro> */
#define UI_FILLED_AREA_TYPE_TEXTURE 0x00000002
/* <group dom_utility_macro> */
#define UI_FILLED_AREA_TYPE_BITMAP 0x00000003
/* <group dom_utility_macro> */
#define UI_FILLED_AREA_TYPE_HATCH_COLOR 0x00000004
/* <group dom_utility_macro> */
#define UI_FILLED_AREA_TYPE_ALTERNATE_HATCH_COLOR 0x00000005
/* <group dom_utility_macro> */
#define UI_FILLED_AREA_TYPE_CROSS_HATCH_COLOR 0x00000006
/* <group dom_utility_macro> */
#define UI_FILLED_AREA_TYPE_ALTERNATE_CROSS_HATCH_COLOR 0x00000007
/* <group dom_utility_macro> */
#define UI_FILLED_AREA_TYPE_NO_BACKGROUND 0x00000008
/* <group dom_utility_macro> */
#define UI_FILLED_AREA_TYPE_CUSTOM_FILL_TYPE1 0x00000009
/* <group dom_utility_macro>
* Popup description 1 */
#define UI_FILLED_AREA_TYPE_CUSTOM_FILL_TYPE2 0x0000000A
/* <group dom_utility_macro>
* Popup description 2 */
#define UI_FILLED_AREA_TYPE_3D_BORDER 0x0000000B
/* <group dom_utility_macro> */
#define UI_FILLED_AREA_TYPE_IMAGE_RIGHT_ALIGN 0x0000000C
/* <group dom_utility_macro> */
#define UI_FILLED_AREA_TYPE_IMAGE_LEFT_ALIGN 0x0000000D
/* <group dom_utility_macro>
* Bit 8: horiztonal or vertical fill for gradient color */
#define UI_FILLED_AREA_MASK_FILL_DIRECTION 0x00000100
/* <group dom_utility_macro>
* --- */
#define UI_FILLED_AREA_HORIZONTAL_FILL 0x00000000
/* <group dom_utility_macro> */
#define UI_FILLED_AREA_VERTICAL_FILL 0x00000100
/* <group dom_utility_macro>
* Bit 9: flip fill or not */
#define UI_FILLED_AREA_FLIP_FILL 0x00000200
/* <group dom_utility_macro>
* Bits 12-13: single-double-border */
#define UI_FILLED_AREA_MASK_BORDER_WIDTH 0x00003000
/* <group dom_utility_macro>
* --- */
#define UI_FILLED_AREA_TYPE_NO_BORDER 0x00000000
/* <group dom_utility_macro> */
#define UI_FILLED_AREA_BORDER 0x00001000
/* <group dom_utility_macro> */
#define UI_FILLED_AREA_SINGLE_BORDER 0x00001000
/* <group dom_utility_macro>
* Contain UI_FILLED_AREA_BORDER */
#define UI_FILLED_AREA_DOUBLE_BORDER 0x00003000 /* Contain UI_FILLED_AREA_BORDER */
/* <group dom_utility_macro>
* Bits 14: 3D border */
#define UI_FILLED_AREA_3D_BORDER 0x00004000
/* <group dom_utility_macro>
* Bits 15: Rounded border */
#define UI_FILLED_AREA_ROUNDED_BORDER 0x00008000
/* <group dom_utility_macro>
* Bits 16: Elevated or depressed border */
#define UI_FILLED_AREA_MASK_ELEVATION 0x00010000
/* <group dom_utility_macro>
* --- */
#define UI_FILLED_AREA_ELEVATED_BORDER 0x00010000
/* <group dom_utility_macro> */
#define UI_FILLED_AREA_DEPRESSED_BORDER 0x00000000
/* <group dom_utility_macro>
* Combination of Bit 14 and 16 */
#define UI_FILLED_AREA_3D_ELEVATED_BORDER (UI_FILLED_AREA_ELEVATED_BORDER | UI_FILLED_AREA_3D_BORDER)
/* <group dom_utility_macro> */
#define UI_FILLED_AREA_3D_DEPRESSED_BORDER (UI_FILLED_AREA_DEPRESSED_BORDER | UI_FILLED_AREA_3D_BORDER)
/* <group dom_utility_macro>
* Bits 17-18: single-double-shadown */
#define UI_FILLED_AREA_MASK_SHADOW 0x00060000
/* <group dom_utility_macro>
* --- */
#define UI_FILLED_AREA_SHADOW 0x00020000
/* <group dom_utility_macro> */
#define UI_FILLED_AREA_SHADOW_DOUBLE_LINE 0x00040000
/* <group dom_utility_macro>
* Bit 20: Left rounded border for Dalmatian style */
#define UI_FILLED_AREA_LEFT_ROUNDED_BORDER 0x00100000
/* <group dom_utility_macro>
* Bit 21: Right rounded border for Dalmatian style */
#define UI_FILLED_AREA_RIGHT_ROUNDED_BORDER 0x00200000
/* <group dom_utility_macro>
* Bit 22: Draw only horizontal lines w/o vertical lines in UI_FILLED_AREA_BORDER */
#define UI_FILLED_AREA_NO_VERTICAL_LINE 0x00400000
/* <group dom_utility_macro>
* Bit 24: Transparent color filler */
#define UI_FILLED_AREA_TYPE_TRANSPARENT_COLOR 0x01000000
/* <group dom_utility_macro>
* Bits 15: Rounded border */
#define UI_FILLED_AREA_LEFT_RIGHT_ROUNDED_BORDER 0x02000000
extern UI_filled_area *current_UI_filler;
//PMT VIKAS START 20050520
//PMT VIKAS START 20051217
//huking || defined(__MMI_UI_TRANSPARENT_EFFECT_IN_DALMATIAN_CALENDAR__)
#if defined (__MMI_UI_TRANSPARENT_EFFECT__) || defined (__MMI_UI_LIST_HIGHLIGHT_EFFECTS__) || defined (UI_SCROLLBAR_STYLE_4) || defined(UI_SCROLLBAR_STYLE_6) /* 072505 Calvin modified */
/* PMT VIKAS END 20051217 */
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_fill_transparent_color
* DESCRIPTION
* Fill the transparent color rectangle
* PARAMETERS
* x1 : [IN] The x1 of draw area
* y1 : [IN] The y1 of draw area
* x2 : [IN] The x2 of draw area
* y2 : [IN] The y2 of draw area
* c : [IN] The color to be used to fill draw area
* RETURNS
* void
*****************************************************************************/
extern void gui_fill_transparent_color(
S32 x1,
S32 y1,
S32 x2,
S32 y2,
color c);
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_transparent_color_filler
* DESCRIPTION
* Choose the color filler
* PARAMETERS
* x1 : [IN] The x1 of draw area
* y1 : [IN] The y1 of draw area
* x2 : [IN] The x2 of draw area
* y2 : [IN] The y2 of draw area
* c : [IN] The color to be used to fill draw area
* RETURNS
* void
*****************************************************************************/
extern void gui_transparent_color_filler(
S32 x1,
S32 y1,
S32 x2,
S32 y2,
color c);
/*****************************************************************************
* <group dom_utility_gui_layer_property_setting>
* FUNCTION
* gui_set_transparent_source_layer
* DESCRIPTION
* Set transparent source layer
* PARAMETERS
* layer : [IN] The handle of new transparent source layer
* RETURNS
* void
*****************************************************************************/
extern void gui_set_transparent_source_layer(gdi_handle layer);
/*****************************************************************************
* <group dom_utility_gui_layer_property_setting>
* FUNCTION
* gui_get_transparent_source_layer
* DESCRIPTION
* Get transparent source layer
* PARAMETERS
* void
* RETURNS
* The layer handler of transparent source layer
*****************************************************************************/
extern gdi_handle gui_get_transparent_source_layer(void); /* 110705 WAP menu Clavin add */
/*****************************************************************************
* <group dom_utility_gui_layer_property_setting>
* FUNCTION
* gui_reset_transparent_source_layer
* DESCRIPTION
* Reset transparent source layer
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
extern void gui_reset_transparent_source_layer(void);
/* PMT VIKAS START 20050630 */
/*****************************************************************************
* <group dom_utility_gui_layer_property_setting>
* FUNCTION
* gui_is_current_transparency_with_multi_layer
* DESCRIPTION
* This function returns if multilayer is enabled in transparency effect
* PARAMETERS
* void
* RETURNS
* TRUE/FALSE
*****************************************************************************/
extern MMI_BOOL gui_is_current_transparency_with_multi_layer(void);
/* PMT VIKAS END 20050630 */
//fixed patch back to 11C error
#else/**/
#define gui_fill_transparent_color(_arg0, _arg1, _arg2, _arg3, _arg4)
#define gui_set_transparent_source_layer(_arg)
#define gui_reset_transparent_source_layer()
#endif /* defined (__MMI_UI_TRANSPARENT_EFFECT__) || defined (__MMI_UI_LIST_HIGHLIGHT_EFFECTS__) || defined(__MMI_UI_TRANSPARENT_EFFECT_IN_DALMATIAN_CALENDAR__) || defined (UI_SCROLLBAR_STYLE_4) */
//PMT VIKAS END
//PMT VIKAS START 20050707
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_fill_left_rounded_border
* DESCRIPTION
* Draws a filled area with left rounded border shape
*
* See fillers (UI_filled_area structure)
* PARAMETERS
* rx1 : [IN] Left-top corner of the rectangle
* ry1 : [IN] Left-top corner of the rectangle
* rx2 : [IN] Right-bottom corner of the rectangle
* ry2 : [IN] Right-bottom corner of the rectangle
* f : [IN] Is the filler to use
* RETURNS
* void
*****************************************************************************/
extern void gui_fill_left_rounded_border(
S32 rx1,
S32 ry1,
S32 rx2,
S32 ry2,
UI_filled_area *f);
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_fill_right_rounded_border
* DESCRIPTION
* Draws a filled area with right rounded border shape
*
* See fillers (UI_filled_area structure)
* PARAMETERS
* rx1 : [IN] Left-top corner of the rectangle
* ry1 : [IN] Left-top corner of the rectangle
* rx2 : [IN] Right-bottom corner of the rectangle
* ry2 : [IN] Right-bottom corner of the rectangle
* f : [IN] Is the filler to use
* RETURNS
* void
*****************************************************************************/
extern void gui_fill_right_rounded_border(
S32 rx1,
S32 ry1,
S32 rx2,
S32 ry2,
UI_filled_area *f);
/* PMT VIKAS END 20050707 */
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_shadow_filled_area
* DESCRIPTION
* Draws a shadow for a filled area
*
* See fillers (UI_filled_area structure)
* PARAMETERS
* x1 : [IN] Left-top corner of the rectangle
* y1 : [IN] Left-top corner of the rectangle
* x2 : [IN] Right-bottom corner of the rectangle
* y2 : [IN] Right-bottom corner of the rectangle
* f : [IN] Is the filler to use
* RETURNS
* void
*****************************************************************************/
extern void gui_shadow_filled_area(
S32 x1,
S32 y1,
S32 x2,
S32 y2,
UI_filled_area *f);
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_draw_filled_area
* DESCRIPTION
* Draws a filled area
*
* See fillers (UI_filled_area structure)
* PARAMETERS
* x1 : [IN] Left-top corner of the rectangle
* y1 : [IN] Left-top corner of the rectangle
* x2 : [IN] Right-bottom corner of the rectangle
* y2 : [IN] Right-bottom corner of the rectangle
* f : [IN] Is the filler to use
* RETURNS
* void
*****************************************************************************/
extern void gui_draw_filled_area(
S32 x1,
S32 y1,
S32 x2,
S32 y2,
UI_filled_area *f);
/* void gui_greyscale_rectangle(S32 x1,S32 y1,S32 x2,S32 y2, S32 white_value); */
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_greyscale_rectangle
* DESCRIPTION
* Greyscale the assigned region
* PARAMETERS
* x1 : [IN] Left-top corner of the rectangle
* y1 : [IN] Left-top corner of the rectangle
* x2 : [IN] Right-bottom corner of the rectangle
* y2 : [IN] Right-bottom corner of the rectangle
* white_value : [IN] 0~255 change the gamma value of the region
* black_value : [IN] 0~255 change the darkness of the region
* RETURNS
* void
*****************************************************************************/
extern void gui_greyscale_rectangle(
S32 x1,
S32 y1,
S32 x2,
S32 y2,
S32 white_value,
S32 black_value); /* 102605 greyscale Calvin chnaged */
/* PMT HIMANSHU START 20050916 */
typedef enum
{
MMI_GRADIENT_RECT_ROUNDED_CORNER_TOP_LEFT = 0,
MMI_GRADIENT_RECT_ROUNDED_CORNER_TOP_RIGHT,
MMI_GRADIENT_RECT_ROUNDED_CORNER_BOTTOM_LEFT,
MMI_GRADIENT_RECT_ROUNDED_CORNER_BOTTOM_RIGHT
} mmi_gradient_rect_rounded_corner_style_enum;
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_draw_rounded_corner
* DESCRIPTION
* This function will draw the gradient rounded corner of the rectangle
* PARAMETERS
* x1 : [IN] X coordinate of corner.
* y1 : [IN] Y coordinate of corner.
* size : [IN] radio of rounded corner.
* rect_color_start : [IN] It specifies the outermost start color of the border.
* rect_color_end : [IN] It specifies the innermost end color of the border.
* level : [IN] Levels of different colors
* corner_style : [IN] It specifies the corner of the rectangle.
* RETURNS
* void
*****************************************************************************/
extern void gui_draw_rounded_corner(
S32 x1,
S32 y1,
S32 size,
color rect_color_start,
color rect_color_end,
S32 levle,
mmi_gradient_rect_rounded_corner_style_enum corner_style);
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_draw_gradient_rounded_rectangle
* DESCRIPTION
* This function is used to draw the rounded rectangle with gradient border.
* PARAMETERS
* x1 : [IN] Left-top coordinate of the rectangle.
* y1 : [IN] Left-top coordinate of the rectangle.
* x2 : [IN] Bottom-right coordinate of the rectangle.
* y2 : [IN] Bottom-right coordinate of the rectangle.
* start_color : [IN] It specifies the outermost start color of the border.
* end_color : [IN] It specifies the innermost end color of the border.
* border_width : [IN] It specifies the width of the border.
* RETURNS
* void
*****************************************************************************/
extern void gui_draw_gradient_rounded_rectangle(
S32 x1,
S32 y1,
S32 x2,
S32 y2,
color start_color,
color end_color);//,S32 border_width
/* PMT HIMANSHU END 20050916 */
/* <group dom_utility_struct> */
typedef struct _UI_HLS_color
{
/* Hue */
U16 h; /* 0-360 */
/* Lightness */
U8 l; /* 0-255 */
/* Saturation */
U8 s; /* 0-255 */
} UI_HLS_color;
/*****************************************************************************
* <group dom_utility_gui_layer_misc>
* FUNCTION
* gui_RGB_to_HLS
* DESCRIPTION
* Convert RGB color to HLS color
* PARAMETERS
* rgb : [IN] The RGB color value
* hls : [OUT] The HLS color value
* RETURNS
* void
*****************************************************************************/
//extern void gui_RGB_to_HLS(color rgb, UI_HLS_color *hls);
#define gui_RGB_to_HLS(_arg0, _arg1)
/*****************************************************************************
* <group dom_utility_gui_layer_misc>
* FUNCTION
* gui_HLS_to_RGB
* DESCRIPTION
* Convert HLS color to RGB color
* PARAMETERS
* hls : [IN] The HLS color value
* rgb : [OUT] The RGB color value
* RETURNS
* void
*****************************************************************************/
//extern void gui_HLS_to_RGB(UI_HLS_color hls, color *rgb);
#define gui_HLS_to_RGB(_arg0, _arg1)
/* UI object co-ordinates structure */
/* <group dom_utility_struct> */
typedef struct _UI_object_coordinates
{
S32 x;
S32 y;
S32 width;
S32 height;
} UI_object_coordinates;
/* Dummy functions called by UI elements by default, during events
Do not remove any of these functions. */
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* UI_dummy_function
* DESCRIPTION
* Dummy functio with out parameter
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
extern void UI_dummy_function(void);
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* UI_dummy_function_byte
* DESCRIPTION
* Dummay function with byte parameter
* PARAMETERS
* a : [IN] Unused parameter
* RETURNS
* void
*****************************************************************************/
extern void UI_dummy_function_byte(U8 a);
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* UI_dummy_function_s32
* DESCRIPTION
* Dummy function with s32 parameter
* PARAMETERS
* a : [IN] Unused parameter
* RETURNS
* void
*****************************************************************************/
extern void UI_dummy_function_with_2_s32(S32 a, S32 b);
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* UI_dummy_function_s32
* DESCRIPTION
* Dummy function with s32 parameter
* PARAMETERS
* a : [IN] Unused parameter
* RETURNS
* void
*****************************************************************************/
extern void UI_dummy_function_with_4_s32(S32 a, S32 b, S32 c, S32 d);
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* UI_dummy_function_s32
* DESCRIPTION
* Dummy function with s32 parameter
* PARAMETERS
* a : [IN] Unused parameter
* RETURNS
* void
*****************************************************************************/
extern void UI_dummy_function_s32(S32 a);
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* UI_dummy_function_character
* DESCRIPTION
* Dummy function with text parameter
* PARAMETERS
* c : [IN] Unused parameter
* RETURNS
* void
*****************************************************************************/
extern void UI_dummy_function_character(UI_character_type c);
#ifdef __MMI_SUBLCD__
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* UI_set_main_LCD_graphics_context
* DESCRIPTION
* Set mainlcd as active lcd
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
extern void UI_set_main_LCD_graphics_context(void);
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* UI_set_sub_LCD_graphics_context
* DESCRIPTION
* Set sublcd as active lcd
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
extern void UI_set_sub_LCD_graphics_context(void);
#else/*#ifdef __MMI_SUBLCD__*/
#define UI_set_main_LCD_graphics_context()
#define UI_set_sub_LCD_graphics_context()
#endif/*#ifdef __MMI_SUBLCD__*/
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* UI_test_sub_LCD_graphics_context
* DESCRIPTION
* To check active lcd is sublcd or not
* PARAMETERS
* void
* RETURNS
* 1 : The active lcd is sublcd
* 0 : The active lcd isn't sublcd
*****************************************************************************/
extern U8 UI_test_sub_LCD_graphics_context(void);
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_print_truncated_text
* DESCRIPTION
* Print truncated text with no border .
*
* If length of text is greater than
* screen width then the text is truncated . Three dots are shown at end of text
* PARAMETERS
* x : [IN] Start x positoin
* y : [IN] Start Y position
* xwidth : [IN] Width of text in pixels to display
* st : [IN] Text to display
* RETURNS
* void
*****************************************************************************/
extern void gui_print_truncated_text(
S32 x,
S32 y,
S32 xwidth,
UI_string_type s);
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_print_truncated_borderd_text
* DESCRIPTION
* Print truncated text border .
*
* If length of text is greater than
* screen width then the text is truncated . Three dots are shown at end of text
* PARAMETERS
* x : [IN] Start x positoin
* y : [IN] Start Y position
* xwidth : [IN] Width of text in pixels to display
* st : [IN] Text to display
* RETURNS
* void
*****************************************************************************/
extern void gui_print_truncated_borderd_text(
S32 x,
S32 y,
S32 xwidth,
UI_string_type s);
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_print_truncated_text_ex
* DESCRIPTION
* Print truncated text with no border .
*
* If length of text is greater than
* screen width then the text is truncated . Three dots are shown at end of text
* PARAMETERS
* x : [IN] Start x positoin
* y : [IN] Start Y position
* xwidth : [IN] Width of text in pixels to display
* st : [IN] Text to display
* RETURNS
* void
*****************************************************************************/
extern void gui_print_truncated_text_ex(
S32 x,
S32 y,
S32 xwidth,
UI_string_type st);
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_print_text_by_direction
* DESCRIPTION
* Print the text by forcing reading direction the same to r2lMMIFlag.
* PARAMETERS
* str : [IN] Text to display
* RETURNS
* void
*****************************************************************************/
extern void gui_print_text_by_direction(UI_string_type str);
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_print_bordered_text_by_direction
* DESCRIPTION
* Print the bordered text by forcing reading direction the same to r2lMMIFlag.
* PARAMETERS
* str : [IN] Text to display
* RETURNS
* void
*****************************************************************************/
extern void gui_print_bordered_text_by_direction(UI_string_type str);
/* Common string macros */
#ifdef __ASCII
/* <group dom_utility_macro> */
#define UI_STRING_GET_NEXT_CHARACTER(p,c) \
{ \
(c)=*((U8*)(p))++; \
}
/* <group dom_utility_macro> */
#define UI_STRING_GET_PREVIOUS_CHARACTER(p,c) \
{ \
(c)=*(--((U8*)(p))); \
}
/* <group dom_utility_macro> */
#define UI_STRING_INSERT_CHARACTER(p,c) \
{ \
*((U8*)(p))++=(c); \
}
#endif /* __ASCII */
#ifdef __UCS2_ENCODING
/* Warning: Currently, these macros assume Little endian format only */
/* <group dom_utility_macro> */
#define UI_STRING_GET_NEXT_CHARACTER(p,c) \
{ \
c=(UI_character_type)((*((p)+0))|((*((p)+1))<<8)); \
(p)+=2; \
}
/* <group dom_utility_macro> */
#define UI_STRING_GET_PREVIOUS_CHARACTER(p,c) \
{ \
p-=2; \
c=(UI_character_type)((*((p)+0))|((*((p)+1))<<8)); \
}
/* <group dom_utility_macro> */
#define UI_STRING_INSERT_CHARACTER(p,c) \
{ \
(*((p))++)=(U8)(((c)&0xff)); \
(*((p))++)=(U8)(((c)>>8)); \
}
#endif /* __UCS2_ENCODING */
/* <group dom_utility_macro> */
#define UI_TEST_CR_CHARACTER1(c) (((UI_character_type)(c)==(UI_character_type)0x0D)?(1):(0))
/* <group dom_utility_macro> */
#define UI_TEST_CR_CHARACTER(c) (((*(UI_character_type*)&(c))==(UI_character_type)0x0D)?(1):(0))
/* <group dom_utility_macro> */
#define UI_TEST_LF_CHARACTER1(c) (((UI_character_type)(c)==(UI_character_type)0x0A)?(1):(0))
/* <group dom_utility_macro> */
#define UI_TEST_LF_CHARACTER(c) (((*(UI_character_type*)&(c))==(UI_character_type)0x0A || ((c) == 0x2029) || ((c) == 0x2028))?(1):(0))
/* <group dom_utility_macro> */
#define UI_TEST_ESC_CHARACTER1(c) (((UI_character_type)(c)==(UI_character_type)0x1B)?(1):(0))
/* <group dom_utility_macro> */
#define UI_TEST_ESC_CHARACTER(c) (((*(UI_character_type*)&(c))==(UI_character_type)0x1B)?(1):(0))
/* <group dom_utility_macro> */
#define UI_TEST_SEMICOLON_CHAR(c) (((UI_character_type)(c) == 0x003B || (UI_character_type)(c) == 0xff1b)?(1):(0)) /* check if the char is ';'*/
/* <group dom_utility_macro> */
#define UI_STRING_LINE_BREAK_CHARACTER1(c) (((UI_character_type)(c)==(UI_character_type)'\n')?(1):(0))
/* <group dom_utility_macro> */
#define UI_STRING_LINE_BREAK_CHARACTER(c) (((*(UI_character_type*)&(c))==(UI_character_type)'\n' || ((c) == 0x2029) || ((c) == 0x2028))?(1):(0))
/* <group dom_utility_macro> */
#define UI_STRING_END_OF_STRING_CHARACTER1(c) (((UI_character_type)(c)==(UI_character_type)'\0')?(1):(0))
/* <group dom_utility_macro> */
#define UI_STRING_END_OF_STRING_CHARACTER(c) (((*(UI_character_type*)&(c))==(UI_character_type)'\0')?(1):(0))
/* <group dom_utility_macro> */
#define UI_STRING_SPACE_CHARACTER1(c) (((UI_character_type)(c)==(UI_character_type)' ')?(1):(0))
/* <group dom_utility_macro> */
#define UI_STRING_SPACE_CHARACTER(c) (((*(UI_character_type*)&(c))==(UI_character_type)' ')?(1):(0))
/* <group dom_utility_macro> */
#define UI_TEST_ASCII_NOT_IN_GSM_DEF_CHAR(c) (((c)==96)?(1):(0))
/* <group dom_utility_macro> */
#define UI_TEST_8895_1_CHAR_IN_GSM_DEF_CHAR(c) (((c)==162 ||(c)==163 ||(c)==165 || (c)==232 ||(c)==233 ||(c)==249 ||(c)==236 ||(c)==242 ||(c)==199 ||(c)==216 ||(c)==248 ||(c)==197 ||(c)==229 ||(c)==198 ||(c)==230 ||(c)==223 ||(c)==201 ||(c)==164 ||(c)==161 ||(c)==196 ||(c)==214 ||(c)==209 ||(c)==220 ||(c)==167 ||(c)==191 ||(c)==228 ||(c)==246 ||(c)==241 ||(c)==252 ||(c)==224)?(1):(0))
/* #define UI_TEST_UCS2_CHARACTER(c) (((((c)&0xff80) && ( !UI_TEST_8895_1_CHAR_IN_GSM_DEF_CHAR(c))) || UI_TEST_ASCII_NOT_IN_GSM_DEF_CHAR(c))?(1):(0)) */
/* <group dom_utility_macro> */
#define UI_TEST_UCS2_CHARACTER(c) ((c != 0) && !mmi_7bit_check_gsm_default(c) && !mmi_7bit_check_gsm_ext_character_default(c))
/* <group dom_utility_macro> */
#define UI_TEST_UCS2_INCREMENT_COUNT(c,count) if(UI_TEST_UCS2_CHARACTER(c)) ((count)++)
/* <group dom_utility_macro> */
#define UI_TEST_UCS2_DECREMENT_COUNT(c,count) if(UI_TEST_UCS2_CHARACTER(c) && ((count)>0)) ((count)--)
/* <group dom_utility_macro> */
#define UI_TEST_ASCII_CHARACTER(c) (((c) < 0x7f) ? (1) : (0))
/* <group dom_utility_macro> */
#define UI_TEST_NON_ASCII_INCREMENT_COUNT(c,count) if(!UI_TEST_ASCII_CHARACTER(c)) ((count)++)
/* <group dom_utility_macro> */
#define UI_TEST_NON_ASCII_DECREMENT_COUNT(c,count) if(!UI_TEST_ASCII_CHARACTER(c) && ((count)>0)) ((count)--)
/* <group dom_utility_macro> */
#define UI_UCS2_STRING_HALF_LENGTH(x) (((x)&3)?(((x)>>1)+1):((x)>>1))
/* <group dom_utility_macro>
* For Phone Book Name Length */
// #define UI_UCS2_STRING_HALF_LENGTH_MINUS_ONE(x) (((x)&3)?(((x)>>1)-1):(((x)>>1)-2))
#define UI_UCS2_STRING_HALF_LENGTH_MINUS_ONE(x) (((x)&3)?(((x)>>1)-1):(((x)>>1)))
/* <group dom_utility_macro> */
#define UI_UCS2_STRING_HALF_LENGTH_MINUS_FORTYFOUR(x) (((x)&3)?(((x)>>1)-87):(((x)>>1)-88))
/* <group dom_utility_macro> */
#define UI_TEST_UCS2_INCREMENT_COUNT_SET_LENGTH(c,count,allocated_length,length) \
{ if(UI_TEST_UCS2_CHARACTER(c)) \
{ if((count)==0) (length)=UI_UCS2_STRING_HALF_LENGTH(allocated_length); \
(count)++; \
} \
}
/* <group dom_utility_macro> */
/* Added for n/2-1 Chinese characters input mode */
#define UI_TEST_UCS2_INCREMENT_COUNT_SET_LENGTH_TYPE2(c,count,allocated_length,length) \
{ if(UI_TEST_UCS2_CHARACTER(c)) \
{ if((count)==0) (length)=UI_UCS2_STRING_HALF_LENGTH_MINUS_ONE(allocated_length); \
(count)++; \
} \
}
/* <group dom_utility_macro> */
/* Added for n/2-44 Chinese characters input mode */
#define UI_TEST_UCS2_INCREMENT_COUNT_SET_LENGTH_TYPE3(c,count,allocated_length,length) \
{ if(UI_TEST_UCS2_CHARACTER(c)) \
{ if((count)==0) (length)=UI_UCS2_STRING_HALF_LENGTH_MINUS_FORTYFOUR(allocated_length); \
(count)++; \
} \
}
/* <group dom_utility_macro> */
#define UI_TEST_UCS2_DECREMENT_COUNT_SET_LENGTH(c,count,allocated_length,length) \
{ if(UI_TEST_UCS2_CHARACTER(c) && ((count)>0)) \
{ ((count)--); \
if((count)==0) (length)=(allocated_length); \
} \
}
/* <group dom_utility_macro> */
#define UI_TEST_UCS2_CHANGE_COUNT_SET_LENGTH(old_c,c,count,allocated_length,length) \
{ UI_TEST_UCS2_DECREMENT_COUNT_SET_LENGTH(old_c,count,allocated_length,length); \
UI_TEST_UCS2_INCREMENT_COUNT_SET_LENGTH(c,count,allocated_length,length); \
}
/* <group dom_utility_macro> */
/* Added for n/2-1 Chinese characters input mode */
#define UI_TEST_UCS2_CHANGE_COUNT_SET_LENGTH_TYPE2(old_c,c,count,allocated_length,length) \
{ UI_TEST_UCS2_DECREMENT_COUNT_SET_LENGTH(old_c,count,allocated_length,length); \
UI_TEST_UCS2_INCREMENT_COUNT_SET_LENGTH_TYPE2(c,count,allocated_length,length); \
}
/* <group dom_utility_macro> */
/* Added for n/2-44 Chinese characters input mode */
#define UI_TEST_UCS2_CHANGE_COUNT_SET_LENGTH_TYPE3(old_c,c,count,allocated_length,length) \
{ UI_TEST_UCS2_DECREMENT_COUNT_SET_LENGTH(old_c,count,allocated_length,length); \
UI_TEST_UCS2_INCREMENT_COUNT_SET_LENGTH_TYPE3(c,count,allocated_length,length); \
}
/* <group dom_utility_macro> */
#define UI_TEST_UCS2_COUNT_SET_LENGTH(count,allocated_length,length) \
{ if((count)>0) (length)=UI_UCS2_STRING_HALF_LENGTH(allocated_length); \
}
/* <group dom_utility_macro> */
/* Added for n/2-1 Chinese characters input mode */
#define UI_TEST_UCS2_COUNT_SET_LENGTH_TYPE2(count,allocated_length,length) \
{ if((count)>0) (length)=UI_UCS2_STRING_HALF_LENGTH_MINUS_ONE(allocated_length); \
}
/* <group dom_utility_macro> */
/* Added for n/2-44 Chinese characters input mode */
#define UI_TEST_UCS2_COUNT_SET_LENGTH_TYPE3(count,allocated_length,length) \
{ if((count)>0) (length)=UI_UCS2_STRING_HALF_LENGTH_MINUS_FORTYFOUR(allocated_length); \
}
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* UI_disable_alignment_timers
* DESCRIPTION
* Disable timers alignment
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
extern void UI_disable_alignment_timers(void);
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* UI_enable_alignment_timers
* DESCRIPTION
* Enable timers alignment
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
extern void UI_enable_alignment_timers(void);
/* Page break character equivalent needs to be added */
/* Euro character equivalent = 0xA2 */
/* <group dom_utility_macro> */
#define UI_TEST_GSM_EXTENDED mmi_7bit_check_gsm_ext_character_default
/* <group dom_utility_macro> */
#define UI_TEST_GSM_INCREMENT_COUNT(c,count) if(UI_TEST_GSM_EXTENDED(c)) ((count)++)
/* <group dom_utility_macro> */
#define UI_TEST_GSM_DECREMENT_COUNT(c,count) if(UI_TEST_GSM_EXTENDED(c) && ((count)>0)) ((count)--)
/* <group dom_utility_macro> */
#define UI_TEST_GSM_CHANGE_COUNT(old_c,c,count) \
{ UI_TEST_GSM_DECREMENT_COUNT(old_c,count); \
UI_TEST_GSM_INCREMENT_COUNT(c,count); \
}
/* #define UI_TEST_GSM_EXTENDED(c) \
( (c==0xA2) \
|| (c=='^') \
|| (c=='{') \
|| (c=='}') \
|| (c=='\\') \
|| (c=='[') \
|| (c=='~') \
|| (c==']') \
|| (c=='|') \
)*/ \
/*
* Painter Component: encapsulates various painting operations with common interface
*/
/* Custom-defined callback type to draw a rectangle region
(x, y) is the left-top corner of drawing
(clip_x1, clip_y1, clip_x2, clip_y2) is the clipping area. */
typedef void (*gui_util_painter_callback_type)(
S32 x,
S32 y,
S32 clip_x1,
S32 clip_y1,
S32 clip_x2,
S32 clip_y2);
/* <group dom_utility_enum>
* Types of painting operations */
typedef enum
{
/* Do nothing */
GUI_UTIL_PAINTER_TYPE_EMPTY = 0,
/* Fill transparent color */
GUI_UTIL_PAINTER_TYPE_TRANSPARENT,
/* Draw an image */
GUI_UTIL_PAINTER_TYPE_IMAGEID,
/* Call a custom-defined callback routine */
GUI_UTIL_PAINTER_TYPE_CALLBACK,
/* Use a filler */
GUI_UTIL_PAINTER_TYPE_FILLER,
/* Draw an image */
GUI_UTIL_PAINTER_TYPE_IMAGERES,
/* Last dummy enum type */
GUI_UTIL_PAINTER_TYPE_END_OF_ENUM
} gui_util_painter_type_enum;
/* <group dom_utility_struct> */
/* Painter UI component */
typedef struct
{
gui_util_painter_type_enum type;
union
{
MMI_ID_TYPE imageid;
gui_util_painter_callback_type callback;
const UI_filled_area *filler;
PU8 image_res;
} _u;
} gui_util_painter_struct;
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_draw_image_with_alpha_transparent
* DESCRIPTION
* draw an image with alpha
* PARAMETERS
* p : [OUT]
* RETURNS
* void
*****************************************************************************/
extern void gui_draw_image_with_alpha_transparent(U8* img_ptr, S32 x, S32 y, S32 alpha);
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_draw_image_with_alpha_transparent
* DESCRIPTION
* draw an image with alpha
* PARAMETERS
* p : [OUT]
* RETURNS
* void
*****************************************************************************/
extern void gui_draw_image_id_with_alpha_transparent(U16 image_id, S32 x, S32 y, S32 alpha);
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_draw_resized_image_with_alpha_transparent
* DESCRIPTION
* draw an resized image with alpha
* PARAMETERS
* p : [OUT]
* RETURNS
* void
*****************************************************************************/
extern void gui_draw_resized_image_with_alpha_transparent(U8* img_ptr, S32 x, S32 y, S32 width, S32 height, S32 alpha);
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_draw_resized_image_id_with_alpha_transparent
* DESCRIPTION
* draw an resized image with alpha
* PARAMETERS
* p : [OUT]
* RETURNS
* void
*****************************************************************************/
extern void gui_draw_resized_image_id_with_alpha_transparent(U16 image_id, S32 x, S32 y, S32 width, S32 height, S32 alpha);
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_util_painter_create_empty
* DESCRIPTION
* Create an empty painter that draws nothing
* PARAMETERS
* p : [OUT] created painter object
* RETURNS
* void
*****************************************************************************/
extern void gui_util_painter_create_empty(gui_util_painter_struct *p);
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_util_painter_create_transparent
* DESCRIPTION
* Create a painter that fills transparent background
* PARAMETERS
* p : [OUT] created painter object
* RETURNS
* void
*****************************************************************************/
extern void gui_util_painter_create_transparent(gui_util_painter_struct *p);
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_util_painter_create_imageid
* DESCRIPTION
* Create a painter that draws a image
*
* Note: it's preferred to use image ID instead of raw data because
* image ID can be drawn with downloadable theme.
* PARAMETERS
* p : [OUT] created painter object
* imageid : [IN] image to be drawn
* RETURNS
* void
*****************************************************************************/
extern void gui_util_painter_create_imageid(
gui_util_painter_struct *p,
MMI_ID_TYPE imageid);
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_util_painter_create_imageid
* DESCRIPTION
* Create a painter that uses a callback to draw the region
* PARAMETERS
* p : [OUT] created painter object
* callback : [IN] callback draw function
* RETURNS
* void
*****************************************************************************/
extern void gui_util_painter_create_callback(
gui_util_painter_struct *p,
gui_util_painter_callback_type callback);
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_util_painter_create_filler
* DESCRIPTION
* Create a painter that draws a filler
* PARAMETERS
* p : [OUT] created painter object
* filler : [IN] filler (must not be released before the painter object is released)
* RETURNS
* void
*****************************************************************************/
extern void gui_util_painter_create_filler(
gui_util_painter_struct *p,
const UI_filled_area *filler);
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_util_painter_show_clipped
* DESCRIPTION
* Draw a painter in a clipped region
*
* Note: if (x, y) is outside (clip_x1, clip_y1, clip_x2, clip_y2), it is clipped.
*
* For example, when it draws an image, the left-top corner of the image is
* (x, y), but the displayed area is (clip_x1, clip_y1, clip_x2, clip_y2).
* PARAMETERS
* p : [IN] painter object
* x : [IN] x coordinate of left-top corner of painting area
* y : [IN] y coordinate of left-top corner of painting area
* clip_x1 : [IN] clipping area
* clip_y1 : [IN] clipping area
* clip_x2 : [IN] clipping area
* clip_y2 : [IN] clipping area
* RETURNS
* void
*****************************************************************************/
extern void gui_util_painter_show_clipped(
const gui_util_painter_struct *p,
S32 x,
S32 y,
S32 clip_x1,
S32 clip_y1,
S32 clip_x2,
S32 clip_y2);
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_util_painter_show
* DESCRIPTION
* Draw a painter
* PARAMETERS
* p : [IN] painter object
* x1 : [IN] x coordinate of left-top corner
* y1 : [IN] y coordinate of left-top corner
* x2 : [IN] x coordinate of right-bottom corner
* y2 : [IN] y coordinate of right-bottom corner
* RETURNS
* void
*****************************************************************************/
extern void gui_util_painter_show(
const gui_util_painter_struct *p,
S32 x1,
S32 y1,
S32 x2,
S32 y2);
/*
* Clean-up of GUI components
* To avoid clean-up each UI component explicitly in WGUI/draw manager/widget,
* general cleanup mechanism is provided here.
*/
/* <group dom_utility_macro> */
#define GUI_MAX_CLEANUP_HOOK 16
typedef void (*gui_cleanup_hook_hdlr) (void);
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_add_cleanup_hook
* DESCRIPTION
* Add cleanup hook function
* PARAMETERS
* fp : [IN] The clean up hook function to be added
* RETURNS
* void
*****************************************************************************/
extern void gui_add_cleanup_hook(gui_cleanup_hook_hdlr fp);
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_remove_cleanup_hook
* DESCRIPTION
* Remove cleanup hook function
* PARAMETERS
* fp : [IN] The function pointer to be remove
* RETURNS
* void
*****************************************************************************/
extern void gui_remove_cleanup_hook(gui_cleanup_hook_hdlr fp);
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_cleanup
* DESCRIPTION
* Call hook function of component when clean up
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
extern void gui_cleanup(void);
/* PMT VIKAS START 20051209 */
/* Pre cleanup functions for GUI components */
typedef void (*gui_pre_cleanup_hook_hdlr) (void);
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_add_pre_cleanup_hook
* DESCRIPTION
* Add a pre cleanup hook function
* PARAMETERS
* fp : [IN] The hook function to be added
* RETURNS
* void
*****************************************************************************/
extern void gui_add_pre_cleanup_hook(gui_cleanup_hook_hdlr fp);
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_remove_pre_cleanup_hook
* DESCRIPTION
* Remove a pre clean up hook function
* PARAMETERS
* fp : [IN] The function pointer to be remove
* RETURNS
* void
*****************************************************************************/
extern void gui_remove_pre_cleanup_hook(gui_cleanup_hook_hdlr fp);
/*****************************************************************************
* <group dom_utility_gui_layer_basic>
* FUNCTION
* gui_pre_cleanup
* DESCRIPTION
* Preview clean up before component exit
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
extern void gui_pre_cleanup(void);
/* PMT VIKAS END 20051209 */
/* Touch Panel Events */
/* <group dom_utility_enum> */
typedef enum
{
GUI_PEN_EVENT_PARAM_VOID,
GUI_PEN_EVENT_PARAM_INTEGER,
GUI_PEN_EVENT_PARAM_INTEGER2,
GUI_PEN_EVENT_PARAM_INTEGER3,
GUI_PEN_EVENT_PARAM_POINTER,
GUI_PEN_EVENT_PARAM_POINTER_INTEGER,
GUI_PEN_EVENT_PARAM_POINTER_INTEGER2
} gui_pen_event_param_enum;
/* <group dom_utility_struct> */
typedef struct _mmi_gui_pen_event_param_struct
{
gui_pen_event_param_enum type;
union
{
int i;
void *p;
} _u;
int i2;
int i3;
} gui_pen_event_param_struct;
/* <group dom_utility_macro> */
#define GUI_PEN_EVENT_PARAM_SET_VOID(_s) do {_s->type = GUI_PEN_EVENT_PARAM_VOID;} while (0)
/* <group dom_utility_macro> */
#define GUI_PEN_EVENT_PARAM_SET_INTEGER(_s, _i) do {_s->type = GUI_PEN_EVENT_PARAM_INTEGER; \
_s->_u.i = _i; \
} while (0)
/* <group dom_utility_macro> */
#define GUI_PEN_EVENT_PARAM_SET_INTEGER2(_s, _i, _i2) do {_s->type = GUI_PEN_EVENT_PARAM_INTEGER2; \
_s->_u.i = _i; \
_s->i2 = _i2; \
} while (0)
/* <group dom_utility_macro> */
#define GUI_PEN_EVENT_PARAM_SET_INTEGER3(_s, _i, _i2, _i3) do {_s->type = GUI_PEN_EVENT_PARAM_INTEGER3; \
_s->_u.i = _i; \
_s->i2 = _i2; \
_s->i3 = _i3; \
} while (0)
/* <group dom_utility_macro> */
#define GUI_PEN_EVENT_PARAM_SET_POINTER(_s, _p) do {_s->type = GUI_PEN_EVENT_PARAM_POINTER; \
_s->_u.p = _p; \
} while (0)
/* <group dom_utility_macro> */
#define GUI_PEN_EVENT_PARAM_SET_POINTER_INTEGER(_s, _p, _i2) do {_s->type = GUI_PEN_EVENT_PARAM_POINTER_INTEGER; \
_s->_u.p = _p; \
_s->i2 = _i2; \
} while (0)
/* <group dom_utility_macro> */
#define GUI_PEN_EVENT_PARAM_SET_POINTER_INTEGER2(_s, _p, _i2, _i3) do {_s->type = GUI_PEN_EVENT_PARAM_POINTER_INTEGER2; \
_s->_u.p = _p; \
_s->i2 = _i2; \
_s->i3 = _i3; \
} while (0)
#ifdef __cplusplus
}
#endif
#if defined(__MMI_IMAGE_CACHE_FOR_ONE_GDI_LAYER__)
typedef enum
{
GUI_ONE_LAYER_DRAW_BG_WITH_COLOR,
GUI_ONE_LAYER_DRAW_BG_WITH_IMAGE,
GUI_ONE_LAYER_DRAW_BG_WITH_IMAGE_CACHE,
GUI_ONE_LAYER_DRAW_BG_WITH_CALL_BACK_FUNC,
GUI_ONE_LAYER_DRAW_BG_END_OF_ENUM
} gui_one_layer_draw_bg_stage_enum;
extern MMI_ID_TYPE idle_screen_wallpaper_ID;
extern void gui_one_layer_draw_filled_bg_area_with_color(void);
extern void gui_one_layer_draw_filled_bg_area_with_image(void);
extern void gui_one_layer_draw_filled_bg_area_with_image_cache(void);
extern void gui_one_layer_draw_filled_bg_area_exit(void);
extern void gui_one_layer_draw_filled_bg_area_start(void);
extern void gui_one_layer_regist_draw_filled_bg_area_func(void (*draw_func) (S32 x1, S32 y1, S32 x2, S32 y2));
extern void gui_one_layer_draw_filled_bg_area(
S32 x1,
S32 y1,
S32 x2,
S32 y2);
extern void gui_one_layer_draw_filled_bg_area_with_style(
S32 x1,
S32 y1,
S32 x2,
S32 y2,
gui_one_layer_draw_bg_stage_enum draw_style);
extern void test_show_bg(S32 x1,S32 y1,S32 x2,S32 y2); // just for test
/*
to accelerate the preformance when redraw some
small region of whole screen bkg
*/
extern void gui_create_image_cache(
S32 x1,//
S32 y1,
S32 x2,
S32 y2);
extern void gui_draw_image_bmp_cache(
S32 x1,
S32 y1,
S32 x2,
S32 y2);
extern void gui_free_image_cache(void);
#endif /*__MMI_IMAGE_CACHE_FOR_ONE_GDI_LAYER__*/
#if defined(__TOPWELL_MMI_SOFTKEY_TEXT_ALIGEN__)
#if defined(__TOPWELL_MMI_SOFTKEY_TEXT_ALIGEN_1_PIX__)
#define MMI_SOFTKEY_BAR_TEXT_GAP 1
#elif defined(__TOPWELL_MMI_SOFTKEY_TEXT_ALIGEN_2_PIX__)
#define MMI_SOFTKEY_BAR_TEXT_GAP 2
#elif defined(__TOPWELL_MMI_SOFTKEY_TEXT_ALIGEN_3_PIX__)
#define MMI_SOFTKEY_BAR_TEXT_GAP 3
#else
#define MMI_SOFTKEY_BAR_TEXT_GAP 0
#endif
#endif
#endif /* __GUI_H__ */