diff options
Diffstat (limited to '')
40 files changed, 1631 insertions, 174 deletions
diff --git a/linden/indra/llwindow/lldxhardware.cpp b/linden/indra/llwindow/lldxhardware.cpp index 34e1db2..a401c63 100644 --- a/linden/indra/llwindow/lldxhardware.cpp +++ b/linden/indra/llwindow/lldxhardware.cpp | |||
@@ -12,12 +12,12 @@ | |||
12 | * ("GPL"), unless you have obtained a separate licensing agreement | 12 | * ("GPL"), unless you have obtained a separate licensing agreement |
13 | * ("Other License"), formally executed by you and Linden Lab. Terms of | 13 | * ("Other License"), formally executed by you and Linden Lab. Terms of |
14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | 14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or |
15 | * online at http://secondlife.com/developers/opensource/gplv2 | 15 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 |
16 | * | 16 | * |
17 | * There are special exceptions to the terms and conditions of the GPL as | 17 | * There are special exceptions to the terms and conditions of the GPL as |
18 | * it is applied to this Source Code. View the full text of the exception | 18 | * it is applied to this Source Code. View the full text of the exception |
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 19 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
20 | * online at http://secondlife.com/developers/opensource/flossexception | 20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception |
21 | * | 21 | * |
22 | * By copying, modifying or distributing this software, you acknowledge | 22 | * By copying, modifying or distributing this software, you acknowledge |
23 | * that you have read and understood your obligations described above, | 23 | * that you have read and understood your obligations described above, |
diff --git a/linden/indra/llwindow/lldxhardware.h b/linden/indra/llwindow/lldxhardware.h index 4a89d5c..f4f364e 100644 --- a/linden/indra/llwindow/lldxhardware.h +++ b/linden/indra/llwindow/lldxhardware.h | |||
@@ -12,12 +12,12 @@ | |||
12 | * ("GPL"), unless you have obtained a separate licensing agreement | 12 | * ("GPL"), unless you have obtained a separate licensing agreement |
13 | * ("Other License"), formally executed by you and Linden Lab. Terms of | 13 | * ("Other License"), formally executed by you and Linden Lab. Terms of |
14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | 14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or |
15 | * online at http://secondlife.com/developers/opensource/gplv2 | 15 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 |
16 | * | 16 | * |
17 | * There are special exceptions to the terms and conditions of the GPL as | 17 | * There are special exceptions to the terms and conditions of the GPL as |
18 | * it is applied to this Source Code. View the full text of the exception | 18 | * it is applied to this Source Code. View the full text of the exception |
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 19 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
20 | * online at http://secondlife.com/developers/opensource/flossexception | 20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception |
21 | * | 21 | * |
22 | * By copying, modifying or distributing this software, you acknowledge | 22 | * By copying, modifying or distributing this software, you acknowledge |
23 | * that you have read and understood your obligations described above, | 23 | * that you have read and understood your obligations described above, |
diff --git a/linden/indra/llwindow/llgl.cpp b/linden/indra/llwindow/llgl.cpp index 14d4591..6978fb9 100644 --- a/linden/indra/llwindow/llgl.cpp +++ b/linden/indra/llwindow/llgl.cpp | |||
@@ -12,12 +12,12 @@ | |||
12 | * ("GPL"), unless you have obtained a separate licensing agreement | 12 | * ("GPL"), unless you have obtained a separate licensing agreement |
13 | * ("Other License"), formally executed by you and Linden Lab. Terms of | 13 | * ("Other License"), formally executed by you and Linden Lab. Terms of |
14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | 14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or |
15 | * online at http://secondlife.com/developers/opensource/gplv2 | 15 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 |
16 | * | 16 | * |
17 | * There are special exceptions to the terms and conditions of the GPL as | 17 | * There are special exceptions to the terms and conditions of the GPL as |
18 | * it is applied to this Source Code. View the full text of the exception | 18 | * it is applied to this Source Code. View the full text of the exception |
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 19 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
20 | * online at http://secondlife.com/developers/opensource/flossexception | 20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception |
21 | * | 21 | * |
22 | * By copying, modifying or distributing this software, you acknowledge | 22 | * By copying, modifying or distributing this software, you acknowledge |
23 | * that you have read and understood your obligations described above, | 23 | * that you have read and understood your obligations described above, |
diff --git a/linden/indra/llwindow/llgl.h b/linden/indra/llwindow/llgl.h index 2192ac6..57bd616 100644 --- a/linden/indra/llwindow/llgl.h +++ b/linden/indra/llwindow/llgl.h | |||
@@ -12,12 +12,12 @@ | |||
12 | * ("GPL"), unless you have obtained a separate licensing agreement | 12 | * ("GPL"), unless you have obtained a separate licensing agreement |
13 | * ("Other License"), formally executed by you and Linden Lab. Terms of | 13 | * ("Other License"), formally executed by you and Linden Lab. Terms of |
14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | 14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or |
15 | * online at http://secondlife.com/developers/opensource/gplv2 | 15 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 |
16 | * | 16 | * |
17 | * There are special exceptions to the terms and conditions of the GPL as | 17 | * There are special exceptions to the terms and conditions of the GPL as |
18 | * it is applied to this Source Code. View the full text of the exception | 18 | * it is applied to this Source Code. View the full text of the exception |
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 19 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
20 | * online at http://secondlife.com/developers/opensource/flossexception | 20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception |
21 | * | 21 | * |
22 | * By copying, modifying or distributing this software, you acknowledge | 22 | * By copying, modifying or distributing this software, you acknowledge |
23 | * that you have read and understood your obligations described above, | 23 | * that you have read and understood your obligations described above, |
diff --git a/linden/indra/llwindow/llglheaders.h b/linden/indra/llwindow/llglheaders.h index 2245dbd..45310ef 100644 --- a/linden/indra/llwindow/llglheaders.h +++ b/linden/indra/llwindow/llglheaders.h | |||
@@ -12,12 +12,12 @@ | |||
12 | * ("GPL"), unless you have obtained a separate licensing agreement | 12 | * ("GPL"), unless you have obtained a separate licensing agreement |
13 | * ("Other License"), formally executed by you and Linden Lab. Terms of | 13 | * ("Other License"), formally executed by you and Linden Lab. Terms of |
14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | 14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or |
15 | * online at http://secondlife.com/developers/opensource/gplv2 | 15 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 |
16 | * | 16 | * |
17 | * There are special exceptions to the terms and conditions of the GPL as | 17 | * There are special exceptions to the terms and conditions of the GPL as |
18 | * it is applied to this Source Code. View the full text of the exception | 18 | * it is applied to this Source Code. View the full text of the exception |
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 19 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
20 | * online at http://secondlife.com/developers/opensource/flossexception | 20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception |
21 | * | 21 | * |
22 | * By copying, modifying or distributing this software, you acknowledge | 22 | * By copying, modifying or distributing this software, you acknowledge |
23 | * that you have read and understood your obligations described above, | 23 | * that you have read and understood your obligations described above, |
diff --git a/linden/indra/llwindow/llglstates.h b/linden/indra/llwindow/llglstates.h index 859e089..5052c8d 100644 --- a/linden/indra/llwindow/llglstates.h +++ b/linden/indra/llwindow/llglstates.h | |||
@@ -12,12 +12,12 @@ | |||
12 | * ("GPL"), unless you have obtained a separate licensing agreement | 12 | * ("GPL"), unless you have obtained a separate licensing agreement |
13 | * ("Other License"), formally executed by you and Linden Lab. Terms of | 13 | * ("Other License"), formally executed by you and Linden Lab. Terms of |
14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | 14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or |
15 | * online at http://secondlife.com/developers/opensource/gplv2 | 15 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 |
16 | * | 16 | * |
17 | * There are special exceptions to the terms and conditions of the GPL as | 17 | * There are special exceptions to the terms and conditions of the GPL as |
18 | * it is applied to this Source Code. View the full text of the exception | 18 | * it is applied to this Source Code. View the full text of the exception |
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 19 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
20 | * online at http://secondlife.com/developers/opensource/flossexception | 20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception |
21 | * | 21 | * |
22 | * By copying, modifying or distributing this software, you acknowledge | 22 | * By copying, modifying or distributing this software, you acknowledge |
23 | * that you have read and understood your obligations described above, | 23 | * that you have read and understood your obligations described above, |
diff --git a/linden/indra/llwindow/llglstubs.h b/linden/indra/llwindow/llglstubs.h index 5669bca..9745caa 100644 --- a/linden/indra/llwindow/llglstubs.h +++ b/linden/indra/llwindow/llglstubs.h | |||
@@ -12,12 +12,12 @@ | |||
12 | * ("GPL"), unless you have obtained a separate licensing agreement | 12 | * ("GPL"), unless you have obtained a separate licensing agreement |
13 | * ("Other License"), formally executed by you and Linden Lab. Terms of | 13 | * ("Other License"), formally executed by you and Linden Lab. Terms of |
14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | 14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or |
15 | * online at http://secondlife.com/developers/opensource/gplv2 | 15 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 |
16 | * | 16 | * |
17 | * There are special exceptions to the terms and conditions of the GPL as | 17 | * There are special exceptions to the terms and conditions of the GPL as |
18 | * it is applied to this Source Code. View the full text of the exception | 18 | * it is applied to this Source Code. View the full text of the exception |
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 19 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
20 | * online at http://secondlife.com/developers/opensource/flossexception | 20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception |
21 | * | 21 | * |
22 | * By copying, modifying or distributing this software, you acknowledge | 22 | * By copying, modifying or distributing this software, you acknowledge |
23 | * that you have read and understood your obligations described above, | 23 | * that you have read and understood your obligations described above, |
diff --git a/linden/indra/llwindow/llgltypes.h b/linden/indra/llwindow/llgltypes.h index d6dcbe9..d22d5fa 100644 --- a/linden/indra/llwindow/llgltypes.h +++ b/linden/indra/llwindow/llgltypes.h | |||
@@ -12,12 +12,12 @@ | |||
12 | * ("GPL"), unless you have obtained a separate licensing agreement | 12 | * ("GPL"), unless you have obtained a separate licensing agreement |
13 | * ("Other License"), formally executed by you and Linden Lab. Terms of | 13 | * ("Other License"), formally executed by you and Linden Lab. Terms of |
14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | 14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or |
15 | * online at http://secondlife.com/developers/opensource/gplv2 | 15 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 |
16 | * | 16 | * |
17 | * There are special exceptions to the terms and conditions of the GPL as | 17 | * There are special exceptions to the terms and conditions of the GPL as |
18 | * it is applied to this Source Code. View the full text of the exception | 18 | * it is applied to this Source Code. View the full text of the exception |
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 19 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
20 | * online at http://secondlife.com/developers/opensource/flossexception | 20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception |
21 | * | 21 | * |
22 | * By copying, modifying or distributing this software, you acknowledge | 22 | * By copying, modifying or distributing this software, you acknowledge |
23 | * that you have read and understood your obligations described above, | 23 | * that you have read and understood your obligations described above, |
diff --git a/linden/indra/llwindow/llkeyboard.cpp b/linden/indra/llwindow/llkeyboard.cpp index 080eed0..9be23df 100644 --- a/linden/indra/llwindow/llkeyboard.cpp +++ b/linden/indra/llwindow/llkeyboard.cpp | |||
@@ -12,12 +12,12 @@ | |||
12 | * ("GPL"), unless you have obtained a separate licensing agreement | 12 | * ("GPL"), unless you have obtained a separate licensing agreement |
13 | * ("Other License"), formally executed by you and Linden Lab. Terms of | 13 | * ("Other License"), formally executed by you and Linden Lab. Terms of |
14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | 14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or |
15 | * online at http://secondlife.com/developers/opensource/gplv2 | 15 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 |
16 | * | 16 | * |
17 | * There are special exceptions to the terms and conditions of the GPL as | 17 | * There are special exceptions to the terms and conditions of the GPL as |
18 | * it is applied to this Source Code. View the full text of the exception | 18 | * it is applied to this Source Code. View the full text of the exception |
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 19 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
20 | * online at http://secondlife.com/developers/opensource/flossexception | 20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception |
21 | * | 21 | * |
22 | * By copying, modifying or distributing this software, you acknowledge | 22 | * By copying, modifying or distributing this software, you acknowledge |
23 | * that you have read and understood your obligations described above, | 23 | * that you have read and understood your obligations described above, |
diff --git a/linden/indra/llwindow/llkeyboard.h b/linden/indra/llwindow/llkeyboard.h index 25fbb75..d9ce376 100644 --- a/linden/indra/llwindow/llkeyboard.h +++ b/linden/indra/llwindow/llkeyboard.h | |||
@@ -12,12 +12,12 @@ | |||
12 | * ("GPL"), unless you have obtained a separate licensing agreement | 12 | * ("GPL"), unless you have obtained a separate licensing agreement |
13 | * ("Other License"), formally executed by you and Linden Lab. Terms of | 13 | * ("Other License"), formally executed by you and Linden Lab. Terms of |
14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | 14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or |
15 | * online at http://secondlife.com/developers/opensource/gplv2 | 15 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 |
16 | * | 16 | * |
17 | * There are special exceptions to the terms and conditions of the GPL as | 17 | * There are special exceptions to the terms and conditions of the GPL as |
18 | * it is applied to this Source Code. View the full text of the exception | 18 | * it is applied to this Source Code. View the full text of the exception |
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 19 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
20 | * online at http://secondlife.com/developers/opensource/flossexception | 20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception |
21 | * | 21 | * |
22 | * By copying, modifying or distributing this software, you acknowledge | 22 | * By copying, modifying or distributing this software, you acknowledge |
23 | * that you have read and understood your obligations described above, | 23 | * that you have read and understood your obligations described above, |
diff --git a/linden/indra/llwindow/llkeyboardmacosx.cpp b/linden/indra/llwindow/llkeyboardmacosx.cpp index cdbe9fa..4cb1029 100644 --- a/linden/indra/llwindow/llkeyboardmacosx.cpp +++ b/linden/indra/llwindow/llkeyboardmacosx.cpp | |||
@@ -12,12 +12,12 @@ | |||
12 | * ("GPL"), unless you have obtained a separate licensing agreement | 12 | * ("GPL"), unless you have obtained a separate licensing agreement |
13 | * ("Other License"), formally executed by you and Linden Lab. Terms of | 13 | * ("Other License"), formally executed by you and Linden Lab. Terms of |
14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | 14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or |
15 | * online at http://secondlife.com/developers/opensource/gplv2 | 15 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 |
16 | * | 16 | * |
17 | * There are special exceptions to the terms and conditions of the GPL as | 17 | * There are special exceptions to the terms and conditions of the GPL as |
18 | * it is applied to this Source Code. View the full text of the exception | 18 | * it is applied to this Source Code. View the full text of the exception |
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 19 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
20 | * online at http://secondlife.com/developers/opensource/flossexception | 20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception |
21 | * | 21 | * |
22 | * By copying, modifying or distributing this software, you acknowledge | 22 | * By copying, modifying or distributing this software, you acknowledge |
23 | * that you have read and understood your obligations described above, | 23 | * that you have read and understood your obligations described above, |
diff --git a/linden/indra/llwindow/llkeyboardmacosx.h b/linden/indra/llwindow/llkeyboardmacosx.h index fc3a39c..f0ea43d 100644 --- a/linden/indra/llwindow/llkeyboardmacosx.h +++ b/linden/indra/llwindow/llkeyboardmacosx.h | |||
@@ -12,12 +12,12 @@ | |||
12 | * ("GPL"), unless you have obtained a separate licensing agreement | 12 | * ("GPL"), unless you have obtained a separate licensing agreement |
13 | * ("Other License"), formally executed by you and Linden Lab. Terms of | 13 | * ("Other License"), formally executed by you and Linden Lab. Terms of |
14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | 14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or |
15 | * online at http://secondlife.com/developers/opensource/gplv2 | 15 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 |
16 | * | 16 | * |
17 | * There are special exceptions to the terms and conditions of the GPL as | 17 | * There are special exceptions to the terms and conditions of the GPL as |
18 | * it is applied to this Source Code. View the full text of the exception | 18 | * it is applied to this Source Code. View the full text of the exception |
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 19 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
20 | * online at http://secondlife.com/developers/opensource/flossexception | 20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception |
21 | * | 21 | * |
22 | * By copying, modifying or distributing this software, you acknowledge | 22 | * By copying, modifying or distributing this software, you acknowledge |
23 | * that you have read and understood your obligations described above, | 23 | * that you have read and understood your obligations described above, |
diff --git a/linden/indra/llwindow/llkeyboardsdl.cpp b/linden/indra/llwindow/llkeyboardsdl.cpp index 6f2119e..f9d59ac 100644 --- a/linden/indra/llwindow/llkeyboardsdl.cpp +++ b/linden/indra/llwindow/llkeyboardsdl.cpp | |||
@@ -12,12 +12,12 @@ | |||
12 | * ("GPL"), unless you have obtained a separate licensing agreement | 12 | * ("GPL"), unless you have obtained a separate licensing agreement |
13 | * ("Other License"), formally executed by you and Linden Lab. Terms of | 13 | * ("Other License"), formally executed by you and Linden Lab. Terms of |
14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | 14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or |
15 | * online at http://secondlife.com/developers/opensource/gplv2 | 15 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 |
16 | * | 16 | * |
17 | * There are special exceptions to the terms and conditions of the GPL as | 17 | * There are special exceptions to the terms and conditions of the GPL as |
18 | * it is applied to this Source Code. View the full text of the exception | 18 | * it is applied to this Source Code. View the full text of the exception |
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 19 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
20 | * online at http://secondlife.com/developers/opensource/flossexception | 20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception |
21 | * | 21 | * |
22 | * By copying, modifying or distributing this software, you acknowledge | 22 | * By copying, modifying or distributing this software, you acknowledge |
23 | * that you have read and understood your obligations described above, | 23 | * that you have read and understood your obligations described above, |
diff --git a/linden/indra/llwindow/llkeyboardsdl.h b/linden/indra/llwindow/llkeyboardsdl.h index 4d45fed..4b38912 100644 --- a/linden/indra/llwindow/llkeyboardsdl.h +++ b/linden/indra/llwindow/llkeyboardsdl.h | |||
@@ -12,12 +12,12 @@ | |||
12 | * ("GPL"), unless you have obtained a separate licensing agreement | 12 | * ("GPL"), unless you have obtained a separate licensing agreement |
13 | * ("Other License"), formally executed by you and Linden Lab. Terms of | 13 | * ("Other License"), formally executed by you and Linden Lab. Terms of |
14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | 14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or |
15 | * online at http://secondlife.com/developers/opensource/gplv2 | 15 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 |
16 | * | 16 | * |
17 | * There are special exceptions to the terms and conditions of the GPL as | 17 | * There are special exceptions to the terms and conditions of the GPL as |
18 | * it is applied to this Source Code. View the full text of the exception | 18 | * it is applied to this Source Code. View the full text of the exception |
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 19 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
20 | * online at http://secondlife.com/developers/opensource/flossexception | 20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception |
21 | * | 21 | * |
22 | * By copying, modifying or distributing this software, you acknowledge | 22 | * By copying, modifying or distributing this software, you acknowledge |
23 | * that you have read and understood your obligations described above, | 23 | * that you have read and understood your obligations described above, |
diff --git a/linden/indra/llwindow/llkeyboardwin32.cpp b/linden/indra/llwindow/llkeyboardwin32.cpp index 78ba598..1b68112 100644 --- a/linden/indra/llwindow/llkeyboardwin32.cpp +++ b/linden/indra/llwindow/llkeyboardwin32.cpp | |||
@@ -12,12 +12,12 @@ | |||
12 | * ("GPL"), unless you have obtained a separate licensing agreement | 12 | * ("GPL"), unless you have obtained a separate licensing agreement |
13 | * ("Other License"), formally executed by you and Linden Lab. Terms of | 13 | * ("Other License"), formally executed by you and Linden Lab. Terms of |
14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | 14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or |
15 | * online at http://secondlife.com/developers/opensource/gplv2 | 15 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 |
16 | * | 16 | * |
17 | * There are special exceptions to the terms and conditions of the GPL as | 17 | * There are special exceptions to the terms and conditions of the GPL as |
18 | * it is applied to this Source Code. View the full text of the exception | 18 | * it is applied to this Source Code. View the full text of the exception |
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 19 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
20 | * online at http://secondlife.com/developers/opensource/flossexception | 20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception |
21 | * | 21 | * |
22 | * By copying, modifying or distributing this software, you acknowledge | 22 | * By copying, modifying or distributing this software, you acknowledge |
23 | * that you have read and understood your obligations described above, | 23 | * that you have read and understood your obligations described above, |
diff --git a/linden/indra/llwindow/llkeyboardwin32.h b/linden/indra/llwindow/llkeyboardwin32.h index e60edb1..e8d6361 100644 --- a/linden/indra/llwindow/llkeyboardwin32.h +++ b/linden/indra/llwindow/llkeyboardwin32.h | |||
@@ -12,12 +12,12 @@ | |||
12 | * ("GPL"), unless you have obtained a separate licensing agreement | 12 | * ("GPL"), unless you have obtained a separate licensing agreement |
13 | * ("Other License"), formally executed by you and Linden Lab. Terms of | 13 | * ("Other License"), formally executed by you and Linden Lab. Terms of |
14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | 14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or |
15 | * online at http://secondlife.com/developers/opensource/gplv2 | 15 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 |
16 | * | 16 | * |
17 | * There are special exceptions to the terms and conditions of the GPL as | 17 | * There are special exceptions to the terms and conditions of the GPL as |
18 | * it is applied to this Source Code. View the full text of the exception | 18 | * it is applied to this Source Code. View the full text of the exception |
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 19 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
20 | * online at http://secondlife.com/developers/opensource/flossexception | 20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception |
21 | * | 21 | * |
22 | * By copying, modifying or distributing this software, you acknowledge | 22 | * By copying, modifying or distributing this software, you acknowledge |
23 | * that you have read and understood your obligations described above, | 23 | * that you have read and understood your obligations described above, |
diff --git a/linden/indra/llwindow/lllogitechlcd.cpp b/linden/indra/llwindow/lllogitechlcd.cpp index c4efd47..8bd77cb 100644 --- a/linden/indra/llwindow/lllogitechlcd.cpp +++ b/linden/indra/llwindow/lllogitechlcd.cpp | |||
@@ -12,12 +12,12 @@ | |||
12 | * ("GPL"), unless you have obtained a separate licensing agreement | 12 | * ("GPL"), unless you have obtained a separate licensing agreement |
13 | * ("Other License"), formally executed by you and Linden Lab. Terms of | 13 | * ("Other License"), formally executed by you and Linden Lab. Terms of |
14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | 14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or |
15 | * online at http://secondlife.com/developers/opensource/gplv2 | 15 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 |
16 | * | 16 | * |
17 | * There are special exceptions to the terms and conditions of the GPL as | 17 | * There are special exceptions to the terms and conditions of the GPL as |
18 | * it is applied to this Source Code. View the full text of the exception | 18 | * it is applied to this Source Code. View the full text of the exception |
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 19 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
20 | * online at http://secondlife.com/developers/opensource/flossexception | 20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception |
21 | * | 21 | * |
22 | * By copying, modifying or distributing this software, you acknowledge | 22 | * By copying, modifying or distributing this software, you acknowledge |
23 | * that you have read and understood your obligations described above, | 23 | * that you have read and understood your obligations described above, |
@@ -29,13 +29,10 @@ | |||
29 | * $/LicenseInfo$ | 29 | * $/LicenseInfo$ |
30 | */ | 30 | */ |
31 | 31 | ||
32 | #include "llpreprocessor.h" | 32 | #include "linden_common.h" |
33 | 33 | ||
34 | #if LL_LCD_COMPILE | 34 | #if LL_LCD_COMPILE |
35 | 35 | ||
36 | #include "linden_common.h" | ||
37 | #include "../win_crash_logger/StdAfx.h" | ||
38 | |||
39 | #include "EZ_LCD.h" | 36 | #include "EZ_LCD.h" |
40 | #include "../newview/res/resource.h" | 37 | #include "../newview/res/resource.h" |
41 | #include "llcontrol.h" | 38 | #include "llcontrol.h" |
diff --git a/linden/indra/llwindow/lllogitechlcd.h b/linden/indra/llwindow/lllogitechlcd.h index d538b95..47a6acd 100644 --- a/linden/indra/llwindow/lllogitechlcd.h +++ b/linden/indra/llwindow/lllogitechlcd.h | |||
@@ -12,12 +12,12 @@ | |||
12 | * ("GPL"), unless you have obtained a separate licensing agreement | 12 | * ("GPL"), unless you have obtained a separate licensing agreement |
13 | * ("Other License"), formally executed by you and Linden Lab. Terms of | 13 | * ("Other License"), formally executed by you and Linden Lab. Terms of |
14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | 14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or |
15 | * online at http://secondlife.com/developers/opensource/gplv2 | 15 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 |
16 | * | 16 | * |
17 | * There are special exceptions to the terms and conditions of the GPL as | 17 | * There are special exceptions to the terms and conditions of the GPL as |
18 | * it is applied to this Source Code. View the full text of the exception | 18 | * it is applied to this Source Code. View the full text of the exception |
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 19 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
20 | * online at http://secondlife.com/developers/opensource/flossexception | 20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception |
21 | * | 21 | * |
22 | * By copying, modifying or distributing this software, you acknowledge | 22 | * By copying, modifying or distributing this software, you acknowledge |
23 | * that you have read and understood your obligations described above, | 23 | * that you have read and understood your obligations described above, |
@@ -132,4 +132,4 @@ private: | |||
132 | 132 | ||
133 | 133 | ||
134 | 134 | ||
135 | #endif \ No newline at end of file | 135 | #endif |
diff --git a/linden/indra/llwindow/llmousehandler.h b/linden/indra/llwindow/llmousehandler.h index 1371405..8bc77bb 100644 --- a/linden/indra/llwindow/llmousehandler.h +++ b/linden/indra/llwindow/llmousehandler.h | |||
@@ -12,12 +12,12 @@ | |||
12 | * ("GPL"), unless you have obtained a separate licensing agreement | 12 | * ("GPL"), unless you have obtained a separate licensing agreement |
13 | * ("Other License"), formally executed by you and Linden Lab. Terms of | 13 | * ("Other License"), formally executed by you and Linden Lab. Terms of |
14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | 14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or |
15 | * online at http://secondlife.com/developers/opensource/gplv2 | 15 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 |
16 | * | 16 | * |
17 | * There are special exceptions to the terms and conditions of the GPL as | 17 | * There are special exceptions to the terms and conditions of the GPL as |
18 | * it is applied to this Source Code. View the full text of the exception | 18 | * it is applied to this Source Code. View the full text of the exception |
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 19 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
20 | * online at http://secondlife.com/developers/opensource/flossexception | 20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception |
21 | * | 21 | * |
22 | * By copying, modifying or distributing this software, you acknowledge | 22 | * By copying, modifying or distributing this software, you acknowledge |
23 | * that you have read and understood your obligations described above, | 23 | * that you have read and understood your obligations described above, |
diff --git a/linden/indra/llwindow/llpreeditor.h b/linden/indra/llwindow/llpreeditor.h new file mode 100644 index 0000000..f66a390 --- /dev/null +++ b/linden/indra/llwindow/llpreeditor.h | |||
@@ -0,0 +1,106 @@ | |||
1 | /** | ||
2 | * @file llpreeditor.h | ||
3 | * @brief I believe this is used for languages like Japanese that require | ||
4 | * an "input method editor" to type Kanji. | ||
5 | * @author Open source patch, incorporated by Dave Simmons | ||
6 | * | ||
7 | * $LicenseInfo:firstyear=2007&license=viewergpl$ | ||
8 | * | ||
9 | * Copyright (c) 2007-2008, Linden Research, Inc. | ||
10 | * | ||
11 | * Second Life Viewer Source Code | ||
12 | * The source code in this file ("Source Code") is provided by Linden Lab | ||
13 | * to you under the terms of the GNU General Public License, version 2.0 | ||
14 | * ("GPL"), unless you have obtained a separate licensing agreement | ||
15 | * ("Other License"), formally executed by you and Linden Lab. Terms of | ||
16 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | ||
17 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 | ||
18 | * | ||
19 | * There are special exceptions to the terms and conditions of the GPL as | ||
20 | * it is applied to this Source Code. View the full text of the exception | ||
21 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
22 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception | ||
23 | * | ||
24 | * By copying, modifying or distributing this software, you acknowledge | ||
25 | * that you have read and understood your obligations described above, | ||
26 | * and agree to abide by those obligations. | ||
27 | * | ||
28 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | ||
29 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
30 | * COMPLETENESS OR PERFORMANCE. | ||
31 | * $/LicenseInfo$ | ||
32 | */ | ||
33 | |||
34 | #ifndef LL_PREEDITOR | ||
35 | #define LL_PREEDITOR | ||
36 | |||
37 | class LLPreeditor | ||
38 | { | ||
39 | public: | ||
40 | |||
41 | typedef std::vector<S32> segment_lengths_t; | ||
42 | typedef std::vector<BOOL> standouts_t; | ||
43 | |||
44 | // We don't delete against LLPreeditor, but compilers complain without this... | ||
45 | |||
46 | virtual ~LLPreeditor() {}; | ||
47 | |||
48 | // Discard any preedit info. on this preeditor. | ||
49 | |||
50 | virtual void resetPreedit() = 0; | ||
51 | |||
52 | // Update the preedit feedback using specified details. | ||
53 | // Existing preedit is discarded and replaced with the new one. (I.e., updatePreedit is not cumulative.) | ||
54 | // All arguments are IN. | ||
55 | // preedit_count is the number of elements in arrays preedit_list and preedit_standouts. | ||
56 | // preedit list is an array of preedit texts (clauses.) | ||
57 | // preedit_standouts indicates whether each preedit text should be shown as standout clause. | ||
58 | // caret_position is the preedit-local position of text editing caret, in # of llwchar. | ||
59 | |||
60 | virtual void updatePreedit(const LLWString &preedit_string, | ||
61 | const segment_lengths_t &preedit_segment_lengths, const standouts_t &preedit_standouts, S32 caret_position) = 0; | ||
62 | |||
63 | // Turn the specified sub-contents into an active preedit. | ||
64 | // Both position and length are IN and count with UTF-32 (llwchar) characters. | ||
65 | // This method primarily facilitates reconversion. | ||
66 | |||
67 | virtual void markAsPreedit(S32 position, S32 length) = 0; | ||
68 | |||
69 | // Get the position and the length of the active preedit in the contents. | ||
70 | // Both position and length are OUT and count with UTF-32 (llwchar) characters. | ||
71 | // When this preeditor has no active preedit, position receives | ||
72 | // the caret position, and length receives 0. | ||
73 | |||
74 | virtual void getPreeditRange(S32 *position, S32 *length) const = 0; | ||
75 | |||
76 | // Get the position and the length of the current selection in the contents. | ||
77 | // Both position and length are OUT and count with UTF-32 (llwchar) characters. | ||
78 | // When this preeditor has no selection, position receives | ||
79 | // the caret position, and length receives 0. | ||
80 | |||
81 | virtual void getSelectionRange(S32 *position, S32 *length) const = 0; | ||
82 | |||
83 | // Get the locations where the preedit and related UI elements are displayed. | ||
84 | // Locations are relative to the app window and measured in GL coordinate space (before scaling.) | ||
85 | // query_position is IN argument, and other three are OUT. | ||
86 | |||
87 | virtual BOOL getPreeditLocation(S32 query_position, LLCoordGL *coord, LLRect *bounds, LLRect *control) const = 0; | ||
88 | |||
89 | // Get the size (height) of the current font used in this preeditor. | ||
90 | |||
91 | virtual S32 getPreeditFontSize() const = 0; | ||
92 | |||
93 | // Get the contents of this preeditor as a LLWString. If there is an active preedit, | ||
94 | // the returned LLWString contains it. | ||
95 | |||
96 | virtual const LLWString & getWText() const = 0; | ||
97 | |||
98 | // Handle a UTF-32 char on this preeditor, i.e., add the character | ||
99 | // to the contents. | ||
100 | // This is a back door of the method of same name of LLWindowCallback. | ||
101 | // called_from_parent should be set to FALSE if calling through LLPreeditor. | ||
102 | |||
103 | virtual BOOL handleUnicodeCharHere(llwchar uni_char, BOOL called_from_parent) = 0; | ||
104 | }; | ||
105 | |||
106 | #endif | ||
diff --git a/linden/indra/llwindow/llwindow.cpp b/linden/indra/llwindow/llwindow.cpp index c10e97f..718ed55 100644 --- a/linden/indra/llwindow/llwindow.cpp +++ b/linden/indra/llwindow/llwindow.cpp | |||
@@ -12,12 +12,12 @@ | |||
12 | * ("GPL"), unless you have obtained a separate licensing agreement | 12 | * ("GPL"), unless you have obtained a separate licensing agreement |
13 | * ("Other License"), formally executed by you and Linden Lab. Terms of | 13 | * ("Other License"), formally executed by you and Linden Lab. Terms of |
14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | 14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or |
15 | * online at http://secondlife.com/developers/opensource/gplv2 | 15 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 |
16 | * | 16 | * |
17 | * There are special exceptions to the terms and conditions of the GPL as | 17 | * There are special exceptions to the terms and conditions of the GPL as |
18 | * it is applied to this Source Code. View the full text of the exception | 18 | * it is applied to this Source Code. View the full text of the exception |
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 19 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
20 | * online at http://secondlife.com/developers/opensource/flossexception | 20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception |
21 | * | 21 | * |
22 | * By copying, modifying or distributing this software, you acknowledge | 22 | * By copying, modifying or distributing this software, you acknowledge |
23 | * that you have read and understood your obligations described above, | 23 | * that you have read and understood your obligations described above, |
diff --git a/linden/indra/llwindow/llwindow.h b/linden/indra/llwindow/llwindow.h index 2a1babb..1d49572 100644 --- a/linden/indra/llwindow/llwindow.h +++ b/linden/indra/llwindow/llwindow.h | |||
@@ -12,12 +12,12 @@ | |||
12 | * ("GPL"), unless you have obtained a separate licensing agreement | 12 | * ("GPL"), unless you have obtained a separate licensing agreement |
13 | * ("Other License"), formally executed by you and Linden Lab. Terms of | 13 | * ("Other License"), formally executed by you and Linden Lab. Terms of |
14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | 14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or |
15 | * online at http://secondlife.com/developers/opensource/gplv2 | 15 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 |
16 | * | 16 | * |
17 | * There are special exceptions to the terms and conditions of the GPL as | 17 | * There are special exceptions to the terms and conditions of the GPL as |
18 | * it is applied to this Source Code. View the full text of the exception | 18 | * it is applied to this Source Code. View the full text of the exception |
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 19 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
20 | * online at http://secondlife.com/developers/opensource/flossexception | 20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception |
21 | * | 21 | * |
22 | * By copying, modifying or distributing this software, you acknowledge | 22 | * By copying, modifying or distributing this software, you acknowledge |
23 | * that you have read and understood your obligations described above, | 23 | * that you have read and understood your obligations described above, |
@@ -81,6 +81,8 @@ class LLSplashScreen; | |||
81 | 81 | ||
82 | class LLWindow; | 82 | class LLWindow; |
83 | 83 | ||
84 | class LLPreeditor; | ||
85 | |||
84 | class LLWindowCallbacks | 86 | class LLWindowCallbacks |
85 | { | 87 | { |
86 | public: | 88 | public: |
@@ -222,8 +224,10 @@ public: | |||
222 | virtual void *getPlatformWindow() = 0; | 224 | virtual void *getPlatformWindow() = 0; |
223 | 225 | ||
224 | // control platform's Language Text Input mechanisms. | 226 | // control platform's Language Text Input mechanisms. |
225 | virtual void allowLanguageTextInput( BOOL b ) {}; | 227 | virtual void allowLanguageTextInput(LLPreeditor *preeditor, BOOL b) {} |
226 | virtual void setLanguageTextInput( const LLCoordGL & pos ) {}; | 228 | virtual void setLanguageTextInput( const LLCoordGL & pos ) {}; |
229 | virtual void updateLanguageTextInputArea() {} | ||
230 | virtual void interruptLanguageTextInput() {} | ||
227 | 231 | ||
228 | protected: | 232 | protected: |
229 | LLWindow(BOOL fullscreen, U32 flags); | 233 | LLWindow(BOOL fullscreen, U32 flags); |
@@ -351,9 +355,6 @@ extern const char* gURLProtocolWhitelistHandler[]; | |||
351 | // Loads a URL with the user's default browser | 355 | // Loads a URL with the user's default browser |
352 | void spawn_web_browser(const char* escaped_url); | 356 | void spawn_web_browser(const char* escaped_url); |
353 | 357 | ||
354 | // Opens a file with ShellExecute. Security risk! | ||
355 | void shell_open(const char* file_path); | ||
356 | |||
357 | void simpleEscapeString ( std::string& stringIn ); | 358 | void simpleEscapeString ( std::string& stringIn ); |
358 | 359 | ||
359 | #endif // _LL_window_h_ | 360 | #endif // _LL_window_h_ |
diff --git a/linden/indra/llwindow/llwindow.vcproj b/linden/indra/llwindow/llwindow.vcproj index 7adecd6..1291d99 100644 --- a/linden/indra/llwindow/llwindow.vcproj +++ b/linden/indra/llwindow/llwindow.vcproj | |||
@@ -255,6 +255,9 @@ | |||
255 | RelativePath=".\llmousehandler.h"> | 255 | RelativePath=".\llmousehandler.h"> |
256 | </File> | 256 | </File> |
257 | <File | 257 | <File |
258 | RelativePath=".\llpreeditor.h"> | ||
259 | </File> | ||
260 | <File | ||
258 | RelativePath=".\llwindow.h"> | 261 | RelativePath=".\llwindow.h"> |
259 | </File> | 262 | </File> |
260 | <File | 263 | <File |
diff --git a/linden/indra/llwindow/llwindow_vc9.vcproj b/linden/indra/llwindow/llwindow_vc9.vcproj new file mode 100644 index 0000000..89998cd --- /dev/null +++ b/linden/indra/llwindow/llwindow_vc9.vcproj | |||
@@ -0,0 +1,398 @@ | |||
1 | <?xml version="1.0" encoding="Windows-1252"?> | ||
2 | <VisualStudioProject | ||
3 | ProjectType="Visual C++" | ||
4 | Version="9.00" | ||
5 | Name="llwindow" | ||
6 | ProjectGUID="{B5B53617-416F-404A-BF10-22EBCCA0E4FB}" | ||
7 | RootNamespace="llwindow" | ||
8 | Keyword="Win32Proj" | ||
9 | TargetFrameworkVersion="131072" | ||
10 | > | ||
11 | <Platforms> | ||
12 | <Platform | ||
13 | Name="Win32" | ||
14 | /> | ||
15 | </Platforms> | ||
16 | <ToolFiles> | ||
17 | </ToolFiles> | ||
18 | <Configurations> | ||
19 | <Configuration | ||
20 | Name="Debug|Win32" | ||
21 | OutputDirectory="../lib_$(ConfigurationName)/i686-win32" | ||
22 | IntermediateDirectory="Debug" | ||
23 | ConfigurationType="4" | ||
24 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" | ||
25 | CharacterSet="1" | ||
26 | > | ||
27 | <Tool | ||
28 | Name="VCPreBuildEventTool" | ||
29 | /> | ||
30 | <Tool | ||
31 | Name="VCCustomBuildTool" | ||
32 | /> | ||
33 | <Tool | ||
34 | Name="VCXMLDataGeneratorTool" | ||
35 | /> | ||
36 | <Tool | ||
37 | Name="VCWebServiceProxyGeneratorTool" | ||
38 | /> | ||
39 | <Tool | ||
40 | Name="VCMIDLTool" | ||
41 | /> | ||
42 | <Tool | ||
43 | Name="VCCLCompilerTool" | ||
44 | Optimization="0" | ||
45 | AdditionalIncludeDirectories="..\llcommon;..\llmath;..\llxml;..\llvfs;..\llmessage;..\llscene;..\llimage;"..\..\libraries\i686-win32\include";..\..\libraries\include\;..\..\libraries\include\Logitech_LCD;..\..\libraries\include\Logitech_LCD\LCDUI" | ||
46 | PreprocessorDefinitions="WIN32;_DEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_DEBUG" | ||
47 | MinimalRebuild="true" | ||
48 | BasicRuntimeChecks="3" | ||
49 | RuntimeLibrary="1" | ||
50 | StructMemberAlignment="4" | ||
51 | TreatWChar_tAsBuiltInType="false" | ||
52 | ForceConformanceInForLoopScope="true" | ||
53 | UsePrecompiledHeader="0" | ||
54 | WarningLevel="3" | ||
55 | Detect64BitPortabilityProblems="false" | ||
56 | DebugInformationFormat="4" | ||
57 | /> | ||
58 | <Tool | ||
59 | Name="VCManagedResourceCompilerTool" | ||
60 | /> | ||
61 | <Tool | ||
62 | Name="VCResourceCompilerTool" | ||
63 | /> | ||
64 | <Tool | ||
65 | Name="VCPreLinkEventTool" | ||
66 | /> | ||
67 | <Tool | ||
68 | Name="VCLibrarianTool" | ||
69 | OutputFile="$(OutDir)/llwindow.lib" | ||
70 | /> | ||
71 | <Tool | ||
72 | Name="VCALinkTool" | ||
73 | /> | ||
74 | <Tool | ||
75 | Name="VCXDCMakeTool" | ||
76 | /> | ||
77 | <Tool | ||
78 | Name="VCBscMakeTool" | ||
79 | /> | ||
80 | <Tool | ||
81 | Name="VCFxCopTool" | ||
82 | /> | ||
83 | <Tool | ||
84 | Name="VCPostBuildEventTool" | ||
85 | /> | ||
86 | </Configuration> | ||
87 | <Configuration | ||
88 | Name="Release|Win32" | ||
89 | OutputDirectory="../lib_$(ConfigurationName)/i686-win32" | ||
90 | IntermediateDirectory="Release" | ||
91 | ConfigurationType="4" | ||
92 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" | ||
93 | CharacterSet="1" | ||
94 | > | ||
95 | <Tool | ||
96 | Name="VCPreBuildEventTool" | ||
97 | /> | ||
98 | <Tool | ||
99 | Name="VCCustomBuildTool" | ||
100 | /> | ||
101 | <Tool | ||
102 | Name="VCXMLDataGeneratorTool" | ||
103 | /> | ||
104 | <Tool | ||
105 | Name="VCWebServiceProxyGeneratorTool" | ||
106 | /> | ||
107 | <Tool | ||
108 | Name="VCMIDLTool" | ||
109 | /> | ||
110 | <Tool | ||
111 | Name="VCCLCompilerTool" | ||
112 | AdditionalOptions="/Oy-" | ||
113 | AdditionalIncludeDirectories="..\llcommon;..\llmath;..\llxml;..\llvfs;..\llmessage;..\llscene;..\llimage;"..\..\libraries\i686-win32\include";..\..\libraries\include\;..\..\libraries\include\Logitech_LCD;..\..\libraries\include\Logitech_LCD\LCDUI" | ||
114 | PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_RELEASE" | ||
115 | TreatWChar_tAsBuiltInType="false" | ||
116 | ForceConformanceInForLoopScope="true" | ||
117 | WarningLevel="3" | ||
118 | WarnAsError="true" | ||
119 | DebugInformationFormat="3" | ||
120 | /> | ||
121 | <Tool | ||
122 | Name="VCManagedResourceCompilerTool" | ||
123 | /> | ||
124 | <Tool | ||
125 | Name="VCResourceCompilerTool" | ||
126 | /> | ||
127 | <Tool | ||
128 | Name="VCPreLinkEventTool" | ||
129 | /> | ||
130 | <Tool | ||
131 | Name="VCLibrarianTool" | ||
132 | OutputFile="$(OutDir)/llwindow.lib" | ||
133 | /> | ||
134 | <Tool | ||
135 | Name="VCALinkTool" | ||
136 | /> | ||
137 | <Tool | ||
138 | Name="VCXDCMakeTool" | ||
139 | /> | ||
140 | <Tool | ||
141 | Name="VCBscMakeTool" | ||
142 | /> | ||
143 | <Tool | ||
144 | Name="VCFxCopTool" | ||
145 | /> | ||
146 | <Tool | ||
147 | Name="VCPostBuildEventTool" | ||
148 | /> | ||
149 | </Configuration> | ||
150 | <Configuration | ||
151 | Name="DebugMesaHeadless|Win32" | ||
152 | OutputDirectory="../lib_debug/i686-win32" | ||
153 | IntermediateDirectory="$(ConfigurationName)" | ||
154 | ConfigurationType="4" | ||
155 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" | ||
156 | CharacterSet="1" | ||
157 | > | ||
158 | <Tool | ||
159 | Name="VCPreBuildEventTool" | ||
160 | /> | ||
161 | <Tool | ||
162 | Name="VCCustomBuildTool" | ||
163 | /> | ||
164 | <Tool | ||
165 | Name="VCXMLDataGeneratorTool" | ||
166 | /> | ||
167 | <Tool | ||
168 | Name="VCWebServiceProxyGeneratorTool" | ||
169 | /> | ||
170 | <Tool | ||
171 | Name="VCMIDLTool" | ||
172 | /> | ||
173 | <Tool | ||
174 | Name="VCCLCompilerTool" | ||
175 | Optimization="0" | ||
176 | AdditionalIncludeDirectories="..\llcommon;..\llmath;..\llxml;..\llvfs;..\llmessage;..\llscene;..\llimage;"..\..\libraries\i686-win32\include";..\..\libraries\include\GLMESA;..\..\libraries\include\;..\..\libraries\include\Logitech_LCD;..\..\libraries\include\Logitech_LCD\LCDUI" | ||
177 | PreprocessorDefinitions="WIN32;_DEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_DEBUG;LL_MESA;LL_MESA_HEADLESS" | ||
178 | MinimalRebuild="true" | ||
179 | BasicRuntimeChecks="3" | ||
180 | RuntimeLibrary="1" | ||
181 | StructMemberAlignment="4" | ||
182 | TreatWChar_tAsBuiltInType="false" | ||
183 | ForceConformanceInForLoopScope="true" | ||
184 | UsePrecompiledHeader="0" | ||
185 | WarningLevel="3" | ||
186 | Detect64BitPortabilityProblems="false" | ||
187 | DebugInformationFormat="4" | ||
188 | /> | ||
189 | <Tool | ||
190 | Name="VCManagedResourceCompilerTool" | ||
191 | /> | ||
192 | <Tool | ||
193 | Name="VCResourceCompilerTool" | ||
194 | /> | ||
195 | <Tool | ||
196 | Name="VCPreLinkEventTool" | ||
197 | /> | ||
198 | <Tool | ||
199 | Name="VCLibrarianTool" | ||
200 | OutputFile="$(OutDir)/llwindow_mesaheadless.lib" | ||
201 | /> | ||
202 | <Tool | ||
203 | Name="VCALinkTool" | ||
204 | /> | ||
205 | <Tool | ||
206 | Name="VCXDCMakeTool" | ||
207 | /> | ||
208 | <Tool | ||
209 | Name="VCBscMakeTool" | ||
210 | /> | ||
211 | <Tool | ||
212 | Name="VCFxCopTool" | ||
213 | /> | ||
214 | <Tool | ||
215 | Name="VCPostBuildEventTool" | ||
216 | /> | ||
217 | </Configuration> | ||
218 | <Configuration | ||
219 | Name="ReleaseNoOpt|Win32" | ||
220 | OutputDirectory="../lib_$(ConfigurationName)/i686-win32" | ||
221 | IntermediateDirectory="$(ConfigurationName)" | ||
222 | ConfigurationType="4" | ||
223 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" | ||
224 | CharacterSet="1" | ||
225 | > | ||
226 | <Tool | ||
227 | Name="VCPreBuildEventTool" | ||
228 | /> | ||
229 | <Tool | ||
230 | Name="VCCustomBuildTool" | ||
231 | /> | ||
232 | <Tool | ||
233 | Name="VCXMLDataGeneratorTool" | ||
234 | /> | ||
235 | <Tool | ||
236 | Name="VCWebServiceProxyGeneratorTool" | ||
237 | /> | ||
238 | <Tool | ||
239 | Name="VCMIDLTool" | ||
240 | /> | ||
241 | <Tool | ||
242 | Name="VCCLCompilerTool" | ||
243 | AdditionalOptions="/Oy-" | ||
244 | Optimization="0" | ||
245 | AdditionalIncludeDirectories="..\llcommon;..\llmath;..\llxml;..\llvfs;..\llmessage;..\llscene;..\llimage;"..\..\libraries\i686-win32\include";..\..\libraries\include\;..\..\libraries\include\Logitech_LCD;..\..\libraries\include\Logitech_LCD\LCDUI" | ||
246 | PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_RELEASE" | ||
247 | RuntimeLibrary="0" | ||
248 | StructMemberAlignment="0" | ||
249 | TreatWChar_tAsBuiltInType="false" | ||
250 | ForceConformanceInForLoopScope="true" | ||
251 | UsePrecompiledHeader="0" | ||
252 | WarningLevel="3" | ||
253 | Detect64BitPortabilityProblems="false" | ||
254 | DebugInformationFormat="3" | ||
255 | /> | ||
256 | <Tool | ||
257 | Name="VCManagedResourceCompilerTool" | ||
258 | /> | ||
259 | <Tool | ||
260 | Name="VCResourceCompilerTool" | ||
261 | /> | ||
262 | <Tool | ||
263 | Name="VCPreLinkEventTool" | ||
264 | /> | ||
265 | <Tool | ||
266 | Name="VCLibrarianTool" | ||
267 | OutputFile="$(OutDir)/llwindow.lib" | ||
268 | /> | ||
269 | <Tool | ||
270 | Name="VCALinkTool" | ||
271 | /> | ||
272 | <Tool | ||
273 | Name="VCXDCMakeTool" | ||
274 | /> | ||
275 | <Tool | ||
276 | Name="VCBscMakeTool" | ||
277 | /> | ||
278 | <Tool | ||
279 | Name="VCFxCopTool" | ||
280 | /> | ||
281 | <Tool | ||
282 | Name="VCPostBuildEventTool" | ||
283 | /> | ||
284 | </Configuration> | ||
285 | </Configurations> | ||
286 | <References> | ||
287 | </References> | ||
288 | <Files> | ||
289 | <Filter | ||
290 | Name="Source Files" | ||
291 | Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" | ||
292 | UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" | ||
293 | > | ||
294 | <File | ||
295 | RelativePath=".\lldxhardware.cpp" | ||
296 | > | ||
297 | </File> | ||
298 | <File | ||
299 | RelativePath=".\llgl.cpp" | ||
300 | > | ||
301 | </File> | ||
302 | <File | ||
303 | RelativePath=".\llkeyboard.cpp" | ||
304 | > | ||
305 | </File> | ||
306 | <File | ||
307 | RelativePath=".\llkeyboardwin32.cpp" | ||
308 | > | ||
309 | </File> | ||
310 | <File | ||
311 | RelativePath=".\lllogitechlcd.cpp" | ||
312 | > | ||
313 | </File> | ||
314 | <File | ||
315 | RelativePath=".\llwindow.cpp" | ||
316 | > | ||
317 | </File> | ||
318 | <File | ||
319 | RelativePath=".\llwindowheadless.cpp" | ||
320 | > | ||
321 | </File> | ||
322 | <File | ||
323 | RelativePath=".\llwindowmesaheadless.cpp" | ||
324 | > | ||
325 | </File> | ||
326 | <File | ||
327 | RelativePath=".\llwindowwin32.cpp" | ||
328 | > | ||
329 | </File> | ||
330 | </Filter> | ||
331 | <Filter | ||
332 | Name="Header Files" | ||
333 | Filter="h;hpp;hxx;hm;inl;inc;xsd" | ||
334 | UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" | ||
335 | > | ||
336 | <File | ||
337 | RelativePath=".\lldxhardware.h" | ||
338 | > | ||
339 | </File> | ||
340 | <File | ||
341 | RelativePath=".\llgl.h" | ||
342 | > | ||
343 | </File> | ||
344 | <File | ||
345 | RelativePath=".\llglheaders.h" | ||
346 | > | ||
347 | </File> | ||
348 | <File | ||
349 | RelativePath=".\llglstates.h" | ||
350 | > | ||
351 | </File> | ||
352 | <File | ||
353 | RelativePath=".\llgltypes.h" | ||
354 | > | ||
355 | </File> | ||
356 | <File | ||
357 | RelativePath=".\llkeyboard.h" | ||
358 | > | ||
359 | </File> | ||
360 | <File | ||
361 | RelativePath=".\llkeyboardwin32.h" | ||
362 | > | ||
363 | </File> | ||
364 | <File | ||
365 | RelativePath=".\lllogitechlcd.h" | ||
366 | > | ||
367 | </File> | ||
368 | <File | ||
369 | RelativePath=".\llmousehandler.h" | ||
370 | > | ||
371 | </File> | ||
372 | <File | ||
373 | RelativePath=".\llwindow.h" | ||
374 | > | ||
375 | </File> | ||
376 | <File | ||
377 | RelativePath=".\llwindowheadless.h" | ||
378 | > | ||
379 | </File> | ||
380 | <File | ||
381 | RelativePath=".\llwindowmesaheadless.h" | ||
382 | > | ||
383 | </File> | ||
384 | <File | ||
385 | RelativePath=".\llwindowwin32.h" | ||
386 | > | ||
387 | </File> | ||
388 | </Filter> | ||
389 | <Filter | ||
390 | Name="Resource Files" | ||
391 | Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" | ||
392 | UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" | ||
393 | > | ||
394 | </Filter> | ||
395 | </Files> | ||
396 | <Globals> | ||
397 | </Globals> | ||
398 | </VisualStudioProject> | ||
diff --git a/linden/indra/llwindow/llwindowheadless.cpp b/linden/indra/llwindow/llwindowheadless.cpp index ed65e3c..441b4e9 100644 --- a/linden/indra/llwindow/llwindowheadless.cpp +++ b/linden/indra/llwindow/llwindowheadless.cpp | |||
@@ -12,12 +12,12 @@ | |||
12 | * ("GPL"), unless you have obtained a separate licensing agreement | 12 | * ("GPL"), unless you have obtained a separate licensing agreement |
13 | * ("Other License"), formally executed by you and Linden Lab. Terms of | 13 | * ("Other License"), formally executed by you and Linden Lab. Terms of |
14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | 14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or |
15 | * online at http://secondlife.com/developers/opensource/gplv2 | 15 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 |
16 | * | 16 | * |
17 | * There are special exceptions to the terms and conditions of the GPL as | 17 | * There are special exceptions to the terms and conditions of the GPL as |
18 | * it is applied to this Source Code. View the full text of the exception | 18 | * it is applied to this Source Code. View the full text of the exception |
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 19 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
20 | * online at http://secondlife.com/developers/opensource/flossexception | 20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception |
21 | * | 21 | * |
22 | * By copying, modifying or distributing this software, you acknowledge | 22 | * By copying, modifying or distributing this software, you acknowledge |
23 | * that you have read and understood your obligations described above, | 23 | * that you have read and understood your obligations described above, |
diff --git a/linden/indra/llwindow/llwindowheadless.h b/linden/indra/llwindow/llwindowheadless.h index 782186f..15e7196 100644 --- a/linden/indra/llwindow/llwindowheadless.h +++ b/linden/indra/llwindow/llwindowheadless.h | |||
@@ -12,12 +12,12 @@ | |||
12 | * ("GPL"), unless you have obtained a separate licensing agreement | 12 | * ("GPL"), unless you have obtained a separate licensing agreement |
13 | * ("Other License"), formally executed by you and Linden Lab. Terms of | 13 | * ("Other License"), formally executed by you and Linden Lab. Terms of |
14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | 14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or |
15 | * online at http://secondlife.com/developers/opensource/gplv2 | 15 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 |
16 | * | 16 | * |
17 | * There are special exceptions to the terms and conditions of the GPL as | 17 | * There are special exceptions to the terms and conditions of the GPL as |
18 | * it is applied to this Source Code. View the full text of the exception | 18 | * it is applied to this Source Code. View the full text of the exception |
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 19 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
20 | * online at http://secondlife.com/developers/opensource/flossexception | 20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception |
21 | * | 21 | * |
22 | * By copying, modifying or distributing this software, you acknowledge | 22 | * By copying, modifying or distributing this software, you acknowledge |
23 | * that you have read and understood your obligations described above, | 23 | * that you have read and understood your obligations described above, |
diff --git a/linden/indra/llwindow/llwindowlinux.cpp b/linden/indra/llwindow/llwindowlinux.cpp index 6e83e4e..6c026e4 100644 --- a/linden/indra/llwindow/llwindowlinux.cpp +++ b/linden/indra/llwindow/llwindowlinux.cpp | |||
@@ -12,12 +12,12 @@ | |||
12 | * ("GPL"), unless you have obtained a separate licensing agreement | 12 | * ("GPL"), unless you have obtained a separate licensing agreement |
13 | * ("Other License"), formally executed by you and Linden Lab. Terms of | 13 | * ("Other License"), formally executed by you and Linden Lab. Terms of |
14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | 14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or |
15 | * online at http://secondlife.com/developers/opensource/gplv2 | 15 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 |
16 | * | 16 | * |
17 | * There are special exceptions to the terms and conditions of the GPL as | 17 | * There are special exceptions to the terms and conditions of the GPL as |
18 | * it is applied to this Source Code. View the full text of the exception | 18 | * it is applied to this Source Code. View the full text of the exception |
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 19 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
20 | * online at http://secondlife.com/developers/opensource/flossexception | 20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception |
21 | * | 21 | * |
22 | * By copying, modifying or distributing this software, you acknowledge | 22 | * By copying, modifying or distributing this software, you acknowledge |
23 | * that you have read and understood your obligations described above, | 23 | * that you have read and understood your obligations described above, |
diff --git a/linden/indra/llwindow/llwindowlinux.h b/linden/indra/llwindow/llwindowlinux.h index fa3ad83..bebf25a 100644 --- a/linden/indra/llwindow/llwindowlinux.h +++ b/linden/indra/llwindow/llwindowlinux.h | |||
@@ -12,12 +12,12 @@ | |||
12 | * ("GPL"), unless you have obtained a separate licensing agreement | 12 | * ("GPL"), unless you have obtained a separate licensing agreement |
13 | * ("Other License"), formally executed by you and Linden Lab. Terms of | 13 | * ("Other License"), formally executed by you and Linden Lab. Terms of |
14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | 14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or |
15 | * online at http://secondlife.com/developers/opensource/gplv2 | 15 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 |
16 | * | 16 | * |
17 | * There are special exceptions to the terms and conditions of the GPL as | 17 | * There are special exceptions to the terms and conditions of the GPL as |
18 | * it is applied to this Source Code. View the full text of the exception | 18 | * it is applied to this Source Code. View the full text of the exception |
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 19 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
20 | * online at http://secondlife.com/developers/opensource/flossexception | 20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception |
21 | * | 21 | * |
22 | * By copying, modifying or distributing this software, you acknowledge | 22 | * By copying, modifying or distributing this software, you acknowledge |
23 | * that you have read and understood your obligations described above, | 23 | * that you have read and understood your obligations described above, |
diff --git a/linden/indra/llwindow/llwindowmacosx-objc.h b/linden/indra/llwindow/llwindowmacosx-objc.h index bf933bc..095f9e0 100644 --- a/linden/indra/llwindow/llwindowmacosx-objc.h +++ b/linden/indra/llwindow/llwindowmacosx-objc.h | |||
@@ -13,12 +13,12 @@ | |||
13 | * ("GPL"), unless you have obtained a separate licensing agreement | 13 | * ("GPL"), unless you have obtained a separate licensing agreement |
14 | * ("Other License"), formally executed by you and Linden Lab. Terms of | 14 | * ("Other License"), formally executed by you and Linden Lab. Terms of |
15 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | 15 | * the GPL can be found in doc/GPL-license.txt in this distribution, or |
16 | * online at http://secondlife.com/developers/opensource/gplv2 | 16 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 |
17 | * | 17 | * |
18 | * There are special exceptions to the terms and conditions of the GPL as | 18 | * There are special exceptions to the terms and conditions of the GPL as |
19 | * it is applied to this Source Code. View the full text of the exception | 19 | * it is applied to this Source Code. View the full text of the exception |
20 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 20 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
21 | * online at http://secondlife.com/developers/opensource/flossexception | 21 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception |
22 | * | 22 | * |
23 | * By copying, modifying or distributing this software, you acknowledge | 23 | * By copying, modifying or distributing this software, you acknowledge |
24 | * that you have read and understood your obligations described above, | 24 | * that you have read and understood your obligations described above, |
diff --git a/linden/indra/llwindow/llwindowmacosx-objc.mm b/linden/indra/llwindow/llwindowmacosx-objc.mm index a9e3958..d2efd77 100644 --- a/linden/indra/llwindow/llwindowmacosx-objc.mm +++ b/linden/indra/llwindow/llwindowmacosx-objc.mm | |||
@@ -13,12 +13,12 @@ | |||
13 | * ("GPL"), unless you have obtained a separate licensing agreement | 13 | * ("GPL"), unless you have obtained a separate licensing agreement |
14 | * ("Other License"), formally executed by you and Linden Lab. Terms of | 14 | * ("Other License"), formally executed by you and Linden Lab. Terms of |
15 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | 15 | * the GPL can be found in doc/GPL-license.txt in this distribution, or |
16 | * online at http://secondlife.com/developers/opensource/gplv2 | 16 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 |
17 | * | 17 | * |
18 | * There are special exceptions to the terms and conditions of the GPL as | 18 | * There are special exceptions to the terms and conditions of the GPL as |
19 | * it is applied to this Source Code. View the full text of the exception | 19 | * it is applied to this Source Code. View the full text of the exception |
20 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 20 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
21 | * online at http://secondlife.com/developers/opensource/flossexception | 21 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception |
22 | * | 22 | * |
23 | * By copying, modifying or distributing this software, you acknowledge | 23 | * By copying, modifying or distributing this software, you acknowledge |
24 | * that you have read and understood your obligations described above, | 24 | * that you have read and understood your obligations described above, |
diff --git a/linden/indra/llwindow/llwindowmacosx.cpp b/linden/indra/llwindow/llwindowmacosx.cpp index 93ef46b..f522abb 100644 --- a/linden/indra/llwindow/llwindowmacosx.cpp +++ b/linden/indra/llwindow/llwindowmacosx.cpp | |||
@@ -12,12 +12,12 @@ | |||
12 | * ("GPL"), unless you have obtained a separate licensing agreement | 12 | * ("GPL"), unless you have obtained a separate licensing agreement |
13 | * ("Other License"), formally executed by you and Linden Lab. Terms of | 13 | * ("Other License"), formally executed by you and Linden Lab. Terms of |
14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | 14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or |
15 | * online at http://secondlife.com/developers/opensource/gplv2 | 15 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 |
16 | * | 16 | * |
17 | * There are special exceptions to the terms and conditions of the GPL as | 17 | * There are special exceptions to the terms and conditions of the GPL as |
18 | * it is applied to this Source Code. View the full text of the exception | 18 | * it is applied to this Source Code. View the full text of the exception |
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 19 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
20 | * online at http://secondlife.com/developers/opensource/flossexception | 20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception |
21 | * | 21 | * |
22 | * By copying, modifying or distributing this software, you acknowledge | 22 | * By copying, modifying or distributing this software, you acknowledge |
23 | * that you have read and understood your obligations described above, | 23 | * that you have read and understood your obligations described above, |
@@ -48,6 +48,7 @@ | |||
48 | #include "indra_constants.h" | 48 | #include "indra_constants.h" |
49 | 49 | ||
50 | #include "llwindowmacosx-objc.h" | 50 | #include "llwindowmacosx-objc.h" |
51 | #include "llpreeditor.h" | ||
51 | 52 | ||
52 | extern BOOL gDebugWindowProc; | 53 | extern BOOL gDebugWindowProc; |
53 | 54 | ||
@@ -69,7 +70,6 @@ const S32 MAX_NUM_RESOLUTIONS = 32; | |||
69 | void show_window_creation_error(const char* title) | 70 | void show_window_creation_error(const char* title) |
70 | { | 71 | { |
71 | llwarns << title << llendl; | 72 | llwarns << title << llendl; |
72 | shell_open( "help/window_creation_error.html"); | ||
73 | /* | 73 | /* |
74 | OSMessageBox( | 74 | OSMessageBox( |
75 | "Second Life is unable to run because it can't set up your display.\n" | 75 | "Second Life is unable to run because it can't set up your display.\n" |
@@ -172,8 +172,22 @@ static EventTypeSpec WindowHandlerEventList[] = | |||
172 | { kEventClassKeyboard, kEventRawKeyModifiersChanged }, | 172 | { kEventClassKeyboard, kEventRawKeyModifiersChanged }, |
173 | 173 | ||
174 | // Text input events | 174 | // Text input events |
175 | { kEventClassTextInput, kEventTextInputUnicodeForKeyEvent } | 175 | { kEventClassTextInput, kEventTextInputUnicodeForKeyEvent }, |
176 | 176 | { kEventClassTextInput, kEventTextInputUpdateActiveInputArea }, | |
177 | { kEventClassTextInput, kEventTextInputOffsetToPos }, | ||
178 | { kEventClassTextInput, kEventTextInputPosToOffset }, | ||
179 | { kEventClassTextInput, kEventTextInputShowHideBottomWindow }, | ||
180 | { kEventClassTextInput, kEventTextInputGetSelectedText }, | ||
181 | { kEventClassTextInput, kEventTextInputFilterText }, | ||
182 | |||
183 | // TSM Document Access events (advanced input method support) | ||
184 | { kEventClassTSMDocumentAccess, kEventTSMDocumentAccessGetLength }, | ||
185 | { kEventClassTSMDocumentAccess, kEventTSMDocumentAccessGetSelectedRange }, | ||
186 | { kEventClassTSMDocumentAccess, kEventTSMDocumentAccessGetCharacters }, | ||
187 | { kEventClassTSMDocumentAccess, kEventTSMDocumentAccessGetFont }, | ||
188 | { kEventClassTSMDocumentAccess, kEventTSMDocumentAccessGetGlyphInfo }, | ||
189 | { kEventClassTSMDocumentAccess, kEventTSMDocumentAccessLockDocument }, | ||
190 | { kEventClassTSMDocumentAccess, kEventTSMDocumentAccessUnlockDocument } | ||
177 | }; | 191 | }; |
178 | 192 | ||
179 | static EventTypeSpec GlobalHandlerEventList[] = | 193 | static EventTypeSpec GlobalHandlerEventList[] = |
@@ -195,7 +209,22 @@ static EventTypeSpec GlobalHandlerEventList[] = | |||
195 | { kEventClassKeyboard, kEventRawKeyModifiersChanged }, | 209 | { kEventClassKeyboard, kEventRawKeyModifiersChanged }, |
196 | 210 | ||
197 | // Text input events | 211 | // Text input events |
198 | { kEventClassTextInput, kEventTextInputUnicodeForKeyEvent } | 212 | { kEventClassTextInput, kEventTextInputUpdateActiveInputArea }, |
213 | { kEventClassTextInput, kEventTextInputUnicodeForKeyEvent }, | ||
214 | { kEventClassTextInput, kEventTextInputOffsetToPos }, | ||
215 | { kEventClassTextInput, kEventTextInputPosToOffset }, | ||
216 | { kEventClassTextInput, kEventTextInputShowHideBottomWindow }, | ||
217 | { kEventClassTextInput, kEventTextInputGetSelectedText }, | ||
218 | { kEventClassTextInput, kEventTextInputFilterText }, | ||
219 | |||
220 | // TSM Document Access events (advanced input method support) | ||
221 | { kEventClassTSMDocumentAccess, kEventTSMDocumentAccessGetLength }, | ||
222 | { kEventClassTSMDocumentAccess, kEventTSMDocumentAccessGetSelectedRange }, | ||
223 | { kEventClassTSMDocumentAccess, kEventTSMDocumentAccessGetCharacters }, | ||
224 | { kEventClassTSMDocumentAccess, kEventTSMDocumentAccessGetFont }, | ||
225 | { kEventClassTSMDocumentAccess, kEventTSMDocumentAccessGetGlyphInfo }, | ||
226 | { kEventClassTSMDocumentAccess, kEventTSMDocumentAccessLockDocument }, | ||
227 | { kEventClassTSMDocumentAccess, kEventTSMDocumentAccessUnlockDocument } | ||
199 | }; | 228 | }; |
200 | 229 | ||
201 | static EventTypeSpec CommandHandlerEventList[] = | 230 | static EventTypeSpec CommandHandlerEventList[] = |
@@ -246,6 +275,7 @@ LLWindowMacOSX::LLWindowMacOSX(char *title, char *name, S32 x, S32 y, S32 width, | |||
246 | mLanguageTextInputAllowed = FALSE; | 275 | mLanguageTextInputAllowed = FALSE; |
247 | mTSMScriptCode = 0; | 276 | mTSMScriptCode = 0; |
248 | mTSMLangCode = 0; | 277 | mTSMLangCode = 0; |
278 | mPreeditor = NULL; | ||
249 | 279 | ||
250 | // For reasons that aren't clear to me, LLTimers seem to be created in the "started" state. | 280 | // For reasons that aren't clear to me, LLTimers seem to be created in the "started" state. |
251 | // Since the started state of this one is used to track whether the NMRec has been installed, it wants to start out in the "stopped" state. | 281 | // Since the started state of this one is used to track whether the NMRec has been installed, it wants to start out in the "stopped" state. |
@@ -497,15 +527,16 @@ BOOL LLWindowMacOSX::createContext(int x, int y, int width, int height, int bits | |||
497 | mTSMDocument = NULL; | 527 | mTSMDocument = NULL; |
498 | } | 528 | } |
499 | static InterfaceTypeList types = { kUnicodeDocument }; | 529 | static InterfaceTypeList types = { kUnicodeDocument }; |
500 | OSErr err = NewTSMDocument(1, types, &mTSMDocument, 0); | 530 | err = NewTSMDocument(1, types, &mTSMDocument, 0); |
501 | if (err != noErr) | 531 | if (err != noErr) |
502 | { | 532 | { |
503 | llwarns << "createContext: couldn't create a TSMDocument (" << err << ")" << llendl; | 533 | llwarns << "createContext: couldn't create a TSMDocument (" << err << ")" << llendl; |
504 | } | 534 | } |
505 | if (mTSMDocument) | 535 | if (mTSMDocument) |
506 | { | 536 | { |
507 | UseInputWindow(mTSMDocument, TRUE); | ||
508 | ActivateTSMDocument(mTSMDocument); | 537 | ActivateTSMDocument(mTSMDocument); |
538 | UseInputWindow(mTSMDocument, FALSE); | ||
539 | allowLanguageTextInput(NULL, FALSE); | ||
509 | } | 540 | } |
510 | } | 541 | } |
511 | 542 | ||
@@ -703,7 +734,6 @@ BOOL LLWindowMacOSX::createContext(int x, int y, int width, int height, int bits | |||
703 | if (check_for_card(RENDERER, CARD_LIST[i])) | 734 | if (check_for_card(RENDERER, CARD_LIST[i])) |
704 | { | 735 | { |
705 | close(); | 736 | close(); |
706 | shell_open( "help/unsupported_card.html" ); | ||
707 | return FALSE; | 737 | return FALSE; |
708 | } | 738 | } |
709 | } | 739 | } |
@@ -1949,6 +1979,141 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e | |||
1949 | { | 1979 | { |
1950 | switch (evtKind) | 1980 | switch (evtKind) |
1951 | { | 1981 | { |
1982 | case kEventTextInputUpdateActiveInputArea: | ||
1983 | { | ||
1984 | EventParamType param_type; | ||
1985 | |||
1986 | long fix_len; | ||
1987 | UInt32 text_len; | ||
1988 | if (mPreeditor | ||
1989 | && (result = GetEventParameter(event, kEventParamTextInputSendFixLen, | ||
1990 | typeLongInteger, ¶m_type, sizeof(fix_len), NULL, &fix_len)) == noErr | ||
1991 | && typeLongInteger == param_type | ||
1992 | && (result = GetEventParameter(event, kEventParamTextInputSendText, | ||
1993 | typeUnicodeText, ¶m_type, 0, &text_len, NULL)) == noErr | ||
1994 | && typeUnicodeText == param_type) | ||
1995 | { | ||
1996 | // Handle an optional (but essential to facilitate TSMDA) ReplaceRange param. | ||
1997 | CFRange range; | ||
1998 | if (GetEventParameter(event, kEventParamTextInputSendReplaceRange, | ||
1999 | typeCFRange, ¶m_type, sizeof(range), NULL, &range) == noErr | ||
2000 | && typeCFRange == param_type) | ||
2001 | { | ||
2002 | // Although the spec. is unclear, replace range should | ||
2003 | // not present when there is an active preedit. We just | ||
2004 | // ignore the case. markAsPreedit will detect the case and warn it. | ||
2005 | const LLWString & text = mPreeditor->getWText(); | ||
2006 | const S32 location = wstring_wstring_length_from_utf16_length(text, 0, range.location); | ||
2007 | const S32 length = wstring_wstring_length_from_utf16_length(text, location, range.length); | ||
2008 | mPreeditor->markAsPreedit(location, length); | ||
2009 | } | ||
2010 | mPreeditor->resetPreedit(); | ||
2011 | |||
2012 | // Receive the text from input method. | ||
2013 | U16 *const text = new U16[text_len / sizeof(U16)]; | ||
2014 | GetEventParameter(event, kEventParamTextInputSendText, typeUnicodeText, NULL, text_len, NULL, text); | ||
2015 | if (fix_len < 0) | ||
2016 | { | ||
2017 | // Do we still need this? Seems obsolete... | ||
2018 | fix_len = text_len; | ||
2019 | } | ||
2020 | const LLWString fix_string | ||
2021 | = utf16str_to_wstring(llutf16string(text, fix_len / sizeof(U16))); | ||
2022 | const LLWString preedit_string | ||
2023 | = utf16str_to_wstring(llutf16string(text + fix_len / sizeof(U16), (text_len - fix_len) / sizeof(U16))); | ||
2024 | delete[] text; | ||
2025 | |||
2026 | // Handle fixed (comitted) string. | ||
2027 | if (fix_string.length() > 0) | ||
2028 | { | ||
2029 | for (LLWString::const_iterator i = fix_string.begin(); i != fix_string.end(); i++) | ||
2030 | { | ||
2031 | mPreeditor->handleUnicodeCharHere(*i, FALSE); | ||
2032 | } | ||
2033 | } | ||
2034 | |||
2035 | // Receive the segment info and caret position. | ||
2036 | LLPreeditor::segment_lengths_t preedit_segment_lengths; | ||
2037 | LLPreeditor::standouts_t preedit_standouts; | ||
2038 | S32 caret_position = preedit_string.length(); | ||
2039 | UInt32 text_range_array_size; | ||
2040 | if (GetEventParameter(event, kEventParamTextInputSendHiliteRng, typeTextRangeArray, | ||
2041 | ¶m_type, 0, &text_range_array_size, NULL) == noErr | ||
2042 | && typeTextRangeArray == param_type | ||
2043 | && text_range_array_size > sizeof(TextRangeArray)) | ||
2044 | { | ||
2045 | // TextRangeArray is a variable-length struct. | ||
2046 | TextRangeArray * const text_range_array = (TextRangeArray *) new char[text_range_array_size]; | ||
2047 | GetEventParameter(event, kEventParamTextInputSendHiliteRng, typeTextRangeArray, | ||
2048 | NULL, text_range_array_size, NULL, text_range_array); | ||
2049 | |||
2050 | // WARNING: We assume ranges are in ascending order, | ||
2051 | // although the condition is undocumented. It seems | ||
2052 | // OK to assume this. I also assumed | ||
2053 | // the ranges are contiguous in previous versions, but I | ||
2054 | // have heard a rumore that older versions os ATOK may | ||
2055 | // return ranges with some _gap_. I don't know whether | ||
2056 | // it is true, but I'm preparing my code for the case. | ||
2057 | |||
2058 | const S32 ranges = text_range_array->fNumOfRanges; | ||
2059 | preedit_segment_lengths.reserve(ranges); | ||
2060 | preedit_standouts.reserve(ranges); | ||
2061 | |||
2062 | S32 last_bytes = 0; | ||
2063 | S32 last_utf32 = 0; | ||
2064 | for (S32 i = 0; i < ranges; i++) | ||
2065 | { | ||
2066 | const TextRange &range = text_range_array->fRange[i]; | ||
2067 | if (range.fStart > last_bytes) | ||
2068 | { | ||
2069 | const S32 length_utf16 = (range.fStart - last_bytes) / sizeof(U16); | ||
2070 | const S32 length_utf32 = wstring_wstring_length_from_utf16_length(preedit_string, last_utf32, length_utf16); | ||
2071 | preedit_segment_lengths.push_back(length_utf32); | ||
2072 | preedit_standouts.push_back(FALSE); | ||
2073 | last_utf32 += length_utf32; | ||
2074 | } | ||
2075 | if (range.fEnd > range.fStart) | ||
2076 | { | ||
2077 | const S32 length_utf16 = (range.fEnd - range.fStart) / sizeof(U16); | ||
2078 | const S32 length_utf32 = wstring_wstring_length_from_utf16_length(preedit_string, last_utf32, length_utf16); | ||
2079 | preedit_segment_lengths.push_back(length_utf32); | ||
2080 | preedit_standouts.push_back( | ||
2081 | kTSMHiliteSelectedRawText == range.fHiliteStyle | ||
2082 | || kTSMHiliteSelectedConvertedText == range.fHiliteStyle | ||
2083 | || kTSMHiliteSelectedText == range.fHiliteStyle); | ||
2084 | last_utf32 += length_utf32; | ||
2085 | } | ||
2086 | if (kTSMHiliteCaretPosition == range.fHiliteStyle) | ||
2087 | { | ||
2088 | caret_position = last_utf32; | ||
2089 | } | ||
2090 | last_bytes = range.fEnd; | ||
2091 | } | ||
2092 | if (preedit_string.length() > last_utf32) | ||
2093 | { | ||
2094 | preedit_segment_lengths.push_back(preedit_string.length() - last_utf32); | ||
2095 | preedit_standouts.push_back(FALSE); | ||
2096 | } | ||
2097 | |||
2098 | delete[] (char *) text_range_array; | ||
2099 | } | ||
2100 | |||
2101 | // Handle preedit string. | ||
2102 | if (preedit_string.length() > 0) | ||
2103 | { | ||
2104 | if (preedit_segment_lengths.size() == 0) | ||
2105 | { | ||
2106 | preedit_segment_lengths.push_back(preedit_string.length()); | ||
2107 | preedit_standouts.push_back(FALSE); | ||
2108 | } | ||
2109 | mPreeditor->updatePreedit(preedit_string, preedit_segment_lengths, preedit_standouts, caret_position); | ||
2110 | } | ||
2111 | |||
2112 | result = noErr; | ||
2113 | } | ||
2114 | } | ||
2115 | break; | ||
2116 | |||
1952 | case kEventTextInputUnicodeForKeyEvent: | 2117 | case kEventTextInputUnicodeForKeyEvent: |
1953 | { | 2118 | { |
1954 | UInt32 modifiers = 0; | 2119 | UInt32 modifiers = 0; |
@@ -2021,6 +2186,63 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e | |||
2021 | result = err; | 2186 | result = err; |
2022 | } | 2187 | } |
2023 | break; | 2188 | break; |
2189 | |||
2190 | case kEventTextInputOffsetToPos: | ||
2191 | { | ||
2192 | EventParamType param_type; | ||
2193 | long offset; | ||
2194 | if (mPreeditor | ||
2195 | && GetEventParameter(event, kEventParamTextInputSendTextOffset, typeLongInteger, | ||
2196 | ¶m_type, sizeof(offset), NULL, &offset) == noErr | ||
2197 | && typeLongInteger == param_type) | ||
2198 | { | ||
2199 | S32 preedit, preedit_length; | ||
2200 | mPreeditor->getPreeditRange(&preedit, &preedit_length); | ||
2201 | const LLWString & text = mPreeditor->getWText(); | ||
2202 | |||
2203 | LLCoordGL caret_coord; | ||
2204 | LLRect preedit_bounds; | ||
2205 | if (0 <= offset | ||
2206 | && mPreeditor->getPreeditLocation(wstring_wstring_length_from_utf16_length(text, preedit, offset / sizeof(U16)), | ||
2207 | &caret_coord, &preedit_bounds, NULL)) | ||
2208 | { | ||
2209 | LLCoordGL caret_base_coord(caret_coord.mX, preedit_bounds.mBottom); | ||
2210 | LLCoordScreen caret_base_coord_screen; | ||
2211 | convertCoords(caret_base_coord, &caret_base_coord_screen); | ||
2212 | Point qd_point; | ||
2213 | qd_point.h = caret_base_coord_screen.mX; | ||
2214 | qd_point.v = caret_base_coord_screen.mY; | ||
2215 | SetEventParameter(event, kEventParamTextInputReplyPoint, typeQDPoint, sizeof(qd_point), &qd_point); | ||
2216 | |||
2217 | short line_height = (short) preedit_bounds.getHeight(); | ||
2218 | SetEventParameter(event, kEventParamTextInputReplyLineHeight, typeShortInteger, sizeof(line_height), &line_height); | ||
2219 | |||
2220 | result = noErr; | ||
2221 | } | ||
2222 | else | ||
2223 | { | ||
2224 | result = errOffsetInvalid; | ||
2225 | } | ||
2226 | } | ||
2227 | } | ||
2228 | break; | ||
2229 | |||
2230 | case kEventTextInputGetSelectedText: | ||
2231 | { | ||
2232 | if (mPreeditor) | ||
2233 | { | ||
2234 | S32 selection, selection_length; | ||
2235 | mPreeditor->getSelectionRange(&selection, &selection_length); | ||
2236 | if (selection_length) | ||
2237 | { | ||
2238 | const LLWString text = mPreeditor->getWText().substr(selection, selection_length); | ||
2239 | const llutf16string text_utf16 = wstring_to_utf16str(text); | ||
2240 | result = SetEventParameter(event, kEventParamTextInputReplyText, typeUnicodeText, | ||
2241 | text_utf16.length() * sizeof(U16), text_utf16.c_str()); | ||
2242 | } | ||
2243 | } | ||
2244 | } | ||
2245 | break; | ||
2024 | } | 2246 | } |
2025 | } | 2247 | } |
2026 | break; | 2248 | break; |
@@ -2194,6 +2416,13 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e | |||
2194 | switch (evtKind) | 2416 | switch (evtKind) |
2195 | { | 2417 | { |
2196 | case kEventMouseDown: | 2418 | case kEventMouseDown: |
2419 | if (mLanguageTextInputAllowed) | ||
2420 | { | ||
2421 | // We need to interrupt before handling mouse events, | ||
2422 | // so that the fixed string from IM are delivered to | ||
2423 | // the currently focused UI component. | ||
2424 | interruptLanguageTextInput(); | ||
2425 | } | ||
2197 | switch(button) | 2426 | switch(button) |
2198 | { | 2427 | { |
2199 | case kEventMouseButtonPrimary: | 2428 | case kEventMouseButtonPrimary: |
@@ -2287,6 +2516,10 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e | |||
2287 | mCallbacks->handleFocus(this); | 2516 | mCallbacks->handleFocus(this); |
2288 | break; | 2517 | break; |
2289 | case kEventWindowDeactivated: | 2518 | case kEventWindowDeactivated: |
2519 | if (mTSMDocument) | ||
2520 | { | ||
2521 | DeactivateTSMDocument(mTSMDocument); | ||
2522 | } | ||
2290 | mCallbacks->handleFocusLost(this); | 2523 | mCallbacks->handleFocusLost(this); |
2291 | break; | 2524 | break; |
2292 | case kEventWindowBoundsChanging: | 2525 | case kEventWindowBoundsChanging: |
@@ -2359,6 +2592,109 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e | |||
2359 | // BringToFront(mWindow); | 2592 | // BringToFront(mWindow); |
2360 | // result = noErr; | 2593 | // result = noErr; |
2361 | break; | 2594 | break; |
2595 | |||
2596 | } | ||
2597 | break; | ||
2598 | |||
2599 | case kEventClassTSMDocumentAccess: | ||
2600 | if (mPreeditor) | ||
2601 | { | ||
2602 | switch(evtKind) | ||
2603 | { | ||
2604 | |||
2605 | case kEventTSMDocumentAccessGetLength: | ||
2606 | { | ||
2607 | // Return the number of UTF-16 units in the text, excluding those for preedit. | ||
2608 | |||
2609 | S32 preedit, preedit_length; | ||
2610 | mPreeditor->getPreeditRange(&preedit, &preedit_length); | ||
2611 | const LLWString & text = mPreeditor->getWText(); | ||
2612 | const CFIndex length = wstring_utf16_length(text, 0, preedit) | ||
2613 | + wstring_utf16_length(text, preedit + preedit_length, text.length()); | ||
2614 | result = SetEventParameter(event, kEventParamTSMDocAccessCharacterCount, typeCFIndex, sizeof(length), &length); | ||
2615 | } | ||
2616 | break; | ||
2617 | |||
2618 | case kEventTSMDocumentAccessGetSelectedRange: | ||
2619 | { | ||
2620 | // Return the selected range, excluding preedit. | ||
2621 | // In our preeditor, preedit and selection are exclusive, so, | ||
2622 | // when it has a preedit, there is no selection and the | ||
2623 | // insertion point is on the preedit that corrupses into the | ||
2624 | // beginning of the preedit when the preedit was removed. | ||
2625 | |||
2626 | S32 preedit, preedit_length; | ||
2627 | mPreeditor->getPreeditRange(&preedit, &preedit_length); | ||
2628 | const LLWString & text = mPreeditor->getWText(); | ||
2629 | |||
2630 | CFRange range; | ||
2631 | if (preedit_length) | ||
2632 | { | ||
2633 | range.location = wstring_utf16_length(text, 0, preedit); | ||
2634 | range.length = 0; | ||
2635 | } | ||
2636 | else | ||
2637 | { | ||
2638 | S32 selection, selection_length; | ||
2639 | mPreeditor->getSelectionRange(&selection, &selection_length); | ||
2640 | range.location = wstring_utf16_length(text, 0, selection); | ||
2641 | range.length = wstring_utf16_length(text, selection, selection_length); | ||
2642 | } | ||
2643 | |||
2644 | result = SetEventParameter(event, kEventParamTSMDocAccessReplyCharacterRange, typeCFRange, sizeof(range), &range); | ||
2645 | } | ||
2646 | break; | ||
2647 | |||
2648 | case kEventTSMDocumentAccessGetCharacters: | ||
2649 | { | ||
2650 | UniChar *target_pointer; | ||
2651 | CFRange range; | ||
2652 | EventParamType param_type; | ||
2653 | if ((result = GetEventParameter(event, kEventParamTSMDocAccessSendCharacterRange, | ||
2654 | typeCFRange, ¶m_type, sizeof(range), NULL, &range)) == noErr | ||
2655 | && typeCFRange == param_type | ||
2656 | && (result = GetEventParameter(event, kEventParamTSMDocAccessSendCharactersPtr, | ||
2657 | typePtr, ¶m_type, sizeof(target_pointer), NULL, &target_pointer)) == noErr | ||
2658 | && typePtr == param_type) | ||
2659 | { | ||
2660 | S32 preedit, preedit_length; | ||
2661 | mPreeditor->getPreeditRange(&preedit, &preedit_length); | ||
2662 | const LLWString & text = mPreeditor->getWText(); | ||
2663 | |||
2664 | // The GetCharacters event of TSMDA has a fundamental flaw; | ||
2665 | // An input method need to decide the starting offset and length | ||
2666 | // *before* it actually see the contents, so it is impossible | ||
2667 | // to guarantee the character-aligned access. The event reply | ||
2668 | // has no way to indicate a condition something like "Request | ||
2669 | // was not fulfilled due to unaligned access. Please retry." | ||
2670 | // Any error sent back to the input method stops use of TSMDA | ||
2671 | // entirely during the session... | ||
2672 | // We need to simulate very strictly the behaviour as if the | ||
2673 | // underlying *text engine* holds the contents in UTF-16. | ||
2674 | // I guess this is the reason why Apple repeats saying "all | ||
2675 | // text handling application should use UTF-16." They are | ||
2676 | // trying to _fix_ the flaw by changing the appliations... | ||
2677 | // ... or, domination of UTF-16 in the industry may be a part | ||
2678 | // of the company vision, and Apple is trying to force third | ||
2679 | // party developers to obey their vision. Remember that use | ||
2680 | // of 16 bits per _a_character_ was one of the very fundamental | ||
2681 | // Unicode design policy on its early days (during late 80s) | ||
2682 | // and the original Unicode design was by two Apple employees... | ||
2683 | |||
2684 | const llutf16string text_utf16 | ||
2685 | = wstring_to_utf16str(text, preedit) | ||
2686 | + wstring_to_utf16str(text.substr(preedit + preedit_length)); | ||
2687 | |||
2688 | llassert_always(sizeof(U16) == sizeof(UniChar)); | ||
2689 | llassert(0 <= range.location && 0 <= range.length && range.location + range.length <= text_utf16.length()); | ||
2690 | memcpy(target_pointer, text_utf16.c_str() + range.location, range.length * sizeof(UniChar)); | ||
2691 | |||
2692 | // Note that result has already been set above. | ||
2693 | } | ||
2694 | } | ||
2695 | break; | ||
2696 | |||
2697 | } | ||
2362 | } | 2698 | } |
2363 | break; | 2699 | break; |
2364 | } | 2700 | } |
@@ -2862,46 +3198,6 @@ void spawn_web_browser(const char* escaped_url) | |||
2862 | } | 3198 | } |
2863 | } | 3199 | } |
2864 | 3200 | ||
2865 | void shell_open( const char* file_path ) | ||
2866 | { | ||
2867 | OSStatus result = noErr; | ||
2868 | |||
2869 | llinfos << "Opening " << file_path << llendl; | ||
2870 | CFURLRef urlRef = NULL; | ||
2871 | |||
2872 | CFStringRef stringRef = CFStringCreateWithCString(NULL, file_path, kCFStringEncodingUTF8); | ||
2873 | if (stringRef) | ||
2874 | { | ||
2875 | // This will succeed if the string is a full URL, including the http:// | ||
2876 | // Note that URLs specified this way need to be properly percent-escaped. | ||
2877 | urlRef = CFURLCreateWithString(NULL, stringRef, NULL); | ||
2878 | |||
2879 | if(urlRef == NULL) | ||
2880 | { | ||
2881 | // This will succeed if the string is a full or partial posix path. | ||
2882 | // This will work even if the path contains characters that would need to be percent-escaped | ||
2883 | // in the URL (such as spaces). | ||
2884 | urlRef = CFURLCreateWithFileSystemPath(NULL, stringRef, kCFURLPOSIXPathStyle, false); | ||
2885 | } | ||
2886 | |||
2887 | CFRelease(stringRef); | ||
2888 | } | ||
2889 | |||
2890 | if (urlRef) | ||
2891 | { | ||
2892 | result = LSOpenCFURLRef(urlRef, NULL); | ||
2893 | |||
2894 | if (result != noErr) | ||
2895 | { | ||
2896 | llinfos << "Error " << result << " on open." << llendl; | ||
2897 | } | ||
2898 | CFRelease(urlRef); | ||
2899 | } | ||
2900 | else | ||
2901 | { | ||
2902 | llinfos << "Error: couldn't create URL." << llendl; | ||
2903 | } | ||
2904 | } | ||
2905 | 3201 | ||
2906 | BOOL LLWindowMacOSX::dialog_color_picker ( F32 *r, F32 *g, F32 *b) | 3202 | BOOL LLWindowMacOSX::dialog_color_picker ( F32 *r, F32 *g, F32 *b) |
2907 | { | 3203 | { |
@@ -2995,10 +3291,34 @@ static long getDictLong (CFDictionaryRef refDict, CFStringRef key) | |||
2995 | return int_value; // otherwise return the long value | 3291 | return int_value; // otherwise return the long value |
2996 | } | 3292 | } |
2997 | 3293 | ||
2998 | void LLWindowMacOSX::allowLanguageTextInput(BOOL b) | 3294 | void LLWindowMacOSX::allowLanguageTextInput(LLPreeditor *preeditor, BOOL b) |
2999 | { | 3295 | { |
3000 | ScriptLanguageRecord script_language; | 3296 | ScriptLanguageRecord script_language; |
3001 | 3297 | ||
3298 | if (preeditor != mPreeditor && !b) | ||
3299 | { | ||
3300 | // This condition may occur by a call to | ||
3301 | // setEnabled(BOOL) against LLTextEditor or LLLineEditor | ||
3302 | // when the control is not focused. | ||
3303 | // We need to silently ignore the case so that | ||
3304 | // the language input status of the focused control | ||
3305 | // is not disturbed. | ||
3306 | return; | ||
3307 | } | ||
3308 | |||
3309 | // Take care of old and new preeditors. | ||
3310 | if (preeditor != mPreeditor || !b) | ||
3311 | { | ||
3312 | // We need to interrupt before updating mPreeditor, | ||
3313 | // so that the fix string from input method goes to | ||
3314 | // the old preeditor. | ||
3315 | if (mLanguageTextInputAllowed) | ||
3316 | { | ||
3317 | interruptLanguageTextInput(); | ||
3318 | } | ||
3319 | mPreeditor = (b ? preeditor : NULL); | ||
3320 | } | ||
3321 | |||
3002 | if (b == mLanguageTextInputAllowed) | 3322 | if (b == mLanguageTextInputAllowed) |
3003 | { | 3323 | { |
3004 | return; | 3324 | return; |
@@ -3028,4 +3348,12 @@ void LLWindowMacOSX::allowLanguageTextInput(BOOL b) | |||
3028 | } | 3348 | } |
3029 | } | 3349 | } |
3030 | 3350 | ||
3351 | void LLWindowMacOSX::interruptLanguageTextInput() | ||
3352 | { | ||
3353 | if (mTSMDocument) | ||
3354 | { | ||
3355 | FixTSMDocument(mTSMDocument); | ||
3356 | } | ||
3357 | } | ||
3358 | |||
3031 | #endif // LL_DARWIN | 3359 | #endif // LL_DARWIN |
diff --git a/linden/indra/llwindow/llwindowmacosx.h b/linden/indra/llwindow/llwindowmacosx.h index b242433..80145b9 100644 --- a/linden/indra/llwindow/llwindowmacosx.h +++ b/linden/indra/llwindow/llwindowmacosx.h | |||
@@ -12,12 +12,12 @@ | |||
12 | * ("GPL"), unless you have obtained a separate licensing agreement | 12 | * ("GPL"), unless you have obtained a separate licensing agreement |
13 | * ("Other License"), formally executed by you and Linden Lab. Terms of | 13 | * ("Other License"), formally executed by you and Linden Lab. Terms of |
14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | 14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or |
15 | * online at http://secondlife.com/developers/opensource/gplv2 | 15 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 |
16 | * | 16 | * |
17 | * There are special exceptions to the terms and conditions of the GPL as | 17 | * There are special exceptions to the terms and conditions of the GPL as |
18 | * it is applied to this Source Code. View the full text of the exception | 18 | * it is applied to this Source Code. View the full text of the exception |
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 19 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
20 | * online at http://secondlife.com/developers/opensource/flossexception | 20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception |
21 | * | 21 | * |
22 | * By copying, modifying or distributing this software, you acknowledge | 22 | * By copying, modifying or distributing this software, you acknowledge |
23 | * that you have read and understood your obligations described above, | 23 | * that you have read and understood your obligations described above, |
@@ -111,8 +111,10 @@ public: | |||
111 | /*virtual*/ void *getPlatformWindow(); | 111 | /*virtual*/ void *getPlatformWindow(); |
112 | /*virtual*/ void bringToFront() {}; | 112 | /*virtual*/ void bringToFront() {}; |
113 | 113 | ||
114 | /*virtual*/ void allowLanguageTextInput(BOOL b); | 114 | /*virtual*/ void allowLanguageTextInput(LLPreeditor *preeditor, BOOL b); |
115 | 115 | /*virtual*/ void updateLanguageTextInputArea(const LLCoordGL& caret, const LLRect& bounds); | |
116 | /*virtual*/ void interruptLanguageTextInput(); | ||
117 | |||
116 | protected: | 118 | protected: |
117 | LLWindowMacOSX( | 119 | LLWindowMacOSX( |
118 | char *title, char *name, int x, int y, int width, int height, U32 flags, | 120 | char *title, char *name, int x, int y, int width, int height, U32 flags, |
@@ -193,6 +195,7 @@ protected: | |||
193 | BOOL mLanguageTextInputAllowed; | 195 | BOOL mLanguageTextInputAllowed; |
194 | ScriptCode mTSMScriptCode; | 196 | ScriptCode mTSMScriptCode; |
195 | LangCode mTSMLangCode; | 197 | LangCode mTSMLangCode; |
198 | LLPreeditor* mPreeditor; | ||
196 | 199 | ||
197 | friend class LLWindowManager; | 200 | friend class LLWindowManager; |
198 | }; | 201 | }; |
@@ -215,6 +218,5 @@ private: | |||
215 | S32 OSMessageBoxMacOSX(const char* text, const char* caption, U32 type); | 218 | S32 OSMessageBoxMacOSX(const char* text, const char* caption, U32 type); |
216 | 219 | ||
217 | void load_url_external(const char* url); | 220 | void load_url_external(const char* url); |
218 | void shell_open( const char* file_path ); | ||
219 | 221 | ||
220 | #endif //LL_LLWINDOWMACOSX_H | 222 | #endif //LL_LLWINDOWMACOSX_H |
diff --git a/linden/indra/llwindow/llwindowmesaheadless.cpp b/linden/indra/llwindow/llwindowmesaheadless.cpp index a7896d3..01b00af 100644 --- a/linden/indra/llwindow/llwindowmesaheadless.cpp +++ b/linden/indra/llwindow/llwindowmesaheadless.cpp | |||
@@ -12,12 +12,12 @@ | |||
12 | * ("GPL"), unless you have obtained a separate licensing agreement | 12 | * ("GPL"), unless you have obtained a separate licensing agreement |
13 | * ("Other License"), formally executed by you and Linden Lab. Terms of | 13 | * ("Other License"), formally executed by you and Linden Lab. Terms of |
14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | 14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or |
15 | * online at http://secondlife.com/developers/opensource/gplv2 | 15 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 |
16 | * | 16 | * |
17 | * There are special exceptions to the terms and conditions of the GPL as | 17 | * There are special exceptions to the terms and conditions of the GPL as |
18 | * it is applied to this Source Code. View the full text of the exception | 18 | * it is applied to this Source Code. View the full text of the exception |
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 19 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
20 | * online at http://secondlife.com/developers/opensource/flossexception | 20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception |
21 | * | 21 | * |
22 | * By copying, modifying or distributing this software, you acknowledge | 22 | * By copying, modifying or distributing this software, you acknowledge |
23 | * that you have read and understood your obligations described above, | 23 | * that you have read and understood your obligations described above, |
diff --git a/linden/indra/llwindow/llwindowmesaheadless.h b/linden/indra/llwindow/llwindowmesaheadless.h index 61107b4..29e5878 100644 --- a/linden/indra/llwindow/llwindowmesaheadless.h +++ b/linden/indra/llwindow/llwindowmesaheadless.h | |||
@@ -12,12 +12,12 @@ | |||
12 | * ("GPL"), unless you have obtained a separate licensing agreement | 12 | * ("GPL"), unless you have obtained a separate licensing agreement |
13 | * ("Other License"), formally executed by you and Linden Lab. Terms of | 13 | * ("Other License"), formally executed by you and Linden Lab. Terms of |
14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | 14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or |
15 | * online at http://secondlife.com/developers/opensource/gplv2 | 15 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 |
16 | * | 16 | * |
17 | * There are special exceptions to the terms and conditions of the GPL as | 17 | * There are special exceptions to the terms and conditions of the GPL as |
18 | * it is applied to this Source Code. View the full text of the exception | 18 | * it is applied to this Source Code. View the full text of the exception |
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 19 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
20 | * online at http://secondlife.com/developers/opensource/flossexception | 20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception |
21 | * | 21 | * |
22 | * By copying, modifying or distributing this software, you acknowledge | 22 | * By copying, modifying or distributing this software, you acknowledge |
23 | * that you have read and understood your obligations described above, | 23 | * that you have read and understood your obligations described above, |
diff --git a/linden/indra/llwindow/llwindowsdl.cpp b/linden/indra/llwindow/llwindowsdl.cpp index 2fc1007..7d42bce 100644 --- a/linden/indra/llwindow/llwindowsdl.cpp +++ b/linden/indra/llwindow/llwindowsdl.cpp | |||
@@ -12,12 +12,12 @@ | |||
12 | * ("GPL"), unless you have obtained a separate licensing agreement | 12 | * ("GPL"), unless you have obtained a separate licensing agreement |
13 | * ("Other License"), formally executed by you and Linden Lab. Terms of | 13 | * ("Other License"), formally executed by you and Linden Lab. Terms of |
14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | 14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or |
15 | * online at http://secondlife.com/developers/opensource/gplv2 | 15 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 |
16 | * | 16 | * |
17 | * There are special exceptions to the terms and conditions of the GPL as | 17 | * There are special exceptions to the terms and conditions of the GPL as |
18 | * it is applied to this Source Code. View the full text of the exception | 18 | * it is applied to this Source Code. View the full text of the exception |
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 19 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
20 | * online at http://secondlife.com/developers/opensource/flossexception | 20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception |
21 | * | 21 | * |
22 | * By copying, modifying or distributing this software, you acknowledge | 22 | * By copying, modifying or distributing this software, you acknowledge |
23 | * that you have read and understood your obligations described above, | 23 | * that you have read and understood your obligations described above, |
@@ -2230,11 +2230,11 @@ static SDL_Cursor *makeSDLCursorFromBMP(const char *filename, int hotx, int hoty | |||
2230 | bmpsurface->w, | 2230 | bmpsurface->w, |
2231 | bmpsurface->h, | 2231 | bmpsurface->h, |
2232 | 32, | 2232 | 32, |
2233 | 0xFFU, | 2233 | SDL_SwapLE32(0xFFU), |
2234 | 0xFF00U, | 2234 | SDL_SwapLE32(0xFF00U), |
2235 | 0xFF0000U, | 2235 | SDL_SwapLE32(0xFF0000U), |
2236 | 0xFF000000U); | 2236 | SDL_SwapLE32(0xFF000000U)); |
2237 | SDL_FillRect(cursurface, NULL, 0x00000000U); | 2237 | SDL_FillRect(cursurface, NULL, SDL_SwapLE32(0x00000000U)); |
2238 | 2238 | ||
2239 | // Blit the cursor pixel data onto a 32-bit RGBA surface so we | 2239 | // Blit the cursor pixel data onto a 32-bit RGBA surface so we |
2240 | // only have to cope with processing one type of pixel format. | 2240 | // only have to cope with processing one type of pixel format. |
@@ -2253,13 +2253,13 @@ static SDL_Cursor *makeSDLCursorFromBMP(const char *filename, int hotx, int hoty | |||
2253 | // is inferred by color-keying against 200,200,200 | 2253 | // is inferred by color-keying against 200,200,200 |
2254 | for (i=0; i<cursurface->h; ++i) { | 2254 | for (i=0; i<cursurface->h; ++i) { |
2255 | for (j=0; j<cursurface->w; ++j) { | 2255 | for (j=0; j<cursurface->w; ++j) { |
2256 | unsigned char *pixelp = | 2256 | U8 *pixelp = |
2257 | ((unsigned char *)cursurface->pixels) | 2257 | ((U8*)cursurface->pixels) |
2258 | + cursurface->pitch * i | 2258 | + cursurface->pitch * i |
2259 | + j*cursurface->format->BytesPerPixel; | 2259 | + j*cursurface->format->BytesPerPixel; |
2260 | unsigned char srcred = pixelp[0]; | 2260 | U8 srcred = pixelp[0]; |
2261 | unsigned char srcgreen = pixelp[1]; | 2261 | U8 srcgreen = pixelp[1]; |
2262 | unsigned char srcblue = pixelp[2]; | 2262 | U8 srcblue = pixelp[2]; |
2263 | BOOL mask_bit = (srcred != 200) | 2263 | BOOL mask_bit = (srcred != 200) |
2264 | || (srcgreen != 200) | 2264 | || (srcgreen != 200) |
2265 | || (srcblue != 200); | 2265 | || (srcblue != 200); |
@@ -2741,11 +2741,6 @@ void spawn_web_browser(const char* escaped_url) | |||
2741 | llinfos << "spawn_web_browser returning." << llendl; | 2741 | llinfos << "spawn_web_browser returning." << llendl; |
2742 | } | 2742 | } |
2743 | 2743 | ||
2744 | void shell_open( const char* file_path ) | ||
2745 | { | ||
2746 | // *TODO: This function is deprecated and should probably go away. | ||
2747 | llwarns << "Deprecated shell_open(): " << file_path << llendl; | ||
2748 | } | ||
2749 | 2744 | ||
2750 | void *LLWindowSDL::getPlatformWindow() | 2745 | void *LLWindowSDL::getPlatformWindow() |
2751 | { | 2746 | { |
diff --git a/linden/indra/llwindow/llwindowsdl.h b/linden/indra/llwindow/llwindowsdl.h index 8c70ef3..3d102b9 100644 --- a/linden/indra/llwindow/llwindowsdl.h +++ b/linden/indra/llwindow/llwindowsdl.h | |||
@@ -12,12 +12,12 @@ | |||
12 | * ("GPL"), unless you have obtained a separate licensing agreement | 12 | * ("GPL"), unless you have obtained a separate licensing agreement |
13 | * ("Other License"), formally executed by you and Linden Lab. Terms of | 13 | * ("Other License"), formally executed by you and Linden Lab. Terms of |
14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | 14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or |
15 | * online at http://secondlife.com/developers/opensource/gplv2 | 15 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 |
16 | * | 16 | * |
17 | * There are special exceptions to the terms and conditions of the GPL as | 17 | * There are special exceptions to the terms and conditions of the GPL as |
18 | * it is applied to this Source Code. View the full text of the exception | 18 | * it is applied to this Source Code. View the full text of the exception |
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 19 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
20 | * online at http://secondlife.com/developers/opensource/flossexception | 20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception |
21 | * | 21 | * |
22 | * By copying, modifying or distributing this software, you acknowledge | 22 | * By copying, modifying or distributing this software, you acknowledge |
23 | * that you have read and understood your obligations described above, | 23 | * that you have read and understood your obligations described above, |
@@ -37,6 +37,7 @@ | |||
37 | #include "llwindow.h" | 37 | #include "llwindow.h" |
38 | 38 | ||
39 | #include "SDL/SDL.h" | 39 | #include "SDL/SDL.h" |
40 | #include "SDL/SDL_endian.h" | ||
40 | 41 | ||
41 | #if LL_X11 | 42 | #if LL_X11 |
42 | // get X11-specific headers for use in low-level stuff like copy-and-paste support | 43 | // get X11-specific headers for use in low-level stuff like copy-and-paste support |
@@ -222,7 +223,6 @@ public: | |||
222 | S32 OSMessageBoxSDL(const char* text, const char* caption, U32 type); | 223 | S32 OSMessageBoxSDL(const char* text, const char* caption, U32 type); |
223 | 224 | ||
224 | void load_url_external(const char* url); | 225 | void load_url_external(const char* url); |
225 | void shell_open( const char* file_path ); | ||
226 | 226 | ||
227 | #if LL_GTK | 227 | #if LL_GTK |
228 | // Lazily initialize and check the runtime GTK version for goodness. | 228 | // Lazily initialize and check the runtime GTK version for goodness. |
diff --git a/linden/indra/llwindow/llwindowsolaris.cpp b/linden/indra/llwindow/llwindowsolaris.cpp index c670ecc..54a77ae 100644 --- a/linden/indra/llwindow/llwindowsolaris.cpp +++ b/linden/indra/llwindow/llwindowsolaris.cpp | |||
@@ -12,12 +12,12 @@ | |||
12 | * ("GPL"), unless you have obtained a separate licensing agreement | 12 | * ("GPL"), unless you have obtained a separate licensing agreement |
13 | * ("Other License"), formally executed by you and Linden Lab. Terms of | 13 | * ("Other License"), formally executed by you and Linden Lab. Terms of |
14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | 14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or |
15 | * online at http://secondlife.com/developers/opensource/gplv2 | 15 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 |
16 | * | 16 | * |
17 | * There are special exceptions to the terms and conditions of the GPL as | 17 | * There are special exceptions to the terms and conditions of the GPL as |
18 | * it is applied to this Source Code. View the full text of the exception | 18 | * it is applied to this Source Code. View the full text of the exception |
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 19 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
20 | * online at http://secondlife.com/developers/opensource/flossexception | 20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception |
21 | * | 21 | * |
22 | * By copying, modifying or distributing this software, you acknowledge | 22 | * By copying, modifying or distributing this software, you acknowledge |
23 | * that you have read and understood your obligations described above, | 23 | * that you have read and understood your obligations described above, |
diff --git a/linden/indra/llwindow/llwindowsolaris.h b/linden/indra/llwindow/llwindowsolaris.h index 5b10560..7aeac58 100644 --- a/linden/indra/llwindow/llwindowsolaris.h +++ b/linden/indra/llwindow/llwindowsolaris.h | |||
@@ -12,12 +12,12 @@ | |||
12 | * ("GPL"), unless you have obtained a separate licensing agreement | 12 | * ("GPL"), unless you have obtained a separate licensing agreement |
13 | * ("Other License"), formally executed by you and Linden Lab. Terms of | 13 | * ("Other License"), formally executed by you and Linden Lab. Terms of |
14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | 14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or |
15 | * online at http://secondlife.com/developers/opensource/gplv2 | 15 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 |
16 | * | 16 | * |
17 | * There are special exceptions to the terms and conditions of the GPL as | 17 | * There are special exceptions to the terms and conditions of the GPL as |
18 | * it is applied to this Source Code. View the full text of the exception | 18 | * it is applied to this Source Code. View the full text of the exception |
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 19 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
20 | * online at http://secondlife.com/developers/opensource/flossexception | 20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception |
21 | * | 21 | * |
22 | * By copying, modifying or distributing this software, you acknowledge | 22 | * By copying, modifying or distributing this software, you acknowledge |
23 | * that you have read and understood your obligations described above, | 23 | * that you have read and understood your obligations described above, |
diff --git a/linden/indra/llwindow/llwindowwin32.cpp b/linden/indra/llwindow/llwindowwin32.cpp index 2fcb36c..171cc09 100644 --- a/linden/indra/llwindow/llwindowwin32.cpp +++ b/linden/indra/llwindow/llwindowwin32.cpp | |||
@@ -12,12 +12,12 @@ | |||
12 | * ("GPL"), unless you have obtained a separate licensing agreement | 12 | * ("GPL"), unless you have obtained a separate licensing agreement |
13 | * ("Other License"), formally executed by you and Linden Lab. Terms of | 13 | * ("Other License"), formally executed by you and Linden Lab. Terms of |
14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | 14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or |
15 | * online at http://secondlife.com/developers/opensource/gplv2 | 15 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 |
16 | * | 16 | * |
17 | * There are special exceptions to the terms and conditions of the GPL as | 17 | * There are special exceptions to the terms and conditions of the GPL as |
18 | * it is applied to this Source Code. View the full text of the exception | 18 | * it is applied to this Source Code. View the full text of the exception |
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 19 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
20 | * online at http://secondlife.com/developers/opensource/flossexception | 20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception |
21 | * | 21 | * |
22 | * By copying, modifying or distributing this software, you acknowledge | 22 | * By copying, modifying or distributing this software, you acknowledge |
23 | * that you have read and understood your obligations described above, | 23 | * that you have read and understood your obligations described above, |
@@ -57,6 +57,8 @@ | |||
57 | 57 | ||
58 | #include "indra_constants.h" | 58 | #include "indra_constants.h" |
59 | 59 | ||
60 | #include "llpreeditor.h" | ||
61 | |||
60 | // culled from winuser.h | 62 | // culled from winuser.h |
61 | #ifndef WM_MOUSEWHEEL /* Added to be compatible with later SDK's */ | 63 | #ifndef WM_MOUSEWHEEL /* Added to be compatible with later SDK's */ |
62 | const S32 WM_MOUSEWHEEL = 0x020A; | 64 | const S32 WM_MOUSEWHEEL = 0x020A; |
@@ -82,7 +84,6 @@ LLW32MsgCallback gAsyncMsgCallback = NULL; | |||
82 | void show_window_creation_error(const char* title) | 84 | void show_window_creation_error(const char* title) |
83 | { | 85 | { |
84 | llwarns << title << llendl; | 86 | llwarns << title << llendl; |
85 | shell_open( "help/window_creation_error.html"); | ||
86 | } | 87 | } |
87 | 88 | ||
88 | //static | 89 | //static |
@@ -112,6 +113,7 @@ public: | |||
112 | public: | 113 | public: |
113 | // Wrappers for IMM API. | 114 | // Wrappers for IMM API. |
114 | static BOOL isIME(HKL hkl); | 115 | static BOOL isIME(HKL hkl); |
116 | static HWND getDefaultIMEWnd(HWND hwnd); | ||
115 | static HIMC getContext(HWND hwnd); | 117 | static HIMC getContext(HWND hwnd); |
116 | static BOOL releaseContext(HWND hwnd, HIMC himc); | 118 | static BOOL releaseContext(HWND hwnd, HIMC himc); |
117 | static BOOL getOpenStatus(HIMC himc); | 119 | static BOOL getOpenStatus(HIMC himc); |
@@ -120,6 +122,11 @@ public: | |||
120 | static BOOL setConversionStatus(HIMC himc, DWORD conversion, DWORD sentence); | 122 | static BOOL setConversionStatus(HIMC himc, DWORD conversion, DWORD sentence); |
121 | static BOOL getCompositionWindow(HIMC himc, LPCOMPOSITIONFORM form); | 123 | static BOOL getCompositionWindow(HIMC himc, LPCOMPOSITIONFORM form); |
122 | static BOOL setCompositionWindow(HIMC himc, LPCOMPOSITIONFORM form); | 124 | static BOOL setCompositionWindow(HIMC himc, LPCOMPOSITIONFORM form); |
125 | static LONG getCompositionString(HIMC himc, DWORD index, LPVOID data, DWORD length); | ||
126 | static BOOL setCompositionString(HIMC himc, DWORD index, LPVOID pComp, DWORD compLength, LPVOID pRead, DWORD readLength); | ||
127 | static BOOL setCompositionFont(HIMC himc, LPLOGFONTW logfont); | ||
128 | static BOOL setCandidateWindow(HIMC himc, LPCANDIDATEFORM candidate_form); | ||
129 | static BOOL notifyIME(HIMC himc, DWORD action, DWORD index, DWORD value); | ||
123 | 130 | ||
124 | private: | 131 | private: |
125 | LLWinImm(); | 132 | LLWinImm(); |
@@ -128,6 +135,7 @@ private: | |||
128 | private: | 135 | private: |
129 | // Pointers to IMM API. | 136 | // Pointers to IMM API. |
130 | BOOL (WINAPI *mImmIsIME)(HKL); | 137 | BOOL (WINAPI *mImmIsIME)(HKL); |
138 | HWND (WINAPI *mImmGetDefaultIMEWnd)(HWND); | ||
131 | HIMC (WINAPI *mImmGetContext)(HWND); | 139 | HIMC (WINAPI *mImmGetContext)(HWND); |
132 | BOOL (WINAPI *mImmReleaseContext)(HWND, HIMC); | 140 | BOOL (WINAPI *mImmReleaseContext)(HWND, HIMC); |
133 | BOOL (WINAPI *mImmGetOpenStatus)(HIMC); | 141 | BOOL (WINAPI *mImmGetOpenStatus)(HIMC); |
@@ -136,6 +144,11 @@ private: | |||
136 | BOOL (WINAPI *mImmSetConversionStatus)(HIMC, DWORD, DWORD); | 144 | BOOL (WINAPI *mImmSetConversionStatus)(HIMC, DWORD, DWORD); |
137 | BOOL (WINAPI *mImmGetCompostitionWindow)(HIMC, LPCOMPOSITIONFORM); | 145 | BOOL (WINAPI *mImmGetCompostitionWindow)(HIMC, LPCOMPOSITIONFORM); |
138 | BOOL (WINAPI *mImmSetCompostitionWindow)(HIMC, LPCOMPOSITIONFORM); | 146 | BOOL (WINAPI *mImmSetCompostitionWindow)(HIMC, LPCOMPOSITIONFORM); |
147 | LONG (WINAPI *mImmGetCompositionString)(HIMC, DWORD, LPVOID, DWORD); | ||
148 | BOOL (WINAPI *mImmSetCompositionString)(HIMC, DWORD, LPVOID, DWORD, LPVOID, DWORD); | ||
149 | BOOL (WINAPI *mImmSetCompositionFont)(HIMC, LPLOGFONTW); | ||
150 | BOOL (WINAPI *mImmSetCandidateWindow)(HIMC, LPCANDIDATEFORM); | ||
151 | BOOL (WINAPI *mImmNotifyIME)(HIMC, DWORD, DWORD, DWORD); | ||
139 | 152 | ||
140 | private: | 153 | private: |
141 | HMODULE mHImmDll; | 154 | HMODULE mHImmDll; |
@@ -155,6 +168,7 @@ LLWinImm::LLWinImm() : mHImmDll(NULL) | |||
155 | if (mHImmDll != NULL) | 168 | if (mHImmDll != NULL) |
156 | { | 169 | { |
157 | mImmIsIME = (BOOL (WINAPI *)(HKL)) GetProcAddress(mHImmDll, "ImmIsIME"); | 170 | mImmIsIME = (BOOL (WINAPI *)(HKL)) GetProcAddress(mHImmDll, "ImmIsIME"); |
171 | mImmGetDefaultIMEWnd = (HWND (WINAPI *)(HWND)) GetProcAddress(mHImmDll, "ImmGetDefaultIMEWnd"); | ||
158 | mImmGetContext = (HIMC (WINAPI *)(HWND)) GetProcAddress(mHImmDll, "ImmGetContext"); | 172 | mImmGetContext = (HIMC (WINAPI *)(HWND)) GetProcAddress(mHImmDll, "ImmGetContext"); |
159 | mImmReleaseContext = (BOOL (WINAPI *)(HWND, HIMC)) GetProcAddress(mHImmDll, "ImmReleaseContext"); | 173 | mImmReleaseContext = (BOOL (WINAPI *)(HWND, HIMC)) GetProcAddress(mHImmDll, "ImmReleaseContext"); |
160 | mImmGetOpenStatus = (BOOL (WINAPI *)(HIMC)) GetProcAddress(mHImmDll, "ImmGetOpenStatus"); | 174 | mImmGetOpenStatus = (BOOL (WINAPI *)(HIMC)) GetProcAddress(mHImmDll, "ImmGetOpenStatus"); |
@@ -163,8 +177,14 @@ LLWinImm::LLWinImm() : mHImmDll(NULL) | |||
163 | mImmSetConversionStatus = (BOOL (WINAPI *)(HIMC, DWORD, DWORD)) GetProcAddress(mHImmDll, "ImmSetConversionStatus"); | 177 | mImmSetConversionStatus = (BOOL (WINAPI *)(HIMC, DWORD, DWORD)) GetProcAddress(mHImmDll, "ImmSetConversionStatus"); |
164 | mImmGetCompostitionWindow = (BOOL (WINAPI *)(HIMC, LPCOMPOSITIONFORM)) GetProcAddress(mHImmDll, "ImmGetCompositionWindow"); | 178 | mImmGetCompostitionWindow = (BOOL (WINAPI *)(HIMC, LPCOMPOSITIONFORM)) GetProcAddress(mHImmDll, "ImmGetCompositionWindow"); |
165 | mImmSetCompostitionWindow = (BOOL (WINAPI *)(HIMC, LPCOMPOSITIONFORM)) GetProcAddress(mHImmDll, "ImmSetCompositionWindow"); | 179 | mImmSetCompostitionWindow = (BOOL (WINAPI *)(HIMC, LPCOMPOSITIONFORM)) GetProcAddress(mHImmDll, "ImmSetCompositionWindow"); |
180 | mImmGetCompositionString= (LONG (WINAPI *)(HIMC, DWORD, LPVOID, DWORD)) GetProcAddress(mHImmDll, "ImmGetCompositionStringW"); | ||
181 | mImmSetCompositionString= (BOOL (WINAPI *)(HIMC, DWORD, LPVOID, DWORD, LPVOID, DWORD)) GetProcAddress(mHImmDll, "ImmSetCompositionStringW"); | ||
182 | mImmSetCompositionFont = (BOOL (WINAPI *)(HIMC, LPLOGFONTW)) GetProcAddress(mHImmDll, "ImmSetCompositionFontW"); | ||
183 | mImmSetCandidateWindow = (BOOL (WINAPI *)(HIMC, LPCANDIDATEFORM)) GetProcAddress(mHImmDll, "ImmSetCandidateWindow"); | ||
184 | mImmNotifyIME = (BOOL (WINAPI *)(HIMC, DWORD, DWORD, DWORD)) GetProcAddress(mHImmDll, "ImmNotifyIME"); | ||
166 | 185 | ||
167 | if (mImmIsIME == NULL || | 186 | if (mImmIsIME == NULL || |
187 | mImmGetDefaultIMEWnd == NULL || | ||
168 | mImmGetContext == NULL || | 188 | mImmGetContext == NULL || |
169 | mImmReleaseContext == NULL || | 189 | mImmReleaseContext == NULL || |
170 | mImmGetOpenStatus == NULL || | 190 | mImmGetOpenStatus == NULL || |
@@ -172,7 +192,12 @@ LLWinImm::LLWinImm() : mHImmDll(NULL) | |||
172 | mImmGetConversionStatus == NULL || | 192 | mImmGetConversionStatus == NULL || |
173 | mImmSetConversionStatus == NULL || | 193 | mImmSetConversionStatus == NULL || |
174 | mImmGetCompostitionWindow == NULL || | 194 | mImmGetCompostitionWindow == NULL || |
175 | mImmSetCompostitionWindow == NULL) | 195 | mImmSetCompostitionWindow == NULL || |
196 | mImmGetCompositionString == NULL || | ||
197 | mImmSetCompositionString == NULL || | ||
198 | mImmSetCompositionFont == NULL || | ||
199 | mImmSetCandidateWindow == NULL || | ||
200 | mImmNotifyIME == NULL) | ||
176 | { | 201 | { |
177 | // If any of the above API entires are not found, we can't use IMM API. | 202 | // If any of the above API entires are not found, we can't use IMM API. |
178 | // So, turn off the IMM support. We should log some warning message in | 203 | // So, turn off the IMM support. We should log some warning message in |
@@ -186,6 +211,7 @@ LLWinImm::LLWinImm() : mHImmDll(NULL) | |||
186 | 211 | ||
187 | // If we unload the library, make sure all the function pointers are cleared | 212 | // If we unload the library, make sure all the function pointers are cleared |
188 | mImmIsIME = NULL; | 213 | mImmIsIME = NULL; |
214 | mImmGetDefaultIMEWnd = NULL; | ||
189 | mImmGetContext = NULL; | 215 | mImmGetContext = NULL; |
190 | mImmReleaseContext = NULL; | 216 | mImmReleaseContext = NULL; |
191 | mImmGetOpenStatus = NULL; | 217 | mImmGetOpenStatus = NULL; |
@@ -194,6 +220,11 @@ LLWinImm::LLWinImm() : mHImmDll(NULL) | |||
194 | mImmSetConversionStatus = NULL; | 220 | mImmSetConversionStatus = NULL; |
195 | mImmGetCompostitionWindow = NULL; | 221 | mImmGetCompostitionWindow = NULL; |
196 | mImmSetCompostitionWindow = NULL; | 222 | mImmSetCompostitionWindow = NULL; |
223 | mImmGetCompositionString = NULL; | ||
224 | mImmSetCompositionString = NULL; | ||
225 | mImmSetCompositionFont = NULL; | ||
226 | mImmSetCandidateWindow = NULL; | ||
227 | mImmNotifyIME = NULL; | ||
197 | } | 228 | } |
198 | } | 229 | } |
199 | } | 230 | } |
@@ -272,6 +303,50 @@ BOOL LLWinImm::setCompositionWindow(HIMC himc, LPCOMPOSITIONFORM form) | |||
272 | } | 303 | } |
273 | 304 | ||
274 | 305 | ||
306 | // static | ||
307 | LONG LLWinImm::getCompositionString(HIMC himc, DWORD index, LPVOID data, DWORD length) | ||
308 | { | ||
309 | if ( sTheInstance.mImmGetCompositionString ) | ||
310 | return sTheInstance.mImmGetCompositionString(himc, index, data, length); | ||
311 | return FALSE; | ||
312 | } | ||
313 | |||
314 | |||
315 | // static | ||
316 | BOOL LLWinImm::setCompositionString(HIMC himc, DWORD index, LPVOID pComp, DWORD compLength, LPVOID pRead, DWORD readLength) | ||
317 | { | ||
318 | if ( sTheInstance.mImmSetCompositionString ) | ||
319 | return sTheInstance.mImmSetCompositionString(himc, index, pComp, compLength, pRead, readLength); | ||
320 | return FALSE; | ||
321 | } | ||
322 | |||
323 | // static | ||
324 | BOOL LLWinImm::setCompositionFont(HIMC himc, LPLOGFONTW pFont) | ||
325 | { | ||
326 | if ( sTheInstance.mImmSetCompositionFont ) | ||
327 | return sTheInstance.mImmSetCompositionFont(himc, pFont); | ||
328 | return FALSE; | ||
329 | } | ||
330 | |||
331 | // static | ||
332 | BOOL LLWinImm::setCandidateWindow(HIMC himc, LPCANDIDATEFORM form) | ||
333 | { | ||
334 | if ( sTheInstance.mImmSetCandidateWindow ) | ||
335 | return sTheInstance.mImmSetCandidateWindow(himc, form); | ||
336 | return FALSE; | ||
337 | } | ||
338 | |||
339 | // static | ||
340 | BOOL LLWinImm::notifyIME(HIMC himc, DWORD action, DWORD index, DWORD value) | ||
341 | { | ||
342 | if ( sTheInstance.mImmNotifyIME ) | ||
343 | return sTheInstance.mImmNotifyIME(himc, action, index, value); | ||
344 | return FALSE; | ||
345 | } | ||
346 | |||
347 | |||
348 | |||
349 | |||
275 | // ---------------------------------------------------------------------------------------- | 350 | // ---------------------------------------------------------------------------------------- |
276 | LLWinImm::~LLWinImm() | 351 | LLWinImm::~LLWinImm() |
277 | { | 352 | { |
@@ -304,13 +379,14 @@ LLWindowWin32::LLWindowWin32(char *title, char *name, S32 x, S32 y, S32 width, | |||
304 | mNativeAspectRatio = 0.f; | 379 | mNativeAspectRatio = 0.f; |
305 | mMousePositionModified = FALSE; | 380 | mMousePositionModified = FALSE; |
306 | mInputProcessingPaused = FALSE; | 381 | mInputProcessingPaused = FALSE; |
382 | mPreeditor = NULL; | ||
307 | 383 | ||
308 | // Initialize the keyboard | 384 | // Initialize the keyboard |
309 | gKeyboard = new LLKeyboardWin32(); | 385 | gKeyboard = new LLKeyboardWin32(); |
310 | 386 | ||
311 | // Initialize (boot strap) the Language text input management, | 387 | // Initialize (boot strap) the Language text input management, |
312 | // based on the system's (user's) default settings. | 388 | // based on the system's (user's) default settings. |
313 | allowLanguageTextInput(FALSE); | 389 | allowLanguageTextInput(mPreeditor, FALSE); |
314 | 390 | ||
315 | GLuint pixel_format; | 391 | GLuint pixel_format; |
316 | WNDCLASS wc; | 392 | WNDCLASS wc; |
@@ -938,6 +1014,10 @@ LLWindowWin32::LLWindowWin32(char *title, char *name, S32 x, S32 y, S32 width, | |||
938 | initCursors(); | 1014 | initCursors(); |
939 | setCursor( UI_CURSOR_ARROW ); | 1015 | setCursor( UI_CURSOR_ARROW ); |
940 | 1016 | ||
1017 | // Initialize (boot strap) the Language text input management, | ||
1018 | // based on the system's (or user's) default settings. | ||
1019 | allowLanguageTextInput(NULL, FALSE); | ||
1020 | |||
941 | // Direct Input | 1021 | // Direct Input |
942 | HRESULT hr; | 1022 | HRESULT hr; |
943 | 1023 | ||
@@ -2035,6 +2115,11 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ | |||
2035 | 2115 | ||
2036 | BOOL minimized = BOOL(HIWORD(w_param)); | 2116 | BOOL minimized = BOOL(HIWORD(w_param)); |
2037 | 2117 | ||
2118 | if (!activating && LLWinImm::isAvailable() && window_imp->mPreeditor) | ||
2119 | { | ||
2120 | window_imp->interruptLanguageTextInput(); | ||
2121 | } | ||
2122 | |||
2038 | // JC - I'm not sure why, but if we don't report that we handled the | 2123 | // JC - I'm not sure why, but if we don't report that we handled the |
2039 | // WM_ACTIVATE message, the WM_ACTIVATEAPP messages don't work | 2124 | // WM_ACTIVATE message, the WM_ACTIVATEAPP messages don't work |
2040 | // properly when we run fullscreen. | 2125 | // properly when we run fullscreen. |
@@ -2127,6 +2212,47 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ | |||
2127 | // pass on to windows | 2212 | // pass on to windows |
2128 | break; | 2213 | break; |
2129 | 2214 | ||
2215 | case WM_IME_SETCONTEXT: | ||
2216 | if (LLWinImm::isAvailable() && window_imp->mPreeditor) | ||
2217 | { | ||
2218 | l_param &= ~ISC_SHOWUICOMPOSITIONWINDOW; | ||
2219 | // Invoke DefWinProc with the modified LPARAM. | ||
2220 | } | ||
2221 | break; | ||
2222 | |||
2223 | case WM_IME_STARTCOMPOSITION: | ||
2224 | if (LLWinImm::isAvailable() && window_imp->mPreeditor) | ||
2225 | { | ||
2226 | window_imp->handleStartCompositionMessage(); | ||
2227 | return 0; | ||
2228 | } | ||
2229 | break; | ||
2230 | |||
2231 | case WM_IME_ENDCOMPOSITION: | ||
2232 | if (LLWinImm::isAvailable() && window_imp->mPreeditor) | ||
2233 | { | ||
2234 | return 0; | ||
2235 | } | ||
2236 | break; | ||
2237 | |||
2238 | case WM_IME_COMPOSITION: | ||
2239 | if (LLWinImm::isAvailable() && window_imp->mPreeditor) | ||
2240 | { | ||
2241 | window_imp->handleCompositionMessage(l_param); | ||
2242 | return 0; | ||
2243 | } | ||
2244 | break; | ||
2245 | |||
2246 | case WM_IME_REQUEST: | ||
2247 | if (LLWinImm::isAvailable() && window_imp->mPreeditor) | ||
2248 | { | ||
2249 | LRESULT result = 0; | ||
2250 | if (window_imp->handleImeRequests(w_param, l_param, &result)) | ||
2251 | { | ||
2252 | return result; | ||
2253 | } | ||
2254 | } | ||
2255 | break; | ||
2130 | 2256 | ||
2131 | case WM_CHAR: | 2257 | case WM_CHAR: |
2132 | // Should really use WM_UNICHAR eventually, but it requires a specific Windows version and I need | 2258 | // Should really use WM_UNICHAR eventually, but it requires a specific Windows version and I need |
@@ -2154,6 +2280,11 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ | |||
2154 | 2280 | ||
2155 | case WM_LBUTTONDOWN: | 2281 | case WM_LBUTTONDOWN: |
2156 | { | 2282 | { |
2283 | if (LLWinImm::isAvailable() && window_imp->mPreeditor) | ||
2284 | { | ||
2285 | window_imp->interruptLanguageTextInput(); | ||
2286 | } | ||
2287 | |||
2157 | // Because we move the cursor position in the app, we need to query | 2288 | // Because we move the cursor position in the app, we need to query |
2158 | // to find out where the cursor at the time the event is handled. | 2289 | // to find out where the cursor at the time the event is handled. |
2159 | // If we don't do this, many clicks could get buffered up, and if the | 2290 | // If we don't do this, many clicks could get buffered up, and if the |
@@ -2236,6 +2367,11 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ | |||
2236 | case WM_RBUTTONDBLCLK: | 2367 | case WM_RBUTTONDBLCLK: |
2237 | case WM_RBUTTONDOWN: | 2368 | case WM_RBUTTONDOWN: |
2238 | { | 2369 | { |
2370 | if (LLWinImm::isAvailable() && window_imp->mPreeditor) | ||
2371 | { | ||
2372 | window_imp->interruptLanguageTextInput(); | ||
2373 | } | ||
2374 | |||
2239 | // Because we move the cursor position in tllviewerhe app, we need to query | 2375 | // Because we move the cursor position in tllviewerhe app, we need to query |
2240 | // to find out where the cursor at the time the event is handled. | 2376 | // to find out where the cursor at the time the event is handled. |
2241 | // If we don't do this, many clicks could get buffered up, and if the | 2377 | // If we don't do this, many clicks could get buffered up, and if the |
@@ -2287,6 +2423,11 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ | |||
2287 | case WM_MBUTTONDOWN: | 2423 | case WM_MBUTTONDOWN: |
2288 | // case WM_MBUTTONDBLCLK: | 2424 | // case WM_MBUTTONDBLCLK: |
2289 | { | 2425 | { |
2426 | if (LLWinImm::isAvailable() && window_imp->mPreeditor) | ||
2427 | { | ||
2428 | window_imp->interruptLanguageTextInput(); | ||
2429 | } | ||
2430 | |||
2290 | // Because we move the cursor position in tllviewerhe app, we need to query | 2431 | // Because we move the cursor position in tllviewerhe app, we need to query |
2291 | // to find out where the cursor at the time the event is handled. | 2432 | // to find out where the cursor at the time the event is handled. |
2292 | // If we don't do this, many clicks could get buffered up, and if the | 2433 | // If we don't do this, many clicks could get buffered up, and if the |
@@ -3256,24 +3397,6 @@ void spawn_web_browser(const char* escaped_url ) | |||
3256 | } | 3397 | } |
3257 | } | 3398 | } |
3258 | 3399 | ||
3259 | void shell_open( const char* file_path ) | ||
3260 | { | ||
3261 | llinfos << "Opening " << file_path << llendl; | ||
3262 | |||
3263 | WCHAR wstr[1024]; | ||
3264 | mbstowcs(wstr, file_path, 1024); | ||
3265 | |||
3266 | HWND our_window = NULL; | ||
3267 | int retval = (int) ShellExecute(our_window, L"open", wstr, NULL, NULL, SW_SHOWNORMAL); /* Flawfinder: ignore */ | ||
3268 | if (retval > 32) | ||
3269 | { | ||
3270 | llinfos << "ShellExecute success with " << retval << llendl; | ||
3271 | } | ||
3272 | else | ||
3273 | { | ||
3274 | llinfos << "ShellExecute failure with " << retval << llendl; | ||
3275 | } | ||
3276 | } | ||
3277 | 3400 | ||
3278 | BOOL LLWindowWin32::dialog_color_picker ( F32 *r, F32 *g, F32 *b ) | 3401 | BOOL LLWindowWin32::dialog_color_picker ( F32 *r, F32 *g, F32 *b ) |
3279 | { | 3402 | { |
@@ -3324,15 +3447,37 @@ void LLWindowWin32::focusClient() | |||
3324 | SetFocus ( mWindowHandle ); | 3447 | SetFocus ( mWindowHandle ); |
3325 | } | 3448 | } |
3326 | 3449 | ||
3327 | void LLWindowWin32::allowLanguageTextInput(BOOL b) | 3450 | void LLWindowWin32::allowLanguageTextInput(LLPreeditor *preeditor, BOOL b) |
3328 | { | 3451 | { |
3329 | if (b == sLanguageTextInputAllowed || !LLWinImm::isAvailable()) | 3452 | if (b == sLanguageTextInputAllowed || !LLWinImm::isAvailable()) |
3330 | { | 3453 | { |
3331 | return; | 3454 | return; |
3332 | } | 3455 | } |
3456 | |||
3457 | if (preeditor != mPreeditor && !b) | ||
3458 | { | ||
3459 | // This condition may occur with a call to | ||
3460 | // setEnabled(BOOL) from LLTextEditor or LLLineEditor | ||
3461 | // when the control is not focused. | ||
3462 | // We need to silently ignore the case so that | ||
3463 | // the language input status of the focused control | ||
3464 | // is not disturbed. | ||
3465 | return; | ||
3466 | } | ||
3467 | |||
3468 | // Take care of old and new preeditors. | ||
3469 | if (preeditor != mPreeditor || !b) | ||
3470 | { | ||
3471 | if (sLanguageTextInputAllowed) | ||
3472 | { | ||
3473 | interruptLanguageTextInput(); | ||
3474 | } | ||
3475 | mPreeditor = (b ? preeditor : NULL); | ||
3476 | } | ||
3477 | |||
3333 | sLanguageTextInputAllowed = b; | 3478 | sLanguageTextInputAllowed = b; |
3334 | 3479 | ||
3335 | if (b) | 3480 | if ( sLanguageTextInputAllowed ) |
3336 | { | 3481 | { |
3337 | // Allowing: Restore the previous IME status, so that the user has a feeling that the previous | 3482 | // Allowing: Restore the previous IME status, so that the user has a feeling that the previous |
3338 | // text input continues naturally. Be careful, however, the IME status is meaningful only during the user keeps | 3483 | // text input continues naturally. Be careful, however, the IME status is meaningful only during the user keeps |
@@ -3368,7 +3513,24 @@ void LLWindowWin32::allowLanguageTextInput(BOOL b) | |||
3368 | LLWinImm::releaseContext(mWindowHandle, himc); | 3513 | LLWinImm::releaseContext(mWindowHandle, himc); |
3369 | } | 3514 | } |
3370 | } | 3515 | } |
3516 | } | ||
3517 | |||
3518 | void LLWindowWin32::fillCandidateForm(const LLCoordGL& caret, const LLRect& bounds, | ||
3519 | CANDIDATEFORM *form) | ||
3520 | { | ||
3521 | LLCoordWindow caret_coord, top_left, bottom_right; | ||
3522 | convertCoords(caret, &caret_coord); | ||
3523 | convertCoords(LLCoordGL(bounds.mLeft, bounds.mTop), &top_left); | ||
3524 | convertCoords(LLCoordGL(bounds.mRight, bounds.mBottom), &bottom_right); | ||
3371 | 3525 | ||
3526 | memset(form, 0, sizeof(CANDIDATEFORM)); | ||
3527 | form->dwStyle = CFS_EXCLUDE; | ||
3528 | form->ptCurrentPos.x = caret_coord.mX; | ||
3529 | form->ptCurrentPos.y = caret_coord.mY; | ||
3530 | form->rcArea.left = top_left.mX; | ||
3531 | form->rcArea.top = top_left.mY; | ||
3532 | form->rcArea.right = bottom_right.mX; | ||
3533 | form->rcArea.bottom = bottom_right.mY; | ||
3372 | } | 3534 | } |
3373 | 3535 | ||
3374 | 3536 | ||
@@ -3400,4 +3562,455 @@ void LLWindowWin32::setLanguageTextInput( const LLCoordGL & position ) | |||
3400 | } | 3562 | } |
3401 | } | 3563 | } |
3402 | 3564 | ||
3565 | |||
3566 | void LLWindowWin32::fillCharPosition(const LLCoordGL& caret, const LLRect& bounds, const LLRect& control, | ||
3567 | IMECHARPOSITION *char_position) | ||
3568 | { | ||
3569 | LLCoordScreen caret_coord, top_left, bottom_right; | ||
3570 | convertCoords(caret, &caret_coord); | ||
3571 | convertCoords(LLCoordGL(bounds.mLeft, bounds.mTop), &top_left); | ||
3572 | convertCoords(LLCoordGL(bounds.mRight, bounds.mBottom), &bottom_right); | ||
3573 | |||
3574 | char_position->pt.x = caret_coord.mX; | ||
3575 | char_position->pt.y = top_left.mY; // Windows wants the coordinate of upper left corner of a character... | ||
3576 | char_position->cLineHeight = bottom_right.mY - top_left.mY; | ||
3577 | char_position->rcDocument.left = top_left.mX; | ||
3578 | char_position->rcDocument.top = top_left.mY; | ||
3579 | char_position->rcDocument.right = bottom_right.mX; | ||
3580 | char_position->rcDocument.bottom = bottom_right.mY; | ||
3581 | } | ||
3582 | |||
3583 | void LLWindowWin32::fillCompositionLogfont(LOGFONT *logfont) | ||
3584 | { | ||
3585 | // Our font is a list of FreeType recognized font files that may | ||
3586 | // not have a corresponding ones in Windows' fonts. Hence, we | ||
3587 | // can't simply tell Windows which font we are using. We will | ||
3588 | // notify a _standard_ font for a current input locale instead. | ||
3589 | // We use a hard-coded knowledge about the Windows' standard | ||
3590 | // configuration to do so... | ||
3591 | |||
3592 | memset(logfont, 0, sizeof(LOGFONT)); | ||
3593 | |||
3594 | const WORD lang_id = LOWORD(GetKeyboardLayout(0)); | ||
3595 | switch (PRIMARYLANGID(lang_id)) | ||
3596 | { | ||
3597 | case LANG_CHINESE: | ||
3598 | // We need to identify one of two Chinese fonts. | ||
3599 | switch (SUBLANGID(lang_id)) | ||
3600 | { | ||
3601 | case SUBLANG_CHINESE_SIMPLIFIED: | ||
3602 | case SUBLANG_CHINESE_SINGAPORE: | ||
3603 | logfont->lfCharSet = GB2312_CHARSET; | ||
3604 | lstrcpy(logfont->lfFaceName, TEXT("SimHei")); | ||
3605 | break; | ||
3606 | case SUBLANG_CHINESE_TRADITIONAL: | ||
3607 | case SUBLANG_CHINESE_HONGKONG: | ||
3608 | case SUBLANG_CHINESE_MACAU: | ||
3609 | default: | ||
3610 | logfont->lfCharSet = CHINESEBIG5_CHARSET; | ||
3611 | lstrcpy(logfont->lfFaceName, TEXT("MingLiU")); | ||
3612 | break; | ||
3613 | } | ||
3614 | break; | ||
3615 | case LANG_JAPANESE: | ||
3616 | logfont->lfCharSet = SHIFTJIS_CHARSET; | ||
3617 | lstrcpy(logfont->lfFaceName, TEXT("MS Gothic")); | ||
3618 | break; | ||
3619 | case LANG_KOREAN: | ||
3620 | logfont->lfCharSet = HANGUL_CHARSET; | ||
3621 | lstrcpy(logfont->lfFaceName, TEXT("Gulim")); | ||
3622 | break; | ||
3623 | default: | ||
3624 | logfont->lfCharSet = ANSI_CHARSET; | ||
3625 | lstrcpy(logfont->lfFaceName, TEXT("Tahoma")); | ||
3626 | break; | ||
3627 | } | ||
3628 | |||
3629 | logfont->lfHeight = mPreeditor->getPreeditFontSize(); | ||
3630 | logfont->lfWeight = FW_NORMAL; | ||
3631 | } | ||
3632 | |||
3633 | U32 LLWindowWin32::fillReconvertString(const LLWString &text, | ||
3634 | S32 focus, S32 focus_length, RECONVERTSTRING *reconvert_string) | ||
3635 | { | ||
3636 | const llutf16string text_utf16 = wstring_to_utf16str(text); | ||
3637 | const DWORD required_size = sizeof(RECONVERTSTRING) + (text_utf16.length() + 1) * sizeof(WCHAR); | ||
3638 | if (reconvert_string && reconvert_string->dwSize >= required_size) | ||
3639 | { | ||
3640 | const DWORD focus_utf16_at = wstring_utf16_length(text, 0, focus); | ||
3641 | const DWORD focus_utf16_length = wstring_utf16_length(text, focus, focus_length); | ||
3642 | |||
3643 | reconvert_string->dwVersion = 0; | ||
3644 | reconvert_string->dwStrLen = text_utf16.length(); | ||
3645 | reconvert_string->dwStrOffset = sizeof(RECONVERTSTRING); | ||
3646 | reconvert_string->dwCompStrLen = focus_utf16_length; | ||
3647 | reconvert_string->dwCompStrOffset = focus_utf16_at * sizeof(WCHAR); | ||
3648 | reconvert_string->dwTargetStrLen = 0; | ||
3649 | reconvert_string->dwTargetStrOffset = focus_utf16_at * sizeof(WCHAR); | ||
3650 | |||
3651 | const LPWSTR text = (LPWSTR)((BYTE *)reconvert_string + sizeof(RECONVERTSTRING)); | ||
3652 | memcpy(text, text_utf16.c_str(), (text_utf16.length() + 1) * sizeof(WCHAR)); | ||
3653 | } | ||
3654 | return required_size; | ||
3655 | } | ||
3656 | |||
3657 | void LLWindowWin32::updateLanguageTextInputArea() | ||
3658 | { | ||
3659 | if (!mPreeditor || !LLWinImm::isAvailable()) | ||
3660 | { | ||
3661 | return; | ||
3662 | } | ||
3663 | |||
3664 | LLCoordGL caret_coord; | ||
3665 | LLRect preedit_bounds; | ||
3666 | if (mPreeditor->getPreeditLocation(-1, &caret_coord, &preedit_bounds, NULL)) | ||
3667 | { | ||
3668 | mLanguageTextInputPointGL = caret_coord; | ||
3669 | mLanguageTextInputAreaGL = preedit_bounds; | ||
3670 | |||
3671 | CANDIDATEFORM candidate_form; | ||
3672 | fillCandidateForm(caret_coord, preedit_bounds, &candidate_form); | ||
3673 | |||
3674 | HIMC himc = LLWinImm::getContext(mWindowHandle); | ||
3675 | // Win32 document says there may be up to 4 candidate windows. | ||
3676 | // This magic number 4 appears only in the document, and | ||
3677 | // there are no constant/macro for the value... | ||
3678 | for (int i = 3; i >= 0; --i) | ||
3679 | { | ||
3680 | candidate_form.dwIndex = i; | ||
3681 | LLWinImm::setCandidateWindow(himc, &candidate_form); | ||
3682 | } | ||
3683 | LLWinImm::releaseContext(mWindowHandle, himc); | ||
3684 | } | ||
3685 | } | ||
3686 | |||
3687 | void LLWindowWin32::interruptLanguageTextInput() | ||
3688 | { | ||
3689 | if (mPreeditor) | ||
3690 | { | ||
3691 | if (LLWinImm::isAvailable()) | ||
3692 | { | ||
3693 | HIMC himc = LLWinImm::getContext(mWindowHandle); | ||
3694 | LLWinImm::notifyIME(himc, NI_COMPOSITIONSTR, CPS_COMPLETE, 0); | ||
3695 | LLWinImm::releaseContext(mWindowHandle, himc); | ||
3696 | } | ||
3697 | mPreeditor->resetPreedit(); | ||
3698 | } | ||
3699 | } | ||
3700 | |||
3701 | void LLWindowWin32::handleStartCompositionMessage() | ||
3702 | { | ||
3703 | // Let IME know the font to use in feedback UI. | ||
3704 | LOGFONT logfont; | ||
3705 | fillCompositionLogfont(&logfont); | ||
3706 | HIMC himc = LLWinImm::getContext(mWindowHandle); | ||
3707 | LLWinImm::setCompositionFont(himc, &logfont); | ||
3708 | LLWinImm::releaseContext(mWindowHandle, himc); | ||
3709 | } | ||
3710 | |||
3711 | // Handle WM_IME_COMPOSITION message. | ||
3712 | |||
3713 | void LLWindowWin32::handleCompositionMessage(const U32 indexes) | ||
3714 | { | ||
3715 | BOOL needs_update = FALSE; | ||
3716 | LLWString result_string; | ||
3717 | LLWString preedit_string; | ||
3718 | S32 preedit_string_utf16_length = 0; | ||
3719 | LLPreeditor::segment_lengths_t preedit_segment_lengths; | ||
3720 | LLPreeditor::standouts_t preedit_standouts; | ||
3721 | |||
3722 | // Step I: Receive details of preedits from IME. | ||
3723 | |||
3724 | HIMC himc = LLWinImm::getContext(mWindowHandle); | ||
3725 | |||
3726 | if (indexes & GCS_RESULTSTR) | ||
3727 | { | ||
3728 | LONG size = LLWinImm::getCompositionString(himc, GCS_RESULTSTR, NULL, 0); | ||
3729 | if (size >= 0) | ||
3730 | { | ||
3731 | const LPWSTR data = new WCHAR[size / sizeof(WCHAR) + 1]; | ||
3732 | size = LLWinImm::getCompositionString(himc, GCS_RESULTSTR, data, size); | ||
3733 | if (size > 0) | ||
3734 | { | ||
3735 | result_string = utf16str_to_wstring(llutf16string(data, size / sizeof(WCHAR))); | ||
3736 | } | ||
3737 | delete[] data; | ||
3738 | needs_update = TRUE; | ||
3739 | } | ||
3740 | } | ||
3741 | |||
3742 | if (indexes & GCS_COMPSTR) | ||
3743 | { | ||
3744 | LONG size = LLWinImm::getCompositionString(himc, GCS_COMPSTR, NULL, 0); | ||
3745 | if (size >= 0) | ||
3746 | { | ||
3747 | const LPWSTR data = new WCHAR[size / sizeof(WCHAR) + 1]; | ||
3748 | size = LLWinImm::getCompositionString(himc, GCS_COMPSTR, data, size); | ||
3749 | if (size > 0) | ||
3750 | { | ||
3751 | preedit_string_utf16_length = size / sizeof(WCHAR); | ||
3752 | preedit_string = utf16str_to_wstring(llutf16string(data, size / sizeof(WCHAR))); | ||
3753 | } | ||
3754 | delete[] data; | ||
3755 | needs_update = TRUE; | ||
3756 | } | ||
3757 | } | ||
3758 | |||
3759 | if ((indexes & GCS_COMPCLAUSE) && preedit_string.length() > 0) | ||
3760 | { | ||
3761 | LONG size = LLWinImm::getCompositionString(himc, GCS_COMPCLAUSE, NULL, 0); | ||
3762 | if (size > 0) | ||
3763 | { | ||
3764 | const LPDWORD data = new DWORD[size / sizeof(DWORD)]; | ||
3765 | size = LLWinImm::getCompositionString(himc, GCS_COMPCLAUSE, data, size); | ||
3766 | if (size >= sizeof(DWORD) * 2 | ||
3767 | && data[0] == 0 && data[size / sizeof(DWORD) - 1] == preedit_string_utf16_length) | ||
3768 | { | ||
3769 | preedit_segment_lengths.resize(size / sizeof(DWORD) - 1); | ||
3770 | S32 offset = 0; | ||
3771 | for (U32 i = 0; i < preedit_segment_lengths.size(); i++) | ||
3772 | { | ||
3773 | const S32 length = wstring_wstring_length_from_utf16_length(preedit_string, offset, data[i + 1] - data[i]); | ||
3774 | preedit_segment_lengths[i] = length; | ||
3775 | offset += length; | ||
3776 | } | ||
3777 | } | ||
3778 | delete[] data; | ||
3779 | } | ||
3780 | } | ||
3781 | |||
3782 | if ((indexes & GCS_COMPATTR) && preedit_segment_lengths.size() > 1) | ||
3783 | { | ||
3784 | LONG size = LLWinImm::getCompositionString(himc, GCS_COMPATTR, NULL, 0); | ||
3785 | if (size > 0) | ||
3786 | { | ||
3787 | const LPBYTE data = new BYTE[size / sizeof(BYTE)]; | ||
3788 | size = LLWinImm::getCompositionString(himc, GCS_COMPATTR, data, size); | ||
3789 | if (size == preedit_string_utf16_length) | ||
3790 | { | ||
3791 | preedit_standouts.assign(preedit_segment_lengths.size(), FALSE); | ||
3792 | S32 offset = 0; | ||
3793 | for (U32 i = 0; i < preedit_segment_lengths.size(); i++) | ||
3794 | { | ||
3795 | if (ATTR_TARGET_CONVERTED == data[offset] || ATTR_TARGET_NOTCONVERTED == data[offset]) | ||
3796 | { | ||
3797 | preedit_standouts[i] = TRUE; | ||
3798 | } | ||
3799 | offset += wstring_utf16_length(preedit_string, offset, preedit_segment_lengths[i]); | ||
3800 | } | ||
3801 | } | ||
3802 | delete[] data; | ||
3803 | } | ||
3804 | } | ||
3805 | |||
3806 | S32 caret_position = preedit_string.length(); | ||
3807 | if (indexes & GCS_CURSORPOS) | ||
3808 | { | ||
3809 | const S32 caret_position_utf16 = LLWinImm::getCompositionString(himc, GCS_CURSORPOS, NULL, 0); | ||
3810 | if (caret_position_utf16 >= 0 && caret_position <= preedit_string_utf16_length) | ||
3811 | { | ||
3812 | caret_position = wstring_wstring_length_from_utf16_length(preedit_string, 0, caret_position_utf16); | ||
3813 | } | ||
3814 | } | ||
3815 | |||
3816 | if (indexes == 0) | ||
3817 | { | ||
3818 | // I'm not sure this condition really happens, but | ||
3819 | // Windows SDK document says it is an indication | ||
3820 | // of "reset everything." | ||
3821 | needs_update = TRUE; | ||
3822 | } | ||
3823 | |||
3824 | LLWinImm::releaseContext(mWindowHandle, himc); | ||
3825 | |||
3826 | // Step II: Update the active preeditor. | ||
3827 | |||
3828 | if (needs_update) | ||
3829 | { | ||
3830 | mPreeditor->resetPreedit(); | ||
3831 | |||
3832 | if (result_string.length() > 0) | ||
3833 | { | ||
3834 | for (LLWString::const_iterator i = result_string.begin(); i != result_string.end(); i++) | ||
3835 | { | ||
3836 | mPreeditor->handleUnicodeCharHere(*i, FALSE); | ||
3837 | } | ||
3838 | } | ||
3839 | |||
3840 | if (preedit_string.length() > 0) | ||
3841 | { | ||
3842 | if (preedit_segment_lengths.size() == 0) | ||
3843 | { | ||
3844 | preedit_segment_lengths.assign(1, preedit_string.length()); | ||
3845 | } | ||
3846 | if (preedit_standouts.size() == 0) | ||
3847 | { | ||
3848 | preedit_standouts.assign(preedit_segment_lengths.size(), FALSE); | ||
3849 | } | ||
3850 | mPreeditor->updatePreedit(preedit_string, preedit_segment_lengths, preedit_standouts, caret_position); | ||
3851 | } | ||
3852 | |||
3853 | // Some IME doesn't query char position after WM_IME_COMPOSITION, | ||
3854 | // so we need to update them actively. | ||
3855 | updateLanguageTextInputArea(); | ||
3856 | } | ||
3857 | } | ||
3858 | |||
3859 | // Given a text and a focus range, find_context finds and returns a | ||
3860 | // surrounding context of the focused subtext. A variable pointed | ||
3861 | // to by offset receives the offset in llwchars of the beginning of | ||
3862 | // the returned context string in the given wtext. | ||
3863 | |||
3864 | static LLWString find_context(const LLWString & wtext, S32 focus, S32 focus_length, S32 *offset) | ||
3865 | { | ||
3866 | static const S32 CONTEXT_EXCESS = 30; // This value is by experiences. | ||
3867 | |||
3868 | const S32 e = llmin((S32) wtext.length(), focus + focus_length + CONTEXT_EXCESS); | ||
3869 | S32 end = focus + focus_length; | ||
3870 | while (end < e && '\n' != wtext[end]) | ||
3871 | { | ||
3872 | end++; | ||
3873 | } | ||
3874 | |||
3875 | const S32 s = llmax(0, focus - CONTEXT_EXCESS); | ||
3876 | S32 start = focus; | ||
3877 | while (start > s && '\n' != wtext[start - 1]) | ||
3878 | { | ||
3879 | --start; | ||
3880 | } | ||
3881 | |||
3882 | *offset = start; | ||
3883 | return wtext.substr(start, end - start); | ||
3884 | } | ||
3885 | |||
3886 | // Handle WM_IME_REQUEST message. | ||
3887 | // If it handled the message, returns TRUE. Otherwise, FALSE. | ||
3888 | // When it handled the message, the value to be returned from | ||
3889 | // the Window Procedure is set to *result. | ||
3890 | |||
3891 | BOOL LLWindowWin32::handleImeRequests(U32 request, U32 param, LRESULT *result) | ||
3892 | { | ||
3893 | if ( mPreeditor ) | ||
3894 | { | ||
3895 | switch (request) | ||
3896 | { | ||
3897 | case IMR_CANDIDATEWINDOW: // http://msdn2.microsoft.com/en-us/library/ms776080.aspx | ||
3898 | { | ||
3899 | LLCoordGL caret_coord; | ||
3900 | LLRect preedit_bounds; | ||
3901 | mPreeditor->getPreeditLocation(-1, &caret_coord, &preedit_bounds, NULL); | ||
3902 | |||
3903 | CANDIDATEFORM *const form = (CANDIDATEFORM *)param; | ||
3904 | DWORD const dwIndex = form->dwIndex; | ||
3905 | fillCandidateForm(caret_coord, preedit_bounds, form); | ||
3906 | form->dwIndex = dwIndex; | ||
3907 | |||
3908 | *result = 1; | ||
3909 | return TRUE; | ||
3910 | } | ||
3911 | case IMR_QUERYCHARPOSITION: | ||
3912 | { | ||
3913 | IMECHARPOSITION *const char_position = (IMECHARPOSITION *)param; | ||
3914 | |||
3915 | // char_position->dwCharPos counts in number of | ||
3916 | // WCHARs, i.e., UTF-16 encoding units, so we can't simply pass the | ||
3917 | // number to getPreeditLocation. | ||
3918 | |||
3919 | const LLWString & wtext = mPreeditor->getWText(); | ||
3920 | S32 preedit, preedit_length; | ||
3921 | mPreeditor->getPreeditRange(&preedit, &preedit_length); | ||
3922 | LLCoordGL caret_coord; | ||
3923 | LLRect preedit_bounds, text_control; | ||
3924 | const S32 position = wstring_wstring_length_from_utf16_length(wtext, preedit, char_position->dwCharPos); | ||
3925 | |||
3926 | if (!mPreeditor->getPreeditLocation(position, &caret_coord, &preedit_bounds, &text_control)) | ||
3927 | { | ||
3928 | llwarns << "*** IMR_QUERYCHARPOSITON called but getPreeditLocation failed." << llendl; | ||
3929 | return FALSE; | ||
3930 | } | ||
3931 | fillCharPosition(caret_coord, preedit_bounds, text_control, char_position); | ||
3932 | |||
3933 | *result = 1; | ||
3934 | return TRUE; | ||
3935 | } | ||
3936 | case IMR_COMPOSITIONFONT: | ||
3937 | { | ||
3938 | fillCompositionLogfont((LOGFONT *)param); | ||
3939 | |||
3940 | *result = 1; | ||
3941 | return TRUE; | ||
3942 | } | ||
3943 | case IMR_RECONVERTSTRING: | ||
3944 | { | ||
3945 | mPreeditor->resetPreedit(); | ||
3946 | const LLWString & wtext = mPreeditor->getWText(); | ||
3947 | S32 select, select_length; | ||
3948 | mPreeditor->getSelectionRange(&select, &select_length); | ||
3949 | |||
3950 | S32 context_offset; | ||
3951 | const LLWString context = find_context(wtext, select, select_length, &context_offset); | ||
3952 | |||
3953 | RECONVERTSTRING * const reconvert_string = (RECONVERTSTRING *)param; | ||
3954 | const U32 size = fillReconvertString(context, select - context_offset, select_length, reconvert_string); | ||
3955 | if (reconvert_string) | ||
3956 | { | ||
3957 | if (select_length == 0) | ||
3958 | { | ||
3959 | // Let the IME to decide the reconversion range, and | ||
3960 | // adjust the reconvert_string structure accordingly. | ||
3961 | HIMC himc = LLWinImm::getContext(mWindowHandle); | ||
3962 | const BOOL adjusted = LLWinImm::setCompositionString(himc, | ||
3963 | SCS_QUERYRECONVERTSTRING, reconvert_string, size, NULL, 0); | ||
3964 | LLWinImm::releaseContext(mWindowHandle, himc); | ||
3965 | if (adjusted) | ||
3966 | { | ||
3967 | const llutf16string & text_utf16 = wstring_to_utf16str(context); | ||
3968 | const S32 new_preedit_start = reconvert_string->dwCompStrOffset / sizeof(WCHAR); | ||
3969 | const S32 new_preedit_end = new_preedit_start + reconvert_string->dwCompStrLen; | ||
3970 | select = utf16str_wstring_length(text_utf16, new_preedit_start); | ||
3971 | select_length = utf16str_wstring_length(text_utf16, new_preedit_end) - select; | ||
3972 | select += context_offset; | ||
3973 | } | ||
3974 | } | ||
3975 | mPreeditor->markAsPreedit(select, select_length); | ||
3976 | } | ||
3977 | |||
3978 | *result = size; | ||
3979 | return TRUE; | ||
3980 | } | ||
3981 | case IMR_CONFIRMRECONVERTSTRING: | ||
3982 | { | ||
3983 | *result = FALSE; | ||
3984 | return TRUE; | ||
3985 | } | ||
3986 | case IMR_DOCUMENTFEED: | ||
3987 | { | ||
3988 | const LLWString & wtext = mPreeditor->getWText(); | ||
3989 | S32 preedit, preedit_length; | ||
3990 | mPreeditor->getPreeditRange(&preedit, &preedit_length); | ||
3991 | |||
3992 | S32 context_offset; | ||
3993 | LLWString context = find_context(wtext, preedit, preedit_length, &context_offset); | ||
3994 | preedit -= context_offset; | ||
3995 | if (preedit_length) | ||
3996 | { | ||
3997 | // IMR_DOCUMENTFEED may be called when we have an active preedit. | ||
3998 | // We should pass the context string *excluding* the preedit string. | ||
3999 | // Otherwise, some IME are confused. | ||
4000 | context.erase(preedit, preedit_length); | ||
4001 | } | ||
4002 | |||
4003 | RECONVERTSTRING *reconvert_string = (RECONVERTSTRING *)param; | ||
4004 | *result = fillReconvertString(context, preedit, 0, reconvert_string); | ||
4005 | return TRUE; | ||
4006 | } | ||
4007 | default: | ||
4008 | return FALSE; | ||
4009 | } | ||
4010 | } | ||
4011 | |||
4012 | return FALSE; | ||
4013 | } | ||
4014 | |||
4015 | |||
3403 | #endif // LL_WINDOWS | 4016 | #endif // LL_WINDOWS |
diff --git a/linden/indra/llwindow/llwindowwin32.h b/linden/indra/llwindow/llwindowwin32.h index c93b880..3f78dca 100644 --- a/linden/indra/llwindow/llwindowwin32.h +++ b/linden/indra/llwindow/llwindowwin32.h | |||
@@ -12,12 +12,12 @@ | |||
12 | * ("GPL"), unless you have obtained a separate licensing agreement | 12 | * ("GPL"), unless you have obtained a separate licensing agreement |
13 | * ("Other License"), formally executed by you and Linden Lab. Terms of | 13 | * ("Other License"), formally executed by you and Linden Lab. Terms of |
14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | 14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or |
15 | * online at http://secondlife.com/developers/opensource/gplv2 | 15 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 |
16 | * | 16 | * |
17 | * There are special exceptions to the terms and conditions of the GPL as | 17 | * There are special exceptions to the terms and conditions of the GPL as |
18 | * it is applied to this Source Code. View the full text of the exception | 18 | * it is applied to this Source Code. View the full text of the exception |
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 19 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
20 | * online at http://secondlife.com/developers/opensource/flossexception | 20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception |
21 | * | 21 | * |
22 | * By copying, modifying or distributing this software, you acknowledge | 22 | * By copying, modifying or distributing this software, you acknowledge |
23 | * that you have read and understood your obligations described above, | 23 | * that you have read and understood your obligations described above, |
@@ -109,8 +109,10 @@ public: | |||
109 | /*virtual*/ void bringToFront(); | 109 | /*virtual*/ void bringToFront(); |
110 | /*virtual*/ void focusClient(); | 110 | /*virtual*/ void focusClient(); |
111 | 111 | ||
112 | /*virtual*/ void allowLanguageTextInput(BOOL b); | 112 | /*virtual*/ void allowLanguageTextInput(LLPreeditor *preeditor, BOOL b); |
113 | /*virtual*/ void setLanguageTextInput( const LLCoordGL & pos ); | 113 | /*virtual*/ void setLanguageTextInput( const LLCoordGL & pos ); |
114 | /*virtual*/ void updateLanguageTextInputArea(); | ||
115 | /*virtual*/ void interruptLanguageTextInput(); | ||
114 | 116 | ||
115 | protected: | 117 | protected: |
116 | LLWindowWin32( | 118 | LLWindowWin32( |
@@ -139,6 +141,14 @@ protected: | |||
139 | 141 | ||
140 | BOOL shouldPostQuit() { return mPostQuit; } | 142 | BOOL shouldPostQuit() { return mPostQuit; } |
141 | 143 | ||
144 | void fillCompositionForm(const LLRect& bounds, COMPOSITIONFORM *form); | ||
145 | void fillCandidateForm(const LLCoordGL& caret, const LLRect& bounds, CANDIDATEFORM *form); | ||
146 | void fillCharPosition(const LLCoordGL& caret, const LLRect& bounds, const LLRect& control, IMECHARPOSITION *char_position); | ||
147 | void fillCompositionLogfont(LOGFONT *logfont); | ||
148 | U32 fillReconvertString(const LLWString &text, S32 focus, S32 focus_length, RECONVERTSTRING *reconvert_string); | ||
149 | void handleStartCompositionMessage(); | ||
150 | void handleCompositionMessage(U32 indexes); | ||
151 | BOOL handleImeRequests(U32 request, U32 param, LRESULT *result); | ||
142 | 152 | ||
143 | protected: | 153 | protected: |
144 | // | 154 | // |
@@ -189,6 +199,10 @@ protected: | |||
189 | static DWORD sWinIMEConversionMode; | 199 | static DWORD sWinIMEConversionMode; |
190 | static DWORD sWinIMESentenceMode; | 200 | static DWORD sWinIMESentenceMode; |
191 | static LLCoordWindow sWinIMEWindowPosition; | 201 | static LLCoordWindow sWinIMEWindowPosition; |
202 | LLCoordGL mLanguageTextInputPointGL; | ||
203 | LLRect mLanguageTextInputAreaGL; | ||
204 | |||
205 | LLPreeditor *mPreeditor; | ||
192 | 206 | ||
193 | friend class LLWindowManager; | 207 | friend class LLWindowManager; |
194 | }; | 208 | }; |