Compare commits
4422 Commits
Bugzilla_G
...
GTK2_BRANC
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6342ea2aef | ||
|
|
612edbfe49 | ||
|
|
ab1e3d34d5 | ||
|
|
9a0b7264d3 | ||
|
|
2f799fdd72 | ||
|
|
2c73606bd4 | ||
|
|
650be24bf0 | ||
|
|
5314bf2377 | ||
|
|
81aec6bd8e | ||
|
|
4235b4340f | ||
|
|
dbb41e744f | ||
|
|
56cc407dd2 | ||
|
|
5ecef571f3 | ||
|
|
bb00efea5f | ||
|
|
e1293b018e | ||
|
|
74526bc960 | ||
|
|
1789879e75 | ||
|
|
8d19907f79 | ||
|
|
eca0daca42 | ||
|
|
31f311dc28 | ||
|
|
6acc36b071 | ||
|
|
17076aa673 | ||
|
|
9a7a02ee28 | ||
|
|
e9a3b06693 | ||
|
|
2f6be9c679 | ||
|
|
4bcd3069c5 | ||
|
|
3c200f207c | ||
|
|
2dfb1f9ba9 | ||
|
|
3ec231ba9e | ||
|
|
d2cc71b653 | ||
|
|
3a3a1492b1 | ||
|
|
e7eda6ecb5 | ||
|
|
8d6ec47425 | ||
|
|
201c82c2cc | ||
|
|
0383ed809f | ||
|
|
4fc2e5d837 | ||
|
|
7068299b7b | ||
|
|
041958bde0 | ||
|
|
40d9704e41 | ||
|
|
5c207c3d7f | ||
|
|
5ecd9d7755 | ||
|
|
ebc6ec5486 | ||
|
|
08ae36e34b | ||
|
|
c24771d276 | ||
|
|
aa2847b817 | ||
|
|
c221c4c085 | ||
|
|
9ef64c94f4 | ||
|
|
ca3b68231a | ||
|
|
4796f068c7 | ||
|
|
ad2b168c08 | ||
|
|
22a786293e | ||
|
|
cd0b9b2359 | ||
|
|
6925a25d2b | ||
|
|
be64d57ff6 | ||
|
|
8bba3406cf | ||
|
|
99a2ec1923 | ||
|
|
7a8755daba | ||
|
|
75d778a9a8 | ||
|
|
b87005ddaf | ||
|
|
1d65d69394 | ||
|
|
2cdcc5b19e | ||
|
|
76737b8259 | ||
|
|
ac1482fd97 | ||
|
|
aff98ec3d9 | ||
|
|
b5cf363183 | ||
|
|
2784b79499 | ||
|
|
680fd1c8ff | ||
|
|
4f8c1ea3a6 | ||
|
|
3425ada894 | ||
|
|
9491862b87 | ||
|
|
03261b4986 | ||
|
|
0f89a00dfb | ||
|
|
5ee46abb20 | ||
|
|
960c55cb43 | ||
|
|
b29d8bc5fe | ||
|
|
6b8ee0444c | ||
|
|
62279ef20a | ||
|
|
fa84b6274a | ||
|
|
d04650839e | ||
|
|
0f9a34a1db | ||
|
|
707b27bf4e | ||
|
|
fd0b44e632 | ||
|
|
95338302cd | ||
|
|
c3913452f6 | ||
|
|
935c3d6db8 | ||
|
|
19b53a1249 | ||
|
|
d6dfb98e9d | ||
|
|
a764720ab7 | ||
|
|
2337395ba4 | ||
|
|
cf9fd6481c | ||
|
|
86d0ecff6d | ||
|
|
fde354c6a9 | ||
|
|
069219670c | ||
|
|
62c73cd0e6 | ||
|
|
491a51240b | ||
|
|
b81ac527bf | ||
|
|
e5d8b6e1a0 | ||
|
|
b61ac1e76e | ||
|
|
f07c00bdc9 | ||
|
|
7211b45852 | ||
|
|
33121badfe | ||
|
|
90b5568a5d | ||
|
|
05b6357bfa | ||
|
|
5eb4e3be11 | ||
|
|
f6723b0a97 | ||
|
|
4b90db978f | ||
|
|
1c0bf9e4d5 | ||
|
|
8e74c502fd | ||
|
|
02b4150295 | ||
|
|
12e19f1e39 | ||
|
|
57295d6507 | ||
|
|
82a3161113 | ||
|
|
a7f5ff965f | ||
|
|
dcf0b0b880 | ||
|
|
d3d1f630c6 | ||
|
|
2ac90a394f | ||
|
|
2867e3c9b7 | ||
|
|
0ffa79b3fc | ||
|
|
bebd4a8456 | ||
|
|
82d4f6351a | ||
|
|
702ba5824b | ||
|
|
8705e5927c | ||
|
|
6f97248f04 | ||
|
|
df45bf85c8 | ||
|
|
5294622997 | ||
|
|
f475c1b95a | ||
|
|
56d3168d3b | ||
|
|
56db06291d | ||
|
|
5f59a7f7c9 | ||
|
|
765b9b8478 | ||
|
|
7641a5fe9e | ||
|
|
31eb34c6c9 | ||
|
|
d4c9402114 | ||
|
|
71667da74b | ||
|
|
35158043a6 | ||
|
|
22c6131b1c | ||
|
|
bcd2e1bc81 | ||
|
|
6c65f2a8f3 | ||
|
|
ceee5ad10d | ||
|
|
672ef24672 | ||
|
|
7ae978edf3 | ||
|
|
3b10829097 | ||
|
|
418950129c | ||
|
|
f1274efa1d | ||
|
|
553441aa4a | ||
|
|
38031f0402 | ||
|
|
789f2defb4 | ||
|
|
d06125755d | ||
|
|
e638e38336 | ||
|
|
a9308f6d58 | ||
|
|
cddd354756 | ||
|
|
6cd5066da3 | ||
|
|
9f19a943a2 | ||
|
|
78157b67e7 | ||
|
|
e6679a3be4 | ||
|
|
bf3150fa5b | ||
|
|
85f633cd64 | ||
|
|
b601525057 | ||
|
|
67d58a4b94 | ||
|
|
10615a6f15 | ||
|
|
0c05cc6914 | ||
|
|
2b694a6e37 | ||
|
|
28f877330a | ||
|
|
5f33a51792 | ||
|
|
805c50bab2 | ||
|
|
b87627d071 | ||
|
|
f3b808bdf3 | ||
|
|
893605a066 | ||
|
|
6438794986 | ||
|
|
ee9394c3ba | ||
|
|
1174e8e035 | ||
|
|
aea1de05df | ||
|
|
3a19ed2019 | ||
|
|
9fb5fed55b | ||
|
|
9d63515426 | ||
|
|
4ac18164e3 | ||
|
|
8f14b53954 | ||
|
|
84207de06a | ||
|
|
865e4ed64a | ||
|
|
f0e007cdfc | ||
|
|
16677aa346 | ||
|
|
6972441d43 | ||
|
|
4340fe524d | ||
|
|
10b75e686e | ||
|
|
a0a3bba38f | ||
|
|
63c4896929 | ||
|
|
0749c9e0e6 | ||
|
|
763dd8095d | ||
|
|
6a8cf7679a | ||
|
|
7ea34596bb | ||
|
|
0edbd55782 | ||
|
|
bb05524539 | ||
|
|
8080aadf09 | ||
|
|
49c1025d50 | ||
|
|
db023e6295 | ||
|
|
764654ae65 | ||
|
|
54e0f526d0 | ||
|
|
5ae73ca7b1 | ||
|
|
05e43f5620 | ||
|
|
fa733a7bbe | ||
|
|
fdab0661dd | ||
|
|
7ba2e58713 | ||
|
|
91e2a14e0f | ||
|
|
495b2a984a | ||
|
|
f6776f3e37 | ||
|
|
9d95c45a61 | ||
|
|
57b77286d2 | ||
|
|
78627c8fc6 | ||
|
|
4465eca738 | ||
|
|
cd65875636 | ||
|
|
07d1aed3b1 | ||
|
|
85980b3c4a | ||
|
|
9f23c83c58 | ||
|
|
c3644a3bee | ||
|
|
02b9e2d529 | ||
|
|
acb5339665 | ||
|
|
115169208a | ||
|
|
ef3b20d931 | ||
|
|
e3adb86450 | ||
|
|
8f796b42ef | ||
|
|
5dfe963422 | ||
|
|
c94020b3da | ||
|
|
59b304bce0 | ||
|
|
c32da4d4f5 | ||
|
|
08199e8c62 | ||
|
|
26a9ef64b1 | ||
|
|
e61b0b8a71 | ||
|
|
2af10dd8ec | ||
|
|
da76edeb34 | ||
|
|
99e64ff6d9 | ||
|
|
9a2d8a8068 | ||
|
|
fd1d92a93d | ||
|
|
5c83adb01f | ||
|
|
106ee56530 | ||
|
|
92bfe8753c | ||
|
|
b5851dd0fb | ||
|
|
020dc70554 | ||
|
|
92349898c8 | ||
|
|
7c662a4696 | ||
|
|
bfe2c85e5b | ||
|
|
4bbb7aaef3 | ||
|
|
3fad341d3d | ||
|
|
dd398c8c26 | ||
|
|
8efb95530d | ||
|
|
71da3c517b | ||
|
|
c2804a94df | ||
|
|
834721d540 | ||
|
|
0f2ad45d57 | ||
|
|
8f002dba27 | ||
|
|
a7aea2a7d6 | ||
|
|
5b26fee390 | ||
|
|
0bfc737416 | ||
|
|
63e76f94e8 | ||
|
|
509ce4059f | ||
|
|
a86298e66b | ||
|
|
240013212c | ||
|
|
e44c69ea26 | ||
|
|
d8b59ec2b9 | ||
|
|
2f4c8eecf7 | ||
|
|
acd64b8c12 | ||
|
|
58cb3db0bc | ||
|
|
b09f4e3c33 | ||
|
|
8dc9239d3d | ||
|
|
d4a092d480 | ||
|
|
8c9d094a98 | ||
|
|
2c90d84d6d | ||
|
|
430686b3ac | ||
|
|
715efbd04f | ||
|
|
7629ade22b | ||
|
|
494e0107d0 | ||
|
|
a78bf20392 | ||
|
|
056a1f1c22 | ||
|
|
9e90fd1474 | ||
|
|
56956d2a21 | ||
|
|
02076e4267 | ||
|
|
23ac795aea | ||
|
|
4d8d69c021 | ||
|
|
a39f05bb38 | ||
|
|
be782d1e51 | ||
|
|
0e4ed82886 | ||
|
|
3db2c2bdfb | ||
|
|
3957b4457e | ||
|
|
d34792caa9 | ||
|
|
117883ff09 | ||
|
|
afd0870f33 | ||
|
|
9ce0b02459 | ||
|
|
4323993fd8 | ||
|
|
e32bcea771 | ||
|
|
afe7635f3c | ||
|
|
bd0b381197 | ||
|
|
ee3bad7608 | ||
|
|
2eaf7eb4f1 | ||
|
|
0e466ece60 | ||
|
|
b0aea8f95a | ||
|
|
a02a22d5e1 | ||
|
|
779a775e02 | ||
|
|
3883166002 | ||
|
|
cd42033d11 | ||
|
|
d2bc486a83 | ||
|
|
f1ae89bd76 | ||
|
|
03c727b10a | ||
|
|
898a53388e | ||
|
|
5fe73517c2 | ||
|
|
1e7c4c726b | ||
|
|
95f2eab17e | ||
|
|
f6341b4290 | ||
|
|
ee3a6d6fd8 | ||
|
|
be53614e41 | ||
|
|
31cd0c72b8 | ||
|
|
0f1370df3b | ||
|
|
9c8edbca5e | ||
|
|
ec9006ed1a | ||
|
|
d0aa803d0e | ||
|
|
c86c67c408 | ||
|
|
05aae283e6 | ||
|
|
58366cbd9b | ||
|
|
c6c3fccd5a | ||
|
|
ba3e8be820 | ||
|
|
8c99a7cfd2 | ||
|
|
c5d3109d91 | ||
|
|
4011d640c0 | ||
|
|
f3f0a1435b | ||
|
|
0e028bc5bf | ||
|
|
97b505b95b | ||
|
|
441b12b5b8 | ||
|
|
f1f8189502 | ||
|
|
b21a28d756 | ||
|
|
6fa7148f5c | ||
|
|
f5ca579709 | ||
|
|
69f304d8ad | ||
|
|
f4ff6b016e | ||
|
|
21a5c77ebb | ||
|
|
53b62b7633 | ||
|
|
5307dae965 | ||
|
|
2ba0a37939 | ||
|
|
4d00a4d9b7 | ||
|
|
2d3b887013 | ||
|
|
779d9368ff | ||
|
|
b24274d903 | ||
|
|
dda61126d2 | ||
|
|
cef6451728 | ||
|
|
d230f8b5f6 | ||
|
|
8c421d4eca | ||
|
|
fd146b6d5e | ||
|
|
ca28abf3b3 | ||
|
|
d124df98dc | ||
|
|
761d68a777 | ||
|
|
2dae25869d | ||
|
|
0c97853021 | ||
|
|
b80293dbc6 | ||
|
|
05de033310 | ||
|
|
894fec0d5f | ||
|
|
da3fec2b4b | ||
|
|
3d5f73b579 | ||
|
|
17c52c2c78 | ||
|
|
8d809ca7b6 | ||
|
|
a2ea6d4987 | ||
|
|
4a909d9540 | ||
|
|
186dfb2ac9 | ||
|
|
920f5d76da | ||
|
|
a23e4a9efc | ||
|
|
ba8ce87b2f | ||
|
|
ceb91748c9 | ||
|
|
31a6612b88 | ||
|
|
b2f8754193 | ||
|
|
d024232d2d | ||
|
|
ea3e2e7c96 | ||
|
|
0f125a0aff | ||
|
|
aaa5718f74 | ||
|
|
2a71c4da3b | ||
|
|
fef17167b1 | ||
|
|
33493ef450 | ||
|
|
7a24858133 | ||
|
|
45b310844b | ||
|
|
034db8f206 | ||
|
|
1617fcb71c | ||
|
|
c3560e479f | ||
|
|
8e3ecc61a2 | ||
|
|
95f5f98f85 | ||
|
|
cfa95ffa7e | ||
|
|
a81afa51f3 | ||
|
|
846071ee39 | ||
|
|
aae2bb425e | ||
|
|
6c97ab4824 | ||
|
|
65998a9b2c | ||
|
|
271a10a703 | ||
|
|
bb64ba75ac | ||
|
|
8297fba10b | ||
|
|
f862f4e790 | ||
|
|
edf25fe5cd | ||
|
|
2fb6462521 | ||
|
|
29d3f67dae | ||
|
|
57cf280c62 | ||
|
|
3ee4af413c | ||
|
|
1991f7a978 | ||
|
|
07d9bb2d4b | ||
|
|
c1e495934f | ||
|
|
029a8691e9 | ||
|
|
024bbe7baa | ||
|
|
0991672678 | ||
|
|
b877355b74 | ||
|
|
7e603c2835 | ||
|
|
18de62a67a | ||
|
|
df8173369a | ||
|
|
422597cbbb | ||
|
|
8fcbf1b095 | ||
|
|
9a95a2e931 | ||
|
|
f15e3a832c | ||
|
|
3ca3632926 | ||
|
|
f923afa8bf | ||
|
|
1b4e59414d | ||
|
|
a421593cf2 | ||
|
|
44a11923d1 | ||
|
|
a297014811 | ||
|
|
708ecae459 | ||
|
|
ce2a82ca0c | ||
|
|
2f34cfbe34 | ||
|
|
898fdc16a9 | ||
|
|
4d93f82379 | ||
|
|
525bcc3d53 | ||
|
|
9389ef38e6 | ||
|
|
38737c4335 | ||
|
|
d1b6dfb903 | ||
|
|
f3aedd9073 | ||
|
|
8195d9576f | ||
|
|
a657bcfc05 | ||
|
|
ea31156ed0 | ||
|
|
e988595605 | ||
|
|
486cb07a88 | ||
|
|
de696ad435 | ||
|
|
d432b61362 | ||
|
|
782f1fb418 | ||
|
|
f3c4689b67 | ||
|
|
399946290d | ||
|
|
3b68bd2318 | ||
|
|
1a56c0aa7d | ||
|
|
ec249a518b | ||
|
|
1813beed6b | ||
|
|
23a8b301aa | ||
|
|
78490febf5 | ||
|
|
9d979e2187 | ||
|
|
59c63dba70 | ||
|
|
d753d74fc9 | ||
|
|
5ef0d8bd14 | ||
|
|
72a8b46e4a | ||
|
|
fdbf86a6e5 | ||
|
|
e7df00783f | ||
|
|
1b26f8bbc6 | ||
|
|
4855974f4d | ||
|
|
0d2707afd4 | ||
|
|
93d8a62d99 | ||
|
|
10f1b45420 | ||
|
|
7ecbff8464 | ||
|
|
1f7c258c4c | ||
|
|
b2aaec10f6 | ||
|
|
1b6cfcbc13 | ||
|
|
f360a4a28e | ||
|
|
05b6bbf20c | ||
|
|
88355790a7 | ||
|
|
d6aa73e274 | ||
|
|
a39df7b0a5 | ||
|
|
2bd466825a | ||
|
|
9e12988e78 | ||
|
|
1768676137 | ||
|
|
e26b828b6a | ||
|
|
e6fbcc6ced | ||
|
|
18b97b7a4c | ||
|
|
031dee4c73 | ||
|
|
ab21e79f51 | ||
|
|
6978a23290 | ||
|
|
a6159e518f | ||
|
|
8784526667 | ||
|
|
499653b4e0 | ||
|
|
35300582df | ||
|
|
526904761f | ||
|
|
307538c3e3 | ||
|
|
6644445ed3 | ||
|
|
21d09daea7 | ||
|
|
5c8b961ba4 | ||
|
|
fd182171b1 | ||
|
|
01479ff578 | ||
|
|
aebb8f7c06 | ||
|
|
380edd4af3 | ||
|
|
f071fe9f2c | ||
|
|
153132265a | ||
|
|
4950e2213f | ||
|
|
8ca1a4cdc8 | ||
|
|
ecb20fc642 | ||
|
|
f80ab46be4 | ||
|
|
33091cf772 | ||
|
|
f90ef7992e | ||
|
|
768c73848e | ||
|
|
15ae9934f3 | ||
|
|
7546fa2175 | ||
|
|
05c3bf437f | ||
|
|
ce096ce41e | ||
|
|
eeb370541a | ||
|
|
e4a9e6382d | ||
|
|
9521a5baac | ||
|
|
c264cfec89 | ||
|
|
0a3b34410d | ||
|
|
598d5796c6 | ||
|
|
9c4a2159b6 | ||
|
|
d10de70251 | ||
|
|
76242faffd | ||
|
|
33129ce5b8 | ||
|
|
f4ab16eebb | ||
|
|
f4e92c7de7 | ||
|
|
c8aee18aeb | ||
|
|
df9d617a7a | ||
|
|
c7c4bdf859 | ||
|
|
fa4baaf863 | ||
|
|
f7f146a583 | ||
|
|
1b8e7e1b7a | ||
|
|
255597de45 | ||
|
|
ba95ef2e98 | ||
|
|
95158582d6 | ||
|
|
ccc2a91b66 | ||
|
|
841f2009de | ||
|
|
78612453d2 | ||
|
|
c98a4807b2 | ||
|
|
3fbbdaa0db | ||
|
|
97ffb47229 | ||
|
|
18af40ed41 | ||
|
|
fde611be88 | ||
|
|
2531b4ded1 | ||
|
|
be41a6dbba | ||
|
|
83f7cb4f36 | ||
|
|
4ac1110065 | ||
|
|
e91823638e | ||
|
|
5971d227ad | ||
|
|
3062b0e3b5 | ||
|
|
7757adc8c0 | ||
|
|
a2eca3ef51 | ||
|
|
0575435ca2 | ||
|
|
dd695f59c6 | ||
|
|
b7de1b681f | ||
|
|
caa1fd0f57 | ||
|
|
5bba6cc807 | ||
|
|
bed5a07b00 | ||
|
|
e16fd8fc14 | ||
|
|
7722497eab | ||
|
|
c07931f291 | ||
|
|
e1787a8cdf | ||
|
|
c2d17c7692 | ||
|
|
46c916b18c | ||
|
|
c3ba209a21 | ||
|
|
8f8ebb89a2 | ||
|
|
526b3dfa82 | ||
|
|
243a85796b | ||
|
|
4c5448237b | ||
|
|
76a6e6807e | ||
|
|
a3d09ee5e6 | ||
|
|
1652880107 | ||
|
|
997c2b8ad2 | ||
|
|
ea6ab891de | ||
|
|
706b57b41f | ||
|
|
56204bf958 | ||
|
|
c71cbd5329 | ||
|
|
6d4cf38d0c | ||
|
|
901fad79e0 | ||
|
|
7044e8eccf | ||
|
|
d161f762c5 | ||
|
|
2d30bd6ad1 | ||
|
|
3a6a87c143 | ||
|
|
049ebac0d8 | ||
|
|
47490c5561 | ||
|
|
ef6f78e3cf | ||
|
|
ed70d129b9 | ||
|
|
2b35a79913 | ||
|
|
f474145254 | ||
|
|
b9bc6dc02e | ||
|
|
ea048297b6 | ||
|
|
c8355dadaf | ||
|
|
fd8e16ea93 | ||
|
|
7a9d642ace | ||
|
|
b6116fc576 | ||
|
|
99d6b1db75 | ||
|
|
41121f3550 | ||
|
|
69da9f8a57 | ||
|
|
cc009a0f69 | ||
|
|
b0b0b55921 | ||
|
|
ea5416929e | ||
|
|
26c0d7a35b | ||
|
|
28995dfed9 | ||
|
|
0206c2babf | ||
|
|
33e4698aeb | ||
|
|
9f16d21d3e | ||
|
|
042dd90c2f | ||
|
|
a09d52fa13 | ||
|
|
e4d842c387 | ||
|
|
de3ab61152 | ||
|
|
2f5b7a3b1a | ||
|
|
5e7ce75480 | ||
|
|
05e10a2919 | ||
|
|
539faeabfc | ||
|
|
59311cf7e6 | ||
|
|
a682227c6c | ||
|
|
96f0200194 | ||
|
|
01a246e76f | ||
|
|
5b5fdeed0b | ||
|
|
9770d6854e | ||
|
|
953952c8ec | ||
|
|
e59e6276ae | ||
|
|
f34e725653 | ||
|
|
b35c90f856 | ||
|
|
10bfde9604 | ||
|
|
f712b4870e | ||
|
|
df74258b9a | ||
|
|
39059cb173 | ||
|
|
c1caa500c8 | ||
|
|
aff55af106 | ||
|
|
773e92d74f | ||
|
|
86506e2239 | ||
|
|
8c2aaf40c9 | ||
|
|
9de532d67f | ||
|
|
e1d226f0c4 | ||
|
|
4e37f2f108 | ||
|
|
04a2ce8ce9 | ||
|
|
911e370581 | ||
|
|
74bbdddac8 | ||
|
|
933e7b6feb | ||
|
|
36ec67a6b0 | ||
|
|
dca9356b95 | ||
|
|
5a93fdeaae | ||
|
|
cb34e417ed | ||
|
|
6b92efb416 | ||
|
|
4f867accb0 | ||
|
|
e277a296ca | ||
|
|
173c74bc00 | ||
|
|
3c250b18ef | ||
|
|
8174569821 | ||
|
|
8dbb385e2b | ||
|
|
0938408b74 | ||
|
|
a16ac6d4e6 | ||
|
|
22dde4fd86 | ||
|
|
878f698643 | ||
|
|
e9dd704861 | ||
|
|
b3949a7795 | ||
|
|
c75fb2e609 | ||
|
|
535f382182 | ||
|
|
39778a4e97 | ||
|
|
9713142f08 | ||
|
|
71baca7741 | ||
|
|
f173c6ca4a | ||
|
|
9edc6ab7cd | ||
|
|
a6546f5e07 | ||
|
|
e51cc6d0d4 | ||
|
|
eee97623a2 | ||
|
|
65b28b845b | ||
|
|
6daeb0eccd | ||
|
|
742b2ad24c | ||
|
|
febf147890 | ||
|
|
c6dfa1c2e5 | ||
|
|
e42a6a8015 | ||
|
|
cb68682f50 | ||
|
|
50dd3c75e1 | ||
|
|
4d279bc83d | ||
|
|
1c57b2f405 | ||
|
|
de7af3febc | ||
|
|
6d198dcb71 | ||
|
|
3e4c0e18ba | ||
|
|
af84479b7f | ||
|
|
907bfd4b43 | ||
|
|
be7f6fec6f | ||
|
|
144603d86b | ||
|
|
732ef51aa6 | ||
|
|
71d7c5ce1e | ||
|
|
df2c1953c2 | ||
|
|
474dee8e7e | ||
|
|
13b4696963 | ||
|
|
90bea81de4 | ||
|
|
791b8f8815 | ||
|
|
36674c2aa9 | ||
|
|
142736ab88 | ||
|
|
1aa60fb4e0 | ||
|
|
76ef75c38d | ||
|
|
25d2355cf2 | ||
|
|
46b566f137 | ||
|
|
f085618d80 | ||
|
|
50a3d322a0 | ||
|
|
b33a159e20 | ||
|
|
d63af5a235 | ||
|
|
bdaaf345ff | ||
|
|
b03b50e42f | ||
|
|
14e718e28b | ||
|
|
8da471c989 | ||
|
|
09bf9a2fcc | ||
|
|
019de29c98 | ||
|
|
b171cd8e07 | ||
|
|
f881da92b7 | ||
|
|
26792f7cf9 | ||
|
|
2a9bbedb17 | ||
|
|
3272fa4c5c | ||
|
|
701eccd8dd | ||
|
|
eacfa3cc72 | ||
|
|
e773556844 | ||
|
|
c2b99b4b84 | ||
|
|
3f4dd665cc | ||
|
|
f6d3d22234 | ||
|
|
58957484ec | ||
|
|
05a135ab75 | ||
|
|
98ad565e5d | ||
|
|
8897c8f5b7 | ||
|
|
86c348424e | ||
|
|
ccd8863b50 | ||
|
|
04deaf61bb | ||
|
|
552180e203 | ||
|
|
ff153755d1 | ||
|
|
ba5c4f48d6 | ||
|
|
7ad50ae058 | ||
|
|
b850375269 | ||
|
|
76c868f8dd | ||
|
|
4077dca276 | ||
|
|
5028888db3 | ||
|
|
54d20fa229 | ||
|
|
14761c5446 | ||
|
|
509eb97f42 | ||
|
|
304d38021f | ||
|
|
c834c500ad | ||
|
|
ed3253d4de | ||
|
|
e4f0bdfca7 | ||
|
|
2b0db8fe58 | ||
|
|
71c2917a5d | ||
|
|
65dbc8c4a4 | ||
|
|
0137943f93 | ||
|
|
b22b10b32f | ||
|
|
5639df86ad | ||
|
|
813522188b | ||
|
|
d327fd1732 | ||
|
|
6869be649b | ||
|
|
ba490e401c | ||
|
|
2c2291ce22 | ||
|
|
f1eddd2914 | ||
|
|
6024d4c542 | ||
|
|
bdc70a8648 | ||
|
|
f8241bac3f | ||
|
|
ecf24b72ac | ||
|
|
df519303fc | ||
|
|
e5bd1b0b77 | ||
|
|
a46e1425db | ||
|
|
011bef36e2 | ||
|
|
a8960cf935 | ||
|
|
01319c548d | ||
|
|
c059175b3b | ||
|
|
e1d9947f79 | ||
|
|
9776968a62 | ||
|
|
73fddcaeb9 | ||
|
|
281c733d8f | ||
|
|
480f11cfc6 | ||
|
|
09da2848bc | ||
|
|
157972cddd | ||
|
|
30849ae9b9 | ||
|
|
1e425e7a22 | ||
|
|
91700a3fd7 | ||
|
|
8252b6de9f | ||
|
|
e8852e32ae | ||
|
|
25e3e17fa8 | ||
|
|
0309643e19 | ||
|
|
5124d29644 | ||
|
|
d7044d9fdc | ||
|
|
dc9a9c3dee | ||
|
|
c27a6e5599 | ||
|
|
c3910e9312 | ||
|
|
97874b1875 | ||
|
|
58178a3dc7 | ||
|
|
cda764c061 | ||
|
|
15c424d31a | ||
|
|
9cf56b14c2 | ||
|
|
9614cbd4d9 | ||
|
|
901f0df3ef | ||
|
|
06ca088c58 | ||
|
|
d61789ab8b | ||
|
|
131bb3dd4e | ||
|
|
416968bb0a | ||
|
|
e595c7ba44 | ||
|
|
affbe9c421 | ||
|
|
efceeab44e | ||
|
|
1d97ff8571 | ||
|
|
063768d26a | ||
|
|
bd95b315fa | ||
|
|
e72c8455d0 | ||
|
|
5401810d32 | ||
|
|
9436922d2d | ||
|
|
b152ba9386 | ||
|
|
f93340af68 | ||
|
|
faebf5f2d1 | ||
|
|
1d0f7aa07d | ||
|
|
d07f537d7f | ||
|
|
c43b7ba2cf | ||
|
|
5adc307dfd | ||
|
|
0b3708e6ce | ||
|
|
8310b2caa2 | ||
|
|
545ce50e1e | ||
|
|
3261839ac2 | ||
|
|
09a05b6179 | ||
|
|
82ac06c158 | ||
|
|
56cc8b899d | ||
|
|
f55ba474d3 | ||
|
|
3fddc3c879 | ||
|
|
476668ebbc | ||
|
|
c1bc619e9b | ||
|
|
7bd003b61f | ||
|
|
3cced226e6 | ||
|
|
b88b48076c | ||
|
|
2ba1541624 | ||
|
|
54f468af25 | ||
|
|
212f8a0aaa | ||
|
|
3bdbe7adbe | ||
|
|
0a2e6683fa | ||
|
|
424395925f | ||
|
|
2c2796da25 | ||
|
|
0adc398def | ||
|
|
e55c2dfd10 | ||
|
|
6b6aeec6f0 | ||
|
|
b085c89dc3 | ||
|
|
c5ef9299d5 | ||
|
|
2b22d9bb8f | ||
|
|
073151bba7 | ||
|
|
7a9dc66195 | ||
|
|
0778de0a3a | ||
|
|
e46a7dedc4 | ||
|
|
536931574c | ||
|
|
d446a7539b | ||
|
|
727d4d6882 | ||
|
|
5d66f7f370 | ||
|
|
9977d3af86 | ||
|
|
c1e6f4c81c | ||
|
|
9a1db829fc | ||
|
|
c819a25314 | ||
|
|
c7f65fb0ea | ||
|
|
d040ba44c1 | ||
|
|
3c1b765e99 | ||
|
|
851dedb626 | ||
|
|
ab311ba5fb | ||
|
|
93942f465e | ||
|
|
a02c60f7f8 | ||
|
|
7a38a8af9d | ||
|
|
9fbb0ab01d | ||
|
|
a971e57847 | ||
|
|
bec120996e | ||
|
|
dbfc30244c | ||
|
|
1444918e60 | ||
|
|
58ecf90495 | ||
|
|
b10b1e8a0f | ||
|
|
d888537e65 | ||
|
|
9c1b77c407 | ||
|
|
45fc07a428 | ||
|
|
f9449b0c2f | ||
|
|
15e92737fd | ||
|
|
e9cfdf4cd2 | ||
|
|
3d2587b3bb | ||
|
|
a369729854 | ||
|
|
cd1a4caf6d | ||
|
|
cc2e24de1e | ||
|
|
0830595197 | ||
|
|
674528c349 | ||
|
|
aeeefa658b | ||
|
|
d8b6d8a043 | ||
|
|
86d0fabf89 | ||
|
|
12b1cb7058 | ||
|
|
40a129a515 | ||
|
|
df90b5c914 | ||
|
|
423908e3e5 | ||
|
|
3aff0bf32e | ||
|
|
681d008853 | ||
|
|
5f3c1a0733 | ||
|
|
a46e1132e1 | ||
|
|
6b5bff699c | ||
|
|
38aa2bbb0e | ||
|
|
64e1b04caa | ||
|
|
8546377990 | ||
|
|
b6d117e01a | ||
|
|
3ab4f0cfd4 | ||
|
|
92d8e22155 | ||
|
|
2e157b2b2a | ||
|
|
12ab2a809c | ||
|
|
b400c8770b | ||
|
|
e88363059c | ||
|
|
ff1ad03f68 | ||
|
|
b0e0e6d031 | ||
|
|
b24a359d13 | ||
|
|
4bebde40b5 | ||
|
|
69d6b65467 | ||
|
|
10030f36c5 | ||
|
|
83e05b8638 | ||
|
|
741a62007e | ||
|
|
347228b64b | ||
|
|
41be4da11e | ||
|
|
51b3d234ba | ||
|
|
8ec8052205 | ||
|
|
56fa4da1b2 | ||
|
|
b80c821e21 | ||
|
|
78161c233d | ||
|
|
e370b60f7c | ||
|
|
4f0e930262 | ||
|
|
5d585186dd | ||
|
|
e62ed2cbd9 | ||
|
|
b7194a0ea8 | ||
|
|
845f74be1e | ||
|
|
5256f3a677 | ||
|
|
7b44b522f3 | ||
|
|
488314352a | ||
|
|
aea8efff9b | ||
|
|
c102e73bba | ||
|
|
5d02ce1715 | ||
|
|
779d00d083 | ||
|
|
a12d7d8878 | ||
|
|
6e45ee8056 | ||
|
|
0c560deee1 | ||
|
|
92eedca45b | ||
|
|
dc6c6834e3 | ||
|
|
30e10e45f7 | ||
|
|
27311e50b1 | ||
|
|
cee1c73b9c | ||
|
|
307acc5506 | ||
|
|
56614d13fa | ||
|
|
a3cbbd09f1 | ||
|
|
021c9dac7f | ||
|
|
85e8f1ab7c | ||
|
|
49dcb029f4 | ||
|
|
be5ad9fd5a | ||
|
|
d7b20dbc43 | ||
|
|
804f5291cc | ||
|
|
69c8d142b8 | ||
|
|
f2ff5fcec4 | ||
|
|
5acb045996 | ||
|
|
83bed63477 | ||
|
|
97955a9d5d | ||
|
|
8d5ceddf30 | ||
|
|
a35d3f551e | ||
|
|
d2eb40a48d | ||
|
|
436a7fe313 | ||
|
|
03302aa66f | ||
|
|
8983e327da | ||
|
|
1874f61f5a | ||
|
|
4242afb36c | ||
|
|
a94513b02e | ||
|
|
7432d9b145 | ||
|
|
fa80c1da59 | ||
|
|
71e58808d0 | ||
|
|
110782faac | ||
|
|
de290ed289 | ||
|
|
aedf2a91ed | ||
|
|
fe1ce96e45 | ||
|
|
03df1cdb45 | ||
|
|
9fffba3f2b | ||
|
|
e87b893851 | ||
|
|
4ce39a230a | ||
|
|
fcee1f964f | ||
|
|
7a64f138ef | ||
|
|
88ddfc7837 | ||
|
|
58f556187d | ||
|
|
2fb4fefee6 | ||
|
|
785de1f5f1 | ||
|
|
025f414842 | ||
|
|
ba011ecd80 | ||
|
|
4a32ed3c58 | ||
|
|
df47257748 | ||
|
|
2fa512bd41 | ||
|
|
0422baf3d0 | ||
|
|
b9cbc12297 | ||
|
|
bc412613aa | ||
|
|
506f3553af | ||
|
|
4ca20503dd | ||
|
|
475c549113 | ||
|
|
2e5e8c3344 | ||
|
|
191b56fa8a | ||
|
|
0e9567a214 | ||
|
|
de8e5658f6 | ||
|
|
d8f9c1b0ed | ||
|
|
d2db2e6c2a | ||
|
|
d126626bbc | ||
|
|
02941169ac | ||
|
|
37c79ab46e | ||
|
|
cb30897198 | ||
|
|
c14ca63dfd | ||
|
|
335852fdea | ||
|
|
7b1567e204 | ||
|
|
6f86892c01 | ||
|
|
2a6da66ff1 | ||
|
|
b07ad62172 | ||
|
|
818efacd35 | ||
|
|
b35520e67c | ||
|
|
97dc09f2ea | ||
|
|
65120036dc | ||
|
|
a16848c716 | ||
|
|
799b4588b8 | ||
|
|
e149e57952 | ||
|
|
75ff2da8f4 | ||
|
|
9f55bebd67 | ||
|
|
8c7b440184 | ||
|
|
5d9a89f460 | ||
|
|
4eeea60a15 | ||
|
|
f202c7cabc | ||
|
|
72bf32c474 | ||
|
|
87d7aa496f | ||
|
|
e3845dec0a | ||
|
|
1f86b34242 | ||
|
|
86d5153e6f | ||
|
|
995bc01e11 | ||
|
|
c9a5559ce7 | ||
|
|
dcc11e948b | ||
|
|
94dbe34d4c | ||
|
|
f4994efe5d | ||
|
|
432bf17b0a | ||
|
|
264958aeb0 | ||
|
|
8ed86c9b32 | ||
|
|
b84aa94c0f | ||
|
|
22f38522fe | ||
|
|
4bb12098b3 | ||
|
|
6357150a06 | ||
|
|
6025b413ef | ||
|
|
0a46e39c28 | ||
|
|
c207d180fa | ||
|
|
26d4a25466 | ||
|
|
ed38273505 | ||
|
|
e3c0cb6448 | ||
|
|
c10e896fe9 | ||
|
|
d1382b9071 | ||
|
|
3a31fba4c6 | ||
|
|
397daff924 | ||
|
|
ff1fd4b712 | ||
|
|
92ab32c671 | ||
|
|
20a107cb2f | ||
|
|
78e80f4cc4 | ||
|
|
3ba0353391 | ||
|
|
dab655a7b4 | ||
|
|
479a18174b | ||
|
|
4972f28b68 | ||
|
|
da553df4db | ||
|
|
f2dd7b1cbf | ||
|
|
6b88b9a6c7 | ||
|
|
3d7f207cf9 | ||
|
|
b17f404b84 | ||
|
|
bb3fedc7d7 | ||
|
|
529b1b3d30 | ||
|
|
4776211b92 | ||
|
|
baac6c13bd | ||
|
|
97ff040547 | ||
|
|
4335bb8b1d | ||
|
|
aae396f8f6 | ||
|
|
00a0bd35b2 | ||
|
|
be8b031465 | ||
|
|
b78c7e1112 | ||
|
|
352af44feb | ||
|
|
02b78fef78 | ||
|
|
f18dd09b71 | ||
|
|
63eddaafb9 | ||
|
|
594c536e31 | ||
|
|
beec915215 | ||
|
|
f39c6bf178 | ||
|
|
f6e21102ba | ||
|
|
e19197ff68 | ||
|
|
d69c8b61af | ||
|
|
88b8616fc4 | ||
|
|
d43d232705 | ||
|
|
2cc46377d6 | ||
|
|
63af87aec1 | ||
|
|
4c25db3f8a | ||
|
|
d6869f712e | ||
|
|
e1de2e506a | ||
|
|
e25807192e | ||
|
|
fb7d98af36 | ||
|
|
2e88971c9c | ||
|
|
320e4e298d | ||
|
|
71aae56596 | ||
|
|
cafe13748f | ||
|
|
8121e60402 | ||
|
|
d9701dfce5 | ||
|
|
344a6cf3f9 | ||
|
|
c2e1a63645 | ||
|
|
8bec22cce2 | ||
|
|
35b74aef86 | ||
|
|
35b346c868 | ||
|
|
93f5c80abc | ||
|
|
b986c9fa14 | ||
|
|
cc27ea5ad0 | ||
|
|
4eb4e379df | ||
|
|
c3b30c1a7b | ||
|
|
8fca81ddfe | ||
|
|
81253a9e8c | ||
|
|
7d46a14e09 | ||
|
|
f1dce49889 | ||
|
|
568601718b | ||
|
|
f404ef1779 | ||
|
|
e4e2a1571e | ||
|
|
445330b9db | ||
|
|
28b2b70882 | ||
|
|
7762bef97e | ||
|
|
52cc9b8b36 | ||
|
|
f85961a3de | ||
|
|
77a48bf25c | ||
|
|
e74961dbe2 | ||
|
|
3d58211329 | ||
|
|
acb4221efb | ||
|
|
e90ffa39eb | ||
|
|
f308140176 | ||
|
|
73f65f0367 | ||
|
|
111ad2ac93 | ||
|
|
8433305171 | ||
|
|
658087c332 | ||
|
|
9826f1c424 | ||
|
|
2ca048b06c | ||
|
|
38b0c7a252 | ||
|
|
d82d0e7dd4 | ||
|
|
0b13347cd9 | ||
|
|
c03739bfda | ||
|
|
f8c3b8bc4f | ||
|
|
1ab8c545d5 | ||
|
|
b4df3e5556 | ||
|
|
2ebc271800 | ||
|
|
a3160b1622 | ||
|
|
f1521cf3b8 | ||
|
|
a2811b3355 | ||
|
|
60333230e7 | ||
|
|
9f1dbd88de | ||
|
|
eb0a8c073b | ||
|
|
e2c49cc851 | ||
|
|
592fd817bb | ||
|
|
b1981c46eb | ||
|
|
c0e067e7da | ||
|
|
8dc6e7c11c | ||
|
|
6f56f8ad09 | ||
|
|
b1bf161f3d | ||
|
|
cd186fbd1b | ||
|
|
397de3cbe8 | ||
|
|
92ba6a0504 | ||
|
|
da48fd5fbd | ||
|
|
eaf1dd389b | ||
|
|
db0656a442 | ||
|
|
ccc375abaa | ||
|
|
7b2abfe491 | ||
|
|
a2adcad7fc | ||
|
|
b0a4ee9a27 | ||
|
|
889bd1894a | ||
|
|
2e60cd080a | ||
|
|
b181d65fc7 | ||
|
|
5c3f900f71 | ||
|
|
34d3dcb20c | ||
|
|
6f61230818 | ||
|
|
be9a1112f1 | ||
|
|
399d7ac799 | ||
|
|
c884e62630 | ||
|
|
56809a3959 | ||
|
|
f517505c3f | ||
|
|
d8f255408d | ||
|
|
4bcee639b9 | ||
|
|
3adbcb07dc | ||
|
|
7314f5943c | ||
|
|
b3c20ee34d | ||
|
|
03c3f528d8 | ||
|
|
9a83ae3af0 | ||
|
|
e539d9375a | ||
|
|
00c36b012f | ||
|
|
a8e2b4d722 | ||
|
|
769b310b4e | ||
|
|
5a279ff963 | ||
|
|
c267ea9703 | ||
|
|
21218c3fcb | ||
|
|
9f04502e25 | ||
|
|
3f2b46e056 | ||
|
|
c90fae15f1 | ||
|
|
1892cc3b52 | ||
|
|
3815cdecfd | ||
|
|
e9f2259dbf | ||
|
|
af0418b366 | ||
|
|
9b1beb6492 | ||
|
|
0b2075b873 | ||
|
|
4813660e4c | ||
|
|
8805731474 | ||
|
|
2f668fd6c6 | ||
|
|
7fd2478cd6 | ||
|
|
ee8a5e4640 | ||
|
|
ecb2168322 | ||
|
|
8b9c1117dd | ||
|
|
82307d7fc4 | ||
|
|
6b41f6940b | ||
|
|
2f38cc1120 | ||
|
|
781610371f | ||
|
|
11b13e95fe | ||
|
|
9306d688e4 | ||
|
|
b7600f37e7 | ||
|
|
d25a5e94bf | ||
|
|
938bedb489 | ||
|
|
4719c83bf9 | ||
|
|
6fef26afef | ||
|
|
80ce34bf51 | ||
|
|
2ac838a0e8 | ||
|
|
5740633dba | ||
|
|
f23e2a0156 | ||
|
|
03742b4f4f | ||
|
|
1fa16c2790 | ||
|
|
49646c633d | ||
|
|
49f689c456 | ||
|
|
5d090713c2 | ||
|
|
fe4e758a28 | ||
|
|
9333e19cbb | ||
|
|
6428c225d9 | ||
|
|
fe8b3a235a | ||
|
|
6b5cf00273 | ||
|
|
945dcd83d3 | ||
|
|
b3756cf293 | ||
|
|
e703de6878 | ||
|
|
2654c07f6f | ||
|
|
f471469a1e | ||
|
|
b8f022e0ee | ||
|
|
75c213c463 | ||
|
|
8320024dd1 | ||
|
|
8e3c42f18d | ||
|
|
423be20fb0 | ||
|
|
9ba40cd935 | ||
|
|
3599d0acd9 | ||
|
|
46053b778d | ||
|
|
1ca3b9775a | ||
|
|
695628599d | ||
|
|
dcad1d7e52 | ||
|
|
91ceaa2491 | ||
|
|
6a8b2d1c08 | ||
|
|
7ace8c6e66 | ||
|
|
1779335a43 | ||
|
|
c540a1d8bf | ||
|
|
19f875114f | ||
|
|
b227b438b9 | ||
|
|
d590a522d0 | ||
|
|
38a530171b | ||
|
|
d63c7cea42 | ||
|
|
8150b8096b | ||
|
|
c15e9b1ac2 | ||
|
|
45578ab90b | ||
|
|
83755595ca | ||
|
|
70ad8106b0 | ||
|
|
a028204f48 | ||
|
|
8e9e2ad04b | ||
|
|
59b94c80d9 | ||
|
|
0a67e6e7d2 | ||
|
|
c517ef910a | ||
|
|
e4ecee37ad | ||
|
|
79c69fa9d9 | ||
|
|
e9554ebd15 | ||
|
|
f9ec78ef23 | ||
|
|
8757dcc691 | ||
|
|
3ae5e494b6 | ||
|
|
bd49d0ae75 | ||
|
|
69082edb79 | ||
|
|
061f84a7e1 | ||
|
|
f32fa51731 | ||
|
|
f4404a202f | ||
|
|
34129fce89 | ||
|
|
a19c8900fe | ||
|
|
98fc8c1d2e | ||
|
|
9d80f5dc9c | ||
|
|
4087ea0aaf | ||
|
|
e249f46c25 | ||
|
|
9682d69fcf | ||
|
|
5c3a0a59b9 | ||
|
|
c6b3b7cb73 | ||
|
|
9b8fadd750 | ||
|
|
625ed83547 | ||
|
|
a83debf330 | ||
|
|
71eb8be5ed | ||
|
|
658c525d40 | ||
|
|
f73e96bcf6 | ||
|
|
4ed3d37ffb | ||
|
|
2c898a47d2 | ||
|
|
7577076321 | ||
|
|
fef63d6cf7 | ||
|
|
09be28004c | ||
|
|
a8d142db3a | ||
|
|
559dfa0298 | ||
|
|
c35422c861 | ||
|
|
e0cb512548 | ||
|
|
83c274bf08 | ||
|
|
e67b966472 | ||
|
|
4343200495 | ||
|
|
4eac164ae3 | ||
|
|
110c11717e | ||
|
|
fa464ed171 | ||
|
|
30ff427d3b | ||
|
|
489fd1cd67 | ||
|
|
cfeaaf6fac | ||
|
|
73d5e98c77 | ||
|
|
4c65ec4c3d | ||
|
|
63e7f47d2f | ||
|
|
289ca9f99c | ||
|
|
eee2c7713a | ||
|
|
00383655d8 | ||
|
|
26badb2620 | ||
|
|
fdee476d81 | ||
|
|
acde38c21c | ||
|
|
afc0954d1a | ||
|
|
149d647b08 | ||
|
|
cb233d7c8f | ||
|
|
b0ad3bf6e2 | ||
|
|
22cbed9ee7 | ||
|
|
a7186dfdee | ||
|
|
93af13dd1c | ||
|
|
5aaf9df976 | ||
|
|
5d240532a4 | ||
|
|
664d8534d3 | ||
|
|
2d5c6ae3be | ||
|
|
41e4aafbcc | ||
|
|
0a0d76f22a | ||
|
|
4ec7cf70bc | ||
|
|
631c7ab6d7 | ||
|
|
606a8ffc32 | ||
|
|
00b5c52e3c | ||
|
|
3356940ad2 | ||
|
|
46c1c88486 | ||
|
|
a95f433eab | ||
|
|
7c813125c7 | ||
|
|
a0c8cb772f | ||
|
|
cac2c8a613 | ||
|
|
5fe7e903ba | ||
|
|
d68bd3d150 | ||
|
|
21c081c8bc | ||
|
|
a867f620bb | ||
|
|
49e11227c6 | ||
|
|
55c2f72487 | ||
|
|
de73bb35c1 | ||
|
|
272b91dfb7 | ||
|
|
955f7defe5 | ||
|
|
c0aa10d601 | ||
|
|
12243f1699 | ||
|
|
811d259319 | ||
|
|
2e141ef056 | ||
|
|
343b4c92c5 | ||
|
|
827ec97784 | ||
|
|
46cc60eaea | ||
|
|
721a6e1ba0 | ||
|
|
0212b0c291 | ||
|
|
e88fb1c2ba | ||
|
|
c1ee8afb02 | ||
|
|
1d42a50e26 | ||
|
|
4cb3317e9b | ||
|
|
d9b37e1424 | ||
|
|
823caae47b | ||
|
|
d944856636 | ||
|
|
d89abbecb8 | ||
|
|
188e6c8ed5 | ||
|
|
7d6890a022 | ||
|
|
969b04ca5e | ||
|
|
207cd25a19 | ||
|
|
7a9e0cde8b | ||
|
|
28999f2fd7 | ||
|
|
0844927663 | ||
|
|
66bc7ace14 | ||
|
|
2d8a3cac16 | ||
|
|
eeeea6e9e1 | ||
|
|
e465380fac | ||
|
|
0eefc09bbb | ||
|
|
688847e575 | ||
|
|
681524332a | ||
|
|
ebcbd18dfc | ||
|
|
240c5eba35 | ||
|
|
20e46cd092 | ||
|
|
721ca56778 | ||
|
|
bb36cfb86b | ||
|
|
9911f99b59 | ||
|
|
9e704846ef | ||
|
|
ac8036d901 | ||
|
|
a5608ba13b | ||
|
|
f52733fc3c | ||
|
|
d480efe403 | ||
|
|
e81eec21f9 | ||
|
|
96ed15afff | ||
|
|
4cc613d3b8 | ||
|
|
f77ee43008 | ||
|
|
59bdfe7eba | ||
|
|
9a3774d42f | ||
|
|
9c693e9885 | ||
|
|
f99636a0ef | ||
|
|
f9e8f9785f | ||
|
|
ee94871096 | ||
|
|
41dac395df | ||
|
|
a1af0615be | ||
|
|
1576b65d0e | ||
|
|
b20ddcfc00 | ||
|
|
0ced1e4833 | ||
|
|
04f806f6c9 | ||
|
|
60b9f6b13c | ||
|
|
01472e9d9c | ||
|
|
8bd8fb468c | ||
|
|
18d17f00f8 | ||
|
|
2f1a0f7b98 | ||
|
|
8fadd93624 | ||
|
|
7a6ed563fe | ||
|
|
f61527d42e | ||
|
|
bfe6356962 | ||
|
|
6e1daa105b | ||
|
|
e08908028c | ||
|
|
3064102126 | ||
|
|
763d8ebb70 | ||
|
|
2f5cfe1643 | ||
|
|
91670b6b7b | ||
|
|
a8e75df7f4 | ||
|
|
41c817c2dc | ||
|
|
27e7cd3985 | ||
|
|
bf2f3da926 | ||
|
|
17a16aba71 | ||
|
|
80db91eeab | ||
|
|
97f0db5678 | ||
|
|
20e44dcf70 | ||
|
|
6c24e1ce1c | ||
|
|
3b9f18f8df | ||
|
|
80f81c131b | ||
|
|
9eb5ae7fad | ||
|
|
695f266c3e | ||
|
|
3e17ec7de0 | ||
|
|
1d2ece589c | ||
|
|
59918e9eb3 | ||
|
|
66b1ede0dc | ||
|
|
15d98882e8 | ||
|
|
ea2f7885e1 | ||
|
|
841d5e447e | ||
|
|
464bb60d1f | ||
|
|
0947560395 | ||
|
|
ae88e7f967 | ||
|
|
06e53167bd | ||
|
|
2aaa664feb | ||
|
|
2205743002 | ||
|
|
0597ad741b | ||
|
|
760da83a36 | ||
|
|
26de64d33b | ||
|
|
56cc1d1af6 | ||
|
|
8cb139f9ce | ||
|
|
83788badc2 | ||
|
|
b7c683923c | ||
|
|
ee8f292c5e | ||
|
|
c22fae358a | ||
|
|
0d551af55d | ||
|
|
953c1c0dd4 | ||
|
|
4388868753 | ||
|
|
f0950e8452 | ||
|
|
080818ac85 | ||
|
|
1f4c0e5b5d | ||
|
|
4cf39c1e00 | ||
|
|
862b90efba | ||
|
|
3011b08fe6 | ||
|
|
891c4d0d18 | ||
|
|
2c7404f6ea | ||
|
|
96d77add38 | ||
|
|
6261cc257b | ||
|
|
a6c41bf09f | ||
|
|
12a2794738 | ||
|
|
636f974980 | ||
|
|
39bdeb2414 | ||
|
|
43ce20151b | ||
|
|
813a86c0c1 | ||
|
|
1234a6088d | ||
|
|
eebaf71120 | ||
|
|
c8e922293f | ||
|
|
a0b3a5d67f | ||
|
|
2c57c0fcdc | ||
|
|
35fe1b1b92 | ||
|
|
681a199395 | ||
|
|
2c4518d7dc | ||
|
|
860528513c | ||
|
|
6ba735d188 | ||
|
|
d430c2f52d | ||
|
|
76e810cc78 | ||
|
|
7693baa284 | ||
|
|
580aa04ed1 | ||
|
|
ad21757544 | ||
|
|
fec4ffd70b | ||
|
|
4fd3d21bc7 | ||
|
|
6b94ae393a | ||
|
|
a83e8333b9 | ||
|
|
187f43cba8 | ||
|
|
6efaa9c1e0 | ||
|
|
b1f3e4aa97 | ||
|
|
d952c6e98c | ||
|
|
d1f920c05e | ||
|
|
061295c07d | ||
|
|
be8d650a94 | ||
|
|
2b63688110 | ||
|
|
de13e94457 | ||
|
|
c760c1e74d | ||
|
|
fe47c2e82a | ||
|
|
8bab064b76 | ||
|
|
0916046726 | ||
|
|
6b9e10bbbc | ||
|
|
75b27830cf | ||
|
|
7634a78b84 | ||
|
|
4609052dae | ||
|
|
1953238089 | ||
|
|
418d5e2a15 | ||
|
|
647802449c | ||
|
|
a08e249325 | ||
|
|
56264d626e | ||
|
|
165d4056e3 | ||
|
|
5bbfab0a5b | ||
|
|
0ccc370c08 | ||
|
|
96f22b6c0c | ||
|
|
d7ecc373f5 | ||
|
|
04546212f4 | ||
|
|
7fea3037ed | ||
|
|
aa7a3f75f7 | ||
|
|
3a25981c4c | ||
|
|
eb8443da41 | ||
|
|
76f735c3de | ||
|
|
695a180098 | ||
|
|
1604f09dd2 | ||
|
|
a7cda7ca4d | ||
|
|
fba6b66c99 | ||
|
|
c612cddc5d | ||
|
|
9596522195 | ||
|
|
5202284e87 | ||
|
|
696386a240 | ||
|
|
7e46b6f42b | ||
|
|
2b4745a4d4 | ||
|
|
f8d06e823e | ||
|
|
673c202d56 | ||
|
|
2c15a56c9b | ||
|
|
62afce4ee9 | ||
|
|
a28bdb3c7a | ||
|
|
7935d12f44 | ||
|
|
d7c07822c8 | ||
|
|
642026b71d | ||
|
|
5e6465eb05 | ||
|
|
a2c6f7ace3 | ||
|
|
267f105bb2 | ||
|
|
4c27fe3c69 | ||
|
|
e5afe0dfcb | ||
|
|
c55cd78c7c | ||
|
|
6edc802c54 | ||
|
|
e562c240a7 | ||
|
|
ab82857427 | ||
|
|
6aea654a2b | ||
|
|
2a36720cd5 | ||
|
|
cc3e35d2d2 | ||
|
|
c0af1d1fdc | ||
|
|
f8a4c4f17e | ||
|
|
07cb583f67 | ||
|
|
63b5722dfb | ||
|
|
05cba45eea | ||
|
|
1ca41a905b | ||
|
|
0c74cf829e | ||
|
|
9e78820b18 | ||
|
|
9c84d46002 | ||
|
|
374042d4b6 | ||
|
|
7ae75ccb84 | ||
|
|
811db659f8 | ||
|
|
3aa85987bc | ||
|
|
759cf5aadf | ||
|
|
22c857999a | ||
|
|
7ef34bd3ec | ||
|
|
28098f6dbf | ||
|
|
aef4c8da00 | ||
|
|
1a85e834c4 | ||
|
|
7a398bcd1d | ||
|
|
c163918355 | ||
|
|
9700e17d74 | ||
|
|
a2986d8cc1 | ||
|
|
7ea60cd426 | ||
|
|
f5f19f0637 | ||
|
|
734d1915e2 | ||
|
|
c81d5d8b4b | ||
|
|
f8f43ca680 | ||
|
|
0111fd2629 | ||
|
|
34441731c5 | ||
|
|
3ac0490077 | ||
|
|
b36f01c7b5 | ||
|
|
8ca28ff027 | ||
|
|
3a75e78750 | ||
|
|
d46088ba1a | ||
|
|
41ff49cff8 | ||
|
|
d4b2e771bf | ||
|
|
59e14261f1 | ||
|
|
48a62bb15a | ||
|
|
8a364561ea | ||
|
|
386181766c | ||
|
|
64c357497f | ||
|
|
df5918caa1 | ||
|
|
f26709a01e | ||
|
|
7dc6187ad4 | ||
|
|
bd4ed5d689 | ||
|
|
c01e94cad7 | ||
|
|
e6ee8d626f | ||
|
|
7322cf149c | ||
|
|
4bbe997dc3 | ||
|
|
8365ecd5f2 | ||
|
|
90c3073d57 | ||
|
|
937c8ad257 | ||
|
|
2c4eb1b4ed | ||
|
|
2db22a835f | ||
|
|
06d1b0ff22 | ||
|
|
cedd642630 | ||
|
|
a0c6944a90 | ||
|
|
09f98e00d2 | ||
|
|
e47da26a9e | ||
|
|
192897bb1b | ||
|
|
75593bc5fe | ||
|
|
0912daef80 | ||
|
|
cae9ad5361 | ||
|
|
9c9e4ed53c | ||
|
|
a4539a7841 | ||
|
|
a1915e14af | ||
|
|
119c264a0b | ||
|
|
350e21c21d | ||
|
|
e82442a4d0 | ||
|
|
f764f98276 | ||
|
|
9e772f2cd9 | ||
|
|
942634dcbc | ||
|
|
d531ef9e5d | ||
|
|
9d07cfd69e | ||
|
|
c81730cb7b | ||
|
|
6c477d3580 | ||
|
|
f15fc9d47a | ||
|
|
233ffd6cff | ||
|
|
d4d0fcbb2e | ||
|
|
54b104a557 | ||
|
|
48b907118d | ||
|
|
eb7c27e236 | ||
|
|
02a39873f4 | ||
|
|
d2d79b97e3 | ||
|
|
7393438481 | ||
|
|
0bd62df729 | ||
|
|
1a0670162a | ||
|
|
2853f4c2fd | ||
|
|
bdb23ac729 | ||
|
|
257e00dd8c | ||
|
|
542f74e6f9 | ||
|
|
a87da48ec7 | ||
|
|
047a5fe867 | ||
|
|
ebfc3f6c7b | ||
|
|
976711ee38 | ||
|
|
4d12c8e47a | ||
|
|
f5e1e97a3d | ||
|
|
f596b1c598 | ||
|
|
5e4445f3ef | ||
|
|
9656e74471 | ||
|
|
bd4977213e | ||
|
|
f5b507a12b | ||
|
|
357f2b432f | ||
|
|
2f4d440c11 | ||
|
|
bc78c917f2 | ||
|
|
20a1185b2b | ||
|
|
bfeddf4872 | ||
|
|
16cf507f6d | ||
|
|
7038c22536 | ||
|
|
0dd45d500c | ||
|
|
06dadb14aa | ||
|
|
2e92679844 | ||
|
|
6bb37471d0 | ||
|
|
6ef993bee0 | ||
|
|
fc29c84dfd | ||
|
|
0fac54b986 | ||
|
|
ead1a29d6a | ||
|
|
92f6b950b7 | ||
|
|
9ab57ac4d1 | ||
|
|
48881c804c | ||
|
|
42381ac4b6 | ||
|
|
2d2743cc6f | ||
|
|
ac235050c2 | ||
|
|
05d9b1753b | ||
|
|
f9a19ba7cd | ||
|
|
9081c85551 | ||
|
|
4c08f8033d | ||
|
|
bfa1428004 | ||
|
|
b6978c3e09 | ||
|
|
40cda08ce0 | ||
|
|
410ae285d6 | ||
|
|
cd72250b81 | ||
|
|
7d379e1a50 | ||
|
|
07b40ad301 | ||
|
|
3d9e4690e9 | ||
|
|
138c47fd46 | ||
|
|
17d8fab271 | ||
|
|
e8deaa1d72 | ||
|
|
8845af874e | ||
|
|
d8bc9040e7 | ||
|
|
70c49b1272 | ||
|
|
ce7a285a56 | ||
|
|
b03f6f8137 | ||
|
|
d079ef794b | ||
|
|
ee0266636e | ||
|
|
0bc8694149 | ||
|
|
fc62ac16fa | ||
|
|
0afc6d9ddd | ||
|
|
59fb68a611 | ||
|
|
80cb05baae | ||
|
|
102e89f7ec | ||
|
|
8a57c0ef90 | ||
|
|
78cc15ef7c | ||
|
|
9bac088ce7 | ||
|
|
c0807794b2 | ||
|
|
a3e74172d6 | ||
|
|
b7f8a13a1d | ||
|
|
279993d38f | ||
|
|
bda34061e4 | ||
|
|
3d1c8ca4f0 | ||
|
|
576ec93128 | ||
|
|
28a3b1348b | ||
|
|
df76a8981d | ||
|
|
44e45b67a6 | ||
|
|
6018be7c2f | ||
|
|
86c9cf979b | ||
|
|
78c6d67164 | ||
|
|
5350f62875 | ||
|
|
cbd0bb9ec7 | ||
|
|
d85f65eb5c | ||
|
|
6b874e2dba | ||
|
|
0f117cf2d2 | ||
|
|
5289f1add0 | ||
|
|
2ad89d0f0e | ||
|
|
af7cd2c594 | ||
|
|
628bcae417 | ||
|
|
35575525fc | ||
|
|
d1529aed21 | ||
|
|
1140db62f4 | ||
|
|
d10a382550 | ||
|
|
ebdcb74e5b | ||
|
|
8f3f7baf78 | ||
|
|
9666a2189b | ||
|
|
6a02e28805 | ||
|
|
436d43f211 | ||
|
|
fb81748382 | ||
|
|
bbad2f3c44 | ||
|
|
bf68113e5f | ||
|
|
bbc37215d9 | ||
|
|
274070b318 | ||
|
|
4fe7f03adb | ||
|
|
277259d394 | ||
|
|
e567411e99 | ||
|
|
ee1f501610 | ||
|
|
da1d2917dd | ||
|
|
15c13b4272 | ||
|
|
1309e966c8 | ||
|
|
f5c74277cf | ||
|
|
a2a2c99ca8 | ||
|
|
948dd4324d | ||
|
|
b7d549610f | ||
|
|
f91dd96a18 | ||
|
|
9c9f49e5d8 | ||
|
|
91440dad6b | ||
|
|
ec1a72f5d0 | ||
|
|
692fa0bfb6 | ||
|
|
f7d2ddd8f0 | ||
|
|
86ddf6342d | ||
|
|
50d6f5b945 | ||
|
|
3ade0efc18 | ||
|
|
3c6d11e447 | ||
|
|
4d32635743 | ||
|
|
0eac018033 | ||
|
|
5f7f47f572 | ||
|
|
48c0cad32a | ||
|
|
16cf8358d3 | ||
|
|
47c993cd64 | ||
|
|
d456196734 | ||
|
|
e3e5848fc7 | ||
|
|
e61d6831dd | ||
|
|
17787766cf | ||
|
|
0282b7e4f4 | ||
|
|
25a43156a6 | ||
|
|
f2894ec72b | ||
|
|
22a85ab153 | ||
|
|
58910bbdd1 | ||
|
|
6bd9f56396 | ||
|
|
b79a39563c | ||
|
|
3c94d84965 | ||
|
|
12be593228 | ||
|
|
29e5c7118b | ||
|
|
c7bdd16251 | ||
|
|
2197beb926 | ||
|
|
317e478e12 | ||
|
|
3a309ca3ee | ||
|
|
3ba168fc8c | ||
|
|
ea7174b216 | ||
|
|
cc89818acc | ||
|
|
bd3d8e8bee | ||
|
|
636f593801 | ||
|
|
7a222db774 | ||
|
|
a169bde9e8 | ||
|
|
5e251601a9 | ||
|
|
5fa6c27e38 | ||
|
|
cf7154cb98 | ||
|
|
d0b2e972bc | ||
|
|
a6a92fb7f0 | ||
|
|
f7f30f342c | ||
|
|
9c8dde1d05 | ||
|
|
0d6cbc7302 | ||
|
|
92c02acbce | ||
|
|
7315b28028 | ||
|
|
a41801d37d | ||
|
|
4d600ef000 | ||
|
|
4ebcee66d6 | ||
|
|
b2db34e217 | ||
|
|
675f07e7c3 | ||
|
|
51a42e0f6f | ||
|
|
522182024f | ||
|
|
92c90ac9ec | ||
|
|
d3c8624486 | ||
|
|
6478bc24d7 | ||
|
|
0fff265da2 | ||
|
|
11c35aff9e | ||
|
|
318db3c7fc | ||
|
|
d35e1fa18c | ||
|
|
2a5c9a8999 | ||
|
|
ff5c1dcc81 | ||
|
|
a0c101bff7 | ||
|
|
4d5d0c5df5 | ||
|
|
da9bb2ba03 | ||
|
|
8c89b9d527 | ||
|
|
6b7d4a26c3 | ||
|
|
b111680f8f | ||
|
|
60d1622764 | ||
|
|
502c03b4c7 | ||
|
|
5e0e0909e0 | ||
|
|
3143ebfdf1 | ||
|
|
9e23ed2fc5 | ||
|
|
f3cf0884f1 | ||
|
|
51c0217c11 | ||
|
|
a2a4580409 | ||
|
|
4aed191404 | ||
|
|
fb50397a55 | ||
|
|
518c4c0227 | ||
|
|
ca5f0e786f | ||
|
|
6168f2e194 | ||
|
|
6c78a24a7d | ||
|
|
fcdd8f4e92 | ||
|
|
84b8d52a1a | ||
|
|
ce49953863 | ||
|
|
3dbbac9eab | ||
|
|
057600d63a | ||
|
|
95f9595544 | ||
|
|
6264bf569a | ||
|
|
ad6e05ed93 | ||
|
|
04e006db1a | ||
|
|
903b308777 | ||
|
|
83f894052e | ||
|
|
fba197d728 | ||
|
|
88cece66e5 | ||
|
|
f053a6b59e | ||
|
|
c0882ccfc5 | ||
|
|
87f656065d | ||
|
|
f0272aec8b | ||
|
|
4b124770e1 | ||
|
|
5b9fbbd216 | ||
|
|
575a192c88 | ||
|
|
5756ca119a | ||
|
|
cbef8356de | ||
|
|
eef395a124 | ||
|
|
8a32da9aa2 | ||
|
|
cb6eba1fd9 | ||
|
|
2f512599bd | ||
|
|
d3d4aeb6a2 | ||
|
|
2ed6208207 | ||
|
|
5ba7636961 | ||
|
|
66284b0785 | ||
|
|
0086e93e36 | ||
|
|
685e061900 | ||
|
|
3e77861336 | ||
|
|
6447a8eb5f | ||
|
|
1c9dc3f9a2 | ||
|
|
69a3d72afc | ||
|
|
fe3f8d08dd | ||
|
|
035a54b568 | ||
|
|
2a2358a6fa | ||
|
|
3523eedf6f | ||
|
|
7a3e3068d8 | ||
|
|
28c8490d87 | ||
|
|
016cebc43b | ||
|
|
839495ec9b | ||
|
|
5ce9ed85a6 | ||
|
|
1d82bd06ae | ||
|
|
4ff52b958b | ||
|
|
b5609be5c1 | ||
|
|
bf2eb9d473 | ||
|
|
9d9e05ab08 | ||
|
|
ef97b091a5 | ||
|
|
4ddb9c395e | ||
|
|
c366aafefa | ||
|
|
3a8c6f3d85 | ||
|
|
5f05504111 | ||
|
|
f69d3e7ed6 | ||
|
|
300b42a22d | ||
|
|
9b31886395 | ||
|
|
640a455469 | ||
|
|
d6b6d28052 | ||
|
|
9acaca40ca | ||
|
|
ecb8b3c386 | ||
|
|
e3262cdb9c | ||
|
|
2726454cda | ||
|
|
6737fe6bb9 | ||
|
|
1feca682e0 | ||
|
|
b7dcb8f592 | ||
|
|
7c85152d39 | ||
|
|
ab526e6818 | ||
|
|
f1922f1b8a | ||
|
|
a17190fc30 | ||
|
|
4ad4d9cc5d | ||
|
|
f41875154d | ||
|
|
ec77622500 | ||
|
|
478af40f6f | ||
|
|
b7587c6070 | ||
|
|
9254918735 | ||
|
|
ab5612c55c | ||
|
|
997a2399f0 | ||
|
|
6ffd27568f | ||
|
|
de4752bda5 | ||
|
|
4006b4f57d | ||
|
|
742a1b5ded | ||
|
|
7943166470 | ||
|
|
160ebe0821 | ||
|
|
3b23f82f90 | ||
|
|
9ac1dd78a1 | ||
|
|
2cacb5e700 | ||
|
|
4c65dd8f62 | ||
|
|
05b8d4fb1c | ||
|
|
2f91c5f6d9 | ||
|
|
c4cb151f1d | ||
|
|
82236d9ede | ||
|
|
5730624c01 | ||
|
|
4ae7e10d78 | ||
|
|
dd8d2d3172 | ||
|
|
7e25727635 | ||
|
|
a29e377cb7 | ||
|
|
bee090c77e | ||
|
|
617550b86c | ||
|
|
b4a61c36c1 | ||
|
|
0ab6b2a80b | ||
|
|
42382fa1b9 | ||
|
|
bd0c9879f3 | ||
|
|
2d50555393 | ||
|
|
492923673e | ||
|
|
eb23b98331 | ||
|
|
a6e79b39dd | ||
|
|
f6de5dc102 | ||
|
|
af9922f854 | ||
|
|
b4292d8189 | ||
|
|
206ac3b827 | ||
|
|
73e7ea791b | ||
|
|
da986331ee | ||
|
|
02f190bf14 | ||
|
|
bec593548a | ||
|
|
3b82e4dbeb | ||
|
|
7bb1a1ac29 | ||
|
|
a58e5ca7cd | ||
|
|
6dcd1236ae | ||
|
|
fdd55454e0 | ||
|
|
1530b56979 | ||
|
|
fd0c0fd672 | ||
|
|
44bd65645e | ||
|
|
581444e41a | ||
|
|
4df4737cd3 | ||
|
|
3085b4a6d8 | ||
|
|
71e14adc53 | ||
|
|
6c8e4bb64d | ||
|
|
2d41e7f8cc | ||
|
|
786edbcff4 | ||
|
|
d9c1d1940d | ||
|
|
eaa53f5d5a | ||
|
|
58d8228c46 | ||
|
|
dcc3d8bbef | ||
|
|
f8baf98f49 | ||
|
|
cf7c5df9c7 | ||
|
|
bd797c32e6 | ||
|
|
cae8aa1113 | ||
|
|
c07eae9071 | ||
|
|
d196c1b384 | ||
|
|
b582acd298 | ||
|
|
914453e402 | ||
|
|
766cce3543 | ||
|
|
a8957c032d | ||
|
|
b6f6f559d2 | ||
|
|
24a7fc748c | ||
|
|
aee7b180fa | ||
|
|
a224105228 | ||
|
|
9b64b5752e | ||
|
|
0cdc2cf1d3 | ||
|
|
29a382dcb9 | ||
|
|
d620fb69af | ||
|
|
2b9cced716 | ||
|
|
4d274429cb | ||
|
|
09d8a2f50c | ||
|
|
17eda98aaa | ||
|
|
fbcc4b2342 | ||
|
|
09af67ef07 | ||
|
|
49cdee4699 | ||
|
|
874e44d930 | ||
|
|
be7ca27beb | ||
|
|
7346b469f0 | ||
|
|
e0caf55c8b | ||
|
|
ae2a61baad | ||
|
|
83d3186807 | ||
|
|
9a600a6cb4 | ||
|
|
396af67601 | ||
|
|
6cefbaf3d2 | ||
|
|
331318a796 | ||
|
|
9aa8ad6999 | ||
|
|
f479ed3f80 | ||
|
|
de58d41cd9 | ||
|
|
545010ec9b | ||
|
|
3347ce0039 | ||
|
|
e022628fc9 | ||
|
|
5735463f27 | ||
|
|
ea8836380a | ||
|
|
1b32bd2ccd | ||
|
|
3f55397ff2 | ||
|
|
61f9d25572 | ||
|
|
e61395e58f | ||
|
|
033d7b0e6b | ||
|
|
b73cbdf18c | ||
|
|
2486244bde | ||
|
|
0b50d686f1 | ||
|
|
e950ac1c5c | ||
|
|
5078bd3bd8 | ||
|
|
9409557baa | ||
|
|
c5768c0dba | ||
|
|
276442e553 | ||
|
|
5e2e8e90bf | ||
|
|
f683e44001 | ||
|
|
f0f1496951 | ||
|
|
7e22abd903 | ||
|
|
215ca3c6ae | ||
|
|
7e02aed6c3 | ||
|
|
d8aaa26c2c | ||
|
|
1512edaf12 | ||
|
|
a913ae1bbc | ||
|
|
ba0c0cbbea | ||
|
|
c6d25eead1 | ||
|
|
d3cdc0469b | ||
|
|
6ac2890533 | ||
|
|
aedf49b319 | ||
|
|
cf515cc659 | ||
|
|
15f35f235b | ||
|
|
e685428a2c | ||
|
|
b9740f38fe | ||
|
|
4132901d1d | ||
|
|
6a508fd10d | ||
|
|
745e58b9e6 | ||
|
|
4d6f6a67f2 | ||
|
|
982ad2ca7c | ||
|
|
615ed7df64 | ||
|
|
099ab0282c | ||
|
|
db6a4146a5 | ||
|
|
49f55b4407 | ||
|
|
79eb2d6e48 | ||
|
|
e0a48f8989 | ||
|
|
0b5a9c97e2 | ||
|
|
3855c146ac | ||
|
|
280aca881c | ||
|
|
bc3199e41c | ||
|
|
35007b4359 | ||
|
|
ec5da21679 | ||
|
|
6e6abe181f | ||
|
|
7653f3675f | ||
|
|
f5dc1089af | ||
|
|
6b42c28a8f | ||
|
|
a19300a625 | ||
|
|
c5ba8bd720 | ||
|
|
daa893108e | ||
|
|
91e15ea68e | ||
|
|
d8dc8592bc | ||
|
|
84c50e6681 | ||
|
|
e6011bb71f | ||
|
|
3c098a69a6 | ||
|
|
c8ecf3571f | ||
|
|
01cd5d8e57 | ||
|
|
59a509ab6f | ||
|
|
a8d7c6b45c | ||
|
|
c6288fa578 | ||
|
|
7785c9b2c6 | ||
|
|
f8c923fa94 | ||
|
|
baa92d21c7 | ||
|
|
e220ba01ed | ||
|
|
1731924479 | ||
|
|
7c7ff999b7 | ||
|
|
9bff26e3d9 | ||
|
|
af3db3e4d1 | ||
|
|
d3001496ed | ||
|
|
ba7edd8a3b | ||
|
|
6d33fa025c | ||
|
|
ee647edfe2 | ||
|
|
61a278f73b | ||
|
|
915d18c143 | ||
|
|
70255b5440 | ||
|
|
53089cac16 | ||
|
|
dc9703b976 | ||
|
|
8f3aade662 | ||
|
|
bdc0e82f18 | ||
|
|
ef3b773299 | ||
|
|
5df91026ea | ||
|
|
37b2da8bf3 | ||
|
|
bc3d20cba4 | ||
|
|
8703a59c51 | ||
|
|
afdb461133 | ||
|
|
97cd53a50e | ||
|
|
c29dd50db6 | ||
|
|
0933e470e6 | ||
|
|
e68dc67279 | ||
|
|
1588d74077 | ||
|
|
56018f5eb2 | ||
|
|
056d67dbf6 | ||
|
|
a37fa95fb3 | ||
|
|
885e11bada | ||
|
|
9ac9e0292d | ||
|
|
795de5f95f | ||
|
|
f7461086cc | ||
|
|
fa690bfd11 | ||
|
|
aa9713ab71 | ||
|
|
bf30a2b54d | ||
|
|
482730d577 | ||
|
|
c6156b2092 | ||
|
|
2447312558 | ||
|
|
e1a23ad8a5 | ||
|
|
e945d47ff1 | ||
|
|
78c16bfcfe | ||
|
|
17f6281e23 | ||
|
|
d2fd8dee08 | ||
|
|
717117d6d4 | ||
|
|
dfd10349d5 | ||
|
|
61fbbb6bc1 | ||
|
|
a32a2f92a2 | ||
|
|
6ed327cb74 | ||
|
|
256c10f753 | ||
|
|
943b263163 | ||
|
|
f793d50a12 | ||
|
|
b90661d5e5 | ||
|
|
41195a492c | ||
|
|
fe85203288 | ||
|
|
bafe4b8adb | ||
|
|
88b23adbf4 | ||
|
|
fe4337da92 | ||
|
|
74caf67866 | ||
|
|
52ac925bc3 | ||
|
|
97e5cd4b32 | ||
|
|
2b768c5796 | ||
|
|
cd9b0758b0 | ||
|
|
1848d8aa3e | ||
|
|
52c1373494 | ||
|
|
34df01adc8 | ||
|
|
dcf293faca | ||
|
|
2a2655f16e | ||
|
|
b602d311d7 | ||
|
|
ad2f0728c1 | ||
|
|
35dc4ea96b | ||
|
|
597b8c2f87 | ||
|
|
615e2001ee | ||
|
|
beccbf1b94 | ||
|
|
dc66973c8e | ||
|
|
7920f4a6a9 | ||
|
|
bfc9162101 | ||
|
|
9f2d153e12 | ||
|
|
784c2007e1 | ||
|
|
508e541c92 | ||
|
|
93cca65187 | ||
|
|
3c8514da6a | ||
|
|
cb2910b539 | ||
|
|
67971f8904 | ||
|
|
9990130236 | ||
|
|
fad06d673f | ||
|
|
b5e1dbf558 | ||
|
|
2bcd4ac09b | ||
|
|
357c78f88e | ||
|
|
96b83c9943 | ||
|
|
e79bde5021 | ||
|
|
9eb6957752 | ||
|
|
2736fa8c17 | ||
|
|
6ebfe58a8f | ||
|
|
ee4917a617 | ||
|
|
2a73bc06a1 | ||
|
|
7a392cbcb2 | ||
|
|
0f2d694e4f | ||
|
|
dd1c51348f | ||
|
|
bd202c797a | ||
|
|
225400d1aa | ||
|
|
09f88c4ade | ||
|
|
1aa487173f | ||
|
|
85c019ebc2 | ||
|
|
be41514eef | ||
|
|
658632f39c | ||
|
|
eb79e9f044 | ||
|
|
cf2dbd57c0 | ||
|
|
3a95d9ee1d | ||
|
|
b044009c7d | ||
|
|
87bef3bc53 | ||
|
|
372d1b7a4a | ||
|
|
dd9bdf8700 | ||
|
|
a9d56fd85d | ||
|
|
80126d7f1e | ||
|
|
bec5b1f5d0 | ||
|
|
5e6a880abd | ||
|
|
95895c44dd | ||
|
|
91b9263ddb | ||
|
|
6f22653806 | ||
|
|
d5c04f174e | ||
|
|
01b020a9cd | ||
|
|
89d7f6dc96 | ||
|
|
6f5546daad | ||
|
|
07144356c9 | ||
|
|
920d9110b8 | ||
|
|
c06a872ae1 | ||
|
|
8bb0ef792c | ||
|
|
4a344e1272 | ||
|
|
158a974300 | ||
|
|
750e8d462d | ||
|
|
463de5eab2 | ||
|
|
f3abd8769b | ||
|
|
c70f425fc3 | ||
|
|
704a089389 | ||
|
|
f9bdb8aba8 | ||
|
|
a812b0dede | ||
|
|
a15e804a22 | ||
|
|
2f20cdebbd | ||
|
|
4c08064fc5 | ||
|
|
31bba7f5f5 | ||
|
|
ad4990980f | ||
|
|
a66876e04d | ||
|
|
4f3c37a8f4 | ||
|
|
8648ceec74 | ||
|
|
728c3dce49 | ||
|
|
4d6d20f598 | ||
|
|
c48d3817b7 | ||
|
|
905833d07b | ||
|
|
d8577654db | ||
|
|
b697033b55 | ||
|
|
0b3f2b23ac | ||
|
|
f3f4a77cb3 | ||
|
|
185487050b | ||
|
|
db356d2258 | ||
|
|
2a1af8e8ea | ||
|
|
7e92f8898a | ||
|
|
94afde533d | ||
|
|
a3951d6d94 | ||
|
|
e0cbebdd35 | ||
|
|
14197195c8 | ||
|
|
b74b9cb99d | ||
|
|
c9cdf3689d | ||
|
|
7875c9ce3d | ||
|
|
64edaa5d04 | ||
|
|
814ef934e4 | ||
|
|
1329c6fda1 | ||
|
|
3e9d190892 | ||
|
|
a1bfb55091 | ||
|
|
26a73785b5 | ||
|
|
6ec526afe4 | ||
|
|
ffce7fca63 | ||
|
|
ce49e4ab25 | ||
|
|
3463c29a58 | ||
|
|
0ff821f775 | ||
|
|
69ed7f1be6 | ||
|
|
fda087863c | ||
|
|
726adf65d5 | ||
|
|
33ac70ba1f | ||
|
|
b30b28256d | ||
|
|
3ab348d40b | ||
|
|
398c6e0681 | ||
|
|
adc56dcf3e | ||
|
|
86b02e8273 | ||
|
|
b6287bc6dd | ||
|
|
c07fd685c6 | ||
|
|
84fa36c883 | ||
|
|
9791b95d47 | ||
|
|
c303bf347b | ||
|
|
e7612e94ff | ||
|
|
15b6ce139b | ||
|
|
0537050ef1 | ||
|
|
3139904ead | ||
|
|
fb7351a45b | ||
|
|
7d6f186554 | ||
|
|
5b14773a85 | ||
|
|
fe65cc7a56 | ||
|
|
5250e26b16 | ||
|
|
50109aea37 | ||
|
|
f60b40a46b | ||
|
|
17005f81fa | ||
|
|
ece706d6b2 | ||
|
|
3a27d440a7 | ||
|
|
dd1d27c432 | ||
|
|
de3c786b8f | ||
|
|
e6e41c0ee7 | ||
|
|
d24c032ecf | ||
|
|
d99a4de19f | ||
|
|
e406c2a214 | ||
|
|
ce249cd65f | ||
|
|
9136ac3981 | ||
|
|
96d6777306 | ||
|
|
fd0bdbee9c | ||
|
|
0d49cdc68b | ||
|
|
9cd6fb5895 | ||
|
|
4c9d31f787 | ||
|
|
a1e097d98f | ||
|
|
1a34462861 | ||
|
|
8acf2a00cc | ||
|
|
84485e6671 | ||
|
|
7fc1be14d1 | ||
|
|
f33dba664d | ||
|
|
e8756b98a4 | ||
|
|
29fb01243a | ||
|
|
58e14b05c5 | ||
|
|
ba496b391d | ||
|
|
1eea1add0d | ||
|
|
8573bdbf70 | ||
|
|
01155e8e17 | ||
|
|
0634c586ca | ||
|
|
0e81591733 | ||
|
|
72b940e40b | ||
|
|
85ff6e56d5 | ||
|
|
5f6a5eb083 | ||
|
|
243faae056 | ||
|
|
cec284c094 | ||
|
|
3d2bf9bd35 | ||
|
|
b7fdefb5b7 | ||
|
|
49ffcb2809 | ||
|
|
ad9f77e996 | ||
|
|
db118e69ff | ||
|
|
c908e3640a | ||
|
|
f89b9276f3 | ||
|
|
81bdc1efc3 | ||
|
|
df1348df78 | ||
|
|
222d3cec48 | ||
|
|
96d29ca7e5 | ||
|
|
e3491ac654 | ||
|
|
2b3a8f3c2c | ||
|
|
7bdb55207b | ||
|
|
f4059b3f77 | ||
|
|
8a158c2416 | ||
|
|
bcc3a4a7b2 | ||
|
|
7eec0a3f53 | ||
|
|
f7e0f4664d | ||
|
|
3c61112ddf | ||
|
|
0a73081963 | ||
|
|
a54e57368c | ||
|
|
f78e55d4bf | ||
|
|
b9797ccf55 | ||
|
|
8fa91e0b3c | ||
|
|
464de07b60 | ||
|
|
e60d2990fc | ||
|
|
f50ce9655b | ||
|
|
437c2a45ff | ||
|
|
db6a4e2321 | ||
|
|
12c945e4ce | ||
|
|
3bbac1e159 | ||
|
|
b3c61f934a | ||
|
|
9f29e60d86 | ||
|
|
eeb8ec0a7c | ||
|
|
53e89a1022 | ||
|
|
854d7cedcf | ||
|
|
3350eafd6d | ||
|
|
1c16fa2e1f | ||
|
|
9854b8937b | ||
|
|
58c77fdc27 | ||
|
|
b744e4e636 | ||
|
|
c3ee2e7fac | ||
|
|
768e97d0b9 | ||
|
|
877bbb966f | ||
|
|
d29e0600ca | ||
|
|
abf674657c | ||
|
|
d3f3cc3a7b | ||
|
|
6bc63dedce | ||
|
|
cf951f3e5c | ||
|
|
6f2663e7a0 | ||
|
|
0d199adced | ||
|
|
039d50e5c0 | ||
|
|
aa356dcc20 | ||
|
|
c2a230651e | ||
|
|
298277c0a7 | ||
|
|
9a99e31f92 | ||
|
|
d8785ada2a | ||
|
|
7ce881ff6f | ||
|
|
3cd560b506 | ||
|
|
658a6267d2 | ||
|
|
b6c311a056 | ||
|
|
d594cf1085 | ||
|
|
365a380793 | ||
|
|
76ff2534f3 | ||
|
|
d4339da176 | ||
|
|
960c138f92 | ||
|
|
fe53a46374 | ||
|
|
95cb71d26d | ||
|
|
aa22abfbe1 | ||
|
|
f8727daf08 | ||
|
|
f3e4763baa | ||
|
|
00f8bb71ce | ||
|
|
d08a4b421b | ||
|
|
2c07b7962f | ||
|
|
3b43cfe09f | ||
|
|
009392e8e7 | ||
|
|
9537220a73 | ||
|
|
06cfff69e6 | ||
|
|
ad378cbe33 | ||
|
|
84d60cdec7 | ||
|
|
b0022a44a6 | ||
|
|
1084a56d2b | ||
|
|
2d5b449942 | ||
|
|
97a02fb21d | ||
|
|
1ac54d43da | ||
|
|
2c62c55420 | ||
|
|
3be8570947 | ||
|
|
bbfe427ba4 | ||
|
|
1e95a25e5a | ||
|
|
5751f746a4 | ||
|
|
21fb804398 | ||
|
|
dda7b49dc6 | ||
|
|
81bf1cf71f | ||
|
|
f346096920 | ||
|
|
218aedbf6a | ||
|
|
422f014366 | ||
|
|
4241c6967d | ||
|
|
727a6700d5 | ||
|
|
fd73913eed | ||
|
|
841f472b96 | ||
|
|
b86c705ef1 | ||
|
|
9e7ac15301 | ||
|
|
ce79c1719a | ||
|
|
938196bc94 | ||
|
|
a8c77bc7d0 | ||
|
|
148d11e201 | ||
|
|
b031c036c9 | ||
|
|
a2157bf525 | ||
|
|
f5d1db2c3e | ||
|
|
350ba3ac94 | ||
|
|
23933fa750 | ||
|
|
f3b3f9dcea | ||
|
|
d2700c2e78 | ||
|
|
3a3bff46ce | ||
|
|
3dc35c98bd | ||
|
|
8855009f3b | ||
|
|
0bceb23c11 | ||
|
|
267fabfb30 | ||
|
|
6c6f01e32e | ||
|
|
3654118f4f | ||
|
|
e76be1faae | ||
|
|
5e9e68b812 | ||
|
|
9d808ac08a | ||
|
|
9bba021e3a | ||
|
|
3714c963b9 | ||
|
|
e0e581b9c4 | ||
|
|
a0fc85e10d | ||
|
|
d8f7525c3c | ||
|
|
22e4b732a2 | ||
|
|
16d86f8daf | ||
|
|
d5087990d3 | ||
|
|
177ed7a96e | ||
|
|
f7a210fa16 | ||
|
|
f0d1a6f6ce | ||
|
|
516776e606 | ||
|
|
137ea46823 | ||
|
|
515e646658 | ||
|
|
af121ab737 | ||
|
|
d1e2b0f39a | ||
|
|
8210efd0ff | ||
|
|
d46348b3e0 | ||
|
|
10ed2bb310 | ||
|
|
f6aeb09b46 | ||
|
|
29cf6aaaab | ||
|
|
f2af8c8c71 | ||
|
|
86d7246074 | ||
|
|
7d35359334 | ||
|
|
91b3ad67e6 | ||
|
|
f4aed64695 | ||
|
|
03a05d59a3 | ||
|
|
df49844ca4 | ||
|
|
5e883b7a4f | ||
|
|
61533626e3 | ||
|
|
43115b71dd | ||
|
|
a67815f488 | ||
|
|
2f0739f441 | ||
|
|
8a05d35dfe | ||
|
|
aa05bf7a61 | ||
|
|
88f0b41339 | ||
|
|
cc45405ad0 | ||
|
|
30aab4d4f4 | ||
|
|
1204dc3c01 | ||
|
|
29732864f5 | ||
|
|
6e81240065 | ||
|
|
b35682051c | ||
|
|
be90a7433a | ||
|
|
92e34f3ed0 | ||
|
|
03f2a59c9a | ||
|
|
801573f381 | ||
|
|
822bcf2fdc | ||
|
|
92f061e800 | ||
|
|
89f6240468 | ||
|
|
bf455fb30b | ||
|
|
9ff2a72d72 | ||
|
|
7076292763 | ||
|
|
3b26228e2a | ||
|
|
da0316e4dd | ||
|
|
033fcb37fd | ||
|
|
a61c552cf3 | ||
|
|
dad7d0ce3f | ||
|
|
4267823c16 | ||
|
|
4915d6cd00 | ||
|
|
2750945184 | ||
|
|
ab2e1c19fc | ||
|
|
e3b68c249c | ||
|
|
55ff867745 | ||
|
|
8c7d49ce1e | ||
|
|
194ada1a53 | ||
|
|
685157368a | ||
|
|
3207e85edb | ||
|
|
4cb84da125 | ||
|
|
47ab7cc8da | ||
|
|
032de1c856 | ||
|
|
d6278cf4d9 | ||
|
|
a99ecbbd86 | ||
|
|
46e7a3b371 | ||
|
|
59fcb856a2 | ||
|
|
10d64daec7 | ||
|
|
5b1f02b594 | ||
|
|
8d5eb4bb86 | ||
|
|
a68d3b9fea | ||
|
|
bff01706d3 | ||
|
|
8f5e8157b7 | ||
|
|
02ab791fca | ||
|
|
9500bda665 | ||
|
|
fd266d4985 | ||
|
|
dc5e9b403a | ||
|
|
2358cf13a4 | ||
|
|
20b7ae1c79 | ||
|
|
1365aca89e | ||
|
|
4723ad814e | ||
|
|
5e76d0defd | ||
|
|
4a909a03a3 | ||
|
|
253a4c8acd | ||
|
|
fd7a016357 | ||
|
|
12d696038c | ||
|
|
5797bffb8a | ||
|
|
1a656d8aa7 | ||
|
|
2cd84b4cd7 | ||
|
|
5191e28056 | ||
|
|
06317c5623 | ||
|
|
cc6399b4d5 | ||
|
|
f45de1fede | ||
|
|
6a662c1a9d | ||
|
|
3849b124cf | ||
|
|
5c69640fe0 | ||
|
|
c8e9152cd4 | ||
|
|
7aa69e6261 | ||
|
|
4071dd6dc6 | ||
|
|
2f54fffc04 | ||
|
|
96d1d963f1 | ||
|
|
6361b1ba52 | ||
|
|
c0be791366 | ||
|
|
3b964af2a8 | ||
|
|
55466e06c9 | ||
|
|
1f28c5a550 | ||
|
|
a7e9b6c238 | ||
|
|
f5bf981bca | ||
|
|
728ab648ca | ||
|
|
374763776d | ||
|
|
2bad071cbe | ||
|
|
4c925905ac | ||
|
|
175c0d3676 | ||
|
|
172bb49781 | ||
|
|
ae0cb282f1 | ||
|
|
14973255e8 | ||
|
|
39cb7e9730 | ||
|
|
1d4713efc9 | ||
|
|
320cedffc0 | ||
|
|
d782fc61ca | ||
|
|
de780130e9 | ||
|
|
a30241ba05 | ||
|
|
bb79ca7948 | ||
|
|
f39fbdbc33 | ||
|
|
e5c8b10723 | ||
|
|
c03de93934 | ||
|
|
4252e86f6c | ||
|
|
5d67f9c327 | ||
|
|
3d4b21a62a | ||
|
|
6b044f6feb | ||
|
|
44121b5cef | ||
|
|
e047419c40 | ||
|
|
9e7b754c2c | ||
|
|
cba13e3d15 | ||
|
|
82e08e2088 | ||
|
|
b30aba8ec0 | ||
|
|
0739da3e8c | ||
|
|
033ce36ec4 | ||
|
|
e043336604 | ||
|
|
104971899d | ||
|
|
20b7eaa2ae | ||
|
|
11c92c480c | ||
|
|
c05b6f8783 | ||
|
|
9b8be7a4ae | ||
|
|
ae4c770fd9 | ||
|
|
8d95250074 | ||
|
|
24e139b3ca | ||
|
|
92e434cc59 | ||
|
|
c5c9195302 | ||
|
|
9fbe124ac0 | ||
|
|
6e7c6a9cc3 | ||
|
|
ae40875194 | ||
|
|
e52c4fd8a8 | ||
|
|
2d83e80dfc | ||
|
|
12ad231d6b | ||
|
|
b35960948e | ||
|
|
61a08b1a54 | ||
|
|
940286fb1c | ||
|
|
22c7490c4d | ||
|
|
87115e5a49 | ||
|
|
14ae8c3224 | ||
|
|
ffda9dbeeb | ||
|
|
4d536e38db | ||
|
|
fa08080ad9 | ||
|
|
6adfc6bfa6 | ||
|
|
918a4c91d9 | ||
|
|
da41d89803 | ||
|
|
5af218e201 | ||
|
|
8aaa83d975 | ||
|
|
fb5bd72174 | ||
|
|
e690e412bc | ||
|
|
afe4232ff0 | ||
|
|
34aa827bcd | ||
|
|
df9d89c579 | ||
|
|
072c304843 | ||
|
|
68f4d927c0 | ||
|
|
f914bb2f05 | ||
|
|
512af6dc98 | ||
|
|
3a6a5da964 | ||
|
|
06b1b51c97 | ||
|
|
c045d704f4 | ||
|
|
2ac4fb93a3 | ||
|
|
fc5cfdea80 | ||
|
|
77c606ffad | ||
|
|
9758414022 | ||
|
|
d415329519 | ||
|
|
5b91673b2e | ||
|
|
eb72fbb1a3 | ||
|
|
b09257b93a | ||
|
|
b80617f16a | ||
|
|
0daeecc032 | ||
|
|
bfb7e06d84 | ||
|
|
c3a0ae9bc7 | ||
|
|
8ee6615c9b | ||
|
|
90f701cee0 | ||
|
|
c88ac2817e | ||
|
|
645f530172 | ||
|
|
01dab956f2 | ||
|
|
f31e9e184a | ||
|
|
5076271f06 | ||
|
|
56fe984f6b | ||
|
|
bdccdab341 | ||
|
|
b5df37b8a6 | ||
|
|
d3e4ce05b3 | ||
|
|
cf0efed474 | ||
|
|
c607935314 | ||
|
|
f4920c741f | ||
|
|
cca2e5fcc9 | ||
|
|
c65adbaa24 | ||
|
|
8f4b30c5ce | ||
|
|
f5e32f2df1 | ||
|
|
a4490c1e80 | ||
|
|
3c194f9341 | ||
|
|
1eb1030073 | ||
|
|
d43ae7083a | ||
|
|
5905d6acc1 | ||
|
|
7a15a72b48 | ||
|
|
d414acca70 | ||
|
|
fab167e7ab | ||
|
|
bdbe12be37 | ||
|
|
38d080e8ca | ||
|
|
612b6a7c12 | ||
|
|
3b8c1ad96f | ||
|
|
7557fca3e3 | ||
|
|
72e98582f5 | ||
|
|
43e92a7e26 | ||
|
|
85f1209627 | ||
|
|
fe0a0ab52d | ||
|
|
acd5f7a6de | ||
|
|
3a97f35d33 | ||
|
|
c871243e84 | ||
|
|
864d999137 | ||
|
|
35e1d479ea | ||
|
|
ced02272fe | ||
|
|
388fec8b4d | ||
|
|
d53a7ab034 | ||
|
|
84182160c6 | ||
|
|
c424dc725c | ||
|
|
5499e2a236 | ||
|
|
8082ff2e04 | ||
|
|
0090b7de69 | ||
|
|
7978eda6a0 | ||
|
|
d4423fda70 | ||
|
|
b294f8c72f | ||
|
|
2d6a76a195 | ||
|
|
98e5ef46e1 | ||
|
|
ad4f27ab02 | ||
|
|
e0683c5b96 | ||
|
|
e66d81d179 | ||
|
|
b2d7bfcb3f | ||
|
|
3c64a584db | ||
|
|
5864394fd1 | ||
|
|
0fd39e383e | ||
|
|
0338c89237 | ||
|
|
b0ecf5191b | ||
|
|
e6d1d3a41d | ||
|
|
74fd5a7096 | ||
|
|
ce35be2ae4 | ||
|
|
2c85c3cfe2 | ||
|
|
724ee564ce | ||
|
|
d7d45166cb | ||
|
|
903636d139 | ||
|
|
460bff4c49 | ||
|
|
e1b00fa978 | ||
|
|
7149730967 | ||
|
|
b95acca2fe | ||
|
|
dd19aed169 | ||
|
|
a0aefcf642 | ||
|
|
955fa48f3d | ||
|
|
01d7dc1de2 | ||
|
|
a179cb995d | ||
|
|
08aa9eb651 | ||
|
|
72a3d81e33 | ||
|
|
6bb76f2ad1 | ||
|
|
1b28669e3b | ||
|
|
ff74724cba | ||
|
|
4e5aab32b8 | ||
|
|
7535dff25e | ||
|
|
bb79587d15 | ||
|
|
ad1ef60f63 | ||
|
|
9b9e6b8328 | ||
|
|
568582c0fc | ||
|
|
7d510d571d | ||
|
|
63cb208466 | ||
|
|
287688d772 | ||
|
|
456c9f8a82 | ||
|
|
eadbebad36 | ||
|
|
547df4c3e4 | ||
|
|
791ff8df84 | ||
|
|
6d091ec688 | ||
|
|
20ef036496 | ||
|
|
4defff2d32 | ||
|
|
3f17113145 | ||
|
|
60617f97d8 | ||
|
|
2faee254d0 | ||
|
|
5a413592bd | ||
|
|
db385a8bd7 | ||
|
|
761471061c | ||
|
|
25c6c4fd3c | ||
|
|
79ed9126ca | ||
|
|
7c297b316b | ||
|
|
e0604e6a44 | ||
|
|
4da245455d | ||
|
|
6a1f0c6ce3 | ||
|
|
bb7cbc0dc5 | ||
|
|
4ad9438062 | ||
|
|
495db0227d | ||
|
|
bda7e275dd | ||
|
|
1fde83c771 | ||
|
|
4d79330194 | ||
|
|
c34413af37 | ||
|
|
3db4a0e9ac | ||
|
|
4858a05464 | ||
|
|
0780022acc | ||
|
|
0ed7d1b0ca | ||
|
|
b1a1737850 | ||
|
|
f803585f96 | ||
|
|
d5ccc4ed9e | ||
|
|
9ea87b9464 | ||
|
|
10f906b791 | ||
|
|
5668befe73 | ||
|
|
f9dc3f03b9 | ||
|
|
9d60eadb89 | ||
|
|
1528f1d062 | ||
|
|
022734969c | ||
|
|
5a19c639ba | ||
|
|
299232dd6d | ||
|
|
662226b765 | ||
|
|
53f812c1af | ||
|
|
4cbd7a484c | ||
|
|
c517416200 | ||
|
|
3b00003c68 | ||
|
|
6d4c956f3f | ||
|
|
a517f0d2fa | ||
|
|
3bbe05e233 | ||
|
|
15f72e185c | ||
|
|
8dc19dba47 | ||
|
|
6a31a9a661 | ||
|
|
ec244f8044 | ||
|
|
f929dd8a3c | ||
|
|
181862eab6 | ||
|
|
fac515fed9 | ||
|
|
8ffb403866 | ||
|
|
69224826eb | ||
|
|
e0dc84b7d2 | ||
|
|
5c31397853 | ||
|
|
2648c43ca9 | ||
|
|
f975fa5699 | ||
|
|
766713789c | ||
|
|
b1eab7dd46 | ||
|
|
43ccc3908c | ||
|
|
a91bf4a68d | ||
|
|
303a5331d9 | ||
|
|
7c5142e62d | ||
|
|
54c25b59f5 | ||
|
|
fa863da1e2 | ||
|
|
aaaaa6eada | ||
|
|
f7e61b2f4d | ||
|
|
d73005ea74 | ||
|
|
bcb258b1cd | ||
|
|
7bf5d09c94 | ||
|
|
37ac07a0fd | ||
|
|
0b5099dd72 | ||
|
|
c9a247e9cb | ||
|
|
8e4767a26d | ||
|
|
065a782ee4 | ||
|
|
74891049b2 | ||
|
|
a692927a23 | ||
|
|
c42591d68f | ||
|
|
fed00f2d29 | ||
|
|
cc0f4274fb | ||
|
|
0a4fc62cec | ||
|
|
e2b3da1e6a | ||
|
|
60941822af | ||
|
|
b4ff2d0a9c | ||
|
|
467660d8e8 | ||
|
|
8f3fb51346 | ||
|
|
51bff52b51 | ||
|
|
a349c153c1 | ||
|
|
c52192895e | ||
|
|
b4c2e75b53 | ||
|
|
bf45a76495 | ||
|
|
4bcad7365e | ||
|
|
a8c5407a66 | ||
|
|
45bcef5504 | ||
|
|
d8ae0581db | ||
|
|
ce5cd24903 | ||
|
|
79b0d6b360 | ||
|
|
67cc82f61b | ||
|
|
d3046e16dd | ||
|
|
3fd8415aaa | ||
|
|
0984f9daba | ||
|
|
0d76157146 | ||
|
|
a89d2f4723 | ||
|
|
a6396f40ca | ||
|
|
f6fc5c5388 | ||
|
|
fe1bac57c6 | ||
|
|
b423daf3d1 | ||
|
|
cc2997bfa0 | ||
|
|
c971fc767e | ||
|
|
c4caa1b828 | ||
|
|
ddeef888b9 | ||
|
|
4e2d71768d | ||
|
|
6e10bce240 | ||
|
|
40d3a042e5 | ||
|
|
3f92a4a24f | ||
|
|
96ce0965ff | ||
|
|
8bc0b7e9bf | ||
|
|
54983a3e01 | ||
|
|
0d6b36df4c | ||
|
|
86339f8974 | ||
|
|
9d2575fcb5 | ||
|
|
f56674ebbb | ||
|
|
69c6ffd626 | ||
|
|
8072ba5aac | ||
|
|
8ac744782a | ||
|
|
03dbac5ec8 | ||
|
|
af2f1a5667 | ||
|
|
16e560771a | ||
|
|
f902ddb08d | ||
|
|
31d75d97c5 | ||
|
|
d8a790e7dd | ||
|
|
8dea82607b | ||
|
|
ffea25f59b | ||
|
|
65a4dcd29e | ||
|
|
ced7a9ce15 | ||
|
|
54677fad6a | ||
|
|
9e179ff639 | ||
|
|
bf73e67f74 | ||
|
|
e2e5db7900 | ||
|
|
d65266d7a4 | ||
|
|
83082e1254 | ||
|
|
7654dbfe76 | ||
|
|
b3e24127f2 | ||
|
|
52e1cbaf29 | ||
|
|
d937a9da5c | ||
|
|
9df1b887ce | ||
|
|
56be8b5ead | ||
|
|
dbbe382e38 | ||
|
|
852a3dbb95 | ||
|
|
b4980045e9 | ||
|
|
b775befe31 | ||
|
|
33ac3614b6 | ||
|
|
003e4215aa | ||
|
|
068170f445 | ||
|
|
1544df4261 | ||
|
|
ddb1f29d56 | ||
|
|
bc4ff100ea | ||
|
|
901ad8ab6a | ||
|
|
d1911c6d0a | ||
|
|
a57f896a19 | ||
|
|
43a79c95df | ||
|
|
8983dc7b3a | ||
|
|
b9fbe70f0d | ||
|
|
030f56d8b3 | ||
|
|
b6cbec2b01 | ||
|
|
533392f396 | ||
|
|
76d1ce8a02 | ||
|
|
c79bdc933a | ||
|
|
474493b5ff | ||
|
|
304a701c9b | ||
|
|
ae067511a4 | ||
|
|
e97e909b21 | ||
|
|
073a7fc430 | ||
|
|
fb258c2434 | ||
|
|
12ee36a26b | ||
|
|
a167a4f39d | ||
|
|
f3e223e230 | ||
|
|
fb84fd48e7 | ||
|
|
ef8d610587 | ||
|
|
378ca9ba32 | ||
|
|
be2baf922d | ||
|
|
6737b66f15 | ||
|
|
9dbb6356f3 | ||
|
|
1122aea9e8 | ||
|
|
f7d714738e | ||
|
|
fa9acfe976 | ||
|
|
360e8e2867 | ||
|
|
93341bca3c | ||
|
|
9aabc077d6 | ||
|
|
ad0a29b7ce | ||
|
|
831c4e6f2e | ||
|
|
9a5ab76543 | ||
|
|
ebd0276943 | ||
|
|
072b1c9990 | ||
|
|
a8b9ebcb99 | ||
|
|
700d0e8fd2 | ||
|
|
9e1fb89e0a | ||
|
|
3c10b47a80 | ||
|
|
afcb5dfeef | ||
|
|
6ca7a5e472 | ||
|
|
f93c8688bf | ||
|
|
a5b6f77038 | ||
|
|
c83f68dac3 | ||
|
|
dda492e80e | ||
|
|
a4fd12b258 | ||
|
|
1f6d513fde | ||
|
|
376734369d | ||
|
|
7451e69bbe | ||
|
|
b786fe257c | ||
|
|
ba062622a4 | ||
|
|
a3c240977c | ||
|
|
09781b2e2a | ||
|
|
af8a9989d9 | ||
|
|
47b0b5e410 | ||
|
|
e47c372e52 | ||
|
|
16001eccc7 | ||
|
|
f3dd37550b | ||
|
|
2921cd1a40 | ||
|
|
293eacef9a | ||
|
|
c8d9369bfa | ||
|
|
04ad2b7b2e | ||
|
|
7e7f80fab0 | ||
|
|
8a8c1296e8 | ||
|
|
5ed4e67154 | ||
|
|
a3cdf48282 | ||
|
|
ab64c3ccea | ||
|
|
7d0a856ad7 | ||
|
|
233b7897cf | ||
|
|
46b3aa6437 | ||
|
|
727438403c | ||
|
|
1cd5365b6e | ||
|
|
30897f54b4 | ||
|
|
38278b93b0 | ||
|
|
fd692cb08b | ||
|
|
861ac3345e | ||
|
|
6ef8928139 | ||
|
|
726dbae4d6 | ||
|
|
ff23b14240 | ||
|
|
3233bfeefd | ||
|
|
53db01d7f1 | ||
|
|
dcdbaa821c | ||
|
|
3b6c33c60c | ||
|
|
07fce6e351 | ||
|
|
3dc823d06e | ||
|
|
e9bd9a6f04 | ||
|
|
d86dad5995 | ||
|
|
2cc163f62f | ||
|
|
c0b306795b | ||
|
|
4ae66f30c3 | ||
|
|
1771b4505d | ||
|
|
9254acc87e | ||
|
|
7a8b18de9a | ||
|
|
b8b7a75e99 | ||
|
|
0e1a7a0ed0 | ||
|
|
397b3fb021 | ||
|
|
c43ef01630 | ||
|
|
9d54fd9b86 | ||
|
|
d3232628b5 | ||
|
|
91d0aa8509 | ||
|
|
29e7322c52 | ||
|
|
c24ed5040f | ||
|
|
71ad48391f | ||
|
|
670c65fdd2 | ||
|
|
27d9692424 | ||
|
|
4b94aca125 | ||
|
|
5c0fe0cb75 | ||
|
|
9b2fff433e | ||
|
|
6c232105b6 | ||
|
|
10f8931bb1 | ||
|
|
9f6ff57124 | ||
|
|
10e6892109 | ||
|
|
2535751351 | ||
|
|
906067dd58 | ||
|
|
a85b13ed6d | ||
|
|
f371918a1d | ||
|
|
8f5440eb00 | ||
|
|
7a4dec8993 | ||
|
|
ea266aee4e | ||
|
|
947488d86a | ||
|
|
3c41b28890 | ||
|
|
24a1d95ffd | ||
|
|
300e242585 | ||
|
|
4b5a155616 | ||
|
|
5962d78a48 | ||
|
|
cd319461be | ||
|
|
357445332c | ||
|
|
d3619bd7f6 | ||
|
|
82d866c6cf | ||
|
|
6bcb941cd2 | ||
|
|
4fe3249a0b | ||
|
|
e529936b5b | ||
|
|
9e40851eab | ||
|
|
9714ddf32b | ||
|
|
715c6fb111 | ||
|
|
8ffbeb810f | ||
|
|
0a7cec4477 | ||
|
|
0566a1a59b | ||
|
|
694dab294a | ||
|
|
1120642646 | ||
|
|
7bbd7dc265 | ||
|
|
73b66f889a | ||
|
|
ddac650d1a | ||
|
|
d14d67af13 | ||
|
|
e258285944 | ||
|
|
63567a15ec | ||
|
|
d597acb80e | ||
|
|
ed1e2249a7 | ||
|
|
b7f815f89c | ||
|
|
b9bc5aef4c | ||
|
|
e151e263b2 | ||
|
|
158afbdc12 | ||
|
|
9835afca10 | ||
|
|
1056022318 | ||
|
|
7fad9186b1 | ||
|
|
1067464bba | ||
|
|
fc19e4d611 | ||
|
|
fe8031b9cd | ||
|
|
1c64196513 | ||
|
|
cac1f2ca73 | ||
|
|
a073137744 | ||
|
|
7dda0b46d1 | ||
|
|
ef8a450c12 | ||
|
|
a4e5ac87c1 | ||
|
|
6509f7fe33 | ||
|
|
c876bd8d34 | ||
|
|
bf4d9b0e6e | ||
|
|
d4197fdc08 | ||
|
|
c2fad7c31c | ||
|
|
bee856e4f7 | ||
|
|
9eb0b0e7e7 | ||
|
|
6847f11d25 | ||
|
|
f8edbb23b5 | ||
|
|
6a92b07b86 | ||
|
|
6387c2ef06 | ||
|
|
3b1d6316a3 | ||
|
|
5c84a7ab0a | ||
|
|
1c0e19032f | ||
|
|
b992807046 | ||
|
|
99ba97a000 | ||
|
|
25a72fd5b6 | ||
|
|
a8d5f4106e | ||
|
|
7ae9a2f98b | ||
|
|
1f72525f45 | ||
|
|
f243d1dcf3 | ||
|
|
acaebc81a5 | ||
|
|
2b974aef37 | ||
|
|
443c97021c | ||
|
|
cb5c29698a | ||
|
|
4e4d21df88 | ||
|
|
6950e2ad6c | ||
|
|
818ffd7c28 | ||
|
|
b18568c928 | ||
|
|
9a782a6bb8 | ||
|
|
c56c34b7f6 | ||
|
|
d692d783a1 | ||
|
|
f14b46ebdc | ||
|
|
9a74a5e531 | ||
|
|
58f4cd449d | ||
|
|
af37f5ea47 | ||
|
|
315b363db3 | ||
|
|
2c009fda42 | ||
|
|
34e6308d7f | ||
|
|
f49504d5e7 | ||
|
|
6b8b7d763d | ||
|
|
51fbf93eaa | ||
|
|
735e9a7b96 | ||
|
|
4c980e750e | ||
|
|
68e2a1f984 | ||
|
|
9cba58d9c9 | ||
|
|
fea97f766d | ||
|
|
431ce42998 | ||
|
|
c443242db6 | ||
|
|
9919f852f4 | ||
|
|
8faac21dd0 | ||
|
|
b365e7b285 | ||
|
|
d59e0d9133 | ||
|
|
dfa7caf5d7 | ||
|
|
eb57161317 | ||
|
|
a080db14dd | ||
|
|
b84b36db35 | ||
|
|
e41baa73d3 | ||
|
|
d537a4df3c | ||
|
|
e8dd18ea55 | ||
|
|
699a283d5d | ||
|
|
5159db80ef | ||
|
|
816700526f | ||
|
|
d9296f3270 | ||
|
|
a0aae4cf80 | ||
|
|
ab3b87236d | ||
|
|
6e68565fd3 | ||
|
|
81302cc7d8 | ||
|
|
a73ca54807 | ||
|
|
51eea64691 | ||
|
|
5d69e8d170 | ||
|
|
4dc6c5e2de | ||
|
|
ee2f4321cd | ||
|
|
61c2e2550c | ||
|
|
823c9cb360 | ||
|
|
ff4143ac63 | ||
|
|
da0ab34391 | ||
|
|
8bc39f4630 | ||
|
|
1d7b0ebca2 | ||
|
|
baa82e012c | ||
|
|
ae08d483eb | ||
|
|
c9c2fd7357 | ||
|
|
b8e837b15c | ||
|
|
e9fe9e0d5f | ||
|
|
b9450f6730 | ||
|
|
12eb8ef06d | ||
|
|
86157bf044 | ||
|
|
da1c57cda3 | ||
|
|
d356c1e5d1 | ||
|
|
5d17ac7524 | ||
|
|
d78faebc37 | ||
|
|
80438c6cde | ||
|
|
7cdcf1eeb2 | ||
|
|
5b0bd4a484 | ||
|
|
8d5bd954f8 | ||
|
|
13bdbbbd8b | ||
|
|
9425685ff8 | ||
|
|
b438be51f6 | ||
|
|
65b9e2eb6e | ||
|
|
55a781cd77 | ||
|
|
18348db40d | ||
|
|
5c2f85abc0 | ||
|
|
1501fa2fac | ||
|
|
57dc03667d | ||
|
|
d00d1ac83c | ||
|
|
cb511ac42c | ||
|
|
fdb6cf0011 | ||
|
|
0bcf76ec42 | ||
|
|
11936d43d6 | ||
|
|
535b6f20f2 | ||
|
|
38e0429654 | ||
|
|
55eaac9e1b | ||
|
|
3ba20e6987 | ||
|
|
2bf095e76f | ||
|
|
e9626cd7e8 | ||
|
|
a87a16cc92 | ||
|
|
dfa2438984 | ||
|
|
ecfabe7587 | ||
|
|
c320c4e3e8 | ||
|
|
4b360ed113 | ||
|
|
c3a65006f0 | ||
|
|
51626fd157 | ||
|
|
4641baa587 | ||
|
|
336b360680 | ||
|
|
d04f2cabc2 | ||
|
|
edad48fccf | ||
|
|
b470532432 | ||
|
|
8df826868e | ||
|
|
20a0241bf3 | ||
|
|
70cff4c514 | ||
|
|
05498db6d7 | ||
|
|
859b0ce867 | ||
|
|
bd7758a217 | ||
|
|
ca87a319db | ||
|
|
9fd9013d30 | ||
|
|
dc4faa61c1 | ||
|
|
6530a23cbc | ||
|
|
e2dee5c690 | ||
|
|
786d386ab3 | ||
|
|
fce7355cf6 | ||
|
|
5f0d0b5180 | ||
|
|
72afaea567 | ||
|
|
d0c7beb38b | ||
|
|
b79fb11b45 | ||
|
|
a66c0d63c1 | ||
|
|
4d23237673 | ||
|
|
4c0546033c | ||
|
|
358c639e5a | ||
|
|
69e9874b10 | ||
|
|
6c0300195e | ||
|
|
0f01c7b8cd | ||
|
|
fcad73a0e2 | ||
|
|
5cebd79ae6 | ||
|
|
6c5b533a17 | ||
|
|
26f6f3a656 | ||
|
|
2f06cb4e7d | ||
|
|
3a151b5003 | ||
|
|
4a9a7c847f | ||
|
|
f7ef596567 | ||
|
|
f276a3b1e1 | ||
|
|
bb6b01bb43 | ||
|
|
763808d87d | ||
|
|
29ff86caf8 | ||
|
|
9208ce26b4 | ||
|
|
effa3a810e | ||
|
|
ca4d7fe203 | ||
|
|
503987f4fb | ||
|
|
90f855808b | ||
|
|
fe649f9b61 | ||
|
|
38c8443ca8 | ||
|
|
408e7ac983 | ||
|
|
c2e93a3049 | ||
|
|
401144e72a | ||
|
|
e3719284dd | ||
|
|
19db6dc154 | ||
|
|
5d13b4f0c5 | ||
|
|
9b6e8f4262 | ||
|
|
e318b93922 | ||
|
|
cf4c7a45a1 | ||
|
|
5bd0d8e4eb | ||
|
|
d9a577721b | ||
|
|
96cfd386f4 | ||
|
|
cf4c8d943e | ||
|
|
e5b8777058 | ||
|
|
2e9bbc66b0 | ||
|
|
8dde5c3032 | ||
|
|
f4db2e0924 | ||
|
|
64cec59dfb | ||
|
|
1ed98f9c2b | ||
|
|
ebcf9c86c6 | ||
|
|
424155a7cf | ||
|
|
45dfc06ce7 | ||
|
|
458091d67c | ||
|
|
ca3380c989 | ||
|
|
58b5b0421a | ||
|
|
87e28e9839 | ||
|
|
42de406b2c | ||
|
|
680929647b | ||
|
|
a66738bc2d | ||
|
|
ff7c1e82ca | ||
|
|
5e0b97fa2e | ||
|
|
605cc59292 | ||
|
|
6da005ee84 | ||
|
|
61558cddcc | ||
|
|
fb92157584 | ||
|
|
87b86ce8c9 | ||
|
|
b2b2112364 | ||
|
|
f19738ca45 | ||
|
|
d1943d8d4a | ||
|
|
8e24a6761e | ||
|
|
f26408b04c | ||
|
|
021b4930dd | ||
|
|
0f222d7d84 | ||
|
|
a86d6eecf0 | ||
|
|
4e8a45eab4 | ||
|
|
04e940bfe1 | ||
|
|
b02346f0fb | ||
|
|
acd35b613b | ||
|
|
defd2ba609 | ||
|
|
41c640be48 | ||
|
|
4b6c8e2cd3 | ||
|
|
ad7c192d68 | ||
|
|
ae11650bfc | ||
|
|
1b0b2a125b | ||
|
|
1adc3b3656 | ||
|
|
90696cffcf | ||
|
|
50cb02258b | ||
|
|
268491531c | ||
|
|
24d31a905f | ||
|
|
e75441b73e | ||
|
|
5241986e89 | ||
|
|
a4c56ba812 | ||
|
|
a172f68aab | ||
|
|
bc58cb1179 | ||
|
|
17d28b6514 | ||
|
|
9ee730a434 | ||
|
|
f91f9f2064 | ||
|
|
61cf694220 | ||
|
|
045f03e0f1 | ||
|
|
72434773ff | ||
|
|
c8eebf1935 | ||
|
|
bd7ac1c4da | ||
|
|
1b5cc553ab | ||
|
|
2f151caccc | ||
|
|
da95debbe0 | ||
|
|
e27ea5dbad | ||
|
|
a8a2f95ae3 | ||
|
|
3341a1e9ef | ||
|
|
0b78f800ea | ||
|
|
a159436d81 | ||
|
|
ddb9624bc4 | ||
|
|
6ef4f6a39c | ||
|
|
e95f8cecee | ||
|
|
fe679ddfe9 | ||
|
|
e31243d81f | ||
|
|
80ec4cef5c | ||
|
|
7560074afe | ||
|
|
05a6ca6bac | ||
|
|
c08d46ed5f | ||
|
|
2c83d20b7b | ||
|
|
753ff4b844 | ||
|
|
eb086b139a | ||
|
|
52eaf06781 | ||
|
|
211df66276 | ||
|
|
fd1f07fa3a | ||
|
|
e690a4a290 | ||
|
|
6cef83e2c7 | ||
|
|
44232b1a59 | ||
|
|
2872758e55 | ||
|
|
99293006d2 | ||
|
|
7bb2ae8de3 | ||
|
|
cc2b0abcad | ||
|
|
f94d434ea3 | ||
|
|
e71fe61110 | ||
|
|
d5bd7ab4fa | ||
|
|
6e2759be28 | ||
|
|
230f0645f3 | ||
|
|
889469fd27 | ||
|
|
7f9f34333a | ||
|
|
b2781576cf | ||
|
|
f83af44959 | ||
|
|
e0e98de5e0 | ||
|
|
92a2b2029a | ||
|
|
98682e83a2 | ||
|
|
784435b7cd | ||
|
|
00caaa977c | ||
|
|
5bb1ffc78a | ||
|
|
99a8392be6 | ||
|
|
1bd8bea0e7 | ||
|
|
26cdd45edf | ||
|
|
b42386ef84 | ||
|
|
eb89cf17f8 | ||
|
|
93de6ccf63 | ||
|
|
aaefdbd1db | ||
|
|
33209e43dc | ||
|
|
c979aa25c5 | ||
|
|
3649e630b2 | ||
|
|
5a91a5ddfc | ||
|
|
6a5e7d6cce | ||
|
|
3c9422ec4f | ||
|
|
82ce2b26af | ||
|
|
bea727c0c1 | ||
|
|
65f9cd59fa | ||
|
|
45ad1c71e2 | ||
|
|
e7bc18fc7f | ||
|
|
5655c0ae34 | ||
|
|
1ced18945d | ||
|
|
d5db2db548 | ||
|
|
6c84cd2102 | ||
|
|
426e7eb949 | ||
|
|
6da04cb9b2 | ||
|
|
cae55bbe7b | ||
|
|
f8655c6105 | ||
|
|
0c94dbdc77 | ||
|
|
e950ed88d6 | ||
|
|
db3134a2a8 | ||
|
|
836d14a60f | ||
|
|
e41d8f0647 | ||
|
|
77f3a19327 | ||
|
|
fa065f1652 | ||
|
|
47e00140bb | ||
|
|
231a36a679 | ||
|
|
66a77561a4 | ||
|
|
86868e129c | ||
|
|
2e83f2071a | ||
|
|
fc238c8623 | ||
|
|
9cd514d2f1 | ||
|
|
7b8146183a | ||
|
|
0bb079d92b | ||
|
|
8c2295b971 | ||
|
|
5854031c59 | ||
|
|
b01444f7bc | ||
|
|
f413809f4a | ||
|
|
f8080e8c2f | ||
|
|
67ead90dbb | ||
|
|
0fa3805ee1 | ||
|
|
4a1a9e045c | ||
|
|
32ce05f926 | ||
|
|
5c12496ebe | ||
|
|
b1524a2399 | ||
|
|
0b1d41cb87 | ||
|
|
b7c27006fb | ||
|
|
f3a9f9a24c | ||
|
|
93afffd7ff | ||
|
|
64144297d3 | ||
|
|
a0d50fc6a0 | ||
|
|
aa0ea6b3f9 | ||
|
|
2049c9f6b5 | ||
|
|
f0c5a2e645 | ||
|
|
3e1e531bf4 | ||
|
|
5f5d4c214d | ||
|
|
3dacb6be51 | ||
|
|
c25eccdd52 | ||
|
|
72504499ae | ||
|
|
83743e9b5a | ||
|
|
501ed6f04a | ||
|
|
01dbc6e3c0 | ||
|
|
f1cd5d336f | ||
|
|
0b60922ed0 | ||
|
|
732bb4c901 | ||
|
|
ca24d1c3fa | ||
|
|
a5f504f183 | ||
|
|
cb6752f8c1 | ||
|
|
21f5e9477c | ||
|
|
7296503126 | ||
|
|
d5acb001b9 | ||
|
|
989357e2ad | ||
|
|
b4a448372b | ||
|
|
a7fa139578 | ||
|
|
88bfddd5bb | ||
|
|
518aa115bf | ||
|
|
74f0dd9e37 | ||
|
|
73bcd89098 | ||
|
|
ba16eef595 | ||
|
|
34c55a5114 | ||
|
|
edb4d3210d | ||
|
|
50ce12894c | ||
|
|
550526bfd6 | ||
|
|
cb97f8190d | ||
|
|
db9ee285d0 | ||
|
|
93edeeffb3 | ||
|
|
8b329d58a4 | ||
|
|
0cc2f10f19 | ||
|
|
aa5543cad0 | ||
|
|
5908cb604b | ||
|
|
fdfce14992 | ||
|
|
51d0c5101d | ||
|
|
ec9e2b75cf | ||
|
|
f8d62c16c5 | ||
|
|
ae90321739 | ||
|
|
b3eaafdf32 | ||
|
|
e34475d6e1 | ||
|
|
a8d489f851 | ||
|
|
a14a6284c9 | ||
|
|
79395becd5 | ||
|
|
879a121601 | ||
|
|
6389aa4cc6 | ||
|
|
0fcba4eb02 | ||
|
|
8006f0dd31 | ||
|
|
c16cad780b | ||
|
|
4bc579526e | ||
|
|
bea70f253a | ||
|
|
22d4318438 | ||
|
|
92961e9e41 | ||
|
|
cf1171dac4 | ||
|
|
2812a0a4a1 | ||
|
|
16ff7e9355 | ||
|
|
cb65522af8 | ||
|
|
81bedc058e | ||
|
|
ddbd6572b9 | ||
|
|
4e13352a31 | ||
|
|
5ea8e984cd | ||
|
|
a17efdd1a9 | ||
|
|
1edd6dd9f4 | ||
|
|
4fb8406450 | ||
|
|
e77937c603 | ||
|
|
cafc06fdbb | ||
|
|
b68588e979 | ||
|
|
4026617021 | ||
|
|
98b61e53df | ||
|
|
095816b465 | ||
|
|
1b3ffcdcdb | ||
|
|
945c775af1 | ||
|
|
1fb836ea17 | ||
|
|
f021d78bd7 | ||
|
|
712627fbb2 | ||
|
|
9e064c6abd | ||
|
|
d6a02fdc86 | ||
|
|
9d486e8e8e | ||
|
|
36651bf0cd | ||
|
|
e3817c5a55 | ||
|
|
4844378688 | ||
|
|
5752f5f556 | ||
|
|
c085887862 | ||
|
|
2b4bc06c61 | ||
|
|
e5e4e2e102 | ||
|
|
08a61fb578 | ||
|
|
7b921259da | ||
|
|
db727b7b40 | ||
|
|
6ea6d2fb6f | ||
|
|
9338b8d869 | ||
|
|
bcf452c261 | ||
|
|
7f971e5588 | ||
|
|
839f959f7a | ||
|
|
5114e2142f | ||
|
|
c492fb67a1 | ||
|
|
f2facb1565 | ||
|
|
1b665ea539 | ||
|
|
f2a3c7158a | ||
|
|
34838abe95 | ||
|
|
85fe4059ca | ||
|
|
8b005407f0 | ||
|
|
95501e5d3f | ||
|
|
8ad1e30e0f | ||
|
|
90bafc9cba | ||
|
|
170f524ac2 | ||
|
|
b9cc3e8237 | ||
|
|
f4f0aedf64 | ||
|
|
642691dccd | ||
|
|
67548e7e82 | ||
|
|
d4634024f7 | ||
|
|
75a93bd93f | ||
|
|
f4114294e0 | ||
|
|
40c6773f8b | ||
|
|
175eb358e5 | ||
|
|
cb829494fb | ||
|
|
ed2a9ee19e | ||
|
|
42906eba07 | ||
|
|
59b79a3115 | ||
|
|
26d858b7f6 | ||
|
|
83fe182deb | ||
|
|
1a12c02153 | ||
|
|
751aa9e898 | ||
|
|
ded5cf4b76 | ||
|
|
5c187e0689 | ||
|
|
4f212d1dfb | ||
|
|
ca6d7f14fc | ||
|
|
067fbac069 | ||
|
|
292b226022 | ||
|
|
c65e0ec4f8 | ||
|
|
13159390d2 | ||
|
|
b93a6cfc1c | ||
|
|
169d753a5f | ||
|
|
f31cd528b9 | ||
|
|
bd73fdd3f8 | ||
|
|
bfa6922bde | ||
|
|
f7a62b41f9 | ||
|
|
b696d2648c | ||
|
|
39657e1d78 | ||
|
|
1a5671d3ab | ||
|
|
517134194d | ||
|
|
73a8b73214 | ||
|
|
ab0ed93ca8 | ||
|
|
94bd3d2552 | ||
|
|
2f07aa0c10 | ||
|
|
38ae4f7251 | ||
|
|
8c8be7f871 | ||
|
|
ddb92a3c69 | ||
|
|
1ea910b4e4 | ||
|
|
0a03dd13ac | ||
|
|
463a8468e2 | ||
|
|
0a6977e48e | ||
|
|
0f6dc4fd68 | ||
|
|
fda43c5e4a | ||
|
|
0d8c3fd7a1 | ||
|
|
e638b84bda | ||
|
|
3530a327b2 | ||
|
|
d4a430efa2 | ||
|
|
5f866fa0f5 | ||
|
|
465a47d651 | ||
|
|
3bf9646847 | ||
|
|
92c4133477 | ||
|
|
2ddf8be3ca | ||
|
|
3c3ebf9745 | ||
|
|
eb246d5306 | ||
|
|
3bc2957b7a | ||
|
|
0a10a3bc8b | ||
|
|
575d3fab64 | ||
|
|
dda6d0d1f5 | ||
|
|
c748829484 | ||
|
|
050c2a3e4a | ||
|
|
31419cc4eb | ||
|
|
573dc30eeb | ||
|
|
643238fef2 | ||
|
|
571390d3ef | ||
|
|
a9c1ca532f | ||
|
|
136cb90749 | ||
|
|
2003a344a1 | ||
|
|
821959398b | ||
|
|
0a0678b8c4 | ||
|
|
53f933a408 | ||
|
|
b77fb786b7 | ||
|
|
eb14e5ee17 | ||
|
|
5553e08c9e | ||
|
|
33613481e2 | ||
|
|
64ae81272f | ||
|
|
afd0165ec8 | ||
|
|
5209f5c632 | ||
|
|
ec0b2fc477 | ||
|
|
a426beb9e4 | ||
|
|
dec9142705 | ||
|
|
f1f030c27c | ||
|
|
95110e8725 | ||
|
|
eaa7acdb9f | ||
|
|
960160100e | ||
|
|
f62cec6b27 | ||
|
|
138f283dd4 | ||
|
|
bd587aacd3 | ||
|
|
25af9bb35b | ||
|
|
5a3e326b12 | ||
|
|
de690d7698 | ||
|
|
fc3cf7275a | ||
|
|
5af37380c6 | ||
|
|
ae5749062f | ||
|
|
be87626514 | ||
|
|
7b47f7e7e3 | ||
|
|
5f8ae8420c | ||
|
|
9c765b5b87 | ||
|
|
a7a1bc99b0 | ||
|
|
dd5f90648a | ||
|
|
d82e69afa8 | ||
|
|
ba68668ea3 | ||
|
|
1c7e2fb54a | ||
|
|
20df1e1ac0 | ||
|
|
a64c05a807 | ||
|
|
88938ea93f | ||
|
|
2bef1d2998 | ||
|
|
4dc47433dd | ||
|
|
461f5b6b61 | ||
|
|
22ffd06071 | ||
|
|
acf074d45d | ||
|
|
efb0947a3c | ||
|
|
3aa9446cea | ||
|
|
25458f74bb | ||
|
|
ee1086cdab | ||
|
|
5f96f091fa | ||
|
|
e62b9a07ca | ||
|
|
95ad1daab5 | ||
|
|
1a51f22f1a | ||
|
|
e445822a1c | ||
|
|
f9207c08f4 | ||
|
|
e31141ea5d | ||
|
|
1a1f300cc1 | ||
|
|
3a5c14a623 | ||
|
|
f988c8615d | ||
|
|
e2c4e40413 | ||
|
|
9398c4ecd7 | ||
|
|
f5760e7eb3 | ||
|
|
3c70dd7ca8 | ||
|
|
1ecbc9e7fd | ||
|
|
c59df8124b | ||
|
|
f0f1ff9e1f | ||
|
|
2d6b5c1c2d | ||
|
|
80c5991124 | ||
|
|
727fab5071 | ||
|
|
09af6c1092 | ||
|
|
07982becb6 | ||
|
|
1dc588ab2f | ||
|
|
70829fcf48 | ||
|
|
056cf28a63 | ||
|
|
1a8eb9b1f3 | ||
|
|
839ca42429 | ||
|
|
d75cd553c0 | ||
|
|
f0b531fc70 | ||
|
|
5a69dc4d07 | ||
|
|
d443ae56e1 | ||
|
|
b4a977db33 | ||
|
|
c9a006a2f9 | ||
|
|
fc6b6ceee3 | ||
|
|
2d6da23758 | ||
|
|
6d460e3f06 | ||
|
|
4af8dcbc41 | ||
|
|
beb4a442c0 | ||
|
|
e48388726b | ||
|
|
4ef39dc620 | ||
|
|
e3ad075016 | ||
|
|
569f8e6897 | ||
|
|
56b222775b | ||
|
|
7d415546b0 | ||
|
|
9daf08941d | ||
|
|
8225bd1d9c | ||
|
|
b765835495 | ||
|
|
20e05520b9 | ||
|
|
1d5b3ecf25 | ||
|
|
307b64f891 | ||
|
|
a5c5cddf01 | ||
|
|
c68b39647b | ||
|
|
857ea2e252 | ||
|
|
6c188f6fe7 | ||
|
|
44e67f7c7d | ||
|
|
cd6d0037c0 | ||
|
|
9ccd384fa4 | ||
|
|
965786aed2 | ||
|
|
d928e4ddac | ||
|
|
83ab3bab23 | ||
|
|
223f8e91c6 | ||
|
|
72ff06ee26 | ||
|
|
ab89cdfecc | ||
|
|
ab67aae96c | ||
|
|
ec759acd03 | ||
|
|
b34d76db57 | ||
|
|
ac7233c2f6 | ||
|
|
78f6f229de | ||
|
|
71dab61202 | ||
|
|
315e1fffc2 | ||
|
|
9927580782 | ||
|
|
b6e70a0487 | ||
|
|
ce658d512b | ||
|
|
44e5d93d15 | ||
|
|
4d83de169d | ||
|
|
d348a4e9ab | ||
|
|
e08268685d | ||
|
|
74c0691738 | ||
|
|
b83e00bb67 | ||
|
|
c968df5114 | ||
|
|
10dba00731 | ||
|
|
9b413cab0b | ||
|
|
5bd55575ce | ||
|
|
85d9ea119a | ||
|
|
a1f486ef9a | ||
|
|
8752f42736 | ||
|
|
52ebafa034 | ||
|
|
46aec36943 | ||
|
|
de2267bac0 | ||
|
|
9e747ddf19 | ||
|
|
9931abe651 | ||
|
|
26d26952e3 | ||
|
|
a02a863295 | ||
|
|
af7e0a06cc | ||
|
|
cb584f37c6 | ||
|
|
8011a838ab | ||
|
|
acf6b49a48 | ||
|
|
70e9350002 | ||
|
|
5d903ccb5f | ||
|
|
f11ce5ca4c | ||
|
|
c4d6c73aeb | ||
|
|
71bedef261 | ||
|
|
51696fc40a | ||
|
|
6d6d615a63 | ||
|
|
553e8e8f5e | ||
|
|
405febe992 | ||
|
|
92ad50f04d | ||
|
|
b75e0ddbfb | ||
|
|
9d8651e6b1 | ||
|
|
9851232df6 | ||
|
|
e5ad45b5bd | ||
|
|
d291b28865 | ||
|
|
7010ba00cf | ||
|
|
e8f3e2729d | ||
|
|
01d79b4190 | ||
|
|
2b735a1b27 | ||
|
|
b9c0acc0a2 | ||
|
|
3da2bb0c9f | ||
|
|
826eabf6d9 | ||
|
|
e0f51d7027 | ||
|
|
0c847ee212 | ||
|
|
be4f98c3bc | ||
|
|
66343ffcee | ||
|
|
38c49051cb | ||
|
|
ee79a0f5dd | ||
|
|
17328c4012 | ||
|
|
6f00a7baf1 | ||
|
|
48815cee09 | ||
|
|
b307afe4cc | ||
|
|
ab8362e632 | ||
|
|
4b7e789269 | ||
|
|
2c306b3de9 | ||
|
|
b47d6fc10d | ||
|
|
5a11950d35 | ||
|
|
6e78417c0e | ||
|
|
0d1b31e4d1 | ||
|
|
e0b1ce6a6b | ||
|
|
5819e4979a | ||
|
|
b0c5a7f34a | ||
|
|
de04b31a56 | ||
|
|
c853bf4c4b | ||
|
|
2c2e9d314d | ||
|
|
8089a9b1a9 | ||
|
|
c9b297cd2e | ||
|
|
2f4c821a8c | ||
|
|
73df04eec4 | ||
|
|
81e93a759c | ||
|
|
c8e97fa48a | ||
|
|
dbb5792627 | ||
|
|
891f71eee4 | ||
|
|
dcd32d5c70 | ||
|
|
958cf38835 | ||
|
|
886cace519 | ||
|
|
02b45c471c | ||
|
|
58c6f22581 | ||
|
|
be8493b366 | ||
|
|
4c020bcc00 | ||
|
|
793dede43a | ||
|
|
9677901489 | ||
|
|
16acdc5e3f | ||
|
|
9a2c8179f1 | ||
|
|
866a37470f | ||
|
|
9434b0aefc | ||
|
|
4a849ad3eb | ||
|
|
9d6e1eed77 | ||
|
|
51e6d7da25 | ||
|
|
01108728c5 | ||
|
|
1682133637 | ||
|
|
aeb7b28295 | ||
|
|
9ca8a3c375 | ||
|
|
3d51ca2366 | ||
|
|
b6110d2c3c | ||
|
|
bdd0f4956c | ||
|
|
4b3f973350 | ||
|
|
ed0166f1db | ||
|
|
bd1e7483fb | ||
|
|
2478679da6 | ||
|
|
65fe290a5b | ||
|
|
04d0dcd1ae | ||
|
|
86581dbcfa | ||
|
|
2c256afb90 | ||
|
|
d22bec017c | ||
|
|
dbb80ab0d1 | ||
|
|
04987fe8c2 | ||
|
|
598f28dd63 | ||
|
|
d1358e97fd | ||
|
|
6dc045c3a2 | ||
|
|
ff39b3820a | ||
|
|
357edc322c | ||
|
|
6f14faee25 | ||
|
|
898c319da9 | ||
|
|
cb07ac61ff | ||
|
|
b81f5400ae | ||
|
|
01f9c809ba | ||
|
|
c0d0283f4f | ||
|
|
0bed06a100 | ||
|
|
0d5c69b3dc | ||
|
|
1e7eaf9f8d | ||
|
|
3e3f843750 | ||
|
|
7d19a62068 | ||
|
|
f5f329d919 | ||
|
|
fcb78f0695 | ||
|
|
2abff317c3 | ||
|
|
424a7bd5f9 | ||
|
|
44b4767079 | ||
|
|
df1295094c | ||
|
|
e72b14ebec | ||
|
|
f9e51525af | ||
|
|
9a86a07b1b | ||
|
|
63fdb0b574 | ||
|
|
da4c44e528 | ||
|
|
3ad38bcf0b | ||
|
|
54111460c9 | ||
|
|
12889f5b49 | ||
|
|
f922174b1f | ||
|
|
fe85f33fbb | ||
|
|
977f1f7fe7 | ||
|
|
60d7c851aa | ||
|
|
ff3e46489b | ||
|
|
7b12a0334d | ||
|
|
d11d813ea8 | ||
|
|
d29525429f | ||
|
|
17a9830da0 | ||
|
|
6dad459f6f | ||
|
|
8d0828d01d | ||
|
|
fb6e98659b | ||
|
|
c4a9b2e2c7 | ||
|
|
feeeb9c6e5 | ||
|
|
d3a1b4c5f8 | ||
|
|
09e9d89450 | ||
|
|
899918a8be | ||
|
|
4d7fae424c | ||
|
|
a4018d9ea9 | ||
|
|
0186c61d8d | ||
|
|
d1c83fa406 | ||
|
|
27085c8d89 | ||
|
|
390af0f971 | ||
|
|
e33abfe1ce | ||
|
|
2bde81b92b | ||
|
|
068756d821 | ||
|
|
56b339685e | ||
|
|
a3600d2ad1 | ||
|
|
6c7c586272 | ||
|
|
6aea6acbdd | ||
|
|
7b6125768b | ||
|
|
869f09ca92 | ||
|
|
f206ab690e | ||
|
|
2f9cc4b128 | ||
|
|
15b788703c | ||
|
|
12a77bd184 | ||
|
|
e21447d1e0 | ||
|
|
47bff0a065 | ||
|
|
f0a1c21adf | ||
|
|
4b15498292 | ||
|
|
ed80e9ad92 | ||
|
|
8891347238 | ||
|
|
9affe1d153 | ||
|
|
b5c475787c | ||
|
|
4cfd160b80 | ||
|
|
0d5d8dd51e | ||
|
|
5966f2478a | ||
|
|
f6e15b701a | ||
|
|
c9ba9c64dc | ||
|
|
8f720e0943 | ||
|
|
168c3705c6 | ||
|
|
ee96d98681 | ||
|
|
a9b4cb7515 | ||
|
|
30649c62ba | ||
|
|
0aa3ce9bc2 | ||
|
|
b4e87bafad | ||
|
|
3a488100eb | ||
|
|
40e8999e40 | ||
|
|
914e467a98 | ||
|
|
072424c974 | ||
|
|
a19730ed38 | ||
|
|
d35e81719f | ||
|
|
805f57c60f | ||
|
|
04e70594d1 | ||
|
|
53271138d8 | ||
|
|
e8b3e5a4d2 | ||
|
|
9d803d9084 | ||
|
|
1a286497ca | ||
|
|
df20575389 | ||
|
|
50fef1cc5e | ||
|
|
5005056c08 | ||
|
|
0ba5bc52ae | ||
|
|
43d2254ded | ||
|
|
b1be3f4016 | ||
|
|
6105575789 | ||
|
|
9b3a845780 | ||
|
|
b1ff4140ee | ||
|
|
70aa6dba85 | ||
|
|
a686fc891b | ||
|
|
58006fb10f | ||
|
|
c2a13c0ac1 | ||
|
|
50d50d5f9c | ||
|
|
9a8dea60ee | ||
|
|
f244ffbdd6 | ||
|
|
035ed46bb5 | ||
|
|
85b98e0160 | ||
|
|
39d48aedbb | ||
|
|
62a52afd0c | ||
|
|
8a3a1251d3 | ||
|
|
c2069142e7 | ||
|
|
589201c307 | ||
|
|
3d164442b1 | ||
|
|
46a634bc19 | ||
|
|
70936bf2ff | ||
|
|
aa380de8e9 | ||
|
|
b474cb8a97 | ||
|
|
2f70d2e668 | ||
|
|
b7cb0633c4 | ||
|
|
cac8ba4310 | ||
|
|
87506d5097 | ||
|
|
3176c0d2a4 | ||
|
|
0d2c3d6058 | ||
|
|
ba16dd127e | ||
|
|
90735d6f61 | ||
|
|
943edc668f | ||
|
|
7b7937b807 | ||
|
|
572298288c | ||
|
|
e1e5a2a6f1 | ||
|
|
0744b9ee00 | ||
|
|
8c11ea56e0 | ||
|
|
7dc7a687d2 | ||
|
|
0220720066 | ||
|
|
36c48a1f6a | ||
|
|
cbbd6fb539 | ||
|
|
52148e4d9c | ||
|
|
67028224e2 | ||
|
|
01e7c5fab7 | ||
|
|
278dd22f03 | ||
|
|
b142df599a | ||
|
|
06395bc517 | ||
|
|
6ab421ca7c | ||
|
|
79a6f20984 | ||
|
|
6ca4d43048 | ||
|
|
52581f47aa | ||
|
|
9527b379c7 | ||
|
|
e619d6fc7c | ||
|
|
7a3e6639d5 | ||
|
|
37eba2b798 | ||
|
|
e377996066 | ||
|
|
3a9a356b60 | ||
|
|
30f7d9e23f | ||
|
|
85bf8c8fb4 | ||
|
|
38d0af9333 | ||
|
|
e7f0b0e6e4 | ||
|
|
d793a48053 | ||
|
|
c56420bdaf | ||
|
|
edf1c61246 | ||
|
|
7d3015eda3 | ||
|
|
85565622cc | ||
|
|
6c7a644159 | ||
|
|
1c45721015 | ||
|
|
6738fc00b6 | ||
|
|
b4a63e1b65 | ||
|
|
02e56d096c | ||
|
|
ec2a2ad12c | ||
|
|
114dd11eed | ||
|
|
ca9282e17c | ||
|
|
3c651c0153 | ||
|
|
7d6358f8fc | ||
|
|
4fda431336 | ||
|
|
4b6476a5c9 | ||
|
|
be63bbfcfc | ||
|
|
d13f63a9db | ||
|
|
29e6249ac1 | ||
|
|
0936a7cef0 | ||
|
|
ecfc39a688 | ||
|
|
ad66f47ab5 | ||
|
|
a7e8288316 | ||
|
|
5c49903375 | ||
|
|
b418eb136e | ||
|
|
77fb90f83b | ||
|
|
ab2a33bd20 | ||
|
|
7ba9f2d1c5 | ||
|
|
2aec1606d4 | ||
|
|
811171d8cb | ||
|
|
f607d9793e | ||
|
|
931a22f26b | ||
|
|
388f6c3fbb | ||
|
|
df7a557ec3 | ||
|
|
e9cd5892c6 | ||
|
|
3ec8782659 | ||
|
|
776256bb10 | ||
|
|
43405e0d52 | ||
|
|
d534e8ff3c | ||
|
|
e929b26421 | ||
|
|
4129548ff2 | ||
|
|
e37ddd0cda | ||
|
|
943b0a4c74 | ||
|
|
99bf7967f4 | ||
|
|
16c2639a60 | ||
|
|
cd45b13677 | ||
|
|
96abba64cb | ||
|
|
ecf432b21f | ||
|
|
aa3b124b3f | ||
|
|
1ab984a1af | ||
|
|
807c7a00e9 | ||
|
|
ed486643da | ||
|
|
f02192bdee | ||
|
|
c1c9f64869 | ||
|
|
65516669cc | ||
|
|
ef3625406f | ||
|
|
c4e2261977 | ||
|
|
60cfbceeb2 | ||
|
|
33dadb9240 | ||
|
|
45d499f29b | ||
|
|
a38b60f537 | ||
|
|
e5b0c39cc0 | ||
|
|
09b20ef1df | ||
|
|
3352b66874 | ||
|
|
723fd0db48 | ||
|
|
a508954d9b | ||
|
|
c41f9aa079 | ||
|
|
76152f2135 | ||
|
|
376653238f | ||
|
|
bf8a257f80 | ||
|
|
34578d29a0 | ||
|
|
b285a9e360 | ||
|
|
ff7f60b684 | ||
|
|
8429169df5 | ||
|
|
3d2d5f544f | ||
|
|
a6f1ecb450 | ||
|
|
529933e14f | ||
|
|
2c948ee683 | ||
|
|
e6bb9498ee | ||
|
|
f6dff658e9 | ||
|
|
0b383c1d78 | ||
|
|
3443dd9f0e | ||
|
|
7b02c6d19e | ||
|
|
391019dc2c | ||
|
|
8a40115287 | ||
|
|
de07b8d410 | ||
|
|
a674a12422 | ||
|
|
64d32bc1a9 | ||
|
|
ab6ec76c4d | ||
|
|
18252bc48b | ||
|
|
9ff7bb94ea | ||
|
|
e819a06972 | ||
|
|
ca0cb58027 | ||
|
|
7474ccc4a0 | ||
|
|
ba894a2d01 | ||
|
|
ad6449583d | ||
|
|
6a47e8068a | ||
|
|
33359b80b5 | ||
|
|
7e3afcf26f | ||
|
|
3a136e2217 | ||
|
|
d014371d2d | ||
|
|
1da5e9e25e | ||
|
|
88f0c76909 | ||
|
|
bd1340dc29 | ||
|
|
d7e3258a81 | ||
|
|
eaed36d3e2 | ||
|
|
bc75854c14 | ||
|
|
b4a47a9861 | ||
|
|
f14f3467c1 | ||
|
|
7e4958958b | ||
|
|
01aa33c91c | ||
|
|
f512f2bbc3 | ||
|
|
739bdf33c1 | ||
|
|
2988195a61 | ||
|
|
b6b0b8afda | ||
|
|
3262a36397 | ||
|
|
f3926530d5 | ||
|
|
3cc7c008cd | ||
|
|
cf843bc9b2 | ||
|
|
2abd5c3157 | ||
|
|
94f803c2c3 | ||
|
|
d1a4dd4f04 | ||
|
|
0ff9eafab4 | ||
|
|
46a8719065 | ||
|
|
2391301a89 | ||
|
|
cdde8c7dd3 | ||
|
|
d16299751e | ||
|
|
1f69c02407 | ||
|
|
861f4c54ac | ||
|
|
ec47fc497c | ||
|
|
715d7e0780 | ||
|
|
57a2bb6907 | ||
|
|
fddea1c06c | ||
|
|
e7900f1871 | ||
|
|
57363b125c | ||
|
|
e3dca6f594 | ||
|
|
8c7afa2b65 | ||
|
|
60a2ffd6a1 | ||
|
|
0e128015ac | ||
|
|
e679e16997 | ||
|
|
4cf69b3ce3 | ||
|
|
0d6a80a4bb | ||
|
|
0dc194375f | ||
|
|
b144b93211 | ||
|
|
f06a7c002e | ||
|
|
3d224b0911 | ||
|
|
f288530ace | ||
|
|
c63b98c7eb | ||
|
|
f20b08f057 | ||
|
|
127f609447 | ||
|
|
90f3968ca4 | ||
|
|
2bfeba936c | ||
|
|
861f679532 | ||
|
|
59208ea8e0 | ||
|
|
89020f859e | ||
|
|
90a6dfd82c | ||
|
|
0e1edf614f | ||
|
|
738e081f7c | ||
|
|
daed5695b8 | ||
|
|
5741b48cad | ||
|
|
822aa05814 | ||
|
|
492833f7cc | ||
|
|
9cc94f02cd | ||
|
|
10748492f6 | ||
|
|
992f3ed148 | ||
|
|
a55eb44974 | ||
|
|
63f6ee74d5 | ||
|
|
6e7fe92b09 | ||
|
|
6417df93ef | ||
|
|
d982a0c526 | ||
|
|
985d1d4f5d | ||
|
|
b9eeff26ec | ||
|
|
4a0f6acf08 | ||
|
|
8e5904ce24 | ||
|
|
67f3df9ea1 | ||
|
|
930d3a8376 | ||
|
|
f74c5a2421 | ||
|
|
4446eabbf3 | ||
|
|
97db51b03d | ||
|
|
04036664cd | ||
|
|
a83c005751 | ||
|
|
e22141b43b | ||
|
|
d7dcb593c7 | ||
|
|
e78b6416c2 | ||
|
|
00a1b58d21 | ||
|
|
873f65621c | ||
|
|
0c5c3f78ae | ||
|
|
3b483d8209 | ||
|
|
b941398e09 | ||
|
|
076553af57 | ||
|
|
b3bc2391fa | ||
|
|
da81066722 | ||
|
|
9b11f1b0af | ||
|
|
eb5b6bfd08 | ||
|
|
f128dfb46b | ||
|
|
37c1fa29af | ||
|
|
f0967cda10 | ||
|
|
162c530b16 | ||
|
|
c587ffe998 | ||
|
|
47b893d895 | ||
|
|
991378ff5e | ||
|
|
8904a09db5 | ||
|
|
19ac8a8d84 | ||
|
|
e395496a29 | ||
|
|
96eab15224 | ||
|
|
6ebb09e576 | ||
|
|
3d37751e19 | ||
|
|
7ada03aefc | ||
|
|
c3178b792e | ||
|
|
e31fa995ed | ||
|
|
4f2d0a9dac | ||
|
|
c4b6c5af00 | ||
|
|
531758dbb4 | ||
|
|
b4bb33dac3 | ||
|
|
f68e749c8b | ||
|
|
8a2c7868fb | ||
|
|
9caaabcc10 | ||
|
|
7a6b9817cc | ||
|
|
9e9cb2fc7c | ||
|
|
c29db87705 | ||
|
|
98e92c1ba9 | ||
|
|
246aea4410 | ||
|
|
47ed3411c3 | ||
|
|
df9186e2bc | ||
|
|
e456dfae91 | ||
|
|
77c9718bde | ||
|
|
48ee495f01 | ||
|
|
35772f6f4c | ||
|
|
2518cd7fad | ||
|
|
e20a9945a1 | ||
|
|
4566fb535b | ||
|
|
e4bbbe83de | ||
|
|
ecb7927d80 | ||
|
|
13b5500ba3 | ||
|
|
c981ebf61c | ||
|
|
ae8c42a6f4 | ||
|
|
307b0d276b | ||
|
|
ab4b9ed8e0 | ||
|
|
307e398404 | ||
|
|
e07b4c1b35 | ||
|
|
b835c29c3e | ||
|
|
81d93848f0 | ||
|
|
7bdb802715 | ||
|
|
c8f7ebfe63 | ||
|
|
6b3dd9d642 | ||
|
|
2fffc35507 | ||
|
|
9e73b286fe | ||
|
|
ab5246a768 | ||
|
|
784b2dd57b | ||
|
|
858853ff87 | ||
|
|
7cfa8e64c4 | ||
|
|
5f475d64f6 | ||
|
|
f9f77e73de | ||
|
|
0ed5164758 | ||
|
|
ca270b69bf | ||
|
|
f0d9433954 | ||
|
|
840acb0db5 | ||
|
|
25428c5c64 | ||
|
|
52bea38360 | ||
|
|
a38af362a7 | ||
|
|
689da41ca0 | ||
|
|
9f6db5a709 | ||
|
|
5e987d2489 | ||
|
|
f3cecbf649 | ||
|
|
dcb61be6c1 | ||
|
|
de4545ac35 | ||
|
|
969e21496b | ||
|
|
6191900cab | ||
|
|
67ee809929 | ||
|
|
db67978a0a | ||
|
|
79374b514b | ||
|
|
ecf99805e4 | ||
|
|
e7d529ebd1 | ||
|
|
1e545b2e81 | ||
|
|
78c02b74a7 | ||
|
|
2923002831 | ||
|
|
e94a6acda8 | ||
|
|
714b51280f | ||
|
|
7265213615 | ||
|
|
bfeea864ea | ||
|
|
5042bb2d30 | ||
|
|
76d8c32a10 | ||
|
|
f4593f1a78 | ||
|
|
da662eeea7 | ||
|
|
8a19b66a7c | ||
|
|
d0fb62d700 | ||
|
|
c93017e863 | ||
|
|
28703b942c | ||
|
|
154d93971a | ||
|
|
07ceb9e71c | ||
|
|
c1526a5251 | ||
|
|
83478013af | ||
|
|
3c4c93afa1 | ||
|
|
daab4c1f4c | ||
|
|
edf83c6cd6 | ||
|
|
d97c123a81 | ||
|
|
ef7e4e3743 | ||
|
|
709635468a | ||
|
|
ff976d776d | ||
|
|
e6b9c1e197 | ||
|
|
9c70ff699d | ||
|
|
73de839dd7 | ||
|
|
179c4c0111 | ||
|
|
46045b394a | ||
|
|
8c4c191580 | ||
|
|
dca063f714 | ||
|
|
126a9b7f60 | ||
|
|
0140ed3af2 | ||
|
|
ed1fc72b3e | ||
|
|
966e87d540 | ||
|
|
ef265319b8 | ||
|
|
e769459750 | ||
|
|
bfb10c7fae | ||
|
|
b5cc350bd4 | ||
|
|
6136114f39 | ||
|
|
3c07440a65 | ||
|
|
d6b8386581 | ||
|
|
cc0b022772 | ||
|
|
f410e9f281 | ||
|
|
13298d275a | ||
|
|
b87047f2a5 | ||
|
|
778cb24ef4 | ||
|
|
8e9ce2be93 | ||
|
|
f054d8ebe7 | ||
|
|
1151308cf0 | ||
|
|
a125c72d9b | ||
|
|
1a055590ab | ||
|
|
f51e958f3e | ||
|
|
6b9b19e010 | ||
|
|
ee51e87c47 | ||
|
|
d4308b507a | ||
|
|
04c86d73f7 | ||
|
|
71f6b17411 | ||
|
|
618d9ec8d7 | ||
|
|
71dee0899c | ||
|
|
0d2bde26d8 | ||
|
|
c6fcf205bb | ||
|
|
1d961328df | ||
|
|
6c8bd66a32 | ||
|
|
2fabd4ccad | ||
|
|
ad253d37ca | ||
|
|
7d27a0daad | ||
|
|
97f686d78c | ||
|
|
b4c2275ed0 | ||
|
|
9b6794d44c | ||
|
|
4a6332a214 | ||
|
|
d5a312024f | ||
|
|
e13b47e743 | ||
|
|
0b9f89f0d8 | ||
|
|
0503d1a3d0 | ||
|
|
ded9d238a5 | ||
|
|
d4634aba3d | ||
|
|
caf8397f30 | ||
|
|
6009659a90 | ||
|
|
8f7dd9c564 | ||
|
|
f5b747b20b | ||
|
|
7d103e0331 | ||
|
|
6eab060ba1 | ||
|
|
a6df12a0f6 | ||
|
|
843ec68778 | ||
|
|
e9d30f1ebc | ||
|
|
0ef28aebb3 | ||
|
|
03f596acd6 | ||
|
|
ba5a80f5bd | ||
|
|
192c50dc19 | ||
|
|
e469132bc2 | ||
|
|
ec47d909ea | ||
|
|
8c7cfc52d1 | ||
|
|
5c1f007583 | ||
|
|
f538e7840a | ||
|
|
e48117359d | ||
|
|
49044f9a3a | ||
|
|
e280789a88 | ||
|
|
9849e524b7 | ||
|
|
01ed6f94df | ||
|
|
e448539c27 | ||
|
|
aa1727f913 | ||
|
|
fce1d10fb6 | ||
|
|
77196885e6 | ||
|
|
6ad05b9ea5 | ||
|
|
532ac12efb | ||
|
|
0d51dc65ff | ||
|
|
ff478ef551 | ||
|
|
514732e6f4 | ||
|
|
f30b49edcb | ||
|
|
9ff2328aa5 | ||
|
|
902546fa1d | ||
|
|
89efd0f65a | ||
|
|
4035d51f10 | ||
|
|
dc30e5998c | ||
|
|
ebb951b148 | ||
|
|
433d3af967 | ||
|
|
f9e4cb25aa | ||
|
|
ba97acdc6d | ||
|
|
8a9fd9e580 | ||
|
|
d0987df95f | ||
|
|
78cfb1bb22 | ||
|
|
8e3b74c6cf | ||
|
|
74513dad3c | ||
|
|
05c5dfecdc | ||
|
|
11481ea927 | ||
|
|
84b9551c2a | ||
|
|
3c8b2b33e3 | ||
|
|
8f4806600a | ||
|
|
7c3257d6ab | ||
|
|
074183292e | ||
|
|
bd62da3fb8 | ||
|
|
39826bfdaf | ||
|
|
2e2ef977f4 | ||
|
|
572c89cc71 | ||
|
|
89d08199b2 | ||
|
|
841eb99d32 | ||
|
|
35f3674b05 | ||
|
|
fc8f18ede8 | ||
|
|
17ff11d2db | ||
|
|
120229a1fc | ||
|
|
eb97b81cf5 | ||
|
|
d908e2d3d8 | ||
|
|
18741a2d21 | ||
|
|
f1a55693bd | ||
|
|
dac5e56b37 | ||
|
|
cf5f13c0c6 | ||
|
|
c0a163eddd | ||
|
|
74029aa39f | ||
|
|
9eb95d4aed | ||
|
|
603326ad56 | ||
|
|
de4464b584 | ||
|
|
81d29352bb | ||
|
|
92dd0623c0 | ||
|
|
2ae361eabe | ||
|
|
d93f453d48 | ||
|
|
a46d07c43d | ||
|
|
f7e3c96729 | ||
|
|
0e52e9b97a | ||
|
|
492232ac44 | ||
|
|
f571b33b80 | ||
|
|
87b004006d | ||
|
|
7c19329053 | ||
|
|
ad2a8546b2 | ||
|
|
1bfa4fee99 | ||
|
|
4edf8f2b0f | ||
|
|
b9407d3971 | ||
|
|
9501633b32 | ||
|
|
90b9a8240a | ||
|
|
9c6542ebad | ||
|
|
968987e0c4 | ||
|
|
77961e0d07 | ||
|
|
2cbfcac3d4 | ||
|
|
e94dc5a898 | ||
|
|
b217ed22ea |
36
mozilla/gfx/Makefile.in
Normal file
36
mozilla/gfx/Makefile.in
Normal file
@@ -0,0 +1,36 @@
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
|
||||
DEPTH = ..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
DIRS = public idl src
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += tests
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
11
mozilla/gfx/idl/MANIFEST_IDL
Normal file
11
mozilla/gfx/idl/MANIFEST_IDL
Normal file
@@ -0,0 +1,11 @@
|
||||
#
|
||||
# This is a list of local files which get copied to the mozilla:dist:widget directory
|
||||
#
|
||||
|
||||
nsIFontEnumerator.idl
|
||||
nsIFontList.idl
|
||||
nsIScriptableRegion.idl
|
||||
nsIScreen.idl
|
||||
nsIScreenManager.idl
|
||||
nsIPrintOptions.idl
|
||||
nsIPrintSettings.idl
|
||||
44
mozilla/gfx/idl/Makefile.in
Normal file
44
mozilla/gfx/idl/Makefile.in
Normal file
@@ -0,0 +1,44 @@
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
|
||||
DEPTH = ../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE = gfx
|
||||
XPIDL_MODULE = gfx
|
||||
|
||||
XPIDLSRCS = \
|
||||
nsIFontEnumerator.idl \
|
||||
nsIFontList.idl \
|
||||
nsIScriptableRegion.idl \
|
||||
nsIGraphics.idl \
|
||||
nsIScreen.idl \
|
||||
nsIScreenManager.idl \
|
||||
nsIPrintOptions.idl \
|
||||
nsIPrintSettings.idl \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
89
mozilla/gfx/idl/geniid.pl
Normal file
89
mozilla/gfx/idl/geniid.pl
Normal file
@@ -0,0 +1,89 @@
|
||||
#!/usr/local/bin/perl
|
||||
|
||||
require "find.pl";
|
||||
|
||||
$uuid = 0x6f7652e0;
|
||||
$format = "{ 0x%x, 0xee43, 0x11d1, \\\
|
||||
{ 0x9c, 0xc3, 0x00, 0x60, 0x08, 0x8c, 0xa6, 0xb3 } }";
|
||||
$pattern = "--- IID GOES HERE ---";
|
||||
$mydir = cwd();
|
||||
|
||||
sub replaceText {
|
||||
local ($oldname) = $_;
|
||||
local ($newname) = $_;
|
||||
local ($found) = 0;
|
||||
local ($tempname) = $oldname.'.orig';
|
||||
local ($replacement);
|
||||
|
||||
if (-T $oldname && -s $oldname) {
|
||||
open(FILE, "<$oldname")
|
||||
|| die "Unable to open $oldname\n";
|
||||
while (<FILE>) {
|
||||
if (/$pattern/) {
|
||||
$found = 1;
|
||||
last;
|
||||
}
|
||||
}
|
||||
close(FILE);
|
||||
|
||||
if ($found) {
|
||||
print "Setting IID for file: ", $oldname, "\n";
|
||||
rename($oldname, $tempname)
|
||||
|| die "Unable to rename $oldname as $tempname";
|
||||
open(REPLACEFILE, ">$newname")
|
||||
|| die "Unable to open $newname for writing\n";
|
||||
|
||||
open(SEARCHFILE, "<$tempname")
|
||||
|| die "Unable to open $tempname\n";
|
||||
|
||||
while (<SEARCHFILE>) {
|
||||
if (/$pattern/) {
|
||||
$replacement = sprintf($format, $uuid++);
|
||||
s/$pattern/$replacement /g;
|
||||
}
|
||||
print REPLACEFILE;
|
||||
}
|
||||
close(SEARCHFILE);
|
||||
close(REPLACEFILE);
|
||||
if (-z $newname) {
|
||||
die "$newname has zero size\n."
|
||||
."Restore manually from $tempname\n";
|
||||
} else {
|
||||
unlink($tempname);
|
||||
}
|
||||
|
||||
warn "$name: Renaming as $newname\n" if $newname ne $oldname;
|
||||
|
||||
$_ = $oldname;
|
||||
return;
|
||||
}
|
||||
}
|
||||
if ($newname ne $oldname) {
|
||||
warn "$name: Renaming as $newname\n";
|
||||
rename($oldname, $newname) || warn "Unable to rename $oldname\n";
|
||||
}
|
||||
$_ = $oldname;
|
||||
}
|
||||
|
||||
eval 'exec /usr/local/bin/perl -S $0 ${1+"$@"}'
|
||||
if $running_under_some_shell;
|
||||
|
||||
# Traverse desired filesystems
|
||||
$dont_use_nlink = 1;
|
||||
|
||||
if (!$ARGV[0]) {
|
||||
&find('.');
|
||||
}
|
||||
else {
|
||||
foreach $file (@ARGV) {
|
||||
chdir $mydir
|
||||
&find($file);
|
||||
}
|
||||
}
|
||||
|
||||
exit;
|
||||
|
||||
sub wanted {
|
||||
/^nsIDOM.*\.h$/ &&
|
||||
&replaceText($name);
|
||||
}
|
||||
42
mozilla/gfx/idl/makefile.win
Normal file
42
mozilla/gfx/idl/makefile.win
Normal file
@@ -0,0 +1,42 @@
|
||||
#!nmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
|
||||
DEPTH=..\..
|
||||
|
||||
|
||||
DEFINES=-D_IMPL_NS_UI
|
||||
MODULE=gfx
|
||||
|
||||
XPIDLSRCS = \
|
||||
.\nsIFontEnumerator.idl \
|
||||
.\nsIFontList.idl \
|
||||
.\nsIScriptableRegion.idl \
|
||||
.\nsIScreen.idl \
|
||||
.\nsIScreenManager.idl \
|
||||
.\nsIPrintOptions.idl \
|
||||
.\nsIPrintSettings.idl \
|
||||
$(NULL)
|
||||
|
||||
EXPORTS= \
|
||||
$(NULL)
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
61
mozilla/gfx/idl/nsIFontEnumerator.idl
Normal file
61
mozilla/gfx/idl/nsIFontEnumerator.idl
Normal file
@@ -0,0 +1,61 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape Communications
|
||||
* Corp. Portions created by Netscape are Copyright (C) 1999 Netscape
|
||||
* Communications Corp. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Erik van der Poel
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
[scriptable, uuid(a6cf9114-15b3-11d2-932e-00805f8add32)]
|
||||
interface nsIFontEnumerator : nsISupports
|
||||
{
|
||||
/**
|
||||
* Return a sorted array of the names of all installed fonts.
|
||||
*
|
||||
* @param aCount returns number of names returned
|
||||
* @param aResult returns array of names
|
||||
* @return void
|
||||
*/
|
||||
void EnumerateAllFonts(out PRUint32 aCount,
|
||||
[retval, array, size_is(aCount)] out wstring aResult);
|
||||
|
||||
/**
|
||||
* Return a sorted array of names of fonts that support the given language
|
||||
* group and are suitable for use as the given CSS generic font.
|
||||
*
|
||||
* @param aLangGroup language group
|
||||
* @param aGeneric CSS generic font
|
||||
* @param aCount returns number of names returned
|
||||
* @param aResult returns array of names
|
||||
* @return void
|
||||
*/
|
||||
void EnumerateFonts(in string aLangGroup, in string aGeneric,
|
||||
out PRUint32 aCount, [retval, array, size_is(aCount)] out wstring aResult);
|
||||
/*
|
||||
@param aLangGroup language group
|
||||
@return bool do we have a font for this language group
|
||||
*/
|
||||
void HaveFontFor(in string aLangGroup, [retval] out boolean aResult);
|
||||
|
||||
/*
|
||||
* update the global font list
|
||||
* return true if font list is changed
|
||||
*/
|
||||
boolean updateFontList();
|
||||
};
|
||||
80
mozilla/gfx/idl/nsIFontList.idl
Executable file
80
mozilla/gfx/idl/nsIFontList.idl
Executable file
@@ -0,0 +1,80 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2001
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Brian Stell <bstell@netscape.com>
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
interface nsISimpleEnumerator;
|
||||
|
||||
/**
|
||||
* The nsIFontList interface provides an application the
|
||||
* necessary information so that the user can select the font to use
|
||||
* as the default style sheet. This is used if the style sheet is
|
||||
* missing or does not specify a font.
|
||||
* <P>Font lists are specified per language group.
|
||||
*
|
||||
*/
|
||||
|
||||
[scriptable, uuid(702909c6-1dd2-11b2-b833-8a740f643539)]
|
||||
interface nsIFontList : nsISupports
|
||||
{
|
||||
|
||||
/**
|
||||
* Get the list of available fonts for a language group
|
||||
* and for use as the given CSS generic font.
|
||||
*
|
||||
* @param aLangGroup limits the fonts to fonts in a language
|
||||
* group; eg: x-western (American/Western European),
|
||||
* ar (Arabic), el (Greek), he (Hebrew), ja (Japanese),
|
||||
* ko (Korean), th (Thai), tr (Turkish),
|
||||
* x-baltic (Baltic), x-central-euro (Eastern European),
|
||||
* x-cyrillic (Russian), zh-CN (China), zh-TW (Taiwan)
|
||||
*
|
||||
* @param aFontType limits the fonts to the fonts with this CSS
|
||||
* generic font type; eg: serif, sans-serif, cursive,
|
||||
* fantasy, monospace.
|
||||
*
|
||||
* @return a simple enumerator of the available fonts for a
|
||||
* language group / generic type. These strings are
|
||||
* the text supplied by the operating system's font
|
||||
* system.
|
||||
*/
|
||||
nsISimpleEnumerator availableFonts(in wstring aLangGroup,
|
||||
in wstring aFontType);
|
||||
};
|
||||
|
||||
92
mozilla/gfx/idl/nsIGraphics.idl
Executable file
92
mozilla/gfx/idl/nsIGraphics.idl
Executable file
@@ -0,0 +1,92 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Patrick C. Beard <beard@netscape.com>
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
typedef unsigned long nscolor;
|
||||
typedef long nscoord;
|
||||
|
||||
/**
|
||||
* Simplified graphics interface for JS rendering.
|
||||
*/
|
||||
[scriptable, uuid(812EAE54-1DD2-11B2-B17B-D0ACC700F975)]
|
||||
interface nsIGraphics : nsISupports
|
||||
{
|
||||
/**
|
||||
* The color used to paint with.
|
||||
*/
|
||||
attribute nscolor color;
|
||||
|
||||
/**
|
||||
* Clipping.
|
||||
*/
|
||||
void clipRect(in nscoord x, in nscoord y, in nscoord width, in nscoord height);
|
||||
|
||||
/**
|
||||
* Primitives.
|
||||
*/
|
||||
void drawLine(in nscoord x1, in nscoord y1, in nscoord x2, in nscoord y2);
|
||||
|
||||
void drawRect(in nscoord x, in nscoord y, in nscoord width, in nscoord height);
|
||||
void fillRect(in nscoord x, in nscoord y, in nscoord width, in nscoord height);
|
||||
void invertRect(in nscoord x, in nscoord y, in nscoord width, in nscoord height);
|
||||
|
||||
void drawEllipse(in nscoord x, in nscoord y, in nscoord width, in nscoord height);
|
||||
void fillEllipse(in nscoord x, in nscoord y, in nscoord width, in nscoord height);
|
||||
void invertEllipse(in nscoord x, in nscoord y, in nscoord width, in nscoord height);
|
||||
|
||||
void drawArc(in nscoord x, in nscoord y, in nscoord width, in nscoord height, in float startAngle, in float endAngle);
|
||||
void fillArc(in nscoord x, in nscoord y, in nscoord width, in nscoord height, in float startAngle, in float endAngle);
|
||||
void invertArc(in nscoord x, in nscoord y, in nscoord width, in nscoord height, in float startAngle, in float endAngle);
|
||||
|
||||
|
||||
void drawPolygon(in unsigned long count, [array, size_is(count)] in long points);
|
||||
void fillPolygon(in unsigned long count, [array, size_is(count)] in long points);
|
||||
void invertPolygon(in unsigned long count, [array, size_is(count)] in long points);
|
||||
|
||||
void drawString(in wstring text, in nscoord x, in nscoord y);
|
||||
|
||||
void setFont(in wstring name, in nscoord size);
|
||||
|
||||
/**
|
||||
* Stack of graphics states.
|
||||
*/
|
||||
void gsave();
|
||||
void grestore();
|
||||
};
|
||||
284
mozilla/gfx/idl/nsIPrintOptions.idl
Normal file
284
mozilla/gfx/idl/nsIPrintOptions.idl
Normal file
@@ -0,0 +1,284 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2000
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Don Cone <dcone@netscape.com>
|
||||
* Jessica Blanco <jblanco@us.ibm.com>
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsISupports.idl"
|
||||
#include "nsIPrintSettings.idl"
|
||||
|
||||
%{ C++
|
||||
#include "nsFont.h"
|
||||
%}
|
||||
|
||||
interface nsISimpleEnumerator;
|
||||
|
||||
/**
|
||||
* Native types
|
||||
*/
|
||||
[ref] native nsNativeFontRef(nsFont);
|
||||
[ref] native nsNativeStringRef(nsString);
|
||||
|
||||
/**
|
||||
* Simplified graphics interface for JS rendering.
|
||||
*
|
||||
* @status UNDER_REVIEW
|
||||
*/
|
||||
[scriptable, uuid(CAE87E20-479E-11d4-A856-00105A183419)]
|
||||
|
||||
interface nsIPrintOptions : nsISupports
|
||||
{
|
||||
/* Print Option Flags for Bit Field*/
|
||||
const long kOptPrintOddPages = 0x00000001;
|
||||
const long kOptPrintEvenPages = 0x00000002;
|
||||
const long kPrintOptionsEnableSelectionRB = 0x00000004;
|
||||
|
||||
/* Print Range Enums */
|
||||
const long kRangeAllPages = 0;
|
||||
const long kRangeSpecifiedPageRange = 1;
|
||||
const long kRangeSelection = 2;
|
||||
const long kRangeFocusFrame = 3;
|
||||
|
||||
/* Justification Enums */
|
||||
const long kJustLeft = 0;
|
||||
const long kJustCenter = 1;
|
||||
const long kJustRight = 2;
|
||||
|
||||
/**
|
||||
* Page Size Constants (NOTE: These have been deprecated!);
|
||||
*/
|
||||
const short kLetterPaperSize = 0;
|
||||
const short kLegalPaperSize = 1;
|
||||
const short kExecutivePaperSize = 2;
|
||||
const short kA4PaperSize = 3;
|
||||
const short kA3PaperSize = 4;
|
||||
|
||||
/**
|
||||
* FrameSet Default Type Constants
|
||||
*/
|
||||
const short kUseInternalDefault = 0;
|
||||
const short kUseSettingWhenPossible = 1;
|
||||
|
||||
/**
|
||||
* Page Size Type Constants
|
||||
*/
|
||||
const short kPaperSizeNativeData = 0;
|
||||
const short kPaperSizeDefined = 1;
|
||||
|
||||
/**
|
||||
* Page Size Unit Constants
|
||||
*/
|
||||
const short kPaperSizeInches = 0;
|
||||
const short kPaperSizeMillimeters = 1;
|
||||
|
||||
/**
|
||||
* Orientation Constants
|
||||
*/
|
||||
const short kPortraitOrientation = 0;
|
||||
const short kLandscapeOrientation = 1;
|
||||
|
||||
/**
|
||||
* Print Frame Constants
|
||||
*/
|
||||
const short kNoFrames = 0;
|
||||
const short kFramesAsIs = 1;
|
||||
const short kSelectedFrame = 2;
|
||||
const short kEachFrameSep = 3;
|
||||
|
||||
/**
|
||||
* How to Enable Frame Set Printing Constants
|
||||
*/
|
||||
const short kFrameEnableNone = 0;
|
||||
const short kFrameEnableAll = 1;
|
||||
const short kFrameEnableAsIsAndEach = 2;
|
||||
|
||||
/**
|
||||
* Show Native Print Options dialog, this may not be supported on all platforms
|
||||
*/
|
||||
void ShowNativeDialog();
|
||||
|
||||
/**
|
||||
* Set PrintOptions
|
||||
*/
|
||||
void SetPrintOptions(in PRInt32 aType, in PRBool aTurnOnOff);
|
||||
|
||||
/**
|
||||
* Get PrintOptions
|
||||
*/
|
||||
PRBool GetPrintOptions(in PRInt32 aType);
|
||||
|
||||
/**
|
||||
* Set PrintOptions Bit field
|
||||
*/
|
||||
PRInt32 GetPrintOptionsBits();
|
||||
|
||||
/**
|
||||
* Read Prefs
|
||||
*/
|
||||
void ReadPrefs();
|
||||
|
||||
/**
|
||||
* Write Prefs
|
||||
*/
|
||||
void WritePrefs();
|
||||
|
||||
/**
|
||||
* Creates a new PrintSettnigs Object
|
||||
* and initializes it from prefs
|
||||
*/
|
||||
nsIPrintSettings CreatePrintSettings();
|
||||
|
||||
/**
|
||||
* Creates a new PrintSettnigs Object if it doesn't exist
|
||||
* otherwise it always hand back the same one.
|
||||
* This is THE global PrintSettings
|
||||
*/
|
||||
readonly attribute nsIPrintSettings globalPrintSettings;
|
||||
|
||||
/**
|
||||
* Initialize the values in the PrintSettings from Prefs
|
||||
*/
|
||||
void InitPrintSettingsFromPrefs(in nsIPrintSettings aPO);
|
||||
|
||||
/**
|
||||
* Data Members
|
||||
*/
|
||||
attribute long startPageRange;
|
||||
attribute long endPageRange;
|
||||
|
||||
attribute double marginTop; /* these are in inches */
|
||||
attribute double marginLeft;
|
||||
attribute double marginBottom;
|
||||
attribute double marginRight;
|
||||
|
||||
attribute double scaling; /* values 0.0 - 1.0 */
|
||||
attribute boolean printBGColors; /* Print Background Colors */
|
||||
attribute boolean printBGImages; /* Print Background Images */
|
||||
|
||||
attribute short printRange;
|
||||
|
||||
attribute wstring title;
|
||||
attribute wstring docURL;
|
||||
|
||||
attribute wstring headerStrLeft;
|
||||
attribute wstring headerStrCenter;
|
||||
attribute wstring headerStrRight;
|
||||
|
||||
attribute wstring footerStrLeft;
|
||||
attribute wstring footerStrCenter;
|
||||
attribute wstring footerStrRight;
|
||||
|
||||
attribute short howToEnableFrameUI;
|
||||
attribute boolean isCancelled;
|
||||
attribute short printFrameTypeUsage; /* indicates whether to use the interal value or not*/
|
||||
attribute short printFrameType;
|
||||
attribute boolean printSilent; /* print without putting up the dialog */
|
||||
|
||||
attribute nsIPrintSettings printSettingsValues; /* used copy the values to/from the settings obj*/
|
||||
attribute nsIPrintSettings printSettings; /* used to set and get the current object */
|
||||
|
||||
/* Additional XP Related */
|
||||
attribute short paperSizeType; /* use native data or is defined here */
|
||||
attribute short paperData; /* native data value */
|
||||
attribute double paperWidth; /* width of the paper in inches or mm */
|
||||
attribute double paperHeight; /* height of the paper in inches or mm */
|
||||
attribute short paperSizeUnit; /* paper is in inches or mm */
|
||||
|
||||
attribute long paperSize; /* This has been deprecated */
|
||||
|
||||
attribute boolean printReversed;
|
||||
attribute boolean printInColor; /* a false means grayscale */
|
||||
attribute long orientation; /* see orientation consts */
|
||||
attribute wstring printCommand;
|
||||
attribute long numCopies;
|
||||
attribute wstring printerName;
|
||||
attribute boolean printToFile;
|
||||
attribute wstring toFileName;
|
||||
|
||||
attribute long printPageDelay; /* in milliseconds */
|
||||
|
||||
/* No Script Methods */
|
||||
|
||||
[noscript] void SetFontNamePointSize(in nsNativeStringRef aName, in PRInt32 aPointSize);
|
||||
|
||||
[noscript] void SetMarginInTwips(in nsNativeMarginRef aMargin);
|
||||
/* Purposely made this an "in" arg */
|
||||
[noscript] void GetMarginInTwips(in nsNativeMarginRef aMargin);
|
||||
|
||||
[noscript] void SetDefaultFont(in nsNativeFontRef aMargin);
|
||||
/* Purposely made this an "in" arg */
|
||||
[noscript] void GetDefaultFont(in nsNativeFontRef aMargin);
|
||||
|
||||
[noscript] void GetPageSizeInTwips(out long aWidth, out long aHeight);
|
||||
|
||||
/**
|
||||
* available Printers
|
||||
*/
|
||||
nsISimpleEnumerator availablePrinters ();
|
||||
|
||||
/**
|
||||
* display Printer Job Properties dialog
|
||||
*/
|
||||
void displayJobProperties (in wstring aPrinter, in nsIPrintSettings aPrintSettings, out boolean aDisplayed);
|
||||
|
||||
/**
|
||||
* Native data constants
|
||||
*/
|
||||
const short kNativeDataPrintRecord = 0;
|
||||
|
||||
[noscript] voidPtr GetNativeData(in short aDataType);
|
||||
};
|
||||
|
||||
[scriptable, uuid(a6cf9128-15b3-11d2-932e-00805f8add32)]
|
||||
interface nsIPrinterEnumerator : nsISupports
|
||||
{
|
||||
/**
|
||||
* Returns an array of the names of all installed printers.
|
||||
*
|
||||
* @param aCount returns number of printers returned
|
||||
* @param aResult returns array of names
|
||||
* @return void
|
||||
*/
|
||||
void enumeratePrinters(out PRUint32 aCount,[retval, array, size_is(aCount)] out wstring aResult);
|
||||
|
||||
/* takes printer selected and will display job properties dlg for that printer
|
||||
* returns true if dialog displays
|
||||
*/
|
||||
void displayPropertiesDlg(in wstring aPrinter, in nsIPrintSettings aPrintSettings);
|
||||
|
||||
};
|
||||
|
||||
196
mozilla/gfx/idl/nsIPrintSettings.idl
Normal file
196
mozilla/gfx/idl/nsIPrintSettings.idl
Normal file
@@ -0,0 +1,196 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2000
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Don Cone <dcone@netscape.com>
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
|
||||
%{ C++
|
||||
#include "nsMargin.h"
|
||||
#include "nsFont.h"
|
||||
%}
|
||||
|
||||
/**
|
||||
* Native types
|
||||
*/
|
||||
[ref] native nsNativeMarginRef(nsMargin);
|
||||
|
||||
/**
|
||||
* Simplified graphics interface for JS rendering.
|
||||
*
|
||||
* @status UNDER_REVIEW
|
||||
*/
|
||||
[scriptable, uuid(83427530-F790-11d4-A869-00105A183419)]
|
||||
|
||||
interface nsIPrintSettings : nsISupports
|
||||
{
|
||||
|
||||
/* Print Option Flags for Bit Field*/
|
||||
const long kPrintOddPages = 0x00000001;
|
||||
const long kPrintEvenPages = 0x00000002;
|
||||
const long kEnableSelectionRB = 0x00000004;
|
||||
|
||||
/* Print Range Enums */
|
||||
const long kRangeAllPages = 0;
|
||||
const long kRangeSpecifiedPageRange = 1;
|
||||
const long kRangeSelection = 2;
|
||||
const long kRangeFocusFrame = 3;
|
||||
|
||||
/* Justification Enums */
|
||||
const long kJustLeft = 0;
|
||||
const long kJustCenter = 1;
|
||||
const long kJustRight = 2;
|
||||
|
||||
/**
|
||||
* FrameSet Default Type Constants
|
||||
*/
|
||||
const short kUseInternalDefault = 0;
|
||||
const short kUseSettingWhenPossible = 1;
|
||||
|
||||
/**
|
||||
* Page Size Type Constants
|
||||
*/
|
||||
const short kPaperSizeNativeData = 0;
|
||||
const short kPaperSizeDefined = 1;
|
||||
|
||||
/**
|
||||
* Page Size Unit Constants
|
||||
*/
|
||||
const short kPaperSizeInches = 0;
|
||||
const short kPaperSizeMillimeters = 1;
|
||||
|
||||
/**
|
||||
* Orientation Constants
|
||||
*/
|
||||
const short kPortraitOrientation = 0;
|
||||
const short kLandscapeOrientation = 1;
|
||||
|
||||
/**
|
||||
* Print Frame Constants
|
||||
*/
|
||||
const short kNoFrames = 0;
|
||||
const short kFramesAsIs = 1;
|
||||
const short kSelectedFrame = 2;
|
||||
const short kEachFrameSep = 3;
|
||||
|
||||
/**
|
||||
* How to Enable Frame Set Printing Constants
|
||||
*/
|
||||
const short kFrameEnableNone = 0;
|
||||
const short kFrameEnableAll = 1;
|
||||
const short kFrameEnableAsIsAndEach = 2;
|
||||
|
||||
/**
|
||||
* Set PrintOptions
|
||||
*/
|
||||
void SetPrintOptions(in PRInt32 aType, in PRBool aTurnOnOff);
|
||||
|
||||
/**
|
||||
* Get PrintOptions
|
||||
*/
|
||||
PRBool GetPrintOptions(in PRInt32 aType);
|
||||
|
||||
/**
|
||||
* Set PrintOptions Bit field
|
||||
*/
|
||||
PRInt32 GetPrintOptionsBits();
|
||||
|
||||
/**
|
||||
* Returns W/H in Twips from Paper Size H/W
|
||||
*/
|
||||
void GetPageSizeInTwips(out long aWidth, out long aHeight);
|
||||
|
||||
/**
|
||||
* Data Members
|
||||
*/
|
||||
attribute long startPageRange;
|
||||
attribute long endPageRange;
|
||||
|
||||
attribute double marginTop; /* these are in inches */
|
||||
attribute double marginLeft;
|
||||
attribute double marginBottom;
|
||||
attribute double marginRight;
|
||||
|
||||
attribute double scaling; /* values 0.0 - 1.0 */
|
||||
attribute boolean printBGColors; /* Print Background Colors */
|
||||
attribute boolean printBGImages; /* Print Background Images */
|
||||
|
||||
attribute short printRange;
|
||||
|
||||
attribute wstring title;
|
||||
attribute wstring docURL;
|
||||
|
||||
attribute wstring headerStrLeft;
|
||||
attribute wstring headerStrCenter;
|
||||
attribute wstring headerStrRight;
|
||||
|
||||
attribute wstring footerStrLeft;
|
||||
attribute wstring footerStrCenter;
|
||||
attribute wstring footerStrRight;
|
||||
|
||||
attribute short howToEnableFrameUI; /* indicates how to enable the frameset UI */
|
||||
attribute boolean isCancelled; /* indicates whether the print job has been cancelled */
|
||||
attribute short printFrameTypeUsage; /* indicates whether to use the interal value or not */
|
||||
attribute short printFrameType;
|
||||
attribute boolean printSilent; /* print without putting up the dialog */
|
||||
|
||||
/* Additional XP Related */
|
||||
attribute short paperSizeType; /* use native data or is defined here */
|
||||
attribute short paperData; /* native data value */
|
||||
attribute double paperWidth; /* width of the paper in inches or mm */
|
||||
attribute double paperHeight; /* height of the paper in inches or mm */
|
||||
attribute short paperSizeUnit; /* paper is in inches or mm */
|
||||
|
||||
attribute boolean printReversed;
|
||||
attribute boolean printInColor; /* a false means grayscale */
|
||||
attribute long paperSize; /* see page size consts */
|
||||
attribute long orientation; /* see orientation consts */
|
||||
attribute wstring printCommand;
|
||||
attribute long numCopies;
|
||||
attribute wstring printerName;
|
||||
attribute boolean printToFile;
|
||||
attribute wstring toFileName;
|
||||
|
||||
attribute long printPageDelay; /* in milliseconds */
|
||||
|
||||
/* C++ Helper Functions */
|
||||
[noscript] void SetMarginInTwips(in nsNativeMarginRef aMargin);
|
||||
/* Purposely made this an "in" arg */
|
||||
[noscript] void GetMarginInTwips(in nsNativeMarginRef aMargin);
|
||||
|
||||
};
|
||||
38
mozilla/gfx/idl/nsIScreen.idl
Normal file
38
mozilla/gfx/idl/nsIScreen.idl
Normal file
@@ -0,0 +1,38 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape Communications
|
||||
* Corp. Portions created by Netscape are Copyright (C) 2000 Netscape
|
||||
* Communications Corp. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
|
||||
[scriptable, uuid(f728830e-1dd1-11b2-9598-fb9f414f2465)]
|
||||
interface nsIScreen : nsISupports
|
||||
{
|
||||
void GetRect ( out long left, out long top, out long width, out long height );
|
||||
void GetAvailRect ( out long left, out long top, out long width, out long height );
|
||||
|
||||
readonly attribute long pixelDepth;
|
||||
readonly attribute long colorDepth;
|
||||
};
|
||||
|
||||
|
||||
%{ C++
|
||||
|
||||
%}
|
||||
49
mozilla/gfx/idl/nsIScreenManager.idl
Normal file
49
mozilla/gfx/idl/nsIScreenManager.idl
Normal file
@@ -0,0 +1,49 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape Communications
|
||||
* Corp. Portions created by Netscape are Copyright (C) 2000 Netscape
|
||||
* Communications Corp. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
#include "nsIScreen.idl"
|
||||
|
||||
|
||||
[scriptable, uuid(662e7b78-1dd2-11b2-a3d3-fc1e5f5fb9d4)]
|
||||
interface nsIScreenManager : nsISupports
|
||||
{
|
||||
//
|
||||
// Returns the screen that contains the rectangle. If the rect overlaps
|
||||
// multiple screens, it picks the screen with the greatest area of intersection.
|
||||
//
|
||||
// The coordinates are in pixels (not twips) and in screen coordinates.
|
||||
//
|
||||
nsIScreen screenForRect ( in long left, in long top, in long width, in long height ) ;
|
||||
|
||||
// The screen with the menubar/taskbar. This shouldn't be needed very
|
||||
// often.
|
||||
readonly attribute nsIScreen primaryScreen;
|
||||
|
||||
// Holds the number of screens that are available
|
||||
readonly attribute unsigned long numberOfScreens;
|
||||
|
||||
};
|
||||
|
||||
|
||||
%{ C++
|
||||
|
||||
%}
|
||||
190
mozilla/gfx/idl/nsIScriptableRegion.idl
Normal file
190
mozilla/gfx/idl/nsIScriptableRegion.idl
Normal file
@@ -0,0 +1,190 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape Communications
|
||||
* Corp. Portions created by Netscape are Copyright (C) 1999 Netscape
|
||||
* Communications Corp. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Mike Pinkerton
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
%{C++
|
||||
class nsIRegion;
|
||||
%}
|
||||
|
||||
[ptr] native nsIRegion(nsIRegion);
|
||||
|
||||
|
||||
[scriptable, uuid(82d8f400-5bde-11d3-b033-b27a62766bbc)]
|
||||
interface nsIScriptableRegion : nsISupports
|
||||
{
|
||||
void init ( ) ;
|
||||
|
||||
/**
|
||||
* copy operator equivalent that takes another region
|
||||
*
|
||||
* @param region to copy
|
||||
* @return void
|
||||
*
|
||||
**/
|
||||
|
||||
void setToRegion ( in nsIScriptableRegion aRegion );
|
||||
|
||||
/**
|
||||
* copy operator equivalent that takes a rect
|
||||
*
|
||||
* @param aX xoffset of rect to set region to
|
||||
* @param aY yoffset of rect to set region to
|
||||
* @param aWidth width of rect to set region to
|
||||
* @param aHeight height of rect to set region to
|
||||
* @return void
|
||||
*
|
||||
**/
|
||||
|
||||
void setToRect ( in long aX, in long aY, in long aWidth, in long aHeight );
|
||||
|
||||
/**
|
||||
* destructively intersect another region with this one
|
||||
*
|
||||
* @param region to intersect
|
||||
* @return void
|
||||
*
|
||||
**/
|
||||
|
||||
void intersectRegion ( in nsIScriptableRegion aRegion ) ;
|
||||
|
||||
/**
|
||||
* destructively intersect a rect with this region
|
||||
*
|
||||
* @param aX xoffset of rect to intersect with region
|
||||
* @param aY yoffset of rect to intersect with region
|
||||
* @param aWidth width of rect to intersect with region
|
||||
* @param aHeight height of rect to intersect with region
|
||||
* @return void
|
||||
*
|
||||
**/
|
||||
|
||||
void intersectRect ( in long aX, in long aY, in long aWidth, in long aHeight ) ;
|
||||
|
||||
/**
|
||||
* destructively union another region with this one
|
||||
*
|
||||
* @param region to union
|
||||
* @return void
|
||||
*
|
||||
**/
|
||||
|
||||
void unionRegion ( in nsIScriptableRegion aRegion ) ;
|
||||
|
||||
/**
|
||||
* destructively union a rect with this region
|
||||
*
|
||||
* @param aX xoffset of rect to union with region
|
||||
* @param aY yoffset of rect to union with region
|
||||
* @param aWidth width of rect to union with region
|
||||
* @param aHeight height of rect to union with region
|
||||
* @return void
|
||||
*
|
||||
**/
|
||||
|
||||
void unionRect ( in long aX, in long aY, in long aWidth, in long aHeight ) ;
|
||||
|
||||
/**
|
||||
* destructively subtract another region with this one
|
||||
*
|
||||
* @param region to subtract
|
||||
* @return void
|
||||
*
|
||||
**/
|
||||
|
||||
void subtractRegion ( in nsIScriptableRegion aRegion ) ;
|
||||
|
||||
/**
|
||||
* destructively subtract a rect from this region
|
||||
*
|
||||
* @param aX xoffset of rect to subtract with region
|
||||
* @param aY yoffset of rect to subtract with region
|
||||
* @param aWidth width of rect to subtract with region
|
||||
* @param aHeight height of rect to subtract with region
|
||||
* @return void
|
||||
*
|
||||
**/
|
||||
|
||||
void subtractRect ( in long aX, in long aY, in long aWidth, in long aHeight ) ;
|
||||
|
||||
/**
|
||||
* is this region empty? i.e. does it contain any pixels
|
||||
*
|
||||
* @param none
|
||||
* @return returns whether the region is empty
|
||||
*
|
||||
**/
|
||||
|
||||
boolean isEmpty ( ) ;
|
||||
|
||||
/**
|
||||
* == operator equivalent i.e. do the regions contain exactly
|
||||
* the same pixels
|
||||
*
|
||||
* @param region to compare
|
||||
* @return whether the regions are identical
|
||||
*
|
||||
**/
|
||||
|
||||
boolean isEqualRegion ( in nsIScriptableRegion aRegion ) ;
|
||||
|
||||
/**
|
||||
* returns the bounding box of the region i.e. the smallest
|
||||
* rectangle that completely contains the region.
|
||||
*
|
||||
* @param aX out parameter for xoffset of bounding rect for region
|
||||
* @param aY out parameter for yoffset of bounding rect for region
|
||||
* @param aWidth out parameter for width of bounding rect for region
|
||||
* @param aHeight out parameter for height of bounding rect for region
|
||||
* @return void
|
||||
*
|
||||
**/
|
||||
void getBoundingBox ( out long aX, out long aY, out long aWidth, out long aHeight ) ;
|
||||
|
||||
/**
|
||||
* offsets the region in x and y
|
||||
*
|
||||
* @param xoffset pixel offset in x
|
||||
* @param yoffset pixel offset in y
|
||||
* @return void
|
||||
*
|
||||
**/
|
||||
void offset ( in long aXOffset, in long aYOffset ) ;
|
||||
|
||||
/**
|
||||
* does the region intersect the rectangle?
|
||||
*
|
||||
* @param rect to check for containment
|
||||
* @return true if the region intersects the rect
|
||||
*
|
||||
**/
|
||||
|
||||
boolean containsRect ( in long aX, in long aY, in long aWidth, in long aHeight ) ;
|
||||
|
||||
[noscript] readonly attribute nsIRegion region;
|
||||
|
||||
};
|
||||
|
||||
|
||||
%{ C++
|
||||
|
||||
%}
|
||||
26
mozilla/gfx/macbuild/GFXComponentConfig.h
Normal file
26
mozilla/gfx/macbuild/GFXComponentConfig.h
Normal file
@@ -0,0 +1,26 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*/
|
||||
|
||||
#if TARGET_CARBON
|
||||
// we can't use the carbon printing session APIs
|
||||
#define PM_USE_SESSION_APIS 0
|
||||
#endif
|
||||
24
mozilla/gfx/macbuild/GFXComponentDebugPrefix.h
Normal file
24
mozilla/gfx/macbuild/GFXComponentDebugPrefix.h
Normal file
@@ -0,0 +1,24 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*/
|
||||
|
||||
#include "MacPrefix_debug.h"
|
||||
#include "GFXComponentConfig.h"
|
||||
24
mozilla/gfx/macbuild/GFXComponentPrefix.h
Normal file
24
mozilla/gfx/macbuild/GFXComponentPrefix.h
Normal file
@@ -0,0 +1,24 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*/
|
||||
|
||||
#include "MacSharedPrefix.h"
|
||||
#include "GFXComponentConfig.h"
|
||||
23
mozilla/gfx/macbuild/GFXConfig.h
Normal file
23
mozilla/gfx/macbuild/GFXConfig.h
Normal file
@@ -0,0 +1,23 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*/
|
||||
|
||||
#define _IMPL_NS_GFX 1
|
||||
24
mozilla/gfx/macbuild/GFXPrefix.h
Normal file
24
mozilla/gfx/macbuild/GFXPrefix.h
Normal file
@@ -0,0 +1,24 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*/
|
||||
|
||||
#include "GFXConfig.h"
|
||||
#include "MacPrefix.h"
|
||||
25
mozilla/gfx/macbuild/GFXPrefixDebug.h
Normal file
25
mozilla/gfx/macbuild/GFXPrefixDebug.h
Normal file
@@ -0,0 +1,25 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*/
|
||||
|
||||
|
||||
#include "GFXConfig.h"
|
||||
#include "MacPrefix_debug.h"
|
||||
2262
mozilla/gfx/macbuild/gfx.xml
Normal file
2262
mozilla/gfx/macbuild/gfx.xml
Normal file
File diff suppressed because it is too large
Load Diff
5668
mozilla/gfx/macbuild/gfxComponent.xml
Normal file
5668
mozilla/gfx/macbuild/gfxComponent.xml
Normal file
File diff suppressed because it is too large
Load Diff
1648
mozilla/gfx/macbuild/gfxIDL.xml
Normal file
1648
mozilla/gfx/macbuild/gfxIDL.xml
Normal file
File diff suppressed because it is too large
Load Diff
30
mozilla/gfx/makefile.win
Normal file
30
mozilla/gfx/makefile.win
Normal file
@@ -0,0 +1,30 @@
|
||||
#!nmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
|
||||
DEPTH=..
|
||||
|
||||
DIRS= public src \
|
||||
!if !defined(DISABLE_TESTS)
|
||||
tests \
|
||||
!endif
|
||||
idl
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
30
mozilla/gfx/public/MANIFEST
Normal file
30
mozilla/gfx/public/MANIFEST
Normal file
@@ -0,0 +1,30 @@
|
||||
#
|
||||
# This is a list of local files which get copied to the mozilla:dist:widget directory
|
||||
#
|
||||
|
||||
nsColor.h
|
||||
nsColorNames.h
|
||||
nsColorNameList.h
|
||||
nsCoord.h
|
||||
nsFont.h
|
||||
nsRect.h
|
||||
nsPoint.h
|
||||
nsSize.h
|
||||
nsMargin.h
|
||||
nsTransform2D.h
|
||||
nsIRenderingContext.h
|
||||
nsIFontMetrics.h
|
||||
nsIDeviceContext.h
|
||||
nsIImage.h
|
||||
nsIBlender.h
|
||||
nsGfxCIID.h
|
||||
nsIRegion.h
|
||||
nsDeviceContext.h
|
||||
nsRenderingContextImpl.h
|
||||
nsIDeviceContextSpec.h
|
||||
nsIDeviceContextSpecFactory.h
|
||||
nsIDrawingSurface.h
|
||||
nsRepeater.h
|
||||
nsThemeConstants.h
|
||||
nsITheme.h
|
||||
|
||||
66
mozilla/gfx/public/Makefile.in
Normal file
66
mozilla/gfx/public/Makefile.in
Normal file
@@ -0,0 +1,66 @@
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
|
||||
DEPTH = ../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE = gfx
|
||||
|
||||
EXPORTS = \
|
||||
imgScaler.h \
|
||||
nsColor.h \
|
||||
nsColorNames.h \
|
||||
nsColorNameList.h \
|
||||
nsCompressedCharMap.h \
|
||||
nsCoord.h \
|
||||
nsFont.h \
|
||||
nsRect.h \
|
||||
nsRepeater.h \
|
||||
nsPoint.h \
|
||||
nsSize.h \
|
||||
nsMargin.h \
|
||||
nsTransform2D.h \
|
||||
nsIRenderingContext.h \
|
||||
nsRenderingContextImpl.h \
|
||||
nsIFontMetrics.h \
|
||||
nsIDeviceContext.h \
|
||||
nsIImage.h \
|
||||
nsIBlender.h \
|
||||
nsGfxCIID.h \
|
||||
nsIRegion.h \
|
||||
nsDeviceContext.h \
|
||||
nsIDeviceContextSpec.h \
|
||||
nsIDeviceContextSpecFactory.h \
|
||||
nsIDrawingSurface.h \
|
||||
nsITheme.h \
|
||||
nsThemeConstants.h \
|
||||
$(NULL)
|
||||
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
EXPORTS += nsIPrintingContext.h
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
27
mozilla/gfx/public/imgScaler.h
Normal file
27
mozilla/gfx/public/imgScaler.h
Normal file
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* The contents of this file are subject to the Mozilla Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Tomas Mšller
|
||||
* Portions created by Tomas Mšller are
|
||||
* Copyright (C) 2001 Tomas Mšller. Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Tomas Mšller
|
||||
* Tim Rowley <tor@cs.brown.edu>
|
||||
*/
|
||||
|
||||
void RectStretch(long xs1,long ys1,long xs2,long ys2,
|
||||
long xd1,long yd1,long xd2,long yd2,
|
||||
unsigned char *aSrcImage, unsigned aSrcStride,
|
||||
unsigned char *aDstImage, unsigned aDstStride,
|
||||
unsigned aDepth);
|
||||
56
mozilla/gfx/public/makefile.win
Normal file
56
mozilla/gfx/public/makefile.win
Normal file
@@ -0,0 +1,56 @@
|
||||
#!nmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
|
||||
DEPTH=..\..
|
||||
|
||||
|
||||
EXPORTS = \
|
||||
nsColor.h \
|
||||
nsColorNames.h \
|
||||
nsColorNameList.h \
|
||||
nsCoord.h \
|
||||
nsFont.h \
|
||||
nsRect.h \
|
||||
nsPoint.h \
|
||||
nsSize.h \
|
||||
nsMargin.h \
|
||||
nsTransform2D.h \
|
||||
nsIRenderingContext.h \
|
||||
nsRenderingContextImpl.h \
|
||||
nsIFontMetrics.h \
|
||||
nsIDeviceContext.h \
|
||||
nsIImage.h \
|
||||
nsIBlender.h \
|
||||
nsGfxCIID.h \
|
||||
nsIRegion.h \
|
||||
nsDeviceContext.h \
|
||||
nsIDeviceContextSpec.h \
|
||||
nsIDeviceContextSpecFactory.h \
|
||||
nsIDrawingSurface.h \
|
||||
nsCompressedCharMap.h \
|
||||
nsThemeConstants.h \
|
||||
nsITheme.h \
|
||||
$(NULL)
|
||||
|
||||
MODULE=gfx
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
119
mozilla/gfx/public/nsColor.h
Normal file
119
mozilla/gfx/public/nsColor.h
Normal file
@@ -0,0 +1,119 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsColor_h___
|
||||
#define nsColor_h___
|
||||
|
||||
#include "nscore.h"
|
||||
|
||||
class nsString;
|
||||
class nsAString;
|
||||
|
||||
// A color is a 32 bit unsigned integer with four components: R, G, B
|
||||
// and A.
|
||||
typedef PRUint32 nscolor;
|
||||
|
||||
// Make a color out of r,g,b values. This assumes that the r,g,b values are
|
||||
// properly constrained to 0-255. This also assumes that a is 255.
|
||||
#define NS_RGB(_r,_g,_b) \
|
||||
((nscolor) ((255 << 24) | ((_b)<<16) | ((_g)<<8) | (_r)))
|
||||
|
||||
// Make a color out of r,g,b,a values. This assumes that the r,g,b,a
|
||||
// values are properly constrained to 0-255.
|
||||
#define NS_RGBA(_r,_g,_b,_a) \
|
||||
((nscolor) (((_a) << 24) | ((_b)<<16) | ((_g)<<8) | (_r)))
|
||||
|
||||
// Extract color components from nscolor
|
||||
#define NS_GET_R(_rgba) ((PRUint8) ((_rgba) & 0xff))
|
||||
#define NS_GET_G(_rgba) ((PRUint8) (((_rgba) >> 8) & 0xff))
|
||||
#define NS_GET_B(_rgba) ((PRUint8) (((_rgba) >> 16) & 0xff))
|
||||
#define NS_GET_A(_rgba) ((PRUint8) (((_rgba) >> 24) & 0xff))
|
||||
|
||||
// Fast approximate division by 255. It has the property that
|
||||
// for all 0 <= n <= 255*255, FAST_DIVIDE_BY_255(n) == n/255.
|
||||
// But it only uses two adds and two shifts instead of an
|
||||
// integer division (which is expensive on many processors).
|
||||
//
|
||||
// equivalent to target=v/255
|
||||
#define FAST_DIVIDE_BY_255(target,v) \
|
||||
PR_BEGIN_MACRO \
|
||||
unsigned tmp_ = v; \
|
||||
target = ((tmp_ << 8) + tmp_ + 255) >> 16; \
|
||||
PR_END_MACRO
|
||||
|
||||
// Blending macro
|
||||
//
|
||||
// equivalent to target=(bg*(255-alpha)+fg*alpha)/255
|
||||
#define MOZ_BLEND(target, bg, fg, alpha) \
|
||||
FAST_DIVIDE_BY_255(target, (bg)*(255-(alpha)) + (fg)*(alpha))
|
||||
|
||||
// Translate a hex string to a color. Return true if it parses ok,
|
||||
// otherwise return false.
|
||||
// This accepts only 3, 6 or 9 digits
|
||||
extern "C" NS_GFX_(PRBool) NS_HexToRGB(const nsString& aBuf, nscolor* aResult);
|
||||
|
||||
// Translate a hex string to a color. Return true if it parses ok,
|
||||
// otherwise return false.
|
||||
// This version accepts 1 to 9 digits (missing digits are 0)
|
||||
extern "C" NS_GFX_(PRBool) NS_LooseHexToRGB(const nsString& aBuf, nscolor* aResult);
|
||||
|
||||
// Translate a color name to a color. Return true if it parses ok,
|
||||
// otherwise return false.
|
||||
extern "C" NS_GFX_(PRBool) NS_ColorNameToRGB(const nsAString& aBuf, nscolor* aResult);
|
||||
|
||||
// Weird color computing code stolen from winfe which was stolen
|
||||
// from the xfe which was written originally by Eric Bina. So there.
|
||||
extern "C" NS_GFX_(void) NS_Get3DColors(nscolor aResult[2], nscolor aColor);
|
||||
|
||||
// To determin colors based on the background brightness
|
||||
extern "C" NS_GFX_(void) NS_GetSpecial3DColors(nscolor aResult[2],
|
||||
nscolor aBackgroundColor,
|
||||
nscolor aBorderColor);
|
||||
|
||||
// Special method to brighten a Color and have it shift to white when
|
||||
// fully saturated.
|
||||
extern "C" NS_GFX_(nscolor) NS_BrightenColor(nscolor inColor);
|
||||
|
||||
// Special method to darken a Color and have it shift to black when
|
||||
// darkest component underflows
|
||||
extern "C" NS_GFX_(nscolor) NS_DarkenColor(nscolor inColor);
|
||||
|
||||
// Determins brightness for a specific color
|
||||
extern "C" NS_GFX_(int) NS_GetBrightness(PRUint8 aRed, PRUint8 aGreen, PRUint8 aBlue);
|
||||
|
||||
#endif /* nsColor_h___ */
|
||||
212
mozilla/gfx/public/nsColorNameList.h
Normal file
212
mozilla/gfx/public/nsColorNameList.h
Normal file
@@ -0,0 +1,212 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1999
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/******
|
||||
|
||||
This file contains the list of all named colors
|
||||
See nsCSSColorNames.h for access to the enum values for colors
|
||||
|
||||
It is designed to be used as inline input to nsCSSColorNames.cpp *only*
|
||||
through the magic of C preprocessing.
|
||||
|
||||
All entires must be enclosed in the macro GFX_COLOR which will have cruel
|
||||
and unusual things done to it
|
||||
|
||||
It is recommended (but not strictly necessary) to keep all entries
|
||||
in alphabetical order
|
||||
|
||||
The first argument to GFX_COLOR is both the enum identifier of the color
|
||||
and the string value
|
||||
The second argument is the sRGBA value for the named color
|
||||
|
||||
'name' entries *must* use only lowercase characters.
|
||||
|
||||
** Break these invarient and bad things will happen. **
|
||||
|
||||
|
||||
******/
|
||||
|
||||
|
||||
GFX_COLOR(aliceblue, NS_RGB(240, 248, 255))
|
||||
GFX_COLOR(antiquewhite, NS_RGB(250, 235, 215))
|
||||
GFX_COLOR(aqua, NS_RGB( 0, 255, 255))
|
||||
GFX_COLOR(aquamarine, NS_RGB(127, 255, 212))
|
||||
GFX_COLOR(azure, NS_RGB(240, 255, 255))
|
||||
GFX_COLOR(beige, NS_RGB(245, 245, 220))
|
||||
GFX_COLOR(bisque, NS_RGB(255, 228, 196))
|
||||
GFX_COLOR(black, NS_RGB( 0, 0, 0))
|
||||
GFX_COLOR(blanchedalmond, NS_RGB(255, 235, 205))
|
||||
GFX_COLOR(blue, NS_RGB( 0, 0, 255))
|
||||
GFX_COLOR(blueviolet, NS_RGB(138, 43, 226))
|
||||
GFX_COLOR(brown, NS_RGB(165, 42, 42))
|
||||
GFX_COLOR(burlywood, NS_RGB(222, 184, 135))
|
||||
GFX_COLOR(cadetblue, NS_RGB( 95, 158, 160))
|
||||
GFX_COLOR(chartreuse, NS_RGB(127, 255, 0))
|
||||
GFX_COLOR(chocolate, NS_RGB(210, 105, 30))
|
||||
GFX_COLOR(coral, NS_RGB(255, 127, 80))
|
||||
GFX_COLOR(cornflowerblue, NS_RGB(100, 149, 237))
|
||||
GFX_COLOR(cornsilk, NS_RGB(255, 248, 220))
|
||||
GFX_COLOR(crimson, NS_RGB(220, 20, 60))
|
||||
GFX_COLOR(cyan, NS_RGB( 0, 255, 255))
|
||||
GFX_COLOR(darkblue, NS_RGB( 0, 0, 139))
|
||||
GFX_COLOR(darkcyan, NS_RGB( 0, 139, 139))
|
||||
GFX_COLOR(darkgoldenrod, NS_RGB(184, 134, 11))
|
||||
GFX_COLOR(darkgray, NS_RGB(169, 169, 169))
|
||||
GFX_COLOR(darkgreen, NS_RGB( 0, 100, 0))
|
||||
GFX_COLOR(darkgrey, NS_RGB(169, 169, 169))
|
||||
GFX_COLOR(darkkhaki, NS_RGB(189, 183, 107))
|
||||
GFX_COLOR(darkmagenta, NS_RGB(139, 0, 139))
|
||||
GFX_COLOR(darkolivegreen, NS_RGB( 85, 107, 47))
|
||||
GFX_COLOR(darkorange, NS_RGB(255, 140, 0))
|
||||
GFX_COLOR(darkorchid, NS_RGB(153, 50, 204))
|
||||
GFX_COLOR(darkred, NS_RGB(139, 0, 0))
|
||||
GFX_COLOR(darksalmon, NS_RGB(233, 150, 122))
|
||||
GFX_COLOR(darkseagreen, NS_RGB(143, 188, 143))
|
||||
GFX_COLOR(darkslateblue, NS_RGB( 72, 61, 139))
|
||||
GFX_COLOR(darkslategray, NS_RGB( 47, 79, 79))
|
||||
GFX_COLOR(darkslategrey, NS_RGB( 47, 79, 79))
|
||||
GFX_COLOR(darkturquoise, NS_RGB( 0, 206, 209))
|
||||
GFX_COLOR(darkviolet, NS_RGB(148, 0, 211))
|
||||
GFX_COLOR(deeppink, NS_RGB(255, 20, 147))
|
||||
GFX_COLOR(deepskyblue, NS_RGB( 0, 191, 255))
|
||||
GFX_COLOR(dimgray, NS_RGB(105, 105, 105))
|
||||
GFX_COLOR(dimgrey, NS_RGB(105, 105, 105))
|
||||
GFX_COLOR(dodgerblue, NS_RGB( 30, 144, 255))
|
||||
GFX_COLOR(firebrick, NS_RGB(178, 34, 34))
|
||||
GFX_COLOR(floralwhite, NS_RGB(255, 250, 240))
|
||||
GFX_COLOR(forestgreen, NS_RGB( 34, 139, 34))
|
||||
GFX_COLOR(fuchsia, NS_RGB(255, 0, 255))
|
||||
GFX_COLOR(gainsboro, NS_RGB(220, 220, 220))
|
||||
GFX_COLOR(ghostwhite, NS_RGB(248, 248, 255))
|
||||
GFX_COLOR(gold, NS_RGB(255, 215, 0))
|
||||
GFX_COLOR(goldenrod, NS_RGB(218, 165, 32))
|
||||
GFX_COLOR(gray, NS_RGB(128, 128, 128))
|
||||
GFX_COLOR(grey, NS_RGB(128, 128, 128))
|
||||
GFX_COLOR(green, NS_RGB( 0, 128, 0))
|
||||
GFX_COLOR(greenyellow, NS_RGB(173, 255, 47))
|
||||
GFX_COLOR(honeydew, NS_RGB(240, 255, 240))
|
||||
GFX_COLOR(hotpink, NS_RGB(255, 105, 180))
|
||||
GFX_COLOR(indianred, NS_RGB(205, 92, 92))
|
||||
GFX_COLOR(indigo, NS_RGB( 75, 0, 130))
|
||||
GFX_COLOR(ivory, NS_RGB(255, 255, 240))
|
||||
GFX_COLOR(khaki, NS_RGB(240, 230, 140))
|
||||
GFX_COLOR(lavender, NS_RGB(230, 230, 250))
|
||||
GFX_COLOR(lavenderblush, NS_RGB(255, 240, 245))
|
||||
GFX_COLOR(lawngreen, NS_RGB(124, 252, 0))
|
||||
GFX_COLOR(lemonchiffon, NS_RGB(255, 250, 205))
|
||||
GFX_COLOR(lightblue, NS_RGB(173, 216, 230))
|
||||
GFX_COLOR(lightcoral, NS_RGB(240, 128, 128))
|
||||
GFX_COLOR(lightcyan, NS_RGB(224, 255, 255))
|
||||
GFX_COLOR(lightgoldenrodyellow, NS_RGB(250, 250, 210))
|
||||
GFX_COLOR(lightgray, NS_RGB(211, 211, 211))
|
||||
GFX_COLOR(lightgreen, NS_RGB(144, 238, 144))
|
||||
GFX_COLOR(lightgrey, NS_RGB(211, 211, 211))
|
||||
GFX_COLOR(lightpink, NS_RGB(255, 182, 193))
|
||||
GFX_COLOR(lightsalmon, NS_RGB(255, 160, 122))
|
||||
GFX_COLOR(lightseagreen, NS_RGB( 32, 178, 170))
|
||||
GFX_COLOR(lightskyblue, NS_RGB(135, 206, 250))
|
||||
GFX_COLOR(lightslategray, NS_RGB(119, 136, 153))
|
||||
GFX_COLOR(lightslategrey, NS_RGB(119, 136, 153))
|
||||
GFX_COLOR(lightsteelblue, NS_RGB(176, 196, 222))
|
||||
GFX_COLOR(lightyellow, NS_RGB(255, 255, 224))
|
||||
GFX_COLOR(lime, NS_RGB( 0, 255, 0))
|
||||
GFX_COLOR(limegreen, NS_RGB( 50, 205, 50))
|
||||
GFX_COLOR(linen, NS_RGB(250, 240, 230))
|
||||
GFX_COLOR(magenta, NS_RGB(255, 0, 255))
|
||||
GFX_COLOR(maroon, NS_RGB(128, 0, 0))
|
||||
GFX_COLOR(mediumaquamarine, NS_RGB(102, 205, 170))
|
||||
GFX_COLOR(mediumblue, NS_RGB( 0, 0, 205))
|
||||
GFX_COLOR(mediumorchid, NS_RGB(186, 85, 211))
|
||||
GFX_COLOR(mediumpurple, NS_RGB(147, 112, 219))
|
||||
GFX_COLOR(mediumseagreen, NS_RGB( 60, 179, 113))
|
||||
GFX_COLOR(mediumslateblue, NS_RGB(123, 104, 238))
|
||||
GFX_COLOR(mediumspringgreen, NS_RGB( 0, 250, 154))
|
||||
GFX_COLOR(mediumturquoise, NS_RGB( 72, 209, 204))
|
||||
GFX_COLOR(mediumvioletred, NS_RGB(199, 21, 133))
|
||||
GFX_COLOR(midnightblue, NS_RGB( 25, 25, 112))
|
||||
GFX_COLOR(mintcream, NS_RGB(245, 255, 250))
|
||||
GFX_COLOR(mistyrose, NS_RGB(255, 228, 225))
|
||||
GFX_COLOR(moccasin, NS_RGB(255, 228, 181))
|
||||
GFX_COLOR(navajowhite, NS_RGB(255, 222, 173))
|
||||
GFX_COLOR(navy, NS_RGB( 0, 0, 128))
|
||||
GFX_COLOR(oldlace, NS_RGB(253, 245, 230))
|
||||
GFX_COLOR(olive, NS_RGB(128, 128, 0))
|
||||
GFX_COLOR(olivedrab, NS_RGB(107, 142, 35))
|
||||
GFX_COLOR(orange, NS_RGB(255, 165, 0))
|
||||
GFX_COLOR(orangered, NS_RGB(255, 69, 0))
|
||||
GFX_COLOR(orchid, NS_RGB(218, 112, 214))
|
||||
GFX_COLOR(palegoldenrod, NS_RGB(238, 232, 170))
|
||||
GFX_COLOR(palegreen, NS_RGB(152, 251, 152))
|
||||
GFX_COLOR(paleturquoise, NS_RGB(175, 238, 238))
|
||||
GFX_COLOR(palevioletred, NS_RGB(219, 112, 147))
|
||||
GFX_COLOR(papayawhip, NS_RGB(255, 239, 213))
|
||||
GFX_COLOR(peachpuff, NS_RGB(255, 218, 185))
|
||||
GFX_COLOR(peru, NS_RGB(205, 133, 63))
|
||||
GFX_COLOR(pink, NS_RGB(255, 192, 203))
|
||||
GFX_COLOR(plum, NS_RGB(221, 160, 221))
|
||||
GFX_COLOR(powderblue, NS_RGB(176, 224, 230))
|
||||
GFX_COLOR(purple, NS_RGB(128, 0, 128))
|
||||
GFX_COLOR(red, NS_RGB(255, 0, 0))
|
||||
GFX_COLOR(rosybrown, NS_RGB(188, 143, 143))
|
||||
GFX_COLOR(royalblue, NS_RGB( 65, 105, 225))
|
||||
GFX_COLOR(saddlebrown, NS_RGB(139, 69, 19))
|
||||
GFX_COLOR(salmon, NS_RGB(250, 128, 114))
|
||||
GFX_COLOR(sandybrown, NS_RGB(244, 164, 96))
|
||||
GFX_COLOR(seagreen, NS_RGB( 46, 139, 87))
|
||||
GFX_COLOR(seashell, NS_RGB(255, 245, 238))
|
||||
GFX_COLOR(sienna, NS_RGB(160, 82, 45))
|
||||
GFX_COLOR(silver, NS_RGB(192, 192, 192))
|
||||
GFX_COLOR(skyblue, NS_RGB(135, 206, 235))
|
||||
GFX_COLOR(slateblue, NS_RGB(106, 90, 205))
|
||||
GFX_COLOR(slategray, NS_RGB(112, 128, 144))
|
||||
GFX_COLOR(slategrey, NS_RGB(112, 128, 144))
|
||||
GFX_COLOR(snow, NS_RGB(255, 250, 250))
|
||||
GFX_COLOR(springgreen, NS_RGB( 0, 255, 127))
|
||||
GFX_COLOR(steelblue, NS_RGB( 70, 130, 180))
|
||||
GFX_COLOR(tan, NS_RGB(210, 180, 140))
|
||||
GFX_COLOR(teal, NS_RGB( 0, 128, 128))
|
||||
GFX_COLOR(thistle, NS_RGB(216, 191, 216))
|
||||
GFX_COLOR(tomato, NS_RGB(255, 99, 71))
|
||||
GFX_COLOR(turquoise, NS_RGB( 64, 224, 208))
|
||||
GFX_COLOR(violet, NS_RGB(238, 130, 238))
|
||||
GFX_COLOR(wheat, NS_RGB(245, 222, 179))
|
||||
GFX_COLOR(white, NS_RGB(255, 255, 255))
|
||||
GFX_COLOR(whitesmoke, NS_RGB(245, 245, 245))
|
||||
GFX_COLOR(yellow, NS_RGB(255, 255, 0))
|
||||
GFX_COLOR(yellowgreen, NS_RGB(154, 205, 50))
|
||||
|
||||
80
mozilla/gfx/public/nsColorNames.h
Normal file
80
mozilla/gfx/public/nsColorNames.h
Normal file
@@ -0,0 +1,80 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsColorNames_h___
|
||||
#define nsColorNames_h___
|
||||
|
||||
#include "nsColor.h"
|
||||
|
||||
struct nsStr;
|
||||
class nsAFlatCString;
|
||||
class nsAString;
|
||||
class nsACString;
|
||||
|
||||
/*
|
||||
Declare the enum list using the magic of preprocessing
|
||||
enum values are "eColorName_foo" (where foo is the color name)
|
||||
|
||||
To change the list of colors, see nsColorNameList.h
|
||||
|
||||
*/
|
||||
#define GFX_COLOR(_name, _value) eColorName_##_name,
|
||||
enum nsColorName {
|
||||
eColorName_UNKNOWN = -1,
|
||||
#include "nsColorNameList.h"
|
||||
eColorName_COUNT
|
||||
};
|
||||
#undef GFX_COLOR
|
||||
|
||||
class NS_GFX nsColorNames {
|
||||
public:
|
||||
static void AddRefTable(void);
|
||||
static void ReleaseTable(void);
|
||||
|
||||
// Given a color name, return the color enum value
|
||||
// This only functions provided a valid ref on the table
|
||||
static nsColorName LookupName(const nsAString& aName);
|
||||
static nsColorName LookupName(const nsACString& aName);
|
||||
|
||||
static const nsAFlatCString& GetStringValue(nsColorName aColorName);
|
||||
|
||||
// Color id to rgb value table
|
||||
static const nscolor kColors[];
|
||||
};
|
||||
|
||||
#endif /* nsColorNames_h___ */
|
||||
348
mozilla/gfx/public/nsCompressedCharMap.h
Normal file
348
mozilla/gfx/public/nsCompressedCharMap.h
Normal file
@@ -0,0 +1,348 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2001
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Brian Stell <bstell@netscape.com>
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef NSCOMPRESSEDCHARMAP_H
|
||||
#define NSCOMPRESSEDCHARMAP_H
|
||||
#include "prtypes.h"
|
||||
|
||||
|
||||
#define ALU_SIZE PR_BITS_PER_LONG
|
||||
//#define ALU_SIZE 16
|
||||
//#define ALU_SIZE 32
|
||||
//#define ALU_SIZE 64
|
||||
#if (ALU_SIZE==32)
|
||||
# define ALU_TYPE PRUint32
|
||||
# define CCMAP_POW2(n) (1L<<(n))
|
||||
# define CCMAP_BITS_PER_ALU_LOG2 5
|
||||
#elif (ALU_SIZE==64)
|
||||
# define ALU_TYPE PRUint64
|
||||
# define CCMAP_POW2(n) (1LL<<(n))
|
||||
# define CCMAP_BITS_PER_ALU_LOG2 6
|
||||
#else
|
||||
# define ALU_TYPE PRUint16
|
||||
# define CCMAP_POW2(n) (1<<(n))
|
||||
# define CCMAP_BITS_PER_ALU_LOG2 4
|
||||
#endif
|
||||
|
||||
|
||||
class nsICharRepresentable;
|
||||
|
||||
extern PRUint16* CreateEmptyCCMap();
|
||||
extern PRUint16* MapToCCMap(PRUint32* aMap);
|
||||
extern PRUint16* MapperToCCMap(nsICharRepresentable *aMapper);
|
||||
extern void FreeCCMap(PRUint16* &aMap);
|
||||
extern PRBool NextNonEmptyCCMapPage(PRUint16 *, PRUint16 *);
|
||||
extern PRBool IsSameCCMap(PRUint16* ccmap1, PRUint16* ccmap2);
|
||||
#ifdef DEBUG
|
||||
void printCCMap(PRUint16* aCCMap);
|
||||
#endif
|
||||
|
||||
|
||||
// surrogate support extension
|
||||
extern PRUint16*
|
||||
MapToCCMapExt(PRUint32* aBmpPlaneMap, PRUint32** aOtherPlaneMaps, PRUint32 aOtherPlaneNum);
|
||||
|
||||
//
|
||||
// nsCompressedCharMap
|
||||
//
|
||||
// A Compressed Char Map (CCMap) saves memory by folding all
|
||||
// the empty portions of the map on top of each other.
|
||||
//
|
||||
// Building a Compressed Char Map (CCMap) is more complex than
|
||||
// accessing it. We use the nsCompressedCharMap object to
|
||||
// build the CCMap. Once nsCompressedCharMap has built the CCMap
|
||||
// we get a copy of the CCMap and discard the nsCompressedCharMap
|
||||
// object. The CCMap is an array of PRUint16 and is accessed by
|
||||
// a macro.
|
||||
//
|
||||
// See "Character Map Compression" below for a discussion of
|
||||
// what the array looks like.
|
||||
|
||||
//
|
||||
// The maximum size a CCMap:
|
||||
// (16 upper pointers) + (16 empty mid pointers) +
|
||||
// (16 empty page) + (16*16 max mid pointers) +
|
||||
// (256*16 max pages) = 4400 PRUint16
|
||||
#define CCMAP_MAX_LEN (16+16+16+256+4096)
|
||||
|
||||
class nsCompressedCharMap {
|
||||
public:
|
||||
nsCompressedCharMap();
|
||||
|
||||
PRUint16* NewCCMap();
|
||||
PRUint16* FillCCMap(PRUint16* aCCMap);
|
||||
PRUint16 GetSize() {return mUsedLen;};
|
||||
void SetChar(PRUint16);
|
||||
void SetChars(PRUint16*);
|
||||
void SetChars(PRUint16, ALU_TYPE*);
|
||||
void SetChars(PRUint32*);
|
||||
|
||||
protected:
|
||||
union {
|
||||
PRUint16 mCCMap[CCMAP_MAX_LEN];
|
||||
ALU_TYPE used_for_align; // do not use; only here to cause
|
||||
// alignment
|
||||
} u;
|
||||
PRUint16 mUsedLen; // in PRUint16
|
||||
PRUint16 mAllOnesPage;
|
||||
|
||||
};
|
||||
|
||||
//
|
||||
// Character Map Compression
|
||||
//
|
||||
// Each font requires its own 8k charmap. On a system with 200
|
||||
// fonts this would take: 200 * 8K = 1600K memory.
|
||||
//
|
||||
// Since most char maps are mostly empty a significant amount
|
||||
// of memory can be saved by not allocating the unused sections.
|
||||
//
|
||||
// If the map has one or more levels of indirection then the
|
||||
// the empty sections of the map can all be folded to a single
|
||||
// common empty element. In this way only the non-empty sections
|
||||
// need space. Because the empty sections actually point to a
|
||||
// common empty section every entry in the map can be valid
|
||||
// without requiring actually allocating space.
|
||||
// Some larger CJK fonts have large sections where every bit
|
||||
// is set. In the same way that the empty sections are folded
|
||||
// onto one "empty page", the sections where all bits are set are
|
||||
// folded on to one "all bits set page" .
|
||||
//
|
||||
// Break up the Unicode range bits 0x0000 - 0xFFFF
|
||||
// into 3 bit ranges:
|
||||
//
|
||||
// upper bits: bit15 - bit12
|
||||
// mid bits: bit11 - bit8
|
||||
// page bits: bit7 - bit0
|
||||
//
|
||||
// within a page, (assumming a 4 byte ALU)
|
||||
// bits 7-5 select one of the 8 longs
|
||||
// bits 4-0 select one of the 32 bits within the long
|
||||
//
|
||||
// There is exactly one upper "pointers" array.
|
||||
//
|
||||
// The upper pointers each point to a mid array. If there are no chars
|
||||
// in an upper pointer's block that pointer points to the empty mid.
|
||||
// Thus all upper pointers are "valid" even if they do not have space
|
||||
// allocated; eg: the accessor macro does not need to test if the
|
||||
// pointer is zero.
|
||||
//
|
||||
// Each mid pointer in the mid array points to a page. If there are no
|
||||
// chars in a mid pointer's page that pointer points to the empty page.
|
||||
// Thus all mid pointers are "valid" even if they do not have space
|
||||
// allocated; eg: the accessor macro does not need to test if the
|
||||
// pointer is zero.
|
||||
//
|
||||
// Since the array will be less than 5K PRUint16 the "pointers" can
|
||||
// be implemented as 2 byte offsets from the base instead of
|
||||
// real pointers.
|
||||
//
|
||||
// the format of the CCMap is
|
||||
// the upper pointers (16 PRUint16)
|
||||
// the empty mid pointers (16 PRUint16)
|
||||
// the empty page (16 PRUint16)
|
||||
// non-empty mid pointers and pages as needed
|
||||
|
||||
// One minor note: for a completely empty map it is actually
|
||||
// possible to fold the upper, empty mid, and empty page
|
||||
// on top of each other and make a map of only 32 bytes.
|
||||
#define CCMAP_EMPTY_SIZE_PER_INT16 16
|
||||
|
||||
// offsets to the empty mid and empty page
|
||||
#define CCMAP_EMPTY_MID CCMAP_NUM_UPPER_POINTERS
|
||||
#define CCMAP_EMPTY_PAGE CCMAP_EMPTY_MID+CCMAP_NUM_MID_POINTERS
|
||||
|
||||
//
|
||||
// Because the table is offset based the code can build the table in a
|
||||
// temp space (max table size on the stack) and then do one alloc of
|
||||
// the actual needed size and simply copy over the data.
|
||||
//
|
||||
|
||||
//
|
||||
// Compressed Char map surrogate extension
|
||||
//
|
||||
// The design goal of surrogate support extension is to keep efficiency
|
||||
// and compatibility of existing compressed charmap operations. Most of
|
||||
// existing operation are untouched. For BMP support, very little memory
|
||||
// overhead (4 bytes) is added. Runtime efficiency of BMP support is
|
||||
// unchanged.
|
||||
//
|
||||
// structure of extended charmap:
|
||||
// ccmap flag 1 PRUint16 , indication if this is extended one or not
|
||||
// bmp ccmap size 1 PRUint16 , the size of BMP ccmap,
|
||||
// BMP ccmap size varies,
|
||||
// plane index 16 PRUint32, use to index ccmap for non-BMP plane
|
||||
// empty ccmap 16 PRUint16, a total empty ccmap
|
||||
// non-BMP ccmaps size varies, other non-empty, non-BMP ccmap
|
||||
//
|
||||
// Changes to basic ccmap
|
||||
// 2 PRUint16 are added in the very beginning. One is used to descript the size
|
||||
// of the ccmap, the other is used as a flag. But these 2 fields are indexed
|
||||
// negatively so that all other operation remain unchanged to keep efficiency.
|
||||
// ccmap memory allocation is moved from nsCompressedCharMap::NewCCMap to
|
||||
// MapToCCMap.
|
||||
//
|
||||
// Extended ccmap
|
||||
// A 16*PRUint32 array was put at the end of basic ccmap, each PRUint32 either
|
||||
// pointed to the empty ccmap or a independent plane ccmap. Directly after this
|
||||
// array is a empty ccmap. All planes that has no character will share this ccmap.
|
||||
// All non-empty plane will have a ccmap.
|
||||
// "MapToCCMapExt" is added to created an extended ccmap, each plane ccmap is
|
||||
// created the same as basic one, but without 2 additional fields.
|
||||
// "HasGlyphExt" is used to access extended ccmap, it first need to locate the
|
||||
// plane ccmap, and then operated the same way as "HasGlyph".
|
||||
//
|
||||
// Compatibility between old and new one
|
||||
// Because extended ccmap include an exactly identical basic ccmap in its head,
|
||||
// basic ccmap operation (HasGlyph) can be applied on extended ccmap without
|
||||
// problem.
|
||||
// Because basic ccmap is now have a flag to indicate if it is a extended one,
|
||||
// Extended ccmap operation (HasGlyphExt) can check the flag before it does
|
||||
// extended ccmap specific operation. So HasGlyphExt can be applied to basic ccmap
|
||||
// too.
|
||||
//
|
||||
|
||||
// Page bits
|
||||
//
|
||||
#define CCMAP_BITS_PER_PAGE_LOG2 8
|
||||
#define CCMAP_BITS_PER_PAGE CCMAP_POW2(CCMAP_BITS_PER_PAGE_LOG2)
|
||||
#define CCMAP_BIT_INDEX(c) ((c) & PR_BITMASK(CCMAP_BITS_PER_ALU_LOG2))
|
||||
#define CCMAP_ALU_INDEX(c) (((c)>>CCMAP_BITS_PER_ALU_LOG2) \
|
||||
& PR_BITMASK(CCMAP_BITS_PER_PAGE_LOG2 - CCMAP_BITS_PER_ALU_LOG2))
|
||||
|
||||
#define CCMAP_PAGE_MASK PR_BITMASK(CCMAP_BITS_PER_PAGE_LOG2)
|
||||
#define CCMAP_NUM_PRUINT16S_PER_PAGE \
|
||||
(CCMAP_BITS_PER_PAGE/CCMAP_BITS_PER_PRUINT16)
|
||||
// one bit per char
|
||||
#define CCMAP_NUM_ALUS_PER_PAGE (CCMAP_BITS_PER_PAGE/CCMAP_BITS_PER_ALU)
|
||||
#define CCMAP_NUM_UCHARS_PER_PAGE CCMAP_BITS_PER_PAGE
|
||||
|
||||
//
|
||||
// Mid bits
|
||||
//
|
||||
#define CCMAP_BITS_PER_MID_LOG2 4
|
||||
#define CCMAP_MID_INDEX(c) \
|
||||
(((c)>>CCMAP_BITS_PER_PAGE_LOG2) & PR_BITMASK(CCMAP_BITS_PER_MID_LOG2))
|
||||
#define CCMAP_NUM_MID_POINTERS CCMAP_POW2(CCMAP_BITS_PER_MID_LOG2)
|
||||
#define CCMAP_NUM_UCHARS_PER_MID \
|
||||
CCMAP_POW2(CCMAP_BITS_PER_MID_LOG2+CCMAP_BITS_PER_PAGE_LOG2)
|
||||
|
||||
//
|
||||
// Upper bits
|
||||
//
|
||||
#define CCMAP_BITS_PER_UPPER_LOG2 4
|
||||
#define CCMAP_UPPER_INDEX(c) \
|
||||
(((c)>>(CCMAP_BITS_PER_MID_LOG2+CCMAP_BITS_PER_PAGE_LOG2)) \
|
||||
& PR_BITMASK(CCMAP_BITS_PER_UPPER_LOG2))
|
||||
#define CCMAP_NUM_UPPER_POINTERS CCMAP_POW2(CCMAP_BITS_PER_UPPER_LOG2)
|
||||
|
||||
//
|
||||
// Misc
|
||||
//
|
||||
#define CCMAP_BITS_PER_PRUINT16_LOG2 4
|
||||
#define CCMAP_BITS_PER_PRUINT32_LOG2 5
|
||||
|
||||
#define CCMAP_BITS_PER_PRUINT16 CCMAP_POW2(CCMAP_BITS_PER_PRUINT16_LOG2)
|
||||
#define CCMAP_BITS_PER_PRUINT32 CCMAP_POW2(CCMAP_BITS_PER_PRUINT32_LOG2)
|
||||
#define CCMAP_BITS_PER_ALU CCMAP_POW2(CCMAP_BITS_PER_ALU_LOG2)
|
||||
|
||||
#define CCMAP_ALUS_PER_PRUINT32 (CCMAP_BITS_PER_PRUINT32/CCMAP_BITS_PER_ALU)
|
||||
#define CCMAP_PRUINT32S_PER_ALU (CCMAP_BITS_PER_ALU/CCMAP_BITS_PER_PRUINT32)
|
||||
#define CCMAP_PRUINT32S_PER_PAGE (CCMAP_BITS_PER_PAGE/CCMAP_BITS_PER_PRUINT32)
|
||||
|
||||
#define CCMAP_ALU_MASK PR_BITMASK(CCMAP_BITS_PER_ALU)
|
||||
#define CCMAP_ALUS_PER_PAGE CCMAP_POW2(CCMAP_BITS_PER_PAGE_LOG2 \
|
||||
- CCMAP_BITS_PER_ALU_LOG2)
|
||||
#define NUM_UNICODE_CHARS CCMAP_POW2(CCMAP_BITS_PER_UPPER_LOG2 \
|
||||
+CCMAP_BITS_PER_MID_LOG2 \
|
||||
+CCMAP_BITS_PER_PAGE_LOG2)
|
||||
#define CCMAP_TOTAL_PAGES CCMAP_POW2(CCMAP_BITS_PER_UPPER_LOG2 \
|
||||
+CCMAP_BITS_PER_MID_LOG2)
|
||||
|
||||
#define CCMAP_BEGIN_AT_START_OF_MAP 0xFFFF
|
||||
|
||||
//
|
||||
// Finally, build up the macro to test the bit for a given char
|
||||
//
|
||||
|
||||
// offset from base to mid array
|
||||
#define CCMAP_TO_MID(m,c) ((m)[CCMAP_UPPER_INDEX(c)])
|
||||
|
||||
// offset from base to page
|
||||
#define CCMAP_TO_PAGE(m,c) ((m)[CCMAP_TO_MID((m),(c)) + CCMAP_MID_INDEX(c)])
|
||||
|
||||
// offset from base to alu
|
||||
#define CCMAP_TO_ALU(m,c) \
|
||||
(*((ALU_TYPE*)(&((m)[CCMAP_TO_PAGE((m),(c))])) + CCMAP_ALU_INDEX(c)))
|
||||
|
||||
// test the bit
|
||||
#define CCMAP_HAS_CHAR(m,c) (((CCMAP_TO_ALU(m,c))>>CCMAP_BIT_INDEX(c)) & 1)
|
||||
|
||||
// unset the bit
|
||||
#define CCMAP_UNSET_CHAR(m,c) (CCMAP_TO_ALU(m,c) &= ~(CCMAP_POW2(CCMAP_BIT_INDEX(c))))
|
||||
|
||||
#define CCMAP_SIZE(m) (*((m)-1))
|
||||
#define CCMAP_FLAG(m) (*((m)-2))
|
||||
#define CCMAP_EXTRA (sizeof(ALU_TYPE)/sizeof(PRUint16)>2? sizeof(ALU_TYPE)/sizeof(PRUint16): 2)
|
||||
#define CCMAP_SURROGATE_FLAG 0X0001
|
||||
#define CCMAP_NONE_FLAG 0x0000
|
||||
|
||||
// non-bmp unicode support extension
|
||||
#define EXTENDED_UNICODE_PLANES 16
|
||||
|
||||
// get plane number from ccmap, bmp excluded, so plane 1's number is 0.
|
||||
#define CCMAP_PLANE_FROM_SURROGATE(h) ((((PRUint16)(h) - (PRUint16)0xd800) >> 6) + 1)
|
||||
|
||||
// same as above, but get plane number from a ucs4 char
|
||||
#define CCMAP_PLANE(u) ((((PRUint32)(u))>>16))
|
||||
|
||||
// scalar value inside the plane
|
||||
#define CCMAP_INPLANE_OFFSET(h, l) (((((PRUint16)(h) - (PRUint16)0xd800) & 0x3f) << 10) + ((PRUint16)(l) - (PRUint16)0xdc00))
|
||||
|
||||
// get ccmap for that plane
|
||||
#define CCMAP_FOR_PLANE_EXT(m, i) ((m) + ((PRUint32*)((m) + CCMAP_SIZE(m)))[(i)-1])
|
||||
|
||||
// test the bit for surrogate pair
|
||||
#define CCMAP_HAS_CHAR_EXT2(m, h, l) (CCMAP_FLAG(m)&CCMAP_SURROGATE_FLAG && \
|
||||
CCMAP_HAS_CHAR(CCMAP_FOR_PLANE_EXT((m), CCMAP_PLANE_FROM_SURROGATE(h)), CCMAP_INPLANE_OFFSET(h, l)))
|
||||
// test the bit for a character in UCS4
|
||||
#define CCMAP_HAS_CHAR_EXT(m, ucs4) (!((ucs4)&0xffff0000) && CCMAP_HAS_CHAR(m, (PRUnichar)(ucs4)) || \
|
||||
CCMAP_FLAG(m)&CCMAP_SURROGATE_FLAG && CCMAP_HAS_CHAR(CCMAP_FOR_PLANE_EXT((m), CCMAP_PLANE(ucs4)), (ucs4)&0xffff))
|
||||
|
||||
#endif // NSCOMPRESSEDCHARMAP_H
|
||||
58
mozilla/gfx/public/nsCoord.h
Normal file
58
mozilla/gfx/public/nsCoord.h
Normal file
@@ -0,0 +1,58 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef NSCOORD_H
|
||||
#define NSCOORD_H
|
||||
|
||||
#include "nscore.h"
|
||||
|
||||
/*
|
||||
* Basic type used for the geometry classes. By making it a typedef we can
|
||||
* easily change it in the future.
|
||||
*
|
||||
* All coordinates are maintained as signed 32-bit integers in the twips
|
||||
* coordinate space. A twip is 1/20th of a point, and there are 72 points per
|
||||
* inch.
|
||||
*
|
||||
* Twips are used because they are a device-independent unit of measure. See
|
||||
* header file nsUnitConversion.h for many useful macros to convert between
|
||||
* different units of measure.
|
||||
*/
|
||||
typedef PRInt32 nscoord;
|
||||
|
||||
#endif /* NSCOORD_H */
|
||||
184
mozilla/gfx/public/nsDeviceContext.h
Normal file
184
mozilla/gfx/public/nsDeviceContext.h
Normal file
@@ -0,0 +1,184 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Roland Mainz <Roland.Mainz@informatik.med.uni-giessen.de>
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsDeviceContext_h___
|
||||
#define nsDeviceContext_h___
|
||||
|
||||
#include "nsIDeviceContext.h"
|
||||
#include "nsIDeviceContextSpec.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIAtom.h"
|
||||
#include "nsVoidArray.h"
|
||||
#include "nsIObserver.h"
|
||||
#include "nsIObserverService.h"
|
||||
#include "nsWeakReference.h"
|
||||
|
||||
class nsIImageRequest;
|
||||
class nsHashtable;
|
||||
|
||||
class nsFontCache
|
||||
{
|
||||
public:
|
||||
nsFontCache();
|
||||
virtual ~nsFontCache();
|
||||
|
||||
NS_IMETHOD Init(nsIDeviceContext* aContext);
|
||||
NS_IMETHOD GetDeviceContext(nsIDeviceContext *&aContext) const;
|
||||
NS_IMETHOD GetMetricsFor(const nsFont& aFont, nsIAtom* aLangGroup,
|
||||
nsIFontMetrics *&aMetrics);
|
||||
|
||||
nsresult FontMetricsDeleted(const nsIFontMetrics* aFontMetrics);
|
||||
nsresult Compact();
|
||||
nsresult Flush();
|
||||
/* printer device context classes may create their own
|
||||
* subclasses of nsFontCache (and override this method) and override
|
||||
* DeviceContextImpl::CreateFontCache (see bug 81311).
|
||||
*/
|
||||
NS_IMETHOD CreateFontMetricsInstance(nsIFontMetrics** fm);
|
||||
|
||||
protected:
|
||||
nsVoidArray mFontMetrics;
|
||||
nsIDeviceContext *mContext; // we do not addref this since
|
||||
// ownership is implied. MMP.
|
||||
};
|
||||
|
||||
class NS_GFX DeviceContextImpl : public nsIDeviceContext,
|
||||
public nsIObserver,
|
||||
public nsSupportsWeakReference
|
||||
{
|
||||
public:
|
||||
DeviceContextImpl();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIOBSERVER
|
||||
|
||||
NS_IMETHOD Init(nsNativeWidget aWidget);
|
||||
|
||||
NS_IMETHOD CreateRenderingContext(nsIView *aView, nsIRenderingContext *&aContext);
|
||||
NS_IMETHOD CreateRenderingContext(nsIWidget *aWidget, nsIRenderingContext *&aContext);
|
||||
NS_IMETHOD CreateRenderingContext(nsIRenderingContext *&aContext){return NS_ERROR_NOT_IMPLEMENTED;}
|
||||
|
||||
NS_IMETHOD InitRenderingContext(nsIRenderingContext *aContext, nsIWidget *aWindow);
|
||||
|
||||
NS_IMETHOD GetDevUnitsToTwips(float &aDevUnitsToTwips) const;
|
||||
NS_IMETHOD GetTwipsToDevUnits(float &aTwipsToDevUnits) const;
|
||||
|
||||
NS_IMETHOD SetAppUnitsToDevUnits(float aAppUnits);
|
||||
NS_IMETHOD SetDevUnitsToAppUnits(float aDevUnits);
|
||||
|
||||
NS_IMETHOD GetAppUnitsToDevUnits(float &aAppUnits) const;
|
||||
NS_IMETHOD GetDevUnitsToAppUnits(float &aDevUnits) const;
|
||||
|
||||
NS_IMETHOD GetCanonicalPixelScale(float &aScale) const;
|
||||
NS_IMETHOD SetCanonicalPixelScale(float aScale);
|
||||
|
||||
NS_IMETHOD GetMetricsFor(const nsFont& aFont, nsIAtom* aLangGroup,
|
||||
nsIFontMetrics*& aMetrics);
|
||||
NS_IMETHOD GetMetricsFor(const nsFont& aFont, nsIFontMetrics*& aMetrics);
|
||||
|
||||
NS_IMETHOD SetZoom(float aZoom);
|
||||
NS_IMETHOD GetZoom(float &aZoom) const;
|
||||
|
||||
NS_IMETHOD SetTextZoom(float aTextZoom);
|
||||
NS_IMETHOD GetTextZoom(float &aTextZoom) const;
|
||||
|
||||
NS_IMETHOD GetGamma(float &aGamma);
|
||||
NS_IMETHOD SetGamma(float aGamma);
|
||||
|
||||
NS_IMETHOD GetGammaTable(PRUint8 *&aGammaTable);
|
||||
|
||||
NS_IMETHOD FirstExistingFont(const nsFont& aFont, nsString& aFaceName);
|
||||
|
||||
NS_IMETHOD GetLocalFontName(const nsString& aFaceName, nsString& aLocalName,
|
||||
PRBool& aAliased);
|
||||
|
||||
NS_IMETHOD CreateFontCache();
|
||||
NS_IMETHOD FontMetricsDeleted(const nsIFontMetrics* aFontMetrics);
|
||||
NS_IMETHOD FlushFontCache(void);
|
||||
|
||||
NS_IMETHOD GetDepth(PRUint32& aDepth);
|
||||
|
||||
NS_IMETHOD GetPaletteInfo(nsPaletteInfo& aPaletteInfo);
|
||||
|
||||
#ifdef NS_PRINT_PREVIEW
|
||||
NS_IMETHOD SetAltDevice(nsIDeviceContext* aAltDC);
|
||||
NS_IMETHOD GetAltDevice(nsIDeviceContext** aAltDC) { *aAltDC = mAltDC.get(); NS_IF_ADDREF(*aAltDC); return NS_OK;}
|
||||
NS_IMETHOD SetUseAltDC(PRUint8 aValue, PRBool aOn);
|
||||
#else
|
||||
|
||||
#endif
|
||||
|
||||
protected:
|
||||
virtual ~DeviceContextImpl();
|
||||
|
||||
void CommonInit(void);
|
||||
void SetGammaTable(PRUint8 * aTable, float aCurrentGamma, float aNewGamma);
|
||||
nsresult CreateIconILGroupContext();
|
||||
virtual nsresult CreateFontAliasTable();
|
||||
nsresult AliasFont(const nsString& aFont,
|
||||
const nsString& aAlias, const nsString& aAltAlias,
|
||||
PRBool aForceAlias);
|
||||
void GetLocaleLangGroup(void);
|
||||
|
||||
float mTwipsToPixels;
|
||||
float mPixelsToTwips;
|
||||
float mAppUnitsToDevUnits;
|
||||
float mDevUnitsToAppUnits;
|
||||
nsFontCache *mFontCache;
|
||||
nsCOMPtr<nsIAtom> mLocaleLangGroup; // XXX temp fix for performance bug - erik
|
||||
float mZoom;
|
||||
float mTextZoom;
|
||||
float mGammaValue;
|
||||
PRUint8 *mGammaTable;
|
||||
nsHashtable* mFontAliasTable;
|
||||
float mCPixelScale;
|
||||
|
||||
#ifdef NS_PRINT_PREVIEW
|
||||
nsCOMPtr<nsIDeviceContext> mAltDC;
|
||||
PRUint8 mUseAltDC;
|
||||
#endif
|
||||
|
||||
public:
|
||||
nsNativeWidget mWidget;
|
||||
#ifdef NS_DEBUG
|
||||
PRBool mInitialized;
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif /* nsDeviceContext_h___ */
|
||||
143
mozilla/gfx/public/nsFont.h
Normal file
143
mozilla/gfx/public/nsFont.h
Normal file
@@ -0,0 +1,143 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsFont_h___
|
||||
#define nsFont_h___
|
||||
|
||||
#include "nscore.h"
|
||||
#include "nsCoord.h"
|
||||
#include "nsString.h"
|
||||
|
||||
// XXX we need a method to enumerate all of the possible fonts on the
|
||||
// system across family, weight, style, size, etc. But not here!
|
||||
|
||||
// Enumerator callback function. Return PR_FALSE to stop
|
||||
typedef PRBool (*nsFontFamilyEnumFunc)(const nsString& aFamily, PRBool aGeneric, void *aData);
|
||||
|
||||
// IDs for generic fonts
|
||||
// NOTE: 0, 1 are reserved for the special IDs of the default variable
|
||||
// and fixed fonts in the presentation context, see nsIPresContext.h
|
||||
const PRUint8 kGenericFont_NONE = 0x00;
|
||||
// Special
|
||||
const PRUint8 kGenericFont_moz_variable = 0x00; // for the default variable width font
|
||||
const PRUint8 kGenericFont_moz_fixed = 0x01; // our special "use the user's fixed font"
|
||||
// CSS
|
||||
const PRUint8 kGenericFont_serif = 0x02;
|
||||
const PRUint8 kGenericFont_sans_serif = 0x04;
|
||||
const PRUint8 kGenericFont_monospace = 0x08;
|
||||
const PRUint8 kGenericFont_cursive = 0x10;
|
||||
const PRUint8 kGenericFont_fantasy = 0x20;
|
||||
|
||||
// Font structure.
|
||||
struct NS_GFX nsFont {
|
||||
// The family name of the font
|
||||
nsString name;
|
||||
|
||||
// The style of font (normal, italic, oblique)
|
||||
PRUint8 style;
|
||||
|
||||
// The variant of the font (normal, small-caps)
|
||||
PRUint8 variant;
|
||||
|
||||
// The weight of the font (0-999)
|
||||
PRUint16 weight;
|
||||
|
||||
// The decorations on the font (underline, overline,
|
||||
// line-through). The decorations can be binary or'd together.
|
||||
PRUint8 decorations;
|
||||
|
||||
// The logical size of the font, in nscoord units
|
||||
nscoord size;
|
||||
|
||||
// The aspect-value (ie., the ratio actualsize:actualxheight) that any
|
||||
// actual physical font created from this font structure must have when
|
||||
// rendering or measuring a string. A value of 0 means no adjustment
|
||||
// needs to be done.
|
||||
float sizeAdjust;
|
||||
|
||||
// Initialize the font struct with an iso-latin1 name
|
||||
nsFont(const char* aName, PRUint8 aStyle, PRUint8 aVariant,
|
||||
PRUint16 aWeight, PRUint8 aDecoration, nscoord aSize,
|
||||
float aSizeAdjust=0.0f);
|
||||
|
||||
// Initialize the font struct with a (potentially) unicode name
|
||||
nsFont(const nsString& aName, PRUint8 aStyle, PRUint8 aVariant,
|
||||
PRUint16 aWeight, PRUint8 aDecoration, nscoord aSize,
|
||||
float aSizeAdjust=0.0f);
|
||||
|
||||
// Make a copy of the given font
|
||||
nsFont(const nsFont& aFont);
|
||||
|
||||
nsFont();
|
||||
~nsFont();
|
||||
|
||||
PRBool operator==(const nsFont& aOther) const {
|
||||
return Equals(aOther);
|
||||
}
|
||||
|
||||
PRBool Equals(const nsFont& aOther) const ;
|
||||
|
||||
nsFont& operator=(const nsFont& aOther);
|
||||
|
||||
// Utility method to interpret name string
|
||||
// enumerates all families specified by this font only
|
||||
// returns PR_TRUE if completed, PR_FALSE if stopped
|
||||
// enclosing quotes will be removed, and whitespace compressed (as needed)
|
||||
PRBool EnumerateFamilies(nsFontFamilyEnumFunc aFunc, void* aData) const;
|
||||
void GetFirstFamily(nsString& aFamily) const;
|
||||
|
||||
// Utility method to return the ID of a generic font
|
||||
static void GetGenericID(const nsString& aGeneric, PRUint8* aID);
|
||||
};
|
||||
|
||||
#define NS_FONT_STYLE_NORMAL 0
|
||||
#define NS_FONT_STYLE_ITALIC 1
|
||||
#define NS_FONT_STYLE_OBLIQUE 2
|
||||
|
||||
#define NS_FONT_VARIANT_NORMAL 0
|
||||
#define NS_FONT_VARIANT_SMALL_CAPS 1
|
||||
|
||||
#define NS_FONT_DECORATION_NONE 0x0
|
||||
#define NS_FONT_DECORATION_UNDERLINE 0x1
|
||||
#define NS_FONT_DECORATION_OVERLINE 0x2
|
||||
#define NS_FONT_DECORATION_LINE_THROUGH 0x4
|
||||
|
||||
#define NS_FONT_WEIGHT_NORMAL 400
|
||||
#define NS_FONT_WEIGHT_BOLD 700
|
||||
|
||||
#endif /* nsFont_h___ */
|
||||
106
mozilla/gfx/public/nsGfxCIID.h
Normal file
106
mozilla/gfx/public/nsGfxCIID.h
Normal file
@@ -0,0 +1,106 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsGfxCIID_h__
|
||||
#define nsGfxCIID_h__
|
||||
|
||||
#include "nsISupports.h"
|
||||
#include "nsIFactory.h"
|
||||
#include "nsIComponentManager.h"
|
||||
|
||||
#define NS_IMAGE_CID \
|
||||
{ 0x6049b260, 0xc1e6, 0x11d1, \
|
||||
{ 0xa8, 0x27, 0x00, 0x40, 0x95, 0x9a, 0x28, 0xc9 } }
|
||||
|
||||
#define NS_RENDERING_CONTEXT_CID \
|
||||
{ 0x6049b261, 0xc1e6, 0x11d1, \
|
||||
{ 0xa8, 0x27, 0x00, 0x40, 0x95, 0x9a, 0x28, 0xc9 } }
|
||||
|
||||
#define NS_DEVICE_CONTEXT_CID \
|
||||
{ 0x6049b262, 0xc1e6, 0x11d1, \
|
||||
{ 0xa8, 0x27, 0x00, 0x40, 0x95, 0x9a, 0x28, 0xc9 } }
|
||||
|
||||
#define NS_FONT_METRICS_CID \
|
||||
{ 0x6049b263, 0xc1e6, 0x11d1, \
|
||||
{ 0xa8, 0x27, 0x00, 0x40, 0x95, 0x9a, 0x28, 0xc9 } }
|
||||
|
||||
#define NS_FONT_ENUMERATOR_CID \
|
||||
{ 0xa6cf9115, 0x15b3, 0x11d2, \
|
||||
{ 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } }
|
||||
|
||||
#define NS_FONTLIST_CID \
|
||||
{ 0x6a8c0dd4, 0x1dd2, 0x11b2, \
|
||||
{ 0x9a, 0x8f, 0xf8, 0x2f, 0x9d, 0xf2, 0x5b, 0x07 } }
|
||||
|
||||
#define NS_REGION_CID \
|
||||
{ 0xe12752f0, 0xee9a, 0x11d1, \
|
||||
{ 0xa8, 0x2a, 0x00, 0x40, 0x95, 0x9a, 0x28, 0xc9 } }
|
||||
|
||||
#define NS_SCRIPTABLE_REGION_CID \
|
||||
{ 0xda5b130a, 0x1dd1, 0x11b2, \
|
||||
{ 0xad, 0x47, 0xf4, 0x55, 0xb1, 0x81, 0x4a, 0x78 } }
|
||||
|
||||
#define NS_BLENDER_CID \
|
||||
{ 0x6049b264, 0xc1e6, 0x11d1, \
|
||||
{ 0xa8, 0x27, 0x00, 0x40, 0x95, 0x9a, 0x28, 0xc9 } }
|
||||
|
||||
#define NS_DEVICE_CONTEXT_SPEC_CID \
|
||||
{ 0xd7193600, 0x78e0, 0x11d2, \
|
||||
{ 0xa8, 0x46, 0x00, 0x40, 0x95, 0x9a, 0x28, 0xc9 } }
|
||||
|
||||
#define NS_DEVICE_CONTEXT_SPEC_FACTORY_CID \
|
||||
{ 0xec5bebb0, 0x7b51, 0x11d2, \
|
||||
{ 0xa8, 0x48, 0x00, 0x40, 0x95, 0x9a, 0x28, 0xc9 } }
|
||||
|
||||
#define NS_DRAWING_SURFACE_CID \
|
||||
{ 0x199c7040, 0xcab0, 0x11d2, \
|
||||
{ 0xa8, 0x49, 0x00, 0x40, 0x95, 0x9a, 0x28, 0xc9 } }
|
||||
|
||||
#define NS_SCREENMANAGER_CID \
|
||||
{ 0xc401eb80, 0xf9ea, 0x11d3, \
|
||||
{ 0xbb, 0x6f, 0xe7, 0x32, 0xb7, 0x3e, 0xbe, 0x7c } }
|
||||
|
||||
#define NS_PRINTOPTIONS_CID \
|
||||
{ 0x30a3b080, 0x4867, 0x11d4, \
|
||||
{ 0xa8, 0x56, 0x0, 0x10, 0x5a, 0x18, 0x34, 0x19 } }
|
||||
|
||||
#define NS_PRINTER_ENUMERATOR_CID \
|
||||
{ 0xa6cf9129, 0x15b3, 0x11d2, \
|
||||
{ 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }
|
||||
|
||||
#endif
|
||||
100
mozilla/gfx/public/nsIBlender.h
Normal file
100
mozilla/gfx/public/nsIBlender.h
Normal file
@@ -0,0 +1,100 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsIBlender_h___
|
||||
#define nsIBlender_h___
|
||||
|
||||
#include "nscore.h"
|
||||
#include "nsISupports.h"
|
||||
#include "nsIRenderingContext.h"
|
||||
|
||||
// IID for the nsIBlender interface
|
||||
#define NS_IBLENDER_IID \
|
||||
{ 0xbdb4b5b0, 0xf0db, 0x11d1, \
|
||||
{ 0xa8, 0x2a, 0x00, 0x40, 0x95, 0x9a, 0x28, 0xc9 } }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
// Blender interface
|
||||
class nsIBlender : public nsISupports
|
||||
{
|
||||
public:
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IBLENDER_IID)
|
||||
|
||||
/**
|
||||
* Initialize the Blender
|
||||
* @update dc 11/4/98
|
||||
* @param aContext is where the blender can get info about the device its blending on
|
||||
* @result The result of the initialization, NS_OK if no errors
|
||||
*/
|
||||
NS_IMETHOD Init(nsIDeviceContext *aContext) = 0;
|
||||
|
||||
/**
|
||||
* NOTE: if we can make this static, that would be great. I don't think we can.
|
||||
* Blend source and destination nsDrawingSurfaces. Both drawing surfaces
|
||||
* will have bitmaps associated with them.
|
||||
* @param aSX x offset into source drawing surface of blend area
|
||||
* @param aSY y offset into source drawing surface of blend area
|
||||
* @param aWidth width of blend area
|
||||
* @param aHeight width of blend area
|
||||
* @param aSrc source for the blending
|
||||
* @param aDest destination for blending
|
||||
* @param aDX x offset into destination drawing surface of blend area
|
||||
* @param aDY y offset into destination drawing surface of blend area
|
||||
* @param aSrcOpacity 0.0f -> 1.0f opacity value of source area. 1.0f indicates
|
||||
* complete opacity.
|
||||
* @param aSecondSrc an optional second source drawing surface which is used in
|
||||
* conjunction with the background color parameters to determine
|
||||
* which pixels to blend
|
||||
* @param aSrcBackColor color of pixels in aSrc that should be
|
||||
* considered "background" color
|
||||
* @param aSecondSrcBackColor color of pixels in aSrc that should be
|
||||
* considered "background" color
|
||||
*/
|
||||
NS_IMETHOD Blend(PRInt32 aSX, PRInt32 aSY, PRInt32 aWidth, PRInt32 aHeight,nsDrawingSurface aSrc,
|
||||
nsDrawingSurface aDest, PRInt32 aDX, PRInt32 aDY, float aSrcOpacity,
|
||||
nsDrawingSurface aSecondSrc = nsnull, nscolor aSrcBackColor = NS_RGB(0, 0, 0),
|
||||
nscolor aSecondSrcBackColor = NS_RGB(0, 0, 0)) = 0;
|
||||
|
||||
NS_IMETHOD Blend(PRInt32 aSX, PRInt32 aSY, PRInt32 aWidth, PRInt32 aHeight, nsIRenderingContext *aSrc,
|
||||
nsIRenderingContext *aDest, PRInt32 aDX, PRInt32 aDY, float aSrcOpacity,
|
||||
nsIRenderingContext *aSecondSrc = nsnull, nscolor aSrcBackColor = NS_RGB(0, 0, 0),
|
||||
nscolor aSecondSrcBackColor = NS_RGB(0, 0, 0)) = 0;
|
||||
};
|
||||
|
||||
#endif
|
||||
513
mozilla/gfx/public/nsIDeviceContext.h
Normal file
513
mozilla/gfx/public/nsIDeviceContext.h
Normal file
@@ -0,0 +1,513 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Roland Mainz <roland.mainz@informatik.med.uni-giessen.de>
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsIDeviceContext_h___
|
||||
#define nsIDeviceContext_h___
|
||||
|
||||
#include "nsISupports.h"
|
||||
#include "nsCoord.h"
|
||||
#include "nsRect.h"
|
||||
#include "nsIWidget.h"
|
||||
#include "nsIRenderingContext.h"
|
||||
|
||||
class nsIView;
|
||||
class nsIFontMetrics;
|
||||
class nsIWidget;
|
||||
class nsIDeviceContextSpec;
|
||||
class nsIAtom;
|
||||
|
||||
struct nsFont;
|
||||
struct nsColor;
|
||||
|
||||
//a cross platform way of specifying a native device context
|
||||
typedef void * nsNativeDeviceContext;
|
||||
|
||||
/* error codes for printer device contexts */
|
||||
#define NS_ERROR_GFX_PRINTER_BASE (1) /* adjustable :-) */
|
||||
/* Unix: print command (lp/lpr) not found */
|
||||
#define NS_ERROR_GFX_PRINTER_CMD_NOT_FOUND \
|
||||
NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX,NS_ERROR_GFX_PRINTER_BASE+1)
|
||||
/* Unix: print command returned an error */
|
||||
#define NS_ERROR_GFX_PRINTER_CMD_FAILURE \
|
||||
NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX,NS_ERROR_GFX_PRINTER_BASE+2)
|
||||
/* no printer available (e.g. cannot find _any_ printer) */
|
||||
#define NS_ERROR_GFX_PRINTER_NO_PRINTER_AVAILABLE \
|
||||
NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX,NS_ERROR_GFX_PRINTER_BASE+3)
|
||||
/* _specified_ (by name) printer not found */
|
||||
#define NS_ERROR_GFX_PRINTER_NAME_NOT_FOUND \
|
||||
NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX,NS_ERROR_GFX_PRINTER_BASE+4)
|
||||
/* access to printer denied */
|
||||
#define NS_ERROR_GFX_PRINTER_ACCESS_DENIED \
|
||||
NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX,NS_ERROR_GFX_PRINTER_BASE+5)
|
||||
/* invalid printer attribute (for example: unsupported paper size etc.) */
|
||||
#define NS_ERROR_GFX_PRINTER_INVALID_ATTRIBUTE \
|
||||
NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX,NS_ERROR_GFX_PRINTER_BASE+6)
|
||||
/* printer not "ready" (offline ?) */
|
||||
#define NS_ERROR_GFX_PRINTER_PRINTER_NOT_READY \
|
||||
NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX,NS_ERROR_GFX_PRINTER_BASE+8)
|
||||
/* printer out of paper */
|
||||
#define NS_ERROR_GFX_PRINTER_OUT_OF_PAPER \
|
||||
NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX,NS_ERROR_GFX_PRINTER_BASE+9)
|
||||
/* generic printer I/O error */
|
||||
#define NS_ERROR_GFX_PRINTER_PRINTER_IO_ERROR \
|
||||
NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX,NS_ERROR_GFX_PRINTER_BASE+10)
|
||||
/* print-to-file: could not open output file */
|
||||
#define NS_ERROR_GFX_PRINTER_COULD_NOT_OPEN_FILE \
|
||||
NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX,NS_ERROR_GFX_PRINTER_BASE+11)
|
||||
/* print-to-file: I/O error while printing to file */
|
||||
#define NS_ERROR_GFX_PRINTER_FILE_IO_ERROR \
|
||||
NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX,NS_ERROR_GFX_PRINTER_BASE+12)
|
||||
/* print preview: needs at least one printer */
|
||||
#define NS_ERROR_GFX_PRINTER_PRINTPREVIEW \
|
||||
NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX,NS_ERROR_GFX_PRINTER_BASE+13)
|
||||
/* print: starting document */
|
||||
#define NS_ERROR_GFX_PRINTER_STARTDOC \
|
||||
NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX,NS_ERROR_GFX_PRINTER_BASE+14)
|
||||
/* print: ending document */
|
||||
#define NS_ERROR_GFX_PRINTER_ENDDOC \
|
||||
NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX,NS_ERROR_GFX_PRINTER_BASE+15)
|
||||
/* print: starting page */
|
||||
#define NS_ERROR_GFX_PRINTER_STARTPAGE \
|
||||
NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX,NS_ERROR_GFX_PRINTER_BASE+16)
|
||||
/* print: ending page */
|
||||
#define NS_ERROR_GFX_PRINTER_ENDPAGE \
|
||||
NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX,NS_ERROR_GFX_PRINTER_BASE+17)
|
||||
/* print: print while in print preview */
|
||||
#define NS_ERROR_GFX_PRINTER_PRINT_WHILE_PREVIEW \
|
||||
NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX,NS_ERROR_GFX_PRINTER_BASE+18)
|
||||
/* requested page size not supported by printer */
|
||||
#define NS_ERROR_GFX_PRINTER_PAPER_SIZE_NOT_SUPPORTED \
|
||||
NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX,NS_ERROR_GFX_PRINTER_BASE+19)
|
||||
/* requested page orientation not supported */
|
||||
#define NS_ERROR_GFX_PRINTER_ORIENTATION_NOT_SUPPORTED \
|
||||
NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX,NS_ERROR_GFX_PRINTER_BASE+20)
|
||||
/* requested colorspace not supported (like printing "color" on a "grayscale"-only printer) */
|
||||
#define NS_ERROR_GFX_PRINTER_COLORSPACE_NOT_SUPPORTED \
|
||||
NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX,NS_ERROR_GFX_PRINTER_BASE+21)
|
||||
/* too many copies requested */
|
||||
#define NS_ERROR_GFX_PRINTER_TOO_MANY_COPIES \
|
||||
NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX,NS_ERROR_GFX_PRINTER_BASE+22)
|
||||
|
||||
|
||||
/**
|
||||
* Conts need for Print Preview
|
||||
*/
|
||||
#ifdef NS_PRINT_PREVIEW
|
||||
const PRUint8 kUseAltDCFor_NONE = 0x00; // Do not use the AltDC for anything
|
||||
const PRUint8 kUseAltDCFor_FONTMETRICS = 0x01; // Use it for only getting the font metrics
|
||||
const PRUint8 kUseAltDCFor_CREATERC_REFLOW = 0x02; // Use when creating RenderingContexts for Reflow
|
||||
const PRUint8 kUseAltDCFor_CREATERC_PAINT = 0x04; // Use when creating RenderingContexts for Painting
|
||||
const PRUint8 kUseAltDCFor_SURFACE_DIM = 0x08; // Use it for getting the Surface Dimensions
|
||||
#endif
|
||||
|
||||
#define NS_IDEVICE_CONTEXT_IID \
|
||||
{ 0x5931c580, 0xb917, 0x11d1, \
|
||||
{ 0xa8, 0x24, 0x00, 0x40, 0x95, 0x9a, 0x28, 0xc9 } }
|
||||
|
||||
//a cross platform way of specifying a native palette handle
|
||||
typedef void * nsPalette;
|
||||
|
||||
//structure used to return information about a device's palette capabilities
|
||||
struct nsPaletteInfo {
|
||||
PRPackedBool isPaletteDevice;
|
||||
PRUint16 sizePalette; // number of entries in the palette
|
||||
PRUint16 numReserved; // number of reserved palette entries
|
||||
nsPalette palette; // native palette handle
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
eSystemFont_Caption, // css2
|
||||
eSystemFont_Icon,
|
||||
eSystemFont_Menu,
|
||||
eSystemFont_MessageBox,
|
||||
eSystemFont_SmallCaption,
|
||||
eSystemFont_StatusBar,
|
||||
|
||||
eSystemFont_Window, // css3
|
||||
eSystemFont_Document,
|
||||
eSystemFont_Workspace,
|
||||
eSystemFont_Desktop,
|
||||
eSystemFont_Info,
|
||||
eSystemFont_Dialog,
|
||||
eSystemFont_Button,
|
||||
eSystemFont_PullDownMenu,
|
||||
eSystemFont_List,
|
||||
eSystemFont_Field,
|
||||
|
||||
eSystemFont_Tooltips, // moz
|
||||
eSystemFont_Widget,
|
||||
eSystemFont_Theme
|
||||
} nsSystemFontID;
|
||||
|
||||
class nsIDeviceContext : public nsISupports
|
||||
{
|
||||
public:
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDEVICE_CONTEXT_IID)
|
||||
|
||||
/**
|
||||
* Initialize the device context from a widget
|
||||
* @param aWidget a native widget to initialize the device context from
|
||||
* @return error status
|
||||
*/
|
||||
NS_IMETHOD Init(nsNativeWidget aWidget) = 0;
|
||||
|
||||
/**
|
||||
* Create a rendering context and initialize it from an nsIView
|
||||
* @param aView view to initialize context from
|
||||
* @param aContext out parameter for new rendering context
|
||||
* @return error status
|
||||
*/
|
||||
NS_IMETHOD CreateRenderingContext(nsIView *aView, nsIRenderingContext *&aContext) = 0;
|
||||
|
||||
/**
|
||||
* Create a rendering context and initialize it from an nsIWidget
|
||||
* @param aWidget widget to initialize context from
|
||||
* @param aContext out parameter for new rendering context
|
||||
* @return error status
|
||||
*/
|
||||
NS_IMETHOD CreateRenderingContext(nsIWidget *aWidget, nsIRenderingContext *&aContext) = 0;
|
||||
|
||||
/**
|
||||
* Create a rendering context and initialize it. This API should *only* be called
|
||||
* on device contexts whose SupportsNativeWidgets() method return PR_FALSE.
|
||||
* @param aContext out parameter for new rendering context
|
||||
* @return error status
|
||||
*/
|
||||
NS_IMETHOD CreateRenderingContext(nsIRenderingContext *&aContext) = 0;
|
||||
|
||||
/**
|
||||
* Initialize a rendering context from a widget. This method is only for use
|
||||
* when a rendering context was obtained directly from a factory rather than
|
||||
* through one of the Create* methods above.
|
||||
* @param aContext rendering context to initialize
|
||||
* @param aWindow widget to initialize context from
|
||||
* @return error status
|
||||
*/
|
||||
NS_IMETHOD InitRenderingContext(nsIRenderingContext *aContext, nsIWidget *aWindow) = 0;
|
||||
|
||||
/**
|
||||
* Query the device to see if it supports native widgets. If not, then
|
||||
* nsIWidget->Create() calls should be avoided.
|
||||
* @param aSupportsWidgets out paramater. If PR_TRUE, then native widgets
|
||||
* can be created.
|
||||
* @return error status
|
||||
*/
|
||||
NS_IMETHOD SupportsNativeWidgets(PRBool &aSupportsWidgets) = 0;
|
||||
|
||||
/**
|
||||
* Obtain the size of a device unit relative to a Twip. A twip is 1/20 of
|
||||
* a point (which is 1/72 of an inch).
|
||||
* @param aDevUnitsToTwips out parameter for conversion value
|
||||
* @return error status
|
||||
*/
|
||||
NS_IMETHOD GetDevUnitsToTwips(float &aDevUnitsToTwips) const = 0;
|
||||
|
||||
/**
|
||||
* Obtain the size of a Twip relative to a device unit.
|
||||
* @param aTwipsToDevUnits out parameter for conversion value
|
||||
* @return error status
|
||||
*/
|
||||
NS_IMETHOD GetTwipsToDevUnits(float &aTwipsToDevUnits) const = 0;
|
||||
|
||||
/**
|
||||
* Set the scale factor to convert units used by the application
|
||||
* to device units. Typically, an application will query the device
|
||||
* for twips to device units scale and then set the scale
|
||||
* to convert from whatever unit the application wants to use
|
||||
* to device units. From that point on, all other parts of the
|
||||
* app can use the Get* methods below to figure out how
|
||||
* to convert device units <-> app units.
|
||||
* @param aAppUnits scale value to convert from application defined
|
||||
* units to device units.
|
||||
* @return error status
|
||||
*/
|
||||
NS_IMETHOD SetAppUnitsToDevUnits(float aAppUnits) = 0;
|
||||
|
||||
/**
|
||||
* Set the scale factor to convert device units to units
|
||||
* used by the application. This should generally be
|
||||
* 1.0f / the value passed into SetAppUnitsToDevUnits().
|
||||
* @param aDevUnits scale value to convert from device units to
|
||||
* application defined units
|
||||
* @return error status
|
||||
*/
|
||||
NS_IMETHOD SetDevUnitsToAppUnits(float aDevUnits) = 0;
|
||||
|
||||
/**
|
||||
* Get the scale factor to convert from application defined
|
||||
* units to device units.
|
||||
* @param aAppUnits out paramater for scale value
|
||||
* @return error status
|
||||
*/
|
||||
NS_IMETHOD GetAppUnitsToDevUnits(float &aAppUnits) const = 0;
|
||||
|
||||
/**
|
||||
* Get the scale factor to convert from device units to
|
||||
* application defined units.
|
||||
* @param aDevUnits out paramater for scale value
|
||||
* @return error status
|
||||
*/
|
||||
NS_IMETHOD GetDevUnitsToAppUnits(float &aDevUnits) const = 0;
|
||||
|
||||
/**
|
||||
* Get the value used to scale a "standard" pixel to a pixel
|
||||
* of the same physical size for this device. a standard pixel
|
||||
* is defined as a pixel on display 0. this is used to make
|
||||
* sure that entities defined in pixel dimensions maintain a
|
||||
* constant relative size when displayed from one output
|
||||
* device to another.
|
||||
* @param aScale out parameter for scale value
|
||||
* @return error status
|
||||
*/
|
||||
NS_IMETHOD GetCanonicalPixelScale(float &aScale) const = 0;
|
||||
|
||||
/**
|
||||
* Get the value used to scale a "standard" pixel to a pixel
|
||||
* of the same physical size for this device. a standard pixel
|
||||
* is defined as a pixel on display 0. this is used to make
|
||||
* sure that entities defined in pixel dimensions maintain a
|
||||
* constant relative size when displayed from one output
|
||||
* device to another.
|
||||
* @param aScale in parameter for scale value
|
||||
* @return error status
|
||||
*/
|
||||
NS_IMETHOD SetCanonicalPixelScale(float aScale) = 0;
|
||||
|
||||
/**
|
||||
* Get the width of a vertical scroll bar and the height
|
||||
* of a horizontal scrollbar in application units.
|
||||
* @param aWidth out parameter for width
|
||||
* @param aHeight out parameter for height
|
||||
* @return error status
|
||||
*/
|
||||
NS_IMETHOD GetScrollBarDimensions(float &aWidth, float &aHeight) const = 0;
|
||||
|
||||
/**
|
||||
* Fill in an nsFont based on the ID of a system font. This function
|
||||
* may or may not fill in the size, so the size should be set to a
|
||||
* reasonable default before calling.
|
||||
*
|
||||
* @param aID The system font ID.
|
||||
* @param aInfo The font structure to be filled in.
|
||||
* @return error status
|
||||
*/
|
||||
NS_IMETHOD GetSystemFont(nsSystemFontID aID, nsFont *aFont) const = 0;
|
||||
|
||||
/**
|
||||
* Get the nsIFontMetrics that describe the properties of
|
||||
* an nsFont.
|
||||
* @param aFont font description to obtain metrics for
|
||||
* @param aLangGroup the language group of the document
|
||||
* @param aMetrics out parameter for font metrics
|
||||
* @return error status
|
||||
*/
|
||||
NS_IMETHOD GetMetricsFor(const nsFont& aFont, nsIAtom* aLangGroup,
|
||||
nsIFontMetrics*& aMetrics) = 0;
|
||||
|
||||
/**
|
||||
* Get the nsIFontMetrics that describe the properties of
|
||||
* an nsFont.
|
||||
* @param aFont font description to obtain metrics for
|
||||
* @param aMetrics out parameter for font metrics
|
||||
* @return error status
|
||||
*/
|
||||
NS_IMETHOD GetMetricsFor(const nsFont& aFont, nsIFontMetrics*& aMetrics) = 0;
|
||||
|
||||
//get and set the document zoom value used for display-time
|
||||
//scaling. default is 1.0 (no zoom)
|
||||
NS_IMETHOD SetZoom(float aZoom) = 0;
|
||||
NS_IMETHOD GetZoom(float &aZoom) const = 0;
|
||||
|
||||
//get and set the text zoom value used for display-time
|
||||
//scaling. default is 1.0 (no zoom)
|
||||
NS_IMETHOD SetTextZoom(float aTextZoom) = 0;
|
||||
NS_IMETHOD GetTextZoom(float &aTextZoom) const = 0;
|
||||
|
||||
//get a low level drawing surface for rendering. the rendering context
|
||||
//that is passed in is used to create the drawing surface if there isn't
|
||||
//already one in the device context. the drawing surface is then cached
|
||||
//in the device context for re-use.
|
||||
NS_IMETHOD GetDrawingSurface(nsIRenderingContext &aContext, nsDrawingSurface &aSurface) = 0;
|
||||
|
||||
//functions for handling gamma correction of output device
|
||||
NS_IMETHOD GetGamma(float &aGamms) = 0;
|
||||
NS_IMETHOD SetGamma(float aGamma) = 0;
|
||||
|
||||
//XXX the return from this really needs to be ref counted somehow. MMP
|
||||
NS_IMETHOD GetGammaTable(PRUint8 *&aGammaTable) = 0;
|
||||
|
||||
/**
|
||||
* Check to see if a particular named font exists.
|
||||
* @param aFontName character string of font face name
|
||||
* @return NS_OK if font is available, else font is unavailable
|
||||
*/
|
||||
NS_IMETHOD CheckFontExistence(const nsString& aFaceName) = 0;
|
||||
NS_IMETHOD FirstExistingFont(const nsFont& aFont, nsString& aFaceName) = 0;
|
||||
|
||||
NS_IMETHOD GetLocalFontName(const nsString& aFaceName, nsString& aLocalName,
|
||||
PRBool& aAliased) = 0;
|
||||
|
||||
/**
|
||||
* Notification when a font metrics instance created for this device is
|
||||
* about to be deleted
|
||||
*/
|
||||
NS_IMETHOD FontMetricsDeleted(const nsIFontMetrics* aFontMetrics) = 0;
|
||||
|
||||
/**
|
||||
* Attempt to free up resoruces by flushing out any fonts no longer
|
||||
* referenced by anything other than the font cache itself.
|
||||
* @return error status
|
||||
*/
|
||||
NS_IMETHOD FlushFontCache(void) = 0;
|
||||
|
||||
/**
|
||||
* Return the bit depth of the device.
|
||||
*/
|
||||
NS_IMETHOD GetDepth(PRUint32& aDepth) = 0;
|
||||
|
||||
/**
|
||||
* Returns information about the device's palette capabilities.
|
||||
*/
|
||||
NS_IMETHOD GetPaletteInfo(nsPaletteInfo& aPaletteInfo) = 0;
|
||||
|
||||
/**
|
||||
* Returns Platform specific pixel value for an RGB value
|
||||
*/
|
||||
NS_IMETHOD ConvertPixel(nscolor aColor, PRUint32 & aPixel) = 0;
|
||||
|
||||
/**
|
||||
* Get the size of the displayable area of the output device
|
||||
* in app units.
|
||||
* @param aWidth out parameter for width
|
||||
* @param aHeight out parameter for height
|
||||
* @return error status
|
||||
*/
|
||||
NS_IMETHOD GetDeviceSurfaceDimensions(PRInt32 &aWidth, PRInt32 &aHeight) = 0;
|
||||
|
||||
/**
|
||||
* Get the size of the content area of the output device in app units.
|
||||
* This corresponds on a screen device, for instance, to the entire screen.
|
||||
* @param aRect out parameter for full rect. Position (x,y) will be (0,0) or
|
||||
* relative to the primary monitor if this is not the primary.
|
||||
* @return error status
|
||||
*/
|
||||
NS_IMETHOD GetRect ( nsRect &aRect ) = 0;
|
||||
|
||||
/**
|
||||
* Get the size of the content area of the output device in app units.
|
||||
* This corresponds on a screen device, for instance, to the area reported
|
||||
* by GetDeviceSurfaceDimensions, minus the taskbar (Windows) or menubar
|
||||
* (Macintosh).
|
||||
* @param aRect out parameter for client rect. Position (x,y) will be (0,0)
|
||||
* adjusted for any upper/left non-client space if present or
|
||||
* relative to the primary monitor if this is not the primary.
|
||||
* @return error status
|
||||
*/
|
||||
NS_IMETHOD GetClientRect(nsRect &aRect) = 0;
|
||||
|
||||
/**
|
||||
* Returns a new nsIDeviceContext suitable for the device context
|
||||
* specification passed in.
|
||||
* @param aDevice a device context specification. this is a platform
|
||||
* specific structure that only a platform specific device
|
||||
* context can interpret.
|
||||
* @param aContext out parameter for new device context. nsnull on
|
||||
* failure to create new device context.
|
||||
* @return error status
|
||||
*/
|
||||
NS_IMETHOD GetDeviceContextFor(nsIDeviceContextSpec *aDevice,
|
||||
nsIDeviceContext *&aContext) = 0;
|
||||
|
||||
//XXX need to work out re-entrancy issues for these APIs... MMP
|
||||
/**
|
||||
* Inform the output device that output of a document is beginning
|
||||
* Used for print related device contexts. Must be matched 1:1 with
|
||||
* EndDocument().
|
||||
* XXX needs to take parameters so that feedback can be given to the
|
||||
* app regarding pagination progress and aborting print operations?
|
||||
* @return error status
|
||||
*/
|
||||
NS_IMETHOD BeginDocument(PRUnichar * aTitle) = 0;
|
||||
|
||||
/**
|
||||
* Inform the output device that output of a document is ending.
|
||||
* Used for print related device contexts. Must be matched 1:1 with
|
||||
* BeginDocument()
|
||||
* @return error status
|
||||
*/
|
||||
NS_IMETHOD EndDocument(void) = 0;
|
||||
|
||||
/**
|
||||
* Inform the output device that output of a page is beginning
|
||||
* Used for print related device contexts. Must be matched 1:1 with
|
||||
* EndPage() and within a BeginDocument()/EndDocument() pair.
|
||||
* @return error status
|
||||
*/
|
||||
NS_IMETHOD BeginPage(void) = 0;
|
||||
|
||||
/**
|
||||
* Inform the output device that output of a page is ending
|
||||
* Used for print related device contexts. Must be matched 1:1 with
|
||||
* BeginPage() and within a BeginDocument()/EndDocument() pair.
|
||||
* @return error status
|
||||
*/
|
||||
NS_IMETHOD EndPage(void) = 0;
|
||||
|
||||
#ifdef NS_PRINT_PREVIEW
|
||||
/**
|
||||
* Set an Alternative Device Context where some of the calls
|
||||
* are deferred to it
|
||||
*/
|
||||
NS_IMETHOD SetAltDevice(nsIDeviceContext* aAltDC) = 0;
|
||||
|
||||
/**
|
||||
* Get the Alternate Device Context
|
||||
*/
|
||||
NS_IMETHOD GetAltDevice(nsIDeviceContext** aAltDC) = 0;
|
||||
|
||||
/**
|
||||
* Turn on/off which types of information is retrived
|
||||
* via the alt device context
|
||||
*/
|
||||
NS_IMETHOD SetUseAltDC(PRUint8 aValue, PRBool aOn) = 0;
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
#endif /* nsIDeviceContext_h___ */
|
||||
54
mozilla/gfx/public/nsIDeviceContextSpec.h
Normal file
54
mozilla/gfx/public/nsIDeviceContextSpec.h
Normal file
@@ -0,0 +1,54 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsIDeviceContextSpec_h___
|
||||
#define nsIDeviceContextSpec_h___
|
||||
|
||||
#include "nsIDeviceContext.h"
|
||||
|
||||
#define NS_IDEVICE_CONTEXT_SPEC_IID \
|
||||
{ 0x9951f910, 0x78d7, 0x11d2, \
|
||||
{ 0xa8, 0x46, 0x00, 0x40, 0x95, 0x9a, 0x28, 0xc9 } }
|
||||
|
||||
class nsIDeviceContextSpec : public nsISupports
|
||||
{
|
||||
public:
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDEVICE_CONTEXT_SPEC_IID)
|
||||
};
|
||||
|
||||
#endif
|
||||
87
mozilla/gfx/public/nsIDeviceContextSpecFactory.h
Normal file
87
mozilla/gfx/public/nsIDeviceContextSpecFactory.h
Normal file
@@ -0,0 +1,87 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsIDeviceContextSpecFactory_h___
|
||||
#define nsIDeviceContextSpecFactory_h___
|
||||
|
||||
#include "nsISupports.h"
|
||||
|
||||
class nsIDeviceContextSpec;
|
||||
class nsIWidget;
|
||||
class nsIPrintSettings;
|
||||
|
||||
#define NS_IDEVICE_CONTEXT_SPEC_FACTORY_IID \
|
||||
{ 0xf6669570, 0x7b3d, 0x11d2, \
|
||||
{ 0xa8, 0x48, 0x00, 0x40, 0x95, 0x9a, 0x28, 0xc9 } }
|
||||
|
||||
class nsIDeviceContextSpecFactory : public nsISupports
|
||||
{
|
||||
public:
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDEVICE_CONTEXT_SPEC_FACTORY_IID)
|
||||
/**
|
||||
* Initialize the device context spec factory
|
||||
* @return error status
|
||||
*/
|
||||
NS_IMETHOD Init(void) = 0;
|
||||
|
||||
/**
|
||||
* Get a device context specification. Typically, this
|
||||
* means getting information about a printer. A previously
|
||||
* returned device context spec can be passed in and used as
|
||||
* a starting point for getting a new spec (or simply returning
|
||||
* the old spec again). Additionally, if it is desirable to
|
||||
* get the device context spec without user intervention, any
|
||||
* dialog boxes can be supressed by passing in PR_TRUE for the
|
||||
* aQuiet parameter.
|
||||
* @param aWidget.. this is a widget a dialog can be hosted in
|
||||
* @param aNewSpec out parameter for device context spec returned. the
|
||||
* aOldSpec may be returned if the object is recyclable.
|
||||
* @param aQuiet if PR_TRUE, prevent the need for user intervention
|
||||
* in obtaining device context spec. if nsnull is passed in for
|
||||
* the aOldSpec, this will typically result in getting a device
|
||||
* context spec for the default output device (i.e. default
|
||||
* printer).
|
||||
* @return error status
|
||||
*/
|
||||
NS_IMETHOD CreateDeviceContextSpec(nsIWidget *aWidget,
|
||||
nsIPrintSettings* aPrintSettings,
|
||||
nsIDeviceContextSpec *&aNewSpec,
|
||||
PRBool aQuiet) = 0;
|
||||
};
|
||||
|
||||
#endif
|
||||
168
mozilla/gfx/public/nsIDrawingSurface.h
Normal file
168
mozilla/gfx/public/nsIDrawingSurface.h
Normal file
@@ -0,0 +1,168 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsIDrawingSurface_h___
|
||||
#define nsIDrawingSurface_h___
|
||||
|
||||
#include "nscore.h"
|
||||
#include "nsISupports.h"
|
||||
|
||||
// a memory area that can be rendered to
|
||||
|
||||
typedef struct
|
||||
{
|
||||
PRUint32 mRedZeroMask; //red color mask in zero position
|
||||
PRUint32 mGreenZeroMask; //green color mask in zero position
|
||||
PRUint32 mBlueZeroMask; //blue color mask in zero position
|
||||
PRUint32 mAlphaZeroMask; //alpha data mask in zero position
|
||||
PRUint32 mRedMask; //red color mask
|
||||
PRUint32 mGreenMask; //green color mask
|
||||
PRUint32 mBlueMask; //blue color mask
|
||||
PRUint32 mAlphaMask; //alpha data mask
|
||||
PRUint8 mRedCount; //number of red color bits
|
||||
PRUint8 mGreenCount; //number of green color bits
|
||||
PRUint8 mBlueCount; //number of blue color bits
|
||||
PRUint8 mAlphaCount; //number of alpha data bits
|
||||
PRUint8 mRedShift; //number to shift value into red position
|
||||
PRUint8 mGreenShift; //number to shift value into green position
|
||||
PRUint8 mBlueShift; //number to shift value into blue position
|
||||
PRUint8 mAlphaShift; //number to shift value into alpha position
|
||||
} nsPixelFormat;
|
||||
|
||||
#define RASWIDTH(width, bpp) ((((width) * (bpp) + 31) >> 5) << 2)
|
||||
|
||||
#define NS_IDRAWING_SURFACE_IID \
|
||||
{ 0x61cc77e0, 0xcaac, 0x11d2, \
|
||||
{ 0xa8, 0x49, 0x00, 0x40, 0x95, 0x9a, 0x28, 0xc9 } }
|
||||
|
||||
class nsIDrawingSurface : public nsISupports
|
||||
{
|
||||
public:
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDRAWING_SURFACE_IID)
|
||||
/**
|
||||
* Lock a rect of a drawing surface and return a
|
||||
* pointer to the upper left hand corner of the
|
||||
* bitmap.
|
||||
* @param aX x position of subrect of bitmap
|
||||
* @param aY y position of subrect of bitmap
|
||||
* @param aWidth width of subrect of bitmap
|
||||
* @param aHeight height of subrect of bitmap
|
||||
* @param aBits out parameter for upper left hand
|
||||
* corner of bitmap
|
||||
* @param aStride out parameter for number of bytes
|
||||
* to add to aBits to go from scanline to scanline
|
||||
* @param aWidthBytes out parameter for number of
|
||||
* bytes per line in aBits to process aWidth pixels
|
||||
* @return error status
|
||||
*
|
||||
**/
|
||||
NS_IMETHOD Lock(PRInt32 aX, PRInt32 aY, PRUint32 aWidth, PRUint32 aHeight,
|
||||
void **aBits, PRInt32 *aStride, PRInt32 *aWidthBytes,
|
||||
PRUint32 aFlags) = 0;
|
||||
|
||||
/**
|
||||
* Unlock a rect of a drawing surface. must be preceded
|
||||
* by a call to Lock(). Lock()/Unlock() pairs do not nest.
|
||||
* @return error status
|
||||
*
|
||||
**/
|
||||
NS_IMETHOD Unlock(void) = 0;
|
||||
|
||||
/**
|
||||
* Get the dimensions of a drawing surface
|
||||
* @param aWidth out parameter for width of drawing surface
|
||||
* @param aHeight out parameter for height of drawing surface
|
||||
* @return error status
|
||||
*
|
||||
**/
|
||||
NS_IMETHOD GetDimensions(PRUint32 *aWidth, PRUint32 *aHeight) = 0;
|
||||
|
||||
/**
|
||||
* Get the offscreen status of the drawing surface
|
||||
* @param aOffscreen out parameter for offscreen status of
|
||||
* drawing surface. if PR_TRUE, then modifying the
|
||||
* drawing surface does not immediately reflect the
|
||||
* changes on the output device
|
||||
* @return error status
|
||||
*
|
||||
**/
|
||||
NS_IMETHOD IsOffscreen(PRBool *aOffScreen) = 0;
|
||||
|
||||
/**
|
||||
* Get the pixel addressability status of the drawing surface
|
||||
* @param aAddressable out parameter for pixel addressability
|
||||
* status of drawing surface. if PR_TRUE, then the
|
||||
* drawing surface is optimized for pixel addressability
|
||||
* (i.e. the Lock() method has very low overhead). All
|
||||
* drawing surfaces support Lock()ing, but doing so on
|
||||
* drawing surfaces that do not return PR_TRUE here may
|
||||
* impose significant overhead.
|
||||
* @return error status
|
||||
*
|
||||
**/
|
||||
NS_IMETHOD IsPixelAddressable(PRBool *aAddressable) = 0;
|
||||
|
||||
/**
|
||||
* Get the pixel format of a drawing surface
|
||||
* @param aOffscreen out parameter filled in with pixel
|
||||
* format information.
|
||||
* @return error status
|
||||
*
|
||||
**/
|
||||
NS_IMETHOD GetPixelFormat(nsPixelFormat *aFormat) = 0;
|
||||
};
|
||||
|
||||
//when creating a drawing surface, you can use this
|
||||
//to tell the drawing surface that you anticipate
|
||||
//the need to get to the actual bits of the drawing
|
||||
//surface at some point during it's lifetime. typically
|
||||
//used when creating bitmaps to be operated on by the
|
||||
//nsIBlender implementations.
|
||||
#define NS_CREATEDRAWINGSURFACE_FOR_PIXEL_ACCESS 0x0001
|
||||
|
||||
//flag to say that this drawing surface is shortlived,
|
||||
//which may affect how the OS allocates it. Used for
|
||||
//tiling, grouting etc.
|
||||
#define NS_CREATEDRAWINGSURFACE_SHORTLIVED 0x0002
|
||||
|
||||
//when locking a drawing surface, use these flags to
|
||||
//control how the data in the surface should be accessed
|
||||
#define NS_LOCK_SURFACE_READ_ONLY 0x0001
|
||||
#define NS_LOCK_SURFACE_WRITE_ONLY 0x0002
|
||||
|
||||
#endif // nsIDrawingSurface_h___
|
||||
228
mozilla/gfx/public/nsIFontMetrics.h
Normal file
228
mozilla/gfx/public/nsIFontMetrics.h
Normal file
@@ -0,0 +1,228 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsIFontMetrics_h___
|
||||
#define nsIFontMetrics_h___
|
||||
|
||||
#include "nsISupports.h"
|
||||
#include "nsCoord.h"
|
||||
|
||||
struct nsFont;
|
||||
class nsString;
|
||||
class nsIDeviceContext;
|
||||
class nsIAtom;
|
||||
|
||||
// IID for the nsIFontMetrics interface
|
||||
#define NS_IFONT_METRICS_IID \
|
||||
{ 0xc74cb770, 0xa33e, 0x11d1, \
|
||||
{ 0xa8, 0x24, 0x00, 0x40, 0x95, 0x9a, 0x28, 0xc9 } }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* A native font handle
|
||||
*/
|
||||
typedef void* nsFontHandle;
|
||||
|
||||
/**
|
||||
* Font metrics interface
|
||||
*
|
||||
* This interface may be somewhat misnamed. A better name might be
|
||||
* nsIFontList. The style system uses the nsFont struct for various font
|
||||
* properties, one of which is font-family, which can contain a *list* of
|
||||
* font names. The nsFont struct is "realized" by asking the device context
|
||||
* to cough up an nsIFontMetrics object, which contains a list of real font
|
||||
* handles, one for each font mentioned in font-family (and for each fallback
|
||||
* when we fall off the end of that list).
|
||||
*
|
||||
* The style system needs to have access to certain metrics, such as the
|
||||
* em height (for the CSS "em" unit), and we use the first Western font's
|
||||
* metrics for that purpose. The platform-specific implementations are
|
||||
* expected to select non-Western fonts that "fit" reasonably well with the
|
||||
* Western font that is loaded at Init time.
|
||||
*/
|
||||
class nsIFontMetrics : public nsISupports
|
||||
{
|
||||
public:
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IFONT_METRICS_IID)
|
||||
|
||||
/**
|
||||
* Initialize the font metrics. Call this after creating the font metrics.
|
||||
* Font metrics you get from the font cache do NOT need to be initialized
|
||||
*
|
||||
* @see nsIDeviceContext#GetMetricsFor()
|
||||
*/
|
||||
NS_IMETHOD Init(const nsFont& aFont, nsIAtom* aLangGroup,
|
||||
nsIDeviceContext *aContext) = 0;
|
||||
|
||||
/**
|
||||
* Destroy this font metrics. This breaks the association between
|
||||
* the font metrics and the device context.
|
||||
*/
|
||||
NS_IMETHOD Destroy() = 0;
|
||||
|
||||
/**
|
||||
* Return the font's xheight property, scaled into app-units.
|
||||
*/
|
||||
NS_IMETHOD GetXHeight(nscoord& aResult) = 0;
|
||||
|
||||
/**
|
||||
* Return the font's superscript offset (the distance from the
|
||||
* baseline to where a superscript's baseline should be placed). The
|
||||
* value returned will be a positive value.
|
||||
*/
|
||||
NS_IMETHOD GetSuperscriptOffset(nscoord& aResult) = 0;
|
||||
|
||||
/**
|
||||
* Return the font's subscript offset (the distance from the
|
||||
* baseline to where a subscript's baseline should be placed). The
|
||||
* value returned will be a positive value.
|
||||
*/
|
||||
NS_IMETHOD GetSubscriptOffset(nscoord& aResult) = 0;
|
||||
|
||||
/**
|
||||
* Return the font's strikeout offset (the distance from the
|
||||
* baseline to where a strikeout should be placed) and size
|
||||
* Positive values are above the baseline, negative below.
|
||||
*/
|
||||
NS_IMETHOD GetStrikeout(nscoord& aOffset, nscoord& aSize) = 0;
|
||||
|
||||
/**
|
||||
* Return the font's underline offset (the distance from the
|
||||
* baseline to where a underline should be placed) and size.
|
||||
* Positive values are above the baseline, negative below.
|
||||
*/
|
||||
NS_IMETHOD GetUnderline(nscoord& aOffset, nscoord& aSize) = 0;
|
||||
|
||||
/**
|
||||
* Returns the height (in app units) of the font. This is ascent plus descent
|
||||
* plus any internal leading
|
||||
*
|
||||
* This method will be removed once the callers have been moved over to the
|
||||
* new GetEmHeight (and possibly GetMaxHeight).
|
||||
*/
|
||||
NS_IMETHOD GetHeight(nscoord &aHeight) = 0;
|
||||
|
||||
#if defined(XP_UNIX) || defined(XP_PC) || defined(XP_MAC) || defined(XP_BEOS)
|
||||
#define NEW_FONT_HEIGHT_APIS 1
|
||||
#endif
|
||||
#ifdef NEW_FONT_HEIGHT_APIS
|
||||
/**
|
||||
* Returns the normal line height (em height + leading).
|
||||
*/
|
||||
NS_IMETHOD GetNormalLineHeight(nscoord &aHeight) = 0;
|
||||
#endif /* NEW_FONT_HEIGHT_APIS */
|
||||
|
||||
/**
|
||||
* Returns the amount of internal leading (in app units) for the font. This
|
||||
* is computed as the "height - (ascent + descent)"
|
||||
*/
|
||||
NS_IMETHOD GetLeading(nscoord &aLeading) = 0;
|
||||
|
||||
#ifdef NEW_FONT_HEIGHT_APIS
|
||||
|
||||
/**
|
||||
* Returns the height (in app units) of the Western font's em square. This is
|
||||
* em ascent plus em descent.
|
||||
*/
|
||||
NS_IMETHOD GetEmHeight(nscoord &aHeight) = 0;
|
||||
|
||||
/**
|
||||
* Returns, in app units, the ascent part of the Western font's em square.
|
||||
*/
|
||||
NS_IMETHOD GetEmAscent(nscoord &aAscent) = 0;
|
||||
|
||||
/**
|
||||
* Returns, in app units, the descent part of the Western font's em square.
|
||||
*/
|
||||
NS_IMETHOD GetEmDescent(nscoord &aDescent) = 0;
|
||||
|
||||
/**
|
||||
* Returns the height (in app units) of the Western font's bounding box.
|
||||
* This is max ascent plus max descent.
|
||||
*/
|
||||
NS_IMETHOD GetMaxHeight(nscoord &aHeight) = 0;
|
||||
|
||||
#endif /* NEW_FONT_HEIGHT_APIS */
|
||||
|
||||
/**
|
||||
* Returns, in app units, the maximum distance characters in this font extend
|
||||
* above the base line.
|
||||
*/
|
||||
NS_IMETHOD GetMaxAscent(nscoord &aAscent) = 0;
|
||||
|
||||
/**
|
||||
* Returns, in app units, the maximum distance characters in this font extend
|
||||
* below the base line.
|
||||
*/
|
||||
NS_IMETHOD GetMaxDescent(nscoord &aDescent) = 0;
|
||||
|
||||
/**
|
||||
* Returns, in app units, the maximum character advance for the font
|
||||
*/
|
||||
NS_IMETHOD GetMaxAdvance(nscoord &aAdvance) = 0;
|
||||
|
||||
/**
|
||||
* Returns the font associated with these metrics
|
||||
*/
|
||||
NS_IMETHOD GetFont(const nsFont *&aFont) = 0;
|
||||
|
||||
/**
|
||||
* Returns the language group associated with these metrics
|
||||
*/
|
||||
NS_IMETHOD GetLangGroup(nsIAtom** aLangGroup) = 0;
|
||||
|
||||
/**
|
||||
* Returns the font handle associated with these metrics
|
||||
*/
|
||||
NS_IMETHOD GetFontHandle(nsFontHandle &aHandle) = 0;
|
||||
|
||||
#if defined(_WIN32) || defined(XP_OS2)
|
||||
/**
|
||||
* Returns the average character width
|
||||
*/
|
||||
NS_IMETHOD GetAveCharWidth(nscoord& aAveCharWidth) = 0;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Returns the often needed width of the space character
|
||||
*/
|
||||
NS_IMETHOD GetSpaceWidth(nscoord& aSpaceCharWidth) = 0;
|
||||
};
|
||||
|
||||
#endif /* nsIFontMetrics_h___ */
|
||||
333
mozilla/gfx/public/nsIImage.h
Normal file
333
mozilla/gfx/public/nsIImage.h
Normal file
@@ -0,0 +1,333 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsIImage_h___
|
||||
#define nsIImage_h___
|
||||
|
||||
#include "nsISupports.h"
|
||||
#include "nsIRenderingContext.h"
|
||||
|
||||
struct nsRect;
|
||||
class nsIDeviceContext;
|
||||
|
||||
struct nsColorMap
|
||||
{
|
||||
//I lifted this from the image lib. The difference is that
|
||||
//this uses nscolor instead of NI_RGB. Multiple color pollution
|
||||
//is a bad thing. MMP
|
||||
PRInt32 NumColors; // Number of colors in the colormap.
|
||||
// A negative value can be used to denote a
|
||||
// possibly non-unique set.
|
||||
//nscolor *Map; // Colormap colors.
|
||||
PRUint8 *Index; // NULL, if map is in index order, otherwise
|
||||
// specifies the indices of the map entries. */
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
nsMaskRequirements_kNoMask,
|
||||
nsMaskRequirements_kNeeds1Bit,
|
||||
nsMaskRequirements_kNeeds8Bit
|
||||
} nsMaskRequirements;
|
||||
|
||||
|
||||
#define nsImageUpdateFlags_kColorMapChanged 0x1
|
||||
#define nsImageUpdateFlags_kBitsChanged 0x2
|
||||
|
||||
// IID for the nsIImage interface
|
||||
#define NS_IIMAGE_IID \
|
||||
{ 0x0b4faaa0, 0xaa3a, 0x11d1, \
|
||||
{ 0xa8, 0x24, 0x00, 0x40, 0x95, 0x9a, 0x28, 0xc9 } }
|
||||
|
||||
// Interface to Images
|
||||
class nsIImage : public nsISupports
|
||||
{
|
||||
|
||||
public:
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IIMAGE_IID)
|
||||
|
||||
/**
|
||||
* Build and initialize the nsIImage
|
||||
* @param aWidth The width in pixels of the desired pixelmap
|
||||
* @param aHeight The height in pixels of the desired pixelmap
|
||||
* @param aDepth The number of bits per pixel for the pixelmap
|
||||
* @param aMaskRequirements A flag indicating if a alpha mask should be allocated
|
||||
*/
|
||||
virtual nsresult Init(PRInt32 aWidth, PRInt32 aHeight, PRInt32 aDepth, nsMaskRequirements aMaskRequirements) = 0;
|
||||
|
||||
/**
|
||||
* Get the number of bytes per pixel for this image
|
||||
* @update - dwc 2/3/99
|
||||
* @return - the number of bytes per pixel
|
||||
*/
|
||||
virtual PRInt32 GetBytesPix() = 0;
|
||||
|
||||
/**
|
||||
* Get whether rows are organized top to bottom, or bottom to top
|
||||
* @update - syd 3/29/99
|
||||
* @return PR_TRUE if top to bottom, else PR_FALSE
|
||||
*/
|
||||
virtual PRBool GetIsRowOrderTopToBottom() = 0;
|
||||
|
||||
/**
|
||||
* Get the width for the pixelmap
|
||||
* @update - dwc 2/1/99
|
||||
* @return The width in pixels for the pixelmap
|
||||
*/
|
||||
virtual PRInt32 GetWidth() = 0;
|
||||
|
||||
/**
|
||||
* Get the height for the pixelmap
|
||||
* @update - dwc 2/1/99
|
||||
* @return The height in pixels for the pixelmap
|
||||
*/
|
||||
virtual PRInt32 GetHeight() = 0;
|
||||
|
||||
/**
|
||||
* Set/Get the decoded dimensions for the pixelmap
|
||||
* 01/11/2000 - pnunn
|
||||
*/
|
||||
NS_IMETHOD SetDecodedRect(PRInt32, PRInt32, PRInt32, PRInt32) = 0;
|
||||
virtual PRInt32 GetDecodedX1() = 0;
|
||||
virtual PRInt32 GetDecodedY1() = 0;
|
||||
virtual PRInt32 GetDecodedX2() = 0;
|
||||
virtual PRInt32 GetDecodedY2() = 0;
|
||||
|
||||
NS_IMETHOD SetNaturalWidth(PRInt32) = 0;
|
||||
NS_IMETHOD SetNaturalHeight(PRInt32) = 0;
|
||||
virtual PRInt32 GetNaturalWidth() = 0;
|
||||
virtual PRInt32 GetNaturalHeight() = 0;
|
||||
|
||||
/**
|
||||
* Get a pointer to the bits for the pixelmap, only if it is not optimized
|
||||
* @update - dwc 2/1/99
|
||||
* @return address of the DIB pixel array
|
||||
*/
|
||||
virtual PRUint8 * GetBits() = 0;
|
||||
|
||||
/**
|
||||
* Get the number of bytes needed to get to the next scanline for the pixelmap
|
||||
* @update - dwc 2/1/99
|
||||
* @return The number of bytes in each scanline
|
||||
*/
|
||||
virtual PRInt32 GetLineStride() = 0;
|
||||
|
||||
/**
|
||||
* Get whether this image has an alpha mask. Preferable to testing
|
||||
* if GetAlphaBits() is non-null.
|
||||
* @update - sfraser 10/19/99
|
||||
* @return PR_TRUE if the image has an alpha mask, PR_FALSE otherwise
|
||||
*/
|
||||
virtual PRBool GetHasAlphaMask() = 0;
|
||||
|
||||
/**
|
||||
* Get a pointer to the bits for the alpha mask
|
||||
* @update - dwc 2/1/99
|
||||
* @return address of the alpha mask pixel array
|
||||
*/
|
||||
virtual PRUint8 * GetAlphaBits() = 0;
|
||||
|
||||
/**
|
||||
* Get the width of the alpha mask
|
||||
* @update - dwc 2/1/99
|
||||
* @return The width in pixels
|
||||
*/
|
||||
virtual PRInt32 GetAlphaWidth() = 0;
|
||||
|
||||
/**
|
||||
* Get the height of the alpha mask
|
||||
* @update - dwc 2/1/99
|
||||
* @return The width in pixels
|
||||
*/
|
||||
virtual PRInt32 GetAlphaHeight() = 0;
|
||||
|
||||
/**
|
||||
* Get the number of bytes per scanline for the alpha mask
|
||||
* @update - dwc 2/1/99
|
||||
* @return The number of bytes in each scanline
|
||||
*/
|
||||
virtual PRInt32 GetAlphaLineStride() = 0;
|
||||
|
||||
/**
|
||||
* Update the nsIImage color table
|
||||
* @update - dwc 2/1/99
|
||||
* @param aFlags Used to pass in parameters for the update
|
||||
* @param aUpdateRect The rectangle to update
|
||||
*/
|
||||
virtual void ImageUpdated(nsIDeviceContext *aContext, PRUint8 aFlags, nsRect *aUpdateRect) = 0;
|
||||
|
||||
/**
|
||||
* Returns if the pixelmap has been converted to an optimized pixelmap
|
||||
* @update - dwc 2/1/99
|
||||
* @return If true, it is optimized
|
||||
*/
|
||||
virtual PRBool IsOptimized() = 0;
|
||||
|
||||
/**
|
||||
* Converted this pixelmap to an optimized pixelmap for the device
|
||||
* @update - dwc 2/1/99
|
||||
* @param aContext The device to optimize for
|
||||
* @return the result of the operation, if NS_OK, then the pixelmap is optimized
|
||||
*/
|
||||
virtual nsresult Optimize(nsIDeviceContext* aContext) = 0;
|
||||
|
||||
/**
|
||||
* Get the colormap for the nsIImage
|
||||
* @update - dwc 2/1/99
|
||||
* @return if non null, the colormap for the pixelmap,otherwise the image is not color mapped
|
||||
*/
|
||||
virtual nsColorMap * GetColorMap() = 0;
|
||||
|
||||
/**
|
||||
* BitBlit the nsIImage to a device, the source can be scaled to the dest
|
||||
* @update - dwc 2/1/99
|
||||
* @param aSurface the surface to blit to
|
||||
* @param aX The destination horizontal location
|
||||
* @param aY The destination vertical location
|
||||
* @param aWidth The destination width of the pixelmap
|
||||
* @param aHeight The destination height of the pixelmap
|
||||
* @return if TRUE, no errors
|
||||
*/
|
||||
NS_IMETHOD Draw(nsIRenderingContext &aContext, nsDrawingSurface aSurface, PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight) = 0;
|
||||
|
||||
/**
|
||||
* BitBlit the nsIImage to a device, the source and dest can be scaled
|
||||
* @update - dwc 2/1/99
|
||||
* @param aSurface the surface to blit to
|
||||
* @param aSX The source width of the pixelmap
|
||||
* @param aSY The source vertical location
|
||||
* @param aSWidth The source width of the pixelmap
|
||||
* @param aSHeight The source height of the pixelmap
|
||||
* @param aDX The destination horizontal location
|
||||
* @param aDY The destination vertical location
|
||||
* @param aDWidth The destination width of the pixelmap
|
||||
* @param aDHeight The destination height of the pixelmap
|
||||
* @return if TRUE, no errors
|
||||
*/
|
||||
NS_IMETHOD Draw(nsIRenderingContext &aContext, nsDrawingSurface aSurface, PRInt32 aSX, PRInt32 aSY, PRInt32 aSWidth, PRInt32 aSHeight,
|
||||
PRInt32 aDX, PRInt32 aDY, PRInt32 aDWidth, PRInt32 aDHeight) = 0;
|
||||
|
||||
|
||||
NS_IMETHOD DrawTile(nsIRenderingContext &aContext,
|
||||
nsDrawingSurface aSurface,
|
||||
PRInt32 aSXOffset, PRInt32 aSYOffset,
|
||||
const nsRect &aTileRect) = 0;
|
||||
|
||||
/**
|
||||
* BitBlit the entire (no cropping) nsIImage to another nsImage, the source and dest can be scaled
|
||||
* @update - saari 03/08/01
|
||||
* @param aDstImage the nsImage to blit to
|
||||
* @param aDX The destination horizontal location
|
||||
* @param aDY The destination vertical location
|
||||
* @param aDWidth The destination width of the pixelmap
|
||||
* @param aDHeight The destination height of the pixelmap
|
||||
* @return if TRUE, no errors
|
||||
*/
|
||||
NS_IMETHOD DrawToImage(nsIImage* aDstImage, PRInt32 aDX, PRInt32 aDY, PRInt32 aDWidth, PRInt32 aDHeight) = 0;
|
||||
|
||||
/**
|
||||
* Set the alpha level for the image
|
||||
* @update - dwc 2/1/99
|
||||
* @param the alpha level to set for the image, from 0 to 100%
|
||||
*/
|
||||
virtual void SetAlphaLevel(PRInt32 aAlphaLevel) = 0;
|
||||
|
||||
/**
|
||||
* Get the alpha level for the image
|
||||
* @update - dwc 2/1/99
|
||||
* @return the alpha level for the image, from 0 to 100%
|
||||
*/
|
||||
virtual PRInt32 GetAlphaLevel() = 0;
|
||||
|
||||
/**
|
||||
* Get the alpha depth for the image mask
|
||||
* @update - lordpixel 2001/05/16
|
||||
* @return the alpha mask depth for the image, ie, 0, 1 or 8
|
||||
*/
|
||||
virtual PRInt8 GetAlphaDepth() = 0;
|
||||
|
||||
/**
|
||||
* Return information about the bits for this structure
|
||||
* @update - dwc 2/1/99
|
||||
* @return a bitmap info structure for the Device Dependent Bits
|
||||
*/
|
||||
virtual void* GetBitInfo() = 0;
|
||||
|
||||
|
||||
/**
|
||||
* LockImagePixels
|
||||
* Lock the image pixels so that we can access them directly,
|
||||
* with safely. May be a noop on some platforms.
|
||||
*
|
||||
* aMaskPixels = PR_TRUE for the mask, PR_FALSE for the image
|
||||
*
|
||||
* Must be balanced by a call to UnlockImagePixels().
|
||||
*
|
||||
* @update - sfraser 10/18/99
|
||||
* @return error result
|
||||
*/
|
||||
NS_IMETHOD LockImagePixels(PRBool aMaskPixels) = 0;
|
||||
|
||||
/**
|
||||
* UnlockImagePixels
|
||||
* Unlock the image pixels. May be a noop on some platforms.
|
||||
*
|
||||
* Should balance an earlier call to LockImagePixels().
|
||||
*
|
||||
* aMaskPixels = PR_TRUE for the mask, PR_FALSE for the image
|
||||
*
|
||||
* @update - sfraser 10/18/99
|
||||
* @return error result
|
||||
*/
|
||||
NS_IMETHOD UnlockImagePixels(PRBool aMaskPixels) = 0;
|
||||
|
||||
//get the color space metrics for this image
|
||||
//virtual NI_ColorSpec * GetColorSpec() = 0; fix
|
||||
|
||||
//get the color which should be considered transparent.
|
||||
//if this image is color mapped, this value will be an
|
||||
//index into the color map. hokey? yes, but it avoids
|
||||
//another silly api or struct.
|
||||
//virtual nscolor GetTransparentColor() = 0; fix.
|
||||
};
|
||||
|
||||
//change notification API flag bits
|
||||
#define NS_IMAGE_UPDATE_COLORMAP 1
|
||||
#define NS_IMAGE_UPDATE_PIXELS 2
|
||||
#define NS_IMAGE_UPDATE_ALPHA 4
|
||||
|
||||
#endif
|
||||
94
mozilla/gfx/public/nsIPrintingContext.h
Normal file
94
mozilla/gfx/public/nsIPrintingContext.h
Normal file
@@ -0,0 +1,94 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Patrick C. Beard <beard@netscape.com>
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsIPrintingContextMac_h___
|
||||
#define nsIPrintingContextMac_h___
|
||||
|
||||
#include "nsISupports.h"
|
||||
|
||||
class nsIPrintSettings;
|
||||
|
||||
// 3d5917da-1dd2-11b2-bc7b-aa83823362e0
|
||||
#define NS_IPRINTING_CONTEXT_IID \
|
||||
{ 0x3d5917da, 0x1dd2, 0x11b2, \
|
||||
{ 0xbc, 0x7b, 0xaa, 0x83, 0x82, 0x33, 0x62, 0xe0 } }
|
||||
|
||||
class nsIPrintingContext : public nsISupports {
|
||||
public:
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPRINTING_CONTEXT_IID)
|
||||
/**
|
||||
* Initialize the printing context for use.
|
||||
* @param aQuiet if PR_TRUE, prevent the need for user intervention
|
||||
* in obtaining device context spec. if nsnull is passed in for
|
||||
* the aOldSpec, this will typically result in getting a device
|
||||
* context spec for the default output device (i.e. default
|
||||
* printer).
|
||||
* @return error status
|
||||
*/
|
||||
NS_IMETHOD Init(nsIPrintSettings* aPS, PRBool aQuiet) = 0;
|
||||
|
||||
/**
|
||||
* This will tell if the printmanager is currently open
|
||||
* @update dc 12/03/98
|
||||
* @param aIsOpen True or False depending if the printmanager is open
|
||||
* @return error status
|
||||
*/
|
||||
NS_IMETHOD PrintManagerOpen(PRBool* aIsOpen) = 0;
|
||||
|
||||
/**
|
||||
* Closes the printmanager if it is open.
|
||||
* @update dc 12/03/98
|
||||
* @return error status
|
||||
*/
|
||||
NS_IMETHOD ClosePrintManager() = 0;
|
||||
|
||||
NS_IMETHOD BeginDocument() = 0;
|
||||
|
||||
NS_IMETHOD EndDocument() = 0;
|
||||
|
||||
NS_IMETHOD BeginPage() = 0;
|
||||
|
||||
NS_IMETHOD EndPage() = 0;
|
||||
|
||||
NS_IMETHOD GetPrinterResolution(double* aResolution) = 0;
|
||||
|
||||
NS_IMETHOD GetPageRect(double* aTop, double* aLeft, double* aBottom, double* aRight) = 0;
|
||||
};
|
||||
|
||||
#endif /* nsIPrintingContextMac_h___ */
|
||||
279
mozilla/gfx/public/nsIRegion.h
Normal file
279
mozilla/gfx/public/nsIRegion.h
Normal file
@@ -0,0 +1,279 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsIRegion_h___
|
||||
#define nsIRegion_h___
|
||||
|
||||
#include "nscore.h"
|
||||
#include "nsISupports.h"
|
||||
#include "nsRect.h"
|
||||
|
||||
enum nsRegionComplexity
|
||||
{
|
||||
eRegionComplexity_empty = 0,
|
||||
eRegionComplexity_rect = 1,
|
||||
eRegionComplexity_complex = 2
|
||||
};
|
||||
|
||||
typedef struct
|
||||
{
|
||||
PRInt32 x;
|
||||
PRInt32 y;
|
||||
PRUint32 width;
|
||||
PRUint32 height;
|
||||
} nsRegionRect;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
PRUint32 mNumRects; //number of actual rects in the mRects array
|
||||
PRUint32 mRectsLen; //length, in rects, of the mRects array
|
||||
PRUint32 mArea; //area of the covered portion of the region
|
||||
nsRegionRect mRects[1];
|
||||
} nsRegionRectSet;
|
||||
|
||||
// An implementation of a region primitive that can be used to
|
||||
// represent arbitrary pixel areas. Probably implemented on top
|
||||
// of the native region primitive. The assumption is that, at worst,
|
||||
// it is a rectangle list.
|
||||
|
||||
#define NS_IREGION_IID \
|
||||
{ 0x8ef366e0, 0xee94, 0x11d1, \
|
||||
{ 0xa8, 0x2a, 0x00, 0x40, 0x95, 0x9a, 0x28, 0xc9 } }
|
||||
|
||||
class nsIRegion : public nsISupports
|
||||
{
|
||||
public:
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IREGION_IID)
|
||||
|
||||
virtual nsresult Init(void) = 0;
|
||||
|
||||
/**
|
||||
* copy operator equivalent that takes another region
|
||||
*
|
||||
* @param region to copy
|
||||
* @return void
|
||||
*
|
||||
**/
|
||||
|
||||
virtual void SetTo(const nsIRegion &aRegion) = 0;
|
||||
|
||||
/**
|
||||
* copy operator equivalent that takes a rect
|
||||
*
|
||||
* @param aX xoffset of rect to set region to
|
||||
* @param aY yoffset of rect to set region to
|
||||
* @param aWidth width of rect to set region to
|
||||
* @param aHeight height of rect to set region to
|
||||
* @return void
|
||||
*
|
||||
**/
|
||||
|
||||
virtual void SetTo(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight) = 0;
|
||||
|
||||
/**
|
||||
* destructively intersect another region with this one
|
||||
*
|
||||
* @param region to intersect
|
||||
* @return void
|
||||
*
|
||||
**/
|
||||
|
||||
virtual void Intersect(const nsIRegion &aRegion) = 0;
|
||||
|
||||
/**
|
||||
* destructively intersect a rect with this region
|
||||
*
|
||||
* @param aX xoffset of rect to intersect with region
|
||||
* @param aY yoffset of rect to intersect with region
|
||||
* @param aWidth width of rect to intersect with region
|
||||
* @param aHeight height of rect to intersect with region
|
||||
* @return void
|
||||
*
|
||||
**/
|
||||
|
||||
virtual void Intersect(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight) = 0;
|
||||
|
||||
/**
|
||||
* destructively union another region with this one
|
||||
*
|
||||
* @param region to union
|
||||
* @return void
|
||||
*
|
||||
**/
|
||||
|
||||
virtual void Union(const nsIRegion &aRegion) = 0;
|
||||
|
||||
/**
|
||||
* destructively union a rect with this region
|
||||
*
|
||||
* @param aX xoffset of rect to union with region
|
||||
* @param aY yoffset of rect to union with region
|
||||
* @param aWidth width of rect to union with region
|
||||
* @param aHeight height of rect to union with region
|
||||
* @return void
|
||||
*
|
||||
**/
|
||||
|
||||
virtual void Union(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight) = 0;
|
||||
|
||||
/**
|
||||
* destructively subtract another region with this one
|
||||
*
|
||||
* @param region to subtract
|
||||
* @return void
|
||||
*
|
||||
**/
|
||||
|
||||
virtual void Subtract(const nsIRegion &aRegion) = 0;
|
||||
|
||||
/**
|
||||
* destructively subtract a rect from this region
|
||||
*
|
||||
* @param aX xoffset of rect to subtract with region
|
||||
* @param aY yoffset of rect to subtract with region
|
||||
* @param aWidth width of rect to subtract with region
|
||||
* @param aHeight height of rect to subtract with region
|
||||
* @return void
|
||||
*
|
||||
**/
|
||||
|
||||
virtual void Subtract(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight) = 0;
|
||||
|
||||
/**
|
||||
* is this region empty? i.e. does it contain any pixels
|
||||
*
|
||||
* @param none
|
||||
* @return returns whether the region is empty
|
||||
*
|
||||
**/
|
||||
|
||||
virtual PRBool IsEmpty(void) = 0;
|
||||
|
||||
/**
|
||||
* == operator equivalent i.e. do the regions contain exactly
|
||||
* the same pixels
|
||||
*
|
||||
* @param region to compare
|
||||
* @return whether the regions are identical
|
||||
*
|
||||
**/
|
||||
|
||||
virtual PRBool IsEqual(const nsIRegion &aRegion) = 0;
|
||||
|
||||
/**
|
||||
* returns the bounding box of the region i.e. the smallest
|
||||
* rectangle that completely contains the region.
|
||||
*
|
||||
* @param aX out parameter for xoffset of bounding rect for region
|
||||
* @param aY out parameter for yoffset of bounding rect for region
|
||||
* @param aWidth out parameter for width of bounding rect for region
|
||||
* @param aHeight out parameter for height of bounding rect for region
|
||||
* @return void
|
||||
*
|
||||
**/
|
||||
virtual void GetBoundingBox(PRInt32 *aX, PRInt32 *aY, PRInt32 *aWidth, PRInt32 *aHeight) = 0;
|
||||
|
||||
/**
|
||||
* offsets the region in x and y
|
||||
*
|
||||
* @param xoffset pixel offset in x
|
||||
* @param yoffset pixel offset in y
|
||||
* @return void
|
||||
*
|
||||
**/
|
||||
virtual void Offset(PRInt32 aXOffset, PRInt32 aYOffset) = 0;
|
||||
|
||||
/**
|
||||
* does the region intersect the rectangle?
|
||||
*
|
||||
* @param rect to check for containment
|
||||
* @return true if the region intersects the rect
|
||||
*
|
||||
**/
|
||||
|
||||
virtual PRBool ContainsRect(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight) = 0;
|
||||
|
||||
/**
|
||||
* get the set of rects which make up this region. the aRects
|
||||
* parameter must be freed by calling FreeRects before the region
|
||||
* is deleted. aRects may be passed in again when requesting
|
||||
* the rect list as a recycling method.
|
||||
*
|
||||
* @param aRects out parameter containing set of rects
|
||||
* comprising the region
|
||||
* @return error status
|
||||
*
|
||||
**/
|
||||
NS_IMETHOD GetRects(nsRegionRectSet **aRects) = 0;
|
||||
|
||||
/**
|
||||
* Free a rect set returned by GetRects.
|
||||
*
|
||||
* @param aRects rects to free
|
||||
* @return error status
|
||||
*
|
||||
**/
|
||||
NS_IMETHOD FreeRects(nsRegionRectSet *aRects) = 0;
|
||||
|
||||
/**
|
||||
* Get the native region that this nsIRegion represents.
|
||||
* @param aRegion out parameter for native region handle
|
||||
* @return error status
|
||||
**/
|
||||
NS_IMETHOD GetNativeRegion(void *&aRegion) const = 0;
|
||||
|
||||
/**
|
||||
* Get the complexity of the region as defined by the
|
||||
* nsRegionComplexity enum.
|
||||
* @param aComplexity out parameter for region complexity
|
||||
* @return error status
|
||||
**/
|
||||
NS_IMETHOD GetRegionComplexity(nsRegionComplexity &aComplexity) const = 0;
|
||||
|
||||
/**
|
||||
* get the number of rects which make up this region.
|
||||
*
|
||||
* @param aRects out parameter containing the number of rects
|
||||
* comprising the region
|
||||
* @return error status
|
||||
*
|
||||
**/
|
||||
NS_IMETHOD GetNumRects(PRUint32 *aRects) const = 0;
|
||||
};
|
||||
|
||||
#endif // nsIRegion_h___
|
||||
1009
mozilla/gfx/public/nsIRenderingContext.h
Normal file
1009
mozilla/gfx/public/nsIRenderingContext.h
Normal file
File diff suppressed because it is too large
Load Diff
80
mozilla/gfx/public/nsITheme.h
Normal file
80
mozilla/gfx/public/nsITheme.h
Normal file
@@ -0,0 +1,80 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is the Mozilla browser.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1999 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Original Author: David W. Hyatt (hyatt@netscape.com)
|
||||
*
|
||||
* Contributors:
|
||||
*/
|
||||
|
||||
#include "nsISupports.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsColor.h"
|
||||
|
||||
struct nsRect;
|
||||
struct nsSize;
|
||||
struct nsFont;
|
||||
struct nsMargin;
|
||||
class nsIPresContext;
|
||||
class nsIRenderingContext;
|
||||
class nsIDeviceContext;
|
||||
class nsIFrame;
|
||||
class nsIAtom;
|
||||
|
||||
// IID for the nsITheme interface
|
||||
// {F791038C-F97E-4068-A542-0343AE440664}
|
||||
#define NS_ITHEME_IID \
|
||||
{ 0xf791038c, 0xf97e, 0x4068, { 0xa5, 0x42, 0x3, 0x43, 0xae, 0x44, 0x6, 0x64 } }
|
||||
|
||||
// {D930E29B-6909-44e5-AB4B-AF10D6923705}
|
||||
#define NS_THEMERENDERER_CID \
|
||||
{ 0xd930e29b, 0x6909, 0x44e5, { 0xab, 0x4b, 0xaf, 0x10, 0xd6, 0x92, 0x37, 0x5 } }
|
||||
|
||||
class nsITheme: public nsISupports {
|
||||
public:
|
||||
static const nsIID& GetIID() { static nsIID iid = NS_ITHEME_IID; return iid; }
|
||||
|
||||
NS_IMETHOD DrawWidgetBackground(nsIRenderingContext* aContext,
|
||||
nsIFrame* aFrame,
|
||||
PRUint8 aWidgetType,
|
||||
const nsRect& aRect,
|
||||
const nsRect& aClipRect)=0;
|
||||
|
||||
NS_IMETHOD GetWidgetBorder(nsIDeviceContext* aContext,
|
||||
nsIFrame* aFrame,
|
||||
PRUint8 aWidgetType,
|
||||
nsMargin* aResult)=0;
|
||||
|
||||
NS_IMETHOD GetMinimumWidgetSize(nsIRenderingContext* aContext, nsIFrame* aFrame,
|
||||
PRUint8 aWidgetType,
|
||||
nsSize* aResult,
|
||||
PRBool* aIsOverridable)=0;
|
||||
|
||||
NS_IMETHOD WidgetStateChanged(nsIFrame* aFrame, PRUint8 aWidgetType,
|
||||
nsIAtom* aAttribute, PRBool* aShouldRepaint)=0;
|
||||
|
||||
NS_IMETHOD ThemeChanged()=0;
|
||||
|
||||
virtual PRBool ThemeSupportsWidget(nsIPresContext* aPresContext,
|
||||
PRUint8 aWidgetType)=0;
|
||||
|
||||
virtual PRBool WidgetIsContainer(PRUint8 aWidgetType)=0;
|
||||
};
|
||||
|
||||
// Creator function
|
||||
extern NS_METHOD NS_NewNativeTheme(nsISupports *aOuter, REFNSIID aIID, void **aResult);
|
||||
91
mozilla/gfx/public/nsMargin.h
Normal file
91
mozilla/gfx/public/nsMargin.h
Normal file
@@ -0,0 +1,91 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef NSMARGIN_H
|
||||
#define NSMARGIN_H
|
||||
|
||||
#include "nsCoord.h"
|
||||
|
||||
struct nsMargin {
|
||||
nscoord left, top, right, bottom;
|
||||
|
||||
// Constructors
|
||||
nsMargin() {}
|
||||
nsMargin(const nsMargin& aMargin) {*this = aMargin;}
|
||||
nsMargin(nscoord aLeft, nscoord aTop,
|
||||
nscoord aRight, nscoord aBottom) {left = aLeft; top = aTop;
|
||||
right = aRight; bottom = aBottom;}
|
||||
|
||||
void SizeTo(nscoord aLeft, nscoord aTop,
|
||||
nscoord aRight, nscoord aBottom) {left = aLeft; top = aTop;
|
||||
right = aRight; bottom = aBottom;}
|
||||
void SizeBy(nscoord aLeft, nscoord aTop,
|
||||
nscoord aRight, nscoord aBottom) {left += aLeft; top += aTop;
|
||||
right += aRight; bottom += aBottom;}
|
||||
|
||||
// Overloaded operators. Note that '=' isn't defined so we'll get the
|
||||
// compiler generated default assignment operator
|
||||
PRBool operator==(const nsMargin& aMargin) const {
|
||||
return (PRBool) ((left == aMargin.left) && (top == aMargin.top) &&
|
||||
(right == aMargin.right) && (bottom == aMargin.bottom));
|
||||
}
|
||||
PRBool operator!=(const nsMargin& aMargin) const {
|
||||
return (PRBool) ((left != aMargin.left) || (top != aMargin.top) ||
|
||||
(right != aMargin.right) || (bottom != aMargin.bottom));
|
||||
}
|
||||
nsMargin operator+(const nsMargin& aMargin) const {
|
||||
return nsMargin(left + aMargin.left, top + aMargin.top,
|
||||
right + aMargin.right, bottom + aMargin.bottom);
|
||||
}
|
||||
nsMargin operator-(const nsMargin& aMargin) const {
|
||||
return nsMargin(left - aMargin.left, top - aMargin.top,
|
||||
right - aMargin.right, bottom - aMargin.bottom);
|
||||
}
|
||||
nsMargin& operator+=(const nsMargin& aMargin) {left += aMargin.left;
|
||||
top += aMargin.top;
|
||||
right += aMargin.right;
|
||||
bottom += aMargin.bottom;
|
||||
return *this;}
|
||||
nsMargin& operator-=(const nsMargin& aMargin) {left -= aMargin.left;
|
||||
top -= aMargin.top;
|
||||
right -= aMargin.right;
|
||||
bottom -= aMargin.bottom;
|
||||
return *this;}
|
||||
};
|
||||
|
||||
#endif /* NSMARGIN_H */
|
||||
141
mozilla/gfx/public/nsPoint.h
Normal file
141
mozilla/gfx/public/nsPoint.h
Normal file
@@ -0,0 +1,141 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef NSPOINT_H
|
||||
#define NSPOINT_H
|
||||
|
||||
#include "nsCoord.h"
|
||||
|
||||
struct nsPoint {
|
||||
nscoord x, y;
|
||||
|
||||
// Constructors
|
||||
nsPoint() {}
|
||||
nsPoint(const nsPoint& aPoint) {x = aPoint.x; y = aPoint.y;}
|
||||
nsPoint(nscoord aX, nscoord aY) {x = aX; y = aY;}
|
||||
|
||||
void MoveTo(nscoord aX, nscoord aY) {x = aX; y = aY;}
|
||||
void MoveBy(nscoord aDx, nscoord aDy) {x += aDx; y += aDy;}
|
||||
|
||||
// Overloaded operators. Note that '=' isn't defined so we'll get the
|
||||
// compiler generated default assignment operator
|
||||
PRBool operator==(const nsPoint& aPoint) const {
|
||||
return (PRBool) ((x == aPoint.x) && (y == aPoint.y));
|
||||
}
|
||||
PRBool operator!=(const nsPoint& aPoint) const {
|
||||
return (PRBool) ((x != aPoint.x) || (y != aPoint.y));
|
||||
}
|
||||
nsPoint operator+(const nsPoint& aPoint) const {
|
||||
return nsPoint(x + aPoint.x, y + aPoint.y);
|
||||
}
|
||||
nsPoint operator-(const nsPoint& aPoint) const {
|
||||
return nsPoint(x - aPoint.x, y - aPoint.y);
|
||||
}
|
||||
nsPoint& operator+=(const nsPoint& aPoint) {
|
||||
x += aPoint.x;
|
||||
y += aPoint.y;
|
||||
return *this;
|
||||
}
|
||||
nsPoint& operator-=(const nsPoint& aPoint) {
|
||||
x -= aPoint.x;
|
||||
y -= aPoint.y;
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
/** ---------------------------------------------------
|
||||
* A point structure with floats for the Quadratic bezier curve
|
||||
* @update 4/27/2000 dwc
|
||||
*/
|
||||
struct nsFloatPoint {
|
||||
float x, y;
|
||||
|
||||
// Constructors
|
||||
nsFloatPoint() {}
|
||||
nsFloatPoint(const nsFloatPoint& aPoint) {x = aPoint.x; y = aPoint.y;}
|
||||
nsFloatPoint(float aX, float aY) {x = aX; y = aY;}
|
||||
|
||||
void MoveTo(float aX, float aY) {x = aX; y = aY;}
|
||||
void MoveTo(nscoord aX, nscoord aY) {x = (float)aX; y = (float)aY;}
|
||||
void MoveBy(float aDx, float aDy) {x += aDx; y += aDy;}
|
||||
|
||||
// Overloaded operators. Note that '=' isn't defined so we'll get the
|
||||
// compiler generated default assignment operator
|
||||
PRBool operator==(const nsFloatPoint& aPoint) const {
|
||||
return (PRBool) ((x == aPoint.x) && (y == aPoint.y));
|
||||
}
|
||||
PRBool operator!=(const nsFloatPoint& aPoint) const {
|
||||
return (PRBool) ((x != aPoint.x) || (y != aPoint.y));
|
||||
}
|
||||
nsFloatPoint operator+(const nsFloatPoint& aPoint) const {
|
||||
return nsFloatPoint(x + aPoint.x, y + aPoint.y);
|
||||
}
|
||||
nsFloatPoint operator-(const nsFloatPoint& aPoint) const {
|
||||
return nsFloatPoint(x - aPoint.x, y - aPoint.y);
|
||||
}
|
||||
nsFloatPoint& operator+=(const nsFloatPoint& aPoint) {
|
||||
x += aPoint.x;
|
||||
y += aPoint.y;
|
||||
return *this;
|
||||
}
|
||||
nsFloatPoint& operator-=(const nsFloatPoint& aPoint) {
|
||||
x -= aPoint.x;
|
||||
y -= aPoint.y;
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
/** ---------------------------------------------------
|
||||
* A special type of point which also add the capability to tell if a point is on
|
||||
* the curve.. or off of the curve for a path
|
||||
* @update 03/29/00 dwc
|
||||
*/
|
||||
struct nsPathPoint: public nsFloatPoint{
|
||||
|
||||
PRBool mIsOnCurve;
|
||||
|
||||
// Constructors
|
||||
nsPathPoint() {}
|
||||
nsPathPoint(const nsPathPoint& aPoint) {x = aPoint.x; y = aPoint.y;mIsOnCurve=aPoint.mIsOnCurve;}
|
||||
nsPathPoint(float aX, float aY) {x = aX; y = aY;mIsOnCurve=PR_TRUE;}
|
||||
nsPathPoint(float aX, float aY,PRBool aIsOnCurve) {x = aX; y = aY;mIsOnCurve=aIsOnCurve;}
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif /* NSPOINT_H */
|
||||
152
mozilla/gfx/public/nsRect.h
Normal file
152
mozilla/gfx/public/nsRect.h
Normal file
@@ -0,0 +1,152 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
|
||||
#ifndef NSRECT_H
|
||||
#define NSRECT_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include "nsCoord.h"
|
||||
#include "nsPoint.h"
|
||||
#include "nsSize.h"
|
||||
#include "nsMargin.h"
|
||||
#include "nsUnitConversion.h"
|
||||
|
||||
struct NS_GFX nsRect {
|
||||
nscoord x, y;
|
||||
nscoord width, height;
|
||||
|
||||
// Constructors
|
||||
nsRect() : x(0), y(0), width(0), height(0) {}
|
||||
nsRect(const nsRect& aRect) {*this = aRect;}
|
||||
nsRect(const nsPoint& aOrigin, const nsSize &aSize) {x = aOrigin.x; y = aOrigin.y;
|
||||
width = aSize.width; height = aSize.height;}
|
||||
nsRect(nscoord aX, nscoord aY, nscoord aWidth, nscoord aHeight) {x = aX; y = aY;
|
||||
width = aWidth; height = aHeight;}
|
||||
|
||||
// Emptiness. An empty rect is one that has no area, i.e. its height or width
|
||||
// is <= 0
|
||||
PRBool IsEmpty() const {
|
||||
return (PRBool) ((height <= 0) || (width <= 0));
|
||||
}
|
||||
void Empty() {width = height = 0;}
|
||||
|
||||
// Containment
|
||||
PRBool Contains(const nsRect& aRect) const;
|
||||
PRBool Contains(nscoord aX, nscoord aY) const;
|
||||
PRBool Contains(const nsPoint& aPoint) const {return Contains(aPoint.x, aPoint.y);}
|
||||
|
||||
// Intersection. Returns TRUE if the receiver overlaps aRect and
|
||||
// FALSE otherwise
|
||||
PRBool Intersects(const nsRect& aRect) const;
|
||||
|
||||
// Computes the area in which aRect1 and aRect2 overlap, and fills 'this' with
|
||||
// the result. Returns FALSE if the rectangles don't intersect, and sets 'this'
|
||||
// rect to be an empty rect.
|
||||
//
|
||||
// 'this' can be the same object as either aRect1 or aRect2
|
||||
PRBool IntersectRect(const nsRect& aRect1, const nsRect& aRect2);
|
||||
|
||||
// Computes the smallest rectangle that contains both aRect1 and aRect2 and
|
||||
// fills 'this' with the result. Returns FALSE and sets 'this' rect to be an
|
||||
// empty rect if both aRect1 and aRect2 are empty
|
||||
//
|
||||
// 'this' can be the same object as either aRect1 or aRect2
|
||||
PRBool UnionRect(const nsRect& aRect1, const nsRect& aRect2);
|
||||
|
||||
// Accessors
|
||||
void SetRect(nscoord aX, nscoord aY, nscoord aWidth, nscoord aHeight) {
|
||||
x = aX; y = aY; width = aWidth; height = aHeight;
|
||||
}
|
||||
void MoveTo(nscoord aX, nscoord aY) {x = aX; y = aY;}
|
||||
void MoveTo(const nsPoint& aPoint) {x = aPoint.x; y = aPoint.y;}
|
||||
void MoveBy(nscoord aDx, nscoord aDy) {x += aDx; y += aDy;}
|
||||
void SizeTo(nscoord aWidth, nscoord aHeight) {width = aWidth; height = aHeight;}
|
||||
void SizeTo(const nsSize& aSize) {SizeTo(aSize.width, aSize.height);}
|
||||
void SizeBy(nscoord aDeltaWidth, nscoord aDeltaHeight) {width += aDeltaWidth;
|
||||
height += aDeltaHeight;}
|
||||
|
||||
// Inflate the rect by the specified width/height or margin
|
||||
void Inflate(nscoord aDx, nscoord aDy);
|
||||
void Inflate(const nsSize& aSize) {Inflate(aSize.width, aSize.height);}
|
||||
void Inflate(const nsMargin& aMargin);
|
||||
|
||||
// Deflate the rect by the specified width/height or margin
|
||||
void Deflate(nscoord aDx, nscoord aDy);
|
||||
void Deflate(const nsSize& aSize) {Deflate(aSize.width, aSize.height);}
|
||||
void Deflate(const nsMargin& aMargin);
|
||||
|
||||
// Overloaded operators. Note that '=' isn't defined so we'll get the
|
||||
// compiler generated default assignment operator.
|
||||
PRBool operator==(const nsRect& aRect) const {
|
||||
return (PRBool) ((IsEmpty() && aRect.IsEmpty()) ||
|
||||
((x == aRect.x) && (y == aRect.y) &&
|
||||
(width == aRect.width) && (height == aRect.height)));
|
||||
}
|
||||
PRBool operator!=(const nsRect& aRect) const {
|
||||
return (PRBool) !operator==(aRect);
|
||||
}
|
||||
nsRect operator+(const nsRect& aRect) const {
|
||||
return nsRect(x + aRect.x, y + aRect.y,
|
||||
width + aRect.width, height + aRect.height);
|
||||
}
|
||||
nsRect operator-(const nsRect& aRect) const {
|
||||
return nsRect(x - aRect.x, y - aRect.y,
|
||||
width - aRect.width, height - aRect.height);
|
||||
}
|
||||
nsRect& operator+=(const nsPoint& aPoint) {x += aPoint.x; y += aPoint.y; return *this;}
|
||||
nsRect& operator-=(const nsPoint& aPoint) {x -= aPoint.x; y -= aPoint.y; return *this;}
|
||||
|
||||
nsRect& operator*=(const float aScale) {x = NSToCoordRound(x * aScale);
|
||||
y = NSToCoordRound(y * aScale);
|
||||
width = NSToCoordRound(width * aScale);
|
||||
height = NSToCoordRound(height * aScale);
|
||||
return *this;}
|
||||
|
||||
nsRect& ScaleRoundOut(const float aScale);
|
||||
nsRect& ScaleRoundIn(const float aScale);
|
||||
|
||||
// Helper methods for computing the extents
|
||||
nscoord XMost() const {return x + width;}
|
||||
nscoord YMost() const {return y + height;}
|
||||
};
|
||||
|
||||
// Diagnostics
|
||||
extern NS_GFX FILE* operator<<(FILE* out, const nsRect& rect);
|
||||
|
||||
#endif /* NSRECT_H */
|
||||
299
mozilla/gfx/public/nsRenderingContextImpl.h
Normal file
299
mozilla/gfx/public/nsRenderingContextImpl.h
Normal file
@@ -0,0 +1,299 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsRenderingContextImpl_h___
|
||||
#define nsRenderingContextImpl_h___
|
||||
|
||||
#include "nsIRenderingContext.h"
|
||||
#include "nsPoint.h"
|
||||
#include "nsSize.h"
|
||||
|
||||
|
||||
typedef struct {
|
||||
double x; // x coordinate of edge's intersection with current scanline */
|
||||
double dx; // change in x with respect to y
|
||||
int i; // edge number: edge i goes from mPointList[i] to mPointList[i+1]
|
||||
} Edge;
|
||||
|
||||
|
||||
class NS_GFX nsRenderingContextImpl : public nsIRenderingContext
|
||||
{
|
||||
|
||||
// CLASS MEMBERS
|
||||
public:
|
||||
|
||||
|
||||
protected:
|
||||
nsTransform2D *mTranMatrix; // The rendering contexts transformation matrix
|
||||
nsLineStyle mLineStyle; // The current linestyle, currenly used on mac, other platfroms to follow
|
||||
int mAct; // number of active edges
|
||||
Edge *mActive; // active edge list:edges crossing scanline y
|
||||
|
||||
public:
|
||||
nsRenderingContextImpl();
|
||||
|
||||
|
||||
// CLASS METHODS
|
||||
|
||||
/**
|
||||
* Gets the Pen Mode for the RenderingContext
|
||||
* @param aPenMode The Pen Mode to be retrieved
|
||||
* @return NS_OK if the Pen Mode is correctly retrieved
|
||||
*/
|
||||
NS_IMETHOD GetPenMode(nsPenMode &aPenMode) { return NS_ERROR_FAILURE;}
|
||||
|
||||
/**
|
||||
* Sets the Pen Mode for the RenderingContext
|
||||
* @param aPenMode The Pen Mode
|
||||
* @return NS_OK if the Pen Mode is correctly set
|
||||
*/
|
||||
NS_IMETHOD SetPenMode(nsPenMode aPenMode) { return NS_ERROR_FAILURE;};
|
||||
|
||||
|
||||
/** ---------------------------------------------------
|
||||
* See documentation in nsIRenderingContext.h
|
||||
* @update 03/29/00 dwc
|
||||
*/
|
||||
NS_IMETHOD DrawPath(nsPathPoint aPointArray[],PRInt32 aNumPts);
|
||||
|
||||
/** ---------------------------------------------------
|
||||
* See documentation in nsIRenderingContext.h
|
||||
* @update 03/29/00 dwc
|
||||
*/
|
||||
NS_IMETHOD FillPath(nsPathPoint aPointArray[],PRInt32 aNumPts);
|
||||
|
||||
/**
|
||||
* Fill a poly in the current foreground color
|
||||
* @param aPoints points to use for the drawing, last must equal first
|
||||
* @param aNumPonts number of points in the polygon
|
||||
*/
|
||||
NS_IMETHOD RasterPolygon(const nsPoint aPoints[], PRInt32 aNumPoints);
|
||||
|
||||
/** ---------------------------------------------------
|
||||
* See documentation in nsIRenderingContext.h
|
||||
* @update 05/01/00 dwc
|
||||
*/
|
||||
NS_IMETHOD DrawStdLine(nscoord aX0, nscoord aY0, nscoord aX1, nscoord aY1) { return NS_OK;}
|
||||
|
||||
/** ---------------------------------------------------
|
||||
* See documentation in nsIRenderingContext.h
|
||||
* @update 05/01/00 dwc
|
||||
*/
|
||||
NS_IMETHOD FillStdPolygon(const nsPoint aPoints[], PRInt32 aNumPoints) { return NS_OK; }
|
||||
|
||||
NS_IMETHOD GetBackbuffer(const nsRect &aRequestedSize, const nsRect &aMaxSize, nsDrawingSurface &aBackbuffer);
|
||||
NS_IMETHOD ReleaseBackbuffer(void);
|
||||
NS_IMETHOD DestroyCachedBackbuffer(void);
|
||||
|
||||
#ifdef IBMBIDI
|
||||
/**
|
||||
* Let the device context know whether we want text reordered with
|
||||
* right-to-left base direction
|
||||
*/
|
||||
NS_IMETHOD SetRightToLeftText(PRBool aIsRTL);
|
||||
#endif // IBMBIDI
|
||||
|
||||
#ifdef USE_IMG2
|
||||
NS_IMETHOD DrawImage(imgIContainer *aImage, const nsRect * aSrcRect, const nsPoint * aDestPoint);
|
||||
NS_IMETHOD DrawScaledImage(imgIContainer *aImage, const nsRect * aSrcRect, const nsRect * aDestRect);
|
||||
NS_IMETHOD DrawTile(imgIContainer *aImage, nscoord aXOffset, nscoord aYOffset, const nsRect * aTargetRect);
|
||||
NS_IMETHOD DrawScaledTile(imgIContainer *aImage, nscoord aXOffset, nscoord aYOffset, nscoord aTileWidth, nscoord aTileHeight, const nsRect * aTargetRect);
|
||||
#endif
|
||||
|
||||
|
||||
protected:
|
||||
virtual ~nsRenderingContextImpl();
|
||||
|
||||
/** ---------------------------------------------------
|
||||
* Check to see if the given size of tile can be imaged by the RenderingContext
|
||||
* @update 03/29/00 dwc
|
||||
* @param aWidth The width of the tile
|
||||
* @param aHeight The height of the tile
|
||||
* @return PR_TRUE the RenderingContext can handle this tile
|
||||
*/
|
||||
virtual PRBool CanTile(nscoord aWidth,nscoord aHeight) { return PR_FALSE; }
|
||||
|
||||
|
||||
/** ---------------------------------------------------
|
||||
* A bit blitter to tile images to the background recursively
|
||||
* @update 3/29/00 dwc
|
||||
* @param aDS -- Target drawing surface for the rendering context
|
||||
* @param aSrcRect -- Rectangle we are build with the image
|
||||
* @param aHeight -- height of the tile
|
||||
* @param aWidth -- width of the tile
|
||||
*/
|
||||
void TileImage(nsDrawingSurface aDS,nsRect &aSrcRect,PRInt16 aWidth,PRInt16 aHeight);
|
||||
|
||||
void cdelete(int i);
|
||||
void cinsert(int i,int y,const nsPoint aPointArray[],PRInt32 aNumPts);
|
||||
|
||||
/**
|
||||
* Determine if a rect's width and height will fit within a specified width and height
|
||||
* @param aRect rectangle to test
|
||||
* @param aWidth width to determine if the rectangle's width will fit within
|
||||
* @param aHeight height to determine if the rectangles height will fit within
|
||||
* @returns PR_TRUE if the rect width and height fits with aWidth, aHeight, PR_FALSE
|
||||
* otherwise.
|
||||
*/
|
||||
|
||||
PRBool RectFitsInside(const nsRect& aRect, PRInt32 aWidth, PRInt32 aHeight) const;
|
||||
|
||||
/**
|
||||
* Determine if two rectangles width and height will fit within a specified width and height
|
||||
* @param aRect1 first rectangle to test
|
||||
* @param aRect1 second rectangle to test
|
||||
* @param aWidth width to determine if both rectangle's width will fit within
|
||||
* @param aHeight height to determine if both rectangles height will fit within
|
||||
* @returns PR_TRUE if the rect1's and rect2's width and height fits with aWidth,
|
||||
* aHeight, PR_FALSE otherwise.
|
||||
*/
|
||||
PRBool BothRectsFitInside(const nsRect& aRect1, const nsRect& aRect2, PRInt32 aWidth, PRInt32 aHeight, nsRect& aNewSize) const;
|
||||
|
||||
/**
|
||||
* Return an offscreen surface size from a set of discrete surface sizes.
|
||||
* The smallest discrete surface size that can enclose both the Maximum widget
|
||||
* size (@see GetMaxWidgetBounds) and the requested size is returned.
|
||||
*
|
||||
* @param aMaxBackbufferSize Maximum size that may be requested for the backbuffer
|
||||
* @param aRequestedSize Requested size for the offscreen.
|
||||
* @param aSurfaceSize contains the surface size
|
||||
*/
|
||||
void CalculateDiscreteSurfaceSize(const nsRect& aMaxBackbufferSize, const nsRect& aRequestedSize, nsRect& aSize);
|
||||
|
||||
/**
|
||||
* Get the size of the offscreen drawing surface..
|
||||
*
|
||||
* @param aMaxBackbufferSize Maximum size that may be requested for the backbuffer
|
||||
* @param aRequestedSize Desired size for the offscreen.
|
||||
* @param aSurfaceSize Offscreen adjusted to a discrete size which encloses aRequestedSize.
|
||||
*/
|
||||
void GetDrawingSurfaceSize(const nsRect& aMaxBackbufferSize, const nsRect& aRequestedSize, nsRect& aSurfaceSize);
|
||||
|
||||
/**
|
||||
* Utility method used to implement NS_IMETHOD GetBackbuffer
|
||||
*
|
||||
* @param aRequestedSize size of the backbuffer area requested
|
||||
* @param aMaxSize maximum size that may be requested for the backbuffer
|
||||
* @param aBackbuffer drawing surface used as the backbuffer
|
||||
* @param aCacheBackbuffer PR_TRUE then the backbuffer will be cached, if PR_FALSE it is created each time
|
||||
*/
|
||||
nsresult AllocateBackbuffer(const nsRect &aRequestedSize, const nsRect &aMaxSize, nsDrawingSurface &aBackbuffer, PRBool aCacheBackbuffer);
|
||||
|
||||
public:
|
||||
|
||||
protected:
|
||||
nsPenMode mPenMode;
|
||||
private:
|
||||
static nsDrawingSurface gBackbuffer; //singleton backbuffer
|
||||
static nsRect gBackbufferBounds; //backbuffer bounds
|
||||
// Largest requested offscreen size if larger than a full screen.
|
||||
static nsSize gLargestRequestedSize;
|
||||
|
||||
};
|
||||
|
||||
|
||||
/** ---------------------------------------------------
|
||||
* Class QBezierCurve, a quadratic bezier curve
|
||||
* @update 4/27/2000 dwc
|
||||
*/
|
||||
class QBezierCurve
|
||||
{
|
||||
|
||||
public:
|
||||
nsFloatPoint mAnc1;
|
||||
nsFloatPoint mCon;
|
||||
nsFloatPoint mAnc2;
|
||||
|
||||
QBezierCurve() {mAnc1.x=0;mAnc1.y=0;mCon=mAnc2=mAnc1;}
|
||||
void SetControls(nsFloatPoint &aAnc1,nsFloatPoint &aCon,nsFloatPoint &aAnc2) { mAnc1 = aAnc1; mCon = aCon; mAnc2 = aAnc2;}
|
||||
void SetPoints(nscoord a1x,nscoord a1y,nscoord acx,nscoord acy,nscoord a2x,nscoord a2y) {mAnc1.MoveTo(a1x,a1y),mCon.MoveTo(acx,acy),mAnc2.MoveTo(a2x,a2y);}
|
||||
void SetPoints(float a1x,float a1y,float acx,float acy,float a2x,float a2y) {mAnc1.MoveTo(a1x,a1y),mCon.MoveTo(acx,acy),mAnc2.MoveTo(a2x,a2y);}
|
||||
void DebugPrint();
|
||||
/** ---------------------------------------------------
|
||||
* Divide a Quadratic curve into line segments if it is not smaller than a certain size
|
||||
* else it is so small that it can be approximated by 2 lineto calls
|
||||
* @param aRenderingContext -- The RenderingContext to use to draw with
|
||||
* @update 3/26/99 dwc
|
||||
*/
|
||||
void SubDivide(nsIRenderingContext *aRenderingContext);
|
||||
|
||||
/** ---------------------------------------------------
|
||||
* Divide a Quadratic curve into line segments if it is not smaller than a certain size
|
||||
* else it is so small that it can be approximated by 2 lineto calls
|
||||
* @param nsPoint* -- The points array to rasterize into
|
||||
* @param aNumPts* -- Current number of points in this array
|
||||
* @update 3/26/99 dwc
|
||||
*/
|
||||
void SubDivide(nsPoint aThePoints[],PRInt16 *aNumPts);
|
||||
|
||||
/** ---------------------------------------------------
|
||||
* Divide a Quadratic Bezier curve at the mid-point
|
||||
* @update 3/26/99 dwc
|
||||
* @param aCurve1 -- Curve 1 as a result of the division
|
||||
* @param aCurve2 -- Curve 2 as a result of the division
|
||||
*/
|
||||
void MidPointDivide(QBezierCurve *A,QBezierCurve *B);
|
||||
};
|
||||
|
||||
enum eSegType {eUNDEF,eLINE,eQCURVE,eCCURVE};
|
||||
|
||||
|
||||
/** ---------------------------------------------------
|
||||
* A class to iterate through a nsPathPoint array and return segments
|
||||
* @update 04/27/00 dwc
|
||||
*/
|
||||
class nsPathIter {
|
||||
|
||||
public:
|
||||
enum eSegType {eUNDEF,eLINE,eQCURVE,eCCURVE};
|
||||
|
||||
private:
|
||||
PRUint32 mCurPoint;
|
||||
PRUint32 mNumPoints;
|
||||
nsPathPoint *mThePath;
|
||||
|
||||
public:
|
||||
nsPathIter();
|
||||
nsPathIter(nsPathPoint* aThePath,PRUint32 aNumPts);
|
||||
|
||||
PRBool NextSeg(QBezierCurve& TheSegment,eSegType& aCurveType);
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif /* nsRenderingContextImpl */
|
||||
82
mozilla/gfx/public/nsRepeater.h
Normal file
82
mozilla/gfx/public/nsRepeater.h
Normal file
@@ -0,0 +1,82 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsRepeater_h___
|
||||
#define nsRepeater_h___
|
||||
|
||||
#include "nscore.h"
|
||||
|
||||
class EventRecord;
|
||||
|
||||
class NS_WIDGET Repeater
|
||||
{
|
||||
public:
|
||||
|
||||
Repeater();
|
||||
virtual ~Repeater();
|
||||
|
||||
virtual void RepeatAction(const EventRecord &aMacEvent) {}
|
||||
virtual void IdleAction(const EventRecord &aMacEvent) {}
|
||||
|
||||
void StartRepeating();
|
||||
void StopRepeating();
|
||||
void StartIdling();
|
||||
void StopIdling();
|
||||
|
||||
static void DoRepeaters(const EventRecord &aMacEvent);
|
||||
static void DoIdlers(const EventRecord &aMacEvent);
|
||||
|
||||
protected:
|
||||
|
||||
void AddToRepeatList();
|
||||
void RemoveFromRepeatList();
|
||||
void AddToIdleList();
|
||||
void RemoveFromIdleList();
|
||||
|
||||
static Repeater* sRepeaters;
|
||||
static Repeater* sIdlers;
|
||||
|
||||
bool mRepeating;
|
||||
bool mIdling;
|
||||
Repeater* mPrevRptr;
|
||||
Repeater* mNextRptr;
|
||||
Repeater* mPrevIdlr;
|
||||
Repeater* mNextIdlr;
|
||||
};
|
||||
|
||||
#endif
|
||||
81
mozilla/gfx/public/nsSize.h
Normal file
81
mozilla/gfx/public/nsSize.h
Normal file
@@ -0,0 +1,81 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef NSSIZE_H
|
||||
#define NSSIZE_H
|
||||
|
||||
#include "nsCoord.h"
|
||||
|
||||
// Maximum allowable size
|
||||
#define NS_MAXSIZE nscoord(1 << 30)
|
||||
|
||||
struct nsSize {
|
||||
nscoord width, height;
|
||||
|
||||
// Constructors
|
||||
nsSize() {}
|
||||
nsSize(const nsSize& aSize) {width = aSize.width; height = aSize.height;}
|
||||
nsSize(nscoord aWidth, nscoord aHeight) {width = aWidth; height = aHeight;}
|
||||
|
||||
void SizeTo(nscoord aWidth, nscoord aHeight) {width = aWidth; height = aHeight;}
|
||||
void SizeBy(nscoord aDeltaWidth, nscoord aDeltaHeight) {width += aDeltaWidth;
|
||||
height += aDeltaHeight;}
|
||||
|
||||
// Overloaded operators. Note that '=' isn't defined so we'll get the
|
||||
// compiler generated default assignment operator
|
||||
PRBool operator==(const nsSize& aSize) const {
|
||||
return (PRBool) ((width == aSize.width) && (height == aSize.height));
|
||||
}
|
||||
PRBool operator!=(const nsSize& aSize) const {
|
||||
return (PRBool) ((width != aSize.width) || (height != aSize.height));
|
||||
}
|
||||
nsSize operator+(const nsSize& aSize) const {
|
||||
return nsSize(width + aSize.width, height + aSize.height);
|
||||
}
|
||||
nsSize operator-(const nsSize& aSize) const {
|
||||
return nsSize(width - aSize.width, height - aSize.height);
|
||||
}
|
||||
nsSize& operator+=(const nsSize& aSize) {width += aSize.width;
|
||||
height += aSize.height;
|
||||
return *this;}
|
||||
nsSize& operator-=(const nsSize& aSize) {width -= aSize.width;
|
||||
height -= aSize.height;
|
||||
return *this;}
|
||||
};
|
||||
|
||||
#endif /* NSSIZE_H */
|
||||
178
mozilla/gfx/public/nsThemeConstants.h
Normal file
178
mozilla/gfx/public/nsThemeConstants.h
Normal file
@@ -0,0 +1,178 @@
|
||||
// No appearance at all.
|
||||
#define NS_THEME_NONE 0
|
||||
|
||||
// A typical dialog button.
|
||||
#define NS_THEME_BUTTON 1
|
||||
|
||||
// A radio element within a radio group.
|
||||
#define NS_THEME_RADIO 2
|
||||
|
||||
// A checkbox element.
|
||||
#define NS_THEME_CHECKBOX 3
|
||||
|
||||
// The toolbox that contains the toolbars.
|
||||
#define NS_THEME_TOOLBOX 11
|
||||
|
||||
// A toolbar in an application window.
|
||||
#define NS_THEME_TOOLBAR 12
|
||||
|
||||
// A single toolbar button (with no associated dropdown)
|
||||
#define NS_THEME_TOOLBAR_BUTTON 13
|
||||
|
||||
// A dual toolbar button (e.g., a Back button with a dropdown)
|
||||
#define NS_THEME_TOOLBAR_DUAL_BUTTON 14
|
||||
|
||||
// The dropdown portion of a dual toolbar button
|
||||
#define NS_THEME_TOOLBAR_DUAL_BUTTON_DROPDOWN 15
|
||||
|
||||
// A separator. Can be horizontal or vertical.
|
||||
#define NS_THEME_TOOLBAR_SEPARATOR 16
|
||||
|
||||
// The gripper for a toolbar.
|
||||
#define NS_THEME_TOOLBAR_GRIPPER 17
|
||||
|
||||
// A status bar in a main application window.
|
||||
#define NS_THEME_STATUSBAR 21
|
||||
|
||||
// A single pane of a status bar.
|
||||
#define NS_THEME_STATUSBAR_PANEL 22
|
||||
|
||||
// The resizer background area in a status bar
|
||||
// for the resizer widget in the corner of a window.
|
||||
#define NS_THEME_STATUSBAR_RESIZER_PANEL 23
|
||||
|
||||
// The resizer itself.
|
||||
#define NS_THEME_RESIZER 24
|
||||
|
||||
// List boxes
|
||||
#define NS_THEME_LISTBOX 31
|
||||
|
||||
// A listbox item
|
||||
#define NS_THEME_LISTBOX_LISTITEM 32
|
||||
|
||||
// A tree widget
|
||||
#define NS_THEME_TREEVIEW 41
|
||||
|
||||
// A tree item
|
||||
#define NS_THEME_TREEVIEW_TREEITEM 42
|
||||
|
||||
// A tree widget twisty
|
||||
#define NS_THEME_TREEVIEW_TWISTY 43
|
||||
|
||||
// A tree widget branch line
|
||||
#define NS_THEME_TREEVIEW_LINE 44
|
||||
|
||||
// A listbox or tree widget header
|
||||
#define NS_THEME_TREEVIEW_HEADER 45
|
||||
|
||||
// An individual header cell
|
||||
#define NS_THEME_TREEVIEW_HEADER_CELL 46
|
||||
|
||||
// The sort arrow for a header.
|
||||
#define NS_THEME_TREEVIEW_HEADER_SORTARROW 47
|
||||
|
||||
// Open tree widget twisty
|
||||
#define NS_THEME_TREEVIEW_TWISTY_OPEN 48
|
||||
|
||||
// A horizontal progress bar.
|
||||
#define NS_THEME_PROGRESSBAR 51
|
||||
|
||||
// The progress bar's progress indicator
|
||||
#define NS_THEME_PROGRESSBAR_CHUNK 52
|
||||
|
||||
// A vertical progress bar.
|
||||
#define NS_THEME_PROGRESSBAR_VERTICAL 53
|
||||
|
||||
// A vertical progress chunk
|
||||
#define NS_THEME_PROGRESSBAR_CHUNK_VERTICAL 54
|
||||
|
||||
// A single tab in a tab widget.
|
||||
#define NS_THEME_TAB 61
|
||||
|
||||
// A single pane (inside the tabpanels container)
|
||||
#define NS_THEME_TAB_PANEL 62
|
||||
|
||||
// The tab just before the selection
|
||||
#define NS_THEME_TAB_LEFT_EDGE 63
|
||||
|
||||
// The tab just after the selection
|
||||
#define NS_THEME_TAB_RIGHT_EDGE 64
|
||||
|
||||
// The tab panels container.
|
||||
#define NS_THEME_TAB_PANELS 65
|
||||
|
||||
// A tooltip
|
||||
#define NS_THEME_TOOLTIP 71
|
||||
|
||||
// A spin control (up/down control for time/date pickers)
|
||||
#define NS_THEME_SPINNER 72
|
||||
|
||||
// The up button of a spin control
|
||||
#define NS_THEME_SPINNER_UP_BUTTON 73
|
||||
|
||||
// The down button of a spin control
|
||||
#define NS_THEME_SPINNER_DOWN_BUTTON 74
|
||||
|
||||
// A scrollbar.
|
||||
#define NS_THEME_SCROLLBAR 81
|
||||
|
||||
// A scrollbar button (up/down/left/right)
|
||||
#define NS_THEME_SCROLLBAR_BUTTON_UP 82
|
||||
#define NS_THEME_SCROLLBAR_BUTTON_DOWN 83
|
||||
#define NS_THEME_SCROLLBAR_BUTTON_LEFT 84
|
||||
#define NS_THEME_SCROLLBAR_BUTTON_RIGHT 85
|
||||
|
||||
// The scrollbar track
|
||||
#define NS_THEME_SCROLLBAR_TRACK_HORIZONTAL 86
|
||||
#define NS_THEME_SCROLLBAR_TRACK_VERTICAL 87
|
||||
|
||||
// The scrollbar thumb
|
||||
#define NS_THEME_SCROLLBAR_THUMB_HORIZONTAL 88
|
||||
#define NS_THEME_SCROLLBAR_THUMB_VERTICAL 89
|
||||
|
||||
// The gripper that goes on the thumb
|
||||
#define NS_THEME_SCROLLBAR_GRIPPER_HORIZONTAL 90
|
||||
#define NS_THEME_SCROLLBAR_GRIPPER_VERTICAL 91
|
||||
|
||||
// A textfield or text area
|
||||
#define NS_THEME_TEXTFIELD 95
|
||||
|
||||
// The caret of a text area
|
||||
#define NS_THEME_TEXTFIELD_CARET 96
|
||||
|
||||
// A dropdown list.
|
||||
#define NS_THEME_DROPDOWN 101
|
||||
|
||||
// The dropdown button(s) that open up a dropdown list.
|
||||
#define NS_THEME_DROPDOWN_BUTTON 102
|
||||
|
||||
// The text part of a dropdown list, to left of button
|
||||
#define NS_THEME_DROPDOWN_TEXT 103
|
||||
|
||||
// A slider
|
||||
#define NS_THEME_SLIDER 111
|
||||
|
||||
// A slider's thumb
|
||||
#define NS_THEME_SLIDER_THUMB 112
|
||||
|
||||
// If the platform supports it, the left/right chunks
|
||||
// of the slider thumb
|
||||
#define NS_THEME_SLIDER_THUMB_START 113
|
||||
#define NS_THEME_SLIDER_THUMB_END 114
|
||||
|
||||
// The ticks for a slider.
|
||||
#define NS_THEME_SLIDER_TICK 115
|
||||
|
||||
// A generic container that always repaints on state
|
||||
// changes. This is a hack to make checkboxes and
|
||||
// radio buttons work.
|
||||
#define NS_THEME_CHECKBOX_CONTAINER 200
|
||||
#define NS_THEME_RADIO_CONTAINER 201
|
||||
|
||||
// Window and dialog backgrounds
|
||||
#define NS_THEME_WINDOW 250
|
||||
#define NS_THEME_DIALOG 251
|
||||
|
||||
// Menu and Menu Bar backgrounds
|
||||
#define NS_THEME_MENU 260
|
||||
#define NS_THEME_MENUBAR 261
|
||||
256
mozilla/gfx/public/nsTransform2D.h
Normal file
256
mozilla/gfx/public/nsTransform2D.h
Normal file
@@ -0,0 +1,256 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsTransform2D_h___
|
||||
#define nsTransform2D_h___
|
||||
|
||||
#include "nscore.h"
|
||||
#include "nsCoord.h"
|
||||
#include "nsUnitConversion.h"
|
||||
|
||||
#define MG_2DIDENTITY 0
|
||||
#define MG_2DTRANSLATION 1
|
||||
#define MG_2DSCALE 2
|
||||
#define MG_2DGENERAL 4
|
||||
|
||||
class NS_GFX nsTransform2D
|
||||
{
|
||||
private:
|
||||
//accelerators
|
||||
|
||||
float m00, m01, m10, m11, m20, m21;
|
||||
PRUint16 type;
|
||||
|
||||
public:
|
||||
//constructors
|
||||
|
||||
nsTransform2D(void) { SetToIdentity(); }
|
||||
nsTransform2D(nsTransform2D *aTransform2D) { SetMatrix(aTransform2D); }
|
||||
|
||||
//destructor
|
||||
|
||||
~nsTransform2D(void) { }
|
||||
|
||||
/**
|
||||
* get the type of this transform
|
||||
*
|
||||
* @param
|
||||
* @return type from above set
|
||||
* @exception
|
||||
* @author michaelp 09-25-97 1:56pm
|
||||
**/
|
||||
|
||||
PRUint16 GetType(void) { return type; }
|
||||
|
||||
/**
|
||||
* set this transform to identity
|
||||
*
|
||||
* @param
|
||||
* @exception
|
||||
* @author michaelp 09-25-97 1:56pm
|
||||
**/
|
||||
|
||||
void SetToIdentity(void) { m01 = m10 = m20 = m21 = 0.0f; m00 = m11 = 1.0f; type = MG_2DIDENTITY; }
|
||||
|
||||
/**
|
||||
* set this transform to a scale
|
||||
*
|
||||
* @param sx, x scale
|
||||
* @param sy, y scale
|
||||
* @exception
|
||||
* @author michaelp 09-25-97 1:56pm
|
||||
**/
|
||||
|
||||
void SetToScale(float sx, float sy);
|
||||
|
||||
/**
|
||||
* set this transform to a translation
|
||||
*
|
||||
* @param tx, x translation
|
||||
* @param ty, y translation
|
||||
* @exception
|
||||
* @author michaelp 09-25-97 1:56pm
|
||||
**/
|
||||
|
||||
void SetToTranslate(float tx, float ty);
|
||||
|
||||
/**
|
||||
* get the translation portion of this transform
|
||||
*
|
||||
* @param pt, Point to return translation values in
|
||||
* @exception
|
||||
* @author michaelp 09-25-97 1:56pm
|
||||
**/
|
||||
|
||||
void GetTranslation(float *ptX, float *ptY) { *ptX = m20; *ptY = m21; }
|
||||
void GetTranslationCoord(nscoord *ptX, nscoord *ptY) { *ptX = NSToCoordRound(m20); *ptY = NSToCoordRound(m21); }
|
||||
|
||||
/**
|
||||
* set the translation portion of this transform
|
||||
*
|
||||
* @param tx, x translation
|
||||
* @param ty, y translation
|
||||
* @exception
|
||||
**/
|
||||
|
||||
void SetTranslation(float tX, float tY) {
|
||||
m20 = tX;
|
||||
m21 = tY;
|
||||
type |= MG_2DTRANSLATION;
|
||||
}
|
||||
|
||||
/**
|
||||
* get the X translation portion of this transform
|
||||
*
|
||||
* @param
|
||||
* @returns x component of translation
|
||||
* @exception
|
||||
**/
|
||||
|
||||
float GetXTranslation(void) { return m20; }
|
||||
nscoord GetXTranslationCoord(void) { return NSToCoordRound(m20); }
|
||||
|
||||
/**
|
||||
* get the Y translation portion of this transform
|
||||
*
|
||||
* @param
|
||||
* @returns y component of translation
|
||||
* @exception
|
||||
**/
|
||||
|
||||
float GetYTranslation(void) { return m21; }
|
||||
nscoord GetYTranslationCoord(void) { return NSToCoordRound(m21); }
|
||||
|
||||
/**
|
||||
* set this matrix and type from another Transform2D
|
||||
*
|
||||
* @param aTransform2D is the Transform2D to be copied from
|
||||
* @exception
|
||||
* @author michaelp 09-25-97 1:56pm
|
||||
**/
|
||||
|
||||
void SetMatrix(nsTransform2D *aTransform2D);
|
||||
|
||||
/**
|
||||
* post-multiply a new Transform
|
||||
*
|
||||
* @param newxform new Transform2D
|
||||
* @exception
|
||||
* @author michaelp 09-25-97 1:56pm
|
||||
**/
|
||||
|
||||
void Concatenate(nsTransform2D *newxform);
|
||||
|
||||
/**
|
||||
* pre-multiply a new Transform
|
||||
*
|
||||
* @param newxform new Transform2D
|
||||
* @exception
|
||||
* @author michaelp 09-25-97 1:56pm
|
||||
**/
|
||||
|
||||
void PreConcatenate(nsTransform2D *newxform);
|
||||
|
||||
/**
|
||||
* apply nontranslation portion of matrix to vector
|
||||
*
|
||||
* @param pt Point to transform
|
||||
* @exception
|
||||
* @author michaelp 09-25-97 1:56pm
|
||||
**/
|
||||
|
||||
void TransformNoXLate(float *ptX, float *ptY);
|
||||
void TransformNoXLateCoord(nscoord *ptX, nscoord *ptY);
|
||||
|
||||
/**
|
||||
* apply matrix to vector
|
||||
*
|
||||
* @param pt Point to transform
|
||||
* @exception
|
||||
* @author michaelp 09-25-97 1:56pm
|
||||
**/
|
||||
|
||||
void Transform(float *ptX, float *ptY);
|
||||
void TransformCoord(nscoord *ptX, nscoord *ptY);
|
||||
|
||||
/**
|
||||
* apply matrix to rect
|
||||
*
|
||||
* @param rect Rect to transform
|
||||
* @exception
|
||||
* @author michaelp 09-25-97 1:56pm
|
||||
**/
|
||||
|
||||
void Transform(float *aX, float *aY, float *aWidth, float *aHeight);
|
||||
void TransformCoord(nscoord *aX, nscoord *aY, nscoord *aWidth, nscoord *aHeight);
|
||||
|
||||
/**
|
||||
* Scale an array of X/Y coordinates by the X/Y scale factor in the
|
||||
* matrix. The scale is done as if the other coordinate were zero.
|
||||
*
|
||||
* @param aSrc Base of coordinate input array
|
||||
* @param aDst Base of coordinate output array
|
||||
* @param aNumCoords Number of coordinates to scale
|
||||
*/
|
||||
void ScaleXCoords(const nscoord* aSrc, PRUint32 aNumCoords, PRIntn* aDst);
|
||||
void ScaleYCoords(const nscoord* aSrc, PRUint32 aNumCoords, PRIntn* aDst);
|
||||
|
||||
/**
|
||||
* add a translation to a Transform via x, y pair
|
||||
*
|
||||
* @param ptX x value to add as x translation
|
||||
* @param ptY y value to add as y translation
|
||||
* @exception
|
||||
* @author michaelp 09-25-97 1:56pm
|
||||
**/
|
||||
|
||||
void AddTranslation(float ptX, float ptY);
|
||||
|
||||
/**
|
||||
* add a scale to a Transform via x, y pair
|
||||
*
|
||||
* @param ptX x value to add as x scale
|
||||
* @param ptY y value to add as y scale
|
||||
* @exception
|
||||
* @author michaelp 09-25-97 1:56pm
|
||||
**/
|
||||
|
||||
void AddScale(float ptX, float ptY);
|
||||
};
|
||||
|
||||
#endif
|
||||
2
mozilla/gfx/src/MANIFEST
Normal file
2
mozilla/gfx/src/MANIFEST
Normal file
@@ -0,0 +1,2 @@
|
||||
icon_0.gif
|
||||
icon_1.gif
|
||||
139
mozilla/gfx/src/Makefile.in
Normal file
139
mozilla/gfx/src/Makefile.in
Normal file
@@ -0,0 +1,139 @@
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
|
||||
DEPTH = ../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE = gfx
|
||||
EXPORTS = nsFontList.h
|
||||
LIBRARY_NAME = gkgfx
|
||||
EXPORT_LIBRARY = 1
|
||||
REQUIRES = xpcom \
|
||||
string \
|
||||
widget \
|
||||
locale \
|
||||
view \
|
||||
pref \
|
||||
gfx2 \
|
||||
imglib2 \
|
||||
uconv \
|
||||
unicharutil \
|
||||
$(NULL)
|
||||
|
||||
ifneq (,$(filter os2 windows,$(MOZ_WIDGET_TOOLKIT)))
|
||||
DIRS =
|
||||
else
|
||||
DIRS = ps
|
||||
endif
|
||||
|
||||
ifneq (,$(filter beos os2 mac windows,$(MOZ_GFX_TOOLKIT)))
|
||||
DIRS += $(MOZ_GFX_TOOLKIT)
|
||||
endif
|
||||
|
||||
# Build xlibrgb only for X toolkits and/or Xprint
|
||||
ifneq (,$(filter xlib,$(MOZ_WIDGET_TOOLKIT))$(MOZ_ENABLE_XLIB)$(MOZ_ENABLE_XPRINT))
|
||||
DIRS += xlibrgb
|
||||
endif
|
||||
|
||||
ifdef MOZ_ENABLE_GTK
|
||||
DIRS += gtk
|
||||
endif
|
||||
ifdef MOZ_ENABLE_GTK2
|
||||
DIRS += gtk
|
||||
endif
|
||||
ifdef MOZ_ENABLE_QT
|
||||
DIRS += qt
|
||||
endif
|
||||
ifdef MOZ_ENABLE_XLIB
|
||||
DIRS += xlib
|
||||
endif
|
||||
|
||||
ifdef MOZ_ENABLE_PHOTON
|
||||
DIRS += photon
|
||||
endif
|
||||
|
||||
ifdef MOZ_ENABLE_XPRINT
|
||||
DIRS += xprint
|
||||
endif
|
||||
|
||||
CPPSRCS = \
|
||||
nsBlender.cpp \
|
||||
nsColor.cpp \
|
||||
nsColorNames.cpp \
|
||||
nsDeviceContext.cpp \
|
||||
nsFont.cpp \
|
||||
nsFontList.cpp \
|
||||
nsRenderingContextImpl.cpp \
|
||||
nsRect.cpp \
|
||||
nsTransform2D.cpp \
|
||||
nsScriptableRegion.cpp \
|
||||
nsGraphicsImpl.cpp \
|
||||
nsPrintOptionsImpl.cpp \
|
||||
nsPrintSettingsImpl.cpp \
|
||||
$(NULL)
|
||||
|
||||
ifeq (,$(filter windows,$(MOZ_WIDGET_TOOLKIT)))
|
||||
CPPSRCS += nsCompressedCharMap.cpp
|
||||
endif
|
||||
|
||||
ifneq (,$(filter gtk gtk2 xlib os2,$(MOZ_WIDGET_TOOLKIT)))
|
||||
CPPSRCS += \
|
||||
nsRegion.cpp \
|
||||
nsRegionImpl.cpp \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
ifneq (,$(filter gtk gtk2 xlib beos,$(MOZ_WIDGET_TOOLKIT)))
|
||||
CPPSRCS += imgScaler.cpp
|
||||
endif
|
||||
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
CPPSRCS += \
|
||||
mac/nsRegionPool.cpp \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
EXTRA_DSO_LDOPTS = \
|
||||
$(DIST)/lib/$(LIB_PREFIX)mozutil_s.$(LIB_SUFFIX) \
|
||||
$(MOZ_UNICHARUTIL_LIBS) \
|
||||
$(MOZ_COMPONENT_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
EXTRA_DSO_LDOPTS += \
|
||||
$(TK_LIBS) \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
DEFINES += -D_IMPL_NS_GFX
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
DEFINES += -DWIN32_LEAN_AND_MEAN
|
||||
endif
|
||||
|
||||
libs:: icon_0.gif icon_1.gif
|
||||
$(INSTALL) -m 555 $^ $(DIST)/bin/res/gfx
|
||||
|
||||
78
mozilla/gfx/src/beos/Makefile.in
Normal file
78
mozilla/gfx/src/beos/Makefile.in
Normal file
@@ -0,0 +1,78 @@
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
|
||||
DEPTH = ../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE = gfx
|
||||
LIBRARY_NAME = gfx_beos
|
||||
EXPORT_LIBRARY = 1
|
||||
IS_COMPONENT = 1
|
||||
MODULE_NAME = nsGfxBeOSModule
|
||||
|
||||
CPPSRCS = \
|
||||
nsDeviceContextBeOS.cpp \
|
||||
nsDeviceContextSpecFactoryB.cpp \
|
||||
nsDeviceContextSpecB.cpp \
|
||||
nsDrawingSurfaceBeOS.cpp \
|
||||
nsFontMetricsBeOS.cpp \
|
||||
nsGfxFactoryBeOS.cpp \
|
||||
nsGraphicsStateBeOS.cpp \
|
||||
nsRenderingContextBeOS.cpp \
|
||||
nsImageBeOS.cpp \
|
||||
nsRegionBeOS.cpp \
|
||||
nsScreenBeOS.cpp \
|
||||
nsScreenManagerBeOS.cpp \
|
||||
nsPrintOptionsBeOS.cpp \
|
||||
$(NULL)
|
||||
|
||||
REQUIRES = xpcom \
|
||||
string \
|
||||
pref \
|
||||
widget \
|
||||
view \
|
||||
intl \
|
||||
uconv \
|
||||
dom \
|
||||
windowwatcher \
|
||||
unicharutil \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
DEFINES += -D_IMPL_NS_GFXONXP
|
||||
CXXFLAGS += $(TK_CFLAGS)
|
||||
INCLUDES += $(TK_CFLAGS)
|
||||
|
||||
EXTRA_DSO_LDOPTS += $(MOZ_COMPONENT_LIBS) $(MOZ_JS_LIBS) \
|
||||
-lgkgfx \
|
||||
$(XPCOM_LIBS) \
|
||||
$(TK_LIBS) \
|
||||
$(NSPR_LIBS)
|
||||
|
||||
INCLUDES += \
|
||||
-I$(srcdir)/. \
|
||||
-I$(srcdir)/.. \
|
||||
$(NULL)
|
||||
472
mozilla/gfx/src/beos/nsDeviceContextBeOS.cpp
Normal file
472
mozilla/gfx/src/beos/nsDeviceContextBeOS.cpp
Normal file
@@ -0,0 +1,472 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Pierre Phaneuf <pp@ludusdesign.com>
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include "nspr.h"
|
||||
#include "nsIPref.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsCRT.h"
|
||||
#include "nsReadableUtils.h"
|
||||
|
||||
#include "nsDeviceContextBeOS.h"
|
||||
#include "nsFontMetricsBeOS.h"
|
||||
#include "nsGfxCIID.h"
|
||||
|
||||
#include "nsGfxPSCID.h"
|
||||
#include "nsIDeviceContextPS.h"
|
||||
|
||||
#include <ScrollBar.h>
|
||||
#include <Screen.h>
|
||||
|
||||
#include "nsIScreenManager.h"
|
||||
|
||||
static NS_DEFINE_CID(kPrefCID, NS_PREF_CID);
|
||||
|
||||
nscoord nsDeviceContextBeOS::mDpi = 96;
|
||||
|
||||
nsDeviceContextBeOS::nsDeviceContextBeOS()
|
||||
: DeviceContextImpl()
|
||||
{
|
||||
mTwipsToPixels = 1.0;
|
||||
mPixelsToTwips = 1.0;
|
||||
mDepth = 0 ;
|
||||
mNumCells = 0;
|
||||
|
||||
mWidthFloat = 0.0f;
|
||||
mHeightFloat = 0.0f;
|
||||
mWidth = -1;
|
||||
mHeight = -1;
|
||||
}
|
||||
|
||||
nsDeviceContextBeOS::~nsDeviceContextBeOS()
|
||||
{
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIPref> prefs = do_GetService(kPrefCID, &rv);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
prefs->UnregisterCallback("browser.display.screen_resolution",
|
||||
prefChanged, (void *)this);
|
||||
}
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextBeOS::Init(nsNativeWidget aNativeWidget)
|
||||
{
|
||||
// get the screen object and its width/height
|
||||
// XXXRight now this will only get the primary monitor.
|
||||
|
||||
nsresult ignore;
|
||||
nsCOMPtr<nsIScreenManager> sm ( do_GetService("@mozilla.org/gfx/screenmanager;1", &ignore) );
|
||||
if ( sm ) {
|
||||
nsCOMPtr<nsIScreen> screen;
|
||||
sm->GetPrimaryScreen ( getter_AddRefs(screen) );
|
||||
if ( screen ) {
|
||||
PRInt32 x, y, width, height, depth;
|
||||
screen->GetAvailRect ( &x, &y, &width, &height );
|
||||
screen->GetPixelDepth ( &depth );
|
||||
mWidthFloat = float(width);
|
||||
mHeightFloat = float(height);
|
||||
mDepth = NS_STATIC_CAST ( PRUint32, depth );
|
||||
}
|
||||
}
|
||||
|
||||
static int initialized = 0;
|
||||
if (!initialized) {
|
||||
initialized = 1;
|
||||
|
||||
// Set prefVal the value of the preference "browser.display.screen_resolution"
|
||||
// or -1 if we can't get it.
|
||||
// If it's negative, we pretend it's not set.
|
||||
// If it's 0, it means force use of the operating system's logical resolution.
|
||||
// If it's positive, we use it as the logical resolution
|
||||
PRInt32 prefVal = -1;
|
||||
nsresult res;
|
||||
|
||||
nsCOMPtr<nsIPref> prefs(do_GetService(kPrefCID, &res));
|
||||
if (NS_SUCCEEDED(res) && prefs) {
|
||||
res = prefs->GetIntPref("browser.display.screen_resolution", &prefVal);
|
||||
if (! NS_SUCCEEDED(res)) {
|
||||
prefVal = -1;
|
||||
}
|
||||
prefs->RegisterCallback("browser.display.screen_resolution", prefChanged,
|
||||
(void *)this);
|
||||
}
|
||||
|
||||
// Set OSVal to what the operating system thinks the logical resolution is.
|
||||
PRInt32 OSVal = 72;
|
||||
|
||||
if (prefVal > 0) {
|
||||
// If there's a valid pref value for the logical resolution,
|
||||
// use it.
|
||||
mDpi = prefVal;
|
||||
} else if ((prefVal == 0) || (OSVal > 96)) {
|
||||
// Either if the pref is 0 (force use of OS value) or the OS
|
||||
// value is bigger than 96, use the OS value.
|
||||
mDpi = OSVal;
|
||||
} else {
|
||||
// if we couldn't get the pref or it's negative, and the OS
|
||||
// value is under 96ppi, then use 96.
|
||||
mDpi = 96;
|
||||
}
|
||||
}
|
||||
|
||||
SetDPI(mDpi);
|
||||
|
||||
mScrollbarHeight = PRInt16(B_H_SCROLL_BAR_HEIGHT);
|
||||
mScrollbarWidth = PRInt16(B_V_SCROLL_BAR_WIDTH);
|
||||
|
||||
#ifdef DEBUG
|
||||
static PRBool once = PR_TRUE;
|
||||
if (once) {
|
||||
printf("GFX: dpi=%d t2p=%g p2t=%g depth=%d\n", mDpi, mTwipsToPixels, mPixelsToTwips,mDepth);
|
||||
once = PR_FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
DeviceContextImpl::CommonInit();
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextBeOS::CreateRenderingContext(nsIRenderingContext *&aContext)
|
||||
{
|
||||
nsIRenderingContext *pContext;
|
||||
nsresult rv;
|
||||
nsDrawingSurfaceBeOS *surf;
|
||||
BView *w;
|
||||
|
||||
w = (BView*)mWidget;
|
||||
|
||||
// to call init for this, we need to have a valid nsDrawingSurfaceBeOS created
|
||||
pContext = new nsRenderingContextBeOS();
|
||||
|
||||
if (nsnull != pContext)
|
||||
{
|
||||
NS_ADDREF(pContext);
|
||||
|
||||
// create the nsDrawingSurfaceBeOS
|
||||
surf = new nsDrawingSurfaceBeOS();
|
||||
|
||||
if (surf && w)
|
||||
{
|
||||
|
||||
// init the nsDrawingSurfaceBeOS
|
||||
rv = surf->Init(w);
|
||||
|
||||
if (NS_OK == rv)
|
||||
// Init the nsRenderingContextBeOS
|
||||
rv = pContext->Init(this, surf);
|
||||
}
|
||||
else
|
||||
rv = NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
else
|
||||
rv = NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
if (NS_OK != rv)
|
||||
{
|
||||
NS_IF_RELEASE(pContext);
|
||||
}
|
||||
|
||||
aContext = pContext;
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextBeOS::SupportsNativeWidgets(PRBool &aSupportsWidgets)
|
||||
{
|
||||
//XXX it is very critical that this not lie!! MMP
|
||||
// read the comments in the mac code for this
|
||||
aSupportsWidgets = PR_TRUE;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextBeOS::GetScrollBarDimensions(float &aWidth, float &aHeight) const
|
||||
{
|
||||
aWidth = mScrollbarWidth * mPixelsToTwips;
|
||||
aHeight = mScrollbarHeight * mPixelsToTwips;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextBeOS::GetSystemFont(nsSystemFontID aID, nsFont *aFont) const
|
||||
{
|
||||
nsresult status = NS_OK;
|
||||
|
||||
switch (aID) {
|
||||
case eSystemFont_Caption: // css2
|
||||
case eSystemFont_Icon :
|
||||
case eSystemFont_Menu :
|
||||
case eSystemFont_MessageBox :
|
||||
case eSystemFont_SmallCaption :
|
||||
case eSystemFont_StatusBar :
|
||||
case eSystemFont_Window: // css3
|
||||
case eSystemFont_Document:
|
||||
case eSystemFont_Workspace:
|
||||
case eSystemFont_Desktop:
|
||||
case eSystemFont_Info:
|
||||
case eSystemFont_Dialog:
|
||||
case eSystemFont_Button:
|
||||
case eSystemFont_PullDownMenu:
|
||||
case eSystemFont_List:
|
||||
case eSystemFont_Field:
|
||||
case eSystemFont_Tooltips: // moz
|
||||
case eSystemFont_Widget:
|
||||
status = GetSystemFontInfo(be_plain_font, aID, aFont);
|
||||
break;
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextBeOS::GetDrawingSurface(nsIRenderingContext &aContext,
|
||||
nsDrawingSurface &aSurface)
|
||||
{
|
||||
aContext.CreateDrawingSurface(nsnull, 0, aSurface);
|
||||
return nsnull == aSurface ? NS_ERROR_OUT_OF_MEMORY : NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextBeOS::ConvertPixel(nscolor aColor,
|
||||
PRUint32 & aPixel)
|
||||
{
|
||||
// koehler@mythrium.com:
|
||||
// I think this fill the 32 bits pixel with the desired color
|
||||
// It's possible that the nscolor is not representing that color
|
||||
// if you just dump it inside a 32 bits value.
|
||||
aPixel = aColor;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextBeOS::CheckFontExistence(const nsString& aFontName)
|
||||
{
|
||||
return nsFontMetricsBeOS::FamilyExists(aFontName);
|
||||
}
|
||||
|
||||
/*
|
||||
NS_IMETHODIMP nsDeviceContextBeOS::CheckFontExistence(const nsString& aFontName)
|
||||
{
|
||||
PRBool isthere = PR_FALSE;
|
||||
|
||||
char* cStr = ToNewCString(aFontName);
|
||||
|
||||
int32 numFamilies = count_font_families();
|
||||
for(int32 i = 0; i < numFamilies; i++)
|
||||
{
|
||||
font_family family;
|
||||
uint32 flags;
|
||||
if(get_font_family(i, &family, &flags) == B_OK)
|
||||
{
|
||||
if(strcmp(family, cStr) == 0)
|
||||
{
|
||||
isthere = PR_TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//printf("%s there? %s\n", cStr, isthere?"Yes":"No" );
|
||||
|
||||
delete[] cStr;
|
||||
|
||||
if (PR_TRUE == isthere)
|
||||
return NS_OK;
|
||||
else
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
*/
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextBeOS::GetDeviceSurfaceDimensions(PRInt32 &aWidth, PRInt32 &aHeight)
|
||||
{
|
||||
if (mWidth == -1)
|
||||
mWidth = NSToIntRound(mWidthFloat * mDevUnitsToAppUnits);
|
||||
|
||||
if (mHeight == -1)
|
||||
mHeight = NSToIntRound(mHeightFloat * mDevUnitsToAppUnits);
|
||||
|
||||
aWidth = mWidth;
|
||||
aHeight = mHeight;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextBeOS::GetRect(nsRect &aRect)
|
||||
{
|
||||
PRInt32 width, height;
|
||||
nsresult rv;
|
||||
rv = GetDeviceSurfaceDimensions(width, height);
|
||||
aRect.x = 0;
|
||||
aRect.y = 0;
|
||||
aRect.width = width;
|
||||
aRect.height = height;
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextBeOS::GetClientRect(nsRect &aRect)
|
||||
{
|
||||
//XXX do we know if the client rect should ever differ from the screen rect?
|
||||
return GetRect ( aRect );
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextBeOS::GetDeviceContextFor(nsIDeviceContextSpec *aDevice,
|
||||
nsIDeviceContext *&aContext)
|
||||
{
|
||||
static NS_DEFINE_CID(kCDeviceContextPS, NS_DEVICECONTEXTPS_CID);
|
||||
|
||||
// Create a Postscript device context
|
||||
nsresult rv;
|
||||
nsIDeviceContextPS *dcps;
|
||||
|
||||
rv = nsComponentManager::CreateInstance(kCDeviceContextPS,
|
||||
nsnull,
|
||||
NS_GET_IID(nsIDeviceContextPS),
|
||||
(void **)&dcps);
|
||||
|
||||
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't create PS Device context");
|
||||
|
||||
dcps->SetSpec(aDevice);
|
||||
dcps->InitDeviceContextPS((nsIDeviceContext*)aContext,
|
||||
(nsIDeviceContext*)this);
|
||||
|
||||
rv = dcps->QueryInterface(NS_GET_IID(nsIDeviceContext),
|
||||
(void **)&aContext);
|
||||
|
||||
NS_RELEASE(dcps);
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextBeOS::BeginDocument(PRUnichar * aTitle)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextBeOS::EndDocument(void)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextBeOS::BeginPage(void)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextBeOS::EndPage(void)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextBeOS::GetDepth(PRUint32& aDepth)
|
||||
{
|
||||
aDepth = mDepth;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsDeviceContextBeOS::SetDPI(PRInt32 aDpi)
|
||||
{
|
||||
mDpi = aDpi;
|
||||
|
||||
int pt2t = 72;
|
||||
|
||||
// make p2t a nice round number - this prevents rounding problems
|
||||
mPixelsToTwips = float(NSToIntRound(float(NSIntPointsToTwips(pt2t)) / float(aDpi)));
|
||||
mTwipsToPixels = 1.0f / mPixelsToTwips;
|
||||
|
||||
// XXX need to reflow all documents
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
int nsDeviceContextBeOS::prefChanged(const char *aPref, void *aClosure)
|
||||
{
|
||||
nsDeviceContextBeOS *context = (nsDeviceContextBeOS*)aClosure;
|
||||
nsresult rv;
|
||||
|
||||
if (nsCRT::strcmp(aPref, "browser.display.screen_resolution")==0) {
|
||||
PRInt32 dpi;
|
||||
nsCOMPtr<nsIPref> prefs(do_GetService(kPrefCID, &rv));
|
||||
rv = prefs->GetIntPref(aPref, &dpi);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
context->SetDPI(dpi);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsDeviceContextBeOS::GetSystemFontInfo(const BFont *theFont, nsSystemFontID anID, nsFont* aFont) const
|
||||
{
|
||||
nsresult status = NS_OK;
|
||||
|
||||
aFont->style = NS_FONT_STYLE_NORMAL;
|
||||
aFont->weight = NS_FONT_WEIGHT_NORMAL;
|
||||
aFont->decorations = NS_FONT_DECORATION_NONE;
|
||||
|
||||
// do we have the default_font defined by BeOS, if not then
|
||||
// we error out.
|
||||
if( !theFont )
|
||||
theFont = be_plain_font; // BeOS default font
|
||||
|
||||
if( !theFont )
|
||||
{
|
||||
status = NS_ERROR_FAILURE;
|
||||
}
|
||||
else
|
||||
{
|
||||
font_family family;
|
||||
font_style style;
|
||||
font_height height;
|
||||
|
||||
theFont->GetFamilyAndStyle(&family, &style);
|
||||
aFont->name.AssignWithConversion( family );
|
||||
|
||||
// No weight
|
||||
|
||||
theFont->GetHeight(&height);
|
||||
aFont->size = NSIntPixelsToTwips(uint32(height.ascent+height.descent+height.leading), mPixelsToTwips);
|
||||
|
||||
// no style
|
||||
|
||||
// no decoration
|
||||
|
||||
status = NS_OK;
|
||||
}
|
||||
return (status);
|
||||
}
|
||||
112
mozilla/gfx/src/beos/nsDeviceContextBeOS.h
Normal file
112
mozilla/gfx/src/beos/nsDeviceContextBeOS.h
Normal file
@@ -0,0 +1,112 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsDeviceContextBeOS_h___
|
||||
#define nsDeviceContextBeOS_h___
|
||||
|
||||
#include "nsDeviceContext.h"
|
||||
#include "nsUnitConversion.h"
|
||||
#include "nsIWidget.h"
|
||||
#include "nsIView.h"
|
||||
#include "nsIRenderingContext.h"
|
||||
|
||||
#include "nsRenderingContextBeOS.h"
|
||||
|
||||
class nsDeviceContextBeOS : public DeviceContextImpl
|
||||
{
|
||||
public:
|
||||
nsDeviceContextBeOS();
|
||||
virtual ~nsDeviceContextBeOS();
|
||||
|
||||
NS_IMETHOD Init(nsNativeWidget aNativeWidget);
|
||||
|
||||
NS_IMETHOD CreateRenderingContext(nsIRenderingContext *&aContext);
|
||||
NS_IMETHOD CreateRenderingContext(nsIView *aView, nsIRenderingContext *&aContext) {return (DeviceContextImpl::CreateRenderingContext(aView,aContext));}
|
||||
NS_IMETHOD CreateRenderingContext(nsIWidget *aWidget, nsIRenderingContext *&aContext) {return (DeviceContextImpl::CreateRenderingContext(aWidget,aContext));}
|
||||
|
||||
NS_IMETHOD SupportsNativeWidgets(PRBool &aSupportsWidgets);
|
||||
|
||||
NS_IMETHOD GetScrollBarDimensions(float &aWidth, float &aHeight) const;
|
||||
NS_IMETHOD GetSystemFont(nsSystemFontID anID, nsFont *aFont) const;
|
||||
|
||||
//get a low level drawing surface for rendering. the rendering context
|
||||
//that is passed in is used to create the drawing surface if there isn't
|
||||
//already one in the device context. the drawing surface is then cached
|
||||
//in the device context for re-use.
|
||||
|
||||
NS_IMETHOD GetDrawingSurface(nsIRenderingContext &aContext, nsDrawingSurface &aSurface);
|
||||
|
||||
NS_IMETHOD ConvertPixel(nscolor aColor, PRUint32 & aPixel);
|
||||
NS_IMETHOD CheckFontExistence(const nsString& aFontName);
|
||||
|
||||
NS_IMETHOD GetDeviceSurfaceDimensions(PRInt32 &aWidth, PRInt32 &aHeight);
|
||||
NS_IMETHOD GetClientRect(nsRect &aRect);
|
||||
NS_IMETHOD GetRect(nsRect &aRect);
|
||||
|
||||
NS_IMETHOD GetDeviceContextFor(nsIDeviceContextSpec *aDevice,
|
||||
nsIDeviceContext *&aContext);
|
||||
|
||||
NS_IMETHOD BeginDocument(PRUnichar * aTitle);
|
||||
NS_IMETHOD EndDocument(void);
|
||||
|
||||
NS_IMETHOD BeginPage(void);
|
||||
NS_IMETHOD EndPage(void);
|
||||
|
||||
NS_IMETHOD GetDepth(PRUint32& aDepth);
|
||||
|
||||
static int prefChanged(const char *aPref, void *aClosure);
|
||||
nsresult SetDPI(PRInt32 dpi);
|
||||
|
||||
private:
|
||||
PRUint32 mDepth;
|
||||
PRBool mWriteable;
|
||||
PRUint32 mNumCells;
|
||||
PRInt16 mScrollbarHeight;
|
||||
PRInt16 mScrollbarWidth;
|
||||
static nscoord mDpi;
|
||||
|
||||
float mWidthFloat;
|
||||
float mHeightFloat;
|
||||
PRInt32 mWidth;
|
||||
PRInt32 mHeight;
|
||||
|
||||
nsresult GetSystemFontInfo(const BFont *font, nsSystemFontID anID, nsFont* aFont) const;
|
||||
};
|
||||
|
||||
#endif /* nsDeviceContextBeOS_h___ */
|
||||
|
||||
629
mozilla/gfx/src/beos/nsDeviceContextSpecB.cpp
Normal file
629
mozilla/gfx/src/beos/nsDeviceContextSpecB.cpp
Normal file
@@ -0,0 +1,629 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Roland Mainz <roland.mainz@informatik.med.uni-giessen.de>
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsDeviceContextSpecB.h"
|
||||
|
||||
#include "nsIPref.h"
|
||||
#include "prenv.h" /* for PR_GetEnv */
|
||||
|
||||
#include "nsIDOMWindow.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIDialogParamBlock.h"
|
||||
#include "nsISupportsPrimitives.h"
|
||||
#include "nsIWindowWatcher.h"
|
||||
#include "nsIDOMWindowInternal.h"
|
||||
|
||||
#include "nsReadableUtils.h"
|
||||
#include "nsISupportsArray.h"
|
||||
|
||||
//#include "prmem.h"
|
||||
//#include "plstr.h"
|
||||
|
||||
//----------------------------------------------------------------------------------
|
||||
// The printer data is shared between the PrinterEnumerator and the nsDeviceContextSpecG
|
||||
// The PrinterEnumerator creates the printer info
|
||||
// but the nsDeviceContextSpecG cleans it up
|
||||
// If it gets created (via the Page Setup Dialog) but the user never prints anything
|
||||
// then it will never be delete, so this class takes care of that.
|
||||
class GlobalPrinters {
|
||||
public:
|
||||
static GlobalPrinters* GetInstance() { return &mGlobalPrinters; }
|
||||
~GlobalPrinters() { FreeGlobalPrinters(); }
|
||||
|
||||
void FreeGlobalPrinters();
|
||||
nsresult InitializeGlobalPrinters();
|
||||
|
||||
PRBool PrintersAreAllocated() { return mGlobalPrinterList != nsnull; }
|
||||
PRInt32 GetNumPrinters() { return mGlobalNumPrinters; }
|
||||
nsString* GetStringAt(PRInt32 aInx) { return mGlobalPrinterList->StringAt(aInx); }
|
||||
|
||||
protected:
|
||||
GlobalPrinters() {}
|
||||
|
||||
static GlobalPrinters mGlobalPrinters;
|
||||
static nsStringArray* mGlobalPrinterList;
|
||||
static int mGlobalNumPrinters;
|
||||
|
||||
};
|
||||
//---------------
|
||||
// static members
|
||||
GlobalPrinters GlobalPrinters::mGlobalPrinters;
|
||||
nsStringArray* GlobalPrinters::mGlobalPrinterList = nsnull;
|
||||
int GlobalPrinters::mGlobalNumPrinters = 0;
|
||||
|
||||
/** -------------------------------------------------------
|
||||
* Construct the nsDeviceContextSpecBeOS
|
||||
* @update dc 12/02/98
|
||||
*/
|
||||
nsDeviceContextSpecBeOS :: nsDeviceContextSpecBeOS()
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
}
|
||||
|
||||
/** -------------------------------------------------------
|
||||
* Destroy the nsDeviceContextSpecBeOS
|
||||
* @update dc 2/15/98
|
||||
*/
|
||||
nsDeviceContextSpecBeOS :: ~nsDeviceContextSpecBeOS()
|
||||
{
|
||||
}
|
||||
|
||||
static NS_DEFINE_IID(kIDeviceContextSpecIID, NS_IDEVICE_CONTEXT_SPEC_IID);
|
||||
static NS_DEFINE_IID(kIDeviceContextSpecPSIID, NS_IDEVICE_CONTEXT_SPEC_PS_IID);
|
||||
|
||||
#if 0
|
||||
NS_IMPL_ISUPPORTS1(nsDeviceContextSpecBeOS, nsIDeviceContextSpec)
|
||||
#endif
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextSpecBeOS :: QueryInterface(REFNSIID aIID, void** aInstancePtr)
|
||||
{
|
||||
if (nsnull == aInstancePtr)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
||||
if (aIID.Equals(kIDeviceContextSpecIID))
|
||||
{
|
||||
nsIDeviceContextSpec* tmp = this;
|
||||
*aInstancePtr = (void*) tmp;
|
||||
NS_ADDREF_THIS();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
if (aIID.Equals(kIDeviceContextSpecPSIID))
|
||||
{
|
||||
nsIDeviceContextSpecPS* tmp = this;
|
||||
*aInstancePtr = (void*) tmp;
|
||||
NS_ADDREF_THIS();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
|
||||
|
||||
if (aIID.Equals(kISupportsIID))
|
||||
{
|
||||
nsIDeviceContextSpec* tmp = this;
|
||||
nsISupports* tmp2 = tmp;
|
||||
*aInstancePtr = (void*) tmp2;
|
||||
NS_ADDREF_THIS();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
return NS_NOINTERFACE;
|
||||
}
|
||||
|
||||
NS_IMPL_ADDREF(nsDeviceContextSpecBeOS)
|
||||
NS_IMPL_RELEASE(nsDeviceContextSpecBeOS)
|
||||
|
||||
|
||||
/** -------------------------------------------------------
|
||||
*/
|
||||
static nsresult DisplayXPDialog(nsIPrintSettings* aPS,
|
||||
const char* aChromeURL,
|
||||
PRBool& aClickedOK)
|
||||
{
|
||||
NS_ASSERTION(aPS, "Must have a print settings!");
|
||||
|
||||
aClickedOK = PR_FALSE;
|
||||
nsresult rv = NS_ERROR_FAILURE;
|
||||
|
||||
// create a nsISupportsArray of the parameters
|
||||
// being passed to the window
|
||||
nsCOMPtr<nsISupportsArray> array;
|
||||
NS_NewISupportsArray(getter_AddRefs(array));
|
||||
if (!array) return NS_ERROR_FAILURE;
|
||||
|
||||
nsCOMPtr<nsIPrintSettings> ps = aPS;
|
||||
nsCOMPtr<nsISupports> psSupports(do_QueryInterface(ps));
|
||||
NS_ASSERTION(psSupports, "PrintSettings must be a supports");
|
||||
array->AppendElement(psSupports);
|
||||
|
||||
nsCOMPtr<nsIDialogParamBlock> ioParamBlock(do_CreateInstance("@mozilla.org/embedcomp/dialogparam;1"));
|
||||
if (ioParamBlock) {
|
||||
ioParamBlock->SetInt(0, 0);
|
||||
nsCOMPtr<nsISupports> blkSupps(do_QueryInterface(ioParamBlock));
|
||||
NS_ASSERTION(blkSupps, "IOBlk must be a supports");
|
||||
|
||||
array->AppendElement(blkSupps);
|
||||
nsCOMPtr<nsISupports> arguments(do_QueryInterface(array));
|
||||
NS_ASSERTION(array, "array must be a supports");
|
||||
|
||||
nsCOMPtr<nsIWindowWatcher> wwatch(do_GetService("@mozilla.org/embedcomp/window-watcher;1"));
|
||||
if (wwatch) {
|
||||
nsCOMPtr<nsIDOMWindow> active;
|
||||
wwatch->GetActiveWindow(getter_AddRefs(active));
|
||||
nsCOMPtr<nsIDOMWindowInternal> parent = do_QueryInterface(active);
|
||||
|
||||
nsCOMPtr<nsIDOMWindow> newWindow;
|
||||
rv = wwatch->OpenWindow(parent, aChromeURL,
|
||||
"_blank", "chrome,modal,centerscreen", array,
|
||||
getter_AddRefs(newWindow));
|
||||
}
|
||||
}
|
||||
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
PRInt32 buttonPressed = 0;
|
||||
ioParamBlock->GetInt(0, &buttonPressed);
|
||||
if (buttonPressed == 1) {
|
||||
aClickedOK = PR_TRUE;
|
||||
} else {
|
||||
rv = NS_ERROR_ABORT;
|
||||
}
|
||||
} else {
|
||||
rv = NS_ERROR_ABORT;
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
/** -------------------------------------------------------
|
||||
* Initialize the nsDeviceContextSpecBeOS
|
||||
* @update dc 2/15/98
|
||||
* @update syd 3/2/99
|
||||
*/
|
||||
NS_IMETHODIMP nsDeviceContextSpecBeOS::Init(nsIPrintSettings* aPS, PRBool aQuiet)
|
||||
{
|
||||
nsresult rv = NS_ERROR_FAILURE;
|
||||
NS_ASSERTION(nsnull != aPS, "No print settings.");
|
||||
|
||||
// if there is a current selection then enable the "Selection" radio button
|
||||
if (aPS != nsnull) {
|
||||
PRBool isOn;
|
||||
aPS->GetPrintOptions(nsIPrintSettings::kEnableSelectionRB, &isOn);
|
||||
nsCOMPtr<nsIPref> pPrefs = do_GetService(NS_PREF_CONTRACTID, &rv);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
(void) pPrefs->SetBoolPref("print.selection_radio_enabled", isOn);
|
||||
}
|
||||
}
|
||||
|
||||
char *path;
|
||||
PRBool canPrint = PR_FALSE;
|
||||
PRBool reversed = PR_FALSE;
|
||||
PRBool color = PR_FALSE;
|
||||
PRBool tofile = PR_FALSE;
|
||||
PRInt16 printRange = nsIPrintSettings::kRangeAllPages;
|
||||
PRInt32 paper_size = NS_LETTER_SIZE;
|
||||
PRInt32 orientation = NS_PORTRAIT;
|
||||
PRInt32 fromPage = 1;
|
||||
PRInt32 toPage = 1;
|
||||
PRUnichar *command = nsnull;
|
||||
PRInt32 copies = 1;
|
||||
PRUnichar *printer = nsnull;
|
||||
PRUnichar *printfile = nsnull;
|
||||
double dleft = 0.5;
|
||||
double dright = 0.5;
|
||||
double dtop = 0.5;
|
||||
double dbottom = 0.5;
|
||||
|
||||
rv = GlobalPrinters::GetInstance()->InitializeGlobalPrinters();
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
if (!aQuiet ) {
|
||||
rv = DisplayXPDialog(aPS,
|
||||
"chrome://global/content/printdialog.xul", canPrint);
|
||||
}
|
||||
else {
|
||||
canPrint = PR_TRUE;
|
||||
}
|
||||
|
||||
GlobalPrinters::GetInstance()->FreeGlobalPrinters();
|
||||
|
||||
if (canPrint) {
|
||||
if (aPS != nsnull) {
|
||||
aPS->GetPrinterName(&printer);
|
||||
aPS->GetPrintReversed(&reversed);
|
||||
aPS->GetPrintInColor(&color);
|
||||
aPS->GetPaperSize(&paper_size);
|
||||
aPS->GetOrientation(&orientation);
|
||||
aPS->GetPrintCommand(&command);
|
||||
aPS->GetPrintRange(&printRange);
|
||||
aPS->GetToFileName(&printfile);
|
||||
aPS->GetPrintToFile(&tofile);
|
||||
aPS->GetStartPageRange(&fromPage);
|
||||
aPS->GetEndPageRange(&toPage);
|
||||
aPS->GetNumCopies(&copies);
|
||||
aPS->GetMarginTop(&dtop);
|
||||
aPS->GetMarginLeft(&dleft);
|
||||
aPS->GetMarginBottom(&dbottom);
|
||||
aPS->GetMarginRight(&dright);
|
||||
|
||||
if (command != nsnull && printfile != nsnull) {
|
||||
// ToDo: Use LocalEncoding instead of UTF-8 (see bug 73446)
|
||||
strcpy(mPrData.command, NS_ConvertUCS2toUTF8(command).get());
|
||||
strcpy(mPrData.path, NS_ConvertUCS2toUTF8(printfile).get());
|
||||
}
|
||||
if (printer != nsnull)
|
||||
strcpy(mPrData.printer, NS_ConvertUCS2toUTF8(printer).get());
|
||||
#ifdef DEBUG_rods
|
||||
printf("margins: %5.2f,%5.2f,%5.2f,%5.2f\n", dtop, dleft, dbottom, dright);
|
||||
printf("printRange %d\n", printRange);
|
||||
printf("fromPage %d\n", fromPage);
|
||||
printf("toPage %d\n", toPage);
|
||||
#endif /* DEBUG_rods */
|
||||
} else {
|
||||
#ifdef VMS
|
||||
// Note to whoever puts the "lpr" into the prefs file. Please contact me
|
||||
// as I need to make the default be "print" instead of "lpr" for OpenVMS.
|
||||
strcpy(mPrData.command, "print");
|
||||
#else
|
||||
strcpy(mPrData.command, "lpr ${MOZ_PRINTER_NAME:+'-P'}${MOZ_PRINTER_NAME}");
|
||||
#endif /* VMS */
|
||||
}
|
||||
|
||||
mPrData.top = dtop;
|
||||
mPrData.bottom = dbottom;
|
||||
mPrData.left = dleft;
|
||||
mPrData.right = dright;
|
||||
mPrData.fpf = !reversed;
|
||||
mPrData.grayscale = !color;
|
||||
mPrData.size = paper_size;
|
||||
mPrData.orientation = orientation;
|
||||
mPrData.toPrinter = !tofile;
|
||||
mPrData.copies = copies;
|
||||
|
||||
// PWD, HOME, or fail
|
||||
|
||||
if (!printfile) {
|
||||
if ( ( path = PR_GetEnv( "PWD" ) ) == (char *) nsnull )
|
||||
if ( ( path = PR_GetEnv( "HOME" ) ) == (char *) nsnull )
|
||||
strcpy(mPrData.path, "mozilla.ps");
|
||||
|
||||
if ( path != (char *) nsnull )
|
||||
sprintf(mPrData.path, "%s/mozilla.ps", path);
|
||||
else
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
#ifdef NOT_IMPLEMENTED_YET
|
||||
if (mGlobalNumPrinters) {
|
||||
for(int i = 0; (i < mGlobalNumPrinters) && !mQueue; i++) {
|
||||
if (!(mGlobalPrinterList->StringAt(i)->CompareWithConversion(mPrData.printer, TRUE, -1)))
|
||||
mQueue = PrnDlg.SetPrinterQueue(i);
|
||||
}
|
||||
}
|
||||
#endif /* NOT_IMPLEMENTED_YET */
|
||||
|
||||
if (command != nsnull) {
|
||||
nsMemory::Free(command);
|
||||
}
|
||||
if (printfile != nsnull) {
|
||||
nsMemory::Free(printfile);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextSpecBeOS :: GetToPrinter( PRBool &aToPrinter )
|
||||
{
|
||||
aToPrinter = mPrData.toPrinter;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextSpecBeOS::GetPrinterName ( char **aPrinter )
|
||||
{
|
||||
*aPrinter = &mPrData.printer[0];
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextSpecBeOS::GetCopies ( int &aCopies )
|
||||
{
|
||||
aCopies = mPrData.copies;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextSpecBeOS :: GetFirstPageFirst ( PRBool &aFpf )
|
||||
{
|
||||
aFpf = mPrData.fpf;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextSpecBeOS :: GetGrayscale ( PRBool &aGrayscale )
|
||||
{
|
||||
aGrayscale = mPrData.grayscale;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextSpecBeOS :: GetSize ( int &aSize )
|
||||
{
|
||||
aSize = mPrData.size;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextSpecBeOS :: GetPageDimensions ( float &aWidth, float &aHeight )
|
||||
{
|
||||
if ( mPrData.size == NS_LETTER_SIZE ) {
|
||||
aWidth = 8.5;
|
||||
aHeight = 11.0;
|
||||
} else if ( mPrData.size == NS_LEGAL_SIZE ) {
|
||||
aWidth = 8.5;
|
||||
aHeight = 14.0;
|
||||
} else if ( mPrData.size == NS_EXECUTIVE_SIZE ) {
|
||||
aWidth = 7.5;
|
||||
aHeight = 10.0;
|
||||
} else if ( mPrData.size == NS_A4_SIZE ) {
|
||||
// 210mm X 297mm == 8.27in X 11.69in
|
||||
aWidth = 8.27;
|
||||
aHeight = 11.69;
|
||||
} else if ( mPrData.size == NS_A3_SIZE ) {
|
||||
// 297mm X 420mm == 11.69in X 16.53in
|
||||
aWidth = 11.69;
|
||||
aHeight = 16.53;
|
||||
}
|
||||
|
||||
if (mPrData.orientation == NS_LANDSCAPE) {
|
||||
float temp;
|
||||
temp = aWidth;
|
||||
aWidth = aHeight;
|
||||
aHeight = temp;
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextSpecBeOS :: GetLandscape ( PRBool &landscape )
|
||||
{
|
||||
landscape = (mPrData.orientation == NS_LANDSCAPE);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextSpecBeOS :: GetTopMargin ( float &value )
|
||||
{
|
||||
value = mPrData.top;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextSpecBeOS :: GetBottomMargin ( float &value )
|
||||
{
|
||||
value = mPrData.bottom;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextSpecBeOS :: GetRightMargin ( float &value )
|
||||
{
|
||||
value = mPrData.right;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextSpecBeOS :: GetLeftMargin ( float &value )
|
||||
{
|
||||
value = mPrData.left;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextSpecBeOS :: GetCommand ( char **aCommand )
|
||||
{
|
||||
*aCommand = &mPrData.command[0];
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextSpecBeOS :: GetPath ( char **aPath )
|
||||
{
|
||||
*aPath = &mPrData.path[0];
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextSpecBeOS :: GetUserCancelled( PRBool &aCancel )
|
||||
{
|
||||
aCancel = mPrData.cancel;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/** -------------------------------------------------------
|
||||
* Closes the printmanager if it is open.
|
||||
* @update dc 2/15/98
|
||||
*/
|
||||
NS_IMETHODIMP nsDeviceContextSpecBeOS :: ClosePrintManager()
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Printer Enumerator
|
||||
nsPrinterEnumeratorBeOS::nsPrinterEnumeratorBeOS()
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS1(nsPrinterEnumeratorBeOS, nsIPrinterEnumerator)
|
||||
|
||||
NS_IMETHODIMP nsPrinterEnumeratorBeOS::EnumeratePrinters(PRUint32* aCount, PRUnichar*** aResult)
|
||||
{
|
||||
NS_ENSURE_ARG(aCount);
|
||||
NS_ENSURE_ARG_POINTER(aResult);
|
||||
|
||||
if (aCount)
|
||||
*aCount = 0;
|
||||
else
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
||||
if (aResult)
|
||||
*aResult = nsnull;
|
||||
else
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
||||
nsresult rv = GlobalPrinters::GetInstance()->InitializeGlobalPrinters();
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
PRInt32 numPrinters = GlobalPrinters::GetInstance()->GetNumPrinters();
|
||||
|
||||
PRUnichar** array = (PRUnichar**) nsMemory::Alloc(numPrinters * sizeof(PRUnichar*));
|
||||
if (!array && numPrinters > 0) {
|
||||
GlobalPrinters::GetInstance()->FreeGlobalPrinters();
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
int count = 0;
|
||||
while( count < numPrinters )
|
||||
{
|
||||
|
||||
PRUnichar *str = ToNewUnicode(*GlobalPrinters::GetInstance()->GetStringAt(count));
|
||||
|
||||
if (!str) {
|
||||
for (int i = count - 1; i >= 0; i--)
|
||||
nsMemory::Free(array[i]);
|
||||
|
||||
nsMemory::Free(array);
|
||||
|
||||
GlobalPrinters::GetInstance()->FreeGlobalPrinters();
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
array[count++] = str;
|
||||
|
||||
}
|
||||
*aCount = count;
|
||||
*aResult = array;
|
||||
GlobalPrinters::GetInstance()->FreeGlobalPrinters();
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsPrinterEnumeratorBeOS::DisplayPropertiesDlg(const PRUnichar *aPrinter, nsIPrintSettings *aPrintSettings)
|
||||
{
|
||||
/* fixme: We simply ignore the |aPrinter| argument here
|
||||
* We should get the supported printer attributes from the printer and
|
||||
* populate the print job options dialog with these data instead of using
|
||||
* the "default set" here.
|
||||
* However, this requires changes on all platforms and is another big chunk
|
||||
* of patches ... ;-(
|
||||
*/
|
||||
|
||||
PRBool pressedOK;
|
||||
return DisplayXPDialog(aPrintSettings,
|
||||
"chrome://global/content/printjoboptions.xul",
|
||||
pressedOK);
|
||||
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
nsresult GlobalPrinters::InitializeGlobalPrinters ()
|
||||
{
|
||||
if (PrintersAreAllocated()) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
mGlobalNumPrinters = 0;
|
||||
mGlobalPrinterList = new nsStringArray();
|
||||
if (!mGlobalPrinterList)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
/* add an entry for the default printer (see nsPostScriptObj.cpp) */
|
||||
mGlobalPrinterList->AppendString(
|
||||
nsString(NS_ConvertASCIItoUCS2(NS_POSTSCRIPT_DRIVER_NAME "default")));
|
||||
mGlobalNumPrinters++;
|
||||
|
||||
/* get the list of printers */
|
||||
char *printerList = nsnull;
|
||||
|
||||
/* the env var MOZILLA_PRINTER_LIST can "override" the prefs */
|
||||
printerList = PR_GetEnv("MOZILLA_PRINTER_LIST");
|
||||
|
||||
if (!printerList) {
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIPref> pPrefs = do_GetService(NS_PREF_CONTRACTID, &rv);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
(void) pPrefs->CopyCharPref("print.printer_list", &printerList);
|
||||
}
|
||||
}
|
||||
|
||||
if (printerList) {
|
||||
char *tok_lasts;
|
||||
char *name;
|
||||
|
||||
/* PL_strtok_r() will modify the string - copy it! */
|
||||
printerList = strdup(printerList);
|
||||
if (!printerList)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
for( name = PL_strtok_r(printerList, " ", &tok_lasts) ;
|
||||
name != nsnull ;
|
||||
name = PL_strtok_r(nsnull, " ", &tok_lasts) )
|
||||
{
|
||||
mGlobalPrinterList->AppendString(
|
||||
nsString(NS_ConvertASCIItoUCS2(NS_POSTSCRIPT_DRIVER_NAME)) +
|
||||
nsString(NS_ConvertASCIItoUCS2(name)));
|
||||
mGlobalNumPrinters++;
|
||||
}
|
||||
|
||||
free(printerList);
|
||||
}
|
||||
|
||||
if (mGlobalNumPrinters == 0)
|
||||
return NS_ERROR_GFX_PRINTER_NO_PRINTER_AVAILABLE;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
void GlobalPrinters::FreeGlobalPrinters()
|
||||
{
|
||||
delete mGlobalPrinterList;
|
||||
mGlobalPrinterList = nsnull;
|
||||
mGlobalNumPrinters = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
143
mozilla/gfx/src/beos/nsDeviceContextSpecB.h
Normal file
143
mozilla/gfx/src/beos/nsDeviceContextSpecB.h
Normal file
@@ -0,0 +1,143 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Roland Mainz <roland.mainz@informatik.med.uni-giessen.de>
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsDeviceContextSpecB_h___
|
||||
#define nsDeviceContextSpecB_h___
|
||||
|
||||
#include "nsIDeviceContextSpec.h"
|
||||
#include "nsDeviceContextSpecB.h"
|
||||
#include "nsVoidArray.h"
|
||||
#include "nsIDeviceContextSpecPS.h"
|
||||
#include "nsIPrintSettings.h"
|
||||
#include "nsIPrintOptions.h"
|
||||
|
||||
#include "nsPrintdBeOS.h"
|
||||
|
||||
class nsDeviceContextSpecBeOS : public nsIDeviceContextSpec ,
|
||||
public nsIDeviceContextSpecPS
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* Construct a nsDeviceContextSpecMac, which is an object which contains and manages a mac printrecord
|
||||
* @update dc 12/02/98
|
||||
*/
|
||||
nsDeviceContextSpecBeOS();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
/**
|
||||
* Initialize the nsDeviceContextSpecBeOS for use. This will allocate a printrecord for use
|
||||
* @update dc 2/16/98
|
||||
* @param aQuiet if PR_TRUE, prevent the need for user intervention
|
||||
* in obtaining device context spec. if nsnull is passed in for
|
||||
* the aOldSpec, this will typically result in getting a device
|
||||
* context spec for the default output device (i.e. default
|
||||
* printer).
|
||||
* @return error status
|
||||
*/
|
||||
NS_IMETHOD Init(nsIPrintSettings* aPS, PRBool aQuiet);
|
||||
|
||||
|
||||
/**
|
||||
* Closes the printmanager if it is open.
|
||||
* @update dc 2/13/98
|
||||
* @return error status
|
||||
*/
|
||||
NS_IMETHOD ClosePrintManager();
|
||||
|
||||
NS_IMETHOD GetToPrinter( PRBool &aToPrinter );
|
||||
|
||||
NS_IMETHOD GetPrinterName ( char **aPrinter );
|
||||
|
||||
NS_IMETHOD GetCopies ( int &aCopies );
|
||||
|
||||
NS_IMETHOD GetFirstPageFirst ( PRBool &aFpf );
|
||||
|
||||
NS_IMETHOD GetGrayscale( PRBool &aGrayscale );
|
||||
|
||||
NS_IMETHOD GetSize ( int &aSize );
|
||||
|
||||
NS_IMETHOD GetTopMargin ( float &value );
|
||||
|
||||
NS_IMETHOD GetBottomMargin ( float &value );
|
||||
|
||||
NS_IMETHOD GetLeftMargin ( float &value );
|
||||
|
||||
NS_IMETHOD GetRightMargin ( float &value );
|
||||
|
||||
NS_IMETHOD GetCommand ( char **aCommand );
|
||||
|
||||
NS_IMETHOD GetPath ( char **aPath );
|
||||
|
||||
NS_IMETHOD GetPageDimensions (float &aWidth, float &aHeight );
|
||||
|
||||
NS_IMETHOD GetLandscape (PRBool &aLandscape);
|
||||
|
||||
NS_IMETHOD GetUserCancelled( PRBool &aCancel );
|
||||
|
||||
/**
|
||||
* Destuct a nsDeviceContextSpecMac, this will release the printrecord
|
||||
* @update dc 2/16/98
|
||||
*/
|
||||
protected:
|
||||
virtual ~nsDeviceContextSpecBeOS();
|
||||
|
||||
public:
|
||||
int InitializeGlobalPrinters();
|
||||
void FreeGlobalPrinters();
|
||||
|
||||
protected:
|
||||
BeOSPrData mPrData;
|
||||
|
||||
};
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// Printer Enumerator
|
||||
//-------------------------------------------------------------------------
|
||||
class nsPrinterEnumeratorBeOS : public nsIPrinterEnumerator
|
||||
{
|
||||
public:
|
||||
nsPrinterEnumeratorBeOS();
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIPRINTERENUMERATOR
|
||||
|
||||
protected:
|
||||
};
|
||||
|
||||
#endif
|
||||
100
mozilla/gfx/src/beos/nsDeviceContextSpecFactoryB.cpp
Normal file
100
mozilla/gfx/src/beos/nsDeviceContextSpecFactoryB.cpp
Normal file
@@ -0,0 +1,100 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1999
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Roland Mainz <roland.mainz@informatik.med.uni-giessen.de>
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsDeviceContextSpecFactoryB.h"
|
||||
#include "nsDeviceContextSpecB.h"
|
||||
#include "nsGfxCIID.h"
|
||||
#include "plstr.h"
|
||||
|
||||
/** -------------------------------------------------------
|
||||
* Constructor
|
||||
* @update dc 2/16/98
|
||||
*/
|
||||
nsDeviceContextSpecFactoryBeOS :: nsDeviceContextSpecFactoryBeOS()
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
}
|
||||
|
||||
/** -------------------------------------------------------
|
||||
* Destructor
|
||||
* @update dc 2/16/98
|
||||
*/
|
||||
nsDeviceContextSpecFactoryBeOS :: ~nsDeviceContextSpecFactoryBeOS()
|
||||
{
|
||||
}
|
||||
|
||||
static NS_DEFINE_IID(kIDeviceContextSpecIID, NS_IDEVICE_CONTEXT_SPEC_IID);
|
||||
static NS_DEFINE_CID(kDeviceContextSpecCID, NS_DEVICE_CONTEXT_SPEC_CID);
|
||||
|
||||
NS_IMPL_ISUPPORTS1(nsDeviceContextSpecFactoryBeOS, nsIDeviceContextSpecFactory)
|
||||
|
||||
/** -------------------------------------------------------
|
||||
* Initialize the device context spec factory
|
||||
* @update dc 2/16/98
|
||||
*/
|
||||
NS_IMETHODIMP nsDeviceContextSpecFactoryBeOS :: Init(void)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/** -------------------------------------------------------
|
||||
* Get a device context specification
|
||||
* @update dc 2/16/98
|
||||
*/
|
||||
NS_IMETHODIMP nsDeviceContextSpecFactoryBeOS :: CreateDeviceContextSpec(nsIWidget *aWidget,
|
||||
nsIPrintSettings* aPrintSettings,
|
||||
nsIDeviceContextSpec *&aNewSpec,
|
||||
PRBool aQuiet)
|
||||
{
|
||||
nsresult rv;
|
||||
static NS_DEFINE_CID(kDeviceContextSpecCID, NS_DEVICE_CONTEXT_SPEC_CID);
|
||||
nsCOMPtr<nsIDeviceContextSpec> devSpec = do_CreateInstance(kDeviceContextSpecCID, &rv);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
{
|
||||
rv = ((nsDeviceContextSpecBeOS *)devSpec.get())->Init(aPrintSettings, aQuiet);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
{
|
||||
aNewSpec = devSpec;
|
||||
NS_ADDREF(aNewSpec);
|
||||
}
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
62
mozilla/gfx/src/beos/nsDeviceContextSpecFactoryB.h
Normal file
62
mozilla/gfx/src/beos/nsDeviceContextSpecFactoryB.h
Normal file
@@ -0,0 +1,62 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1999
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsDeviceContextSpecFactoryB_h___
|
||||
#define nsDeviceContextSpecFactoryB_h___
|
||||
|
||||
#include "nsIDeviceContextSpecFactory.h"
|
||||
#include "nsIDeviceContextSpec.h"
|
||||
|
||||
class nsDeviceContextSpecFactoryBeOS : public nsIDeviceContextSpecFactory
|
||||
{
|
||||
public:
|
||||
nsDeviceContextSpecFactoryBeOS();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_IMETHOD Init(void);
|
||||
NS_IMETHOD CreateDeviceContextSpec(nsIWidget *aWidget,
|
||||
nsIPrintSettings* aPrintSettings,
|
||||
nsIDeviceContextSpec *&aNewSpec,
|
||||
PRBool aQuiet);
|
||||
|
||||
protected:
|
||||
virtual ~nsDeviceContextSpecFactoryBeOS();
|
||||
};
|
||||
|
||||
#endif
|
||||
277
mozilla/gfx/src/beos/nsDrawingSurfaceBeOS.cpp
Normal file
277
mozilla/gfx/src/beos/nsDrawingSurfaceBeOS.cpp
Normal file
@@ -0,0 +1,277 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsDrawingSurfaceBeOS.h"
|
||||
#include "nsCoord.h"
|
||||
|
||||
NS_IMPL_ISUPPORTS2(nsDrawingSurfaceBeOS, nsIDrawingSurface, nsIDrawingSurfaceBeOS)
|
||||
|
||||
#ifdef CHEAP_PERFORMANCE_MEASUREMENT
|
||||
static PRTime mLockTime, mUnlockTime;
|
||||
#endif
|
||||
|
||||
nsDrawingSurfaceBeOS :: nsDrawingSurfaceBeOS()
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
mView = NULL;
|
||||
|
||||
mBitmap = nsnull;
|
||||
mWidth = 0;
|
||||
mHeight = 0;
|
||||
|
||||
mLockWidth = 0;
|
||||
mLockHeight = 0;
|
||||
mLockFlags = 0;
|
||||
mLockX = 0;
|
||||
mLockY = 0;
|
||||
mLocked = PR_FALSE;
|
||||
}
|
||||
|
||||
nsDrawingSurfaceBeOS :: ~nsDrawingSurfaceBeOS()
|
||||
{
|
||||
if(mBitmap)
|
||||
{
|
||||
mBitmap->RemoveChild(mView);
|
||||
delete mBitmap;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Lock a rect of a drawing surface and return a
|
||||
* pointer to the upper left hand corner of the
|
||||
* bitmap.
|
||||
* @param aX x position of subrect of bitmap
|
||||
* @param aY y position of subrect of bitmap
|
||||
* @param aWidth width of subrect of bitmap
|
||||
* @param aHeight height of subrect of bitmap
|
||||
* @param aBits out parameter for upper left hand
|
||||
* corner of bitmap
|
||||
* @param aStride out parameter for number of bytes
|
||||
* to add to aBits to go from scanline to scanline
|
||||
* @param aWidthBytes out parameter for number of
|
||||
* bytes per line in aBits to process aWidth pixels
|
||||
* @return error status
|
||||
*
|
||||
**/
|
||||
NS_IMETHODIMP nsDrawingSurfaceBeOS :: Lock(PRInt32 aX, PRInt32 aY,
|
||||
PRUint32 aWidth, PRUint32 aHeight,
|
||||
void **aBits, PRInt32 *aStride,
|
||||
PRInt32 *aWidthBytes, PRUint32 aFlags)
|
||||
{
|
||||
#ifdef CHEAP_PERFORMANCE_MEASUREMENT
|
||||
mLockTime = PR_Now();
|
||||
// MOZ_TIMER_RESET(mLockTime);
|
||||
// MOZ_TIMER_START(mLockTime);
|
||||
#endif
|
||||
|
||||
if (mLocked)
|
||||
{
|
||||
NS_ASSERTION(0, "nested lock attempt");
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
mLocked = PR_TRUE;
|
||||
|
||||
mLockX = aX;
|
||||
mLockY = aY;
|
||||
mLockWidth = aWidth;
|
||||
mLockHeight = aHeight;
|
||||
mLockFlags = aFlags;
|
||||
|
||||
// Obtain an ximage from the pixmap. ( I think this copy the bitmap )
|
||||
// FIX ME !!!! We need to copy the part locked into the mImage
|
||||
mView->LockLooper();
|
||||
|
||||
#ifdef CHEAP_PERFORMANCE_MEASUREMENT
|
||||
// MOZ_TIMER_STOP(mLockTime);
|
||||
// MOZ_TIMER_LOG(("Time taken to lock: "));
|
||||
// MOZ_TIMER_PRINT(mLockTime);
|
||||
printf("Time taken to lock: %d\n", PR_Now() - mLockTime);
|
||||
#endif
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDrawingSurfaceBeOS :: Unlock(void)
|
||||
{
|
||||
|
||||
#ifdef CHEAP_PERFORMANCE_MEASUREMENT
|
||||
mUnlockTime = PR_Now();
|
||||
#endif
|
||||
|
||||
// g_print("nsDrawingSurfaceGTK::UnLock() called\n");
|
||||
if (!mLocked)
|
||||
{
|
||||
NS_ASSERTION(0, "attempting to unlock an DS that isn't locked");
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
// If the lock was not read only, put the bits back on the pixmap
|
||||
if (!(mLockFlags & NS_LOCK_SURFACE_READ_ONLY))
|
||||
{
|
||||
// FIX ME!!!
|
||||
// Now draw the image ...
|
||||
}
|
||||
|
||||
// FIX ME!!!
|
||||
// Destroy mImage
|
||||
mView->UnlockLooper();
|
||||
|
||||
mLocked = PR_FALSE;
|
||||
|
||||
|
||||
#ifdef CHEAP_PERFORMANCE_MEASUREMENT
|
||||
printf("Time taken to unlock: %d\n", PR_Now() - mUnlockTime);
|
||||
#endif
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDrawingSurfaceBeOS :: GetDimensions(PRUint32 *aWidth, PRUint32 *aHeight)
|
||||
{
|
||||
*aWidth = mWidth;
|
||||
*aHeight = mHeight;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDrawingSurfaceBeOS :: IsOffscreen(PRBool *aOffScreen)
|
||||
{
|
||||
*aOffScreen = mIsOffscreen;//mBitmap ? PR_TRUE : PR_FALSE;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDrawingSurfaceBeOS :: IsPixelAddressable(PRBool *aAddressable)
|
||||
{
|
||||
*aAddressable = PR_FALSE;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDrawingSurfaceBeOS :: GetPixelFormat(nsPixelFormat *aFormat)
|
||||
{
|
||||
*aFormat = mPixFormat;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDrawingSurfaceBeOS :: Init(BView *aView)
|
||||
{
|
||||
if(aView->LockLooper())
|
||||
{
|
||||
//remember dimensions
|
||||
mWidth=nscoord(aView->Bounds().Width()+1);
|
||||
mHeight=nscoord(aView->Bounds().Height()+1);
|
||||
|
||||
mView = aView;
|
||||
|
||||
aView->UnlockLooper();
|
||||
}
|
||||
|
||||
// XXX was i smoking crack when i wrote this comment?
|
||||
// this is definatly going to be on the screen, as it will be the window of a
|
||||
// widget or something.
|
||||
mIsOffscreen = PR_FALSE;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDrawingSurfaceBeOS :: Init(BView *aView, PRUint32 aWidth,
|
||||
PRUint32 aHeight, PRUint32 aFlags)
|
||||
{
|
||||
NS_ASSERTION(!(aView == nsnull), "null BView");
|
||||
|
||||
//remember dimensions
|
||||
mWidth=aWidth;
|
||||
mHeight=aHeight;
|
||||
mFlags = aFlags;
|
||||
|
||||
// we can draw on this offscreen because it has no parent
|
||||
mIsOffscreen = PR_TRUE;
|
||||
|
||||
BRect r(0,0, mWidth-1, mHeight-1);
|
||||
mView = new BView(r, "", 0, 0);
|
||||
if (!mView)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
//if((aFlags & NS_CREATEDRAWINGSURFACE_FOR_PIXEL_ACCESS) &&
|
||||
// (aWidth > 0) && (aHeight > 0))
|
||||
if(aWidth > 0 && aHeight > 0)
|
||||
{
|
||||
mBitmap = new BBitmap(r, B_RGBA32, true);
|
||||
if (!mBitmap)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
if (mBitmap->InitCheck()!=B_OK) {
|
||||
//for some reason, the bitmap isn't valid - delete the
|
||||
//bitmap object, then indicate failure
|
||||
delete mBitmap;
|
||||
mBitmap=NULL;
|
||||
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
mBitmap->AddChild(mView);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDrawingSurfaceBeOS :: AcquireView(BView **aView)
|
||||
{
|
||||
*aView = mView;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDrawingSurfaceBeOS :: AcquireBitmap(BBitmap **aBitmap)
|
||||
{
|
||||
if(mBitmap && mBitmap->Lock())
|
||||
{
|
||||
mView->Sync();
|
||||
mBitmap->Unlock();
|
||||
}
|
||||
*aBitmap = mBitmap;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDrawingSurfaceBeOS :: ReleaseView(void)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDrawingSurfaceBeOS :: ReleaseBitmap(void)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
103
mozilla/gfx/src/beos/nsDrawingSurfaceBeOS.h
Normal file
103
mozilla/gfx/src/beos/nsDrawingSurfaceBeOS.h
Normal file
@@ -0,0 +1,103 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsDrawingSurfaceBeOS_h___
|
||||
#define nsDrawingSurfaceBeOS_h___
|
||||
|
||||
#include "nsIDrawingSurface.h"
|
||||
#include "nsIDrawingSurfaceBeOS.h"
|
||||
|
||||
#include <Bitmap.h>
|
||||
#include <View.h>
|
||||
|
||||
class nsDrawingSurfaceBeOS : public nsIDrawingSurface,
|
||||
public nsIDrawingSurfaceBeOS
|
||||
{
|
||||
public:
|
||||
nsDrawingSurfaceBeOS();
|
||||
virtual ~nsDrawingSurfaceBeOS();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
//nsIDrawingSurface interface
|
||||
|
||||
NS_IMETHOD Lock(PRInt32 aX, PRInt32 aY, PRUint32 aWidth, PRUint32 aHeight,
|
||||
void **aBits, PRInt32 *aStride, PRInt32 *aWidthBytes,
|
||||
PRUint32 aFlags);
|
||||
NS_IMETHOD Unlock(void);
|
||||
NS_IMETHOD GetDimensions(PRUint32 *aWidth, PRUint32 *aHeight);
|
||||
NS_IMETHOD IsOffscreen(PRBool *aOffScreen);
|
||||
NS_IMETHOD IsPixelAddressable(PRBool *aAddressable);
|
||||
NS_IMETHOD GetPixelFormat(nsPixelFormat *aFormat);
|
||||
|
||||
// local methods
|
||||
NS_IMETHOD Init(BView *aView);
|
||||
NS_IMETHOD Init(BView *aView, PRUint32 aWidth, PRUint32 aHeight,
|
||||
PRUint32 aFlags);
|
||||
|
||||
/* below are utility functions used mostly for nsRenderingContext and nsImage
|
||||
* to plug into gdk_* functions for drawing. You should not set a pointer
|
||||
* that might hang around with the return from these. instead use the ones
|
||||
* above. pav
|
||||
*/
|
||||
NS_IMETHOD AcquireView(BView **aView);
|
||||
NS_IMETHOD ReleaseView(void);
|
||||
NS_IMETHOD AcquireBitmap(BBitmap **aBitmap);
|
||||
NS_IMETHOD ReleaseBitmap(void);
|
||||
|
||||
void GetSize(PRUint32 *aWidth, PRUint32 *aHeight) { *aWidth = mWidth; *aHeight = mHeight; }
|
||||
|
||||
private:
|
||||
BView *mView;
|
||||
BBitmap *mBitmap;
|
||||
nsPixelFormat mPixFormat;
|
||||
PRUint32 mWidth;
|
||||
PRUint32 mHeight;
|
||||
PRUint32 mFlags;
|
||||
PRBool mIsOffscreen;
|
||||
|
||||
/* for locks */
|
||||
PRInt32 mLockX;
|
||||
PRInt32 mLockY;
|
||||
PRUint32 mLockWidth;
|
||||
PRUint32 mLockHeight;
|
||||
PRUint32 mLockFlags;
|
||||
PRBool mLocked;
|
||||
};
|
||||
|
||||
#endif
|
||||
563
mozilla/gfx/src/beos/nsFontMetricsBeOS.cpp
Normal file
563
mozilla/gfx/src/beos/nsFontMetricsBeOS.cpp
Normal file
@@ -0,0 +1,563 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Yannick Koehler <koehler@mythrium.com>
|
||||
* Christian M Hoffman <chrmhoffmann@web.de>
|
||||
* Makoto hamanaka <VYA04230@nifty.com>
|
||||
* Paul Ashford <arougthopher@lizardland.net>
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "xp_core.h"
|
||||
#include "nsQuickSort.h"
|
||||
#include "nsFontMetricsBeOS.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsICharsetConverterManager.h"
|
||||
#include "nsICharsetConverterManager2.h"
|
||||
#include "nsISaveAsCharset.h"
|
||||
#include "nsIPref.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nspr.h"
|
||||
#include "nsHashtable.h"
|
||||
#include "nsReadableUtils.h"
|
||||
|
||||
#undef USER_DEFINED
|
||||
#define USER_DEFINED "x-user-def"
|
||||
|
||||
#undef NOISY_FONTS
|
||||
#undef REALLY_NOISY_FONTS
|
||||
|
||||
static NS_DEFINE_CID(kPrefCID, NS_PREF_CID);
|
||||
|
||||
nsFontMetricsBeOS::nsFontMetricsBeOS()
|
||||
:mEmulateBold(PR_FALSE)
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
}
|
||||
|
||||
nsFontMetricsBeOS::~nsFontMetricsBeOS()
|
||||
{
|
||||
if (nsnull != mFont) {
|
||||
delete mFont;
|
||||
mFont = nsnull;
|
||||
}
|
||||
if (mDeviceContext) {
|
||||
// Notify our device context that owns us so that it can update its font cache
|
||||
mDeviceContext->FontMetricsDeleted(this);
|
||||
mDeviceContext = nsnull;
|
||||
}
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS1(nsFontMetricsBeOS, nsIFontMetrics)
|
||||
|
||||
static PRBool
|
||||
IsASCIIFontName(const nsString& aName)
|
||||
{
|
||||
PRUint32 len = aName.Length();
|
||||
const PRUnichar* str = aName.get();
|
||||
for (PRUint32 i = 0; i < len; i++) {
|
||||
/*
|
||||
* X font names are printable ASCII, ignore others (for now)
|
||||
*/
|
||||
if ((str[i] < 0x20) || (str[i] > 0x7E)) {
|
||||
return PR_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
||||
// a structure to hold a font family list
|
||||
typedef struct nsFontEnumParamsBeOS {
|
||||
nsFontMetricsBeOS *metrics;
|
||||
nsStringArray family;
|
||||
nsVoidArray isgeneric;
|
||||
} NS_FONT_ENUM_PARAMS_BEOS;
|
||||
|
||||
// a callback func to get a font family list from a nsFont object
|
||||
static PRBool FontEnumCallback(const nsString& aFamily, PRBool aGeneric, void *aData)
|
||||
{
|
||||
NS_FONT_ENUM_PARAMS_BEOS *param = (NS_FONT_ENUM_PARAMS_BEOS *) aData;
|
||||
param->family.AppendString(aFamily);
|
||||
param->isgeneric.AppendElement((void*) aGeneric);
|
||||
if (aGeneric)
|
||||
return PR_FALSE;
|
||||
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsFontMetricsBeOS::Init(const nsFont& aFont, nsIAtom* aLangGroup,
|
||||
nsIDeviceContext* aContext)
|
||||
{
|
||||
NS_ASSERTION(!(nsnull == aContext), "attempt to init fontmetrics with null device context");
|
||||
|
||||
mLangGroup = aLangGroup;
|
||||
mDeviceContext = aContext;
|
||||
|
||||
// get font family list
|
||||
NS_FONT_ENUM_PARAMS_BEOS param;
|
||||
param.metrics = this;
|
||||
aFont.EnumerateFamilies(FontEnumCallback, ¶m);
|
||||
|
||||
PRInt16 face = 0;
|
||||
|
||||
mFont = new nsFont(aFont);
|
||||
|
||||
float app2dev, app2twip;
|
||||
aContext->GetAppUnitsToDevUnits(app2dev);
|
||||
aContext->GetDevUnitsToTwips(app2twip);
|
||||
float textZoom = 1.0;
|
||||
aContext->GetTextZoom(textZoom);
|
||||
|
||||
app2twip *= app2dev;
|
||||
float rounded = ((float)NSIntPointsToTwips(NSTwipsToFloorIntPoints(nscoord(mFont->size * app2twip * textZoom)))) / app2twip;
|
||||
|
||||
|
||||
// process specified fonts from first item of the array.
|
||||
// stop processing next when a real font found;
|
||||
PRBool fontfound = PR_FALSE;
|
||||
for (int i=0 ; i<param.family.Count() && !fontfound ; i++) {
|
||||
nsString *fam = param.family.StringAt(i);
|
||||
PRBool isgeneric = ( param.isgeneric[i] ) ? PR_TRUE: PR_FALSE;
|
||||
char *family = ToNewUTF8String(*fam);
|
||||
if (!isgeneric) {
|
||||
// non-generic font
|
||||
if ( count_font_styles((font_family)family) <= 0) {
|
||||
// the specified font is not exist in this computer.
|
||||
nsMemory::Free(family);
|
||||
continue;
|
||||
}
|
||||
mFontHandle.SetFamilyAndStyle( (font_family)family, NULL );
|
||||
nsMemory::Free(family);
|
||||
fontfound = PR_TRUE;
|
||||
break;
|
||||
}
|
||||
else {
|
||||
// family is generic string like
|
||||
// "serif" "sans-serif" "cursive" "fantasy" "monospace" "-moz-fixed"
|
||||
// so look up preferences and get real family name
|
||||
const PRUnichar *langGroup;
|
||||
aLangGroup->GetUnicode( &langGroup );
|
||||
char *lang = ToNewUTF8String(nsDependentString(langGroup));
|
||||
|
||||
char prop[256];
|
||||
sprintf( prop, "font.name.%s.%s", family, lang );
|
||||
|
||||
nsMemory::Free(lang);
|
||||
nsMemory::Free(family);
|
||||
|
||||
// look up prefs
|
||||
char *real_family = NULL;
|
||||
nsresult res = NS_ERROR_FAILURE;
|
||||
//NS_WITH_SERVICE( nsIPref, prefs, kPrefCID, &res );
|
||||
nsCOMPtr<nsIPref> prefs = do_GetService( kPrefCID, &res );
|
||||
if( res == NS_OK ) {
|
||||
prefs->CopyCharPref( prop, &real_family );
|
||||
if ( (real_family) && count_font_styles((font_family)real_family) > 0) {
|
||||
mFontHandle.SetFamilyAndStyle( (font_family)real_family, NULL );
|
||||
fontfound = PR_TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
// not successful. use normal font.
|
||||
mFontHandle = be_plain_font;
|
||||
fontfound = PR_TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// if got no font, then use system font.
|
||||
if (!fontfound)
|
||||
mFontHandle = be_plain_font;
|
||||
|
||||
if (aFont.style == NS_FONT_STYLE_ITALIC)
|
||||
face |= B_ITALIC_FACE;
|
||||
|
||||
if( aFont.weight > NS_FONT_WEIGHT_NORMAL )
|
||||
face |= B_BOLD_FACE;
|
||||
|
||||
// I don't think B_UNDERSCORE_FACE and B_STRIKEOUT_FACE really works...
|
||||
// instead, nsTextFrame do them for us. ( my guess... Makoto Hamanaka )
|
||||
if( aFont.decorations & NS_FONT_DECORATION_UNDERLINE )
|
||||
face |= B_UNDERSCORE_FACE;
|
||||
|
||||
if( aFont.decorations & NS_FONT_DECORATION_LINE_THROUGH )
|
||||
face |= B_STRIKEOUT_FACE;
|
||||
|
||||
mFontHandle.SetFace( face );
|
||||
// emulate italic and bold if the selected family has no such style
|
||||
if (aFont.style == NS_FONT_STYLE_ITALIC
|
||||
&& !(mFontHandle.Face() & B_ITALIC_FACE)) {
|
||||
mFontHandle.SetShear(105.0);
|
||||
}
|
||||
if ( aFont.weight > NS_FONT_WEIGHT_NORMAL
|
||||
&& !(mFontHandle.Face() & B_BOLD_FACE)) {
|
||||
mEmulateBold = PR_TRUE;
|
||||
}
|
||||
mFontHandle.SetSize( rounded * app2dev );
|
||||
|
||||
#ifdef NOISY_FONTS
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "looking for font %s (%d)", wildstring, aFont.size / app2twip);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
RealizeFont(aContext);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsFontMetricsBeOS::Destroy()
|
||||
{
|
||||
mDeviceContext = nsnull;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
void nsFontMetricsBeOS::RealizeFont(nsIDeviceContext* aContext)
|
||||
{
|
||||
float f;
|
||||
aContext->GetDevUnitsToAppUnits(f);
|
||||
|
||||
struct font_height height;
|
||||
mFontHandle.GetHeight( &height );
|
||||
|
||||
struct font_height emHeight;
|
||||
be_plain_font->GetHeight(&emHeight);
|
||||
|
||||
int lineSpacing = nscoord(height.ascent + height.descent);
|
||||
if (lineSpacing > (emHeight.ascent + emHeight.descent)) {
|
||||
mLeading = nscoord((lineSpacing - (emHeight.ascent + emHeight.descent)) * f);
|
||||
}
|
||||
else {
|
||||
mLeading = 0;
|
||||
}
|
||||
mEmHeight = PR_MAX(1, nscoord((emHeight.ascent + emHeight.descent) * f));
|
||||
mEmAscent = nscoord(height.ascent * (emHeight.ascent + emHeight.descent) * f / lineSpacing);
|
||||
mEmDescent = mEmHeight - mEmAscent;
|
||||
|
||||
mMaxHeight = nscoord((height.ascent +
|
||||
height.descent) * f) ;
|
||||
mMaxAscent = nscoord(height.ascent * f) ;
|
||||
mMaxDescent = nscoord(height.descent * f);
|
||||
|
||||
mMaxAdvance = nscoord(mFontHandle.BoundingBox().Width() * f);
|
||||
|
||||
// 56% of ascent, best guess for non-true type
|
||||
mXHeight = NSToCoordRound((float) height.ascent* f * 0.56f);
|
||||
|
||||
float rawWidth = mFontHandle.StringWidth(" ");
|
||||
mSpaceWidth = NSToCoordRound(rawWidth * f);
|
||||
|
||||
/* Temp */
|
||||
mUnderlineOffset = -NSToIntRound(MAX (1, floor (0.1 * (height.ascent + height.descent + height.leading) + 0.5)) * f);
|
||||
|
||||
mUnderlineSize = NSToIntRound(MAX(1, floor (0.05 * (height.ascent + height.descent + height.leading) + 0.5)) * f);
|
||||
|
||||
mSuperscriptOffset = mXHeight;
|
||||
|
||||
mSubscriptOffset = mXHeight;
|
||||
|
||||
/* need better way to calculate this */
|
||||
mStrikeoutOffset = NSToCoordRound(mXHeight / 2.0);
|
||||
mStrikeoutSize = mUnderlineSize;
|
||||
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsFontMetricsBeOS::GetXHeight(nscoord& aResult)
|
||||
{
|
||||
aResult = mXHeight;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsFontMetricsBeOS::GetSuperscriptOffset(nscoord& aResult)
|
||||
{
|
||||
aResult = mSuperscriptOffset;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsFontMetricsBeOS::GetSubscriptOffset(nscoord& aResult)
|
||||
{
|
||||
aResult = mSubscriptOffset;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsFontMetricsBeOS::GetStrikeout(nscoord& aOffset, nscoord& aSize)
|
||||
{
|
||||
aOffset = mStrikeoutOffset;
|
||||
aSize = mStrikeoutSize;
|
||||
// aOffset = nscoord( ( mAscent / 2 ) - mDescent );
|
||||
// aSize = nscoord( 20 ); // FIXME Put 1 pixel which equal 20 twips..
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsFontMetricsBeOS::GetUnderline(nscoord& aOffset, nscoord& aSize)
|
||||
{
|
||||
aOffset = mUnderlineOffset;
|
||||
aSize = mUnderlineSize;
|
||||
//aOffset = nscoord( 0 ); // FIXME
|
||||
//aSize = nscoord( 20 ); // FIXME
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsFontMetricsBeOS::GetHeight(nscoord &aHeight)
|
||||
{
|
||||
aHeight = mMaxHeight;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsFontMetricsBeOS::GetNormalLineHeight(nscoord &aHeight)
|
||||
{
|
||||
aHeight = mEmHeight + mLeading;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsFontMetricsBeOS::GetLeading(nscoord &aLeading)
|
||||
{
|
||||
aLeading = mLeading;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsFontMetricsBeOS::GetEmHeight(nscoord &aHeight)
|
||||
{
|
||||
aHeight = mEmHeight;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsFontMetricsBeOS::GetEmAscent(nscoord &aAscent)
|
||||
{
|
||||
aAscent = mEmAscent;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsFontMetricsBeOS::GetEmDescent(nscoord &aDescent)
|
||||
{
|
||||
aDescent = mEmDescent;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsFontMetricsBeOS::GetMaxHeight(nscoord &aHeight)
|
||||
{
|
||||
aHeight = mMaxHeight;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsFontMetricsBeOS::GetMaxAscent(nscoord &aAscent)
|
||||
{
|
||||
aAscent = mMaxAscent;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsFontMetricsBeOS::GetMaxDescent(nscoord &aDescent)
|
||||
{
|
||||
aDescent = mMaxDescent;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsFontMetricsBeOS::GetMaxAdvance(nscoord &aAdvance)
|
||||
{
|
||||
aAdvance = mMaxAdvance;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP nsFontMetricsBeOS::GetSpaceWidth(nscoord &aSpaceWidth)
|
||||
{
|
||||
aSpaceWidth = mSpaceWidth;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsFontMetricsBeOS::GetFont(const nsFont*& aFont)
|
||||
{
|
||||
aFont = mFont;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsFontMetricsBeOS::GetLangGroup(nsIAtom** aLangGroup)
|
||||
{
|
||||
if (!aLangGroup) {
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
||||
*aLangGroup = mLangGroup;
|
||||
NS_IF_ADDREF(*aLangGroup);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsFontMetricsBeOS::GetFontHandle(nsFontHandle &aHandle)
|
||||
{
|
||||
aHandle = (nsFontHandle)&mFontHandle;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsFontMetricsBeOS::FamilyExists(const nsString& aName)
|
||||
{
|
||||
if (!IsASCIIFontName(aName)) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
nsCAutoString name;
|
||||
name.AssignWithConversion(aName.get());
|
||||
ToLowerCase(name);
|
||||
PRBool isthere = PR_FALSE;
|
||||
|
||||
char* cStr = ToNewCString(name);
|
||||
|
||||
int32 numFamilies = count_font_families();
|
||||
for(int32 i = 0; i < numFamilies; i++) {
|
||||
font_family family;
|
||||
uint32 flags;
|
||||
if(get_font_family(i, &family, &flags) == B_OK) {
|
||||
if(strcmp(family, cStr) == 0) {
|
||||
isthere = PR_TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//printf("%s there? %s\n", cStr, isthere?"Yes":"No" );
|
||||
|
||||
delete[] cStr;
|
||||
|
||||
if (PR_TRUE == isthere)
|
||||
return NS_OK;
|
||||
else
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
// The Font Enumerator
|
||||
|
||||
nsFontEnumeratorBeOS::nsFontEnumeratorBeOS()
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS1(nsFontEnumeratorBeOS, nsIFontEnumerator)
|
||||
|
||||
static int
|
||||
CompareFontNames(const void* aArg1, const void* aArg2, void* aClosure)
|
||||
{
|
||||
const PRUnichar* str1 = *((const PRUnichar**) aArg1);
|
||||
const PRUnichar* str2 = *((const PRUnichar**) aArg2);
|
||||
|
||||
// XXX add nsICollation stuff
|
||||
|
||||
return nsCRT::strcmp(str1, str2);
|
||||
}
|
||||
|
||||
static nsresult
|
||||
EnumFonts(nsIAtom* aLangGroup, const char* aGeneric, PRUint32* aCount,
|
||||
PRUnichar*** aResult)
|
||||
{
|
||||
nsString font_name;
|
||||
|
||||
int32 numFamilies = count_font_families();
|
||||
|
||||
PRUnichar** array =
|
||||
(PRUnichar**) nsMemory::Alloc(numFamilies * sizeof(PRUnichar*));
|
||||
if (!array) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
for(int32 i = 0; i < numFamilies; i++) {
|
||||
font_family family;
|
||||
uint32 flags;
|
||||
if(get_font_family(i, &family, &flags) == B_OK) {
|
||||
font_name.AssignWithConversion(family);
|
||||
array[i] = ToNewUnicode(font_name);
|
||||
}
|
||||
}
|
||||
|
||||
NS_QuickSort(array, numFamilies, sizeof(PRUnichar*), CompareFontNames,
|
||||
nsnull);
|
||||
|
||||
*aCount = numFamilies;
|
||||
if (*aCount) {
|
||||
*aResult = array;
|
||||
}
|
||||
else {
|
||||
nsMemory::Free(array);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFontEnumeratorBeOS::EnumerateAllFonts(PRUint32* aCount, PRUnichar*** aResult)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aResult);
|
||||
*aResult = nsnull;
|
||||
NS_ENSURE_ARG_POINTER(aCount);
|
||||
*aCount = 0;
|
||||
|
||||
return EnumFonts(nsnull, nsnull, aCount, aResult);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFontEnumeratorBeOS::EnumerateFonts(const char* aLangGroup,
|
||||
const char* aGeneric, PRUint32* aCount, PRUnichar*** aResult)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aResult);
|
||||
*aResult = nsnull;
|
||||
NS_ENSURE_ARG_POINTER(aCount);
|
||||
*aCount = 0;
|
||||
NS_ENSURE_ARG_POINTER(aGeneric);
|
||||
NS_ENSURE_ARG_POINTER(aLangGroup);
|
||||
|
||||
nsCOMPtr<nsIAtom> langGroup = getter_AddRefs(NS_NewAtom(aLangGroup));
|
||||
|
||||
// XXX still need to implement aLangGroup and aGeneric
|
||||
return EnumFonts(langGroup, aGeneric, aCount, aResult);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFontEnumeratorBeOS::HaveFontFor(const char* aLangGroup, PRBool* aResult)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aLangGroup);
|
||||
NS_ENSURE_ARG_POINTER(aResult);
|
||||
*aResult = PR_FALSE;
|
||||
// XXX stub
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFontEnumeratorBeOS::UpdateFontList(PRBool *updateFontList)
|
||||
{
|
||||
*updateFontList = PR_FALSE; // always return false for now
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
137
mozilla/gfx/src/beos/nsFontMetricsBeOS.h
Normal file
137
mozilla/gfx/src/beos/nsFontMetricsBeOS.h
Normal file
@@ -0,0 +1,137 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Paul Ashford <arougthopher@lizardland.net>
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsFontMetricsBeOS_h__
|
||||
#define nsFontMetricsBeOS_h__
|
||||
|
||||
#include "nsDeviceContextBeOS.h"
|
||||
#include "nsIFontMetrics.h"
|
||||
#include "nsIFontEnumerator.h"
|
||||
#include "nsFont.h"
|
||||
#include "nsString.h"
|
||||
#include "nsUnitConversion.h"
|
||||
#include "nsIDeviceContext.h"
|
||||
#include "nsCRT.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsRenderingContextBeOS.h"
|
||||
#include "nsICharRepresentable.h"
|
||||
|
||||
#include <Font.h>
|
||||
|
||||
class nsFontMetricsBeOS : public nsIFontMetrics
|
||||
{
|
||||
public:
|
||||
nsFontMetricsBeOS();
|
||||
virtual ~nsFontMetricsBeOS();
|
||||
|
||||
NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_IMETHOD Init(const nsFont& aFont, nsIAtom* aLangGroup,
|
||||
nsIDeviceContext* aContext);
|
||||
NS_IMETHOD Destroy();
|
||||
|
||||
NS_IMETHOD GetXHeight(nscoord& aResult);
|
||||
NS_IMETHOD GetSuperscriptOffset(nscoord& aResult);
|
||||
NS_IMETHOD GetSubscriptOffset(nscoord& aResult);
|
||||
NS_IMETHOD GetStrikeout(nscoord& aOffset, nscoord& aSize);
|
||||
NS_IMETHOD GetUnderline(nscoord& aOffset, nscoord& aSize);
|
||||
|
||||
NS_IMETHOD GetHeight(nscoord &aHeight);
|
||||
NS_IMETHOD GetNormalLineHeight(nscoord &aHeight);
|
||||
NS_IMETHOD GetLeading(nscoord &aLeading);
|
||||
NS_IMETHOD GetEmHeight(nscoord &aHeight);
|
||||
NS_IMETHOD GetEmAscent(nscoord &aAscent);
|
||||
NS_IMETHOD GetEmDescent(nscoord &aDescent);
|
||||
NS_IMETHOD GetMaxHeight(nscoord &aHeight);
|
||||
NS_IMETHOD GetMaxAscent(nscoord &aAscent);
|
||||
NS_IMETHOD GetMaxDescent(nscoord &aDescent);
|
||||
NS_IMETHOD GetMaxAdvance(nscoord &aAdvance);
|
||||
NS_IMETHOD GetFont(const nsFont *&aFont);
|
||||
NS_IMETHOD GetLangGroup(nsIAtom** aLangGroup);
|
||||
NS_IMETHOD GetFontHandle(nsFontHandle &aHandle);
|
||||
|
||||
NS_IMETHOD GetSpaceWidth(nscoord &aSpaceWidth);
|
||||
|
||||
static nsresult FamilyExists(const nsString& aFontName);
|
||||
inline PRBool GetEmulateBold() { return mEmulateBold; }
|
||||
|
||||
nsCOMPtr<nsIAtom> mLangGroup;
|
||||
|
||||
protected:
|
||||
void RealizeFont(nsIDeviceContext* aContext);
|
||||
|
||||
nsIDeviceContext *mDeviceContext;
|
||||
nsFont *mFont;
|
||||
BFont mFontHandle;
|
||||
|
||||
nscoord mLeading;
|
||||
nscoord mEmHeight;
|
||||
nscoord mEmAscent;
|
||||
nscoord mEmDescent;
|
||||
nscoord mMaxHeight;
|
||||
nscoord mMaxAscent;
|
||||
nscoord mMaxDescent;
|
||||
nscoord mMaxAdvance;
|
||||
nscoord mXHeight;
|
||||
nscoord mSuperscriptOffset;
|
||||
nscoord mSubscriptOffset;
|
||||
nscoord mStrikeoutSize;
|
||||
nscoord mStrikeoutOffset;
|
||||
nscoord mUnderlineSize;
|
||||
nscoord mUnderlineOffset;
|
||||
nscoord mSpaceWidth;
|
||||
|
||||
PRUint16 mPixelSize;
|
||||
PRUint8 mStretchIndex;
|
||||
PRUint8 mStyleIndex;
|
||||
|
||||
PRBool mEmulateBold;
|
||||
};
|
||||
|
||||
class nsFontEnumeratorBeOS : public nsIFontEnumerator
|
||||
{
|
||||
public:
|
||||
nsFontEnumeratorBeOS();
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIFONTENUMERATOR
|
||||
};
|
||||
|
||||
#endif
|
||||
189
mozilla/gfx/src/beos/nsGfxFactoryBeOS.cpp
Normal file
189
mozilla/gfx/src/beos/nsGfxFactoryBeOS.cpp
Normal file
@@ -0,0 +1,189 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsIGenericFactory.h"
|
||||
#include "nsIModule.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsGfxCIID.h"
|
||||
|
||||
#include "nsBlender.h"
|
||||
#include "nsFontMetricsBeOS.h"
|
||||
#include "nsRenderingContextBeOS.h"
|
||||
// aka nsDeviceContextSpecBeOS.h
|
||||
#include "nsDeviceContextSpecB.h"
|
||||
// aka nsDeviceContextSpecFactoryBeOS.h
|
||||
#include "nsDeviceContextSpecFactoryB.h"
|
||||
#include "nsScreenManagerBeOS.h"
|
||||
#include "nsScriptableRegion.h"
|
||||
#include "nsDeviceContextBeOS.h"
|
||||
#include "nsPrintOptionsBeOS.h"
|
||||
#include "nsImageBeOS.h"
|
||||
#include "nsFontList.h"
|
||||
|
||||
// objects that just require generic constructors
|
||||
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsFontMetricsBeOS)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDeviceContextBeOS)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsRenderingContextBeOS)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsImageBeOS)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsBlender)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsRegionBeOS)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDeviceContextSpecBeOS)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDeviceContextSpecFactoryBeOS)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsFontEnumeratorBeOS)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsFontList);
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsScreenManagerBeOS)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsPrinterEnumeratorBeOS)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsPrintOptionsBeOS)
|
||||
|
||||
// our custom constructors
|
||||
|
||||
static NS_IMETHODIMP nsScriptableRegionConstructor(nsISupports *aOuter, REFNSIID aIID, void **aResult)
|
||||
{
|
||||
nsresult rv;
|
||||
|
||||
nsIScriptableRegion *inst;
|
||||
|
||||
if ( !aResult )
|
||||
{
|
||||
rv = NS_ERROR_NULL_POINTER;
|
||||
return rv;
|
||||
}
|
||||
*aResult = nsnull;
|
||||
if (aOuter)
|
||||
{
|
||||
rv = NS_ERROR_NO_AGGREGATION;
|
||||
return rv;
|
||||
}
|
||||
// create an nsRegionBeOS and get the scriptable region from it
|
||||
nsCOMPtr <nsIRegion> rgn;
|
||||
NS_NEWXPCOM(rgn, nsRegionBeOS);
|
||||
nsCOMPtr<nsIScriptableRegion> scriptableRgn;
|
||||
if (rgn != nsnull)
|
||||
{
|
||||
scriptableRgn = new nsScriptableRegion(rgn);
|
||||
inst = scriptableRgn;
|
||||
}
|
||||
if (!inst)
|
||||
{
|
||||
rv = NS_ERROR_OUT_OF_MEMORY;
|
||||
return rv;
|
||||
}
|
||||
NS_ADDREF(inst);
|
||||
// release our variable above now that we have created our owning
|
||||
// reference - we don't want this to go out of scope early!
|
||||
scriptableRgn = nsnull;
|
||||
rv = inst->QueryInterface(aIID, aResult);
|
||||
NS_RELEASE(inst);
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
static const nsModuleComponentInfo components[] =
|
||||
{
|
||||
{ "BeOS Font Metrics",
|
||||
NS_FONT_METRICS_CID,
|
||||
// "@mozilla.org/gfx/font_metrics/beos;1",
|
||||
"@mozilla.org/gfx/fontmetrics;1",
|
||||
nsFontMetricsBeOSConstructor },
|
||||
{ "BeOS Device Context",
|
||||
NS_DEVICE_CONTEXT_CID,
|
||||
// "@mozilla.org/gfx/device_context/beos;1",
|
||||
"@mozilla.org/gfx/devicecontext;1",
|
||||
nsDeviceContextBeOSConstructor },
|
||||
{ "BeOS Rendering Context",
|
||||
NS_RENDERING_CONTEXT_CID,
|
||||
// "@mozilla.org/gfx/rendering_context/beos;1",
|
||||
"@mozilla.org/gfx/renderingcontext;1",
|
||||
nsRenderingContextBeOSConstructor },
|
||||
{ "BeOS Image",
|
||||
NS_IMAGE_CID,
|
||||
// "@mozilla.org/gfx/image/beos;1",
|
||||
"@mozilla.org/gfx/image;1",
|
||||
nsImageBeOSConstructor },
|
||||
{ "BeOS Region",
|
||||
NS_REGION_CID,
|
||||
"@mozilla.org/gfx/region/beos;1",
|
||||
nsRegionBeOSConstructor },
|
||||
{ "Scriptable Region",
|
||||
NS_SCRIPTABLE_REGION_CID,
|
||||
// "@mozilla.org/gfx/scriptable_region;1",
|
||||
"@mozilla.org/gfx/region;1",
|
||||
nsScriptableRegionConstructor },
|
||||
{ "Blender",
|
||||
NS_BLENDER_CID,
|
||||
// "@mozilla.org/gfx/blender;1",
|
||||
"@mozilla.org/gfx/blender;1",
|
||||
nsBlenderConstructor },
|
||||
{ "BeOS Device Context Spec",
|
||||
NS_DEVICE_CONTEXT_SPEC_CID,
|
||||
// "@mozilla.org/gfx/device_context_spec/beos;1",
|
||||
"@mozilla.org/gfx/devicecontextspec;1",
|
||||
nsDeviceContextSpecBeOSConstructor },
|
||||
{ "BeOS Device Context Spec Factory",
|
||||
NS_DEVICE_CONTEXT_SPEC_FACTORY_CID,
|
||||
// "@mozilla.org/gfx/device_context_spec_factory/beos;1",
|
||||
"@mozilla.org/gfx/devicecontextspecfactory;1",
|
||||
nsDeviceContextSpecFactoryBeOSConstructor },
|
||||
{ "BeOS Font Enumerator",
|
||||
NS_FONT_ENUMERATOR_CID,
|
||||
// "@mozilla.org/gfx/font_enumerator/beos;1",
|
||||
"@mozilla.org/gfx/fontenumerator;1",
|
||||
nsFontEnumeratorBeOSConstructor },
|
||||
{ "Font List",
|
||||
NS_FONTLIST_CID,
|
||||
// "@mozilla.org/gfx/fontlist;1"
|
||||
NS_FONTLIST_CONTRACTID,
|
||||
nsFontListConstructor },
|
||||
{ "BeOS Screen Manager",
|
||||
NS_SCREENMANAGER_CID,
|
||||
// "@mozilla.org/gfx/screenmanager/beos;1",
|
||||
"@mozilla.org/gfx/screenmanager;1",
|
||||
nsScreenManagerBeOSConstructor },
|
||||
{ "BeOS Printer Enumerator",
|
||||
NS_PRINTER_ENUMERATOR_CID,
|
||||
// "@mozilla.org/gfx/printer_enumerator/beos;1",
|
||||
"@mozilla.org/gfx/printerenumerator;1",
|
||||
nsPrinterEnumeratorBeOSConstructor },
|
||||
{ "BeOS Printer Options",
|
||||
NS_PRINTOPTIONS_CID,
|
||||
"@mozilla.org/gfx/printoptions;1",
|
||||
nsPrintOptionsBeOSConstructor }
|
||||
};
|
||||
|
||||
NS_IMPL_NSGETMODULE(nsGfxBeOSModule, components)
|
||||
141
mozilla/gfx/src/beos/nsGraphicsStateBeOS.cpp
Normal file
141
mozilla/gfx/src/beos/nsGraphicsStateBeOS.cpp
Normal file
@@ -0,0 +1,141 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsGraphicsStateBeOS.h"
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
nsGraphicsState::nsGraphicsState()
|
||||
{
|
||||
mMatrix = nsnull;
|
||||
mClipRegion = nsnull;
|
||||
mColor = 0;
|
||||
mLineStyle = nsLineStyle_kSolid;
|
||||
mFontMetrics = nsnull;
|
||||
}
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
nsGraphicsState::~nsGraphicsState()
|
||||
{
|
||||
NS_IF_RELEASE(mFontMetrics);
|
||||
}
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
nsGraphicsStatePool::nsGraphicsStatePool()
|
||||
{
|
||||
mFreeList = nsnull;
|
||||
}
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Public nsGraphicsStatePool
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
/* static */ nsGraphicsState *
|
||||
nsGraphicsStatePool::GetNewGS()
|
||||
{
|
||||
nsGraphicsStatePool * thePool = PrivateGetPool();
|
||||
|
||||
return thePool->PrivateGetNewGS();
|
||||
}
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
/* static */ void
|
||||
nsGraphicsStatePool::ReleaseGS(nsGraphicsState* aGS)
|
||||
{
|
||||
nsGraphicsStatePool * thePool = PrivateGetPool();
|
||||
|
||||
thePool->PrivateReleaseGS(aGS);
|
||||
}
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Private nsGraphicsStatePool
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
nsGraphicsStatePool *
|
||||
nsGraphicsStatePool::gsThePool = nsnull;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
nsGraphicsStatePool *
|
||||
nsGraphicsStatePool::PrivateGetPool()
|
||||
{
|
||||
if (nsnull == gsThePool)
|
||||
{
|
||||
gsThePool = new nsGraphicsStatePool();
|
||||
}
|
||||
|
||||
return gsThePool;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsGraphicsStatePool::~nsGraphicsStatePool()
|
||||
{
|
||||
nsGraphicsState* gs = mFreeList;
|
||||
while (gs != nsnull) {
|
||||
nsGraphicsState* next = gs->mNext;
|
||||
delete gs;
|
||||
gs = next;
|
||||
}
|
||||
}
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
nsGraphicsState *
|
||||
nsGraphicsStatePool::PrivateGetNewGS()
|
||||
{
|
||||
nsGraphicsState* gs = mFreeList;
|
||||
if (gs != nsnull) {
|
||||
mFreeList = gs->mNext;
|
||||
return gs;
|
||||
}
|
||||
return new nsGraphicsState;
|
||||
}
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void
|
||||
nsGraphicsStatePool::PrivateReleaseGS(nsGraphicsState* aGS)
|
||||
{
|
||||
// aGS->Clear();
|
||||
aGS->mNext = mFreeList;
|
||||
mFreeList = aGS;
|
||||
}
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
91
mozilla/gfx/src/beos/nsGraphicsStateBeOS.h
Normal file
91
mozilla/gfx/src/beos/nsGraphicsStateBeOS.h
Normal file
@@ -0,0 +1,91 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsGraphicsStateBeOS_h___
|
||||
#define nsGraphicsStateBeOS_h___
|
||||
|
||||
#include "nsIRenderingContext.h"
|
||||
#include "nsIFontMetrics.h"
|
||||
#include "nsTransform2D.h"
|
||||
#include "nsRegionBeOS.h"
|
||||
#include "nsCOMPtr.h"
|
||||
|
||||
class nsGraphicsState
|
||||
{
|
||||
public:
|
||||
|
||||
nsTransform2D *mMatrix;
|
||||
nsCOMPtr<nsIRegion> mClipRegion;
|
||||
nscolor mColor;
|
||||
nsLineStyle mLineStyle;
|
||||
nsIFontMetrics *mFontMetrics;
|
||||
|
||||
nsGraphicsState *mNext; // link into free list of graphics states.
|
||||
|
||||
friend class nsGraphicsStatePool;
|
||||
|
||||
#ifndef USE_GS_POOL
|
||||
friend class nsRenderingContextBeOS;
|
||||
#endif
|
||||
|
||||
private:
|
||||
nsGraphicsState();
|
||||
~nsGraphicsState();
|
||||
};
|
||||
|
||||
class nsGraphicsStatePool
|
||||
{
|
||||
public:
|
||||
|
||||
static nsGraphicsState * GetNewGS();
|
||||
static void ReleaseGS(nsGraphicsState* aGS);
|
||||
|
||||
nsGraphicsStatePool();
|
||||
~nsGraphicsStatePool();
|
||||
|
||||
private:
|
||||
nsGraphicsState* mFreeList;
|
||||
|
||||
static nsGraphicsStatePool * PrivateGetPool();
|
||||
nsGraphicsState * PrivateGetNewGS();
|
||||
void PrivateReleaseGS(nsGraphicsState* aGS);
|
||||
|
||||
static nsGraphicsStatePool * gsThePool;
|
||||
};
|
||||
|
||||
#endif /* nsGraphicsStateBeOS_h___ */
|
||||
84
mozilla/gfx/src/beos/nsIDrawingSurfaceBeOS.h
Normal file
84
mozilla/gfx/src/beos/nsIDrawingSurfaceBeOS.h
Normal file
@@ -0,0 +1,84 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsIDrawingSurfaceBeOS_h___
|
||||
#define nsIDrawingSurfaceBeOS_h___
|
||||
|
||||
#include "nsIDrawingSurface.h"
|
||||
|
||||
#include <View.h>
|
||||
|
||||
// windows specific drawing surface method set
|
||||
|
||||
#define NS_IDRAWING_SURFACE_BEOS_IID \
|
||||
{ 0x1ed958b0, 0xcab6, 0x11d2, \
|
||||
{ 0xa8, 0x49, 0x00, 0x40, 0x95, 0x9a, 0x28, 0xc9 } }
|
||||
|
||||
class nsIDrawingSurfaceBeOS : public nsISupports
|
||||
{
|
||||
public:
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDRAWING_SURFACE_BEOS_IID)
|
||||
|
||||
/**
|
||||
* Initialize a drawing surface using a windows DC.
|
||||
* aDC is "owned" by the drawing surface until the drawing
|
||||
* surface is destroyed.
|
||||
* @param aDC HDC to initialize drawing surface with
|
||||
* @return error status
|
||||
**/
|
||||
NS_IMETHOD Init(BView *aView) = 0;
|
||||
|
||||
/**
|
||||
* Initialize an offscreen drawing surface using a
|
||||
* windows DC. aDC is not "owned" by this drawing surface, instead
|
||||
* it is used to create a drawing surface compatible
|
||||
* with aDC. if width or height are less than zero, aDC will
|
||||
* be created with no offscreen bitmap installed.
|
||||
* @param aDC HDC to initialize drawing surface with
|
||||
* @param aWidth width of drawing surface
|
||||
* @param aHeight height of drawing surface
|
||||
* @param aFlags flags used to control type of drawing
|
||||
* surface created
|
||||
* @return error status
|
||||
**/
|
||||
NS_IMETHOD Init(BView *aView, PRUint32 aWidth, PRUint32 aHeight,
|
||||
PRUint32 aFlags) = 0;
|
||||
|
||||
};
|
||||
|
||||
#endif // nsIDrawingSurfaceBeOS_h___
|
||||
712
mozilla/gfx/src/beos/nsImageBeOS.cpp
Normal file
712
mozilla/gfx/src/beos/nsImageBeOS.cpp
Normal file
@@ -0,0 +1,712 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsImageBeOS.h"
|
||||
#include "nsRenderingContextBeOS.h"
|
||||
|
||||
#include "nspr.h"
|
||||
//#include <string.h>
|
||||
|
||||
#include "imgScaler.h"
|
||||
|
||||
#define IsFlagSet(a,b) (a & b)
|
||||
|
||||
NS_IMPL_ISUPPORTS1(nsImageBeOS, nsIImage)
|
||||
|
||||
//------------------------------------------------------------
|
||||
|
||||
nsImageBeOS::nsImageBeOS()
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
mStaticImage = PR_FALSE;
|
||||
mImageBits = nsnull;
|
||||
mWidth = 0;
|
||||
mHeight = 0;
|
||||
mDepth = 0;
|
||||
mAlphaBits = nsnull;
|
||||
mAlphaDepth = 0;
|
||||
mRowBytes = 0;
|
||||
mSizeImage = 0;
|
||||
mAlphaHeight = 0;
|
||||
mAlphaWidth = 0;
|
||||
mImage = nsnull;
|
||||
mNaturalWidth = 0;
|
||||
mNaturalHeight = 0;
|
||||
|
||||
}
|
||||
|
||||
//------------------------------------------------------------
|
||||
|
||||
nsImageBeOS::~nsImageBeOS()
|
||||
{
|
||||
if (NULL != mImage) {
|
||||
delete mImage;
|
||||
mImage = NULL;
|
||||
}
|
||||
|
||||
if(nsnull != mImageBits) {
|
||||
delete[] (PRUint8*)mImageBits;
|
||||
mImageBits = nsnull;
|
||||
}
|
||||
|
||||
if (nsnull != mAlphaBits) {
|
||||
delete[] (PRUint8*)mAlphaBits;
|
||||
mAlphaBits = nsnull;
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------
|
||||
|
||||
nsresult
|
||||
nsImageBeOS::Init(PRInt32 aWidth, PRInt32 aHeight,
|
||||
PRInt32 aDepth, nsMaskRequirements aMaskRequirements)
|
||||
{
|
||||
if (nsnull != mImageBits) {
|
||||
delete[] (PRUint8*)mImageBits;
|
||||
mImageBits = nsnull;
|
||||
}
|
||||
|
||||
if (nsnull != mAlphaBits) {
|
||||
delete[] (PRUint8*)mAlphaBits;
|
||||
mAlphaBits = nsnull;
|
||||
}
|
||||
|
||||
SetDecodedRect(0,0,0,0); //init
|
||||
SetNaturalWidth(0);
|
||||
SetNaturalHeight(0);
|
||||
|
||||
if (24 == aDepth) {
|
||||
mNumBytesPixel = 3;
|
||||
} else {
|
||||
NS_ASSERTION(PR_FALSE, "unexpected image depth");
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
}
|
||||
|
||||
mWidth = aWidth;
|
||||
mHeight = aHeight;
|
||||
mDepth = aDepth;
|
||||
mIsTopToBottom = PR_TRUE;
|
||||
|
||||
// create the memory for the image
|
||||
ComputeMetrics();
|
||||
|
||||
mImageBits = (PRUint8*) new PRUint8[mSizeImage];
|
||||
|
||||
switch(aMaskRequirements)
|
||||
{
|
||||
case nsMaskRequirements_kNoMask:
|
||||
mAlphaBits = nsnull;
|
||||
mAlphaWidth = 0;
|
||||
mAlphaHeight = 0;
|
||||
break;
|
||||
|
||||
case nsMaskRequirements_kNeeds1Bit:
|
||||
mAlphaRowBytes = (aWidth + 7) / 8;
|
||||
mAlphaDepth = 1;
|
||||
|
||||
// 32-bit align each row
|
||||
mAlphaRowBytes = (mAlphaRowBytes + 3) & ~0x3;
|
||||
|
||||
mAlphaBits = new PRUint8[mAlphaRowBytes * aHeight];
|
||||
memset(mAlphaBits, 255, mAlphaRowBytes * aHeight);
|
||||
mAlphaWidth = aWidth;
|
||||
mAlphaHeight = aHeight;
|
||||
break;
|
||||
|
||||
case nsMaskRequirements_kNeeds8Bit:
|
||||
mAlphaRowBytes = aWidth;
|
||||
mAlphaDepth = 8;
|
||||
|
||||
// 32-bit align each row
|
||||
mAlphaRowBytes = (mAlphaRowBytes + 3) & ~0x3;
|
||||
mAlphaBits = new PRUint8[mAlphaRowBytes * aHeight];
|
||||
mAlphaWidth = aWidth;
|
||||
mAlphaHeight = aHeight;
|
||||
break;
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------
|
||||
|
||||
PRInt32 nsImageBeOS::GetHeight()
|
||||
{
|
||||
return mHeight;
|
||||
}
|
||||
|
||||
PRInt32 nsImageBeOS::GetWidth()
|
||||
{
|
||||
return mWidth;
|
||||
}
|
||||
|
||||
PRUint8 *nsImageBeOS::GetBits()
|
||||
{
|
||||
return mImageBits;
|
||||
}
|
||||
|
||||
void *nsImageBeOS::GetBitInfo()
|
||||
{
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
PRInt32 nsImageBeOS::GetLineStride()
|
||||
{
|
||||
return mRowBytes;
|
||||
}
|
||||
|
||||
nsColorMap *nsImageBeOS::GetColorMap()
|
||||
{
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
PRBool nsImageBeOS::IsOptimized()
|
||||
{
|
||||
return mStaticImage;
|
||||
}
|
||||
|
||||
PRUint8 *nsImageBeOS::GetAlphaBits()
|
||||
{
|
||||
return mAlphaBits;
|
||||
}
|
||||
|
||||
PRInt32 nsImageBeOS::GetAlphaWidth()
|
||||
{
|
||||
return mAlphaWidth;
|
||||
}
|
||||
|
||||
PRInt32 nsImageBeOS::GetAlphaHeight()
|
||||
{
|
||||
return mAlphaHeight;
|
||||
}
|
||||
|
||||
PRInt32 nsImageBeOS::GetAlphaLineStride()
|
||||
{
|
||||
return mAlphaRowBytes;
|
||||
}
|
||||
|
||||
nsIImage *nsImageBeOS::DuplicateImage()
|
||||
{
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
void nsImageBeOS::SetAlphaLevel(PRInt32 aAlphaLevel)
|
||||
{
|
||||
}
|
||||
|
||||
PRInt32 nsImageBeOS::GetAlphaLevel()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void nsImageBeOS::MoveAlphaMask(PRInt32 aX, PRInt32 aY)
|
||||
{
|
||||
}
|
||||
|
||||
//------------------------------------------------------------
|
||||
|
||||
// set up the palette to the passed in color array, RGB only in this array
|
||||
void
|
||||
nsImageBeOS::ImageUpdated(nsIDeviceContext *aContext,
|
||||
PRUint8 aFlags,
|
||||
nsRect *aUpdateRect)
|
||||
{
|
||||
mFlags = aFlags; // this should be 0'd out by Draw()
|
||||
|
||||
}
|
||||
|
||||
// Draw the bitmap, this method has a source and destination coordinates
|
||||
NS_IMETHODIMP
|
||||
nsImageBeOS::Draw(nsIRenderingContext &aContext, nsDrawingSurface aSurface,
|
||||
PRInt32 aSX, PRInt32 aSY, PRInt32 aSWidth, PRInt32 aSHeight,
|
||||
PRInt32 aDX, PRInt32 aDY, PRInt32 aDWidth, PRInt32 aDHeight)
|
||||
{
|
||||
nsDrawingSurfaceBeOS *beosdrawing =(nsDrawingSurfaceBeOS *) aSurface;
|
||||
BView *view;
|
||||
|
||||
beosdrawing->AcquireView(&view);
|
||||
|
||||
if((PR_FALSE == mStaticImage) || (NULL == mImage))
|
||||
BuildImage(aSurface);
|
||||
|
||||
if(NULL == mImage)
|
||||
return PR_FALSE;
|
||||
|
||||
if(view && view->LockLooper())
|
||||
{
|
||||
view->SetDrawingMode(B_OP_ALPHA);
|
||||
view->DrawBitmapAsync(mImage, BRect(aSX, aSY, aSX + aSWidth - 1, aSY + aSHeight - 1),
|
||||
BRect(aDX, aDY, aDX + aDWidth - 1, aDY + aDHeight - 1));
|
||||
view->SetDrawingMode(B_OP_COPY);
|
||||
view->Sync();
|
||||
view->UnlockLooper();
|
||||
}
|
||||
beosdrawing->ReleaseView();
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------
|
||||
|
||||
// Draw the bitmap, this draw just has destination coordinates
|
||||
NS_IMETHODIMP
|
||||
nsImageBeOS::Draw(nsIRenderingContext &aContext,
|
||||
nsDrawingSurface aSurface,
|
||||
PRInt32 aX, PRInt32 aY,
|
||||
PRInt32 aWidth, PRInt32 aHeight)
|
||||
{
|
||||
// XXX kipp: this is temporary code until we eliminate the
|
||||
// width/height arguments from the draw method.
|
||||
aWidth = PR_MIN(aWidth, mWidth);
|
||||
aHeight = PR_MIN(aHeight, mHeight);
|
||||
|
||||
nsDrawingSurfaceBeOS *beosdrawing = (nsDrawingSurfaceBeOS *) aSurface;
|
||||
BView *view;
|
||||
|
||||
beosdrawing->AcquireView(&view);
|
||||
|
||||
if((PR_FALSE == mStaticImage) || (NULL == mImage))
|
||||
BuildImage(aSurface);
|
||||
|
||||
if(NULL == mImage)
|
||||
return PR_FALSE;
|
||||
|
||||
if(view && view->LockLooper())
|
||||
{
|
||||
view->SetDrawingMode(B_OP_ALPHA);
|
||||
view->DrawBitmapAsync(mImage,
|
||||
BRect(0, 0, aWidth - 1, aHeight - 1),
|
||||
BRect(aX, aY, aX + aWidth - 1, aY + aHeight - 1));
|
||||
view->SetDrawingMode(B_OP_COPY);
|
||||
view->Sync();
|
||||
view->UnlockLooper();
|
||||
}
|
||||
beosdrawing->ReleaseView();
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* Draw a tiled version of the bitmap
|
||||
* @update - dwc 3/30/00
|
||||
* @param aSurface the surface to blit to
|
||||
* @param aX0 starting x
|
||||
* @param aY0 starting y
|
||||
* @param aX1 ending x
|
||||
* @param aY1 ending y
|
||||
* @param aWidth The destination width of the pixelmap
|
||||
* @param aHeight The destination height of the pixelmap
|
||||
*/
|
||||
NS_IMETHODIMP nsImageBeOS::DrawTile(nsIRenderingContext &aContext,
|
||||
nsDrawingSurface aSurface,
|
||||
nsRect &aSrcRect,
|
||||
nsRect &aTileRect)
|
||||
{
|
||||
PRInt32 aY0 = aTileRect.y,
|
||||
aX0 = aTileRect.x,
|
||||
aY1 = aTileRect.y + aTileRect.height,
|
||||
aX1 = aTileRect.x + aTileRect.width;
|
||||
|
||||
for (PRInt32 y = aY0; y < aY1; y+=aSrcRect.height)
|
||||
for (PRInt32 x = aX0; x < aX1; x+=aSrcRect.width)
|
||||
Draw(aContext,aSurface,x,y,
|
||||
PR_MIN(aSrcRect.width, aX1-x),
|
||||
PR_MIN(aSrcRect.height, aY1-y));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsImageBeOS::DrawTile(nsIRenderingContext &aContext,
|
||||
nsDrawingSurface aSurface,
|
||||
PRInt32 aSXOffset, PRInt32 aSYOffset,
|
||||
const nsRect &aTileRect)
|
||||
{
|
||||
PRInt32
|
||||
validX = 0,
|
||||
validY = 0,
|
||||
validWidth = mWidth,
|
||||
validHeight = mHeight;
|
||||
|
||||
// limit the image rectangle to the size of the image data which
|
||||
// has been validated.
|
||||
if ((mDecodedY2 < mHeight)) {
|
||||
validHeight = mDecodedY2 - mDecodedY1;
|
||||
}
|
||||
if ((mDecodedX2 < mWidth)) {
|
||||
validWidth = mDecodedX2 - mDecodedX1;
|
||||
}
|
||||
if ((mDecodedY1 > 0)) {
|
||||
validHeight -= mDecodedY1;
|
||||
validY = mDecodedY1;
|
||||
}
|
||||
if ((mDecodedX1 > 0)) {
|
||||
validWidth -= mDecodedX1;
|
||||
validX = mDecodedX1;
|
||||
}
|
||||
|
||||
PRInt32 aY0 = aTileRect.y - aSYOffset,
|
||||
aX0 = aTileRect.x - aSXOffset,
|
||||
aY1 = aTileRect.y + aTileRect.height,
|
||||
aX1 = aTileRect.x + aTileRect.width;
|
||||
|
||||
// Set up clipping and call Draw().
|
||||
PRBool clipState;
|
||||
aContext.PushState();
|
||||
aContext.SetClipRect(aTileRect, nsClipCombine_kIntersect,
|
||||
clipState);
|
||||
|
||||
for (PRInt32 y = aY0; y < aY1; y+=validHeight)
|
||||
for (PRInt32 x = aX0; x < aX1; x+=validWidth)
|
||||
Draw(aContext,aSurface,x,y, PR_MIN(validWidth, aX1-x),
|
||||
PR_MIN(validHeight, aY1-y));
|
||||
|
||||
aContext.PopState(clipState);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult nsImageBeOS::BuildImage(nsDrawingSurface aDrawingSurface)
|
||||
{
|
||||
if(NULL != mImage)
|
||||
{
|
||||
delete mImage;
|
||||
mImage = NULL;
|
||||
}
|
||||
|
||||
// ConvertImage(aDrawingSurface);
|
||||
CreateImage(aDrawingSurface);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void nsImageBeOS::CreateImage(nsDrawingSurface aSurface)
|
||||
{
|
||||
if(mImageBits)
|
||||
{
|
||||
color_space cs;
|
||||
if(mDepth == 8)
|
||||
cs = B_CMAP8;
|
||||
else
|
||||
cs = B_RGBA32;
|
||||
mImage = new BBitmap(BRect(0, 0, mWidth - 1, mHeight - 1), cs);
|
||||
|
||||
PRInt32 span = (mWidth * mDepth) >> 5;
|
||||
|
||||
if (((PRUint32)mWidth * mDepth) & 0x1F)
|
||||
span++;
|
||||
span <<= 2;
|
||||
if( mImage && mImage->IsValid() )
|
||||
{
|
||||
uint8 *dest = (uint8*)mImage->Bits();
|
||||
uint8 *src = mImageBits;
|
||||
uint8 *alpha = mAlphaBits;
|
||||
|
||||
if(mAlphaBits)
|
||||
{
|
||||
if( mDepth == 32 )
|
||||
{
|
||||
uint32 *pdest, *psrc;
|
||||
for( int j=0; j<mHeight; j++ )
|
||||
{
|
||||
for( int i=0; i<mWidth; i++ )
|
||||
{
|
||||
pdest = (uint32*)dest; psrc = (uint32*)src;
|
||||
// ANSI Shit, can't cast the lvalue!
|
||||
*pdest = *psrc;
|
||||
dest[3] = mAlphaDepth == 1 ? ((alpha[i / 8] & (1 << (7 - (i % 8)))) ? 255 : 0) : alpha[i];
|
||||
dest += 4;
|
||||
src+=4;
|
||||
}
|
||||
src += span - (mWidth*mNumBytesPixel);
|
||||
alpha += mAlphaRowBytes;
|
||||
}
|
||||
}
|
||||
else if( mDepth == 8 )
|
||||
{
|
||||
for( int j=0; j<mHeight; j++ )
|
||||
{
|
||||
for( int i=0; i<mWidth * mNumBytesPixel; i++ )
|
||||
*dest++ = *src++;
|
||||
src += span - (mWidth*mNumBytesPixel);
|
||||
}
|
||||
}
|
||||
else if( mDepth == 24 )
|
||||
{
|
||||
for( int j=0; j<mHeight; j++ )
|
||||
{
|
||||
for( int i=0; i<mWidth; i++ )
|
||||
{
|
||||
dest[0] = src[0];
|
||||
dest[1] = src[1];
|
||||
dest[2] = src[2];
|
||||
dest[3] = mAlphaDepth == 1 ? ((alpha[i / 8] & (1 << (7 - (i % 8)))) ? 255 : 0) : alpha[i];
|
||||
dest+= 4;
|
||||
src+=3;
|
||||
}
|
||||
src += span - (mWidth*mNumBytesPixel);
|
||||
alpha += mAlphaRowBytes;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if( mDepth == 32 )
|
||||
{
|
||||
uint32 *pdest, *psrc;
|
||||
for( int j=0; j<mHeight; j++ )
|
||||
{
|
||||
for( int i=0; i<mWidth; i++ )
|
||||
{
|
||||
pdest = (uint32*)dest; psrc = (uint32*)src;
|
||||
// ANSI Shit, can't cast the lvalue!
|
||||
*pdest = *psrc;
|
||||
dest += 4; src+=4;
|
||||
}
|
||||
src += span - (mWidth*mNumBytesPixel);
|
||||
}
|
||||
}
|
||||
else if( mDepth == 8 )
|
||||
{
|
||||
for( int j=0; j<mHeight; j++ )
|
||||
{
|
||||
for( int i=0; i<mWidth * mNumBytesPixel; i++ )
|
||||
*dest++ = *src++;
|
||||
src += span - (mWidth*mNumBytesPixel);
|
||||
}
|
||||
}
|
||||
else if( mDepth == 24 )
|
||||
{
|
||||
for( int j=0; j<mHeight; j++ )
|
||||
{
|
||||
for( int i=0; i<mWidth; i++ )
|
||||
{
|
||||
memcpy( dest, src, mNumBytesPixel );
|
||||
dest[3] = 255;
|
||||
dest+= 4;
|
||||
src+=3;
|
||||
}
|
||||
src += span - (mWidth*mNumBytesPixel);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------
|
||||
|
||||
nsresult nsImageBeOS::Optimize(nsIDeviceContext* aContext)
|
||||
{
|
||||
mStaticImage = PR_TRUE;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------
|
||||
// lock the image pixels. Implement this if you need it.
|
||||
NS_IMETHODIMP
|
||||
nsImageBeOS::LockImagePixels(PRBool aMaskPixels)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------
|
||||
// unlock the image pixels. Implement this if you need it.
|
||||
NS_IMETHODIMP
|
||||
nsImageBeOS::UnlockImagePixels(PRBool aMaskPixels)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------
|
||||
// Set the decoded dimens of the image
|
||||
//
|
||||
NS_IMETHODIMP
|
||||
nsImageBeOS::SetDecodedRect(PRInt32 x1, PRInt32 y1, PRInt32 x2, PRInt32 y2 )
|
||||
{
|
||||
mDecodedX1 = x1;
|
||||
mDecodedY1 = y1;
|
||||
mDecodedX2 = x2;
|
||||
mDecodedY2 = y2;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
#ifdef USE_IMG2
|
||||
NS_IMETHODIMP nsImageBeOS::DrawToImage(nsIImage* aDstImage,
|
||||
nscoord aDX, nscoord aDY,
|
||||
nscoord aDWidth, nscoord aDHeight)
|
||||
{
|
||||
nsImageBeOS *dest = NS_STATIC_CAST(nsImageBeOS *, aDstImage);
|
||||
|
||||
if (!dest)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
if (!dest->mImage)
|
||||
dest->CreateImage(NULL);
|
||||
|
||||
if (!dest->mImage)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
if (!mImage)
|
||||
CreateImage(NULL);
|
||||
|
||||
if (!mImage)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
BBitmap *bmpDst = dest->mImage;
|
||||
BBitmap bmpTmp(bmpDst->Bounds(), bmpDst->ColorSpace(), true);
|
||||
BView *v = new BView(bmpDst->Bounds(), "", 0, 0);
|
||||
if (!v)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
memcpy( bmpTmp.Bits(), bmpDst->Bits(), bmpDst->BitsLength() );
|
||||
bmpTmp.AddChild(v);
|
||||
|
||||
bmpTmp.Lock();
|
||||
v->SetDrawingMode(B_OP_ALPHA);
|
||||
v->SetBlendingMode(B_PIXEL_ALPHA, B_ALPHA_COMPOSITE);
|
||||
v->DrawBitmap(mImage, BRect(0, 0, mWidth - 1, mHeight - 1), BRect( aDX, aDY, aDX + aDWidth - 1, aDY + aDHeight -1 ));
|
||||
v->SetDrawingMode(B_OP_COPY);
|
||||
v->Sync();
|
||||
bmpTmp.Unlock();
|
||||
bmpTmp.RemoveChild(v);
|
||||
bmpDst->SetBits(bmpTmp.Bits(), bmpTmp.BitsLength(), 0, bmpTmp.ColorSpace() );
|
||||
delete v;
|
||||
|
||||
//
|
||||
// following part is derived from GTK version
|
||||
// 2001/6/21 Makoto Hamanaka < VTA04230@nifty.com >
|
||||
|
||||
// need to copy the mImageBits in case we're rendered scaled
|
||||
PRUint8 *scaledImage = 0, *scaledAlpha = 0;
|
||||
PRUint8 *rgbPtr=0, *alphaPtr=0;
|
||||
PRUint32 rgbStride, alphaStride;
|
||||
|
||||
if ((aDWidth != mWidth) || (aDHeight != mHeight)) {
|
||||
// scale factor in DrawTo... start scaling
|
||||
scaledImage = (PRUint8 *)nsMemory::Alloc(3*aDWidth*aDHeight);
|
||||
if (!scaledImage)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
RectStretch(0, 0, mWidth-1, mHeight-1, 0, 0, aDWidth-1, aDHeight-1,
|
||||
mImageBits, mRowBytes, scaledImage, 3*aDWidth, 24);
|
||||
|
||||
if (mAlphaDepth) {
|
||||
if (mAlphaDepth==1)
|
||||
alphaStride = (aDWidth+7)>>3; // round to next byte
|
||||
else
|
||||
alphaStride = aDWidth;
|
||||
|
||||
scaledAlpha = (PRUint8 *)nsMemory::Alloc(alphaStride*aDHeight);
|
||||
if (!scaledAlpha) {
|
||||
nsMemory::Free(scaledImage);
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
RectStretch(0, 0, mWidth-1, mHeight-1, 0, 0, aDWidth-1, aDHeight-1,
|
||||
mAlphaBits, mAlphaRowBytes, scaledAlpha, alphaStride,
|
||||
mAlphaDepth);
|
||||
}
|
||||
rgbPtr = scaledImage;
|
||||
rgbStride = 3*aDWidth;
|
||||
alphaPtr = scaledAlpha;
|
||||
} else {
|
||||
rgbPtr = mImageBits;
|
||||
rgbStride = mRowBytes;
|
||||
alphaPtr = mAlphaBits;
|
||||
alphaStride = mAlphaRowBytes;
|
||||
}
|
||||
|
||||
PRInt32 y;
|
||||
// now composite the two images together
|
||||
switch (mAlphaDepth) {
|
||||
case 1:
|
||||
for (y=0; y<aDHeight; y++) {
|
||||
PRUint8 *dst = dest->mImageBits + (y+aDY)*dest->mRowBytes + 3*aDX;
|
||||
PRUint8 *dstAlpha = dest->mAlphaBits + (y+aDY)*dest->mAlphaRowBytes;
|
||||
PRUint8 *src = rgbPtr + y*rgbStride;
|
||||
PRUint8 *alpha = alphaPtr + y*alphaStride;
|
||||
for (int x=0; x<aDWidth; x++, dst+=3, src+=3) {
|
||||
#define NS_GET_BIT(rowptr, x) (rowptr[(x)>>3] & (1<<(7-(x)&0x7)))
|
||||
#define NS_SET_BIT(rowptr, x) (rowptr[(x)>>3] |= (1<<(7-(x)&0x7)))
|
||||
|
||||
// if this pixel is opaque then copy into the destination image
|
||||
if (NS_GET_BIT(alpha, x)) {
|
||||
dst[0] = src[0];
|
||||
dst[1] = src[1];
|
||||
dst[2] = src[2];
|
||||
NS_SET_BIT(dstAlpha, aDX+x);
|
||||
}
|
||||
|
||||
#undef NS_GET_BIT
|
||||
#undef NS_SET_BIT
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 8:
|
||||
for (y=0; y<aDHeight; y++) {
|
||||
PRUint8 *dst = dest->mImageBits + (y+aDY)*dest->mRowBytes + 3*aDX;
|
||||
PRUint8 *dstAlpha =
|
||||
dest->mAlphaBits + (y+aDY)*dest->mAlphaRowBytes + aDX;
|
||||
PRUint8 *src = rgbPtr + y*rgbStride;
|
||||
PRUint8 *alpha = alphaPtr + y*alphaStride;
|
||||
for (int x=0; x<aDWidth; x++, dst+=3, dstAlpha++, src+=3, alpha++) {
|
||||
|
||||
// blend this pixel over the destination image
|
||||
unsigned val = *alpha;
|
||||
MOZ_BLEND(dst[0], dst[0], src[0], val);
|
||||
MOZ_BLEND(dst[1], dst[1], src[1], val);
|
||||
MOZ_BLEND(dst[2], dst[2], src[2], val);
|
||||
MOZ_BLEND(*dstAlpha, *dstAlpha, val, val);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 0:
|
||||
default:
|
||||
for (y=0; y<aDHeight; y++)
|
||||
memcpy(dest->mImageBits + (y+aDY)*dest->mRowBytes + 3*aDX,
|
||||
rgbPtr + y*rgbStride,
|
||||
3*aDWidth);
|
||||
}
|
||||
if (scaledAlpha)
|
||||
nsMemory::Free(scaledAlpha);
|
||||
if (scaledImage)
|
||||
nsMemory::Free(scaledImage);
|
||||
|
||||
return NS_OK;
|
||||
|
||||
}
|
||||
#endif
|
||||
187
mozilla/gfx/src/beos/nsImageBeOS.h
Normal file
187
mozilla/gfx/src/beos/nsImageBeOS.h
Normal file
@@ -0,0 +1,187 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsImageBeOS_h___
|
||||
#define nsImageBeOS_h___
|
||||
|
||||
#include "nsIImage.h"
|
||||
#include "nsPoint.h"
|
||||
|
||||
#include <Bitmap.h>
|
||||
|
||||
#undef Bool
|
||||
|
||||
class nsImageBeOS : public nsIImage
|
||||
{
|
||||
public:
|
||||
nsImageBeOS();
|
||||
virtual ~nsImageBeOS();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
/**
|
||||
@see nsIImage.h
|
||||
*/
|
||||
virtual PRInt32 GetBytesPix() { return mNumBytesPixel; }
|
||||
virtual PRInt32 GetHeight();
|
||||
virtual PRInt32 GetWidth();
|
||||
virtual PRUint8* GetBits();
|
||||
virtual void* GetBitInfo();
|
||||
virtual PRBool GetIsRowOrderTopToBottom() { return mIsTopToBottom; }
|
||||
virtual PRInt32 GetLineStride();
|
||||
|
||||
NS_IMETHOD SetNaturalWidth(PRInt32 naturalwidth) { mNaturalWidth= naturalwidth; return NS_OK;}
|
||||
NS_IMETHOD SetNaturalHeight(PRInt32 naturalheight) { mNaturalHeight= naturalheight; return NS_OK;}
|
||||
virtual PRInt32 GetNaturalWidth() {return mNaturalWidth; }
|
||||
virtual PRInt32 GetNaturalHeight() {return mNaturalHeight; }
|
||||
|
||||
NS_IMETHOD SetDecodedRect(PRInt32 x1, PRInt32 y1, PRInt32 x2, PRInt32 y2);
|
||||
virtual PRInt32 GetDecodedX1() { return mDecodedX1;}
|
||||
virtual PRInt32 GetDecodedY1() { return mDecodedY1;}
|
||||
virtual PRInt32 GetDecodedX2() { return mDecodedX2;}
|
||||
virtual PRInt32 GetDecodedY2() { return mDecodedY2;}
|
||||
|
||||
virtual nsColorMap* GetColorMap();
|
||||
|
||||
NS_IMETHOD Draw(nsIRenderingContext &aContext,
|
||||
nsDrawingSurface aSurface,
|
||||
PRInt32 aX, PRInt32 aY,
|
||||
PRInt32 aWidth, PRInt32 aHeight);
|
||||
NS_IMETHOD Draw(nsIRenderingContext &aContext,
|
||||
nsDrawingSurface aSurface,
|
||||
PRInt32 aSX, PRInt32 aSY, PRInt32 aSWidth, PRInt32 aSHeight,
|
||||
PRInt32 aDX, PRInt32 aDY, PRInt32 aDWidth, PRInt32 aDHeight);
|
||||
|
||||
#ifdef USE_IMG2
|
||||
NS_IMETHOD DrawToImage(nsIImage* aDstImage, nscoord aDX, nscoord aDY,
|
||||
nscoord aDWidth, nscoord aDHeight);
|
||||
#endif
|
||||
|
||||
NS_IMETHOD DrawTile(nsIRenderingContext &aContext,
|
||||
nsDrawingSurface aSurface,
|
||||
nsRect &aSrcRect,
|
||||
nsRect &aTileRect);
|
||||
|
||||
NS_IMETHOD DrawTile(nsIRenderingContext &aContext,
|
||||
nsDrawingSurface aSurface,
|
||||
PRInt32 aSXOffset, PRInt32 aSYOffset,
|
||||
const nsRect &aTileRect);
|
||||
|
||||
virtual void ImageUpdated(nsIDeviceContext *aContext,
|
||||
PRUint8 aFlags, nsRect *aUpdateRect);
|
||||
virtual nsresult Init(PRInt32 aWidth, PRInt32 aHeight,
|
||||
PRInt32 aDepth,
|
||||
nsMaskRequirements aMaskRequirements);
|
||||
virtual PRBool IsOptimized();
|
||||
|
||||
virtual nsresult Optimize(nsIDeviceContext* aContext);
|
||||
|
||||
virtual PRBool GetHasAlphaMask() { return mAlphaBits != nsnull; }
|
||||
virtual PRUint8* GetAlphaBits();
|
||||
virtual PRInt32 GetAlphaWidth();
|
||||
virtual PRInt32 GetAlphaHeight();
|
||||
virtual PRInt32 GetAlphaLineStride();
|
||||
virtual nsIImage* DuplicateImage();
|
||||
|
||||
virtual void SetAlphaLevel(PRInt32 aAlphaLevel);
|
||||
virtual PRInt32 GetAlphaLevel();
|
||||
/**
|
||||
* Get the alpha depth for the image mask
|
||||
* @update - lordpixel 2001/05/16
|
||||
* @return the alpha mask depth for the image, ie, 0, 1 or 8
|
||||
*/
|
||||
virtual PRInt8 GetAlphaDepth() {return(mAlphaDepth);}
|
||||
virtual void MoveAlphaMask(PRInt32 aX, PRInt32 aY);
|
||||
|
||||
NS_IMETHOD LockImagePixels(PRBool aMaskPixels);
|
||||
NS_IMETHOD UnlockImagePixels(PRBool aMaskPixels);
|
||||
|
||||
private:
|
||||
/**
|
||||
* Calculate the amount of memory needed for the initialization of the image
|
||||
*/
|
||||
void ComputeMetrics() {
|
||||
mRowBytes = (mWidth * mDepth) >> 5;
|
||||
|
||||
if (((PRUint32)mWidth * mDepth) & 0x1F)
|
||||
mRowBytes++;
|
||||
mRowBytes <<= 2;
|
||||
|
||||
mSizeImage = mRowBytes * mHeight;
|
||||
};
|
||||
void ComputePaletteSize(PRIntn nBitCount);
|
||||
|
||||
protected:
|
||||
void CreateImage(nsDrawingSurface aSurface);
|
||||
nsresult BuildImage(nsDrawingSurface aDrawingSurface);
|
||||
|
||||
private:
|
||||
BBitmap *mImage;
|
||||
PRBool mStaticImage;
|
||||
|
||||
PRInt32 mWidth;
|
||||
PRInt32 mHeight;
|
||||
PRInt32 mDepth; // bits per pixel
|
||||
PRInt32 mRowBytes;
|
||||
PRUint8 *mImageBits;
|
||||
PRUint8 *mConvertedBits;
|
||||
PRInt32 mSizeImage;
|
||||
PRBool mIsTopToBottom;
|
||||
|
||||
PRInt8 mNumBytesPixel;
|
||||
|
||||
PRInt32 mNaturalWidth;
|
||||
PRInt32 mNaturalHeight;
|
||||
|
||||
PRInt32 mDecodedX1; //Keeps track of what part of image
|
||||
PRInt32 mDecodedY1; // has been decoded.
|
||||
PRInt32 mDecodedX2;
|
||||
PRInt32 mDecodedY2;
|
||||
|
||||
// alpha layer members
|
||||
PRUint8 *mAlphaBits;
|
||||
PRInt8 mAlphaDepth; // alpha layer depth
|
||||
PRInt16 mAlphaRowBytes; // alpha bytes per row
|
||||
PRInt16 mAlphaWidth; // alpha layer width
|
||||
PRInt16 mAlphaHeight; // alpha layer height
|
||||
nsPoint mLocation; // alpha mask location
|
||||
|
||||
PRUint8 mFlags; // flags set by ImageUpdated
|
||||
};
|
||||
|
||||
#endif
|
||||
59
mozilla/gfx/src/beos/nsPrintOptionsBeOS.cpp
Normal file
59
mozilla/gfx/src/beos/nsPrintOptionsBeOS.cpp
Normal file
@@ -0,0 +1,59 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Paul Ashford <arougthopher@lizardland.net>
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
#include "nsPrintOptionsBeOS.h"
|
||||
|
||||
|
||||
|
||||
/** ---------------------------------------------------
|
||||
* See documentation in nsPrintOptionsWin.h
|
||||
* @update 6/21/00 dwc
|
||||
*/
|
||||
nsPrintOptionsBeOS::nsPrintOptionsBeOS()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/** ---------------------------------------------------
|
||||
* See documentation in nsPrintOptionsImpl.h
|
||||
* @update 6/21/00 dwc
|
||||
*/
|
||||
nsPrintOptionsBeOS::~nsPrintOptionsBeOS()
|
||||
{
|
||||
}
|
||||
|
||||
59
mozilla/gfx/src/beos/nsPrintOptionsBeOS.h
Normal file
59
mozilla/gfx/src/beos/nsPrintOptionsBeOS.h
Normal file
@@ -0,0 +1,59 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Paul Ashford <arougthopher@lizardland.net>
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
#ifndef nsPrintOptionsBeOS_h__
|
||||
#define nsPrintOptionsBeOS_h__
|
||||
|
||||
#include "nsPrintOptionsImpl.h"
|
||||
|
||||
|
||||
//*****************************************************************************
|
||||
//*** nsPrintOptions
|
||||
//*****************************************************************************
|
||||
class nsPrintOptionsBeOS : public nsPrintOptions
|
||||
{
|
||||
public:
|
||||
nsPrintOptionsBeOS();
|
||||
virtual ~nsPrintOptionsBeOS();
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif /* nsPrintOptions_h__ */
|
||||
91
mozilla/gfx/src/beos/nsPrintdBeOS.h
Normal file
91
mozilla/gfx/src/beos/nsPrintdBeOS.h
Normal file
@@ -0,0 +1,91 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/* Original Code: Syd Logan (syd@netscape.com) 3/12/99 */
|
||||
|
||||
#ifndef nsPrintdBeOS_h___
|
||||
#define nsPrintdBeOS_h___
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
PR_BEGIN_EXTERN_C
|
||||
|
||||
/* stolen from nsPostScriptObj.h. needs to be put somewhere else that
|
||||
both ps and gtk can see easily */
|
||||
|
||||
#ifndef NS_LEGAL_SIZE
|
||||
#define NS_LETTER_SIZE 0
|
||||
#define NS_LEGAL_SIZE 1
|
||||
#define NS_EXECUTIVE_SIZE 2
|
||||
#define NS_A4_SIZE 3
|
||||
#define NS_A3_SIZE 4
|
||||
|
||||
#define NS_PORTRAIT 0
|
||||
#define NS_LANDSCAPE 1
|
||||
#endif
|
||||
|
||||
#ifndef PATH_MAX
|
||||
#ifdef _POSIX_PATH_MAX
|
||||
#define PATH_MAX _POSIX_PATH_MAX
|
||||
#else
|
||||
#define PATH_MAX 256
|
||||
#endif
|
||||
#endif
|
||||
|
||||
typedef struct beosprdata {
|
||||
PRBool toPrinter; /* If PR_TRUE, print to printer */
|
||||
PRBool fpf; /* If PR_TRUE, first page first */
|
||||
PRBool grayscale; /* If PR_TRUE, print grayscale */
|
||||
int size; /* Paper size e.g., SizeLetter */
|
||||
int orientation; /* Page orientation, e.g. portrait */
|
||||
char command[ PATH_MAX ]; /* Print command e.g., lpr */
|
||||
char path[ PATH_MAX ]; /* If toPrinter = PR_FALSE, dest file */
|
||||
char printer[256]; /* Printer name */
|
||||
int copies; /* number of copies */
|
||||
PRBool cancel; /* If PR_TRUE, user cancelled */
|
||||
float left; /* left margin */
|
||||
float right; /* right margin */
|
||||
float top; /* top margin */
|
||||
float bottom; /* bottom margin */
|
||||
} BeOSPrData;
|
||||
|
||||
//void BeOSPrDialog(UnixPrData *prData);
|
||||
|
||||
PR_END_EXTERN_C
|
||||
|
||||
#endif /* !defined(nsPrintdBeOS_h___) */
|
||||
264
mozilla/gfx/src/beos/nsRegionBeOS.cpp
Normal file
264
mozilla/gfx/src/beos/nsRegionBeOS.cpp
Normal file
@@ -0,0 +1,264 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include <Region.h>
|
||||
|
||||
#include "nsRegionBeOS.h"
|
||||
#include "prmem.h"
|
||||
|
||||
#ifdef DEBUG_REGIONS
|
||||
static int nRegions;
|
||||
#endif
|
||||
|
||||
static NS_DEFINE_IID(kRegionIID, NS_IREGION_IID);
|
||||
|
||||
nsRegionBeOS :: nsRegionBeOS()
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
|
||||
#ifdef DEBUG_REGIONS
|
||||
++nRegions;
|
||||
printf("REGIONS+ = %i\n", nRegions);
|
||||
#endif
|
||||
|
||||
mRegion.MakeEmpty();
|
||||
mRegionType = eRegionComplexity_empty;
|
||||
}
|
||||
|
||||
nsRegionBeOS :: ~nsRegionBeOS()
|
||||
{
|
||||
#ifdef DEBUG_REGIONS
|
||||
--nRegions;
|
||||
printf("REGIONS- = %i\n", nRegions);
|
||||
#endif
|
||||
|
||||
mRegion.MakeEmpty();
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS1(nsRegionBeOS, nsIRegion)
|
||||
|
||||
nsresult nsRegionBeOS :: Init(void)
|
||||
{
|
||||
mRegion.MakeEmpty();
|
||||
mRegionType = eRegionComplexity_empty;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void nsRegionBeOS :: SetTo(const nsIRegion &aRegion)
|
||||
{
|
||||
Init();
|
||||
|
||||
nsRegionBeOS *pRegion = (nsRegionBeOS *)&aRegion;
|
||||
|
||||
mRegion = pRegion->mRegion;
|
||||
SetRegionType();
|
||||
}
|
||||
|
||||
void nsRegionBeOS :: SetTo(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight)
|
||||
{
|
||||
Init();
|
||||
|
||||
mRegion.Set(BRect(aX, aY, aX + aWidth - 1, aY + aHeight - 1));
|
||||
SetRegionType();
|
||||
}
|
||||
|
||||
void nsRegionBeOS :: Intersect(const nsIRegion &aRegion)
|
||||
{
|
||||
nsRegionBeOS *pRegion = (nsRegionBeOS*)&aRegion;
|
||||
|
||||
mRegion.IntersectWith(&pRegion->mRegion);
|
||||
SetRegionType();
|
||||
}
|
||||
|
||||
void nsRegionBeOS :: Intersect(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight)
|
||||
{
|
||||
BRegion tRegion;
|
||||
tRegion.Set( BRect( aX, aY, aX + aWidth - 1, aY + aHeight - 1 ) );
|
||||
mRegion.IntersectWith(&tRegion);
|
||||
SetRegionType();
|
||||
}
|
||||
|
||||
void nsRegionBeOS :: Union(const nsIRegion &aRegion)
|
||||
{
|
||||
nsRegionBeOS *pRegion = (nsRegionBeOS*)&aRegion;
|
||||
|
||||
mRegion.Include(&pRegion->mRegion);
|
||||
SetRegionType();
|
||||
}
|
||||
|
||||
void nsRegionBeOS :: Union(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight)
|
||||
{
|
||||
mRegion.Include(BRect(aX, aY, aX + aWidth - 1, aY + aHeight - 1));
|
||||
SetRegionType();
|
||||
}
|
||||
|
||||
void nsRegionBeOS :: Subtract(const nsIRegion &aRegion)
|
||||
{
|
||||
nsRegionBeOS *pRegion = (nsRegionBeOS*)&aRegion;
|
||||
|
||||
mRegion.Exclude(&pRegion->mRegion);
|
||||
SetRegionType();
|
||||
}
|
||||
|
||||
void nsRegionBeOS :: Subtract(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight)
|
||||
{
|
||||
mRegion.Exclude(BRect(aX, aY, aX + aWidth - 1, aY + aHeight - 1));
|
||||
SetRegionType();
|
||||
}
|
||||
|
||||
PRBool nsRegionBeOS :: IsEmpty(void)
|
||||
{
|
||||
if( mRegionType == eRegionComplexity_empty )
|
||||
return PR_TRUE;
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
PRBool nsRegionBeOS :: IsEqual(const nsIRegion &aRegion)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
printf(" - nsRegionBeOS :: IsEqual not implemented!\n");
|
||||
#endif
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
void nsRegionBeOS :: GetBoundingBox(PRInt32 *aX, PRInt32 *aY, PRInt32 *aWidth, PRInt32 *aHeight)
|
||||
{
|
||||
if( mRegion.CountRects() ) {
|
||||
BRect rect = mRegion.Frame();
|
||||
*aX = nscoord(rect.left);
|
||||
*aY = nscoord(rect.top);
|
||||
*aWidth = nscoord(rect.Width()+1);
|
||||
*aHeight = nscoord(rect.Height()+1);
|
||||
}
|
||||
else
|
||||
{
|
||||
*aX = *aY = *aWidth = *aHeight = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void nsRegionBeOS :: Offset(PRInt32 aXOffset, PRInt32 aYOffset)
|
||||
{
|
||||
mRegion.OffsetBy( aXOffset, aYOffset );
|
||||
}
|
||||
|
||||
void nsRegionBeOS :: SetRegionType(void)
|
||||
{
|
||||
if(mRegion.CountRects() == 1)
|
||||
mRegionType = eRegionComplexity_rect ;
|
||||
else if(mRegion.CountRects() > 1)
|
||||
mRegionType = eRegionComplexity_complex ;
|
||||
else
|
||||
mRegionType = eRegionComplexity_empty;
|
||||
}
|
||||
|
||||
PRBool nsRegionBeOS :: ContainsRect(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight)
|
||||
{
|
||||
return mRegion.Intersects(BRect(aX, aY, aX + aWidth - 1, aY + aHeight - 1));
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsRegionBeOS :: GetRects(nsRegionRectSet **aRects)
|
||||
{
|
||||
nsRegionRectSet *rects;
|
||||
int nbox;
|
||||
nsRegionRect *rect;
|
||||
|
||||
NS_ASSERTION(!(nsnull == aRects), "bad ptr");
|
||||
|
||||
//code lifted from old xfe. MMP
|
||||
|
||||
nbox = mRegion.CountRects();
|
||||
|
||||
rects = *aRects;
|
||||
|
||||
if ((nsnull == rects) || (rects->mRectsLen < (PRUint32)nbox))
|
||||
{
|
||||
void *buf = PR_Realloc(rects, sizeof(nsRegionRectSet) + (sizeof(nsRegionRect) * (nbox - 1)));
|
||||
|
||||
if(nsnull == buf)
|
||||
{
|
||||
if(nsnull != rects)
|
||||
rects->mNumRects = 0;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
rects = (nsRegionRectSet *)buf;
|
||||
rects->mRectsLen = nbox;
|
||||
}
|
||||
|
||||
rects->mNumRects = nbox;
|
||||
rects->mArea = 0;
|
||||
rect = &rects->mRects[0];
|
||||
|
||||
for(int32 i = 0; i < nbox; i++)
|
||||
{
|
||||
BRect r = mRegion.RectAt(i);
|
||||
rect->x = nscoord(r.left);
|
||||
rect->width = nscoord(r.right - r.left + 1);
|
||||
rect->y = nscoord(r.top);
|
||||
rect->height = nscoord(r.bottom - r.top + 1);
|
||||
|
||||
rects->mArea += rect->width * rect->height;
|
||||
|
||||
rect++;
|
||||
}
|
||||
|
||||
*aRects = rects;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsRegionBeOS :: FreeRects(nsRegionRectSet *aRects)
|
||||
{
|
||||
if(nsnull != aRects)
|
||||
PR_Free((void *)aRects);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsRegionBeOS :: GetNativeRegion(void *&aRegion) const
|
||||
{
|
||||
aRegion = (void *)&mRegion;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsRegionBeOS :: GetRegionComplexity(nsRegionComplexity &aComplexity) const
|
||||
{
|
||||
aComplexity = mRegionType;
|
||||
return NS_OK;
|
||||
}
|
||||
85
mozilla/gfx/src/beos/nsRegionBeOS.h
Normal file
85
mozilla/gfx/src/beos/nsRegionBeOS.h
Normal file
@@ -0,0 +1,85 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsRegionBeOS_h___
|
||||
#define nsRegionBeOS_h___
|
||||
|
||||
#include "nsIRegion.h"
|
||||
|
||||
#include <Region.h>
|
||||
|
||||
class nsRegionBeOS : public nsIRegion
|
||||
{
|
||||
public:
|
||||
nsRegionBeOS();
|
||||
virtual ~nsRegionBeOS();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
virtual nsresult Init();
|
||||
|
||||
virtual void SetTo(const nsIRegion &aRegion);
|
||||
virtual void SetTo(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight);
|
||||
void SetTo(const nsRegionBeOS *aRegion);
|
||||
virtual void Intersect(const nsIRegion &aRegion);
|
||||
virtual void Intersect(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight);
|
||||
virtual void Union(const nsIRegion &aRegion);
|
||||
virtual void Union(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight);
|
||||
virtual void Subtract(const nsIRegion &aRegion);
|
||||
virtual void Subtract(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight);
|
||||
virtual PRBool IsEmpty(void);
|
||||
virtual PRBool IsEqual(const nsIRegion &aRegion);
|
||||
virtual void GetBoundingBox(PRInt32 *aX, PRInt32 *aY, PRInt32 *aWidth, PRInt32 *aHeight);
|
||||
virtual void Offset(PRInt32 aXOffset, PRInt32 aYOffset);
|
||||
virtual PRBool ContainsRect(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight);
|
||||
NS_IMETHOD GetRects(nsRegionRectSet **aRects);
|
||||
NS_IMETHOD FreeRects(nsRegionRectSet *aRects);
|
||||
NS_IMETHOD GetNativeRegion(void *&aRegion) const;
|
||||
NS_IMETHOD GetRegionComplexity(nsRegionComplexity &aComplexity) const;
|
||||
|
||||
NS_IMETHOD GetNumRects(PRUint32 *aRects) const { *aRects = 0; return NS_OK; }
|
||||
|
||||
protected:
|
||||
void SetRegionType(void);
|
||||
|
||||
private:
|
||||
BRegion mRegion;
|
||||
nsRegionComplexity mRegionType;
|
||||
};
|
||||
|
||||
#endif // nsRegionBeOS_h___
|
||||
1428
mozilla/gfx/src/beos/nsRenderingContextBeOS.cpp
Normal file
1428
mozilla/gfx/src/beos/nsRenderingContextBeOS.cpp
Normal file
File diff suppressed because it is too large
Load Diff
246
mozilla/gfx/src/beos/nsRenderingContextBeOS.h
Normal file
246
mozilla/gfx/src/beos/nsRenderingContextBeOS.h
Normal file
@@ -0,0 +1,246 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsRenderingContextBeOS_h___
|
||||
#define nsRenderingContextBeOS_h___
|
||||
|
||||
#include "nsRenderingContextImpl.h"
|
||||
#include "nsUnitConversion.h"
|
||||
#include "nsFont.h"
|
||||
#include "nsIFontMetrics.h"
|
||||
#include "nsPoint.h"
|
||||
#include "nsString.h"
|
||||
#include "nsCRT.h"
|
||||
#include "nsTransform2D.h"
|
||||
#include "nsIWidget.h"
|
||||
#include "nsRect.h"
|
||||
#include "nsIImage.h"
|
||||
#include "nsIDeviceContext.h"
|
||||
#include "nsVoidArray.h"
|
||||
#include "nsGfxCIID.h"
|
||||
#include "nsDrawingSurfaceBeOS.h"
|
||||
#include "nsRegionBeOS.h"
|
||||
|
||||
#define USE_NATIVE_TILING 1
|
||||
|
||||
class nsRenderingContextBeOS : public nsRenderingContextImpl
|
||||
{
|
||||
public:
|
||||
nsRenderingContextBeOS();
|
||||
virtual ~nsRenderingContextBeOS();
|
||||
|
||||
NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_IMETHOD Init(nsIDeviceContext* aContext, nsIWidget *aWindow);
|
||||
NS_IMETHOD Init(nsIDeviceContext* aContext, nsDrawingSurface aSurface);
|
||||
|
||||
NS_IMETHOD Reset(void);
|
||||
|
||||
NS_IMETHOD GetDeviceContext(nsIDeviceContext *&aContext);
|
||||
|
||||
NS_IMETHOD LockDrawingSurface(PRInt32 aX, PRInt32 aY, PRUint32 aWidth, PRUint32 aHeight,
|
||||
void **aBits, PRInt32 *aStride, PRInt32 *aWidthBytes,
|
||||
PRUint32 aFlags);
|
||||
NS_IMETHOD UnlockDrawingSurface(void);
|
||||
|
||||
NS_IMETHOD SelectOffScreenDrawingSurface(nsDrawingSurface aSurface);
|
||||
NS_IMETHOD GetDrawingSurface(nsDrawingSurface *aSurface);
|
||||
NS_IMETHOD GetHints(PRUint32& aResult);
|
||||
|
||||
NS_IMETHOD PushState(void);
|
||||
NS_IMETHOD PopState(PRBool &aClipEmpty);
|
||||
|
||||
NS_IMETHOD IsVisibleRect(const nsRect& aRect, PRBool &aVisible);
|
||||
|
||||
NS_IMETHOD SetClipRect(const nsRect& aRect, nsClipCombine aCombine, PRBool &aClipEmpty);
|
||||
NS_IMETHOD GetClipRect(nsRect &aRect, PRBool &aClipValid);
|
||||
NS_IMETHOD SetClipRegion(const nsIRegion& aRegion, nsClipCombine aCombine, PRBool &aClipEmpty);
|
||||
NS_IMETHOD CopyClipRegion(nsIRegion &aRegion);
|
||||
NS_IMETHOD GetClipRegion(nsIRegion **aRegion);
|
||||
|
||||
NS_IMETHOD SetLineStyle(nsLineStyle aLineStyle);
|
||||
NS_IMETHOD GetLineStyle(nsLineStyle &aLineStyle);
|
||||
|
||||
NS_IMETHOD SetColor(nscolor aColor);
|
||||
NS_IMETHOD GetColor(nscolor &aColor) const;
|
||||
|
||||
NS_IMETHOD SetFont(const nsFont& aFont);
|
||||
NS_IMETHOD SetFont(nsIFontMetrics *aFontMetrics);
|
||||
|
||||
NS_IMETHOD GetFontMetrics(nsIFontMetrics *&aFontMetrics);
|
||||
|
||||
NS_IMETHOD Translate(nscoord aX, nscoord aY);
|
||||
NS_IMETHOD Scale(float aSx, float aSy);
|
||||
NS_IMETHOD GetCurrentTransform(nsTransform2D *&aTransform);
|
||||
|
||||
NS_IMETHOD CreateDrawingSurface(nsRect *aBounds, PRUint32 aSurfFlags, nsDrawingSurface &aSurface);
|
||||
NS_IMETHOD DestroyDrawingSurface(nsDrawingSurface aDS);
|
||||
|
||||
NS_IMETHOD DrawLine(nscoord aX0, nscoord aY0, nscoord aX1, nscoord aY1);
|
||||
NS_IMETHOD DrawStdLine(nscoord aX0, nscoord aY0, nscoord aX1, nscoord aY1);
|
||||
NS_IMETHOD DrawPolyline(const nsPoint aPoints[], PRInt32 aNumPoints);
|
||||
|
||||
NS_IMETHOD DrawRect(const nsRect& aRect);
|
||||
NS_IMETHOD DrawRect(nscoord aX, nscoord aY, nscoord aWidth, nscoord aHeight);
|
||||
|
||||
NS_IMETHOD FillRect(const nsRect& aRect);
|
||||
NS_IMETHOD FillRect(nscoord aX, nscoord aY, nscoord aWidth, nscoord aHeight);
|
||||
|
||||
NS_IMETHOD InvertRect(const nsRect& aRect);
|
||||
NS_IMETHOD InvertRect(nscoord aX, nscoord aY, nscoord aWidth, nscoord aHeight);
|
||||
|
||||
NS_IMETHOD DrawPolygon(const nsPoint aPoints[], PRInt32 aNumPoints);
|
||||
NS_IMETHOD FillPolygon(const nsPoint aPoints[], PRInt32 aNumPoints);
|
||||
|
||||
NS_IMETHOD DrawEllipse(const nsRect& aRect);
|
||||
NS_IMETHOD DrawEllipse(nscoord aX, nscoord aY, nscoord aWidth, nscoord aHeight);
|
||||
NS_IMETHOD FillEllipse(const nsRect& aRect);
|
||||
NS_IMETHOD FillEllipse(nscoord aX, nscoord aY, nscoord aWidth, nscoord aHeight);
|
||||
|
||||
NS_IMETHOD DrawArc(const nsRect& aRect,
|
||||
float aStartAngle, float aEndAngle);
|
||||
NS_IMETHOD DrawArc(nscoord aX, nscoord aY, nscoord aWidth, nscoord aHeight,
|
||||
float aStartAngle, float aEndAngle);
|
||||
NS_IMETHOD FillArc(const nsRect& aRect,
|
||||
float aStartAngle, float aEndAngle);
|
||||
NS_IMETHOD FillArc(nscoord aX, nscoord aY, nscoord aWidth, nscoord aHeight,
|
||||
float aStartAngle, float aEndAngle);
|
||||
|
||||
NS_IMETHOD GetWidth(char aC, nscoord &aWidth);
|
||||
NS_IMETHOD GetWidth(PRUnichar aC, nscoord &aWidth,
|
||||
PRInt32 *aFontID);
|
||||
NS_IMETHOD GetWidth(const nsString& aString, nscoord &aWidth,
|
||||
PRInt32 *aFontID);
|
||||
NS_IMETHOD GetWidth(const char *aString, nscoord &aWidth);
|
||||
NS_IMETHOD GetWidth(const char *aString, PRUint32 aLength, nscoord &aWidth);
|
||||
NS_IMETHOD GetWidth(const PRUnichar *aString, PRUint32 aLength, nscoord &aWidth,
|
||||
PRInt32 *aFontID);
|
||||
|
||||
NS_IMETHOD GetTextDimensions(const char* aString, PRUint32 aLength,
|
||||
nsTextDimensions& aDimensions);
|
||||
|
||||
NS_IMETHOD GetTextDimensions(const PRUnichar *aString, PRUint32 aLength,
|
||||
nsTextDimensions& aDimensions,
|
||||
PRInt32 *aFontID);
|
||||
|
||||
NS_IMETHOD DrawString(const char *aString, PRUint32 aLength,
|
||||
nscoord aX, nscoord aY,
|
||||
const nscoord* aSpacing);
|
||||
NS_IMETHOD DrawString(const PRUnichar *aString, PRUint32 aLength,
|
||||
nscoord aX, nscoord aY,
|
||||
PRInt32 aFontID,
|
||||
const nscoord* aSpacing);
|
||||
NS_IMETHOD DrawString(const nsString& aString, nscoord aX, nscoord aY,
|
||||
PRInt32 aFontID,
|
||||
const nscoord* aSpacing);
|
||||
|
||||
NS_IMETHOD DrawImage(nsIImage *aImage, nscoord aX, nscoord aY);
|
||||
NS_IMETHOD DrawImage(nsIImage *aImage, nscoord aX, nscoord aY,
|
||||
nscoord aWidth, nscoord aHeight);
|
||||
NS_IMETHOD DrawImage(nsIImage *aImage, const nsRect& aRect);
|
||||
NS_IMETHOD DrawImage(nsIImage *aImage, const nsRect& aSRect, const nsRect& aDRect);
|
||||
#ifdef USE_NATIVE_TILING
|
||||
NS_IMETHOD DrawTile(nsIImage *aImage,nscoord aX0,nscoord aY0,nscoord aX1,nscoord aY1,
|
||||
nscoord aWidth, nscoord aHeight);
|
||||
NS_IMETHOD DrawTile(nsIImage *aImage, nscoord aSrcXOffset,
|
||||
nscoord aSrcYOffset, const nsRect &aTileRect);
|
||||
#endif
|
||||
NS_IMETHOD CopyOffScreenBits(nsDrawingSurface aSrcSurf, PRInt32 aSrcX, PRInt32 aSrcY,
|
||||
const nsRect &aDestBounds, PRUint32 aCopyFlags);
|
||||
NS_IMETHOD RetrieveCurrentNativeGraphicData(PRUint32 * ngd);
|
||||
|
||||
//locals
|
||||
NS_IMETHOD CommonInit();
|
||||
|
||||
void CreateClipRegion() {
|
||||
static NS_DEFINE_CID(kRegionCID, NS_REGION_CID);
|
||||
if (mClipRegion)
|
||||
return;
|
||||
|
||||
PRUint32 w, h;
|
||||
mSurface->GetSize(&w, &h);
|
||||
|
||||
mClipRegion = do_CreateInstance(kRegionCID);
|
||||
if (mClipRegion) {
|
||||
mClipRegion->Init();
|
||||
mClipRegion->SetTo(0,0,w,h);
|
||||
}
|
||||
}
|
||||
|
||||
protected:
|
||||
nsDrawingSurfaceBeOS *mOffscreenSurface;
|
||||
nsDrawingSurfaceBeOS *mSurface;
|
||||
nsIDeviceContext *mContext;
|
||||
nsIFontMetrics *mFontMetrics;
|
||||
nsCOMPtr<nsIRegion> mClipRegion;
|
||||
float mP2T;
|
||||
|
||||
// graphic state stack (GraphicsState)
|
||||
nsVoidArray *mStateCache;
|
||||
|
||||
BView *mView;
|
||||
PRUint8 *mGammaTable;
|
||||
nscolor mCurrentColor;
|
||||
BFont *mCurrentFont;
|
||||
nsLineStyle mCurrentLineStyle;
|
||||
|
||||
void UpdateView();
|
||||
// ConditionRect is used to fix coordinate overflow problems for
|
||||
// rectangles after they are transformed to screen coordinates
|
||||
void ConditionRect(nscoord &x, nscoord &y, nscoord &w, nscoord &h) {
|
||||
if ( y < -32766 ) {
|
||||
y = -32766;
|
||||
}
|
||||
|
||||
if ( y + h > 32766 ) {
|
||||
h = 32766 - y;
|
||||
}
|
||||
|
||||
if ( x < -32766 ) {
|
||||
x = -32766;
|
||||
}
|
||||
|
||||
if ( x + w > 32766 ) {
|
||||
w = 32766 - x;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* nsRenderingContextBeOS_h___ */
|
||||
137
mozilla/gfx/src/beos/nsScreenBeOS.cpp
Normal file
137
mozilla/gfx/src/beos/nsScreenBeOS.cpp
Normal file
@@ -0,0 +1,137 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2000
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsScreenBeOS.h"
|
||||
|
||||
#include <Screen.h>
|
||||
|
||||
nsScreenBeOS :: nsScreenBeOS ( )
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
|
||||
// nothing else to do. I guess we could cache a bunch of information
|
||||
// here, but we want to ask the device at runtime in case anything
|
||||
// has changed.
|
||||
}
|
||||
|
||||
|
||||
nsScreenBeOS :: ~nsScreenBeOS()
|
||||
{
|
||||
// nothing to see here.
|
||||
}
|
||||
|
||||
|
||||
// addref, release, QI
|
||||
NS_IMPL_ISUPPORTS1(nsScreenBeOS, nsIScreen)
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsScreenBeOS :: GetRect(PRInt32 *outLeft, PRInt32 *outTop, PRInt32 *outWidth, PRInt32 *outHeight)
|
||||
{
|
||||
BScreen screen;
|
||||
|
||||
*outTop = 0;
|
||||
*outLeft = 0;
|
||||
*outWidth = PRInt32(screen.Frame().Width()+1);
|
||||
*outHeight = PRInt32(screen.Frame().Height()+1);
|
||||
|
||||
return NS_OK;
|
||||
|
||||
} // GetRect
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsScreenBeOS :: GetAvailRect(PRInt32 *outLeft, PRInt32 *outTop, PRInt32 *outWidth, PRInt32 *outHeight)
|
||||
{
|
||||
BScreen screen;
|
||||
|
||||
*outTop = 0;
|
||||
*outLeft = 0;
|
||||
*outWidth = PRInt32(screen.Frame().Width()+1);
|
||||
*outHeight = PRInt32(screen.Frame().Height()+1);
|
||||
|
||||
return NS_OK;
|
||||
|
||||
} // GetAvailRect
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsScreenBeOS :: GetPixelDepth(PRInt32 *aPixelDepth)
|
||||
{
|
||||
BScreen screen;
|
||||
|
||||
color_space depth;
|
||||
PRInt32 pixelDepth;
|
||||
|
||||
depth = screen.ColorSpace();
|
||||
switch(depth)
|
||||
{
|
||||
case B_CMAP8:
|
||||
pixelDepth = 8;
|
||||
break;
|
||||
case B_RGB32:
|
||||
pixelDepth = 32;
|
||||
break;
|
||||
case B_RGB15:
|
||||
pixelDepth = 15;
|
||||
break;
|
||||
case B_RGB16:
|
||||
pixelDepth = 16;
|
||||
break;
|
||||
default:
|
||||
#ifdef DEBUG
|
||||
printf("FIXME: Please add this screen depth to the code nsScreenBeOS.cpp\n");
|
||||
#endif
|
||||
pixelDepth = 32;
|
||||
break;
|
||||
}
|
||||
*aPixelDepth = pixelDepth;
|
||||
|
||||
return NS_OK;
|
||||
|
||||
} // GetPixelDepth
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsScreenBeOS :: GetColorDepth(PRInt32 *aColorDepth)
|
||||
{
|
||||
return GetPixelDepth ( aColorDepth );
|
||||
|
||||
} // GetColorDepth
|
||||
|
||||
|
||||
59
mozilla/gfx/src/beos/nsScreenBeOS.h
Normal file
59
mozilla/gfx/src/beos/nsScreenBeOS.h
Normal file
@@ -0,0 +1,59 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2000
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsScreenBeOS_h___
|
||||
#define nsScreenBeOS_h___
|
||||
|
||||
#include "nsIScreen.h"
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
class nsScreenBeOS : public nsIScreen
|
||||
{
|
||||
public:
|
||||
nsScreenBeOS ( );
|
||||
virtual ~nsScreenBeOS();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSISCREEN
|
||||
|
||||
private:
|
||||
|
||||
};
|
||||
|
||||
#endif // nsScreenBeOS_h___
|
||||
128
mozilla/gfx/src/beos/nsScreenManagerBeOS.cpp
Normal file
128
mozilla/gfx/src/beos/nsScreenManagerBeOS.cpp
Normal file
@@ -0,0 +1,128 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2000
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsScreenManagerBeOS.h"
|
||||
#include "nsScreenBeOS.h"
|
||||
|
||||
|
||||
nsScreenManagerBeOS :: nsScreenManagerBeOS ( )
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
|
||||
// nothing else to do. I guess we could cache a bunch of information
|
||||
// here, but we want to ask the device at runtime in case anything
|
||||
// has changed.
|
||||
}
|
||||
|
||||
|
||||
nsScreenManagerBeOS :: ~nsScreenManagerBeOS()
|
||||
{
|
||||
// nothing to see here.
|
||||
}
|
||||
|
||||
|
||||
// addref, release, QI
|
||||
NS_IMPL_ISUPPORTS1(nsScreenManagerBeOS, nsIScreenManager)
|
||||
|
||||
|
||||
//
|
||||
// CreateNewScreenObject
|
||||
//
|
||||
// Utility routine. Creates a new screen object from the given device handle
|
||||
//
|
||||
// NOTE: For this "single-monitor" impl, we just always return the cached primary
|
||||
// screen. This should change when a multi-monitor impl is done.
|
||||
//
|
||||
nsIScreen*
|
||||
nsScreenManagerBeOS :: CreateNewScreenObject ( )
|
||||
{
|
||||
nsIScreen* retval = nsnull;
|
||||
if ( !mCachedMainScreen )
|
||||
mCachedMainScreen = new nsScreenBeOS ( );
|
||||
NS_IF_ADDREF(retval = mCachedMainScreen.get());
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// ScreenForRect
|
||||
//
|
||||
// Returns the screen that contains the rectangle. If the rect overlaps
|
||||
// multiple screens, it picks the screen with the greatest area of intersection.
|
||||
//
|
||||
// The coordinates are in pixels (not twips) and in screen coordinates.
|
||||
//
|
||||
NS_IMETHODIMP
|
||||
nsScreenManagerBeOS :: ScreenForRect ( PRInt32 /*inLeft*/, PRInt32 /*inTop*/, PRInt32 /*inWidth*/,
|
||||
PRInt32 /*inHeight*/, nsIScreen **outScreen )
|
||||
{
|
||||
GetPrimaryScreen ( outScreen );
|
||||
return NS_OK;
|
||||
|
||||
} // ScreenForRect
|
||||
|
||||
|
||||
//
|
||||
// GetPrimaryScreen
|
||||
//
|
||||
// The screen with the menubar/taskbar. This shouldn't be needed very
|
||||
// often.
|
||||
//
|
||||
NS_IMETHODIMP
|
||||
nsScreenManagerBeOS :: GetPrimaryScreen(nsIScreen * *aPrimaryScreen)
|
||||
{
|
||||
*aPrimaryScreen = CreateNewScreenObject(); // addrefs
|
||||
return NS_OK;
|
||||
|
||||
} // GetPrimaryScreen
|
||||
|
||||
|
||||
//
|
||||
// GetNumberOfScreens
|
||||
//
|
||||
// Returns how many physical screens are available.
|
||||
//
|
||||
NS_IMETHODIMP
|
||||
nsScreenManagerBeOS :: GetNumberOfScreens(PRUint32 *aNumberOfScreens)
|
||||
{
|
||||
*aNumberOfScreens = 1;
|
||||
return NS_OK;
|
||||
|
||||
} // GetNumberOfScreens
|
||||
|
||||
66
mozilla/gfx/src/beos/nsScreenManagerBeOS.h
Normal file
66
mozilla/gfx/src/beos/nsScreenManagerBeOS.h
Normal file
@@ -0,0 +1,66 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2000
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsScreenManagerBeOS_h___
|
||||
#define nsScreenManagerBeOS_h___
|
||||
|
||||
#include "nsIScreenManager.h"
|
||||
#include "nsIScreen.h"
|
||||
#include "nsCOMPtr.h"
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
class nsScreenManagerBeOS : public nsIScreenManager
|
||||
{
|
||||
public:
|
||||
nsScreenManagerBeOS ( );
|
||||
virtual ~nsScreenManagerBeOS();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSISCREENMANAGER
|
||||
|
||||
private:
|
||||
|
||||
nsIScreen* CreateNewScreenObject ( ) ;
|
||||
|
||||
// cache the primary screen object to avoid memory allocation every time
|
||||
nsCOMPtr<nsIScreen> mCachedMainScreen;
|
||||
|
||||
};
|
||||
|
||||
#endif // nsScreenManagerBeOS_h___
|
||||
184
mozilla/gfx/src/gtk/Makefile.in
Normal file
184
mozilla/gfx/src/gtk/Makefile.in
Normal file
@@ -0,0 +1,184 @@
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Roland Mainz <roland.mainz@informatik.med.uni-giessen.de>
|
||||
#
|
||||
|
||||
DEPTH = ../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE = gfx
|
||||
LIBRARY_NAME = gfx_gtk
|
||||
EXPORT_LIBRARY = 1
|
||||
IS_COMPONENT = 1
|
||||
MODULE_NAME = nsGfxGTKModule
|
||||
REQUIRES = xpcom \
|
||||
string \
|
||||
widget \
|
||||
view \
|
||||
util \
|
||||
dom \
|
||||
pref \
|
||||
uconv \
|
||||
unicharutil \
|
||||
windowwatcher \
|
||||
locale \
|
||||
content \
|
||||
layout \
|
||||
necko \
|
||||
$(NULL)
|
||||
|
||||
# Sun's Complex Text Layout support
|
||||
ifdef SUNCTL
|
||||
REQUIRES += ctl
|
||||
endif
|
||||
|
||||
#NATIVE_THEME_SUPPORT = 1
|
||||
|
||||
CSRCS = nsPrintdGTK.c
|
||||
|
||||
ifdef NATIVE_THEME_SUPPORT
|
||||
CSRCS += gtkdrawing.c
|
||||
endif
|
||||
|
||||
# Code shared between GTK+, Xlib and Xprint gfx modules
|
||||
X11SHARED_LCPPSRCS = \
|
||||
nsAntiAliasedGlyph.cpp \
|
||||
nsX11AlphaBlend.cpp \
|
||||
nsXFontAAScaledBitmap.cpp \
|
||||
nsXFontNormal.cpp \
|
||||
$(NULL)
|
||||
|
||||
CPPSRCS = \
|
||||
$(X11SHARED_LCPPSRCS) \
|
||||
nsDeviceContextGTK.cpp \
|
||||
nsDeviceContextSpecFactoryG.cpp \
|
||||
nsDeviceContextSpecG.cpp \
|
||||
nsDrawingSurfaceGTK.cpp \
|
||||
nsFontMetricsGTK.cpp \
|
||||
nsGfxFactoryGTK.cpp \
|
||||
nsGraphicsStateGTK.cpp \
|
||||
nsImageGTK.cpp \
|
||||
nsGCCache.cpp \
|
||||
nsRenderingContextGTK.cpp \
|
||||
nsScreenGtk.cpp \
|
||||
nsScreenManagerGtk.cpp \
|
||||
nsPrintOptionsGTK.cpp \
|
||||
$(NULL)
|
||||
|
||||
ifdef MOZ_ENABLE_GTK
|
||||
CPPSRCS += \
|
||||
nsRegionGTK.cpp \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
ifdef MOZ_ENABLE_GTK2
|
||||
CPPSRCS += \
|
||||
nsRegionGTK2.cpp \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
ifdef NATIVE_THEME_SUPPORT
|
||||
CPPSRCS += nsNativeThemeGTK.cpp
|
||||
endif
|
||||
|
||||
# If not primary toolkit, install in secondary path
|
||||
ifneq (gtk,$(MOZ_GFX_TOOLKIT))
|
||||
ifneq (gtk2, $(MOZ_GFX_TOOLKIT))
|
||||
INACTIVE_COMPONENT = 1
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef MOZ_ENABLE_XPRINT
|
||||
XPU_LCSRCS = xprintutil.c
|
||||
CSRCS += $(XPU_LCSRCS)
|
||||
endif
|
||||
|
||||
GARBAGE += $(X11SHARED_LCPPSRCS) $(XPU_LCSRCS) $(wildcard *.$(OBJ_SUFFIX))
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
EXTRA_DSO_LDOPTS += $(MOZ_GTK_LDFLAGS) $(MOZ_GTK2_LIBS)
|
||||
CXXFLAGS += $(MOZ_GTK_CFLAGS) $(MOZ_GTK2_CFLAGS)
|
||||
CFLAGS += $(MOZ_GTK_CFLAGS) $(MOZ_GTK2_CFLAGS)
|
||||
|
||||
ifdef MOZ_ENABLE_XINERAMA
|
||||
GFX_XINERAMA_LIBS += $(MOZ_XINERAMA_LIBS)
|
||||
endif
|
||||
|
||||
ifdef MOZ_ENABLE_GTK
|
||||
EXTRA_DSO_LDOPTS += $(MOZ_COMPONENT_LIBS) \
|
||||
-lgkgfx \
|
||||
$(GFX_XINERAMA_LIBS) \
|
||||
-lgtksuperwin \
|
||||
$(MOZ_JS_LIBS) \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
ifdef MOZ_ENABLE_GTK2
|
||||
EXTRA_DSO_LDOPTS += $(MOZ_COMPONENT_LIBS) \
|
||||
-lgkgfx \
|
||||
$(GFX_XINERAMA_LIBS) \
|
||||
$(MOZ_JS_LIBS) \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
DEFINES += -D_IMPL_NS_GFXNONXP
|
||||
ifeq ($(OS_ARCH), Linux)
|
||||
DEFINES += -D_BSD_SOURCE
|
||||
endif
|
||||
ifeq ($(OS_ARCH), SunOS)
|
||||
ifndef GNU_CC
|
||||
# When using Sun's WorkShop compiler, including
|
||||
# /wherever/workshop-5.0/SC5.0/include/CC/std/time.h
|
||||
# causes most of these compiles to fail with:
|
||||
# line 29: Error: Multiple declaration for std::tm.
|
||||
# So, this gets around the problem.
|
||||
DEFINES += -D_TIME_H=1
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef MOZ_ENABLE_XPRINT
|
||||
DEFINES += -DUSE_XPRINT -DUSE_MOZILLA_TYPES
|
||||
INCLUDES += -I$(srcdir)/../xprint
|
||||
EXTRA_DSO_LDOPTS += $(MOZ_XPRINT_LDFLAGS)
|
||||
endif
|
||||
|
||||
ifdef NATIVE_THEME_SUPPORT
|
||||
DEFINES += -DNATIVE_THEME_SUPPORT
|
||||
endif
|
||||
|
||||
LOCAL_INCLUDES = \
|
||||
-I$(srcdir)/. \
|
||||
-I$(srcdir)/.. \
|
||||
-I$(srcdir)/../x11shared \
|
||||
$(NULL)
|
||||
|
||||
ifdef MOZ_ENABLE_XPRINT
|
||||
export:: $(addprefix $(srcdir)/../xprint/,$(XPU_LCSRCS)) $(addprefix $(srcdir)/../x11shared/,$(X11SHARED_LCPPSRCS))
|
||||
$(INSTALL) $^ .
|
||||
else
|
||||
export:: $(addprefix $(srcdir)/../x11shared/,$(X11SHARED_LCPPSRCS))
|
||||
$(INSTALL) $^ .
|
||||
endif
|
||||
|
||||
269
mozilla/gfx/src/gtk/gtkdrawing.c
Normal file
269
mozilla/gfx/src/gtk/gtkdrawing.c
Normal file
@@ -0,0 +1,269 @@
|
||||
/* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2002
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Brian Ryner <bryner@netscape.com> (Original Author)
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/*
|
||||
* This file contains painting functions for each of the gtk widgets.
|
||||
* Adapted from the gtk+ 1.2.10 source.
|
||||
*/
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <gdk/gdkprivate.h>
|
||||
#include <string.h>
|
||||
#include "gtkdrawing.h"
|
||||
|
||||
extern GtkWidget* gButtonWidget;
|
||||
extern GtkWidget* gCheckboxWidget;
|
||||
extern GtkWidget* gScrollbarWidget;
|
||||
extern GtkWidget* gGripperWidget;
|
||||
extern GtkWidget* gEntryWidget;
|
||||
extern GtkWidget* gArrowWidget;
|
||||
extern GtkWidget* gDropdownButtonWidget;
|
||||
|
||||
GtkStateType
|
||||
ConvertGtkState(GtkWidgetState* state)
|
||||
{
|
||||
if (state->disabled)
|
||||
return GTK_STATE_INSENSITIVE;
|
||||
else if (state->inHover)
|
||||
return (state->active ? GTK_STATE_ACTIVE : GTK_STATE_PRELIGHT);
|
||||
else
|
||||
return GTK_STATE_NORMAL;
|
||||
}
|
||||
|
||||
void
|
||||
moz_gtk_button_paint(GdkWindow* window, GtkStyle* style,
|
||||
GdkRectangle* rect, GdkRectangle* cliprect,
|
||||
GtkWidgetState* state, GtkReliefStyle relief)
|
||||
{
|
||||
GtkShadowType shadow_type;
|
||||
gint default_spacing = 7; /* xxx fix me */
|
||||
GtkStateType button_state = ConvertGtkState(state);
|
||||
gint x = rect->x, y=rect->y, width=rect->width, height=rect->height;
|
||||
|
||||
if (((GdkWindowPrivate*)window)->mapped) {
|
||||
gdk_window_set_back_pixmap(window, NULL, TRUE);
|
||||
gdk_window_clear_area(window, cliprect->x, cliprect->y, cliprect->width,
|
||||
cliprect->height);
|
||||
}
|
||||
|
||||
gtk_widget_set_state(gButtonWidget, button_state);
|
||||
if (state->isDefault)
|
||||
gtk_paint_box(style, window, GTK_STATE_NORMAL, GTK_SHADOW_IN, cliprect,
|
||||
gButtonWidget, "buttondefault", x, y, width, height);
|
||||
|
||||
if (state->canDefault) {
|
||||
x += style->klass->xthickness;
|
||||
y += style->klass->ythickness;
|
||||
width -= 2 * x + default_spacing;
|
||||
height -= 2 * y + default_spacing;
|
||||
x += (1 + default_spacing) / 2;
|
||||
y += (1 + default_spacing) / 2;
|
||||
}
|
||||
|
||||
if (state->focused) {
|
||||
x += 1;
|
||||
y += 1;
|
||||
width -= 2;
|
||||
height -= 2;
|
||||
}
|
||||
|
||||
shadow_type = (state->active && state->inHover) ? GTK_SHADOW_IN : GTK_SHADOW_OUT;
|
||||
|
||||
if (relief != GTK_RELIEF_NONE || (button_state != GTK_STATE_NORMAL &&
|
||||
button_state != GTK_STATE_INSENSITIVE))
|
||||
gtk_paint_box(style, window, button_state, shadow_type, cliprect,
|
||||
gButtonWidget, "button", x, y, width, height);
|
||||
|
||||
if (state->focused) {
|
||||
x -= 1;
|
||||
y -= 1;
|
||||
width += 2;
|
||||
height += 2;
|
||||
|
||||
gtk_paint_focus(style, window, cliprect, gButtonWidget, "button", x, y,
|
||||
width - 1, height - 1);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
moz_gtk_checkbox_paint(GdkWindow* window, GtkStyle* style,
|
||||
GdkRectangle* rect, GdkRectangle* cliprect,
|
||||
GtkWidgetState* state, gboolean selected,
|
||||
gboolean isradio)
|
||||
{
|
||||
GtkStateType state_type;
|
||||
GtkShadowType shadow_type;
|
||||
gint indicator_size, indicator_spacing;
|
||||
gint x, y, width, height;
|
||||
|
||||
_gtk_check_button_get_props(GTK_CHECK_BUTTON(gCheckboxWidget),
|
||||
&indicator_size, &indicator_spacing);
|
||||
|
||||
/* left justified, vertically centered within the rect */
|
||||
x = rect->x;
|
||||
y = rect->y + (rect->height - indicator_size) / 2;
|
||||
width = indicator_size;
|
||||
height = indicator_size;
|
||||
|
||||
if (selected) {
|
||||
state_type = GTK_STATE_ACTIVE;
|
||||
shadow_type = GTK_SHADOW_IN;
|
||||
}
|
||||
else {
|
||||
shadow_type = GTK_SHADOW_OUT;
|
||||
state_type = ConvertGtkState(state);
|
||||
}
|
||||
|
||||
if (isradio)
|
||||
gtk_paint_option(style, window, state_type, shadow_type, cliprect,
|
||||
gCheckboxWidget, "radiobutton", x, y, width, height);
|
||||
else
|
||||
gtk_paint_check(style, window, state_type, shadow_type, cliprect,
|
||||
gCheckboxWidget, "checkbutton", x, y, width, height);
|
||||
}
|
||||
|
||||
void
|
||||
moz_gtk_scrollbar_button_paint(GdkWindow* window, GtkStyle* style,
|
||||
GdkRectangle* rect, GdkRectangle* cliprect,
|
||||
GtkWidgetState* state, GtkArrowType type)
|
||||
{
|
||||
GtkStateType state_type = ConvertGtkState(state);
|
||||
GtkShadowType shadow_type = (state->active) ? GTK_SHADOW_IN : GTK_SHADOW_OUT;
|
||||
gtk_paint_arrow(style, window, state_type, shadow_type, cliprect,
|
||||
gScrollbarWidget, (type < 2) ? "vscrollbar" : "hscrollbar",
|
||||
type, TRUE, rect->x, rect->y, rect->width, rect->height);
|
||||
}
|
||||
|
||||
void
|
||||
moz_gtk_scrollbar_trough_paint(GdkWindow* window, GtkStyle* style,
|
||||
GdkRectangle* rect, GdkRectangle* cliprect,
|
||||
GtkWidgetState* state)
|
||||
{
|
||||
gtk_style_apply_default_background(style, window, TRUE, GTK_STATE_ACTIVE,
|
||||
cliprect, rect->x, rect->y,
|
||||
rect->width, rect->height);
|
||||
|
||||
gtk_paint_box(style, window, GTK_STATE_ACTIVE, GTK_SHADOW_IN, cliprect,
|
||||
gScrollbarWidget, "trough", rect->x, rect->y, rect->width,
|
||||
rect->height);
|
||||
|
||||
if (state->focused)
|
||||
gtk_paint_focus(style, window, cliprect, gScrollbarWidget, "trough",
|
||||
rect->x, rect->y, rect->width, rect->height);
|
||||
}
|
||||
|
||||
void
|
||||
moz_gtk_scrollbar_thumb_paint(GdkWindow* window, GtkStyle* style,
|
||||
GdkRectangle* rect, GdkRectangle* cliprect,
|
||||
GtkWidgetState* state)
|
||||
{
|
||||
GtkStateType state_type = state->inHover ? GTK_STATE_PRELIGHT : GTK_STATE_NORMAL;
|
||||
gtk_paint_box(style, window, state_type, GTK_SHADOW_OUT, cliprect,
|
||||
gScrollbarWidget, "slider", rect->x, rect->y, rect->width,
|
||||
rect->height);
|
||||
}
|
||||
|
||||
void
|
||||
moz_gtk_gripper_paint(GdkWindow* window, GtkStyle* style, GdkRectangle* rect,
|
||||
GdkRectangle* cliprect, GtkWidgetState* state)
|
||||
{
|
||||
GtkStateType state_type = ConvertGtkState(state);
|
||||
GtkShadowType shadow_type = GTK_HANDLE_BOX(gGripperWidget)->shadow_type;
|
||||
|
||||
gtk_paint_box(style, window, state_type, shadow_type, cliprect,
|
||||
gGripperWidget, "handlebox_bin", rect->x, rect->y,
|
||||
rect->width, rect->height);
|
||||
}
|
||||
|
||||
void
|
||||
moz_gtk_entry_paint(GdkWindow* window, GtkStyle* style, GdkRectangle* rect,
|
||||
GdkRectangle* cliprect, GtkWidgetState* state)
|
||||
{
|
||||
gint x = rect->x, y = rect->y, width = rect->width, height = rect->height;
|
||||
|
||||
if (state->focused) {
|
||||
x += 1;
|
||||
y += 1;
|
||||
width -= 2;
|
||||
height -= 2;
|
||||
}
|
||||
|
||||
gtk_paint_shadow (style, window, GTK_STATE_NORMAL, GTK_SHADOW_IN, cliprect,
|
||||
gEntryWidget, "entry", x, y, width, height);
|
||||
|
||||
if (state->focused)
|
||||
gtk_paint_focus (style, window, cliprect, gEntryWidget, "entry",
|
||||
rect->x, rect->y, rect->width - 1, rect->height - 1);
|
||||
|
||||
x = style->klass->xthickness;
|
||||
y = style->klass->ythickness;
|
||||
|
||||
gtk_paint_flat_box (style, window, GTK_STATE_NORMAL, GTK_SHADOW_NONE,
|
||||
cliprect, gEntryWidget, "entry_bg", rect->x + x,
|
||||
rect->y + y, rect->width - 2*x, rect->height - 2*y);
|
||||
}
|
||||
|
||||
void
|
||||
moz_gtk_dropdown_arrow_paint(GdkWindow* window, GtkStyle* style,
|
||||
GdkRectangle* rect, GdkRectangle* cliprect,
|
||||
GtkWidgetState* state)
|
||||
{
|
||||
moz_gtk_button_paint(window, gDropdownButtonWidget->style, rect, cliprect,
|
||||
state, GTK_RELIEF_NORMAL);
|
||||
gtk_paint_arrow(style, window, ConvertGtkState(state),
|
||||
state->active ? GTK_SHADOW_IN : GTK_SHADOW_OUT, cliprect,
|
||||
gArrowWidget, "arrow", GTK_ARROW_DOWN, TRUE, rect->x, rect->y,
|
||||
rect->width, rect->height);
|
||||
}
|
||||
|
||||
void
|
||||
moz_gtk_container_paint(GdkWindow* window, GtkStyle* style, GdkRectangle* rect,
|
||||
GdkRectangle* cliprect, GtkWidgetState* state,
|
||||
gboolean isradio)
|
||||
{
|
||||
GtkStateType state_type = ConvertGtkState(state);
|
||||
|
||||
if (state_type != GTK_STATE_NORMAL && state_type != GTK_STATE_PRELIGHT)
|
||||
state_type = GTK_STATE_NORMAL;
|
||||
|
||||
if (state_type != GTK_STATE_NORMAL) /* this is for drawing a prelight box */
|
||||
gtk_paint_flat_box (style, window, state_type, GTK_SHADOW_ETCHED_OUT,
|
||||
cliprect, gCheckboxWidget,
|
||||
isradio ? "radiobutton" : "checkbutton",
|
||||
rect->x, rect->y, rect->width, rect->height);
|
||||
}
|
||||
107
mozilla/gfx/src/gtk/gtkdrawing.h
Normal file
107
mozilla/gfx/src/gtk/gtkdrawing.h
Normal file
@@ -0,0 +1,107 @@
|
||||
/* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2002
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Brian Ryner <bryner@netscape.com> (Original Author)
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef _GTK_DRAWING_H_
|
||||
#define _GTK_DRAWING_H_
|
||||
|
||||
#include <gdk/gdk.h>
|
||||
#include <gtk/gtkstyle.h>
|
||||
#include "prtypes.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
typedef struct {
|
||||
PRPackedBool active;
|
||||
PRPackedBool focused;
|
||||
PRPackedBool inHover;
|
||||
PRPackedBool disabled;
|
||||
PRPackedBool isDefault;
|
||||
PRPackedBool canDefault;
|
||||
} GtkWidgetState;
|
||||
|
||||
void
|
||||
moz_gtk_button_paint(GdkWindow* window, GtkStyle* style, GdkRectangle* rect,
|
||||
GdkRectangle* cliprect, GtkWidgetState* state,
|
||||
GtkReliefStyle relief);
|
||||
|
||||
void
|
||||
moz_gtk_checkbox_paint(GdkWindow* window, GtkStyle* style, GdkRectangle *rect,
|
||||
GdkRectangle* cliprect, GtkWidgetState* state,
|
||||
gboolean selected, gboolean isradio);
|
||||
|
||||
void
|
||||
moz_gtk_scrollbar_button_paint(GdkWindow* window, GtkStyle* style,
|
||||
GdkRectangle* rect, GdkRectangle* cliprect,
|
||||
GtkWidgetState* state, GtkArrowType type);
|
||||
|
||||
void
|
||||
moz_gtk_scrollbar_trough_paint(GdkWindow* window, GtkStyle* style,
|
||||
GdkRectangle* rect, GdkRectangle* cliprect,
|
||||
GtkWidgetState* state);
|
||||
|
||||
void
|
||||
moz_gtk_scrollbar_thumb_paint(GdkWindow* window, GtkStyle* style,
|
||||
GdkRectangle* rect, GdkRectangle* cliprect,
|
||||
GtkWidgetState* state);
|
||||
|
||||
|
||||
void
|
||||
moz_gtk_gripper_paint(GdkWindow* window, GtkStyle* style, GdkRectangle* rect,
|
||||
GdkRectangle* cliprect, GtkWidgetState* state);
|
||||
|
||||
void
|
||||
moz_gtk_entry_paint(GdkWindow* window, GtkStyle* style, GdkRectangle* rect,
|
||||
GdkRectangle* cliprect, GtkWidgetState* state);
|
||||
|
||||
void
|
||||
moz_gtk_dropdown_arrow_paint(GdkWindow* window, GtkStyle* style,
|
||||
GdkRectangle* rect, GdkRectangle* cliprect,
|
||||
GtkWidgetState* state);
|
||||
|
||||
void
|
||||
moz_gtk_container_paint(GdkWindow* window, GtkStyle* style, GdkRectangle* rect,
|
||||
GdkRectangle* cliprect, GtkWidgetState* state,
|
||||
gboolean isradio);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif
|
||||
878
mozilla/gfx/src/gtk/nsDeviceContextGTK.cpp
Normal file
878
mozilla/gfx/src/gtk/nsDeviceContextGTK.cpp
Normal file
@@ -0,0 +1,878 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
// vim:cindent:ts=2:et:sw=2:
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Roland Mainz <roland.mainz@informatik.med.uni-giessen.de>
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include "nspr.h"
|
||||
#include "nsIPref.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsCRT.h"
|
||||
|
||||
#include "nsDeviceContextGTK.h"
|
||||
#include "nsFontMetricsGTK.h"
|
||||
#include "nsGfxCIID.h"
|
||||
|
||||
#include "nsGfxPSCID.h"
|
||||
#include "nsIDeviceContextPS.h"
|
||||
#ifdef USE_XPRINT
|
||||
#include "nsGfxXPrintCID.h"
|
||||
#include "nsIDeviceContextXPrint.h"
|
||||
#endif /* USE_XPRINT */
|
||||
|
||||
#include <gdk/gdk.h>
|
||||
#include <gdk/gdkx.h>
|
||||
|
||||
#ifdef MOZ_WIDGET_GTK
|
||||
#include "gdksuperwin.h"
|
||||
#endif /* MOZ_WIDGET_GTK */
|
||||
|
||||
#include <X11/Xatom.h>
|
||||
|
||||
#include "nsDeviceContextSpecG.h"
|
||||
|
||||
#define NS_TO_GDK_RGB(ns) (ns & 0xff) << 16 | (ns & 0xff00) | ((ns >> 16) & 0xff)
|
||||
|
||||
#define GDK_COLOR_TO_NS_RGB(c) \
|
||||
((nscolor) NS_RGB(c.red, c.green, c.blue))
|
||||
|
||||
static NS_DEFINE_CID(kPrefCID, NS_PREF_CID);
|
||||
|
||||
#define GDK_DEFAULT_FONT1 "-*-helvetica-medium-r-*--*-120-*-*-*-*-iso8859-1"
|
||||
#define GDK_DEFAULT_FONT2 "-*-fixed-medium-r-*-*-*-120-*-*-*-*-*-*"
|
||||
|
||||
#ifdef MOZ_WIDGET_GTK
|
||||
// this is specific to gtk 1.2
|
||||
extern GdkFont *default_font;
|
||||
#endif /* MOZ_WIDGET_GTK */
|
||||
|
||||
/**
|
||||
* A singleton instance of nsSystemFontsGTK is created by the first
|
||||
* device context and destroyed by the module destructor.
|
||||
*/
|
||||
class nsSystemFontsGTK {
|
||||
|
||||
public:
|
||||
nsSystemFontsGTK(float aPixelsToTwips);
|
||||
|
||||
const nsFont& GetDefaultFont() { return mDefaultFont; }
|
||||
const nsFont& GetMenuFont() { return mMenuFont; }
|
||||
const nsFont& GetFieldFont() { return mFieldFont; }
|
||||
const nsFont& GetButtonFont() { return mButtonFont; }
|
||||
|
||||
private:
|
||||
nsresult GetSystemFontInfo(GtkStyle *aStyle, nsFont* aFont,
|
||||
float aPixelsToTwips) const;
|
||||
|
||||
/*
|
||||
* The following system font constants exist:
|
||||
*
|
||||
* css2: http://www.w3.org/TR/REC-CSS2/fonts.html#x27
|
||||
* eSystemFont_Caption, eSystemFont_Icon, eSystemFont_Menu,
|
||||
* eSystemFont_MessageBox, eSystemFont_SmallCaption,
|
||||
* eSystemFont_StatusBar,
|
||||
* // css3
|
||||
* eSystemFont_Window, eSystemFont_Document,
|
||||
* eSystemFont_Workspace, eSystemFont_Desktop,
|
||||
* eSystemFont_Info, eSystemFont_Dialog,
|
||||
* eSystemFont_Button, eSystemFont_PullDownMenu,
|
||||
* eSystemFont_List, eSystemFont_Field,
|
||||
* // moz
|
||||
* eSystemFont_Tooltips, eSystemFont_Widget
|
||||
*/
|
||||
nsFont mDefaultFont;
|
||||
nsFont mButtonFont;
|
||||
nsFont mFieldFont;
|
||||
nsFont mMenuFont;
|
||||
};
|
||||
|
||||
|
||||
nscoord nsDeviceContextGTK::mDpi = 96;
|
||||
static nsSystemFontsGTK *gSystemFonts = nsnull;
|
||||
|
||||
nsDeviceContextGTK::nsDeviceContextGTK()
|
||||
: DeviceContextImpl()
|
||||
{
|
||||
mTwipsToPixels = 1.0;
|
||||
mPixelsToTwips = 1.0;
|
||||
mDepth = 0 ;
|
||||
mNumCells = 0;
|
||||
|
||||
mWidthFloat = 0.0f;
|
||||
mHeightFloat = 0.0f;
|
||||
mWidth = -1;
|
||||
mHeight = -1;
|
||||
mDeviceWindow = nsnull;
|
||||
}
|
||||
|
||||
nsDeviceContextGTK::~nsDeviceContextGTK()
|
||||
{
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIPref> prefs = do_GetService(kPrefCID, &rv);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
prefs->UnregisterCallback("browser.display.screen_resolution",
|
||||
prefChanged, (void *)this);
|
||||
}
|
||||
}
|
||||
|
||||
/* static */ void nsDeviceContextGTK::Shutdown()
|
||||
{
|
||||
if (gSystemFonts) {
|
||||
delete gSystemFonts;
|
||||
gSystemFonts = nsnull;
|
||||
}
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextGTK::Init(nsNativeWidget aNativeWidget)
|
||||
{
|
||||
GtkRequisition req;
|
||||
GtkWidget *sb;
|
||||
|
||||
// get the screen object and its width/height
|
||||
// XXXRight now this will only get the primary monitor.
|
||||
|
||||
if (!mScreenManager)
|
||||
mScreenManager = do_GetService("@mozilla.org/gfx/screenmanager;1");
|
||||
if (!mScreenManager) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
#ifdef MOZ_WIDGET_GTK
|
||||
|
||||
if (aNativeWidget) {
|
||||
// superwin?
|
||||
if (GDK_IS_SUPERWIN(aNativeWidget)) {
|
||||
mDeviceWindow = GDK_SUPERWIN(aNativeWidget)->shell_window;
|
||||
}
|
||||
// gtk widget?
|
||||
else if (GTK_IS_WIDGET(aNativeWidget)) {
|
||||
mDeviceWindow = GTK_WIDGET(aNativeWidget)->window;
|
||||
}
|
||||
// must be a bin_window
|
||||
else {
|
||||
mDeviceWindow = NS_STATIC_CAST(GdkWindow *, aNativeWidget);
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* MOZ_WIDGET_GTK */
|
||||
|
||||
#ifdef MOZ_WIDGET_GTK2
|
||||
|
||||
if (aNativeWidget) {
|
||||
// can only be a gdk window
|
||||
if (GDK_IS_WINDOW(aNativeWidget))
|
||||
mDeviceWindow = GDK_WINDOW(aNativeWidget);
|
||||
else
|
||||
NS_WARNING("unsupported native widget type!");
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
nsCOMPtr<nsIScreen> screen;
|
||||
mScreenManager->GetPrimaryScreen ( getter_AddRefs(screen) );
|
||||
if ( screen ) {
|
||||
PRInt32 x, y, width, height, depth;
|
||||
screen->GetAvailRect ( &x, &y, &width, &height );
|
||||
screen->GetPixelDepth ( &depth );
|
||||
mWidthFloat = float(width);
|
||||
mHeightFloat = float(height);
|
||||
mDepth = NS_STATIC_CAST ( PRUint32, depth );
|
||||
}
|
||||
|
||||
static int initialized = 0;
|
||||
PRInt32 prefVal = -1;
|
||||
if (!initialized) {
|
||||
initialized = 1;
|
||||
|
||||
// Set prefVal the value of the preference
|
||||
// "browser.display.screen_resolution"
|
||||
// or -1 if we can't get it.
|
||||
// If it's negative, we pretend it's not set.
|
||||
// If it's 0, it means force use of the operating system's logical
|
||||
// resolution.
|
||||
// If it's positive, we use it as the logical resolution
|
||||
nsresult res;
|
||||
|
||||
nsCOMPtr<nsIPref> prefs(do_GetService(kPrefCID, &res));
|
||||
if (NS_SUCCEEDED(res) && prefs) {
|
||||
res = prefs->GetIntPref("browser.display.screen_resolution", &prefVal);
|
||||
if (NS_FAILED(res)) {
|
||||
prefVal = -1;
|
||||
}
|
||||
prefs->RegisterCallback("browser.display.screen_resolution", prefChanged,
|
||||
(void *)this);
|
||||
}
|
||||
|
||||
SetDPI(prefVal);
|
||||
} else {
|
||||
SetDPI(mDpi); // to setup p2t and t2p
|
||||
}
|
||||
|
||||
sb = gtk_vscrollbar_new(NULL);
|
||||
gtk_widget_ref(sb);
|
||||
gtk_object_sink(GTK_OBJECT(sb));
|
||||
#ifdef MOZ_WIDGET_GTK2
|
||||
gtk_widget_ensure_style(sb);
|
||||
gtk_widget_queue_resize(sb);
|
||||
#endif /* MOZ_WIDGET_GTK2 */
|
||||
gtk_widget_size_request(sb,&req);
|
||||
mScrollbarWidth = req.width;
|
||||
gtk_widget_destroy(sb);
|
||||
gtk_widget_unref(sb);
|
||||
|
||||
sb = gtk_hscrollbar_new(NULL);
|
||||
gtk_widget_ref(sb);
|
||||
gtk_object_sink(GTK_OBJECT(sb));
|
||||
#ifdef MOZ_WIDGET_GTK2
|
||||
gtk_widget_ensure_style(sb);
|
||||
gtk_widget_queue_resize(sb);
|
||||
#endif /* MOZ_WIDGET_GTK2 */
|
||||
gtk_widget_size_request(sb,&req);
|
||||
mScrollbarHeight = req.height;
|
||||
gtk_widget_destroy(sb);
|
||||
gtk_widget_unref(sb);
|
||||
|
||||
#ifdef DEBUG
|
||||
static PRBool once = PR_TRUE;
|
||||
if (once) {
|
||||
printf("GFX: dpi=%d t2p=%g p2t=%g depth=%d\n", mDpi, mTwipsToPixels, mPixelsToTwips,mDepth);
|
||||
once = PR_FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
DeviceContextImpl::CommonInit();
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextGTK::CreateRenderingContext(nsIRenderingContext *&aContext)
|
||||
{
|
||||
#ifdef NS_PRINT_PREVIEW
|
||||
// Defer to Alt when there is one
|
||||
if (mAltDC && ((mUseAltDC & kUseAltDCFor_CREATERC_PAINT) || (mUseAltDC & kUseAltDCFor_CREATERC_REFLOW))) {
|
||||
return mAltDC->CreateRenderingContext(aContext);
|
||||
}
|
||||
#endif
|
||||
|
||||
nsIRenderingContext *pContext;
|
||||
nsresult rv;
|
||||
nsDrawingSurfaceGTK *surf;
|
||||
GtkWidget *w;
|
||||
|
||||
w = (GtkWidget*)mWidget;
|
||||
|
||||
// to call init for this, we need to have a valid nsDrawingSurfaceGTK created
|
||||
pContext = new nsRenderingContextGTK();
|
||||
|
||||
if (nsnull != pContext)
|
||||
{
|
||||
NS_ADDREF(pContext);
|
||||
|
||||
// create the nsDrawingSurfaceGTK
|
||||
surf = new nsDrawingSurfaceGTK();
|
||||
|
||||
if (surf && w)
|
||||
{
|
||||
GdkDrawable *gwin = nsnull;
|
||||
GdkDrawable *win = nsnull;
|
||||
// FIXME
|
||||
if (GTK_IS_LAYOUT(w))
|
||||
gwin = (GdkDrawable*)GTK_LAYOUT(w)->bin_window;
|
||||
else
|
||||
gwin = (GdkDrawable*)(w)->window;
|
||||
|
||||
// window might not be realized... ugh
|
||||
if (gwin)
|
||||
gdk_window_ref(gwin);
|
||||
else
|
||||
win = gdk_pixmap_new(nsnull,
|
||||
w->allocation.width,
|
||||
w->allocation.height,
|
||||
gdk_rgb_get_visual()->depth);
|
||||
|
||||
GdkGC *gc = gdk_gc_new(win);
|
||||
|
||||
// init the nsDrawingSurfaceGTK
|
||||
rv = surf->Init(win,gc);
|
||||
|
||||
if (NS_OK == rv)
|
||||
// Init the nsRenderingContextGTK
|
||||
rv = pContext->Init(this, surf);
|
||||
}
|
||||
else
|
||||
rv = NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
else
|
||||
rv = NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
if (NS_OK != rv)
|
||||
{
|
||||
NS_IF_RELEASE(pContext);
|
||||
}
|
||||
|
||||
aContext = pContext;
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextGTK::SupportsNativeWidgets(PRBool &aSupportsWidgets)
|
||||
{
|
||||
//XXX it is very critical that this not lie!! MMP
|
||||
// read the comments in the mac code for this
|
||||
aSupportsWidgets = PR_TRUE;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextGTK::GetScrollBarDimensions(float &aWidth, float &aHeight) const
|
||||
{
|
||||
aWidth = mScrollbarWidth * mPixelsToTwips;
|
||||
aHeight = mScrollbarHeight * mPixelsToTwips;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextGTK::GetSystemFont(nsSystemFontID aID, nsFont *aFont) const
|
||||
{
|
||||
nsresult status = NS_OK;
|
||||
|
||||
if (!gSystemFonts) {
|
||||
gSystemFonts = new nsSystemFontsGTK(mPixelsToTwips);
|
||||
}
|
||||
|
||||
switch (aID) {
|
||||
case eSystemFont_Menu: // css2
|
||||
case eSystemFont_PullDownMenu: // css3
|
||||
*aFont = gSystemFonts->GetMenuFont();
|
||||
break;
|
||||
|
||||
case eSystemFont_Field: // css3
|
||||
case eSystemFont_List: // css3
|
||||
*aFont = gSystemFonts->GetFieldFont();
|
||||
break;
|
||||
|
||||
case eSystemFont_Button: // css3
|
||||
*aFont = gSystemFonts->GetButtonFont();
|
||||
break;
|
||||
|
||||
case eSystemFont_Caption: // css2
|
||||
case eSystemFont_Icon: // css2
|
||||
case eSystemFont_MessageBox: // css2
|
||||
case eSystemFont_SmallCaption: // css2
|
||||
case eSystemFont_StatusBar: // css2
|
||||
case eSystemFont_Window: // css3
|
||||
case eSystemFont_Document: // css3
|
||||
case eSystemFont_Workspace: // css3
|
||||
case eSystemFont_Desktop: // css3
|
||||
case eSystemFont_Info: // css3
|
||||
case eSystemFont_Dialog: // css3
|
||||
case eSystemFont_Tooltips: // moz
|
||||
case eSystemFont_Widget: // moz
|
||||
*aFont = gSystemFonts->GetDefaultFont();
|
||||
break;
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextGTK::GetDrawingSurface(nsIRenderingContext &aContext,
|
||||
nsDrawingSurface &aSurface)
|
||||
{
|
||||
aContext.CreateDrawingSurface(nsnull, 0, aSurface);
|
||||
return nsnull == aSurface ? NS_ERROR_OUT_OF_MEMORY : NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextGTK::ConvertPixel(nscolor aColor,
|
||||
PRUint32 & aPixel)
|
||||
{
|
||||
aPixel = ::gdk_rgb_xpixel_from_rgb (NS_TO_GDK_RGB(aColor));
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextGTK::CheckFontExistence(const nsString& aFontName)
|
||||
{
|
||||
return nsFontMetricsGTK::FamilyExists(aFontName);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextGTK::GetDeviceSurfaceDimensions(PRInt32 &aWidth, PRInt32 &aHeight)
|
||||
{
|
||||
#ifdef NS_PRINT_PREVIEW
|
||||
// Defer to Alt when there is one
|
||||
if (mAltDC && (mUseAltDC & kUseAltDCFor_SURFACE_DIM)) {
|
||||
return mAltDC->GetDeviceSurfaceDimensions(aWidth, aHeight);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (mWidth == -1)
|
||||
mWidth = NSToIntRound(mWidthFloat * mDevUnitsToAppUnits);
|
||||
|
||||
if (mHeight == -1)
|
||||
mHeight = NSToIntRound(mHeightFloat * mDevUnitsToAppUnits);
|
||||
|
||||
aWidth = mWidth;
|
||||
aHeight = mHeight;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextGTK::GetRect(nsRect &aRect)
|
||||
{
|
||||
// if we have an initialized widget for this device context, use it
|
||||
// to try and get real screen coordinates.
|
||||
if (mDeviceWindow) {
|
||||
gint x, y, width, height, depth;
|
||||
x = y = width = height = 0;
|
||||
|
||||
gdk_window_get_geometry(mDeviceWindow, &x, &y, &width, &height,
|
||||
&depth);
|
||||
gdk_window_get_origin(mDeviceWindow, &x, &y);
|
||||
|
||||
nsCOMPtr<nsIScreen> screen;
|
||||
mScreenManager->ScreenForRect(x, y, width, height, getter_AddRefs(screen));
|
||||
screen->GetRect(&aRect.x, &aRect.y, &aRect.width, &aRect.height);
|
||||
aRect.x = NSToIntRound(mDevUnitsToAppUnits * aRect.x);
|
||||
aRect.y = NSToIntRound(mDevUnitsToAppUnits * aRect.y);
|
||||
aRect.width = NSToIntRound(mDevUnitsToAppUnits * aRect.width);
|
||||
aRect.height = NSToIntRound(mDevUnitsToAppUnits * aRect.height);
|
||||
}
|
||||
else {
|
||||
PRInt32 width, height;
|
||||
GetDeviceSurfaceDimensions(width, height);
|
||||
aRect.x = 0;
|
||||
aRect.y = 0;
|
||||
aRect.width = width;
|
||||
aRect.height = height;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextGTK::GetClientRect(nsRect &aRect)
|
||||
{
|
||||
// The client rect is never different from the standard rect on
|
||||
// linux because we don't have the concept of the title bar.
|
||||
return GetRect ( aRect );
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextGTK::GetDeviceContextFor(nsIDeviceContextSpec *aDevice,
|
||||
nsIDeviceContext *&aContext)
|
||||
{
|
||||
nsresult rv;
|
||||
PrintMethod method;
|
||||
nsDeviceContextSpecGTK *spec = NS_STATIC_CAST(nsDeviceContextSpecGTK *, aDevice);
|
||||
|
||||
rv = spec->GetPrintMethod(method);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
#ifdef USE_XPRINT
|
||||
if (method == pmXprint) { // XPRINT
|
||||
static NS_DEFINE_CID(kCDeviceContextXp, NS_DEVICECONTEXTXP_CID);
|
||||
nsCOMPtr<nsIDeviceContextXp> dcxp(do_CreateInstance(kCDeviceContextXp, &rv));
|
||||
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't create Xp Device context.");
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
rv = dcxp->SetSpec(aDevice);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
rv = dcxp->InitDeviceContextXP((nsIDeviceContext*)aContext,
|
||||
(nsIDeviceContext*)this);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
rv = dcxp->QueryInterface(NS_GET_IID(nsIDeviceContext),
|
||||
(void **)&aContext);
|
||||
return rv;
|
||||
}
|
||||
else
|
||||
#endif /* USE_XPRINT */
|
||||
if (method == pmPostScript) { // PostScript
|
||||
// default/PS
|
||||
static NS_DEFINE_CID(kCDeviceContextPS, NS_DEVICECONTEXTPS_CID);
|
||||
|
||||
// Create a Postscript device context
|
||||
nsCOMPtr<nsIDeviceContextPS> dcps(do_CreateInstance(kCDeviceContextPS, &rv));
|
||||
NS_ASSERTION(NS_SUCCEEDED(rv), "Couldn't create PS Device context.");
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
rv = dcps->SetSpec(aDevice);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
rv = dcps->InitDeviceContextPS((nsIDeviceContext*)aContext,
|
||||
(nsIDeviceContext*)this);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
rv = dcps->QueryInterface(NS_GET_IID(nsIDeviceContext),
|
||||
(void **)&aContext);
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_WARNING("no print module created.");
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextGTK::BeginDocument(PRUnichar * aTitle)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextGTK::EndDocument(void)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextGTK::BeginPage(void)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextGTK::EndPage(void)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextGTK::GetDepth(PRUint32& aDepth)
|
||||
{
|
||||
aDepth = mDepth;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsDeviceContextGTK::SetDPI(PRInt32 aPrefDPI)
|
||||
{
|
||||
// Set OSVal to what the operating system thinks the logical resolution is.
|
||||
float screenWidthIn = float(::gdk_screen_width_mm()) / 25.4f;
|
||||
PRInt32 OSVal = NSToCoordRound(float(::gdk_screen_width()) / screenWidthIn);
|
||||
|
||||
if (aPrefDPI > 0) {
|
||||
// If there's a valid pref value for the logical resolution,
|
||||
// use it.
|
||||
mDpi = aPrefDPI;
|
||||
} else if ((aPrefDPI == 0) || (OSVal > 96)) {
|
||||
// Either if the pref is 0 (force use of OS value) or the OS
|
||||
// value is bigger than 96, use the OS value.
|
||||
mDpi = OSVal;
|
||||
} else {
|
||||
// if we couldn't get the pref or it's negative, and the OS
|
||||
// value is under 96ppi, then use 96.
|
||||
mDpi = 96;
|
||||
}
|
||||
|
||||
int pt2t = 72;
|
||||
|
||||
// make p2t a nice round number - this prevents rounding problems
|
||||
mPixelsToTwips = float(NSToIntRound(float(NSIntPointsToTwips(pt2t)) / float(mDpi)));
|
||||
mTwipsToPixels = 1.0f / mPixelsToTwips;
|
||||
|
||||
// XXX need to reflow all documents
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
int nsDeviceContextGTK::prefChanged(const char *aPref, void *aClosure)
|
||||
{
|
||||
nsDeviceContextGTK *context = (nsDeviceContextGTK*)aClosure;
|
||||
nsresult rv;
|
||||
|
||||
if (nsCRT::strcmp(aPref, "browser.display.screen_resolution")==0) {
|
||||
PRInt32 dpi;
|
||||
nsCOMPtr<nsIPref> prefs(do_GetService(kPrefCID, &rv));
|
||||
rv = prefs->GetIntPref(aPref, &dpi);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
context->SetDPI(dpi);
|
||||
|
||||
// If this pref changes, we have to clear our cache of stored system
|
||||
// fonts.
|
||||
if (gSystemFonts) {
|
||||
delete gSystemFonts;
|
||||
gSystemFonts = nsnull;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define DEFAULT_TWIP_FONT_SIZE 240
|
||||
|
||||
nsSystemFontsGTK::nsSystemFontsGTK(float aPixelsToTwips)
|
||||
: mDefaultFont("sans-serif", NS_FONT_STYLE_NORMAL, NS_FONT_VARIANT_NORMAL,
|
||||
NS_FONT_WEIGHT_NORMAL, NS_FONT_DECORATION_NONE,
|
||||
DEFAULT_TWIP_FONT_SIZE),
|
||||
mButtonFont("sans-serif", NS_FONT_STYLE_NORMAL, NS_FONT_VARIANT_NORMAL,
|
||||
NS_FONT_WEIGHT_NORMAL, NS_FONT_DECORATION_NONE,
|
||||
DEFAULT_TWIP_FONT_SIZE),
|
||||
mFieldFont("sans-serif", NS_FONT_STYLE_NORMAL, NS_FONT_VARIANT_NORMAL,
|
||||
NS_FONT_WEIGHT_NORMAL, NS_FONT_DECORATION_NONE,
|
||||
DEFAULT_TWIP_FONT_SIZE),
|
||||
mMenuFont("sans-serif", NS_FONT_STYLE_NORMAL, NS_FONT_VARIANT_NORMAL,
|
||||
NS_FONT_WEIGHT_NORMAL, NS_FONT_DECORATION_NONE,
|
||||
DEFAULT_TWIP_FONT_SIZE)
|
||||
{
|
||||
/*
|
||||
* Much of the widget creation code here is similar to the code in
|
||||
* nsLookAndFeel::InitColors().
|
||||
*/
|
||||
|
||||
// mDefaultFont
|
||||
GtkWidget *label = gtk_label_new("M");
|
||||
GtkWidget *parent = gtk_fixed_new();
|
||||
GtkWidget *window = gtk_window_new(GTK_WINDOW_POPUP);
|
||||
|
||||
gtk_container_add(GTK_CONTAINER(parent), label);
|
||||
gtk_container_add(GTK_CONTAINER(window), parent);
|
||||
|
||||
gtk_widget_set_rc_style(parent);
|
||||
gtk_widget_set_rc_style(label);
|
||||
gtk_widget_realize(parent);
|
||||
gtk_widget_realize(label);
|
||||
|
||||
GtkStyle *style = gtk_widget_get_style(label);
|
||||
GetSystemFontInfo(style, &mDefaultFont, aPixelsToTwips);
|
||||
|
||||
gtk_widget_destroy(window); // no unref, windows are different
|
||||
|
||||
// mFieldFont
|
||||
GtkWidget *entry = gtk_entry_new();
|
||||
parent = gtk_fixed_new();
|
||||
window = gtk_window_new(GTK_WINDOW_POPUP);
|
||||
|
||||
gtk_container_add(GTK_CONTAINER(parent), entry);
|
||||
gtk_container_add(GTK_CONTAINER(window), parent);
|
||||
|
||||
gtk_widget_set_rc_style(entry);
|
||||
gtk_widget_realize(entry);
|
||||
|
||||
style = gtk_widget_get_style(entry);
|
||||
GetSystemFontInfo(style, &mFieldFont, aPixelsToTwips);
|
||||
|
||||
gtk_widget_destroy(window); // no unref, windows are different
|
||||
|
||||
// mMenuFont
|
||||
GtkWidget *accel_label = gtk_accel_label_new("M");
|
||||
GtkWidget *menuitem = gtk_menu_item_new();
|
||||
GtkWidget *menu = gtk_menu_new();
|
||||
gtk_object_ref(GTK_OBJECT(menu));
|
||||
gtk_object_sink(GTK_OBJECT(menu));
|
||||
|
||||
gtk_container_add(GTK_CONTAINER(menuitem), accel_label);
|
||||
gtk_menu_append(GTK_MENU(menu), menuitem);
|
||||
|
||||
gtk_widget_set_rc_style(accel_label);
|
||||
gtk_widget_set_rc_style(menu);
|
||||
gtk_widget_realize(menu);
|
||||
gtk_widget_realize(accel_label);
|
||||
|
||||
style = gtk_widget_get_style(accel_label);
|
||||
GetSystemFontInfo(style, &mMenuFont, aPixelsToTwips);
|
||||
|
||||
gtk_widget_unref(menu);
|
||||
|
||||
// mButtonFont
|
||||
parent = gtk_fixed_new();
|
||||
GtkWidget *button = gtk_button_new();
|
||||
label = gtk_label_new("M");
|
||||
window = gtk_window_new(GTK_WINDOW_POPUP);
|
||||
|
||||
gtk_container_add(GTK_CONTAINER(button), label);
|
||||
gtk_container_add(GTK_CONTAINER(parent), button);
|
||||
gtk_container_add(GTK_CONTAINER(window), parent);
|
||||
|
||||
gtk_widget_set_rc_style(button);
|
||||
gtk_widget_set_rc_style(label);
|
||||
|
||||
gtk_widget_realize(button);
|
||||
gtk_widget_realize(label);
|
||||
|
||||
style = gtk_widget_get_style(label);
|
||||
GetSystemFontInfo(style, &mButtonFont, aPixelsToTwips);
|
||||
|
||||
gtk_widget_destroy(window); // no unref, windows are different
|
||||
|
||||
}
|
||||
|
||||
#if 0 // debugging code to list the font properties
|
||||
static void
|
||||
ListFontProps(XFontStruct *aFont, Display *aDisplay)
|
||||
{
|
||||
printf("\n\n");
|
||||
for (int i = 0, n = aFont->n_properties; i < n; ++i) {
|
||||
XFontProp *prop = aFont->properties + i;
|
||||
char *atomName = ::XGetAtomName(aDisplay, prop->name);
|
||||
// 500 is just a guess
|
||||
char *cardName = (prop->card32 > 0 && prop->card32 < 500)
|
||||
? ::XGetAtomName(aDisplay, prop->card32)
|
||||
: 0;
|
||||
printf("%s : %ld (%s)\n", atomName, prop->card32, cardName?cardName:"");
|
||||
::XFree(atomName);
|
||||
if (cardName)
|
||||
::XFree(cardName);
|
||||
}
|
||||
printf("\n\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
AppendFontName(XFontStruct* aFontStruct, nsString& aString, Display *aDisplay)
|
||||
{
|
||||
unsigned long pr = 0;
|
||||
::XGetFontProperty(aFontStruct, XA_FAMILY_NAME, &pr);
|
||||
if (!pr)
|
||||
::XGetFontProperty(aFontStruct, XA_FULL_NAME, &pr);
|
||||
if (pr) {
|
||||
char *fontName = ::XGetAtomName(aDisplay, pr);
|
||||
aString.AppendWithConversion(fontName);
|
||||
::XFree(fontName);
|
||||
}
|
||||
}
|
||||
|
||||
static PRUint16
|
||||
GetFontWeight(XFontStruct* aFontStruct, Display *aDisplay)
|
||||
{
|
||||
PRUint16 weight = NS_FONT_WEIGHT_NORMAL;
|
||||
|
||||
// WEIGHT_NAME seems more reliable than WEIGHT, where 10 can mean
|
||||
// anything. Check both, and make it bold if either says so.
|
||||
unsigned long pr = 0;
|
||||
Atom weightName = ::XInternAtom(aDisplay, "WEIGHT_NAME", True);
|
||||
if (weightName != None) {
|
||||
::XGetFontProperty(aFontStruct, weightName, &pr);
|
||||
if (pr) {
|
||||
char *weightString = ::XGetAtomName(aDisplay, pr);
|
||||
if (nsCRT::strcasecmp(weightString, "bold") == 0)
|
||||
weight = NS_FONT_WEIGHT_BOLD;
|
||||
::XFree(weightString);
|
||||
}
|
||||
}
|
||||
|
||||
pr = 0;
|
||||
::XGetFontProperty(aFontStruct, XA_WEIGHT, &pr);
|
||||
if ( pr > 10 )
|
||||
weight = NS_FONT_WEIGHT_BOLD;
|
||||
|
||||
return weight;
|
||||
}
|
||||
|
||||
static nscoord
|
||||
GetFontSize(XFontStruct *aFontStruct, float aPixelsToTwips)
|
||||
{
|
||||
unsigned long pr = 0;
|
||||
Atom pixelSizeAtom = ::XInternAtom(GDK_DISPLAY(), "PIXEL_SIZE", 0);
|
||||
::XGetFontProperty(aFontStruct, pixelSizeAtom, &pr);
|
||||
if (!pr)
|
||||
return DEFAULT_TWIP_FONT_SIZE;
|
||||
return NSIntPixelsToTwips(pr, aPixelsToTwips);
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsSystemFontsGTK::GetSystemFontInfo(GtkStyle *aStyle, nsFont* aFont, float aPixelsToTwips) const
|
||||
{
|
||||
#ifdef MOZ_WIDGET_GTK
|
||||
GdkFont *theFont = aStyle->font;
|
||||
#endif /* MOZ_WIDGET_GTK */
|
||||
|
||||
#ifdef MOZ_WIDGET_GTK2
|
||||
GdkFont *theFont = gtk_style_get_font(aStyle);
|
||||
#endif /* MOZ_WIDGET_GTK2 */
|
||||
|
||||
aFont->style = NS_FONT_STYLE_NORMAL;
|
||||
aFont->weight = NS_FONT_WEIGHT_NORMAL;
|
||||
aFont->decorations = NS_FONT_DECORATION_NONE;
|
||||
|
||||
// do we have the default_font defined by GTK/GDK then
|
||||
// we use it, if not then we load helvetica, if not then
|
||||
// we load fixed font else we error out.
|
||||
#ifdef MOZ_WIDGET_GTK
|
||||
if (!theFont)
|
||||
theFont = default_font; // GTK default font
|
||||
#endif
|
||||
|
||||
if (!theFont)
|
||||
theFont = ::gdk_font_load( GDK_DEFAULT_FONT1 );
|
||||
|
||||
if (!theFont)
|
||||
theFont = ::gdk_font_load( GDK_DEFAULT_FONT2 );
|
||||
|
||||
if (!theFont)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
Display *fontDisplay = GDK_FONT_XDISPLAY(theFont);
|
||||
if (theFont->type == GDK_FONT_FONT) {
|
||||
XFontStruct *fontStruct =
|
||||
NS_STATIC_CAST(XFontStruct*, GDK_FONT_XFONT(theFont));
|
||||
|
||||
aFont->name.Truncate();
|
||||
AppendFontName(fontStruct, aFont->name, fontDisplay);
|
||||
aFont->weight = GetFontWeight(fontStruct, fontDisplay);
|
||||
aFont->size = GetFontSize(fontStruct, aPixelsToTwips);
|
||||
} else {
|
||||
NS_ASSERTION(theFont->type == GDK_FONT_FONTSET,
|
||||
"theFont->type can only have two values");
|
||||
|
||||
XFontSet fontSet = NS_REINTERPRET_CAST(XFontSet, GDK_FONT_XFONT(theFont));
|
||||
XFontStruct **fontStructs;
|
||||
char **fontNames;
|
||||
int numFonts = ::XFontsOfFontSet(fontSet, &fontStructs, &fontNames);
|
||||
if (numFonts == 0)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
// Use the weight and size from the first font, but append all
|
||||
// the names.
|
||||
aFont->weight = GetFontWeight(*fontStructs, fontDisplay);
|
||||
aFont->size = GetFontSize(*fontStructs, aPixelsToTwips);
|
||||
nsString& fontName = aFont->name;
|
||||
fontName.Truncate();
|
||||
for (;;) {
|
||||
AppendFontName(*fontStructs, fontName, fontDisplay);
|
||||
++fontStructs;
|
||||
--numFonts;
|
||||
if (numFonts == 0)
|
||||
break;
|
||||
fontName.Append(NS_LITERAL_STRING(","));
|
||||
}
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
120
mozilla/gfx/src/gtk/nsDeviceContextGTK.h
Normal file
120
mozilla/gfx/src/gtk/nsDeviceContextGTK.h
Normal file
@@ -0,0 +1,120 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsDeviceContextGTK_h___
|
||||
#define nsDeviceContextGTK_h___
|
||||
|
||||
#include "nsDeviceContext.h"
|
||||
#include "nsUnitConversion.h"
|
||||
#include "nsIWidget.h"
|
||||
#include "nsIView.h"
|
||||
#include "nsIRenderingContext.h"
|
||||
|
||||
#include "nsRenderingContextGTK.h"
|
||||
#include "nsIScreenManager.h"
|
||||
|
||||
class nsDeviceContextGTK : public DeviceContextImpl
|
||||
{
|
||||
public:
|
||||
nsDeviceContextGTK();
|
||||
virtual ~nsDeviceContextGTK();
|
||||
|
||||
static void Shutdown(); // to be called from module destructor
|
||||
|
||||
NS_IMETHOD Init(nsNativeWidget aNativeWidget);
|
||||
|
||||
NS_IMETHOD CreateRenderingContext(nsIRenderingContext *&aContext);
|
||||
NS_IMETHOD CreateRenderingContext(nsIView *aView, nsIRenderingContext *&aContext) {return (DeviceContextImpl::CreateRenderingContext(aView,aContext));}
|
||||
NS_IMETHOD CreateRenderingContext(nsIWidget *aWidget, nsIRenderingContext *&aContext) {return (DeviceContextImpl::CreateRenderingContext(aWidget,aContext));}
|
||||
|
||||
NS_IMETHOD SupportsNativeWidgets(PRBool &aSupportsWidgets);
|
||||
|
||||
NS_IMETHOD GetScrollBarDimensions(float &aWidth, float &aHeight) const;
|
||||
NS_IMETHOD GetSystemFont(nsSystemFontID anID, nsFont *aFont) const;
|
||||
|
||||
//get a low level drawing surface for rendering. the rendering context
|
||||
//that is passed in is used to create the drawing surface if there isn't
|
||||
//already one in the device context. the drawing surface is then cached
|
||||
//in the device context for re-use.
|
||||
|
||||
NS_IMETHOD GetDrawingSurface(nsIRenderingContext &aContext, nsDrawingSurface &aSurface);
|
||||
|
||||
NS_IMETHOD ConvertPixel(nscolor aColor, PRUint32 & aPixel);
|
||||
NS_IMETHOD CheckFontExistence(const nsString& aFontName);
|
||||
|
||||
NS_IMETHOD GetDeviceSurfaceDimensions(PRInt32 &aWidth, PRInt32 &aHeight);
|
||||
NS_IMETHOD GetClientRect(nsRect &aRect);
|
||||
NS_IMETHOD GetRect(nsRect &aRect);
|
||||
|
||||
NS_IMETHOD GetDeviceContextFor(nsIDeviceContextSpec *aDevice,
|
||||
nsIDeviceContext *&aContext);
|
||||
|
||||
NS_IMETHOD BeginDocument(PRUnichar * aTitle);
|
||||
NS_IMETHOD EndDocument(void);
|
||||
|
||||
NS_IMETHOD BeginPage(void);
|
||||
NS_IMETHOD EndPage(void);
|
||||
|
||||
NS_IMETHOD GetDepth(PRUint32& aDepth);
|
||||
|
||||
static int prefChanged(const char *aPref, void *aClosure);
|
||||
|
||||
protected:
|
||||
nsresult SetDPI(PRInt32 aPrefDPI);
|
||||
|
||||
private:
|
||||
PRUint32 mDepth;
|
||||
PRBool mWriteable;
|
||||
PRUint32 mNumCells;
|
||||
PRInt16 mScrollbarHeight;
|
||||
PRInt16 mScrollbarWidth;
|
||||
static nscoord mDpi;
|
||||
|
||||
float mWidthFloat;
|
||||
float mHeightFloat;
|
||||
PRInt32 mWidth;
|
||||
PRInt32 mHeight;
|
||||
GdkWindow *mDeviceWindow;
|
||||
|
||||
nsCOMPtr<nsIScreenManager> mScreenManager;
|
||||
|
||||
nsresult GetSystemFontInfo(GdkFont* iFont, nsSystemFontID anID, nsFont* aFont) const;
|
||||
};
|
||||
|
||||
#endif /* nsDeviceContextGTK_h___ */
|
||||
|
||||
96
mozilla/gfx/src/gtk/nsDeviceContextSpecFactoryG.cpp
Normal file
96
mozilla/gfx/src/gtk/nsDeviceContextSpecFactoryG.cpp
Normal file
@@ -0,0 +1,96 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1999
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Roland Mainz <roland.mainz@informatik.med.uni-giessen.de>
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsDeviceContextSpecFactoryG.h"
|
||||
#include "nsDeviceContextSpecG.h"
|
||||
#include "nsGfxCIID.h"
|
||||
#include "plstr.h"
|
||||
|
||||
/** -------------------------------------------------------
|
||||
* Constructor
|
||||
* @update dc 2/16/98
|
||||
*/
|
||||
nsDeviceContextSpecFactoryGTK :: nsDeviceContextSpecFactoryGTK()
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
}
|
||||
|
||||
/** -------------------------------------------------------
|
||||
* Destructor
|
||||
* @update dc 2/16/98
|
||||
*/
|
||||
nsDeviceContextSpecFactoryGTK :: ~nsDeviceContextSpecFactoryGTK()
|
||||
{
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS1(nsDeviceContextSpecFactoryGTK, nsIDeviceContextSpecFactory)
|
||||
|
||||
/** -------------------------------------------------------
|
||||
* Initialize the device context spec factory
|
||||
* @update dc 2/16/98
|
||||
*/
|
||||
NS_IMETHODIMP nsDeviceContextSpecFactoryGTK :: Init(void)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/** -------------------------------------------------------
|
||||
* Get a device context specification
|
||||
* @update dc 2/16/98
|
||||
*/
|
||||
NS_IMETHODIMP nsDeviceContextSpecFactoryGTK :: CreateDeviceContextSpec(nsIWidget *aWidget,
|
||||
nsIPrintSettings* aPrintSettings,
|
||||
nsIDeviceContextSpec *&aNewSpec,
|
||||
PRBool aQuiet)
|
||||
{
|
||||
nsresult rv;
|
||||
static NS_DEFINE_CID(kDeviceContextSpecCID, NS_DEVICE_CONTEXT_SPEC_CID);
|
||||
nsCOMPtr<nsIDeviceContextSpec> devSpec = do_CreateInstance(kDeviceContextSpecCID, &rv);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
{
|
||||
rv = ((nsDeviceContextSpecGTK *)devSpec.get())->Init(aPrintSettings, aQuiet);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
{
|
||||
aNewSpec = devSpec;
|
||||
NS_ADDREF(aNewSpec);
|
||||
}
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
62
mozilla/gfx/src/gtk/nsDeviceContextSpecFactoryG.h
Normal file
62
mozilla/gfx/src/gtk/nsDeviceContextSpecFactoryG.h
Normal file
@@ -0,0 +1,62 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1999
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsDeviceContextSpecFactoryG_h___
|
||||
#define nsDeviceContextSpecFactoryG_h___
|
||||
|
||||
#include "nsIDeviceContextSpecFactory.h"
|
||||
#include "nsIDeviceContextSpec.h"
|
||||
|
||||
class nsDeviceContextSpecFactoryGTK : public nsIDeviceContextSpecFactory
|
||||
{
|
||||
public:
|
||||
nsDeviceContextSpecFactoryGTK();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_IMETHOD Init(void);
|
||||
NS_IMETHOD CreateDeviceContextSpec(nsIWidget *aWidget,
|
||||
nsIPrintSettings* aPrintSettings,
|
||||
nsIDeviceContextSpec *&aNewSpec,
|
||||
PRBool aQuiet);
|
||||
|
||||
protected:
|
||||
virtual ~nsDeviceContextSpecFactoryGTK();
|
||||
};
|
||||
|
||||
#endif
|
||||
636
mozilla/gfx/src/gtk/nsDeviceContextSpecG.cpp
Normal file
636
mozilla/gfx/src/gtk/nsDeviceContextSpecG.cpp
Normal file
@@ -0,0 +1,636 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Roland Mainz <roland.mainz@informatik.med.uni-giessen.de>
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsDeviceContextSpecG.h"
|
||||
|
||||
#include "nsReadableUtils.h"
|
||||
|
||||
#include "nsIPref.h"
|
||||
#include "prenv.h" /* for PR_GetEnv */
|
||||
|
||||
#include "nsIDOMWindow.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIDialogParamBlock.h"
|
||||
#include "nsISupportsPrimitives.h"
|
||||
#include "nsIWindowWatcher.h"
|
||||
#include "nsIDOMWindowInternal.h"
|
||||
#include "nsISupportsArray.h"
|
||||
|
||||
#ifdef USE_XPRINT
|
||||
#include "xprintutil.h"
|
||||
#endif /* USE_XPRINT */
|
||||
|
||||
//----------------------------------------------------------------------------------
|
||||
// The printer data is shared between the PrinterEnumerator and the nsDeviceContextSpecG
|
||||
// The PrinterEnumerator creates the printer info
|
||||
// but the nsDeviceContextSpecG cleans it up
|
||||
// If it gets created (via the Page Setup Dialog) but the user never prints anything
|
||||
// then it will never be delete, so this class takes care of that.
|
||||
class GlobalPrinters {
|
||||
public:
|
||||
static GlobalPrinters* GetInstance() { return &mGlobalPrinters; }
|
||||
~GlobalPrinters() { FreeGlobalPrinters(); }
|
||||
|
||||
void FreeGlobalPrinters();
|
||||
nsresult InitializeGlobalPrinters();
|
||||
|
||||
PRBool PrintersAreAllocated() { return mGlobalPrinterList != nsnull; }
|
||||
PRInt32 GetNumPrinters() { return mGlobalNumPrinters; }
|
||||
nsString* GetStringAt(PRInt32 aInx) { return mGlobalPrinterList->StringAt(aInx); }
|
||||
|
||||
protected:
|
||||
GlobalPrinters() {}
|
||||
|
||||
static GlobalPrinters mGlobalPrinters;
|
||||
static nsStringArray* mGlobalPrinterList;
|
||||
static int mGlobalNumPrinters;
|
||||
|
||||
};
|
||||
//---------------
|
||||
// static members
|
||||
GlobalPrinters GlobalPrinters::mGlobalPrinters;
|
||||
nsStringArray* GlobalPrinters::mGlobalPrinterList = nsnull;
|
||||
int GlobalPrinters::mGlobalNumPrinters = 0;
|
||||
//---------------
|
||||
|
||||
/** -------------------------------------------------------
|
||||
* Construct the nsDeviceContextSpecGTK
|
||||
* @update dc 12/02/98
|
||||
*/
|
||||
nsDeviceContextSpecGTK :: nsDeviceContextSpecGTK()
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
}
|
||||
|
||||
/** -------------------------------------------------------
|
||||
* Destroy the nsDeviceContextSpecGTK
|
||||
* @update dc 2/15/98
|
||||
*/
|
||||
nsDeviceContextSpecGTK :: ~nsDeviceContextSpecGTK()
|
||||
{
|
||||
}
|
||||
|
||||
#ifdef USE_XPRINT
|
||||
NS_IMPL_ISUPPORTS3(nsDeviceContextSpecGTK,
|
||||
nsIDeviceContextSpec,
|
||||
nsIDeviceContextSpecPS,
|
||||
nsIDeviceContextSpecXp)
|
||||
#else
|
||||
NS_IMPL_ISUPPORTS2(nsDeviceContextSpecGTK,
|
||||
nsIDeviceContextSpec,
|
||||
nsIDeviceContextSpecPS)
|
||||
#endif /* USE_XPRINT */
|
||||
|
||||
static nsresult DisplayXPDialog(nsIPrintSettings* aPS,
|
||||
const char* aChromeURL,
|
||||
PRBool& aClickedOK)
|
||||
{
|
||||
NS_ASSERTION(aPS, "Must have a print settings!");
|
||||
|
||||
aClickedOK = PR_FALSE;
|
||||
nsresult rv = NS_ERROR_FAILURE;
|
||||
|
||||
// create a nsISupportsArray of the parameters
|
||||
// being passed to the window
|
||||
nsCOMPtr<nsISupportsArray> array;
|
||||
NS_NewISupportsArray(getter_AddRefs(array));
|
||||
if (!array) return NS_ERROR_FAILURE;
|
||||
|
||||
nsCOMPtr<nsIPrintSettings> ps = aPS;
|
||||
nsCOMPtr<nsISupports> psSupports(do_QueryInterface(ps));
|
||||
NS_ASSERTION(psSupports, "PrintSettings must be a supports");
|
||||
array->AppendElement(psSupports);
|
||||
|
||||
nsCOMPtr<nsIDialogParamBlock> ioParamBlock(do_CreateInstance("@mozilla.org/embedcomp/dialogparam;1"));
|
||||
if (ioParamBlock) {
|
||||
ioParamBlock->SetInt(0, 0);
|
||||
nsCOMPtr<nsISupports> blkSupps(do_QueryInterface(ioParamBlock));
|
||||
NS_ASSERTION(blkSupps, "IOBlk must be a supports");
|
||||
|
||||
array->AppendElement(blkSupps);
|
||||
nsCOMPtr<nsISupports> arguments(do_QueryInterface(array));
|
||||
NS_ASSERTION(array, "array must be a supports");
|
||||
|
||||
nsCOMPtr<nsIWindowWatcher> wwatch(do_GetService("@mozilla.org/embedcomp/window-watcher;1"));
|
||||
if (wwatch) {
|
||||
nsCOMPtr<nsIDOMWindow> active;
|
||||
wwatch->GetActiveWindow(getter_AddRefs(active));
|
||||
nsCOMPtr<nsIDOMWindowInternal> parent = do_QueryInterface(active);
|
||||
|
||||
nsCOMPtr<nsIDOMWindow> newWindow;
|
||||
rv = wwatch->OpenWindow(parent, aChromeURL,
|
||||
"_blank", "chrome,modal,centerscreen", array,
|
||||
getter_AddRefs(newWindow));
|
||||
}
|
||||
}
|
||||
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
PRInt32 buttonPressed = 0;
|
||||
ioParamBlock->GetInt(0, &buttonPressed);
|
||||
if (buttonPressed == 1) {
|
||||
aClickedOK = PR_TRUE;
|
||||
} else {
|
||||
rv = NS_ERROR_ABORT;
|
||||
}
|
||||
} else {
|
||||
rv = NS_ERROR_ABORT;
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/** -------------------------------------------------------
|
||||
* Initialize the nsDeviceContextSpecGTK
|
||||
* @update dc 2/15/98
|
||||
* @update syd 3/2/99
|
||||
*
|
||||
* gisburn: Please note that this function exists as 1:1 copy in other
|
||||
* toolkits including:
|
||||
* - GTK+-toolkit:
|
||||
* file: mozilla/gfx/src/gtk/nsDeviceContextSpecG.cpp
|
||||
* function: NS_IMETHODIMP nsDeviceContextSpecGTK::Init(PRBool aQuiet)
|
||||
* - Xlib-toolkit:
|
||||
* file: mozilla/gfx/src/xlib/nsDeviceContextSpecXlib.cpp
|
||||
* function: NS_IMETHODIMP nsDeviceContextSpecXlib::Init(PRBool aQuiet)
|
||||
* - Qt-toolkit:
|
||||
* file: mozilla/gfx/src/qt/nsDeviceContextSpecQT.cpp
|
||||
* function: NS_IMETHODIMP nsDeviceContextSpecQT::Init(PRBool aQuiet)
|
||||
*
|
||||
* ** Please update the other toolkits when changing this function.
|
||||
*/
|
||||
NS_IMETHODIMP nsDeviceContextSpecGTK::Init(nsIPrintSettings* aPS, PRBool aQuiet)
|
||||
{
|
||||
nsresult rv = NS_ERROR_FAILURE;
|
||||
|
||||
mPrintSettings = aPS;
|
||||
|
||||
// if there is a current selection then enable the "Selection" radio button
|
||||
if (mPrintSettings) {
|
||||
PRBool isOn;
|
||||
mPrintSettings->GetPrintOptions(nsIPrintSettings::kEnableSelectionRB, &isOn);
|
||||
nsCOMPtr<nsIPref> pPrefs = do_GetService(NS_PREF_CONTRACTID, &rv);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
(void) pPrefs->SetBoolPref("print.selection_radio_enabled", isOn);
|
||||
}
|
||||
}
|
||||
|
||||
char *path;
|
||||
PRBool canPrint = PR_FALSE;
|
||||
PRBool reversed = PR_FALSE;
|
||||
PRBool color = PR_FALSE;
|
||||
PRBool tofile = PR_FALSE;
|
||||
PRInt16 printRange = nsIPrintSettings::kRangeAllPages;
|
||||
PRInt32 paper_size = NS_LETTER_SIZE;
|
||||
PRInt32 orientation = NS_PORTRAIT;
|
||||
PRInt32 fromPage = 1;
|
||||
PRInt32 toPage = 1;
|
||||
PRUnichar *command = nsnull;
|
||||
PRInt32 copies = 1;
|
||||
PRUnichar *printer = nsnull;
|
||||
PRUnichar *printfile = nsnull;
|
||||
double dleft = 0.5;
|
||||
double dright = 0.5;
|
||||
double dtop = 0.5;
|
||||
double dbottom = 0.5;
|
||||
|
||||
rv = GlobalPrinters::GetInstance()->InitializeGlobalPrinters();
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
if (!aQuiet ) {
|
||||
rv = DisplayXPDialog(mPrintSettings,
|
||||
"chrome://global/content/printdialog.xul", canPrint);
|
||||
}
|
||||
else {
|
||||
canPrint = PR_TRUE;
|
||||
}
|
||||
|
||||
GlobalPrinters::GetInstance()->FreeGlobalPrinters();
|
||||
|
||||
if (canPrint) {
|
||||
if (aPS != nsnull) {
|
||||
aPS->GetPrinterName(&printer);
|
||||
aPS->GetPrintReversed(&reversed);
|
||||
aPS->GetPrintInColor(&color);
|
||||
aPS->GetPaperSize(&paper_size);
|
||||
aPS->GetOrientation(&orientation);
|
||||
aPS->GetPrintCommand(&command);
|
||||
aPS->GetPrintRange(&printRange);
|
||||
aPS->GetToFileName(&printfile);
|
||||
aPS->GetPrintToFile(&tofile);
|
||||
aPS->GetStartPageRange(&fromPage);
|
||||
aPS->GetEndPageRange(&toPage);
|
||||
aPS->GetNumCopies(&copies);
|
||||
aPS->GetMarginTop(&dtop);
|
||||
aPS->GetMarginLeft(&dleft);
|
||||
aPS->GetMarginBottom(&dbottom);
|
||||
aPS->GetMarginRight(&dright);
|
||||
|
||||
if (command != nsnull && printfile != nsnull) {
|
||||
// ToDo: Use LocalEncoding instead of UTF-8 (see bug 73446)
|
||||
strcpy(mPrData.command, NS_ConvertUCS2toUTF8(command).get());
|
||||
strcpy(mPrData.path, NS_ConvertUCS2toUTF8(printfile).get());
|
||||
}
|
||||
if (printer != nsnull)
|
||||
strcpy(mPrData.printer, NS_ConvertUCS2toUTF8(printer).get());
|
||||
#ifdef DEBUG_rods
|
||||
printf("margins: %5.2f,%5.2f,%5.2f,%5.2f\n",
|
||||
dtop, dleft, dbottom, dright);
|
||||
printf("printRange %d\n", printRange);
|
||||
printf("fromPage %d\n", fromPage);
|
||||
printf("toPage %d\n", toPage);
|
||||
printf("tofile %d\n", tofile);
|
||||
printf("printfile %s\n",
|
||||
printfile? NS_ConvertUCS2toUTF8(printfile).get():"NULL");
|
||||
printf("command %s\n",
|
||||
command? NS_ConvertUCS2toUTF8(command).get():"NULL");
|
||||
printf("printer %s\n",
|
||||
printer? NS_ConvertUCS2toUTF8(printer).get():"NULL");
|
||||
#endif /* DEBUG_rods */
|
||||
} else {
|
||||
#ifdef VMS
|
||||
// Note to whoever puts the "lpr" into the prefs file. Please contact me
|
||||
// as I need to make the default be "print" instead of "lpr" for OpenVMS.
|
||||
strcpy(mPrData.command, "print");
|
||||
#else
|
||||
strcpy(mPrData.command, "lpr ${MOZ_PRINTER_NAME:+'-P'}${MOZ_PRINTER_NAME}");
|
||||
#endif /* VMS */
|
||||
}
|
||||
|
||||
mPrData.top = dtop;
|
||||
mPrData.bottom = dbottom;
|
||||
mPrData.left = dleft;
|
||||
mPrData.right = dright;
|
||||
mPrData.fpf = !reversed;
|
||||
mPrData.grayscale = !color;
|
||||
mPrData.size = paper_size;
|
||||
mPrData.orientation = orientation;
|
||||
mPrData.toPrinter = !tofile;
|
||||
mPrData.copies = copies;
|
||||
|
||||
// PWD, HOME, or fail
|
||||
|
||||
if (!printfile) {
|
||||
if ( ( path = PR_GetEnv( "PWD" ) ) == (char *) nsnull )
|
||||
if ( ( path = PR_GetEnv( "HOME" ) ) == (char *) nsnull )
|
||||
strcpy(mPrData.path, "mozilla.ps");
|
||||
|
||||
if ( path != (char *) nsnull )
|
||||
sprintf(mPrData.path, "%s/mozilla.ps", path);
|
||||
else
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
#ifdef NOT_IMPLEMENTED_YET
|
||||
if (mGlobalNumPrinters) {
|
||||
for(int i = 0; (i < mGlobalNumPrinters) && !mQueue; i++) {
|
||||
if (!(mGlobalPrinterList->StringAt(i)->CompareWithConversion(mPrData.printer, TRUE, -1)))
|
||||
mQueue = PrnDlg.SetPrinterQueue(i);
|
||||
}
|
||||
}
|
||||
#endif /* NOT_IMPLEMENTED_YET */
|
||||
|
||||
if (command != nsnull) {
|
||||
nsMemory::Free(command);
|
||||
}
|
||||
if (printfile != nsnull) {
|
||||
nsMemory::Free(printfile);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextSpecGTK::GetToPrinter(PRBool &aToPrinter)
|
||||
{
|
||||
aToPrinter = mPrData.toPrinter;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextSpecGTK::GetPrinterName ( char **aPrinter )
|
||||
{
|
||||
*aPrinter = &mPrData.printer[0];
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextSpecGTK::GetCopies ( int &aCopies )
|
||||
{
|
||||
aCopies = mPrData.copies;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextSpecGTK :: GetFirstPageFirst ( PRBool &aFpf )
|
||||
{
|
||||
aFpf = mPrData.fpf;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextSpecGTK :: GetGrayscale ( PRBool &aGrayscale )
|
||||
{
|
||||
aGrayscale = mPrData.grayscale;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextSpecGTK :: GetSize ( int &aSize )
|
||||
{
|
||||
aSize = mPrData.size;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextSpecGTK :: GetPageDimensions ( float &aWidth, float &aHeight )
|
||||
{
|
||||
if ( mPrData.size == NS_LETTER_SIZE ) {
|
||||
aWidth = 8.5;
|
||||
aHeight = 11.0;
|
||||
} else if ( mPrData.size == NS_LEGAL_SIZE ) {
|
||||
aWidth = 8.5;
|
||||
aHeight = 14.0;
|
||||
} else if ( mPrData.size == NS_EXECUTIVE_SIZE ) {
|
||||
aWidth = 7.5;
|
||||
aHeight = 10.0;
|
||||
} else if ( mPrData.size == NS_A4_SIZE ) {
|
||||
// 210mm X 297mm == 8.27in X 11.69in
|
||||
aWidth = 8.27;
|
||||
aHeight = 11.69;
|
||||
} else if ( mPrData.size == NS_A3_SIZE ) {
|
||||
// 297mm X 420mm == 11.69in X 16.53in
|
||||
aWidth = 11.69;
|
||||
aHeight = 16.53; }
|
||||
|
||||
if (mPrData.orientation == NS_LANDSCAPE) {
|
||||
float temp;
|
||||
temp = aWidth;
|
||||
aWidth = aHeight;
|
||||
aHeight = temp;
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextSpecGTK :: GetLandscape ( PRBool &landscape )
|
||||
{
|
||||
landscape = (mPrData.orientation == NS_LANDSCAPE);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextSpecGTK :: GetTopMargin ( float &value )
|
||||
{
|
||||
value = mPrData.top;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextSpecGTK :: GetBottomMargin ( float &value )
|
||||
{
|
||||
value = mPrData.bottom;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextSpecGTK :: GetRightMargin ( float &value )
|
||||
{
|
||||
value = mPrData.right;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextSpecGTK :: GetLeftMargin ( float &value )
|
||||
{
|
||||
value = mPrData.left;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextSpecGTK :: GetCommand ( char **aCommand )
|
||||
{
|
||||
*aCommand = &mPrData.command[0];
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextSpecGTK :: GetPath ( char **aPath )
|
||||
{
|
||||
*aPath = &mPrData.path[0];
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextSpecGTK :: GetUserCancelled( PRBool &aCancel )
|
||||
{
|
||||
aCancel = mPrData.cancel;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextSpecGTK::GetPrintMethod(PrintMethod &aMethod)
|
||||
{
|
||||
/* printer names for the PostScript module alwas start with
|
||||
* the NS_POSTSCRIPT_DRIVER_NAME string */
|
||||
if (strncmp(mPrData.printer, NS_POSTSCRIPT_DRIVER_NAME,
|
||||
NS_POSTSCRIPT_DRIVER_NAME_LEN) != 0)
|
||||
aMethod = pmXprint;
|
||||
else
|
||||
aMethod = pmPostScript;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextSpecGTK::ClosePrintManager()
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// Printer Enumerator
|
||||
nsPrinterEnumeratorGTK::nsPrinterEnumeratorGTK()
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS1(nsPrinterEnumeratorGTK, nsIPrinterEnumerator)
|
||||
|
||||
NS_IMETHODIMP nsPrinterEnumeratorGTK::EnumeratePrinters(PRUint32* aCount, PRUnichar*** aResult)
|
||||
{
|
||||
NS_ENSURE_ARG(aCount);
|
||||
NS_ENSURE_ARG_POINTER(aResult);
|
||||
|
||||
if (aCount)
|
||||
*aCount = 0;
|
||||
else
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
||||
if (aResult)
|
||||
*aResult = nsnull;
|
||||
else
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
||||
nsresult rv = GlobalPrinters::GetInstance()->InitializeGlobalPrinters();
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
PRInt32 numPrinters = GlobalPrinters::GetInstance()->GetNumPrinters();
|
||||
|
||||
PRUnichar** array = (PRUnichar**) nsMemory::Alloc(numPrinters * sizeof(PRUnichar*));
|
||||
if (!array && numPrinters > 0) {
|
||||
GlobalPrinters::GetInstance()->FreeGlobalPrinters();
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
int count = 0;
|
||||
while( count < numPrinters )
|
||||
{
|
||||
|
||||
PRUnichar *str = ToNewUnicode(*GlobalPrinters::GetInstance()->GetStringAt(count));
|
||||
|
||||
if (!str) {
|
||||
for (int i = count - 1; i >= 0; i--)
|
||||
nsMemory::Free(array[i]);
|
||||
|
||||
nsMemory::Free(array);
|
||||
|
||||
GlobalPrinters::GetInstance()->FreeGlobalPrinters();
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
array[count++] = str;
|
||||
|
||||
}
|
||||
*aCount = count;
|
||||
*aResult = array;
|
||||
GlobalPrinters::GetInstance()->FreeGlobalPrinters();
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsPrinterEnumeratorGTK::DisplayPropertiesDlg(const PRUnichar *aPrinter, nsIPrintSettings* aPrintSettings)
|
||||
{
|
||||
/* fixme: We simply ignore the |aPrinter| argument here
|
||||
* We should get the supported printer attributes from the printer and
|
||||
* populate the print job options dialog with these data instead of using
|
||||
* the "default set" here.
|
||||
* However, this requires changes on all platforms and is another big chunk
|
||||
* of patches ... ;-(
|
||||
*/
|
||||
|
||||
PRBool pressedOK;
|
||||
return DisplayXPDialog(aPrintSettings,
|
||||
"chrome://global/content/printjoboptions.xul",
|
||||
pressedOK);
|
||||
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
nsresult GlobalPrinters::InitializeGlobalPrinters ()
|
||||
{
|
||||
if (PrintersAreAllocated()) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
mGlobalNumPrinters = 0;
|
||||
mGlobalPrinterList = new nsStringArray();
|
||||
if (!mGlobalPrinterList)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
#ifdef USE_XPRINT
|
||||
XPPrinterList plist = XpuGetPrinterList(nsnull, &mGlobalNumPrinters);
|
||||
|
||||
if (plist && (mGlobalNumPrinters > 0))
|
||||
{
|
||||
int i;
|
||||
for( i = 0 ; i < mGlobalNumPrinters ; i++ )
|
||||
{
|
||||
mGlobalPrinterList->AppendString(nsString(NS_ConvertASCIItoUCS2(plist[i].name)));
|
||||
}
|
||||
|
||||
XpuFreePrinterList(plist);
|
||||
}
|
||||
#endif /* USE_XPRINT */
|
||||
|
||||
/* add an entry for the default printer (see nsPostScriptObj.cpp) */
|
||||
mGlobalPrinterList->AppendString(
|
||||
nsString(NS_ConvertASCIItoUCS2(NS_POSTSCRIPT_DRIVER_NAME "default")));
|
||||
mGlobalNumPrinters++;
|
||||
|
||||
/* get the list of printers */
|
||||
char *printerList = nsnull;
|
||||
|
||||
/* the env var MOZILLA_PRINTER_LIST can "override" the prefs */
|
||||
printerList = PR_GetEnv("MOZILLA_PRINTER_LIST");
|
||||
|
||||
if (!printerList) {
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIPref> pPrefs = do_GetService(NS_PREF_CONTRACTID, &rv);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
(void) pPrefs->CopyCharPref("print.printer_list", &printerList);
|
||||
}
|
||||
}
|
||||
|
||||
if (printerList) {
|
||||
char *tok_lasts;
|
||||
char *name;
|
||||
|
||||
/* PL_strtok_r() will modify the string - copy it! */
|
||||
printerList = strdup(printerList);
|
||||
if (!printerList)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
for( name = PL_strtok_r(printerList, " ", &tok_lasts) ;
|
||||
name != nsnull ;
|
||||
name = PL_strtok_r(nsnull, " ", &tok_lasts) )
|
||||
{
|
||||
mGlobalPrinterList->AppendString(
|
||||
nsString(NS_ConvertASCIItoUCS2(NS_POSTSCRIPT_DRIVER_NAME)) +
|
||||
nsString(NS_ConvertASCIItoUCS2(name)));
|
||||
mGlobalNumPrinters++;
|
||||
}
|
||||
|
||||
free(printerList);
|
||||
}
|
||||
|
||||
if (mGlobalNumPrinters == 0)
|
||||
return NS_ERROR_GFX_PRINTER_NO_PRINTER_AVAILABLE;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
void GlobalPrinters::FreeGlobalPrinters()
|
||||
{
|
||||
delete mGlobalPrinterList;
|
||||
mGlobalPrinterList = nsnull;
|
||||
mGlobalNumPrinters = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
154
mozilla/gfx/src/gtk/nsDeviceContextSpecG.h
Normal file
154
mozilla/gfx/src/gtk/nsDeviceContextSpecG.h
Normal file
@@ -0,0 +1,154 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Roland Mainz <roland.mainz@informatik.med.uni-giessen.de>
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsDeviceContextSpecG_h___
|
||||
#define nsDeviceContextSpecG_h___
|
||||
|
||||
#include "nsIDeviceContextSpec.h"
|
||||
#include "nsIPrintOptions.h"
|
||||
#include "nsVoidArray.h"
|
||||
#include "nsIDeviceContextSpecPS.h"
|
||||
#include "nsIPrintSettings.h"
|
||||
#ifdef USE_XPRINT
|
||||
#include "nsIDeviceContextSpecXPrint.h"
|
||||
#endif /* USE_XPRINT */
|
||||
#include "nsPrintdGTK.h"
|
||||
|
||||
typedef enum
|
||||
{
|
||||
pmInvalid = 0,
|
||||
pmXprint,
|
||||
pmPostScript
|
||||
} PrintMethod;
|
||||
|
||||
class nsDeviceContextSpecGTK : public nsIDeviceContextSpec ,
|
||||
public nsIDeviceContextSpecPS
|
||||
#ifdef USE_XPRINT
|
||||
, public nsIDeviceContextSpecXp
|
||||
#endif
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* Construct a nsDeviceContextSpecMac, which is an object which contains and manages a mac printrecord
|
||||
* @update dc 12/02/98
|
||||
*/
|
||||
nsDeviceContextSpecGTK();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
/**
|
||||
* Initialize the nsDeviceContextSpecMac for use. This will allocate a printrecord for use
|
||||
* @update dc 2/16/98
|
||||
* @param aQuiet if PR_TRUE, prevent the need for user intervention
|
||||
* in obtaining device context spec. if nsnull is passed in for
|
||||
* the aOldSpec, this will typically result in getting a device
|
||||
* context spec for the default output device (i.e. default
|
||||
* printer).
|
||||
* @return error status
|
||||
*/
|
||||
NS_IMETHOD Init(nsIPrintSettings* aPS, PRBool aQuiet);
|
||||
|
||||
|
||||
/**
|
||||
* Closes the printmanager if it is open.
|
||||
* @update dc 2/13/98
|
||||
* @update syd 3/20/99
|
||||
* @return error status
|
||||
*/
|
||||
|
||||
NS_IMETHOD ClosePrintManager();
|
||||
|
||||
NS_IMETHOD GetToPrinter( PRBool &aToPrinter );
|
||||
|
||||
NS_IMETHOD GetPrinterName ( char **aPrinter );
|
||||
|
||||
NS_IMETHOD GetCopies ( int &aCopies );
|
||||
|
||||
NS_IMETHOD GetFirstPageFirst ( PRBool &aFpf );
|
||||
|
||||
NS_IMETHOD GetGrayscale( PRBool &aGrayscale );
|
||||
|
||||
NS_IMETHOD GetSize ( int &aSize );
|
||||
|
||||
NS_IMETHOD GetTopMargin ( float &value );
|
||||
|
||||
NS_IMETHOD GetBottomMargin ( float &value );
|
||||
|
||||
NS_IMETHOD GetLeftMargin ( float &value );
|
||||
|
||||
NS_IMETHOD GetRightMargin ( float &value );
|
||||
|
||||
NS_IMETHOD GetCommand ( char **aCommand );
|
||||
|
||||
NS_IMETHOD GetPath ( char **aPath );
|
||||
|
||||
NS_IMETHOD GetPageDimensions (float &aWidth, float &aHeight );
|
||||
|
||||
NS_IMETHOD GetLandscape (PRBool &aLandscape);
|
||||
|
||||
NS_IMETHOD GetUserCancelled( PRBool &aCancel );
|
||||
|
||||
NS_IMETHOD GetPrintMethod(PrintMethod &aMethod );
|
||||
|
||||
/**
|
||||
* Destuct a nsDeviceContextSpecMac, this will release the printrecord
|
||||
* @update dc 2/16/98
|
||||
*/
|
||||
virtual ~nsDeviceContextSpecGTK();
|
||||
|
||||
protected:
|
||||
nsCOMPtr<nsIPrintSettings> mPrintSettings;
|
||||
UnixPrData mPrData;
|
||||
};
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// Printer Enumerator
|
||||
//-------------------------------------------------------------------------
|
||||
class nsPrinterEnumeratorGTK : public nsIPrinterEnumerator
|
||||
{
|
||||
public:
|
||||
nsPrinterEnumeratorGTK();
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIPRINTERENUMERATOR
|
||||
|
||||
protected:
|
||||
};
|
||||
|
||||
#endif /* !nsDeviceContextSpecG_h___ */
|
||||
|
||||
323
mozilla/gfx/src/gtk/nsDrawingSurfaceGTK.cpp
Normal file
323
mozilla/gfx/src/gtk/nsDrawingSurfaceGTK.cpp
Normal file
@@ -0,0 +1,323 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
|
||||
#include <gdk/gdkx.h>
|
||||
#include <gdk/gdkprivate.h>
|
||||
#include "nsDrawingSurfaceGTK.h"
|
||||
|
||||
NS_IMPL_ISUPPORTS1(nsDrawingSurfaceGTK, nsIDrawingSurface)
|
||||
|
||||
//#define CHEAP_PERFORMANCE_MEASUREMENT
|
||||
|
||||
#ifdef CHEAP_PERFORMANCE_MEASUREMENT
|
||||
static PRTime mLockTime, mUnlockTime;
|
||||
#endif
|
||||
|
||||
nsDrawingSurfaceGTK :: nsDrawingSurfaceGTK()
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
GdkVisual *v;
|
||||
|
||||
mPixmap = nsnull;
|
||||
mGC = nsnull;
|
||||
mDepth = 0;
|
||||
mWidth = 0;
|
||||
mHeight = 0;
|
||||
mFlags = 0;
|
||||
|
||||
mImage = nsnull;
|
||||
mLockWidth = 0;
|
||||
mLockHeight = 0;
|
||||
mLockFlags = 0;
|
||||
mLockX = 0;
|
||||
mLockY = 0;
|
||||
mLocked = PR_FALSE;
|
||||
|
||||
v = ::gdk_rgb_get_visual();
|
||||
|
||||
mPixFormat.mRedMask = v->red_mask;
|
||||
mPixFormat.mGreenMask = v->green_mask;
|
||||
mPixFormat.mBlueMask = v->blue_mask;
|
||||
// FIXME
|
||||
mPixFormat.mAlphaMask = 0;
|
||||
|
||||
mPixFormat.mRedCount = ConvertMaskToCount(v->red_mask);
|
||||
mPixFormat.mGreenCount = ConvertMaskToCount(v->green_mask);
|
||||
mPixFormat.mBlueCount = ConvertMaskToCount(v->blue_mask);;
|
||||
|
||||
|
||||
mPixFormat.mRedShift = v->red_shift;
|
||||
mPixFormat.mGreenShift = v->green_shift;
|
||||
mPixFormat.mBlueShift = v->blue_shift;
|
||||
// FIXME
|
||||
mPixFormat.mAlphaShift = 0;
|
||||
|
||||
mDepth = v->depth;
|
||||
}
|
||||
|
||||
nsDrawingSurfaceGTK :: ~nsDrawingSurfaceGTK()
|
||||
{
|
||||
if (mPixmap)
|
||||
::gdk_pixmap_unref(mPixmap);
|
||||
|
||||
if (mImage)
|
||||
::gdk_image_destroy(mImage);
|
||||
|
||||
if (mGC)
|
||||
gdk_gc_unref(mGC);
|
||||
}
|
||||
|
||||
/**
|
||||
* Lock a rect of a drawing surface and return a
|
||||
* pointer to the upper left hand corner of the
|
||||
* bitmap.
|
||||
* @param aX x position of subrect of bitmap
|
||||
* @param aY y position of subrect of bitmap
|
||||
* @param aWidth width of subrect of bitmap
|
||||
* @param aHeight height of subrect of bitmap
|
||||
* @param aBits out parameter for upper left hand
|
||||
* corner of bitmap
|
||||
* @param aStride out parameter for number of bytes
|
||||
* to add to aBits to go from scanline to scanline
|
||||
* @param aWidthBytes out parameter for number of
|
||||
* bytes per line in aBits to process aWidth pixels
|
||||
* @return error status
|
||||
*
|
||||
**/
|
||||
NS_IMETHODIMP nsDrawingSurfaceGTK :: Lock(PRInt32 aX, PRInt32 aY,
|
||||
PRUint32 aWidth, PRUint32 aHeight,
|
||||
void **aBits, PRInt32 *aStride,
|
||||
PRInt32 *aWidthBytes, PRUint32 aFlags)
|
||||
{
|
||||
#ifdef CHEAP_PERFORMANCE_MEASUREMENT
|
||||
mLockTime = PR_Now();
|
||||
// MOZ_TIMER_RESET(mLockTime);
|
||||
// MOZ_TIMER_START(mLockTime);
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
g_print("nsDrawingSurfaceGTK::Lock() called\n" \
|
||||
" aX = %i, aY = %i,\n" \
|
||||
" aWidth = %i, aHeight = %i,\n" \
|
||||
" aBits, aStride, aWidthBytes,\n" \
|
||||
" aFlags = %i\n", aX, aY, aWidth, aHeight, aFlags);
|
||||
#endif
|
||||
|
||||
if (mLocked)
|
||||
{
|
||||
NS_ASSERTION(0, "nested lock attempt");
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
mLocked = PR_TRUE;
|
||||
|
||||
mLockX = aX;
|
||||
mLockY = aY;
|
||||
mLockWidth = aWidth;
|
||||
mLockHeight = aHeight;
|
||||
mLockFlags = aFlags;
|
||||
|
||||
// Obtain an ximage from the pixmap.
|
||||
mImage = ::gdk_image_get(mPixmap, mLockX, mLockY, mLockWidth, mLockHeight);
|
||||
|
||||
*aBits = GDK_IMAGE_XIMAGE(mImage)->data;
|
||||
|
||||
*aWidthBytes = GDK_IMAGE_XIMAGE(mImage)->bytes_per_line;
|
||||
*aStride = GDK_IMAGE_XIMAGE(mImage)->bytes_per_line;
|
||||
|
||||
#ifdef CHEAP_PERFORMANCE_MEASUREMENT
|
||||
// MOZ_TIMER_STOP(mLockTime);
|
||||
// MOZ_TIMER_LOG(("Time taken to lock: "));
|
||||
// MOZ_TIMER_PRINT(mLockTime);
|
||||
printf("Time taken to lock: %d\n", PR_Now() - mLockTime);
|
||||
#endif
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDrawingSurfaceGTK :: Unlock(void)
|
||||
{
|
||||
|
||||
#ifdef CHEAP_PERFORMANCE_MEASUREMENT
|
||||
mUnlockTime = PR_Now();
|
||||
#endif
|
||||
|
||||
// g_print("nsDrawingSurfaceGTK::UnLock() called\n");
|
||||
if (!mLocked)
|
||||
{
|
||||
NS_ASSERTION(0, "attempting to unlock an DS that isn't locked");
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
// If the lock was not read only, put the bits back on the pixmap
|
||||
if (!(mLockFlags & NS_LOCK_SURFACE_READ_ONLY))
|
||||
{
|
||||
#if 0
|
||||
g_print("%p gdk_draw_image(pixmap=%p,lockx=%d,locky=%d,lockw=%d,lockh=%d)\n",
|
||||
this,
|
||||
mPixmap,
|
||||
mLockX, mLockY,
|
||||
mLockWidth, mLockHeight);
|
||||
#endif
|
||||
|
||||
gdk_draw_image(mPixmap,
|
||||
mGC,
|
||||
mImage,
|
||||
0, 0,
|
||||
mLockX, mLockY,
|
||||
mLockWidth, mLockHeight);
|
||||
}
|
||||
|
||||
if (mImage)
|
||||
::gdk_image_destroy(mImage);
|
||||
mImage = nsnull;
|
||||
|
||||
mLocked = PR_FALSE;
|
||||
|
||||
|
||||
#ifdef CHEAP_PERFORMANCE_MEASUREMENT
|
||||
printf("Time taken to unlock: %d\n", PR_Now() - mUnlockTime);
|
||||
#endif
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDrawingSurfaceGTK :: GetDimensions(PRUint32 *aWidth, PRUint32 *aHeight)
|
||||
{
|
||||
*aWidth = mWidth;
|
||||
*aHeight = mHeight;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDrawingSurfaceGTK :: IsOffscreen(PRBool *aOffScreen)
|
||||
{
|
||||
*aOffScreen = mIsOffscreen;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDrawingSurfaceGTK :: IsPixelAddressable(PRBool *aAddressable)
|
||||
{
|
||||
// FIXME
|
||||
*aAddressable = PR_FALSE;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDrawingSurfaceGTK :: GetPixelFormat(nsPixelFormat *aFormat)
|
||||
{
|
||||
*aFormat = mPixFormat;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult nsDrawingSurfaceGTK :: Init(GdkDrawable *aDrawable, GdkGC *aGC)
|
||||
{
|
||||
if (mGC)
|
||||
gdk_gc_unref(mGC);
|
||||
|
||||
mGC = gdk_gc_ref(aGC);
|
||||
mPixmap = aDrawable;
|
||||
|
||||
#ifdef MOZ_WIDGET_GTK
|
||||
mWidth = ((GdkWindowPrivate*)aDrawable)->width;
|
||||
mHeight = ((GdkWindowPrivate*)aDrawable)->height;
|
||||
#endif /* MOZ_WIDGET_GTK */
|
||||
|
||||
#ifdef MOZ_WIDGET_GTK2
|
||||
gint width = 0;
|
||||
gint height = 0;
|
||||
gdk_drawable_get_size(aDrawable, &width, &height);
|
||||
mWidth = width;
|
||||
mHeight = height;
|
||||
#endif /* MOZ_WIDGET_GTK2 */
|
||||
|
||||
// XXX was i smoking crack when i wrote this comment?
|
||||
// this is definatly going to be on the screen, as it will be the window of a
|
||||
// widget or something.
|
||||
mIsOffscreen = PR_FALSE;
|
||||
|
||||
if (mImage)
|
||||
gdk_image_destroy(mImage);
|
||||
mImage = nsnull;
|
||||
|
||||
g_return_val_if_fail(mPixmap != nsnull, NS_ERROR_FAILURE);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult nsDrawingSurfaceGTK :: Init(GdkGC *aGC, PRUint32 aWidth,
|
||||
PRUint32 aHeight, PRUint32 aFlags)
|
||||
{
|
||||
// ::g_return_val_if_fail (aGC != nsnull, NS_ERROR_FAILURE);
|
||||
// ::g_return_val_if_fail ((aWidth > 0) && (aHeight > 0), NS_ERROR_FAILURE);
|
||||
if (mGC)
|
||||
gdk_gc_unref(mGC);
|
||||
|
||||
mGC = gdk_gc_ref(aGC);
|
||||
mWidth = aWidth;
|
||||
mHeight = aHeight;
|
||||
mFlags = aFlags;
|
||||
|
||||
// we can draw on this offscreen because it has no parent
|
||||
mIsOffscreen = PR_TRUE;
|
||||
|
||||
mPixmap = ::gdk_pixmap_new(nsnull, mWidth, mHeight, mDepth);
|
||||
|
||||
if (mImage)
|
||||
gdk_image_destroy(mImage);
|
||||
mImage = nsnull;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* inline */
|
||||
PRUint8
|
||||
nsDrawingSurfaceGTK::ConvertMaskToCount(unsigned long val)
|
||||
{
|
||||
PRUint8 retval = 0;
|
||||
PRUint8 cur_bit = 0;
|
||||
// walk through the number, incrementing the value if
|
||||
// the bit in question is set.
|
||||
while (cur_bit < (sizeof(unsigned long) * 8)) {
|
||||
if ((val >> cur_bit) & 0x1) {
|
||||
retval++;
|
||||
}
|
||||
cur_bit++;
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
132
mozilla/gfx/src/gtk/nsDrawingSurfaceGTK.h
Normal file
132
mozilla/gfx/src/gtk/nsDrawingSurfaceGTK.h
Normal file
@@ -0,0 +1,132 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsDrawingSurfaceGTK_h___
|
||||
#define nsDrawingSurfaceGTK_h___
|
||||
|
||||
#include "nsIDrawingSurface.h"
|
||||
|
||||
#include "nsTimer.h"
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
class nsDrawingSurfaceGTK : public nsIDrawingSurface
|
||||
{
|
||||
public:
|
||||
nsDrawingSurfaceGTK();
|
||||
virtual ~nsDrawingSurfaceGTK();
|
||||
|
||||
/**
|
||||
* Initialize a drawing surface using a windows DC.
|
||||
* aDC is "owned" by the drawing surface until the drawing
|
||||
* surface is destroyed.
|
||||
* @param aDC HDC to initialize drawing surface with
|
||||
* @return error status
|
||||
**/
|
||||
|
||||
nsresult Init(GdkDrawable *aDrawable, GdkGC *aGC);
|
||||
|
||||
/**
|
||||
* Initialize an offscreen drawing surface using a
|
||||
* windows DC. aDC is not "owned" by this drawing surface, instead
|
||||
* it is used to create a drawing surface compatible
|
||||
* with aDC. if width or height are less than zero, aDC will
|
||||
* be created with no offscreen bitmap installed.
|
||||
* @param aDC HDC to initialize drawing surface with
|
||||
* @param aWidth width of drawing surface
|
||||
* @param aHeight height of drawing surface
|
||||
* @param aFlags flags used to control type of drawing
|
||||
* surface created
|
||||
* @return error status
|
||||
**/
|
||||
|
||||
nsresult Init(GdkGC *aGC, PRUint32 aWidth, PRUint32 aHeight,
|
||||
PRUint32 aFlags);
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
//nsIDrawingSurface interface
|
||||
|
||||
NS_IMETHOD Lock(PRInt32 aX, PRInt32 aY, PRUint32 aWidth, PRUint32 aHeight,
|
||||
void **aBits, PRInt32 *aStride, PRInt32 *aWidthBytes,
|
||||
PRUint32 aFlags);
|
||||
NS_IMETHOD Unlock(void);
|
||||
NS_IMETHOD GetDimensions(PRUint32 *aWidth, PRUint32 *aHeight);
|
||||
NS_IMETHOD IsOffscreen(PRBool *aOffScreen);
|
||||
NS_IMETHOD IsPixelAddressable(PRBool *aAddressable);
|
||||
NS_IMETHOD GetPixelFormat(nsPixelFormat *aFormat);
|
||||
|
||||
/* below are utility functions used mostly for nsRenderingContext and nsImage
|
||||
* to plug into gdk_* functions for drawing. You should not set a pointer
|
||||
* that might hang around with the return from these. instead use the ones
|
||||
* above. pav
|
||||
*/
|
||||
GdkDrawable *GetDrawable(void) { return mPixmap; }
|
||||
|
||||
void GetSize(PRUint32 *aWidth, PRUint32 *aHeight) { *aWidth = mWidth; *aHeight = mHeight; }
|
||||
|
||||
PRInt32 GetDepth() { return mDepth; }
|
||||
|
||||
protected:
|
||||
inline PRUint8 ConvertMaskToCount(unsigned long val);
|
||||
|
||||
private:
|
||||
/* general */
|
||||
GdkPixmap *mPixmap;
|
||||
GdkGC *mGC;
|
||||
gint mDepth;
|
||||
nsPixelFormat mPixFormat;
|
||||
PRUint32 mWidth;
|
||||
PRUint32 mHeight;
|
||||
PRUint32 mFlags;
|
||||
PRBool mIsOffscreen;
|
||||
|
||||
/* for locks */
|
||||
GdkImage *mImage;
|
||||
PRInt32 mLockX;
|
||||
PRInt32 mLockY;
|
||||
PRUint32 mLockWidth;
|
||||
PRUint32 mLockHeight;
|
||||
PRUint32 mLockFlags;
|
||||
PRBool mLocked;
|
||||
|
||||
// MOZ_TIMER_DECLARE(mLockTime)
|
||||
// MOZ_TIMER_DECLARE(mUnlockTime)
|
||||
};
|
||||
|
||||
#endif
|
||||
4822
mozilla/gfx/src/gtk/nsFontMetricsGTK.cpp
Normal file
4822
mozilla/gfx/src/gtk/nsFontMetricsGTK.cpp
Normal file
File diff suppressed because it is too large
Load Diff
249
mozilla/gfx/src/gtk/nsFontMetricsGTK.h
Normal file
249
mozilla/gfx/src/gtk/nsFontMetricsGTK.h
Normal file
@@ -0,0 +1,249 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsFontMetricsGTK_h__
|
||||
#define nsFontMetricsGTK_h__
|
||||
|
||||
#include "nsDeviceContextGTK.h"
|
||||
#include "nsIFontMetrics.h"
|
||||
#include "nsIFontEnumerator.h"
|
||||
#include "nsFont.h"
|
||||
#include "nsString.h"
|
||||
#include "nsUnitConversion.h"
|
||||
#include "nsIDeviceContext.h"
|
||||
#include "nsCRT.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsRenderingContextGTK.h"
|
||||
#include "nsICharRepresentable.h"
|
||||
#include "nsCompressedCharMap.h"
|
||||
|
||||
#include <gdk/gdk.h>
|
||||
#include <gdk/gdkx.h>
|
||||
|
||||
#undef FONT_HAS_GLYPH
|
||||
#define FONT_HAS_GLYPH(map, char) IS_REPRESENTABLE(map, char)
|
||||
|
||||
typedef struct nsFontCharSetInfo nsFontCharSetInfo;
|
||||
|
||||
typedef gint (*nsFontCharSetConverter)(nsFontCharSetInfo* aSelf,
|
||||
XFontStruct* aFont, const PRUnichar* aSrcBuf, PRInt32 aSrcLen,
|
||||
char* aDestBuf, PRInt32 aDestLen);
|
||||
|
||||
struct nsFontCharSet;
|
||||
struct nsFontFamily;
|
||||
struct nsFontNode;
|
||||
struct nsFontStretch;
|
||||
class nsXFont;
|
||||
|
||||
class nsFontGTKUserDefined;
|
||||
class nsFontMetricsGTK;
|
||||
|
||||
class nsFontGTK
|
||||
{
|
||||
public:
|
||||
nsFontGTK();
|
||||
nsFontGTK(nsFontGTK*);
|
||||
virtual ~nsFontGTK();
|
||||
NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
|
||||
|
||||
void LoadFont(void);
|
||||
PRBool IsEmptyFont(XFontStruct*);
|
||||
|
||||
inline int SupportsChar(PRUnichar aChar)
|
||||
{ return mFont && CCMAP_HAS_CHAR(mCCMap, aChar); };
|
||||
|
||||
virtual GdkFont* GetGDKFont(void);
|
||||
virtual nsXFont* GetXFont(void);
|
||||
virtual PRBool GetXFontIs10646(void);
|
||||
virtual gint GetWidth(const PRUnichar* aString, PRUint32 aLength) = 0;
|
||||
virtual gint DrawString(nsRenderingContextGTK* aContext,
|
||||
nsDrawingSurfaceGTK* aSurface, nscoord aX,
|
||||
nscoord aY, const PRUnichar* aString,
|
||||
PRUint32 aLength) = 0;
|
||||
#ifdef MOZ_MATHML
|
||||
// bounding metrics for a string
|
||||
// remember returned values are not in app units
|
||||
// - to emulate GetWidth () above
|
||||
virtual nsresult
|
||||
GetBoundingMetrics(const PRUnichar* aString,
|
||||
PRUint32 aLength,
|
||||
nsBoundingMetrics& aBoundingMetrics) = 0;
|
||||
#endif
|
||||
|
||||
PRUint16* mCCMap;
|
||||
nsFontCharSetInfo* mCharSetInfo;
|
||||
char* mName;
|
||||
nsFontGTKUserDefined* mUserDefinedFont;
|
||||
PRUint16 mSize;
|
||||
PRUint16 mAABaseSize;
|
||||
PRInt16 mBaselineAdjust;
|
||||
|
||||
// these values are not in app units, they need to be scaled with
|
||||
// nsIDeviceContext::GetDevUnitsToAppUnits()
|
||||
PRInt16 mMaxAscent;
|
||||
PRInt16 mMaxDescent;
|
||||
|
||||
protected:
|
||||
GdkFont* mFont;
|
||||
GdkFont* mFontHolder;
|
||||
nsXFont* mXFont;
|
||||
PRBool mAlreadyCalledLoadFont;
|
||||
};
|
||||
|
||||
class nsFontMetricsGTK : public nsIFontMetrics
|
||||
{
|
||||
public:
|
||||
nsFontMetricsGTK();
|
||||
virtual ~nsFontMetricsGTK();
|
||||
|
||||
NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_IMETHOD Init(const nsFont& aFont, nsIAtom* aLangGroup,
|
||||
nsIDeviceContext* aContext);
|
||||
NS_IMETHOD Destroy();
|
||||
|
||||
NS_IMETHOD GetXHeight(nscoord& aResult);
|
||||
NS_IMETHOD GetSuperscriptOffset(nscoord& aResult);
|
||||
NS_IMETHOD GetSubscriptOffset(nscoord& aResult);
|
||||
NS_IMETHOD GetStrikeout(nscoord& aOffset, nscoord& aSize);
|
||||
NS_IMETHOD GetUnderline(nscoord& aOffset, nscoord& aSize);
|
||||
|
||||
NS_IMETHOD GetHeight(nscoord &aHeight);
|
||||
NS_IMETHOD GetNormalLineHeight(nscoord &aHeight);
|
||||
NS_IMETHOD GetLeading(nscoord &aLeading);
|
||||
NS_IMETHOD GetEmHeight(nscoord &aHeight);
|
||||
NS_IMETHOD GetEmAscent(nscoord &aAscent);
|
||||
NS_IMETHOD GetEmDescent(nscoord &aDescent);
|
||||
NS_IMETHOD GetMaxHeight(nscoord &aHeight);
|
||||
NS_IMETHOD GetMaxAscent(nscoord &aAscent);
|
||||
NS_IMETHOD GetMaxDescent(nscoord &aDescent);
|
||||
NS_IMETHOD GetMaxAdvance(nscoord &aAdvance);
|
||||
NS_IMETHOD GetFont(const nsFont *&aFont);
|
||||
NS_IMETHOD GetLangGroup(nsIAtom** aLangGroup);
|
||||
NS_IMETHOD GetFontHandle(nsFontHandle &aHandle);
|
||||
|
||||
NS_IMETHOD GetSpaceWidth(nscoord &aSpaceWidth);
|
||||
|
||||
nsFontGTK* FindFont(PRUnichar aChar);
|
||||
nsFontGTK* FindUserDefinedFont(PRUnichar aChar);
|
||||
nsFontGTK* FindStyleSheetSpecificFont(PRUnichar aChar);
|
||||
nsFontGTK* FindStyleSheetGenericFont(PRUnichar aChar);
|
||||
nsFontGTK* FindLangGroupPrefFont(nsIAtom* aLangGroup, PRUnichar aChar);
|
||||
nsFontGTK* FindLangGroupFont(nsIAtom* aLangGroup, PRUnichar aChar, nsCString* aName);
|
||||
nsFontGTK* FindAnyFont(PRUnichar aChar);
|
||||
nsFontGTK* FindSubstituteFont(PRUnichar aChar);
|
||||
|
||||
nsFontGTK* SearchNode(nsFontNode* aNode, PRUnichar aChar);
|
||||
nsFontGTK* TryAliases(nsCString* aName, PRUnichar aChar);
|
||||
nsFontGTK* TryFamily(nsCString* aName, PRUnichar aChar);
|
||||
nsFontGTK* TryNode(nsCString* aName, PRUnichar aChar);
|
||||
nsFontGTK* TryNodes(nsAWritableCString &aFFREName, PRUnichar aChar);
|
||||
nsFontGTK* TryLangGroup(nsIAtom* aLangGroup, nsCString* aName, PRUnichar aChar);
|
||||
|
||||
nsFontGTK* AddToLoadedFontsList(nsFontGTK* aFont);
|
||||
nsFontGTK* FindNearestSize(nsFontStretch* aStretch, PRUint16 aSize);
|
||||
nsFontGTK* GetAASBBaseFont(nsFontStretch* aStretch,
|
||||
nsFontCharSetInfo* aCharSet);
|
||||
nsFontGTK* PickASizeAndLoad(nsFontStretch* aStretch,
|
||||
nsFontCharSetInfo* aCharSet,
|
||||
PRUnichar aChar,
|
||||
const char *aName);
|
||||
|
||||
static nsresult FamilyExists(const nsString& aFontName);
|
||||
|
||||
//friend struct nsFontGTK;
|
||||
|
||||
nsFontGTK **mLoadedFonts;
|
||||
PRUint16 mLoadedFontsAlloc;
|
||||
PRUint16 mLoadedFontsCount;
|
||||
|
||||
nsFontGTK *mSubstituteFont;
|
||||
|
||||
nsCStringArray mFonts;
|
||||
PRUint16 mFontsIndex;
|
||||
nsAutoVoidArray mFontIsGeneric;
|
||||
|
||||
nsCAutoString mDefaultFont;
|
||||
nsCString *mGeneric;
|
||||
nsCOMPtr<nsIAtom> mLangGroup;
|
||||
nsCAutoString mUserDefined;
|
||||
|
||||
PRUint8 mTriedAllGenerics;
|
||||
PRUint8 mIsUserDefined;
|
||||
|
||||
protected:
|
||||
void RealizeFont();
|
||||
|
||||
nsIDeviceContext *mDeviceContext;
|
||||
nsFont *mFont;
|
||||
nsFontGTK *mWesternFont;
|
||||
|
||||
nscoord mLeading;
|
||||
nscoord mEmHeight;
|
||||
nscoord mEmAscent;
|
||||
nscoord mEmDescent;
|
||||
nscoord mMaxHeight;
|
||||
nscoord mMaxAscent;
|
||||
nscoord mMaxDescent;
|
||||
nscoord mMaxAdvance;
|
||||
nscoord mXHeight;
|
||||
nscoord mSuperscriptOffset;
|
||||
nscoord mSubscriptOffset;
|
||||
nscoord mStrikeoutSize;
|
||||
nscoord mStrikeoutOffset;
|
||||
nscoord mUnderlineSize;
|
||||
nscoord mUnderlineOffset;
|
||||
nscoord mSpaceWidth;
|
||||
|
||||
PRUint16 mPixelSize;
|
||||
PRUint8 mStretchIndex;
|
||||
PRUint8 mStyleIndex;
|
||||
nsFontCharSetConverter mDocConverterType;
|
||||
};
|
||||
|
||||
class nsFontEnumeratorGTK : public nsIFontEnumerator
|
||||
{
|
||||
public:
|
||||
nsFontEnumeratorGTK();
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIFONTENUMERATOR
|
||||
};
|
||||
|
||||
#endif
|
||||
317
mozilla/gfx/src/gtk/nsGCCache.cpp
Normal file
317
mozilla/gfx/src/gtk/nsGCCache.cpp
Normal file
@@ -0,0 +1,317 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is the Mozilla browser.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1999 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Stuart Parmenter <pavlov@netscape.com>
|
||||
* Mike Shaver <shaver@zeroknowledge.com>
|
||||
* Tomi Leppikangas <Tomi.Leppikangas@oulu.fi>
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include "nsGCCache.h"
|
||||
#include "nsISupportsUtils.h"
|
||||
#include <gdk/gdkx.h>
|
||||
#include <gdk/gdkprivate.h>
|
||||
#include <X11/Xlib.h>
|
||||
/* The GC cache is shared among all windows, since it doesn't hog
|
||||
any scarce resources (like colormap entries.) */
|
||||
|
||||
GdkRegion *nsGCCache::copyRegion = NULL;
|
||||
|
||||
MOZ_DECL_CTOR_COUNTER(nsGCCache)
|
||||
|
||||
nsGCCache::nsGCCache()
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsGCCache);
|
||||
PR_INIT_CLIST(&GCCache);
|
||||
PR_INIT_CLIST(&GCFreeList);
|
||||
for (int i = 0; i < GC_CACHE_SIZE; i++) {
|
||||
GCCacheEntry *entry = new GCCacheEntry();
|
||||
entry->gc=NULL;
|
||||
PR_INSERT_LINK(&entry->clist, &GCFreeList);
|
||||
}
|
||||
DEBUG_METER(memset(&GCCacheStats, 0, sizeof(GCCacheStats));)
|
||||
}
|
||||
|
||||
/* static */ void
|
||||
nsGCCache::Shutdown()
|
||||
{
|
||||
if (copyRegion) {
|
||||
gdk_region_destroy(copyRegion);
|
||||
copyRegion = nsnull;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
nsGCCache::move_cache_entry(PRCList *clist)
|
||||
{
|
||||
/* thread on the freelist, at the front */
|
||||
PR_REMOVE_LINK(clist);
|
||||
PR_INSERT_LINK(clist, &GCFreeList);
|
||||
}
|
||||
|
||||
void
|
||||
nsGCCache::free_cache_entry(PRCList *clist)
|
||||
{
|
||||
GCCacheEntry *entry = (GCCacheEntry *)clist;
|
||||
gdk_gc_unref(entry->gc);
|
||||
if (entry->clipRegion)
|
||||
gdk_region_destroy(entry->clipRegion);
|
||||
|
||||
/* thread on the freelist, at the front */
|
||||
PR_REMOVE_LINK(clist);
|
||||
memset(entry, 0, sizeof(*entry));
|
||||
PR_INSERT_LINK(clist, &GCFreeList);
|
||||
}
|
||||
|
||||
nsGCCache::~nsGCCache()
|
||||
{
|
||||
PRCList *head;
|
||||
|
||||
MOZ_COUNT_DTOR(nsGCCache);
|
||||
|
||||
ReportStats();
|
||||
|
||||
while (!PR_CLIST_IS_EMPTY(&GCCache)) {
|
||||
head = PR_LIST_HEAD(&GCCache);
|
||||
if (head == &GCCache)
|
||||
break;
|
||||
free_cache_entry(head);
|
||||
}
|
||||
|
||||
while (!PR_CLIST_IS_EMPTY(&GCFreeList)) {
|
||||
head = PR_LIST_HEAD(&GCFreeList);
|
||||
if (head == &GCFreeList)
|
||||
break;
|
||||
PR_REMOVE_LINK(head);
|
||||
delete (GCCacheEntry *)head;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
nsGCCache::ReportStats() {
|
||||
DEBUG_METER(
|
||||
fprintf(stderr, "GC Cache:\n\thits:");
|
||||
int hits = 0;
|
||||
for (int i = 0; i < GC_CACHE_SIZE; i++) {
|
||||
fprintf(stderr, " %4d", GCCacheStats.hits[i]);
|
||||
hits+=GCCacheStats.hits[i];
|
||||
}
|
||||
int total = hits + GCCacheStats.misses;
|
||||
float percent = float(float(hits) / float(total));
|
||||
percent *= 100;
|
||||
fprintf(stderr, "\n\thits: %d, misses: %d, hit percent: %f%%\n",
|
||||
hits, GCCacheStats.misses, percent);
|
||||
);
|
||||
}
|
||||
|
||||
/* Dispose of entries matching the given flags, compressing the GC cache */
|
||||
void nsGCCache::Flush(unsigned long flags)
|
||||
{
|
||||
while (!PR_CLIST_IS_EMPTY(&GCCache)) {
|
||||
PRCList *head = PR_LIST_HEAD(&GCCache);
|
||||
if (head == &GCCache)
|
||||
break;
|
||||
GCCacheEntry *entry = (GCCacheEntry *)head;
|
||||
if (entry->flags & flags)
|
||||
free_cache_entry(head);
|
||||
}
|
||||
}
|
||||
|
||||
GdkGC *nsGCCache::GetGC(GdkWindow *window, GdkGCValues *gcv, GdkGCValuesMask flags, GdkRegion *clipRegion)
|
||||
{
|
||||
|
||||
PRCList *iter;
|
||||
GCCacheEntry *entry;
|
||||
DEBUG_METER(int i = 0;)
|
||||
|
||||
for (iter = PR_LIST_HEAD(&GCCache); iter != &GCCache;
|
||||
iter = PR_NEXT_LINK(iter)) {
|
||||
|
||||
entry = (GCCacheEntry *)iter;
|
||||
if (flags == entry->flags &&
|
||||
!memcmp (gcv, &entry->gcv, sizeof (*gcv))) {
|
||||
/* if there's a clipRegion, we have to match */
|
||||
|
||||
if ((clipRegion && entry->clipRegion &&
|
||||
gdk_region_equal(clipRegion, entry->clipRegion)) ||
|
||||
/* and if there isn't, we can't have one */
|
||||
(!clipRegion && !entry->clipRegion)) {
|
||||
|
||||
/* move to the front of the list, if needed */
|
||||
if (iter != PR_LIST_HEAD(&GCCache)) {
|
||||
PR_REMOVE_LINK(iter);
|
||||
PR_INSERT_LINK(iter, &GCCache);
|
||||
}
|
||||
DEBUG_METER(GCCacheStats.hits[i]++;)
|
||||
return gdk_gc_ref(entry->gc);
|
||||
}
|
||||
}
|
||||
DEBUG_METER(++i;)
|
||||
}
|
||||
|
||||
/* might need to forcibly free the LRU cache entry */
|
||||
if (PR_CLIST_IS_EMPTY(&GCFreeList)) {
|
||||
DEBUG_METER(GCCacheStats.reclaim++);
|
||||
move_cache_entry(PR_LIST_TAIL(&GCCache));
|
||||
}
|
||||
|
||||
DEBUG_METER(GCCacheStats.misses++;)
|
||||
|
||||
iter = PR_LIST_HEAD(&GCFreeList);
|
||||
PR_REMOVE_LINK(iter);
|
||||
PR_INSERT_LINK(iter, &GCCache);
|
||||
entry = (GCCacheEntry *)iter;
|
||||
|
||||
if (!entry->gc) {
|
||||
// No old GC, greate new
|
||||
entry->gc = gdk_gc_new_with_values(window, gcv, flags);
|
||||
entry->flags = flags;
|
||||
entry->gcv = *gcv;
|
||||
entry->clipRegion = NULL;
|
||||
//printf("creating new gc=%X\n",entry->gc);
|
||||
}
|
||||
#ifdef MOZ_WIDGET_GTK
|
||||
else if ( ((GdkGCPrivate*)entry->gc)->ref_count > 1 ) {
|
||||
#endif /* MOZ_WIDGET_GTK */
|
||||
#ifdef MOZ_WIDGET_GTK2
|
||||
else if ( G_OBJECT(entry->gc)->ref_count > 1 ) {
|
||||
#endif /* MOZ_WIDGET_GTK2 */
|
||||
// Old GC still in use, create new
|
||||
gdk_gc_unref(entry->gc);
|
||||
entry->gc=gdk_gc_new_with_values(window, gcv, flags);
|
||||
entry->flags = flags;
|
||||
entry->gcv = *gcv;
|
||||
entry->clipRegion = NULL;
|
||||
//printf("creating new (use)gc=%X\n",entry->gc);
|
||||
}
|
||||
else {
|
||||
ReuseGC(entry, gcv, flags);
|
||||
}
|
||||
|
||||
if (clipRegion) {
|
||||
entry->clipRegion = gdk_region_copy(clipRegion);
|
||||
if (entry->clipRegion)
|
||||
gdk_gc_set_clip_region(entry->gc, entry->clipRegion);
|
||||
/* XXX what if it fails? */
|
||||
}
|
||||
|
||||
return gdk_gc_ref(entry->gc);
|
||||
}
|
||||
|
||||
void nsGCCache::ReuseGC(GCCacheEntry *entry, GdkGCValues *gcv, GdkGCValuesMask flags)
|
||||
{
|
||||
// We have old GC, reuse it and check what
|
||||
// we have to change
|
||||
|
||||
XGCValues xvalues;
|
||||
unsigned long xvalues_mask=0;
|
||||
|
||||
if (entry->clipRegion) {
|
||||
// set it to none here and then set the clip region with
|
||||
// gdk_gc_set_clip_region in GetGC()
|
||||
xvalues.clip_mask = None;
|
||||
xvalues_mask |= GCClipMask;
|
||||
gdk_region_destroy(entry->clipRegion);
|
||||
entry->clipRegion = NULL;
|
||||
}
|
||||
|
||||
if (entry->gcv.foreground.pixel != gcv->foreground.pixel) {
|
||||
xvalues.foreground = gcv->foreground.pixel;
|
||||
xvalues_mask |= GCForeground;
|
||||
}
|
||||
|
||||
if (entry->gcv.function != gcv->function) {
|
||||
switch (gcv->function) {
|
||||
case GDK_COPY:
|
||||
xvalues.function = GXcopy;
|
||||
break;
|
||||
case GDK_INVERT:
|
||||
xvalues.function = GXinvert;
|
||||
break;
|
||||
case GDK_XOR:
|
||||
xvalues.function = GXxor;
|
||||
break;
|
||||
case GDK_CLEAR:
|
||||
xvalues.function = GXclear;
|
||||
break;
|
||||
case GDK_AND:
|
||||
xvalues.function = GXand;
|
||||
break;
|
||||
case GDK_AND_REVERSE:
|
||||
xvalues.function = GXandReverse;
|
||||
break;
|
||||
case GDK_AND_INVERT:
|
||||
xvalues.function = GXandInverted;
|
||||
break;
|
||||
case GDK_NOOP:
|
||||
xvalues.function = GXnoop;
|
||||
break;
|
||||
case GDK_OR:
|
||||
xvalues.function = GXor;
|
||||
break;
|
||||
case GDK_EQUIV:
|
||||
xvalues.function = GXequiv;
|
||||
break;
|
||||
case GDK_OR_REVERSE:
|
||||
xvalues.function = GXorReverse;
|
||||
break;
|
||||
case GDK_COPY_INVERT:
|
||||
xvalues.function = GXcopyInverted;
|
||||
break;
|
||||
case GDK_OR_INVERT:
|
||||
xvalues.function = GXorInverted;
|
||||
break;
|
||||
case GDK_NAND:
|
||||
xvalues.function = GXnand;
|
||||
break;
|
||||
case GDK_SET:
|
||||
xvalues.function = GXset;
|
||||
break;
|
||||
}
|
||||
xvalues_mask |= GCFunction;
|
||||
}
|
||||
|
||||
if(entry->gcv.font != gcv->font && flags & GDK_GC_FONT) {
|
||||
xvalues.font = ((XFontStruct *)GDK_FONT_XFONT(gcv->font))->fid;
|
||||
xvalues_mask |= GCFont;
|
||||
}
|
||||
|
||||
if (entry->gcv.line_style != gcv->line_style) {
|
||||
switch (gcv->line_style) {
|
||||
case GDK_LINE_SOLID:
|
||||
xvalues.line_style = LineSolid;
|
||||
break;
|
||||
case GDK_LINE_ON_OFF_DASH:
|
||||
xvalues.line_style = LineOnOffDash;
|
||||
break;
|
||||
case GDK_LINE_DOUBLE_DASH:
|
||||
xvalues.line_style = LineDoubleDash;
|
||||
break;
|
||||
}
|
||||
xvalues_mask |= GCLineStyle;
|
||||
}
|
||||
|
||||
if (xvalues_mask != 0) {
|
||||
XChangeGC(GDK_GC_XDISPLAY(entry->gc), GDK_GC_XGC(entry->gc),
|
||||
xvalues_mask, &xvalues);
|
||||
}
|
||||
entry->flags = flags;
|
||||
entry->gcv = *gcv;
|
||||
}
|
||||
84
mozilla/gfx/src/gtk/nsGCCache.h
Normal file
84
mozilla/gfx/src/gtk/nsGCCache.h
Normal file
@@ -0,0 +1,84 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is the Mozilla browser.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1999 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Stuart Parmenter <pavlov@netscape.com>
|
||||
* Mike Shaver <shaver@zeroknowledge.com>
|
||||
*/
|
||||
|
||||
#include <gdk/gdk.h>
|
||||
#include <string.h>
|
||||
#include "prclist.h"
|
||||
|
||||
#ifndef nsGCCache_h___
|
||||
#define nsGCCache_h___
|
||||
|
||||
#define countof(x) ((int)(sizeof(x) / sizeof (*x)))
|
||||
#define GC_CACHE_SIZE 10
|
||||
|
||||
#ifdef DEBUG
|
||||
#define DEBUG_METER(x) x
|
||||
#else
|
||||
#define DEBUG_METER(x)
|
||||
#endif
|
||||
|
||||
struct GCCacheEntry
|
||||
{
|
||||
PRCList clist;
|
||||
GdkGCValuesMask flags;
|
||||
GdkGCValues gcv;
|
||||
GdkRegion *clipRegion;
|
||||
GdkGC *gc;
|
||||
};
|
||||
|
||||
class nsGCCache
|
||||
{
|
||||
public:
|
||||
nsGCCache();
|
||||
virtual ~nsGCCache();
|
||||
|
||||
static void Shutdown();
|
||||
|
||||
void Flush(unsigned long flags);
|
||||
|
||||
GdkGC *GetGC(GdkWindow *window, GdkGCValues *gcv, GdkGCValuesMask flags, GdkRegion *clipRegion);
|
||||
|
||||
private:
|
||||
void ReuseGC(GCCacheEntry *entry, GdkGCValues *gcv, GdkGCValuesMask flags);
|
||||
PRCList GCCache;
|
||||
PRCList GCFreeList;
|
||||
void free_cache_entry(PRCList *clist);
|
||||
void move_cache_entry(PRCList *clist);
|
||||
#ifdef MOZ_WIDGET_GTK
|
||||
static GdkRegion * gdk_region_copy(GdkRegion *region);
|
||||
#endif
|
||||
static GdkRegion *copyRegion;
|
||||
void ReportStats();
|
||||
|
||||
DEBUG_METER(
|
||||
struct {
|
||||
int hits[GC_CACHE_SIZE];
|
||||
int misses;
|
||||
int reclaim;
|
||||
} GCCacheStats;
|
||||
)
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
219
mozilla/gfx/src/gtk/nsGfxFactoryGTK.cpp
Normal file
219
mozilla/gfx/src/gtk/nsGfxFactoryGTK.cpp
Normal file
@@ -0,0 +1,219 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Christopher Blizzard.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2000
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Christopher Blizzzard <blizzard@mozilla.org>
|
||||
* Roland Mainz <roland.mainz@informatik.med.uni-giessen.de>
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsIGenericFactory.h"
|
||||
#include "nsIModule.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsGfxCIID.h"
|
||||
|
||||
#include "nsBlender.h"
|
||||
#include "nsFontMetricsGTK.h"
|
||||
#include "nsRenderingContextGTK.h"
|
||||
#include "nsDeviceContextGTK.h"
|
||||
// aka nsDeviceContextSpecGTK.h
|
||||
#include "nsDeviceContextSpecG.h"
|
||||
// aka nsDeviceContextSpecFactoryGTK.h
|
||||
#include "nsDeviceContextSpecFactoryG.h"
|
||||
#include "nsScreenManagerGtk.h"
|
||||
#include "nsScriptableRegion.h"
|
||||
#include "nsDeviceContextGTK.h"
|
||||
#include "nsImageGTK.h"
|
||||
#include "nsPrintOptionsGTK.h"
|
||||
#include "nsFontList.h"
|
||||
#include "nsRegionGTK.h"
|
||||
#include "nsGCCache.h"
|
||||
#ifdef NATIVE_THEME_SUPPORT
|
||||
#include "nsNativeThemeGTK.h"
|
||||
#endif
|
||||
|
||||
// objects that just require generic constructors
|
||||
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsFontMetricsGTK)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDeviceContextGTK)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsRenderingContextGTK)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsImageGTK)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsBlender)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsRegionGTK)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDeviceContextSpecGTK)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDeviceContextSpecFactoryGTK)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsFontEnumeratorGTK)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsFontList);
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsScreenManagerGtk)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsPrintOptionsGTK)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsPrinterEnumeratorGTK)
|
||||
#ifdef NATIVE_THEME_SUPPORT
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsNativeThemeGTK)
|
||||
#endif
|
||||
|
||||
// our custom constructors
|
||||
|
||||
static NS_IMETHODIMP nsScriptableRegionConstructor(nsISupports *aOuter, REFNSIID aIID, void **aResult)
|
||||
{
|
||||
nsresult rv;
|
||||
|
||||
nsIScriptableRegion *inst;
|
||||
|
||||
if ( !aResult )
|
||||
{
|
||||
rv = NS_ERROR_NULL_POINTER;
|
||||
return rv;
|
||||
}
|
||||
*aResult = nsnull;
|
||||
if (aOuter)
|
||||
{
|
||||
rv = NS_ERROR_NO_AGGREGATION;
|
||||
return rv;
|
||||
}
|
||||
// create an nsRegionGtk and get the scriptable region from it
|
||||
nsCOMPtr <nsIRegion> rgn;
|
||||
NS_NEWXPCOM(rgn, nsRegionGTK);
|
||||
nsCOMPtr<nsIScriptableRegion> scriptableRgn;
|
||||
if (rgn != nsnull)
|
||||
{
|
||||
scriptableRgn = new nsScriptableRegion(rgn);
|
||||
inst = scriptableRgn;
|
||||
}
|
||||
if (!inst)
|
||||
{
|
||||
rv = NS_ERROR_OUT_OF_MEMORY;
|
||||
return rv;
|
||||
}
|
||||
NS_ADDREF(inst);
|
||||
// release our variable above now that we have created our owning
|
||||
// reference - we don't want this to go out of scope early!
|
||||
scriptableRgn = nsnull;
|
||||
rv = inst->QueryInterface(aIID, aResult);
|
||||
NS_RELEASE(inst);
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
static const nsModuleComponentInfo components[] =
|
||||
{
|
||||
{ "Gtk Font Metrics",
|
||||
NS_FONT_METRICS_CID,
|
||||
// "@mozilla.org/gfx/font_metrics/gtk;1",
|
||||
"@mozilla.org/gfx/fontmetrics;1",
|
||||
nsFontMetricsGTKConstructor },
|
||||
{ "Gtk Device Context",
|
||||
NS_DEVICE_CONTEXT_CID,
|
||||
// "@mozilla.org/gfx/device_context/gtk;1",
|
||||
"@mozilla.org/gfx/devicecontext;1",
|
||||
nsDeviceContextGTKConstructor },
|
||||
{ "Gtk Rendering Context",
|
||||
NS_RENDERING_CONTEXT_CID,
|
||||
// "@mozilla.org/gfx/rendering_context/gtk;1",
|
||||
"@mozilla.org/gfx/renderingcontext;1",
|
||||
nsRenderingContextGTKConstructor },
|
||||
{ "Gtk Image",
|
||||
NS_IMAGE_CID,
|
||||
// "@mozilla.org/gfx/image/gtk;1",
|
||||
"@mozilla.org/gfx/image;1",
|
||||
nsImageGTKConstructor },
|
||||
{ "Gtk Region",
|
||||
NS_REGION_CID,
|
||||
"@mozilla.org/gfx/region/gtk;1",
|
||||
nsRegionGTKConstructor },
|
||||
{ "Scriptable Region",
|
||||
NS_SCRIPTABLE_REGION_CID,
|
||||
// "@mozilla.org/gfx/scriptable_region;1",
|
||||
"@mozilla.org/gfx/region;1",
|
||||
nsScriptableRegionConstructor },
|
||||
{ "Blender",
|
||||
NS_BLENDER_CID,
|
||||
// "@mozilla.org/gfx/blender;1",
|
||||
"@mozilla.org/gfx/blender;1",
|
||||
nsBlenderConstructor },
|
||||
{ "Gtk Device Context Spec",
|
||||
NS_DEVICE_CONTEXT_SPEC_CID,
|
||||
// "@mozilla.org/gfx/device_context_spec/gtk;1",
|
||||
"@mozilla.org/gfx/devicecontextspec;1",
|
||||
nsDeviceContextSpecGTKConstructor },
|
||||
{ "Gtk Device Context Spec Factory",
|
||||
NS_DEVICE_CONTEXT_SPEC_FACTORY_CID,
|
||||
// "@mozilla.org/gfx/device_context_spec_factory/gtk;1",
|
||||
"@mozilla.org/gfx/devicecontextspecfactory;1",
|
||||
nsDeviceContextSpecFactoryGTKConstructor },
|
||||
{ "Print Options",
|
||||
NS_PRINTOPTIONS_CID,
|
||||
// "@mozilla.org/gfx/printoptions;1",
|
||||
"@mozilla.org/gfx/printoptions;1",
|
||||
nsPrintOptionsGTKConstructor },
|
||||
{ "GTK Font Enumerator",
|
||||
NS_FONT_ENUMERATOR_CID,
|
||||
// "@mozilla.org/gfx/font_enumerator/gtk;1",
|
||||
"@mozilla.org/gfx/fontenumerator;1",
|
||||
nsFontEnumeratorGTKConstructor },
|
||||
{ "Font List",
|
||||
NS_FONTLIST_CID,
|
||||
// "@mozilla.org/gfx/fontlist;1"
|
||||
NS_FONTLIST_CONTRACTID,
|
||||
nsFontListConstructor },
|
||||
{ "Gtk Screen Manager",
|
||||
NS_SCREENMANAGER_CID,
|
||||
// "@mozilla.org/gfx/screenmanager/gtk;1",
|
||||
"@mozilla.org/gfx/screenmanager;1",
|
||||
nsScreenManagerGtkConstructor },
|
||||
{ "Gtk Printer Enumerator",
|
||||
NS_PRINTER_ENUMERATOR_CID,
|
||||
// "@mozilla.org/gfx/printer_enumerator/gtk;1",
|
||||
"@mozilla.org/gfx/printerenumerator;1",
|
||||
nsPrinterEnumeratorGTKConstructor }
|
||||
#ifdef NATIVE_THEME_SUPPORT
|
||||
,{ "Native Theme Renderer",
|
||||
NS_THEMERENDERER_CID,
|
||||
"@mozilla.org/chrome/chrome-native-theme;1",
|
||||
nsNativeThemeGTKConstructor }
|
||||
#endif
|
||||
};
|
||||
|
||||
PR_STATIC_CALLBACK(void)
|
||||
nsGfxGTKModuleDtor(nsIModule *self)
|
||||
{
|
||||
nsRenderingContextGTK::Shutdown();
|
||||
nsDeviceContextGTK::Shutdown();
|
||||
nsGCCache::Shutdown();
|
||||
#ifdef MOZ_WIDGET_GTK
|
||||
nsRegionGTK::Shutdown();
|
||||
#endif
|
||||
}
|
||||
|
||||
NS_IMPL_NSGETMODULE_WITH_DTOR(nsGfxGTKModule, components, nsGfxGTKModuleDtor)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user