Changes of Revision 2

sview.changes Changed
x
 
1
@@ -1,4 +1,15 @@
2
 -------------------------------------------------------------------
3
+Wed Oct 21 17:46:52 UTC 2015 - avvissu@yandex.ru
4
+
5
+- Update to 15.10:
6
+  * adds support of cubemaps in format 3:2 (two rows per 3 quad 
7
+    sides)
8
+  * adds button to activate 360 panorama view on toolbar
9
+  * adds Czech translation files
10
+  * adds option to automatically workaround aspect ratio of 
11
+    anamorphic 1080p and 720p videos
12
+
13
+-------------------------------------------------------------------
14
 Sat May 19 00:00:00 UTC 2015 - avvissu@yandex.ru
15
 
16
 - Initial package
17
sview.spec Changed
62
 
1
@@ -16,9 +16,10 @@
2
 #
3
 
4
 
5
-%define src_ver 15_08
6
+%define src_ver 15_10
7
+%define src_name sView
8
 Name:           sview
9
-Version:        15.08
10
+Version:        15.10
11
 Release:        0
12
 Summary:        Stereoscopic media player
13
 License:        GPL-3.0+ and LGPL-3.0+
14
@@ -59,7 +60,7 @@
15
 %build
16
 sed -i '/^CXXFLAGS/s/$/\ %{optflags}/' Makefile
17
 # Remove %%_smp_mflags to avoid compilation errors
18
-make V=1 -j1 EXTRA_LDFLAGS="-Wl,-rpath,%{_libdir}/sView"
19
+make V=1 -j1 EXTRA_LDFLAGS="-Wl,-rpath,%{_libdir}/%{src_name}"
20
 
21
 %install
22
 %make_install USR_LIB=%{_lib}
23
@@ -71,15 +72,15 @@
24
 # It's not necessary
25
 rm -rf %{buildroot}%{_datadir}/icons/hicolor/*/apps/%{name}.png
26
 # Use the installation in pixmaps
27
-rm -rf %{buildroot}%{_datadir}/sView/icons/menu.xpm
28
-install -Dm 0644 share/sView/icons/menu.xpm %{buildroot}%{_datadir}/pixmaps/%{name}.xpm
29
+rm -rf %{buildroot}%{_datadir}/%{src_name}/icons/menu.xpm
30
+install -Dm 0644 share/%{src_name}/icons/menu.xpm %{buildroot}%{_datadir}/pixmaps/%{name}.xpm
31
 # Libraries used by the app must be placed into subdirectory
32
-mv %{buildroot}%{_libdir}/*.so %{buildroot}%{_libdir}/sView
33
+mv %{buildroot}%{_libdir}/*.so %{buildroot}%{_libdir}/%{src_name}
34
 
35
 %fdupes -s %{buildroot}%{_datadir}
36
 
37
-%suse_update_desktop_file -r sViewIV Graphics Viewer
38
-%suse_update_desktop_file -r sViewMP AudioVideo Video Player
39
+%suse_update_desktop_file -r %{src_name}IV Graphics Viewer
40
+%suse_update_desktop_file -r %{src_name}MP AudioVideo Video Player
41
 
42
 %post
43
 %icon_theme_cache_post
44
@@ -92,12 +93,12 @@
45
 %files
46
 %defattr(-,root,root)
47
 %doc LICENSE license-gpl* license-lgpl*
48
-%{_bindir}/sView
49
-%{_libdir}/sView/
50
-%{_datadir}/applications/sViewIV.desktop
51
-%{_datadir}/applications/sViewMP.desktop
52
+%{_bindir}/%{src_name}
53
+%{_libdir}/%{src_name}/
54
+%{_datadir}/applications/%{src_name}IV.desktop
55
+%{_datadir}/applications/%{src_name}MP.desktop
56
 %{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
57
 %{_datadir}/pixmaps/%{name}.xpm
58
-%{_datadir}/sView/
59
+%{_datadir}/%{src_name}/
60
 
61
 %changelog
62
sview-15_08.tar.gz/StGLWidgets/StGLImageFlatProgram.cpp Deleted
79
 
1
@@ -1,77 +0,0 @@
2
-/**
3
- * Copyright © 2010-2015 Kirill Gavrilov <kirill@sview.ru>
4
- *
5
- * Distributed under the Boost Software License, Version 1.0.
6
- * See accompanying file license-boost.txt or copy at
7
- * http://www.boost.org/LICENSE_1_0.txt
8
- */
9
-
10
-#include <StGLWidgets/StGLImageFlatProgram.h>
11
-#include <StGL/StGLResources.h>
12
-#include <StFile/StRawFile.h>
13
-
14
-StGLImageFlatProgram::StGLImageFlatProgram()
15
-: StGLImageProgram("StGLImageFlatProgram") {
16
-    const char V_SHADER_FLAT[] =
17
-       "uniform mat4 uProjMat;\n"
18
-       "uniform mat4 uModelMat;\n"
19
-       "uniform vec4 uTexData;\n"
20
-       "uniform vec4 uTexUVData;\n"
21
-
22
-       "attribute vec4 vVertex;\n"
23
-       "attribute vec2 vTexCoord;\n"
24
-
25
-       "varying vec3 fTexCoord;\n"
26
-       "varying vec3 fTexUVCoord;\n"
27
-
28
-       "void main(void) {\n"
29
-       "    fTexCoord   = vec3(uTexData.xy   + vTexCoord * uTexData.zw,   0.0);\n"
30
-       "    fTexUVCoord = vec3(uTexUVData.xy + vTexCoord * uTexUVData.zw, 0.0);\n"
31
-       "    gl_Position = uProjMat * uModelMat * vVertex;\n"
32
-       "}\n";
33
-
34
-    const char V_SHADER_CUBEMAP[] =
35
-       "uniform mat4 uProjMat;\n"
36
-       "uniform mat4 uModelMat;\n"
37
-       "uniform vec4 uTexData;\n"
38
-       "uniform vec4 uTexUVData;\n"
39
-
40
-       "attribute vec4 vVertex;\n"
41
-       "attribute vec2 vTexCoord;\n"
42
-
43
-       "varying vec3 fTexCoord;\n"
44
-       "varying vec3 fTexUVCoord;\n"
45
-
46
-       "void main(void) {\n"
47
-       "    gl_Position = vec4(vVertex.x, vVertex.y, 0.0, 1.0);\n"
48
-       "    fTexCoord   = (uProjMat * gl_Position).xyz;"
49
-       "    fTexUVCoord = (uProjMat * gl_Position).xyz;"
50
-       "}\n";
51
-
52
-    const char F_SHADER_FLAT[] =
53
-       "varying vec3 fTexCoord;\n"
54
-       "varying vec3 fTexUVCoord;\n"
55
-        // we split these functions for two reasons:
56
-        // - to change function code (like color conversion);
57
-        // - to optimize rendering on old hardware not supported conditions (GeForce FX for example).
58
-       "vec4 getColor(in vec3 texCoord);\n"
59
-       "void convertToRGB(inout vec4 theColor, in vec3 theTexUVCoord);\n"
60
-       "void applyCorrection(inout vec4 theColor);\n"
61
-       "void applyGamma(inout vec4 theColor);\n"
62
-
63
-       "void main(void) {\n"
64
-            // extract color from main texture
65
-       "    vec4 aColor = getColor(fTexCoord);\n"
66
-            // convert from alien color model (like YUV) to RGB
67
-       "    convertToRGB(aColor, fTexUVCoord);\n"
68
-            // color processing (saturation, brightness, etc)
69
-       "    applyCorrection(aColor);\n"
70
-            // gamma correction
71
-       "    applyGamma(aColor);\n"
72
-       "    gl_FragColor = aColor;\n"
73
-       "}";
74
-
75
-    registerVertexShaderPart  (0, VertMain_Normal,  V_SHADER_FLAT);
76
-    registerVertexShaderPart  (0, VertMain_Cubemap, V_SHADER_CUBEMAP);
77
-    registerFragmentShaderPart(FragSection_Main, 0, F_SHADER_FLAT);
78
-}
79
sview-15_08.tar.gz/StGLWidgets/StGLImageSphereProgram.cpp Deleted
94
 
1
@@ -1,92 +0,0 @@
2
-/**
3
- * Copyright © 2010-2015 Kirill Gavrilov <kirill@sview.ru>
4
- *
5
- * Distributed under the Boost Software License, Version 1.0.
6
- * See accompanying file license-boost.txt or copy at
7
- * http://www.boost.org/LICENSE_1_0.txt
8
- */
9
-
10
-#include <StGLWidgets/StGLImageSphereProgram.h>
11
-
12
-#include <StGL/StGLResources.h>
13
-#include <StGLCore/StGLCore20.h>
14
-#include <StFile/StRawFile.h>
15
-
16
-#if defined(GL_ES_VERSION_2_0)
17
-    #define THE_UTEXT_DATA "uniform mediump vec4 uTexData;\n"
18
-#else
19
-    #define THE_UTEXT_DATA "uniform vec4 uTexData;\n"
20
-#endif
21
-
22
-StGLImageSphereProgram::StGLImageSphereProgram()
23
-: StGLImageProgram("StGLImageSphereProgram") {
24
-    const char V_SHADER[] =
25
-       "uniform mat4 uProjMat;\n"
26
-       "uniform mat4 uModelMat;\n"
27
-       "uniform vec4 uTexUVData;\n"
28
-       THE_UTEXT_DATA
29
-
30
-       "attribute vec4 vVertex;\n"
31
-       "attribute vec2 vTexCoord;\n"
32
-
33
-       "varying vec3 fTexCoord;\n"
34
-       "varying vec3 fTexUVCoord;\n"
35
-
36
-       "void main(void) {\n"
37
-       "    fTexCoord   = vec3(uTexData.xy   + vTexCoord * uTexData.zw,   0.0);\n"
38
-       "    fTexUVCoord = vec3(uTexUVData.xy + vTexCoord * uTexUVData.zw, 0.0);\n"
39
-       "    gl_Position = uProjMat * uModelMat * vVertex;\n"
40
-       "}\n";
41
-
42
-    const char F_SHADER[] =
43
-       "varying vec3 fTexCoord;\n"
44
-       "varying vec3 fTexUVCoord;\n"
45
-
46
-       "vec4 getColor(in vec3 texCoord);\n"
47
-       "void convertToRGB(inout vec4 color, in vec3 texUVCoord);\n"
48
-       "void applyGamma(inout vec4 color);\n"
49
-
50
-       "void main(void) {\n"
51
-       "    vec4 color = getColor(fTexCoord);\n"
52
-       "    convertToRGB(color, fTexUVCoord);\n"
53
-       "    applyGamma(color);\n"
54
-       "    gl_FragColor = color;\n"
55
-       "}\n\n";
56
-
57
-    const char F_SHADER_COLOR[] =
58
-       "uniform sampler2D uTexture;\n"
59
-       "uniform vec2 uTexSizePx;\n"
60
-       "uniform vec2 uTexelSize;\n"
61
-       THE_UTEXT_DATA
62
-
63
-       "vec4 getColor(in vec3 texCoord) {\n"
64
-       "    vec2 txCoord_CC = floor(uTexSizePx * texCoord.xy) / uTexSizePx;\n"
65
-       "    vec2 aDiff = (texCoord.xy - txCoord_CC) * uTexSizePx;\n"
66
-       "    if(txCoord_CC.y >= (uTexData.w - uTexelSize.y)) {\n"
67
-       "        aDiff.y = 0.0;\n"
68
-       "    }\n"
69
-       "    vec2 diffSign = sign(aDiff);\n"
70
-       "    vec2 diffAbs  = abs(aDiff);\n"
71
-       "    vec2 txCoord_R = txCoord_CC + diffSign * vec2(uTexelSize.x, 0.0);\n"
72
-       "    if(txCoord_R.x > (uTexData.z - uTexelSize.x)) {\n"
73
-       "        txCoord_R.x = uTexelSize.x;\n"
74
-       "    } else if(txCoord_R.x < uTexelSize.x) {\n"
75
-       "        txCoord_R.x = uTexData.z - uTexelSize.x;\n"
76
-       "    }\n"
77
-       "    vec4 color_CC = texture2D(uTexture, txCoord_CC);\n"
78
-       "    vec4 colorXX1 = mix(color_CC,\n"
79
-       "                        texture2D(uTexture,\n"
80
-       "                                  txCoord_R),\n"
81
-       "                        diffAbs.x);\n"
82
-       "    vec4 colorXX2 = mix(texture2D(uTexture,\n"
83
-       "                                  txCoord_CC + diffSign * vec2(0.0, uTexelSize.y)),\n"
84
-       "                        texture2D(uTexture,\n"
85
-       "                                  txCoord_R + diffSign * vec2(0.0, uTexelSize.y)),\n"
86
-       "                        diffAbs.x);\n"
87
-       "    return mix(colorXX1, colorXX2, diffAbs.y);\n"
88
-       "}\n\n";
89
-
90
-    registerVertexShaderPart  (0,                    VertMain_Normal, V_SHADER);
91
-    registerFragmentShaderPart(FragSection_Main,     0, F_SHADER);
92
-    registerFragmentShaderPart(FragSection_GetColor, FragGetColor_Blend, F_SHADER_COLOR);
93
-}
94
sview-15_08.tar.gz/include/StGLWidgets/StGLImageFlatProgram.h Deleted
24
 
1
@@ -1,22 +0,0 @@
2
-/**
3
- * Copyright © 2010-2015 Kirill Gavrilov <kirill@sview.ru>
4
- *
5
- * Distributed under the Boost Software License, Version 1.0.
6
- * See accompanying file license-boost.txt or copy at
7
- * http://www.boost.org/LICENSE_1_0.txt
8
- */
9
-
10
-#ifndef __StGLImageFlatProgram_h_
11
-#define __StGLImageFlatProgram_h_
12
-
13
-#include "StGLImageProgram.h"
14
-
15
-class StGLImageFlatProgram : public StGLImageProgram {
16
-
17
-        public:
18
-
19
-    ST_CPPEXPORT StGLImageFlatProgram();
20
-
21
-};
22
-
23
-#endif //__StGLImageFlatProgram_h_
24
sview-15_08.tar.gz/include/StGLWidgets/StGLImageSphereProgram.h Deleted
24
 
1
@@ -1,22 +0,0 @@
2
-/**
3
- * Copyright © 2010-2015 Kirill Gavrilov <kirill@sview.ru>
4
- *
5
- * Distributed under the Boost Software License, Version 1.0.
6
- * See accompanying file license-boost.txt or copy at
7
- * http://www.boost.org/LICENSE_1_0.txt
8
- */
9
-
10
-#ifndef __StGLImageSphereProgram_h_
11
-#define __StGLImageSphereProgram_h_
12
-
13
-#include "StGLImageProgram.h"
14
-
15
-class StGLImageSphereProgram : public StGLImageProgram {
16
-
17
-        public:
18
-
19
-    ST_CPPEXPORT StGLImageSphereProgram();
20
-
21
-};
22
-
23
-#endif //__StGLImageSphereProgram_h_
24
sview-15_08.tar.gz/3rdparty/include/mongoose.c -> sview-15_10.tar.gz/3rdparty/include/mongoose.c Changed
201
 
1
@@ -50,7 +50,6 @@
2
 
3
 #if defined(__SYMBIAN32__)
4
 #define NO_SSL // SSL is not supported
5
-#define NO_CGI // CGI is not supported
6
 #define PATH_MAX FILENAME_MAX
7
 #endif // __SYMBIAN32__
8
 
9
@@ -86,7 +85,6 @@
10
 #include <direct.h>
11
 #include <io.h>
12
 #else // _WIN32_WCE
13
-#define NO_CGI // WinCE has no pipes
14
 
15
 typedef long off_t;
16
 
17
@@ -190,7 +188,7 @@
18
 
19
 #ifndef HAS_POLL
20
 struct pollfd {
21
-  int fd;
22
+  intptr_t fd;
23
   short events;
24
   short revents;
25
 };
26
@@ -252,15 +250,8 @@
27
 
28
 #include "mongoose.h"
29
 
30
-#ifdef USE_LUA
31
-#include <lua.h>
32
-#include <lauxlib.h>
33
-#endif
34
-
35
 #define MONGOOSE_VERSION "3.7"
36
 #define PASSWORDS_FILE_NAME ".htpasswd"
37
-#define CGI_ENVIRONMENT_SIZE 4096
38
-#define MAX_CGI_ENVIR_VARS 64
39
 #define MG_BUF_LEN 8192
40
 #define MAX_REQUEST_SIZE 16384
41
 #define ARRAY_SIZE(array) (sizeof(array) / sizeof(array[0]))
42
@@ -858,9 +849,10 @@
43
   return list;
44
 }
45
 
46
-static int match_prefix(const char *pattern, int pattern_len, const char *str) {
47
+static int match_prefix(const char *pattern, size_t pattern_len, const char *str) {
48
   const char *or_str;
49
-  int i, j, len, res;
50
+  int j, len, res;
51
+  size_t i;
52
 
53
   if ((or_str = (const char *) memchr(pattern, '|', pattern_len)) != NULL) {
54
     res = match_prefix(pattern, or_str - pattern, str);
55
@@ -868,7 +860,8 @@
56
         match_prefix(or_str + 1, (pattern + pattern_len) - (or_str + 1), str);
57
   }
58
 
59
-  i = j = 0;
60
+  j = 0;
61
+  i = 0;
62
   res = -1;
63
   for (; i < pattern_len; i++, j++) {
64
     if (pattern[i] == '?' && str[j] != '\0') {
65
@@ -1261,94 +1254,6 @@
66
   return LoadLibraryW(wbuf);
67
 }
68
 
69
-#if !defined(NO_CGI)
70
-#define SIGKILL 0
71
-static int kill(pid_t pid, int sig_num) {
72
-  (void) TerminateProcess(pid, sig_num);
73
-  (void) CloseHandle(pid);
74
-  return 0;
75
-}
76
-
77
-static void trim_trailing_whitespaces(char *s) {
78
-  char *e = s + strlen(s) - 1;
79
-  while (e > s && isspace(* (unsigned char *) e)) {
80
-    *e-- = '\0';
81
-  }
82
-}
83
-
84
-static pid_t spawn_process(struct mg_connection *conn, const char *prog,
85
-                           char *envblk, char *envp[], int fd_stdin,
86
-                           int fd_stdout, const char *dir) {
87
-  HANDLE me;
88
-  char *p, *interp, full_interp[PATH_MAX], full_dir[PATH_MAX],
89
-       cmdline[PATH_MAX], buf[PATH_MAX];
90
-  struct file file = STRUCT_FILE_INITIALIZER;
91
-  STARTUPINFOA si = { sizeof(si) };
92
-  PROCESS_INFORMATION pi = { 0 };
93
-
94
-  envp = NULL; // Unused
95
-
96
-  // TODO(lsm): redirect CGI errors to the error log file
97
-  si.dwFlags = STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW;
98
-  si.wShowWindow = SW_HIDE;
99
-
100
-  me = GetCurrentProcess();
101
-  DuplicateHandle(me, (HANDLE) _get_osfhandle(fd_stdin), me,
102
-                  &si.hStdInput, 0, TRUE, DUPLICATE_SAME_ACCESS);
103
-  DuplicateHandle(me, (HANDLE) _get_osfhandle(fd_stdout), me,
104
-                  &si.hStdOutput, 0, TRUE, DUPLICATE_SAME_ACCESS);
105
-
106
-  // If CGI file is a script, try to read the interpreter line
107
-  interp = conn->ctx->config[CGI_INTERPRETER];
108
-  if (interp == NULL) {
109
-    buf[0] = buf[1] = '\0';
110
-
111
-    // Read the first line of the script into the buffer
112
-    snprintf(cmdline, sizeof(cmdline), "%s%c%s", dir, '/', prog);
113
-    if (mg_fopen(conn, cmdline, "r", &file)) {
114
-      p = (char *) file.membuf;
115
-      mg_fgets(buf, sizeof(buf), &file, &p);
116
-      mg_fclose(&file);
117
-      buf[sizeof(buf) - 1] = '\0';
118
-    }
119
-
120
-    if (buf[0] == '#' && buf[1] == '!') {
121
-      trim_trailing_whitespaces(buf + 2);
122
-    } else {
123
-      buf[2] = '\0';
124
-    }
125
-    interp = buf + 2;
126
-  }
127
-
128
-  if (interp[0] != '\0') {
129
-    GetFullPathNameA(interp, sizeof(full_interp), full_interp, NULL);
130
-    interp = full_interp;
131
-  }
132
-  GetFullPathNameA(dir, sizeof(full_dir), full_dir, NULL);
133
-
134
-  mg_snprintf(conn, cmdline, sizeof(cmdline), "%s%s%s\\%s",
135
-              interp, interp[0] == '\0' ? "" : " ", full_dir, prog);
136
-
137
-  DEBUG_TRACE(("Running [%s]", cmdline));
138
-  if (CreateProcessA(NULL, cmdline, NULL, NULL, TRUE,
139
-        CREATE_NEW_PROCESS_GROUP, envblk, NULL, &si, &pi) == 0) {
140
-    cry(conn, "%s: CreateProcess(%s): %d",
141
-        __func__, cmdline, ERRNO);
142
-    pi.hProcess = (pid_t) -1;
143
-  }
144
-
145
-  // Always close these to prevent handle leakage.
146
-  (void) close(fd_stdin);
147
-  (void) close(fd_stdout);
148
-
149
-  (void) CloseHandle(si.hStdOutput);
150
-  (void) CloseHandle(si.hStdInput);
151
-  (void) CloseHandle(pi.hThread);
152
-
153
-  return (pid_t) pi.hProcess;
154
-}
155
-#endif // !NO_CGI
156
-
157
 static int set_non_blocking_mode(SOCKET sock) {
158
   unsigned long on = 1;
159
   return ioctlsocket(sock, FIONBIO, &on);
160
@@ -1386,58 +1291,6 @@
161
   return pthread_create(&thread_id, &attr, func, param);
162
 }
163
 
164
-#ifndef NO_CGI
165
-static pid_t spawn_process(struct mg_connection *conn, const char *prog,
166
-                           char *envblk, char *envp[], int fd_stdin,
167
-                           int fd_stdout, const char *dir) {
168
-  pid_t pid;
169
-  const char *interp;
170
-
171
-  (void) envblk;
172
-
173
-  if ((pid = fork()) == -1) {
174
-    // Parent
175
-    send_http_error(conn, 500, http_500_error, "fork(): %s", strerror(ERRNO));
176
-  } else if (pid == 0) {
177
-    // Child
178
-    if (chdir(dir) != 0) {
179
-      cry(conn, "%s: chdir(%s): %s", __func__, dir, strerror(ERRNO));
180
-    } else if (dup2(fd_stdin, 0) == -1) {
181
-      cry(conn, "%s: dup2(%d, 0): %s", __func__, fd_stdin, strerror(ERRNO));
182
-    } else if (dup2(fd_stdout, 1) == -1) {
183
-      cry(conn, "%s: dup2(%d, 1): %s", __func__, fd_stdout, strerror(ERRNO));
184
-    } else {
185
-      (void) dup2(fd_stdout, 2);
186
-      (void) close(fd_stdin);
187
-      (void) close(fd_stdout);
188
-
189
-      // After exec, all signal handlers are restored to their default values,
190
-      // with one exception of SIGCHLD. According to POSIX.1-2001 and Linux's
191
-      // implementation, SIGCHLD's handler will leave unchanged after exec
192
-      // if it was set to be ignored. Restore it to default action.
193
-      signal(SIGCHLD, SIG_DFL);
194
-
195
-      interp = conn->ctx->config[CGI_INTERPRETER];
196
-      if (interp == NULL) {
197
-        (void) execle(prog, prog, NULL, envp);
198
-        cry(conn, "%s: execle(%s): %s", __func__, prog, strerror(ERRNO));
199
-      } else {
200
-        (void) execle(interp, interp, prog, NULL, envp);
201
sview-15_08.tar.gz/3rdparty/include/mongoose.h -> sview-15_10.tar.gz/3rdparty/include/mongoose.h Changed
22
 
1
@@ -65,8 +65,6 @@
2
   int  (*websocket_data)(struct mg_connection *);
3
   const char * (*open_file)(const struct mg_connection *,
4
                              const char *path, size_t *data_len);
5
-  void (*init_lua)(struct mg_connection *, void *lua_context);
6
-  void (*upload)(struct mg_connection *, const char *file_name);
7
 };
8
 
9
 // Start web server.
10
@@ -182,11 +180,6 @@
11
 // Send contents of the entire file together with HTTP headers.
12
 void mg_send_file(struct mg_connection *conn, const char *path);
13
 
14
-
15
-// Read data from the remote end, return number of bytes read.
16
-int mg_read(struct mg_connection *, void *buf, size_t len);
17
-
18
-
19
 // Get the value of particular HTTP header.
20
 //
21
 // This is a helper function. It traverses request_info->http_headers array,
22
sview-15_08.tar.gz/Makefile -> sview-15_10.tar.gz/Makefile Changed
201
 
1
@@ -86,6 +86,12 @@
2
 clean:     clean_StShared clean_StGLWidgets clean_StCore clean_sView clean_StOutAnaglyph clean_StOutDual clean_StOutInterlace clean_StOutPageFlip clean_StOutIZ3D clean_StOutDistorted clean_StImageViewer clean_StMoviePlayer clean_StDiagnostics clean_StCADViewer clean_sViewAndroid
3
 distclean: clean
4
 
5
+ifdef ANDROID_NDK
6
+outputs_all: $(aStOutAnaglyph) $(aStOutInterlace) $(aStOutDistorted)
7
+else
8
+outputs_all: $(aStOutAnaglyph) $(aStOutDual) $(aStOutInterlace) $(aStOutPageFlip) $(aStOutIZ3D) $(aStOutDistorted)
9
+endif
10
+
11
 install:
12
    mkdir -p $(DESTDIR)/usr/bin
13
    mkdir -p $(DESTDIR)/usr/$(USR_LIB)/sView
14
@@ -115,6 +121,7 @@
15
    mkdir -p sview/assets/lang/French
16
    mkdir -p sview/assets/lang/English
17
    mkdir -p sview/assets/lang/Russian
18
+   mkdir -p sview/assets/lang/Czech
19
    mkdir -p sview/assets/shaders
20
    mkdir -p sview/assets/textures
21
    ln --force --symbolic ../../../$(BUILD_ROOT)/$(aStShared)       sview/libs/armeabi-v7a/$(aStShared)
22
@@ -130,6 +137,7 @@
23
    cp -f -r $(BUILD_ROOT)/lang/français/* sview/assets/lang/French/
24
    cp -f -r $(BUILD_ROOT)/lang/English/*  sview/assets/lang/English/
25
    cp -f -r $(BUILD_ROOT)/lang/русский/*  sview/assets/lang/Russian/
26
+   cp -f -r $(BUILD_ROOT)/lang/Czech/*    sview/assets/lang/Czech/
27
    cp -f -r $(BUILD_ROOT)/shaders/*       sview/assets/shaders/
28
    cp -f -r $(BUILD_ROOT)/textures/*      sview/assets/textures/
29
    cp -f    license-gpl-3.0.txt           sview/assets/info/license.txt
30
@@ -139,6 +147,7 @@
31
    mkdir -p $(BUILD_ROOT)/lang/русский
32
    mkdir -p $(BUILD_ROOT)/lang/français
33
    mkdir -p $(BUILD_ROOT)/lang/Deutsch
34
+   mkdir -p $(BUILD_ROOT)/lang/Czech
35
    mkdir -p $(BUILD_ROOT)/textures
36
    mkdir -p $(BUILD_ROOT)/web
37
    mkdir -p sview/libs/armeabi-v7a
38
@@ -158,10 +167,10 @@
39
 aStGLWidgets_SRCS := $(wildcard StGLWidgets/*.cpp)
40
 aStGLWidgets_OBJS := ${aStGLWidgets_SRCS:.cpp=.o}
41
 aStGLWidgets_LIB  := $(LIB) -lStShared $(LIB_GLX)
42
-$(aStGLWidgets) : pre_StGLWidgets $(aStGLWidgets_OBJS)
43
+$(aStGLWidgets) : pre_StGLWidgets $(aStShared) $(aStGLWidgets_OBJS)
44
    $(LD) -shared $(LDFLAGS) $(LIBDIR) $(aStGLWidgets_OBJS) $(aStGLWidgets_LIB) -o $(BUILD_ROOT)/$(aStGLWidgets)
45
 pre_StGLWidgets:
46
-   
47
+
48
 clean_StGLWidgets:
49
    rm -f $(BUILD_ROOT)/$(aStGLWidgets)
50
    rm -rf StGLWidgets/*.o
51
@@ -170,7 +179,7 @@
52
 aStCore_SRCS := $(wildcard StCore/*.cpp)
53
 aStCore_OBJS := ${aStCore_SRCS:.cpp=.o}
54
 aStCore_LIB  := $(LIB) -lStShared $(LIB_GLX) $(LIB_GTK) $(LIB_PTHREAD) $(LIB_XLIB) $(LIB_ANDROID)
55
-$(aStCore) : $(aStCore_OBJS)
56
+$(aStCore) : $(aStShared) $(aStCore_OBJS)
57
    $(LD) -shared $(LDFLAGS) $(LIBDIR) $(aStCore_OBJS) $(aStCore_LIB) -o $(BUILD_ROOT)/$(aStCore)
58
 clean_StCore:
59
    rm -f $(BUILD_ROOT)/$(aStCore)
60
@@ -180,7 +189,7 @@
61
 aStOutAnaglyph_SRCS := $(wildcard StOutAnaglyph/*.cpp)
62
 aStOutAnaglyph_OBJS := ${aStOutAnaglyph_SRCS:.cpp=.o}
63
 aStOutAnaglyph_LIB  := $(LIB) -lStShared -lStCore $(LIB_GLX) $(LIB_GTK) $(LIB_PTHREAD)
64
-$(aStOutAnaglyph) : pre_StOutAnaglyph $(aStOutAnaglyph_OBJS)
65
+$(aStOutAnaglyph) : pre_StOutAnaglyph $(aStCore) $(aStOutAnaglyph_OBJS)
66
    $(LD) -shared $(LDFLAGS) $(LIBDIR) $(aStOutAnaglyph_OBJS) $(aStOutAnaglyph_LIB) -o $(BUILD_ROOT)/$(aStOutAnaglyph)
67
 pre_StOutAnaglyph:
68
    mkdir -p $(BUILD_ROOT)/shaders/StOutAnaglyph/
69
@@ -189,6 +198,7 @@
70
    cp -f -r StOutAnaglyph/lang/russian/* $(BUILD_ROOT)/lang/русский/
71
    cp -f -r StOutAnaglyph/lang/french/*  $(BUILD_ROOT)/lang/français/
72
    cp -f -r StOutAnaglyph/lang/german/*  $(BUILD_ROOT)/lang/Deutsch/
73
+   cp -f -r StOutAnaglyph/lang/czech/*   $(BUILD_ROOT)/lang/Czech/
74
 clean_StOutAnaglyph:
75
    rm -f $(BUILD_ROOT)/$(aStOutAnaglyph)
76
    rm -rf StOutAnaglyph/*.o
77
@@ -199,13 +209,14 @@
78
 aStOutDual_SRCS := $(wildcard StOutDual/*.cpp)
79
 aStOutDual_OBJS := ${aStOutDual_SRCS:.cpp=.o}
80
 aStOutDual_LIB  := $(LIB) -lStShared -lStCore $(LIB_GLX) $(LIB_GTK) $(LIB_PTHREAD)
81
-$(aStOutDual) : pre_StOutDual $(aStOutDual_OBJS)
82
+$(aStOutDual) : pre_StOutDual $(aStCore) $(aStOutDual_OBJS)
83
    $(LD) -shared $(LDFLAGS) $(LIBDIR) $(aStOutDual_OBJS) $(aStOutDual_LIB) -o $(BUILD_ROOT)/$(aStOutDual)
84
 pre_StOutDual:
85
    cp -f -r StOutDual/lang/english/* $(BUILD_ROOT)/lang/English/
86
    cp -f -r StOutDual/lang/russian/* $(BUILD_ROOT)/lang/русский/
87
    cp -f -r StOutDual/lang/french/*  $(BUILD_ROOT)/lang/français/
88
    cp -f -r StOutDual/lang/german/*  $(BUILD_ROOT)/lang/Deutsch/
89
+   cp -f -r StOutDual/lang/czech/*   $(BUILD_ROOT)/lang/Czech/
90
 clean_StOutDual:
91
    rm -f $(BUILD_ROOT)/$(aStOutDual)
92
    rm -rf StOutDual/*.o
93
@@ -215,7 +226,7 @@
94
 aStOutIZ3D_SRCS := $(wildcard StOutIZ3D/*.cpp)
95
 aStOutIZ3D_OBJS := ${aStOutIZ3D_SRCS:.cpp=.o}
96
 aStOutIZ3D_LIB  := $(LIB) -lStShared -lStCore $(LIB_GLX) $(LIB_GTK) $(LIB_PTHREAD)
97
-$(aStOutIZ3D) : pre_StOutIZ3D $(aStOutIZ3D_OBJS)
98
+$(aStOutIZ3D) : pre_StOutIZ3D $(aStCore) $(aStOutIZ3D_OBJS)
99
    $(LD) -shared $(LDFLAGS) $(LIBDIR) $(aStOutIZ3D_OBJS) $(aStOutIZ3D_LIB) -o $(BUILD_ROOT)/$(aStOutIZ3D)
100
 pre_StOutIZ3D:
101
    mkdir -p $(BUILD_ROOT)/shaders/StOutIZ3D/
102
@@ -224,6 +235,7 @@
103
    cp -f -r StOutIZ3D/lang/russian/* $(BUILD_ROOT)/lang/русский/
104
    cp -f -r StOutIZ3D/lang/french/*  $(BUILD_ROOT)/lang/français/
105
    cp -f -r StOutIZ3D/lang/german/*  $(BUILD_ROOT)/lang/Deutsch/
106
+   cp -f -r StOutIZ3D/lang/czech/*   $(BUILD_ROOT)/lang/Czech/
107
 clean_StOutIZ3D:
108
    rm -f $(BUILD_ROOT)/$(aStOutIZ3D)
109
    rm -rf StOutIZ3D/*.o
110
@@ -234,7 +246,7 @@
111
 aStOutInterlace_SRCS := $(wildcard StOutInterlace/*.cpp)
112
 aStOutInterlace_OBJS := ${aStOutInterlace_SRCS:.cpp=.o}
113
 aStOutInterlace_LIB  := $(LIB) -lStShared -lStCore $(LIB_GLX) $(LIB_GTK) $(LIB_PTHREAD)
114
-$(aStOutInterlace) : pre_StOutInterlace $(aStOutInterlace_OBJS)
115
+$(aStOutInterlace) : pre_StOutInterlace $(aStCore) $(aStOutInterlace_OBJS)
116
    $(LD) -shared $(LDFLAGS) $(LIBDIR) $(aStOutInterlace_OBJS) $(aStOutInterlace_LIB) -o $(BUILD_ROOT)/$(aStOutInterlace)
117
 pre_StOutInterlace:
118
    mkdir -p $(BUILD_ROOT)/shaders/StOutInterlace/
119
@@ -243,6 +255,7 @@
120
    cp -f -r StOutInterlace/lang/russian/* $(BUILD_ROOT)/lang/русский/
121
    cp -f -r StOutInterlace/lang/french/*  $(BUILD_ROOT)/lang/français/
122
    cp -f -r StOutInterlace/lang/german/*  $(BUILD_ROOT)/lang/Deutsch/
123
+   cp -f -r StOutInterlace/lang/czech/*   $(BUILD_ROOT)/lang/Czech/
124
 clean_StOutInterlace:
125
    rm -f $(BUILD_ROOT)/$(aStOutInterlace)
126
    rm -rf StOutInterlace/*.o
127
@@ -253,13 +266,14 @@
128
 aStOutPageFlip_SRCS := $(wildcard StOutPageFlip/*.cpp)
129
 aStOutPageFlip_OBJS := ${aStOutPageFlip_SRCS:.cpp=.o}
130
 aStOutPageFlip_LIB  := $(LIB) -lStShared -lStCore $(LIB_GLX) $(LIB_GTK) $(LIB_PTHREAD)
131
-$(aStOutPageFlip) : pre_StOutPageFlip $(aStOutPageFlip_OBJS)
132
+$(aStOutPageFlip) : pre_StOutPageFlip $(aStCore) $(aStOutPageFlip_OBJS)
133
    $(LD) -shared $(LDFLAGS) $(LIBDIR) $(aStOutPageFlip_OBJS) $(aStOutPageFlip_LIB) -o $(BUILD_ROOT)/$(aStOutPageFlip)
134
 pre_StOutPageFlip:
135
    cp -f -r StOutPageFlip/lang/english/* $(BUILD_ROOT)/lang/English/
136
    cp -f -r StOutPageFlip/lang/russian/* $(BUILD_ROOT)/lang/русский/
137
    cp -f -r StOutPageFlip/lang/french/*  $(BUILD_ROOT)/lang/français/
138
    cp -f -r StOutPageFlip/lang/german/*  $(BUILD_ROOT)/lang/Deutsch/
139
+   cp -f -r StOutPageFlip/lang/czech/*   $(BUILD_ROOT)/lang/Czech/
140
 clean_StOutPageFlip:
141
    rm -f $(BUILD_ROOT)/$(aStOutPageFlip)
142
    rm -rf StOutPageFlip/*.o
143
@@ -269,13 +283,14 @@
144
 aStOutDistorted_SRCS := $(wildcard StOutDistorted/*.cpp)
145
 aStOutDistorted_OBJS := ${aStOutDistorted_SRCS:.cpp=.o}
146
 aStOutDistorted_LIB  := $(LIB) -lStShared -lStCore $(LIB_GLX) $(LIB_GTK) $(LIB_PTHREAD)
147
-$(aStOutDistorted) : pre_StOutDistorted $(aStOutDistorted_OBJS)
148
+$(aStOutDistorted) : pre_StOutDistorted $(aStCore) $(aStOutDistorted_OBJS)
149
    $(LD) -shared $(LDFLAGS) $(LIBDIR) $(aStOutDistorted_OBJS) $(aStOutDistorted_LIB) -o $(BUILD_ROOT)/$(aStOutDistorted)
150
 pre_StOutDistorted:
151
    cp -f -r StOutDistorted/lang/english/* $(BUILD_ROOT)/lang/English/
152
    cp -f -r StOutDistorted/lang/russian/* $(BUILD_ROOT)/lang/русский/
153
    cp -f -r StOutDistorted/lang/french/*  $(BUILD_ROOT)/lang/français/
154
    cp -f -r StOutDistorted/lang/german/*  $(BUILD_ROOT)/lang/Deutsch/
155
+   cp -f -r StOutDistorted/lang/czech/*   $(BUILD_ROOT)/lang/Czech/
156
 clean_StOutDistorted:
157
    rm -f $(BUILD_ROOT)/$(aStOutDistorted)
158
    rm -rf StOutDistorted/*.o
159
@@ -285,13 +300,14 @@
160
 aStImageViewer_SRCS := $(wildcard StImageViewer/*.cpp)
161
 aStImageViewer_OBJS := ${aStImageViewer_SRCS:.cpp=.o}
162
 aStImageViewer_LIB  := $(LIB) -lStGLWidgets -lStShared -lStCore $(LIB_OUTPUTS) $(LIB_GLX) $(LIB_GTK) $(LIB_PTHREAD)
163
-$(aStImageViewer) : pre_StImageViewer $(aStImageViewer_OBJS)
164
+$(aStImageViewer) : pre_StImageViewer $(aStGLWidgets) outputs_all $(aStImageViewer_OBJS)
165
    $(LD) -shared $(LDFLAGS) $(LIBDIR) $(aStImageViewer_OBJS) $(aStImageViewer_LIB) -o $(BUILD_ROOT)/$(aStImageViewer)
166
 pre_StImageViewer:
167
    cp -f -r StImageViewer/lang/english/* $(BUILD_ROOT)/lang/English/
168
    cp -f -r StImageViewer/lang/russian/* $(BUILD_ROOT)/lang/русский/
169
    cp -f -r StImageViewer/lang/french/*  $(BUILD_ROOT)/lang/français/
170
    cp -f -r StImageViewer/lang/german/*  $(BUILD_ROOT)/lang/Deutsch/
171
+   cp -f -r StImageViewer/lang/czech/*   $(BUILD_ROOT)/lang/Czech/
172
 clean_StImageViewer:
173
    rm -f $(BUILD_ROOT)/$(aStImageViewer)
174
    rm -rf StImageViewer/*.o
175
@@ -305,13 +321,14 @@
176
 aStMoviePlayer_SRCS3 := $(wildcard StMoviePlayer/*.c)
177
 aStMoviePlayer_OBJS3 := ${aStMoviePlayer_SRCS3:.c=.o}
178
 aStMoviePlayer_LIB   := $(LIB) -lStGLWidgets -lStShared -lStCore $(LIB_OUTPUTS) $(LIB_GLX) $(LIB_GTK) -lavutil -lavformat -lavcodec -lswscale -lopenal $(LIB_PTHREAD)
179
-$(aStMoviePlayer) : pre_StMoviePlayer $(aStMoviePlayer_OBJS1) $(aStMoviePlayer_OBJS2) $(aStMoviePlayer_OBJS3)
180
+$(aStMoviePlayer) : pre_StMoviePlayer $(aStGLWidgets) outputs_all $(aStMoviePlayer_OBJS1) $(aStMoviePlayer_OBJS2) $(aStMoviePlayer_OBJS3)
181
    $(LD) -shared $(LDFLAGS) $(LIBDIR) $(aStMoviePlayer_OBJS1) $(aStMoviePlayer_OBJS2) $(aStMoviePlayer_OBJS3) $(aStMoviePlayer_LIB) -o $(BUILD_ROOT)/$(aStMoviePlayer)
182
 pre_StMoviePlayer:
183
    cp -f -r StMoviePlayer/lang/english/* $(BUILD_ROOT)/lang/English/
184
    cp -f -r StMoviePlayer/lang/russian/* $(BUILD_ROOT)/lang/русский/
185
    cp -f -r StMoviePlayer/lang/french/*  $(BUILD_ROOT)/lang/français/
186
    cp -f -r StMoviePlayer/lang/german/*  $(BUILD_ROOT)/lang/Deutsch/
187
+   cp -f -r StMoviePlayer/lang/czech/*   $(BUILD_ROOT)/lang/Czech/
188
    cp -f -r StMoviePlayer/web/*          $(BUILD_ROOT)/web/
189
 clean_StMoviePlayer:
190
    rm -f $(BUILD_ROOT)/$(aStMoviePlayer)
191
@@ -324,13 +341,14 @@
192
 aStDiagnostics_SRCS := $(wildcard StDiagnostics/*.cpp)
193
 aStDiagnostics_OBJS := ${aStDiagnostics_SRCS:.cpp=.o}
194
 aStDiagnostics_LIB  := $(LIB) -lStGLWidgets -lStShared -lStCore $(LIB_OUTPUTS) $(LIB_GLX) $(LIB_GTK) $(LIB_PTHREAD)
195
-$(aStDiagnostics) : pre_StDiagnostics $(aStDiagnostics_OBJS)
196
+$(aStDiagnostics) : pre_StDiagnostics $(aStGLWidgets) outputs_all $(aStDiagnostics_OBJS)
197
    $(LD) -shared $(LDFLAGS) $(LIBDIR) $(aStDiagnostics_OBJS) $(aStDiagnostics_LIB) -o $(BUILD_ROOT)/$(aStDiagnostics)
198
 pre_StDiagnostics:
199
    cp -f -r StDiagnostics/lang/english/* $(BUILD_ROOT)/lang/English/
200
    cp -f -r StDiagnostics/lang/russian/* $(BUILD_ROOT)/lang/русский/
201
sview-15_08.tar.gz/StCADViewer/StCADViewer.cpp -> sview-15_10.tar.gz/StCADViewer/StCADViewer.cpp Changed
34
 
1
@@ -260,7 +260,7 @@
2
     return open();
3
 }
4
 
5
-void StCADViewer::releaseDevice() {
6
+void StCADViewer::saveAllParams() {
7
     if(!myGUI.isNull()) {
8
         mySettings->saveParam(ST_PARAM_NORMALS,     params.toShowNormals);
9
         mySettings->saveParam(ST_PARAM_TRIHEDRON,   params.toShowTrihedron);
10
@@ -269,7 +269,11 @@
11
         mySettings->saveInt32(ST_SETTING_FPSTARGET, params.TargetFps);
12
         mySettings->saveParam(ST_SETTING_SHOW_FPS,  params.ToShowFps);
13
     }
14
+    mySettings->flush();
15
+}
16
 
17
+void StCADViewer::releaseDevice() {
18
+    saveAllParams();
19
     if(!myContext.isNull()) {
20
         if(myNormalsMesh != NULL) {
21
             myNormalsMesh->release(*myContext);
22
@@ -374,6 +378,11 @@
23
     return true;
24
 }
25
 
26
+void StCADViewer::doPause(const StPauseEvent& theEvent) {
27
+    StApplication::doPause(theEvent);
28
+    saveAllParams();
29
+}
30
+
31
 void StCADViewer::doResize(const StSizeEvent& ) {
32
     if(myGUI.isNull()) {
33
         return;
34
sview-15_08.tar.gz/StCADViewer/StCADViewer.h -> sview-15_10.tar.gz/StCADViewer/StCADViewer.h Changed
17
 
1
@@ -68,6 +68,7 @@
2
 
3
         private: //! @name window events slots
4
 
5
+    ST_LOCAL virtual void doPause    (const StPauseEvent&  theEvent);
6
     ST_LOCAL virtual void doResize   (const StSizeEvent&   theEvent);
7
     ST_LOCAL virtual void doKeyDown  (const StKeyEvent&    theEvent);
8
     ST_LOCAL virtual void doKeyHold  (const StKeyEvent&    theEvent);
9
@@ -137,6 +138,7 @@
10
      * Release GL resources.
11
      */
12
     ST_LOCAL void releaseDevice();
13
+    ST_LOCAL void saveAllParams();
14
 
15
         private: //!< private callback Slots
16
 
17
sview-15_08.tar.gz/StCADViewer/StCADViewerGUI.cpp -> sview-15_10.tar.gz/StCADViewer/StCADViewerGUI.cpp Changed
11
 
1
@@ -192,7 +192,8 @@
2
     if((theView == ST_DRAW_LEFT || theView == ST_DRAW_MONO)
3
     && myFpsWidget != NULL) {
4
         myFpsWidget->update(myPlugin->getMainWindow()->isStereoOutput(),
5
-                            myPlugin->getMainWindow()->getTargetFps());
6
+                            myPlugin->getMainWindow()->getTargetFps(),
7
+                            myPlugin->getMainWindow()->getStatistics());
8
     }
9
     StGLRootWidget::stglDraw(theView);
10
 }
11
sview-15_10.tar.gz/StCADViewer/lang/czech Added
2
 
1
+(directory)
2
sview-15_10.tar.gz/StCADViewer/lang/czech/StCADViewer.lng Added
28
 
1
@@ -0,0 +1,26 @@
2
+# Czech translation file for StCADViewer
3
+# @author Kirill Gavrilov
4
+# @translator Marek Audy
5
+--------
6
+1200=Zobrazení
7
+1201=Typ projekce
8
+1202=Celá obrazovka
9
+1203=Zobrazit normálně
10
+1204=Zobrazit trihedron (průsečík xyz)
11
+1205=Dvě světla
12
+1206=Projekce
13
+1207=Režim výplň
14
+1208=Přidat soubor
15
+1240=Ortogonální
16
+1241=Perspektivní
17
+1242=Stereo
18
+1250=Síť
19
+1251=Stínování
20
+1252=Stínování + Síť
21
+1500=Pomoc
22
+1501=O aplikaci...
23
+1503=Licence
24
+1504=Language
25
+3000=sView - Aplikace pro zobrazení CAD modelů
26
+3001=Verze
27
+3002=Aplikace podporuje CAD soubory ve formátu IGES, STEP, BREP s využitím OpenCASCADE Technology.\n © 2011-2014 Гаврилов Кирилл (kirill@sview.ru).\nOficiální stránky: www.sview.ru
28
sview-15_10.tar.gz/StCADViewer/lang/czech/language.lng Added
4
 
1
@@ -0,0 +1,1 @@
2
+Čeština
3
\ No newline at end of file
4
sview-15_08.tar.gz/StCore/StAndroidGlue.cpp -> sview-15_10.tar.gz/StCore/StAndroidGlue.cpp Changed
183
 
1
@@ -1,5 +1,5 @@
2
 /**
3
- * Copyright © 2014 Kirill Gavrilov <kirill@sview.ru>
4
+ * Copyright © 2014-2015 Kirill Gavrilov <kirill@sview.ru>
5
  *
6
  * StCore library is free software: you can redistribute it and/or modify
7
  * it under the terms of the GNU Lesser General Public License as published by
8
@@ -26,6 +26,9 @@
9
 #include <StThreads/StThread.h>
10
 #include <StStrings/StLogger.h>
11
 
12
+#include <jni.h>
13
+#define jexp extern "C" JNIEXPORT
14
+
15
 StCString StAndroidGlue::getCommandIdName(StAndroidGlue::CommandId theCmd) {
16
     switch(theCmd) {
17
         case StAndroidGlue::CommandId_InputChanged:  return stCString("InputChanged");
18
@@ -43,6 +46,7 @@
19
         case StAndroidGlue::CommandId_Pause:         return stCString("Pause");
20
         case StAndroidGlue::CommandId_Stop:          return stCString("Stop");
21
         case StAndroidGlue::CommandId_Destroy:       return stCString("Destroy");
22
+        case StAndroidGlue::CommandId_BackPressed:   return stCString("BackPressed");
23
     }
24
     return stCString("UNKNOWN");
25
 }
26
@@ -65,6 +69,9 @@
27
   myThJniEnv(NULL),
28
   myMsgRead(0),
29
   myMsgWrite(0),
30
+  myHasOrientSensor(false),
31
+  myIsPoorOrient(false),
32
+  myToTrackOrient(false),
33
   myIsRunning(false),
34
   myIsStateSaved(false),
35
   myToDestroy(false) {
36
@@ -140,6 +147,7 @@
37
     jclass      aJClassIntent       = aJniEnv->GetObjectClass(aJIntent);
38
     jmethodID   aJMet_getDataString = aJniEnv->GetMethodID(aJClassIntent, "getDataString", "()Ljava/lang/String;");
39
     jmethodID   aJMet_getType       = aJniEnv->GetMethodID(aJClassIntent, "getType",       "()Ljava/lang/String;");
40
+    jmethodID   aJMet_getFlags      = aJniEnv->GetMethodID(aJClassIntent, "getFlags",      "()I");
41
 
42
     // retrieve data path
43
     jstring     aJString      = (jstring )aJniEnv->CallObjectMethod(aJIntent, aJMet_getDataString);
44
@@ -148,13 +156,14 @@
45
     aJniEnv->ReleaseStringUTFChars(aJString, aJStringStr);
46
 
47
     // retrieve data type
48
+    int aFlags    = aJniEnv->CallIntMethod(aJIntent, aJMet_getFlags);
49
     aJString      = (jstring )aJniEnv->CallObjectMethod(aJIntent, aJMet_getType);
50
     aJStringStr   = aJniEnv->GetStringUTFChars(aJString, 0);
51
     const StString aDataType = aJStringStr;
52
     aJniEnv->ReleaseStringUTFChars(aJString, aJStringStr);
53
 
54
     // reset intent in Activity
55
-    aJniEnv->CallObjectMethod(myActivity->clazz, aJMet_setIntent, NULL);
56
+    aJniEnv->CallVoidMethod(myActivity->clazz, aJMet_setIntent, NULL);
57
 
58
     const StString ST_FILE_PROTOCOL("file://");
59
     if(aDataPath.isStartsWith(ST_FILE_PROTOCOL)) {
60
@@ -163,22 +172,34 @@
61
         aDataPath.fromUrl(aPath);
62
     }
63
 
64
-    StMutexAuto aLock(myDndLock);
65
-    myDndPath = aDataPath;
66
+    StMutexAuto aLock(myFetchLock);
67
+    if(myCreatePath.isEmpty()) {
68
+        myCreatePath = aDataPath;
69
+    }
70
+    // FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY
71
+    // ignore outdated intent from history list - use C++ recent list instead
72
+    if((aFlags & 0x00100000) == 0) {
73
+        myDndPath = aDataPath;
74
+    }
75
 }
76
 
77
-bool StAndroidGlue::popOpenNewFile(StString& theNewFile) {
78
-    StMutexAuto aLock(myDndLock);
79
-    if(myDndPath.isEmpty()) {
80
-        return false;
81
+void StAndroidGlue::fetchState(StString&             theNewFile,
82
+                               StQuaternion<double>& theQuaternion) {
83
+    StMutexAuto aLock(myFetchLock);
84
+    theQuaternion = myQuaternion;
85
+    if(!myDndPath.isEmpty()) {
86
+        theNewFile = myDndPath;
87
+        myDndPath.clear();
88
     }
89
-
90
-    theNewFile = myDndPath;
91
-    myDndPath.clear();
92
-    return true;
93
 }
94
 
95
 void StAndroidGlue::start() {
96
+    // workaround NativeActivity design issues - notify Java StActivity class about C++ pointer to StAndroidGlue instance
97
+    JNIEnv* aJniEnv = myActivity->env;
98
+    jclass    aJClassActivity   = aJniEnv->GetObjectClass(myActivity->clazz);
99
+    jmethodID aJMet_setInstance = aJniEnv->GetMethodID(aJClassActivity, "setCppInstance", "(J)V");
100
+    aJniEnv->CallVoidMethod(myActivity->clazz, aJMet_setInstance, (jlong )this);
101
+
102
     myThread = new StThread(threadEntryWrapper, this, "StAndroidGlue");
103
 
104
     // Wait for thread to start
105
@@ -190,6 +211,15 @@
106
 }
107
 
108
 StAndroidGlue::~StAndroidGlue() {
109
+    // workaround NativeActivity design issues - notify Java StActivity class about C++ pointer to StAndroidGlue instance
110
+    if(myActivity != NULL
111
+    && myActivity->env != NULL) {
112
+        JNIEnv* aJniEnv = myActivity->env;
113
+        jclass    aJClassActivity   = aJniEnv->GetObjectClass(myActivity->clazz);
114
+        jmethodID aJMet_setInstance = aJniEnv->GetMethodID(aJClassActivity, "setCppInstance", "(J)V");
115
+        aJniEnv->CallVoidMethod(myActivity->clazz, aJMet_setInstance, (jlong )0);
116
+    }
117
+
118
     pthread_mutex_lock(&myMutex);
119
     writeCommand(CommandId_Destroy);
120
     pthread_mutex_unlock(&myMutex);
121
@@ -608,4 +638,61 @@
122
     return aSavedState;
123
 }
124
 
125
+void StAndroidGlue::setTrackOrientation(const bool theToTrack) {
126
+    if(myToTrackOrient == theToTrack
127
+    || myActivity == NULL
128
+    || myThJniEnv == NULL) {
129
+        return;
130
+    }
131
+
132
+    jclass    aJClassActivity = myThJniEnv->GetObjectClass(myActivity->clazz);
133
+    jmethodID aJMet           = myThJniEnv->GetMethodID(aJClassActivity, "setTrackOrientation", "(Z)V");
134
+    myThJniEnv->CallVoidMethod(myActivity->clazz, aJMet, (jboolean )(theToTrack ? JNI_TRUE : JNI_FALSE));
135
+    myToTrackOrient = theToTrack;
136
+}
137
+
138
+void StAndroidGlue::setQuaternion(const StQuaternion<float>& theQ, const float theScreenRotDeg) {
139
+    // do the magic - convert quaternion from Android coordinate system to sView coordinate system
140
+    const StQuaternion<double> anOriPitch = StQuaternion<double>(StVec3<double>::DX(), stToRadians(90.0));
141
+    const StQuaternion<double> anOriRoll  = StQuaternion<double>(StVec3<double>::DZ(), stToRadians(-270.0 + (double )theScreenRotDeg));
142
+    const StQuaternion<double> anOriAnd((double )theQ.y(), (double )theQ.z(), (double )theQ.x(), (double )theQ.w());
143
+    StQuaternion<double> anOri = StQuaternion<double>::multiply(anOriAnd, anOriPitch);
144
+    anOri = StQuaternion<double>::multiply(anOriRoll, anOri);
145
+
146
+    StMutexAuto aLock(myFetchLock);
147
+    myQuaternion = anOri;
148
+}
149
+
150
+void StAndroidGlue::setOrientation(float theAzimuthDeg, float thePitchDeg, float theRollDeg, float theScreenRotDeg) {
151
+    const StQuaternion<double> anOriYaw   = StQuaternion<double>(StVec3<double>::DY(), stToRadians((double )theAzimuthDeg));
152
+    const StQuaternion<double> anOriPitch = StQuaternion<double>(StVec3<double>::DX(), stToRadians(90.0 + (double )thePitchDeg));
153
+    const StQuaternion<double> anOriRoll  = StQuaternion<double>(StVec3<double>::DZ(), stToRadians((double )-theRollDeg + (double )theScreenRotDeg));
154
+    StQuaternion<double> anOri = StQuaternion<double>::multiply(anOriPitch, anOriYaw);
155
+    anOri = StQuaternion<double>::multiply(anOriRoll, anOri);
156
+
157
+    StMutexAuto aLock(myFetchLock);
158
+    myQuaternion = anOri;
159
+}
160
+
161
+jexp void JNICALL Java_com_sview_StActivity_cppOnBackPressed(JNIEnv* theEnv, jobject theObj, jlong theCppPtr) {
162
+    ((StAndroidGlue* )theCppPtr)->writeCommand(StAndroidGlue::CommandId_BackPressed);
163
+}
164
+
165
+jexp void JNICALL Java_com_sview_StActivity_cppDefineOrientationSensor(JNIEnv* theEnv, jobject theObj, jlong theCppPtr,
166
+                                                                       jboolean theHasOri, jboolean theIsPoorOri) {
167
+    ((StAndroidGlue* )theCppPtr)->defineOrientationSensor(theHasOri == JNI_TRUE, theIsPoorOri == JNI_TRUE);
168
+}
169
+
170
+jexp void JNICALL Java_com_sview_StActivity_cppSetQuaternion(JNIEnv* theEnv, jobject theObj, jlong theCppPtr,
171
+                                                             jfloat theX, jfloat theY, jfloat theZ, jfloat theW,
172
+                                                             jfloat theScreenRotDeg) {
173
+    ((StAndroidGlue* )theCppPtr)->setQuaternion(StQuaternion<float>(theX, theY, theZ, theW), theScreenRotDeg);
174
+}
175
+
176
+jexp void JNICALL Java_com_sview_StActivity_cppSetOrientation(JNIEnv* theEnv, jobject theObj, jlong theCppPtr,
177
+                                                              jfloat theAzimuthDeg, jfloat thePitchDeg, jfloat theRollDeg,
178
+                                                              jfloat theScreenRotDeg) {
179
+    ((StAndroidGlue* )theCppPtr)->setOrientation(theAzimuthDeg, thePitchDeg, theRollDeg, theScreenRotDeg);
180
+}
181
+
182
 #endif // __ANDROID__
183
sview-15_08.tar.gz/StCore/StApplication.cpp -> sview-15_10.tar.gz/StCore/StApplication.cpp Changed
40
 
1
@@ -229,6 +229,7 @@
2
         // connect slots
3
         myWindow->signals.onRedraw    = stSlot(this, &StApplication::doDrawProxy);
4
         myWindow->signals.onClose     = stSlot(this, &StApplication::doClose);
5
+        myWindow->signals.onPause     = stSlot(this, &StApplication::doPause);
6
         myWindow->signals.onResize    = stSlot(this, &StApplication::doResize);
7
         myWindow->signals.onAction    = stSlot(this, &StApplication::doAction);
8
         myWindow->signals.onKeyDown   = stSlot(this, &StApplication::doKeyDown);
9
@@ -318,6 +319,12 @@
10
     exit(0);
11
 }
12
 
13
+void StApplication::doPause(const StPauseEvent& ) {
14
+    if(!myWindow.isNull()) {
15
+        myWindow->beforeClose();
16
+    }
17
+}
18
+
19
 const StHandle<StAction>& StApplication::getAction(const int theActionId) {
20
     return myActions[theActionId];
21
     //return myActions.at(theActionId);
22
@@ -350,9 +357,17 @@
23
         anIter != myActions.end(); ++anIter) {
24
         const StHandle<StAction>& anAction = anIter->second;
25
         if(anAction->getHotKey1() != 0) {
26
+            StHandle<StAction> anOldAction = getActionForKey(anAction->getHotKey1());
27
+            if(!anOldAction.isNull()) {
28
+                anOldAction->setHotKey1(0);
29
+            }
30
             myKeyActions[anAction->getHotKey1()] = anAction;
31
         }
32
         if(anAction->getHotKey2() != 0) {
33
+            StHandle<StAction> anOldAction = getActionForKey(anAction->getHotKey2());
34
+            if(!anOldAction.isNull()) {
35
+                anOldAction->setHotKey2(0);
36
+            }
37
             myKeyActions[anAction->getHotKey2()] = anAction;
38
         }
39
     }
40
sview-15_08.tar.gz/StCore/StCocoaView.h -> sview-15_10.tar.gz/StCore/StCocoaView.h Changed
21
 
1
@@ -1,5 +1,5 @@
2
 /**
3
- * Copyright © 2011-2013 Kirill Gavrilov <kirill@sview.ru>
4
+ * Copyright © 2011-2015 Kirill Gavrilov <kirill@sview.ru>
5
  *
6
  * StCore library is free software: you can redistribute it and/or modify
7
  * it under the terms of the GNU Lesser General Public License as published by
8
@@ -63,6 +63,12 @@
9
          */
10
         - (void ) goToWindowed: (id ) theSender;
11
 
12
+        /**
13
+         * Update window caption.
14
+         * This method should be called from main thread!
15
+         */
16
+        - (void ) updateTitle: (id ) theSender;
17
+
18
     @end
19
 #else
20
     class StCocoaView;
21
sview-15_08.tar.gz/StCore/StCocoaView.mm -> sview-15_10.tar.gz/StCore/StCocoaView.mm Changed
30
 
1
@@ -25,6 +25,8 @@
2
 #include <StStrings/StLogger.h>
3
 #include <StTemplates/StRect.h>
4
 
5
+#include <StCocoa/StCocoaString.h>
6
+
7
 #if !defined(MAC_OS_X_VERSION_10_7) || (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7)
8
 @interface NSOpenGLView (LionAPI)
9
     - (void )setWantsBestResolutionOpenGLSurface: (BOOL )theFlag;
10
@@ -449,6 +451,19 @@
11
         [aWin setLevel: NSNormalWindowLevel];
12
         [aWin setFrame: myRectWindowed display: YES];
13
         [aWin makeFirstResponder: self];
14
+
15
+        StCocoaString aTitle(myStWin->getTitle());
16
+        [aWin setTitle: aTitle.toStringNs()];
17
+    }
18
+
19
+    - (void ) updateTitle: (id ) theSender {
20
+        NSWindow* aWin = [self window];
21
+        if(aWin == NULL) {
22
+            return;
23
+        }
24
+
25
+        StCocoaString aTitle(myStWin->getTitle());
26
+        [aWin setTitle: aTitle.toStringNs()];
27
     }
28
 
29
     - (NSDragOperation ) draggingEntered: (id <NSDraggingInfo> ) theSender {
30
sview-15_08.tar.gz/StCore/StWindow.cpp -> sview-15_10.tar.gz/StCore/StWindow.cpp Changed
65
 
1
@@ -28,6 +28,7 @@
2
     params.VSyncMode->changeValues().add("Mixed");
3
 
4
     myWin->signals.onClose     = &signals.onClose;
5
+    myWin->signals.onPause     = &signals.onPause;
6
     myWin->signals.onResize    = &signals.onResize;
7
     myWin->signals.onAnotherMonitor = &signals.onAnotherMonitor;
8
     myWin->signals.onKeyUp     = &signals.onKeyUp;
9
@@ -93,6 +94,10 @@
10
     return myWin->isActive();
11
 }
12
 
13
+bool StWindow::isPaused() const {
14
+    return myWin->myIsPaused;
15
+}
16
+
17
 bool StWindow::isLostDevice() const {
18
     return myWin->myToResetDevice;
19
 }
20
@@ -173,6 +178,10 @@
21
     return myWin->getPlacement();
22
 }
23
 
24
+StRectI_t StWindow::getWindowedPlacement() const {
25
+    return myWin->myRectNorm;
26
+}
27
+
28
 bool StWindow::isMovable() const {
29
     return myWin->myParentWin == NULL;
30
 }
31
@@ -353,3 +362,33 @@
32
     return NULL;
33
 #endif
34
 }
35
+
36
+const StString& StWindow::getStatistics() const {
37
+    return myWin->myStatistics;
38
+}
39
+
40
+bool StWindow::hasOrientationSensor() const {
41
+    return myWin->myHasOrientSensor;
42
+}
43
+
44
+bool StWindow::isPoorOrientationSensor() const {
45
+    return myWin->myIsPoorOrient;
46
+}
47
+
48
+bool StWindow::toTrackOrientation() const {
49
+    return myWin->myToTrackOrient;
50
+}
51
+
52
+void StWindow::setTrackOrientation(const bool theToTrack) {
53
+    if(myWin->myHasOrientSensor) {
54
+        myWin->myToTrackOrient = theToTrack;
55
+    }
56
+}
57
+
58
+StQuaternion<double> StWindow::getDeviceOrientation() const {
59
+    if(myWin->myToTrackOrient
60
+    && myWin->myHasOrientSensor) {
61
+        return myWin->myQuaternion;
62
+    }
63
+    return StQuaternion<double>();
64
+}
65
sview-15_08.tar.gz/StCore/StWindowImpl.cpp -> sview-15_10.tar.gz/StCore/StWindowImpl.cpp Changed
53
 
1
@@ -56,6 +56,9 @@
2
   myParentWin(theParentWindow),
3
   myWindowTitle(WINDOW_TITLE_DEFAULT),
4
   myInitState(STWIN_INITNOTSTART),
5
+  myHasOrientSensor(false),
6
+  myIsPoorOrient(false),
7
+  myToTrackOrient(false),
8
   myMousePt(0.5, 0.5),
9
   myRectNorm(128, 512, 128, 512),
10
   myRectFull(128, 512, 128, 512),
11
@@ -78,7 +81,9 @@
12
   myToResetDevice(false),
13
   myIsUpdated(false),
14
   myIsActive(false),
15
+  myIsPaused(false),
16
   myBlockSleep(BlockSleep_OFF),
17
+  myIsSystemLocked(false),
18
   myIsDispChanged(false),
19
   myLastEventsTime(0.0),
20
   myEventsThreaded(false),
21
@@ -453,7 +458,8 @@
22
     #ifndef ES_AWAYMODE_REQUIRED // for old MinGW
23
         #define ES_AWAYMODE_REQUIRED ((DWORD)0x00000040)
24
     #endif
25
-    if(attribs.ToBlockSleepDisplay) {
26
+    if(attribs.ToBlockSleepDisplay
27
+    && !myIsSystemLocked) {
28
         // prevent display sleep - call this periodically
29
         EXECUTION_STATE aState = ES_CONTINUOUS | ES_DISPLAY_REQUIRED | ES_SYSTEM_REQUIRED;
30
         if(myIsVistaPlus) {
31
@@ -616,7 +622,10 @@
32
 /*#if defined(__ANDROID__)
33
     myIsActive = (myMaster.eglSurface != EGL_NO_SURFACE);
34
 #else*/
35
-    if(attribs.IsFullScreen) {
36
+    if(myIsSystemLocked) {
37
+        myIsActive = false;
38
+        return;
39
+    } else if(attribs.IsFullScreen) {
40
         myIsActive = true;
41
         return;
42
     }
43
@@ -1004,6 +1013,9 @@
44
             case stEvent_Close:
45
                 signals.onClose->emit(anEvent.Close);
46
                 break;
47
+            case stEvent_Pause:
48
+                signals.onPause->emit(anEvent.Pause);
49
+                break;
50
             case stEvent_Size:
51
                 signals.onResize->emit(anEvent.Size);
52
                 break;
53
sview-15_08.tar.gz/StCore/StWindowImpl.h -> sview-15_10.tar.gz/StCore/StWindowImpl.h Changed
46
 
1
@@ -1,5 +1,5 @@
2
 /**
3
- * Copyright © 2007-2014 Kirill Gavrilov <kirill@sview.ru>
4
+ * Copyright © 2007-2015 Kirill Gavrilov <kirill@sview.ru>
5
  *
6
  * StCore library is free software: you can redistribute it and/or modify
7
  * it under the terms of the GNU Lesser General Public License as published by
8
@@ -59,6 +59,7 @@
9
                           const StNativeWin_t                theParentWindow);
10
     ST_LOCAL ~StWindowImpl();
11
     ST_LOCAL void close();
12
+    ST_LOCAL const StString& getTitle() const { return myWindowTitle; }
13
     ST_LOCAL void setTitle(const StString& theTitle);
14
     ST_LOCAL bool hasDepthBuffer() const { return attribs.GlDepthSize != 0; }
15
     ST_LOCAL void getAttributes(StWinAttr* theAttributes) const;
16
@@ -276,6 +277,11 @@
17
 
18
     StString           myWindowTitle;     //!< window caption
19
     int                myInitState;       //!< initialization error code
20
+    StString           myStatistics;      //!< extra statistics
21
+    StQuaternion<double> myQuaternion;    //!< device orientation
22
+    bool               myHasOrientSensor; //!< flag indicating that device has orientation sensors
23
+    bool               myIsPoorOrient;    //!< flag indicating that available orientation sensor provides imprecise values
24
+    bool               myToTrackOrient;   //!< track device orientation
25
 
26
     StPointD_t         myMousePt;         //!< mouse coordinates to track activity
27
     StRectI_t          myRectNorm;        //!< master window coordinates in normal     state
28
@@ -315,7 +321,9 @@
29
     bool               myToResetDevice;   //!< indicate device lost state
30
     bool               myIsUpdated;       //!< helper flag on window movements updates
31
     bool               myIsActive;        //!< window visible state
32
+    bool               myIsPaused;        //!< window is in background
33
     BlockSleep         myBlockSleep;      //!< indicates that display sleep was blocked or not
34
+    bool               myIsSystemLocked;   //!< flag indicating that user session is in locked state
35
     volatile bool      myIsDispChanged;   //!< monitors reconfiguration event
36
 
37
     /**
38
@@ -344,6 +352,7 @@
39
 
40
     struct {
41
         StSignal<void (const StCloseEvent&  )>* onClose;
42
+        StSignal<void (const StPauseEvent&  )>* onPause;
43
         StSignal<void (const StSizeEvent&   )>* onResize;
44
         StSignal<void (const StSizeEvent&   )>* onAnotherMonitor;
45
         StSignal<void (const StKeyEvent&    )>* onKeyUp;
46
sview-15_08.tar.gz/StCore/StWindowImplAnd.cpp -> sview-15_10.tar.gz/StCore/StWindowImplAnd.cpp Changed
115
 
1
@@ -1,5 +1,5 @@
2
 /**
3
- * Copyright © 2014 Kirill Gavrilov <kirill@sview.ru>
4
+ * Copyright © 2014-2015 Kirill Gavrilov <kirill@sview.ru>
5
  *
6
  * StCore library is free software: you can redistribute it and/or modify
7
  * it under the terms of the GNU Lesser General Public License as published by
8
@@ -40,14 +40,13 @@
9
         return false;
10
     }
11
 
12
+    // retrieve fixed information
13
+    myHasOrientSensor = myParentWin->hasOrientationSensor();
14
+    myIsPoorOrient    = myParentWin->isPoorOrientationSensor();
15
+
16
     myParentWin->signals.onInputEvent += stSlot(this, &StWindowImpl::onAndroidInput);
17
     myParentWin->signals.onAppCmd     += stSlot(this, &StWindowImpl::onAndroidCommand);
18
 
19
-    // Prepare to monitor accelerometer
20
-    //mySensorManager       = ASensorManager_getInstance();
21
-    //myAccelerometerSensor = ASensorManager_getDefaultSensor(mySensorManager, ASENSOR_TYPE_ACCELEROMETER);
22
-    //mySensorEventQueue    = ASensorManager_createEventQueue(mySensorManager, myParentWin->getLooper(), LooperId_USER, NULL, NULL);
23
-
24
     /*if(myParentWin->getSavedState() != NULL) {
25
         // we are starting with a previous saved state; restore from it
26
         myState = *(StSavedState* )myParentWin->getSavedState();
27
@@ -67,6 +66,7 @@
28
         if(aSource != NULL) {
29
             aSource->process(myParentWin, aSource);
30
         }
31
+
32
         if(myToResetDevice || myParentWin->ToDestroy()) {
33
             //myToResetDevice = true;
34
             myStEvent.Type       = stEvent_Close;
35
@@ -185,6 +185,7 @@
36
 }
37
 
38
 bool StWindowImpl::onAndroidInitWindow() {
39
+    myIsPaused = false;
40
     if(myParentWin->getWindow() == NULL) {
41
         return false;
42
     }
43
@@ -283,6 +284,25 @@
44
             onAndroidInitWindow();
45
             return;
46
         }
47
+        case StAndroidGlue::CommandId_BackPressed: {
48
+            myStEvent.Key.Time = getEventTime();
49
+            myStEvent.Key.VKey = ST_VK_ESCAPE;
50
+            myStEvent.Key.Char = 0;
51
+            postKeyDown(myStEvent);
52
+            postKeyUp  (myStEvent);
53
+            return;
54
+        }
55
+        case StAndroidGlue::CommandId_Resume: {
56
+            myIsPaused = false;
57
+            return;
58
+        }
59
+        case StAndroidGlue::CommandId_Pause: {
60
+            myIsPaused = true;
61
+            myStEvent.Type       = stEvent_Pause;
62
+            myStEvent.Pause.Time = getEventTime();
63
+            signals.onPause->emit(myStEvent.Pause);
64
+            return;
65
+        }
66
         case StAndroidGlue::CommandId_Stop: {
67
             if(myParentWin->getMemoryClass() < 50) {
68
                 myStEvent.Type       = stEvent_Close;
69
@@ -303,16 +323,11 @@
70
             return;
71
         }
72
         case StAndroidGlue::CommandId_FocusGained: {
73
-            /*if(myAccelerometerSensor != NULL) {
74
-                ASensorEventQueue_enableSensor(mySensorEventQueue, myAccelerometerSensor);
75
-                ASensorEventQueue_setEventRate(mySensorEventQueue, myAccelerometerSensor, (1000L / 60) * 1000);
76
-            }*/
77
+            //
78
             return;
79
         }
80
         case StAndroidGlue::CommandId_FocusLost: {
81
-            /*if(myAccelerometerSensor != NULL) {
82
-                ASensorEventQueue_disableSensor(mySensorEventQueue, myAccelerometerSensor);
83
-            }*/
84
+            //
85
             return;
86
         }
87
         case StAndroidGlue::CommandId_ConfigChanged: {
88
@@ -347,7 +362,9 @@
89
 
90
     // check onNewIntent event
91
     StString aDndFile;
92
-    if(myParentWin->popOpenNewFile(aDndFile)) {
93
+    myParentWin->setTrackOrientation(myToTrackOrient);
94
+    myParentWin->fetchState(aDndFile, myQuaternion);
95
+    if(!aDndFile.isEmpty()) {
96
         myStEvent.Type = stEvent_FileDrop;
97
         myStEvent.DNDrop.Time = getEventTime();
98
         myStEvent.DNDrop.File = aDndFile.toCString();
99
@@ -369,15 +386,6 @@
100
             break;
101
         }
102
 
103
-        /*if(aPollRes == LooperId_USER) {
104
-            if(anEngine.accelerometerSensor != NULL) {
105
-                ASensorEvent anEvent;
106
-                while(ASensorEventQueue_getEvents(anEngine.sensorEventQueue, &anEvent, 1) > 0) {
107
-                    anEvent.acceleration.x, anEvent.acceleration.y, anEvent.acceleration.z);
108
-                }
109
-            }
110
-        }*/
111
-
112
         // check if we are exiting
113
         if(myParentWin->ToDestroy()) {
114
             break;
115
sview-15_08.tar.gz/StCore/StWindowImplMac.mm -> sview-15_10.tar.gz/StCore/StWindowImplMac.mm Changed
34
 
1
@@ -40,10 +40,16 @@
2
 
3
 void StWindowImpl::setTitle(const StString& theTitle) {
4
     myWindowTitle = theTitle;
5
-    if(myMaster.hWindow != NULL) {
6
-        StCocoaLocalPool aLocalPool;
7
-        StCocoaString aTitle(myWindowTitle);
8
-        [myMaster.hWindow setTitle: aTitle.toStringNs()];
9
+    if(myMaster.hViewGl == NULL) {
10
+        return;
11
+    }
12
+
13
+    if([NSThread isMainThread]) {
14
+        [myMaster.hViewGl updateTitle: NULL];
15
+    } else {
16
+        [myMaster.hViewGl performSelectorOnMainThread: @selector(updateTitle:)
17
+                                           withObject: NULL
18
+                                        waitUntilDone: YES];
19
     }
20
 }
21
 
22
@@ -430,11 +436,6 @@
23
                                                 waitUntilDone: YES];
24
             }
25
         }
26
-        if(myMaster.hWindow != NULL) {
27
-            StCocoaLocalPool aLocalPool;
28
-            StCocoaString aTitle(myWindowTitle);
29
-            [myMaster.hWindow setTitle: aTitle.toStringNs()];
30
-        }
31
     }
32
 }
33
 
34
sview-15_08.tar.gz/StCore/StWindowImplWin.cpp -> sview-15_10.tar.gz/StCore/StWindowImplWin.cpp Changed
64
 
1
@@ -1,5 +1,5 @@
2
 /**
3
- * Copyright © 2007-2014 Kirill Gavrilov <kirill@sview.ru>
4
+ * Copyright © 2007-2015 Kirill Gavrilov <kirill@sview.ru>
5
  *
6
  * StCore library is free software: you can redistribute it and/or modify
7
  * it under the terms of the GNU Lesser General Public License as published by
8
@@ -22,6 +22,7 @@
9
 
10
 #include <StStrings/StLogger.h>
11
 #include <StThreads/StThread.h>
12
+#include <StLibrary.h>
13
 #include <StGL/StGLContext.h>
14
 
15
 #include <cmath>
16
@@ -208,6 +209,21 @@
17
                      SWP_SHOWWINDOW);
18
     }
19
 
20
+    // register handler to track session lock state (WM_WTSSESSION_CHANGE)
21
+    myIsSystemLocked = false;
22
+    typedef BOOL (WINAPI *WTSRegisterSessionNotification_t  )(HWND hWnd, DWORD dwFlags);
23
+    typedef BOOL (WINAPI *WTSUnRegisterSessionNotification_t)(HWND hWnd);
24
+    WTSRegisterSessionNotification_t   aSessNotifSetProc   = NULL;
25
+    WTSUnRegisterSessionNotification_t aSessNotifUnsetProc = NULL;
26
+    StLibrary aWtsLib;
27
+    if(aWtsLib.loadSimple("Wtsapi32.dll")
28
+    && aWtsLib.find("WTSRegisterSessionNotification",   aSessNotifSetProc)
29
+    && aWtsLib.find("WTSUnRegisterSessionNotification", aSessNotifUnsetProc)) {
30
+        #define NOTIFY_FOR_ALL_SESSIONS 1
31
+        #define NOTIFY_FOR_THIS_SESSION 0
32
+        aSessNotifSetProc(myMaster.hWindowGl, NOTIFY_FOR_THIS_SESSION);
33
+    }
34
+
35
     // always wait for message thread exit before quit
36
     myMaster.EventMsgThread.reset();
37
 
38
@@ -245,6 +261,9 @@
39
                     UnregisterHotKey(myMaster.hWindowGl, myMaster.myMKeyPrev);
40
                     UnregisterHotKey(myMaster.hWindowGl, myMaster.myMKeyNext);
41
                 }
42
+                if(aSessNotifUnsetProc != NULL) {
43
+                    aSessNotifUnsetProc(myMaster.hWindowGl);
44
+                }
45
 
46
                 mySlave.close();  // close window handles
47
                 myMaster.close();
48
@@ -444,7 +463,14 @@
49
             }
50
             break;
51
         }
52
-
53
+        case WM_WTSSESSION_CHANGE: {
54
+            if(wParam == WTS_SESSION_LOCK) {
55
+                myIsSystemLocked = true;
56
+            } else if(wParam == WTS_SESSION_UNLOCK) {
57
+                myIsSystemLocked = false;
58
+            }
59
+            break;
60
+        }
61
         case WM_CLOSE: {
62
             myStEvent.Type       = stEvent_Close;
63
             myStEvent.Close.Time = getEventTime(myEvent.time);
64
sview-15_08.tar.gz/StDiagnostics/StDiagnosticsGUI.cpp -> sview-15_10.tar.gz/StDiagnostics/StDiagnosticsGUI.cpp Changed
11
 
1
@@ -59,7 +59,8 @@
2
 
3
 void StDiagnosticsGUI::setVisibility(const StPointD_t& , bool ) {
4
     myFpsWidget->update(myPlugin->getMainWindow()->isStereoOutput(),
5
-                        myPlugin->getMainWindow()->getTargetFps());
6
+                        myPlugin->getMainWindow()->getTargetFps(),
7
+                        myPlugin->getMainWindow()->getStatistics());
8
 
9
     char aBuffer[128];
10
     stsprintf(aBuffer, 128, "%04u", myFrameCounter++);
11
sview-15_10.tar.gz/StDiagnostics/lang/czech Added
2
 
1
+(directory)
2
sview-15_10.tar.gz/StDiagnostics/lang/czech/StDiagnostics.lng Added
6
 
1
@@ -0,0 +1,4 @@
2
+Czech translation file for StDiagnostics plugin
3
+@author Kirill Gavrilov
4
+
5
+--------
6
sview-15_10.tar.gz/StDiagnostics/lang/czech/language.lng Added
4
 
1
@@ -0,0 +1,1 @@
2
+Čeština
3
\ No newline at end of file
4
sview-15_08.tar.gz/StGLWidgets/StGLCombobox.cpp -> sview-15_10.tar.gz/StGLWidgets/StGLCombobox.cpp Changed
42
 
1
@@ -51,7 +51,8 @@
2
         aTop  = int(aRoot->getCursorZo().y() * aRoot->getRectPx().height());
3
     }
4
 
5
-    myMenu = new StGLMenu(aMenuParent, aLeft, aTop, StGLMenu::MENU_VERTICAL, true);
6
+    myMenu = new StGLMenu(aMenuParent, aLeft, aTop, StGLMenu::MENU_VERTICAL, false);
7
+    myMenu->setOpacity(1.0f, false);
8
     if(myBack != NULL) {
9
         myMenu->setCorner(StGLCorner(ST_VCORNER_CENTER, ST_HCORNER_CENTER));
10
     }
11
@@ -63,7 +64,7 @@
12
         myBack->stglInit();
13
     } else {
14
         StGLRootWidget* aRoot = myMenu->getRoot();
15
-        myMenu->stglInit();
16
+        myMenu->stglUpdateSubmenuLayout();
17
         StRectI_t aRect  = myMenu->getRectPxAbsolute();
18
         const int aRootX = aRoot->getRectPx().width();
19
         const int aRootY = aRoot->getRectPx().height();
20
@@ -77,6 +78,21 @@
21
         } else if(aRect.bottom() > aRootY) {
22
             myMenu->changeRectPx().moveBottomTo(aRootY);
23
         }
24
+
25
+        for(StGLWidget* aChild = myMenu->getChildren()->getStart(); aChild != NULL; aChild = aChild->getNext()) {
26
+            StGLMenuItem* anItem = (StGLMenuItem* )aChild;
27
+            if(anItem->getSubMenu() == NULL) {
28
+                continue;
29
+            }
30
+
31
+            const StRectI_t aSubRect = anItem->getSubMenu()->getRectPxAbsolute();
32
+            StRectI_t& aSubRectNew = anItem->getSubMenu()->changeRectPx();
33
+            if(aSubRect.width() >= aRootX) {
34
+                aSubRectNew.moveLeftTo(0);
35
+            } else if(aSubRect.right() > aRootX) {
36
+                aSubRectNew.moveRightTo(myMenu->getRectPxAbsolute().left() + aRoot->scale(10));
37
+            }
38
+        }
39
     }
40
 }
41
 
42
sview-15_08.tar.gz/StGLWidgets/StGLFpsLabel.cpp -> sview-15_10.tar.gz/StGLWidgets/StGLFpsLabel.cpp Changed
56
 
1
@@ -1,5 +1,5 @@
2
 /**
3
- * Copyright © 2013 Kirill Gavrilov <kirill@sview.ru
4
+ * Copyright © 2013-2015 Kirill Gavrilov <kirill@sview.ru
5
  *
6
  * Distributed under the Boost Software License, Version 1.0.
7
  * See accompanying file license-boost.txt or copy at
8
@@ -41,23 +41,31 @@
9
     signals.onBtnClick(getUserData());
10
 }
11
 
12
-void StGLFpsLabel::update(const bool   theIsStereo,
13
-                          const double theTargetFps) {
14
+void StGLFpsLabel::update(const bool      theIsStereo,
15
+                          const double    theTargetFps,
16
+                          const StString& theExtraInfo) {
17
     char aBuffer[128];
18
     const double aTime = myTimer.getElapsedTimeInSec();
19
-    if(aTime >= 1.0) {
20
-        myTimer.restart();
21
-        const double aFpsCurrent = double(myCounter) / aTime;
22
-        if(myPlayFps <= 0.0) {
23
-            stsprintf(aBuffer, 128, "%c %4.1f (%4.1f)",
24
-                      theIsStereo ? 'S' : 'M', aFpsCurrent, theTargetFps);
25
-        } else {
26
-            stsprintf(aBuffer, 128, "%c %4.1f (%4.1f)\n%d / %d [%4.1f]",
27
-                      theIsStereo ? 'S' : 'M', aFpsCurrent, theTargetFps,
28
-                      myPlayQueued, myPlayQueueLen, myPlayFps);
29
-        }
30
-        setText(aBuffer);
31
-        myCounter = 0;
32
+    if(aTime < 1.0) {
33
+        ++myCounter;
34
+        return;
35
     }
36
-    ++myCounter;
37
+
38
+    myTimer.restart();
39
+    const double aFpsCurrent = double(myCounter) / aTime;
40
+    if(myPlayFps <= 0.0) {
41
+        stsprintf(aBuffer, 128, "%c %4.1f (%4.1f)",
42
+                  theIsStereo ? 'S' : 'M', aFpsCurrent, theTargetFps);
43
+    } else {
44
+        stsprintf(aBuffer, 128, "%c %4.1f (%4.1f)\n%d / %d [%4.1f]",
45
+                  theIsStereo ? 'S' : 'M', aFpsCurrent, theTargetFps,
46
+                  myPlayQueued, myPlayQueueLen, myPlayFps);
47
+    }
48
+    StString aText(aBuffer);
49
+    if(!theExtraInfo.isEmpty()) {
50
+        aText += "\n";
51
+        aText += theExtraInfo;
52
+    }
53
+    setText(aText);
54
+    myCounter = 1;
55
 }
56
sview-15_08.tar.gz/StGLWidgets/StGLImageProgram.cpp -> sview-15_10.tar.gz/StGLWidgets/StGLImageProgram.cpp Changed
101
 
1
@@ -29,9 +29,9 @@
2
                              StString(F_DEF_CUBEMAP) + theText);
3
 }
4
 
5
-StGLImageProgram::StGLImageProgram(const StString& theTitle)
6
+StGLImageProgram::StGLImageProgram()
7
 : myColorScale(1.0f, 1.0f, 1.0f) {
8
-    myTitle = theTitle;
9
+    myTitle = "StGLImageProgram";
10
 
11
     const char F_SHADER_GET_COLOR_BLEND[] =
12
        "uniform sampler2D uTexture;\n"
13
@@ -154,20 +154,84 @@
14
         + F_SHADER_YUV2RGB_MPEG);
15
 
16
     params.gamma = new StFloat32Param(   1.0f,         // initial value
17
-                                        0.05f, 100.0f, // min, max values
18
+                                        0.05f, 99.0f, // min, max values
19
                                          1.0f,         // default value
20
                                         0.05f,         // incremental step
21
                                       0.0001f);        // equality tolerance
22
     params.brightness = new StFloat32Param(   1.0f,         // initial value
23
-                                              0.0f, 100.0f, // min, max values
24
+                                              0.0f, 99.0f, // min, max values
25
                                               1.0f,         // default value
26
                                              0.05f,         // incremental step
27
                                            0.0001f);        // equality tolerance
28
     params.saturation = new StFloat32Param(   1.0f,         // initial value
29
-                                            -10.0f, 100.0f, // min, max values
30
+                                            -10.0f, 99.0f, // min, max values
31
                                               1.0f,         // default value
32
                                              0.05f,         // incremental step
33
                                            0.0001f);        // equality tolerance
34
+
35
+    // main shader parts
36
+    const char V_SHADER_FLAT[] =
37
+       "uniform mat4 uProjMat;\n"
38
+       "uniform mat4 uModelMat;\n"
39
+       "uniform vec4 uTexData;\n"
40
+       "uniform vec4 uTexUVData;\n"
41
+
42
+       "attribute vec4 vVertex;\n"
43
+       "attribute vec2 vTexCoord;\n"
44
+
45
+       "varying vec3 fTexCoord;\n"
46
+       "varying vec3 fTexUVCoord;\n"
47
+
48
+       "void main(void) {\n"
49
+       "    fTexCoord   = vec3(uTexData.xy   + vTexCoord * uTexData.zw,   0.0);\n"
50
+       "    fTexUVCoord = vec3(uTexUVData.xy + vTexCoord * uTexUVData.zw, 0.0);\n"
51
+       "    gl_Position = uProjMat * uModelMat * vVertex;\n"
52
+       "}\n";
53
+
54
+    const char V_SHADER_CUBEMAP[] =
55
+       "uniform mat4 uProjMat;\n"
56
+       "uniform mat4 uModelMat;\n"
57
+       "uniform vec4 uTexData;\n"
58
+       "uniform vec4 uTexUVData;\n"
59
+
60
+       "attribute vec4 vVertex;\n"
61
+       "attribute vec2 vTexCoord;\n"
62
+
63
+       "varying vec3 fTexCoord;\n"
64
+       "varying vec3 fTexUVCoord;\n"
65
+
66
+       "void main(void) {\n"
67
+       "    gl_Position = vec4(vVertex.x, vVertex.y, 0.0, 1.0);\n"
68
+       "    fTexCoord   = (uProjMat * gl_Position).xyz;"
69
+       "    fTexUVCoord = (uProjMat * gl_Position).xyz;"
70
+       "}\n";
71
+
72
+    const char F_SHADER_FLAT[] =
73
+       "varying vec3 fTexCoord;\n"
74
+       "varying vec3 fTexUVCoord;\n"
75
+        // we split these functions for two reasons:
76
+        // - to change function code (like color conversion);
77
+        // - to optimize rendering on old hardware not supported conditions (GeForce FX for example).
78
+       "vec4 getColor(in vec3 texCoord);\n"
79
+       "void convertToRGB(inout vec4 theColor, in vec3 theTexUVCoord);\n"
80
+       "void applyCorrection(inout vec4 theColor);\n"
81
+       "void applyGamma(inout vec4 theColor);\n"
82
+
83
+       "void main(void) {\n"
84
+            // extract color from main texture
85
+       "    vec4 aColor = getColor(fTexCoord);\n"
86
+            // convert from alien color model (like YUV) to RGB
87
+       "    convertToRGB(aColor, fTexUVCoord);\n"
88
+            // color processing (saturation, brightness, etc)
89
+       "    applyCorrection(aColor);\n"
90
+            // gamma correction
91
+       "    applyGamma(aColor);\n"
92
+       "    gl_FragColor = aColor;\n"
93
+       "}";
94
+
95
+    registerVertexShaderPart  (0, VertMain_Normal,  V_SHADER_FLAT);
96
+    registerVertexShaderPart  (0, VertMain_Cubemap, V_SHADER_CUBEMAP);
97
+    registerFragmentShaderPart(FragSection_Main, 0, F_SHADER_FLAT);
98
 }
99
 
100
 StGLImageProgram::~StGLImageProgram() {
101
sview-15_08.tar.gz/StGLWidgets/StGLImageRegion.cpp -> sview-15_10.tar.gz/StGLWidgets/StGLImageRegion.cpp Changed
201
 
1
@@ -19,41 +19,6 @@
2
 
3
 namespace {
4
 
5
-    class ST_LOCAL StTrackedFloatParam : public StFloat32Param {
6
-
7
-            private:
8
-
9
-        StHandle<StFloat32Param> myTracked1;
10
-        StHandle<StFloat32Param> myTracked2;
11
-
12
-            public:
13
-
14
-        StTrackedFloatParam(const StHandle<StFloat32Param>& theTracked1,
15
-                            const StHandle<StFloat32Param>& theTracked2)
16
-        : StFloat32Param(theTracked1->getValue(),
17
-                         theTracked1->getMinValue(),
18
-                         theTracked1->getMaxValue(),
19
-                         theTracked1->getDefValue(),
20
-                         theTracked1->getStep(),
21
-                         theTracked1->getTolerance()),
22
-          myTracked1(theTracked1),
23
-          myTracked2(theTracked2) {}
24
-
25
-        virtual float getValue() const {
26
-            return myTracked1->getValue();
27
-        }
28
-
29
-        virtual bool setValue(const float theValue) {
30
-            if(myTracked1->setValue(theValue)
31
-            || myTracked2->setValue(theValue)) {
32
-                signals.onChanged(theValue);
33
-                return true;
34
-            }
35
-            return false;
36
-        }
37
-
38
-    };
39
-
40
     class ST_LOCAL StSwapLRParam : public StBoolParam {
41
 
42
             public:
43
@@ -126,8 +91,6 @@
44
 : StGLWidget(theParent, 0, 0, StGLCorner(ST_VCORNER_TOP, ST_HCORNER_LEFT)),
45
   myQuad(),
46
   myUVSphere(StGLVec3(0.0f, 0.0f, 0.0f), 1.0f, 64),
47
-  myProgramFlat(),
48
-  myProgramSphere(),
49
   myTextureQueue(theTextureQueue),
50
   myClickPntZo(0.0, 0.0),
51
   myKeyFlags(ST_VF_NONE),
52
@@ -148,13 +111,11 @@
53
     params.displayMode->changeValues().add("Cross-eyed");    // MODE_CROSSYED
54
 
55
     params.displayRatio  = new StInt32Param(RATIO_AUTO);
56
+    params.ToHealAnamorphicRatio = new StBoolParam(false);
57
     params.textureFilter = new StInt32Param(StGLImageProgram::FILTER_LINEAR);
58
-    params.gamma      = new StTrackedFloatParam(myProgramFlat.params.gamma,
59
-                                                myProgramSphere.params.gamma);
60
-    params.brightness = new StTrackedFloatParam(myProgramFlat.params.brightness,
61
-                                                myProgramSphere.params.brightness);
62
-    params.saturation = new StTrackedFloatParam(myProgramFlat.params.saturation,
63
-                                                myProgramSphere.params.saturation);
64
+    params.gamma      = myProgram.params.gamma;
65
+    params.brightness = myProgram.params.brightness;
66
+    params.saturation = myProgram.params.saturation;
67
     params.swapLR   = new StSwapLRParam();
68
     params.ViewMode = new StViewModeParam();
69
 
70
@@ -237,7 +198,6 @@
71
     myActions.add(anAction);
72
 
73
     anAction = new StActionIntSlot(stCString("DoParamsModeNext"), stSlot(this, &StGLImageRegion::doParamsModeNext), 0);
74
-    anAction->setDefaultHotKey1(ST_VK_P);
75
     myActions.add(anAction);
76
 
77
     anAction = new StActionHoldSlot(stCString("DoParamsPanLeft"), stSlot(this, &StGLImageRegion::doParamsPanLeft));
78
@@ -297,8 +257,7 @@
79
     myTextureQueue->getQTexture().release(aCtx);
80
     myQuad.release(aCtx);
81
     myUVSphere.release(aCtx);
82
-    myProgramFlat.release(aCtx);
83
-    myProgramSphere.release(aCtx);
84
+    myProgram.release(aCtx);
85
 }
86
 
87
 StHandle<StStereoParams> StGLImageRegion::getSource() {
88
@@ -325,9 +284,7 @@
89
     }
90
 
91
     StGLContext& aCtx = getContext();
92
-    if(!myProgramFlat.init(aCtx, StImage::ImgColor_RGB, StImage::ImgScale_Full, StGLImageProgram::FragGetColor_Normal)) {
93
-        return false;
94
-    } else if(!myProgramSphere.init(aCtx, StImage::ImgColor_RGB, StImage::ImgScale_Full, StGLImageProgram::FragGetColor_Normal)) {
95
+    if(!myProgram.init(aCtx, StImage::ImgColor_RGB, StImage::ImgScale_Full, StGLImageProgram::FragGetColor_Normal)) {
96
         return false;
97
     } else if(!myQuad.initScreen(aCtx)) {
98
         ST_DEBUG_LOG("Fail to init StGLQuad");
99
@@ -351,18 +308,19 @@
100
 
101
 StGLVec2 StGLImageRegion::getMouseMoveSphere(const StPointD_t& theCursorZoFrom,
102
                                              const StPointD_t& theCursorZoTo) {
103
-    /// TODO (Kirill Gavrilov#5) these computations are invalid
104
-    StGLVec2 stVec = getMouseMoveFlat(theCursorZoFrom, theCursorZoTo);
105
+    StGLVec2 aVec = getMouseMoveFlat(theCursorZoFrom, theCursorZoTo);
106
     GLfloat aSphereScale = SPHERE_RADIUS * PANORAMA_DEF_ZOOM * getSource()->ScaleFactor;
107
-    StRectD_t zParams;
108
-    getCamera()->getZParams(getCamera()->getZNear(), zParams);
109
-    stVec.x() *= -90.0f * GLfloat(zParams.right() - zParams.left()) / aSphereScale;
110
-    stVec.y() *=  90.0f * GLfloat(zParams.bottom() - zParams.top()) / aSphereScale;
111
-    return stVec;
112
+    StRectD_t aZParams;
113
+    getCamera()->getZParams(getCamera()->getZNear(), aZParams);
114
+    aVec.x() *= -90.0f * GLfloat(aZParams.right() - aZParams.left()) / aSphereScale;
115
+    aVec.y() *=  90.0f * GLfloat(aZParams.bottom() - aZParams.top()) / aSphereScale;
116
+    return aVec;
117
 }
118
 
119
 StGLVec2 StGLImageRegion::getMouseMoveSphere() {
120
-    return isClicked(ST_MOUSE_LEFT) ? getMouseMoveSphere(myClickPntZo, getRoot()->getCursorZo()) : StGLVec2();
121
+    return isClicked(ST_MOUSE_LEFT)
122
+         ? getMouseMoveSphere(myClickPntZo, getRoot()->getCursorZo())
123
+         : StGLVec2();
124
 }
125
 
126
 void StGLImageRegion::stglDraw(unsigned int theView) {
127
@@ -397,21 +355,20 @@
128
 }
129
 
130
 void StGLImageRegion::stglDrawView(unsigned int theView) {
131
-
132
-    StGLQuadTexture::LeftOrRight leftOrRight = StGLQuadTexture::LEFT_TEXTURE;
133
+    StGLQuadTexture::LeftOrRight aLeftOrRight = StGLQuadTexture::LEFT_TEXTURE;
134
     StHandle<StStereoParams> aParams = getSource();
135
     if(!myIsInitialized || aParams.isNull()) {
136
         return;
137
     }
138
 
139
     StGLContext& aCtx = getContext();
140
-    bool toShowRight = ( aParams->ToSwapLR && (theView == ST_DRAW_LEFT )) ||
141
-                       (!aParams->ToSwapLR && (theView == ST_DRAW_RIGHT));
142
+    bool toShowRight = ( aParams->ToSwapLR && (theView == ST_DRAW_LEFT ))
143
+                    || (!aParams->ToSwapLR && (theView == ST_DRAW_RIGHT));
144
     if(aParams->isMono()) {
145
-        leftOrRight = StGLQuadTexture::LEFT_TEXTURE;
146
+        aLeftOrRight = StGLQuadTexture::LEFT_TEXTURE;
147
     } else if(myTextureQueue->getQTexture().getFront(StGLQuadTexture::RIGHT_TEXTURE).isValid()) {
148
         if(toShowRight) {
149
-            leftOrRight = StGLQuadTexture::RIGHT_TEXTURE;
150
+            aLeftOrRight = StGLQuadTexture::RIGHT_TEXTURE;
151
         }
152
     }
153
 
154
@@ -452,46 +409,42 @@
155
 
156
     aCtx.core20fwd->glDisable(GL_BLEND);
157
 
158
-    StGLFrameTextures& stFrameTexture = myTextureQueue->getQTexture().getFront(leftOrRight);
159
-    stFrameTexture.bind(aCtx);
160
-
161
-    // our model matrix (identity)
162
-    StGLMatrix stModelMat;
163
-
164
-    StGLVec2 textureSizeVec(GLfloat(stFrameTexture.getPlane(0).getSizeX()),
165
-                            GLfloat(stFrameTexture.getPlane(0).getSizeY()));
166
-    StGLVec2 textureUVSizeVec(GLfloat(stFrameTexture.getPlane(1).getSizeX()),
167
-                              GLfloat(stFrameTexture.getPlane(1).getSizeY()));
168
+    StGLFrameTextures& aTextures = myTextureQueue->getQTexture().getFront(aLeftOrRight);
169
+    aTextures.bind(aCtx);
170
 
171
+    StGLVec2 aTextureSize  (GLfloat(aTextures.getPlane(0).getSizeX()),
172
+                            GLfloat(aTextures.getPlane(0).getSizeY()));
173
+    StGLVec2 aTextureUVSize(GLfloat(aTextures.getPlane(1).getSizeX()),
174
+                            GLfloat(aTextures.getPlane(1).getSizeY()));
175
+    StGLMatrix aModelMat;
176
     // data rectangle in the texture
177
-    StGLVec4 dataClampVec;
178
-    StGLVec4 dataUVClampVec;
179
-    if(params.textureFilter->getValue() == StGLImageProgram::FILTER_NEAREST
180
-    || aParams->ViewingMode == StStereoParams::PANORAMA_SPHERE) {
181
+    StGLVec4 aClampVec, aClampUV;
182
+    if(params.textureFilter->getValue() == StGLImageProgram::FILTER_NEAREST) {
183
         myTextureQueue->getQTexture().setMinMagFilter(aCtx, GL_NEAREST);
184
         //
185
-        dataClampVec.x() = 0.0f;
186
-        dataClampVec.y() = 0.0f;
187
-        dataClampVec.z() = stFrameTexture.getPlane(0).getDataSize().x();
188
-        dataClampVec.w() = stFrameTexture.getPlane(0).getDataSize().y();
189
+        aClampVec.x() = 0.0f;
190
+        aClampVec.y() = 0.0f;
191
+        aClampVec.z() = aTextures.getPlane(0).getDataSize().x();
192
+        aClampVec.w() = aTextures.getPlane(0).getDataSize().y();
193
         // UV
194
-        dataUVClampVec.x() = 0.0f;
195
-        dataUVClampVec.y() = 0.0f;
196
-        dataUVClampVec.z() = stFrameTexture.getPlane(1).getDataSize().x();
197
-        dataUVClampVec.w() = stFrameTexture.getPlane(1).getDataSize().y();
198
+        aClampUV.x() = 0.0f;
199
+        aClampUV.y() = 0.0f;
200
+        aClampUV.z() = aTextures.getPlane(1).getDataSize().x();
201
sview-15_08.tar.gz/StGLWidgets/StGLMenu.cpp -> sview-15_10.tar.gz/StGLWidgets/StGLMenu.cpp Changed
29
 
1
@@ -44,6 +44,7 @@
2
   myColorVec(getRoot()->getColorForElement(StGLRootWidget::Color_Menu)),
3
   myOrient(theOrient),
4
   myItemHeight(theParent->getRoot()->scale(theParent->getRoot()->isMobile() ? 40 : 32)),
5
+  myWidthMin(0),
6
   myWidth(0),
7
   myIsRootMenu(theIsRootMenu),
8
   myIsContextual(false),
9
@@ -141,15 +142,16 @@
10
         changeRectPx().right()  = getRectPx().left() + aChildLast->getRectPx().right();
11
         changeRectPx().bottom() = getRectPx().top()  + aChildLast->getRectPx().bottom();
12
     }
13
+    int aWidth = stMax(myWidthMin, myWidth);
14
     if(myOrient == MENU_VERTICAL
15
     || myOrient == MENU_VERTICAL_COMPACT) {
16
-        changeRectPx().right() = getRectPx().left() + myWidth;
17
+        changeRectPx().right() = getRectPx().left() + aWidth;
18
         int anItemCount = 0;
19
         for(StGLWidget* aChild = getChildren()->getStart(); aChild != NULL; aChild = aChild->getNext(), ++anItemCount) {
20
             StGLMenuItem* anItem = (StGLMenuItem* )aChild;
21
             anItem->changeRectPx().moveTopTo(anItemCount * myItemHeight);
22
-            anItem->changeRectPx().right() = anItem->getRectPx().left() + myWidth;
23
-            anItem->setTextWidth(myWidth);
24
+            anItem->changeRectPx().right() = anItem->getRectPx().left() + aWidth;
25
+            anItem->setTextWidth(aWidth);
26
             if(anItem->getSubMenu() != NULL) {
27
                 anItem->getSubMenu()->changeRectPx().moveTopLeftTo(getRectPxAbsolute().right() - myRoot->scale(10),
28
                                                                    anItem->getRectPxAbsolute().top());
29
sview-15_08.tar.gz/StGLWidgets/StGLMenuItem.cpp -> sview-15_10.tar.gz/StGLWidgets/StGLMenuItem.cpp Changed
15
 
1
@@ -96,6 +96,13 @@
2
     return this;
3
 }
4
 
5
+void StGLMenuItem::setIcon(StGLIcon* theIcon) {
6
+    if(myIcon != NULL) {
7
+        delete myIcon;
8
+    }
9
+    myIcon = theIcon;
10
+}
11
+
12
 void StGLMenuItem::setHilightText() {
13
     myToHilightText = true;
14
 }
15
sview-15_08.tar.gz/StGLWidgets/StGLMessageBox.cpp -> sview-15_10.tar.gz/StGLWidgets/StGLMessageBox.cpp Changed
25
 
1
@@ -20,6 +20,23 @@
2
     static const int OFFSET_PIXELS = 32;
3
 }
4
 
5
+StGLMessageBox::StGLMessageBox(StGLWidget* theParent)
6
+: StGLWidget(theParent, 0, 0, StGLCorner(ST_VCORNER_CENTER, ST_HCORNER_CENTER), 32, 32),
7
+  myContent(NULL),
8
+  myTitle(NULL),
9
+  myBtnPanel(NULL),
10
+  myDefaultBtn(NULL),
11
+  myButtonsNb(0),
12
+  myMarginLeft(0),
13
+  myMarginRight(0),
14
+  myMarginTop(0),
15
+  myMarginBottom(0),
16
+  myMinSizeY(0),
17
+  myToAdjustY(true),
18
+  myIsContextual(false) {
19
+    //
20
+}
21
+
22
 StGLMessageBox::StGLMessageBox(StGLWidget*     theParent,
23
                                const StString& theTitle,
24
                                const StString& theText,
25
sview-15_10.tar.gz/StGLWidgets/StGLOpenFile.cpp Added
201
 
1
@@ -0,0 +1,212 @@
2
+/**
3
+ * Copyright © 2015 Kirill Gavrilov <kirill@sview.ru>
4
+ *
5
+ * Distributed under the Boost Software License, Version 1.0.
6
+ * See accompanying file license-boost.txt or copy at
7
+ * http://www.boost.org/LICENSE_1_0.txt
8
+ */
9
+
10
+#include <StGLWidgets/StGLOpenFile.h>
11
+
12
+#include <StGLWidgets/StGLMenu.h>
13
+#include <StGLWidgets/StGLMenuItem.h>
14
+#include <StGLWidgets/StGLScrollArea.h>
15
+#include <StGLWidgets/StGLTextureButton.h>
16
+
17
+StGLOpenFile::StGLOpenFile(StGLWidget*     theParent,
18
+                           const StString& theTitle,
19
+                           const StString& theCloseText)
20
+: StGLMessageBox(theParent, theTitle, "",
21
+                 theParent->getRoot()->scale(512), theParent->getRoot()->scale(400)),
22
+  myCurrentPath(NULL),
23
+  myHotList(NULL),
24
+  myList(NULL),
25
+  myHighlightColor(0.5f, 0.5f, 0.5f, 1.0f),
26
+  myItemColor     (1.0f, 1.0f, 1.0f, 1.0f),
27
+  myFileColor     (0.7f, 0.7f, 0.7f, 1.0f),
28
+  myHotColor      (1.0f, 1.0f, 1.0f, 1.0f),
29
+  myHotSizeX (theParent->getRoot()->scale(10)),
30
+  myMarginX  (theParent->getRoot()->scale(8)),
31
+  myIconSizeX(theParent->getRoot()->scale(16)) {
32
+    myToAdjustY = false;
33
+
34
+    int aMarginTop = myMarginTop + myRoot->scale(30);
35
+    myCurrentPath = new StGLTextArea(this, myMarginLeft, myMarginTop, StGLCorner(ST_VCORNER_TOP, ST_HCORNER_LEFT),
36
+                                     myContent->getRectPx().width(), myContent->getRectPx().height());
37
+    myCurrentPath->setupAlignment(StGLTextFormatter::ST_ALIGN_X_LEFT,
38
+                                  StGLTextFormatter::ST_ALIGN_Y_TOP);
39
+    myCurrentPath->setTextColor(myRoot->getColorForElement(StGLRootWidget::Color_MessageText));
40
+
41
+    myHotList = new StGLMenu(this, 0, 0, StGLMenu::MENU_VERTICAL_COMPACT);
42
+    myHotList->setOpacity(1.0f, true);
43
+    myHotList->setItemWidth(myHotSizeX);
44
+    myHotList->setColor(StGLVec4(0.0f, 0.0f, 0.0f, 0.0f));
45
+    myHotList->changeRectPx().top()   = aMarginTop;
46
+    myHotList->changeRectPx().left()  = myMarginLeft;
47
+    myHotList->changeRectPx().right() = myMarginLeft + myHotSizeX;
48
+    myContent->changeRectPx().top()   = aMarginTop;
49
+    myContent->changeRectPx().left()  = myMarginLeft + myHotSizeX;
50
+
51
+    myList = new StGLMenu(myContent, 0, 0, StGLMenu::MENU_VERTICAL_COMPACT);
52
+    myList->setOpacity(1.0f, true);
53
+    myList->setColor(StGLVec4(0.0f, 0.0f, 0.0f, 0.0f));
54
+    myList->setItemWidthMin(myContent->getRectPx().width());
55
+
56
+    if(!myRoot->isMobile()) {
57
+        addButton(theCloseText);
58
+    }
59
+}
60
+
61
+StGLOpenFile::~StGLOpenFile() {
62
+    StGLContext& aCtx = getContext();
63
+    if(!myTextureFolder.isNull()) {
64
+        for(size_t aTexIter = 0; aTexIter < myTextureFolder->size(); ++aTexIter) {
65
+            myTextureFolder->changeValue(aTexIter).release(aCtx);
66
+        }
67
+        myTextureFolder.nullify();
68
+    }
69
+    if(!myTextureFile.isNull()) {
70
+        for(size_t aTexIter = 0; aTexIter < myTextureFile->size(); ++aTexIter) {
71
+            myTextureFile->changeValue(aTexIter).release(aCtx);
72
+        }
73
+        myTextureFile.nullify();
74
+    }
75
+}
76
+
77
+void StGLOpenFile::setMimeList(const StMIMEList& theFilter) {
78
+    myFilter     = theFilter;
79
+    myExtensions = theFilter.getExtensionsList();
80
+}
81
+
82
+void StGLOpenFile::doHotItemClick(const size_t theItemId) {
83
+    myItemToLoad = myHotPaths[theItemId];
84
+}
85
+
86
+void StGLOpenFile::doFileItemClick(const size_t theItemId) {
87
+    const StFileNode* aNode = myFolder->getValue(theItemId);
88
+    myItemToLoad = aNode->getPath();
89
+}
90
+
91
+void StGLOpenFile::doFolderUpClick(const size_t ) {
92
+    StString aPath   = myFolder->getPath();
93
+    StString aPathUp = StFileNode::getFolderUp(aPath);
94
+    if(!aPathUp.isEmpty()) {
95
+        myItemToLoad = aPathUp;
96
+    }
97
+}
98
+
99
+bool StGLOpenFile::tryUnClick(const StPointD_t& theCursorZo,
100
+                              const int&        theMouseBtn,
101
+                              bool&             isItemUnclicked) {
102
+    bool aRes = StGLMessageBox::tryUnClick(theCursorZo, theMouseBtn, isItemUnclicked);
103
+    if(!myItemToLoad.isEmpty()) {
104
+        StString aPath = myItemToLoad;
105
+        myItemToLoad.clear();
106
+        if(StFolder::isFolder(aPath)) {
107
+            openFolder(aPath);
108
+        } else {
109
+            StHandle<StString> aPathHandle = new StString(aPath);
110
+            signals.onFileSelected.emit(aPathHandle);
111
+            myRoot->destroyWithDelay(this);
112
+        }
113
+    }
114
+    return aRes;
115
+}
116
+
117
+void StGLOpenFile::addHotItem(const StString& theTarget,
118
+                              const StString& theName) {
119
+    StString aName = theName;
120
+    if(aName.isEmpty()) {
121
+        StString aFoler;
122
+        StFileNode::getFolderAndFile(theTarget, aFoler, aName);
123
+    }
124
+    if(aName.isEmpty()) {
125
+        aName = theTarget;
126
+    }
127
+    if(aName.isEmpty()
128
+    || theTarget.isEmpty()) {
129
+        return;
130
+    }
131
+    myHotPaths.add(theTarget);
132
+
133
+    StGLMenuItem* anItem = new StGLPassiveMenuItem(myHotList);
134
+    setItemIcon(anItem, myHotColor, true);
135
+    anItem->setText(aName);
136
+    anItem->setTextColor(myHotColor);
137
+    anItem->setHilightColor(myHighlightColor);
138
+    anItem->setUserData(myHotPaths.size() - 1);
139
+    anItem->signals.onItemClick = stSlot(this, &StGLOpenFile::doHotItemClick);
140
+
141
+    int aSizeX = anItem->getMargins().left + anItem->computeTextWidth() + anItem->getMargins().right;
142
+    myHotSizeX = stMax(myHotSizeX, aSizeX);
143
+
144
+    myContent->changeRectPx().left() = myMarginLeft + myHotSizeX;
145
+    myList->setItemWidthMin(myContent->getRectPx().width());
146
+}
147
+
148
+void StGLOpenFile::setItemIcon(StGLMenuItem*   theItem,
149
+                               const StGLVec4& theColor,
150
+                               const bool      theisFolder) {
151
+    if(theItem == NULL) {
152
+        return;
153
+    }
154
+
155
+    theItem->changeMargins().left = myMarginX + myIconSizeX + myMarginX;
156
+    if(myTextureFolder.isNull()) {
157
+        const StString& anIcon0 = myRoot->getIcon(StGLRootWidget::IconImage_Folder);
158
+        const StString& anIcon1 = myRoot->getIcon(StGLRootWidget::IconImage_File);
159
+        if(!anIcon0.isEmpty()
160
+        && !anIcon1.isEmpty()) {
161
+            myTextureFolder = new StGLTextureArray(1);
162
+            myTextureFile   = new StGLTextureArray(1);
163
+            myTextureFolder->changeValue(0).setName(anIcon0);
164
+            myTextureFile  ->changeValue(0).setName(anIcon1);
165
+        } else {
166
+            return;
167
+        }
168
+    }
169
+
170
+    StGLIcon* anIcon = new StGLIcon(theItem, myMarginX, 0, StGLCorner(ST_VCORNER_CENTER, ST_HCORNER_LEFT), 0);
171
+    anIcon->setColor(theColor);
172
+    if(theisFolder) {
173
+        anIcon->setExternalTextures(myTextureFolder);
174
+    } else {
175
+        anIcon->setExternalTextures(myTextureFile);
176
+    }
177
+    theItem->setIcon(anIcon);
178
+}
179
+
180
+void StGLOpenFile::openFolder(const StString& theFolder) {
181
+    myItemToLoad.clear();
182
+    myList->destroyChildren();
183
+
184
+    myFolder = new StFolder(theFolder);
185
+    myFolder->init(myExtensions, 1, true);
186
+    myCurrentPath->setText(StString("<b>Location:*</b>") + myFolder->getPath() + ST_FILE_SPLITTER);
187
+
188
+    StString aPath   = myFolder->getPath() + "";
189
+    StString aPathUp = StFileNode::getFolderUp(aPath);
190
+    if(!aPathUp.isEmpty()) {
191
+        StGLMenuItem* anUpItem = new StGLPassiveMenuItem(myList);
192
+        anUpItem->setText("..");
193
+        anUpItem->setTextColor(myItemColor);
194
+        anUpItem->setHilightColor(myHighlightColor);
195
+        anUpItem->changeMargins().left = myMarginX + myIconSizeX + myMarginX;
196
+        anUpItem->signals.onItemClick = stSlot(this, &StGLOpenFile::doFolderUpClick);
197
+    }
198
+
199
+    const size_t aNbItems = myFolder->size();
200
+    for(size_t anItemIter = 0; anItemIter < aNbItems; ++anItemIter) {
201
sview-15_08.tar.gz/StGLWidgets/StGLRangeFieldFloat32.cpp -> sview-15_10.tar.gz/StGLWidgets/StGLRangeFieldFloat32.cpp Changed
18
 
1
@@ -32,7 +32,15 @@
2
     }
3
 
4
     myValueText = new StGLTextArea(this, 0, 0, StGLCorner(ST_VCORNER_CENTER, ST_HCORNER_LEFT), -myRoot->scale(1), myRoot->scale(10));
5
-    onValueChange(0.0f);
6
+    float aLongVal = 0.0f;
7
+    if(myTrackValue->hasMaxValue()) {
8
+        aLongVal = myTrackValue->getMaxValue();
9
+    }
10
+    if(myTrackValue->hasMinValue()
11
+    && std::abs(myTrackValue->getMinValue()) >= aLongVal) {
12
+        aLongVal = myTrackValue->getMinValue();
13
+    }
14
+    onValueChange(aLongVal);
15
     myValueText->setTextColor(StGLVec3(1.0f, 1.0f, 1.0f));
16
     if(!myValueText->stglInitAutoHeightWidth()) {
17
         delete myValueText; myValueText = NULL;
18
sview-15_08.tar.gz/StGLWidgets/StGLRootWidget.cpp -> sview-15_10.tar.gz/StGLWidgets/StGLRootWidget.cpp Changed
40
 
1
@@ -57,7 +57,8 @@
2
   cursorZo(0.0, 0.0),
3
   myFocusWidget(NULL),
4
   myIsMenuPressed(false),
5
-  myMenuIconSize(IconSize_16) {
6
+  myMenuIconSize(IconSize_16),
7
+  myClickThreshold(3) {
8
     // unify access
9
     StGLWidget::myRoot = this;
10
     myViewport[0] = 0;
11
@@ -126,11 +127,13 @@
12
 }
13
 
14
 void StGLRootWidget::setupTextures() {
15
-    const IconSize aCheckboxSize = scaleIcon(16);
16
-    myIcons[IconImage_CheckboxOff]    = iconTexture(StString("textures" ST_FILE_SPLITTER) + "checkboxOff",    aCheckboxSize);
17
-    myIcons[IconImage_CheckboxOn]     = iconTexture(StString("textures" ST_FILE_SPLITTER) + "checkboxOn",     aCheckboxSize);
18
-    myIcons[IconImage_RadioButtonOff] = iconTexture(StString("textures" ST_FILE_SPLITTER) + "radioButtonOff", aCheckboxSize);
19
-    myIcons[IconImage_RadioButtonOn]  = iconTexture(StString("textures" ST_FILE_SPLITTER) + "radioButtonOn",  aCheckboxSize);
20
+    const IconSize anIconSize = scaleIcon(16);
21
+    myIcons[IconImage_CheckboxOff]    = iconTexture(StString("textures" ST_FILE_SPLITTER) + "checkboxOff",    anIconSize);
22
+    myIcons[IconImage_CheckboxOn]     = iconTexture(StString("textures" ST_FILE_SPLITTER) + "checkboxOn",     anIconSize);
23
+    myIcons[IconImage_RadioButtonOff] = iconTexture(StString("textures" ST_FILE_SPLITTER) + "radioButtonOff", anIconSize);
24
+    myIcons[IconImage_RadioButtonOn]  = iconTexture(StString("textures" ST_FILE_SPLITTER) + "radioButtonOn",  anIconSize);
25
+    myIcons[IconImage_Folder]         = iconTexture(StString("textures" ST_FILE_SPLITTER) + "actionOpen",     anIconSize);
26
+    myIcons[IconImage_File]           = iconTexture(StString("textures" ST_FILE_SPLITTER) + "actionFile",     anIconSize);
27
 }
28
 
29
 StMarginsI StGLRootWidget::iconMargins(StGLRootWidget::IconSize theStdSize,
30
@@ -209,7 +212,8 @@
31
     myScaleGUI   = aScale;
32
     myResolution = (unsigned int )(72.0f * aScale + 0.1f);
33
     myGlFontMgr->setResolution(myResolution);
34
-    myMenuIconSize = scaleIcon(16);
35
+    myMenuIconSize   = scaleIcon(16);
36
+    myClickThreshold = scale(3);
37
     setupTextures();
38
 }
39
 
40
sview-15_08.tar.gz/StGLWidgets/StGLScrollArea.cpp -> sview-15_10.tar.gz/StGLWidgets/StGLScrollArea.cpp Changed
123
 
1
@@ -19,7 +19,10 @@
2
                                const int        theWidth, const int theHeight)
3
 : StGLWidget(theParent, theLeft, theTop, theCorner, theWidth, theHeight),
4
   myBarColor(getRoot()->getColorForElement(StGLRootWidget::Color_ScrollBar)),
5
+  myIsLeftClick(false),
6
+  myHasDragged(false),
7
   myDragYDelta(0.0),
8
+  myDragYCumul(0),
9
   myFlingAccel((double )myRoot->scale(200)),
10
   myFlingYSpeed(0.0),
11
   myFlingYDone(0) {
12
@@ -89,13 +92,20 @@
13
         || (theVal1 <= T1(0) && theVal2 < T2(0));
14
 }
15
 
16
+inline void setClickedWithChildren(StGLWidgetList& theList, const int theMouseBtn, bool isClicked) {
17
+    for(StGLWidget* aChild = theList.getStart(); aChild != NULL; aChild = aChild->getNext()) {
18
+        aChild->setClicked(theMouseBtn, isClicked);
19
+        setClickedWithChildren(*aChild->getChildren(), theMouseBtn, isClicked);
20
+    }
21
+}
22
+
23
 void StGLScrollArea::stglUpdate(const StPointD_t& theCursorZo) {
24
     if(!isVisible()) {
25
         StGLWidget::stglUpdate(theCursorZo);
26
         return;
27
     }
28
 
29
-    if(isClicked(ST_MOUSE_LEFT)
30
+    if(myIsLeftClick
31
     && isScrollable()) {
32
         StPointD_t aDelta = myRoot->getCursorZo() - myClickPntZo;
33
         double aDeltaY = aDelta.y() * myRoot->getRectPx().height();
34
@@ -196,11 +206,28 @@
35
     const int aTopNew = stMax(stMin(aMinLim, aTopOld + theDelta), aMaxLim);
36
     const int aDelta  = aTopNew - aTopOld;
37
     if(aDelta == 0) {
38
+        if(theIsFling) {
39
+            myFlingTimer.stop();
40
+        }
41
         return false;
42
     }
43
 
44
     aContent->changeRectPx().top()    += aDelta;
45
     aContent->changeRectPx().bottom() += aDelta;
46
+
47
+    if(myIsLeftClick) {
48
+        if(!theIsFling) {
49
+            myDragYCumul += aDelta;
50
+            if(std::abs(myDragYCumul) > myRoot->getClickThreshold()
51
+            && !myHasDragged) {
52
+                setClickedWithChildren(myChildren, ST_MOUSE_LEFT, false);
53
+                myHasDragged = true;
54
+            }
55
+        } else {
56
+            myDragYCumul = 0;
57
+        }
58
+    }
59
+
60
     myIsResized = true;
61
     return true;
62
 }
63
@@ -211,10 +238,31 @@
64
     if(!isVisible() || !isPointIn(theCursorZo)) {
65
         return false;
66
     }
67
-    if(StGLWidget::tryClick(theCursorZo, theMouseBtn, isItemClicked)) {
68
-        if(theMouseBtn == ST_MOUSE_LEFT) {
69
-            myClickPntZo = theCursorZo;
70
+    if( theMouseBtn == ST_MOUSE_LEFT
71
+    && !isItemClicked
72
+    &&  isScrollable()) {
73
+        myIsLeftClick = true;
74
+        myHasDragged  = false;
75
+        myClickPntZo  = theCursorZo;
76
+        myDragYCumul  = 0;
77
+
78
+        // abort flinging
79
+        if(myFlingTimer.isOn()) {
80
+            const double aTime  = myFlingTimer.getElapsedTime();
81
+            const double anA    = (myFlingYSpeed > 0.0 ? -1.0 : 1.0) * myFlingAccel;
82
+            const double aSpeed = myFlingYSpeed + anA * aTime;
83
+            if(std::abs(aSpeed) > myRoot->scale(300)) {
84
+                setClickedWithChildren(myChildren, ST_MOUSE_LEFT, false);
85
+                isItemClicked = true;
86
+                return true;
87
+            }
88
         }
89
+    } else {
90
+        myIsLeftClick = false;
91
+        myHasDragged  = false;
92
+    }
93
+
94
+    if(StGLWidget::tryClick(theCursorZo, theMouseBtn, isItemClicked)) {
95
         isItemClicked = true;
96
         return true;
97
     }
98
@@ -224,12 +272,13 @@
99
 bool StGLScrollArea::tryUnClick(const StPointD_t& theCursorZo,
100
                                 const int&        theMouseBtn,
101
                                 bool&             isItemUnclicked) {
102
-    if(isClicked(ST_MOUSE_LEFT)
103
+    if(myIsLeftClick
104
     && theMouseBtn == ST_MOUSE_LEFT) {
105
-        isItemUnclicked = true;
106
-        setClicked(ST_MOUSE_LEFT, false);
107
+        myIsLeftClick = false;
108
+        myHasDragged  = false;
109
         if(myDragTimer.isOn()) {
110
             myDragYDelta = 0.0;
111
+            myDragYCumul = 0;
112
             myDragTimer.stop();
113
             myFlingYDone = 0;
114
             if(std::abs(myFlingYSpeed) > 0.00001) {
115
@@ -238,7 +287,6 @@
116
                 myFlingTimer.stop();
117
             }
118
         }
119
-        return true;
120
     }
121
     if(StGLWidget::tryUnClick(theCursorZo, theMouseBtn, isItemUnclicked)) {
122
         switch(theMouseBtn) {
123
sview-15_08.tar.gz/StGLWidgets/StGLSubtitles.cpp -> sview-15_10.tar.gz/StGLWidgets/StGLSubtitles.cpp Changed
81
 
1
@@ -1,5 +1,5 @@
2
 /**
3
- * Copyright © 2010-2014 Kirill Gavrilov <kirill@sview.ru>
4
+ * Copyright © 2010-2015 Kirill Gavrilov <kirill@sview.ru>
5
  *
6
  * Distributed under the Boost Software License, Version 1.0.
7
  * See accompanying file license-boost.txt or copy at
8
@@ -141,15 +141,25 @@
9
     StArrayList<StHandle <StSubItem> >::add(theItem);
10
 }
11
 
12
+inline StGLVCorner parseCorner(int theVal) {
13
+    return (StGLVCorner )theVal;
14
+}
15
+
16
 StGLSubtitles::StGLSubtitles(StGLWidget*                     theParent,
17
                              const StHandle<StSubQueue>&     theSubQueue,
18
+                             const StHandle<StInt32Param>&   thePlace,
19
+                             const StHandle<StFloat32Param>& theTopDY,
20
+                             const StHandle<StFloat32Param>& theBottomDY,
21
                              const StHandle<StFloat32Param>& theFontSize,
22
                              const StHandle<StFloat32Param>& theParallax,
23
                              const StHandle<StEnumParam>&    theParser)
24
 : StGLTextArea(theParent,
25
-               0, -theParent->getRoot()->scale(100),
26
-               StGLCorner(ST_VCORNER_BOTTOM, ST_HCORNER_CENTER),
27
+               0, 0,
28
+               StGLCorner(parseCorner(thePlace->getValue()), ST_HCORNER_CENTER),
29
                theParent->getRoot()->scale(800), theParent->getRoot()->scale(160)),
30
+  myPlace(thePlace),
31
+  myTopDY(theTopDY),
32
+  myBottomDY(theBottomDY),
33
   myFontSize(theFontSize),
34
   myParallax(theParallax),
35
   myParser(theParser),
36
@@ -225,6 +235,44 @@
37
         myShowItems.add(aNewSubItem);
38
     }
39
 
40
+    const StGLVCorner aCorner = parseCorner(myPlace->getValue());
41
+    bool toResize = myCorner.v != aCorner;
42
+    myCorner.v = aCorner;
43
+    switch(myCorner.v) {
44
+        case ST_VCORNER_TOP: {
45
+            const int aDisp = myRoot->scale((int )myTopDY->getValue());
46
+            if(getRectPx().top() != aDisp) {
47
+                toResize = true;
48
+                changeRectPx().moveTopTo(aDisp);
49
+            }
50
+            myFormatter.setupAlignment(StGLTextFormatter::ST_ALIGN_X_CENTER,
51
+                                       StGLTextFormatter::ST_ALIGN_Y_TOP);
52
+            break;
53
+        }
54
+        case ST_VCORNER_CENTER: {
55
+            if(getRectPx().top() != 0) {
56
+                toResize = true;
57
+                changeRectPx().moveTopTo(0);
58
+            }
59
+            myFormatter.setupAlignment(StGLTextFormatter::ST_ALIGN_X_CENTER,
60
+                                       StGLTextFormatter::ST_ALIGN_Y_CENTER);
61
+            break;
62
+        }
63
+        case ST_VCORNER_BOTTOM: {
64
+            const int aDisp = -myRoot->scale((int )myBottomDY->getValue());
65
+            if(getRectPx().top() != aDisp) {
66
+                toResize = true;
67
+                changeRectPx().moveTopTo(aDisp);
68
+            }
69
+            myFormatter.setupAlignment(StGLTextFormatter::ST_ALIGN_X_CENTER,
70
+                                       StGLTextFormatter::ST_ALIGN_Y_BOTTOM);
71
+            break;
72
+        }
73
+    }
74
+    if(toResize) {
75
+        stglResize();
76
+    }
77
+
78
     StGLContext& aCtx = getContext();
79
     if(isChanged) {
80
         setText(myShowItems.Text);
81
sview-15_08.tar.gz/StGLWidgets/StGLTable.cpp -> sview-15_10.tar.gz/StGLWidgets/StGLTable.cpp Changed
22
 
1
@@ -260,10 +260,10 @@
2
     }
3
 
4
     // fill table
5
-    int aRowIter = 0;
6
     int aCol2Width    = 0;
7
     int aCol1MaxWidth = theMaxWidth / 2 - myItemMargins.left - myItemMargins.right;
8
     const StGLCorner aCorner(ST_VCORNER_CENTER, ST_HCORNER_LEFT);
9
+    size_t aRowIter = 0;
10
     for(std::map< int, StHandle<StAction> >::const_iterator anActionIter = theActions.begin();
11
         anActionIter != theActions.end(); ++anActionIter, ++aRowIter) {
12
         const StHandle<StAction>& anAction   = anActionIter->second;
13
@@ -310,7 +310,7 @@
14
 
15
     // adjust width of all elements
16
     const size_t aRowLast = theActions.size();
17
-    for(size_t aRowIter = 0; aRowIter < aRowLast; ++aRowIter) {
18
+    for(aRowIter = 0; aRowIter < aRowLast; ++aRowIter) {
19
         StGLTableItem& anItemLab = changeElement(theRowId + (int )aRowIter, theColId);
20
         anItemLab.getItem()->changeRectPx().right() = anItemLab.getItem()->getRectPx().left() + aCol1MaxWidth;
21
 
22
sview-15_08.tar.gz/StGLWidgets/StGLTextArea.cpp -> sview-15_10.tar.gz/StGLWidgets/StGLTextArea.cpp Changed
33
 
1
@@ -245,11 +245,13 @@
2
     return myText;
3
 }
4
 
5
-void StGLTextArea::setText(const StString& theText) {
6
+bool StGLTextArea::setText(const StString& theText) {
7
     if(myText != theText) {
8
         myText = theText;
9
         myToRecompute = true;
10
+        return true;
11
     }
12
+    return false;
13
 }
14
 
15
 void StGLTextArea::setTextWidth(const int theWidth) {
16
@@ -334,12 +336,15 @@
17
 }
18
 
19
 bool StGLTextArea::stglInit() {
20
+    StGLContext& aCtx = getContext();
21
     if(myIsInitialized) {
22
+        if(isVisible()) {
23
+            formatText(aCtx);
24
+        }
25
         return true;
26
     }
27
 
28
     // initialize GL resources for the font
29
-    StGLContext& aCtx = getContext();
30
     if(!myFont->wasInitialized()) {
31
         if( myFont->changeFont().isNull()
32
         ||  myFont->changeFont()->getFont().isNull()
33
sview-15_08.tar.gz/StGLWidgets/StGLTextureButton.cpp -> sview-15_10.tar.gz/StGLWidgets/StGLTextureButton.cpp Changed
20
 
1
@@ -551,10 +551,17 @@
2
                    const int        theTop,
3
                    const StGLCorner theCorner,
4
                    const size_t     theFacesCount)
5
-: StGLTextureButton(theParent, theLeft, theTop, theCorner, theFacesCount) {
6
+: StGLTextureButton(theParent, theLeft, theTop, theCorner, theFacesCount),
7
+  myIsExternalTexture(false) {
8
     myAnim = Anim_None;
9
 }
10
 
11
+StGLIcon::~StGLIcon() {
12
+    if(myIsExternalTexture) {
13
+        myTextures.nullify();
14
+    }
15
+}
16
+
17
 bool StGLIcon::tryClick(const StPointD_t& , const int& , bool& ) {
18
     return false;
19
 }
20
sview-15_08.tar.gz/StGLWidgets/StGLWidgets.cbp -> sview-15_10.tar.gz/StGLWidgets/StGLWidgets.cbp Changed
39
 
1
@@ -213,10 +213,8 @@
2
        <Unit filename="StGLCombobox.cpp" />
3
        <Unit filename="StGLDescription.cpp" />
4
        <Unit filename="StGLFpsLabel.cpp" />
5
-       <Unit filename="StGLImageFlatProgram.cpp" />
6
        <Unit filename="StGLImageProgram.cpp" />
7
        <Unit filename="StGLImageRegion.cpp" />
8
-       <Unit filename="StGLImageSphereProgram.cpp" />
9
        <Unit filename="StGLMenu.cpp" />
10
        <Unit filename="StGLMenuCheckbox.cpp" />
11
        <Unit filename="StGLMenuItem.cpp" />
12
@@ -224,6 +222,7 @@
13
        <Unit filename="StGLMenuRadioButton.cpp" />
14
        <Unit filename="StGLMessageBox.cpp" />
15
        <Unit filename="StGLMsgStack.cpp" />
16
+       <Unit filename="StGLOpenFile.cpp" />
17
        <Unit filename="StGLPlayList.cpp" />
18
        <Unit filename="StGLRadioButton.cpp" />
19
        <Unit filename="StGLRadioButtonFloat32.cpp" />
20
@@ -254,10 +253,8 @@
21
        <Unit filename="../include/StGLWidgets/StGLCorner.h" />
22
        <Unit filename="../include/StGLWidgets/StGLDescription.h" />
23
        <Unit filename="../include/StGLWidgets/StGLFpsLabel.h" />
24
-       <Unit filename="../include/StGLWidgets/StGLImageFlatProgram.h" />
25
        <Unit filename="../include/StGLWidgets/StGLImageProgram.h" />
26
        <Unit filename="../include/StGLWidgets/StGLImageRegion.h" />
27
-       <Unit filename="../include/StGLWidgets/StGLImageSphereProgram.h" />
28
        <Unit filename="../include/StGLWidgets/StGLMenu.h" />
29
        <Unit filename="../include/StGLWidgets/StGLMenuCheckbox.h" />
30
        <Unit filename="../include/StGLWidgets/StGLMenuItem.h" />
31
@@ -265,6 +262,7 @@
32
        <Unit filename="../include/StGLWidgets/StGLMenuRadioButton.h" />
33
        <Unit filename="../include/StGLWidgets/StGLMessageBox.h" />
34
        <Unit filename="../include/StGLWidgets/StGLMsgStack.h" />
35
+       <Unit filename="../include/StGLWidgets/StGLOpenFile.h" />
36
        <Unit filename="../include/StGLWidgets/StGLPlayList.h" />
37
        <Unit filename="../include/StGLWidgets/StGLRadioButton.h" />
38
        <Unit filename="../include/StGLWidgets/StGLRadioButtonFloat32.h" />
39
sview-15_08.tar.gz/StGLWidgets/StGLWidgets.vcxproj -> sview-15_10.tar.gz/StGLWidgets/StGLWidgets.vcxproj Changed
20
 
1
@@ -213,10 +213,8 @@
2
     <ClCompile Include="StGLCombobox.cpp" />
3
     <ClCompile Include="StGLDescription.cpp" />
4
     <ClCompile Include="StGLFpsLabel.cpp" />
5
-    <ClCompile Include="StGLImageFlatProgram.cpp" />
6
     <ClCompile Include="StGLImageProgram.cpp" />
7
     <ClCompile Include="StGLImageRegion.cpp" />
8
-    <ClCompile Include="StGLImageSphereProgram.cpp" />
9
     <ClCompile Include="StGLMenu.cpp" />
10
     <ClCompile Include="StGLMenuCheckbox.cpp" />
11
     <ClCompile Include="StGLMenuItem.cpp" />
12
@@ -224,6 +222,7 @@
13
     <ClCompile Include="StGLMenuRadioButton.cpp" />
14
     <ClCompile Include="StGLMessageBox.cpp" />
15
     <ClCompile Include="StGLMsgStack.cpp" />
16
+    <ClCompile Include="StGLOpenFile.cpp" />
17
     <ClCompile Include="StGLPlayList.cpp" />
18
     <ClCompile Include="StGLRadioButton.cpp" />
19
     <ClCompile Include="StGLRadioButtonFloat32.cpp" />
20
sview-15_08.tar.gz/StGLWidgets/StGLWidgets.vcxproj.filters -> sview-15_10.tar.gz/StGLWidgets/StGLWidgets.vcxproj.filters Changed
20
 
1
@@ -27,18 +27,12 @@
2
     <ClCompile Include="StGLFpsLabel.cpp">
3
       <Filter>Source files</Filter>
4
     </ClCompile>
5
-    <ClCompile Include="StGLImageFlatProgram.cpp">
6
-      <Filter>Source files</Filter>
7
-    </ClCompile>
8
     <ClCompile Include="StGLImageProgram.cpp">
9
       <Filter>Source files</Filter>
10
     </ClCompile>
11
     <ClCompile Include="StGLImageRegion.cpp">
12
       <Filter>Source files</Filter>
13
     </ClCompile>
14
-    <ClCompile Include="StGLImageSphereProgram.cpp">
15
-      <Filter>Source files</Filter>
16
-    </ClCompile>
17
     <ClCompile Include="StGLMenu.cpp">
18
       <Filter>Source files</Filter>
19
     </ClCompile>
20
sview-15_08.tar.gz/StGLWidgets/StSubQueue.cpp -> sview-15_10.tar.gz/StGLWidgets/StSubQueue.cpp Changed
9
 
1
@@ -41,7 +41,6 @@
2
 StHandle<StSubItem> StSubQueue::pop(const double thePTS) {
3
     myMutex.lock();
4
     for(QueueItem* anItem = myFront; anItem != NULL;) {
5
-        StHandle<StSubItem> aSubItem = anItem->myItem;
6
         if(anItem->myItem->TimeEnd < thePTS) {
7
             // remove outdated items
8
             myFront = myFront->myNext;
9
sview-15_08.tar.gz/StImageViewer/StImageLoader.cpp -> sview-15_10.tar.gz/StImageViewer/StImageLoader.cpp Changed
160
 
1
@@ -110,6 +110,7 @@
2
                                      const size_t           theMaxSizeX,
3
                                      const size_t           theMaxSizeY,
4
                                      StCubemap              theCubemap,
5
+                                     const size_t*          theCubeCoeffs,
6
                                      StPairRatio            thePairRatio) {
7
     if(theRef->isNull()) {
8
         return theRef;
9
@@ -122,9 +123,9 @@
10
         size_t aMulY = (thePairRatio == StPairRatio_HalfHeight) ? 2 : 1;
11
         for(size_t aPlaneId = 0; aPlaneId < 4; ++aPlaneId) {
12
             const StImagePlane& aPlane = theRef->getPlane(aPlaneId);
13
-            aSizesY[aPlaneId] = stMin(aPlane.getSizeX() / (6 * aMulX), theMaxSizeY);
14
-            if(aSizesY[aPlaneId] != aPlane.getSizeY() * aMulY) {
15
-                const size_t aSizeAlt = stMin(aPlane.getSizeY(), theMaxSizeY) * aMulY;
16
+            aSizesY[aPlaneId] = stMin(aPlane.getSizeX() / (theCubeCoeffs[0] * aMulX), theMaxSizeY);
17
+            if(aSizesY[aPlaneId] * theCubeCoeffs[1] != aPlane.getSizeY() * aMulY) {
18
+                const size_t aSizeAlt = stMin(aPlane.getSizeY() / theCubeCoeffs[1], theMaxSizeY) * aMulY;
19
                 aSizesY[aPlaneId] = stMax(aSizesY[aPlaneId], aSizeAlt);
20
                 toResize = true;
21
             }
22
@@ -137,8 +138,8 @@
23
         anImage->setColorModel(theRef->getColorModel());
24
         anImage->setColorScale(theRef->getColorScale());
25
 
26
-        double aRatioX = double(aSizesY[0] * 6 * aMulX) / double(theRef->getSizeX());
27
-        double aRatioY = double(aSizesY[0]     * aMulY) / double(theRef->getSizeY());
28
+        double aRatioX = double(aSizesY[0] * theCubeCoeffs[0] * aMulX) / double(theRef->getSizeX());
29
+        double aRatioY = double(aSizesY[0] * theCubeCoeffs[1] * aMulY) / double(theRef->getSizeY());
30
         anImage->setPixelRatio(float(double(theRef->getPixelRatio()) * aRatioY / aRatioX));
31
         for(size_t aPlaneId = 0; aPlaneId < 4; ++aPlaneId) {
32
             const StImagePlane& aFromPlane = theRef->getPlane(aPlaneId);
33
@@ -147,8 +148,8 @@
34
             }
35
 
36
             if(!anImage->changePlane(aPlaneId).initTrash(aFromPlane.getFormat(),
37
-                                                         aSizesY[aPlaneId] * 6 * aMulX,
38
-                                                         aSizesY[aPlaneId]     * aMulY)) {
39
+                                                         aSizesY[aPlaneId] * theCubeCoeffs[0] * aMulX,
40
+                                                         aSizesY[aPlaneId] * theCubeCoeffs[1] * aMulY)) {
41
                 ST_ERROR_LOG("Scale failed!");
42
                 return theRef;
43
             }
44
@@ -179,6 +180,21 @@
45
     return anImage;
46
 }
47
 
48
+/**
49
+ * Auxiliary method to format image dimensions.
50
+ */
51
+inline StString formatSize(size_t theSizeX,
52
+                           size_t theSizeY,
53
+                           size_t theSrcSizeX,
54
+                           size_t theSrcSizeY) {
55
+    StString aText = StString() + theSizeX + " x " + theSizeY;
56
+    if(theSizeX != theSrcSizeX
57
+    || theSizeY != theSrcSizeY) {
58
+        aText += StString() + " [" + theSrcSizeX + " x " + theSrcSizeY + "]";
59
+    }
60
+    return aText;
61
+}
62
+
63
 bool StImageLoader::loadImage(const StHandle<StFileNode>& theSource,
64
                               StHandle<StStereoParams>&   theParams) {
65
     const StString               aFilePath = theSource->getPath();
66
@@ -353,18 +369,14 @@
67
     // scale down image if it does not fit texture limits
68
     size_t aSizeXLim = size_t(myMaxTexDim);
69
     size_t aSizeYLim = size_t(myMaxTexDim);
70
-    size_t aSizeX1 = 0;
71
-    size_t aSizeY1 = 0;
72
-    size_t aSizeX2 = 0;
73
-    size_t aSizeY2 = 0;
74
-    if(!anImageFileL->isNull()) {
75
-        aSizeX1 = anImageFileL->getSizeX();
76
-        aSizeY1 = anImageFileL->getSizeY();
77
-    }
78
-    if(!anImageFileR->isNull()) {
79
-        aSizeX2 = anImageFileR->getSizeX();
80
-        aSizeY2 = anImageFileR->getSizeY();
81
-    }
82
+    size_t aSizeX1 = anImageFileL->getSizeX();
83
+    size_t aSizeY1 = anImageFileL->getSizeY();
84
+    size_t aSizeX2 = anImageFileR->getSizeX();
85
+    size_t aSizeY2 = anImageFileR->getSizeY();
86
+    theParams->Src1SizeX = aSizeX1;
87
+    theParams->Src1SizeY = aSizeY1;
88
+    theParams->Src2SizeX = aSizeX2;
89
+    theParams->Src2SizeY = aSizeY2;
90
     StPairRatio aPairRatio = StPairRatio_1;
91
     if(anImageFileR->isNull()) {
92
         aPairRatio = st::formatToPairRatio(aSrcFormatCurr);
93
@@ -376,24 +388,32 @@
94
             aSizeY1   /= 2;
95
         }
96
     }
97
+    size_t aCubeCoeffs[2] = {0, 0};
98
     if(aSrcCubemap == StCubemap_Packed) {
99
-        bool isOk = aSizeX1 / 6 == aSizeY1;
100
+        if(aSizeX1 / 6 == aSizeY1) {
101
+            aCubeCoeffs[0] = 6;
102
+            aCubeCoeffs[1] = 1;
103
+        } else if(aSizeX1 / 3 == aSizeY1 / 2) {
104
+            aCubeCoeffs[0] = 3;
105
+            aCubeCoeffs[1] = 2;
106
+        }
107
         if(!anImageFileR->isNull()
108
         && (aSizeX1 != aSizeX2 || aSizeY1 != aSizeY2)) {
109
-            isOk = false;
110
+            aCubeCoeffs[0] = 0;
111
         }
112
-        if(!isOk) {
113
+        if(aCubeCoeffs[0] == 0) {
114
             myMsgQueue->pushError(StString("Image(s) has unexpected dimensions: {0}x{1} ({2}x{3})\n"
115
-                                           "Cubemap should has 6 horizontally stacked squared images.")
116
+                                           "Cubemap should has 6 squared images in configuration 6:1 (single row) or 3:2 (two rows).")
117
                        .format(aSizeX1, aSizeY1, anImageFileL->getSizeX(), anImageFileL->getSizeY()));
118
             aSrcCubemap = StCubemap_OFF;
119
         } else {
120
-            aSizeXLim *= 6;
121
+            aSizeXLim *= aCubeCoeffs[0];
122
+            aSizeYLim *= aCubeCoeffs[1];
123
         }
124
     }
125
 
126
-    StHandle<StImage> anImageL = scaledImage(anImageFileL, aSizeXLim, aSizeYLim, aSrcCubemap, aPairRatio);
127
-    StHandle<StImage> anImageR = scaledImage(anImageFileR, aSizeXLim, aSizeYLim, aSrcCubemap, aPairRatio);
128
+    StHandle<StImage> anImageL = scaledImage(anImageFileL, aSizeXLim, aSizeYLim, aSrcCubemap, aCubeCoeffs, aPairRatio);
129
+    StHandle<StImage> anImageR = scaledImage(anImageFileR, aSizeXLim, aSizeYLim, aSrcCubemap, aCubeCoeffs, aPairRatio);
130
 #ifdef ST_DEBUG
131
     const double aScaleTimeMSec = aLoadTimer.getElapsedTimeInMilliSec() - aLoadTimeMSec;
132
     if(anImageL != anImageFileL) {
133
@@ -428,9 +448,11 @@
134
     }
135
     const StString aModelL = anImageFileL->formatImgColorModel();
136
     if(!anImageFileR->isNull()) {
137
-        anImgInfo->Info.add(StArgument(tr(INFO_DIMENSIONS), StString()
138
-                                     + anImageFileL->getSizeX() + " x " + anImageFileL->getSizeY() + " " + tr(INFO_LEFT) + "\n"
139
-                                     + anImageFileR->getSizeX() + " x " + anImageFileR->getSizeY() + " " + tr(INFO_RIGHT)));
140
+        anImgInfo->Info.add(StArgument(tr(INFO_DIMENSIONS),
141
+                                       formatSize(anImageL->getSizeX(), anImageL->getSizeY(),
142
+                                                  theParams->Src1SizeX, theParams->Src1SizeY) + " " + tr(INFO_LEFT) + "\n"
143
+                                     + formatSize(anImageR->getSizeX(), anImageR->getSizeY(),
144
+                                                  theParams->Src2SizeX, theParams->Src2SizeY) + " " + tr(INFO_RIGHT)));
145
         const StString aModelR = anImageFileR->formatImgColorModel();
146
         if(aModelL == aModelR) {
147
             anImgInfo->Info.add(StArgument(tr(INFO_COLOR_MODEL), aModelL));
148
@@ -440,8 +462,9 @@
149
                               + aModelR + " " + tr(INFO_RIGHT)));
150
         }
151
     } else {
152
-        anImgInfo->Info.add(StArgument(tr(INFO_DIMENSIONS), StString()
153
-                                     + anImageFileL->getSizeX() + " x " + anImageFileL->getSizeY()));
154
+        anImgInfo->Info.add(StArgument(tr(INFO_DIMENSIONS),
155
+                                       formatSize(anImageL->getSizeX(), anImageL->getSizeY(),
156
+                                                  theParams->Src1SizeX, theParams->Src1SizeY)));
157
         anImgInfo->Info.add(StArgument(tr(INFO_COLOR_MODEL),
158
                                        aModelL));
159
     }
160
sview-15_08.tar.gz/StImageViewer/StImagePluginInfo.h -> sview-15_10.tar.gz/StImageViewer/StImagePluginInfo.h Changed
30
 
1
@@ -51,7 +51,7 @@
2
 
3
 /**
4
  *.jpg, *.jpeg, *.jpe - Joint Photographic Experts Group image file, lossy
5
- *.jp2 - JPEG 2000 image, lossy
6
+ *.jp2, *.j2k - JPEG 2000 image, lossy
7
  */
8
 #define ST_JPG_MIME "image/jpg"
9
 #define ST_JPG_EXT  "jpg"
10
@@ -62,7 +62,10 @@
11
 #define ST_JPEG_EXT  "jpeg"
12
 #define ST_JP2_MIME "image/x-jp2"
13
 #define ST_JP2_EXT  "jp2"
14
-#define ST_JP2_DESC "JP2 - JPEG 2000 image, lossy"
15
+#define ST_JP2_DESC "J2K - JPEG 2000 image, lossy"
16
+#define ST_J2K_MIME "image/x-j2k"
17
+#define ST_J2K_EXT  "j2k"
18
+#define ST_J2K_DESC "J2K - JPEG 2000 image, lossy"
19
 
20
 /**
21
  *.png - Portable Network Graphics image file, lossless
22
@@ -215,6 +218,7 @@
23
 ST_JPE_MIME ":" ST_JPE_EXT ":" ST_JPEG_DESC ";" \
24
 ST_JPEG_MIME ":" ST_JPEG_EXT ":" ST_JPEG_DESC ";" \
25
 ST_JP2_MIME ":" ST_JP2_EXT ":" ST_JP2_DESC ";" \
26
+ST_J2K_MIME ":" ST_J2K_EXT ":" ST_J2K_DESC ";" \
27
 ST_PNG_MIME ":" ST_PNG_EXT ":" ST_PNG_DESC ";" \
28
 ST_BMP_MIME ":" ST_BMP_EXT ":" ST_BMP_DESC ";" \
29
 ST_GIF_MIME ":" ST_GIF_EXT ":" ST_GIF_DESC ";" \
30
sview-15_08.tar.gz/StImageViewer/StImageViewer.cpp -> sview-15_10.tar.gz/StImageViewer/StImageViewer.cpp Changed
201
 
1
@@ -51,6 +51,9 @@
2
     static const char ST_SETTING_FPSTARGET[]   = "fpsTarget";
3
     static const char ST_SETTING_SRCFORMAT[]   = "srcFormat";
4
     static const char ST_SETTING_LAST_FOLDER[] = "lastFolder";
5
+    static const char ST_SETTING_RECENT_L[]    = "recentL";
6
+    static const char ST_SETTING_RECENT_R[]    = "recentR";
7
+    static const char ST_SETTING_SAVE_RECENT[] = "toSaveRecent";
8
     static const char ST_SETTING_COMPRESS[]    = "toCompress";
9
     static const char ST_SETTING_ESCAPENOQUIT[]= "escNoQuit";
10
     static const char ST_SETTING_FULLSCREENUI[]= "fullScreenUI";
11
@@ -60,6 +63,7 @@
12
     static const char ST_SETTING_SCALE_FORCE2X[] = "scale2X";
13
     static const char ST_SETTING_FULLSCREEN[]  = "fullscreen";
14
     static const char ST_SETTING_SLIDESHOW[]   = "slideshow";
15
+    static const char ST_SETTING_TRACK_HEAD[]  = "toTrackHead";
16
     static const char ST_SETTING_SHOW_FPS[]    = "toShowFps";
17
     static const char ST_SETTING_MOBILE_UI[]   = "isMobileUI";
18
     static const char ST_SETTING_VSYNC[]       = "vsync";
19
@@ -68,12 +72,14 @@
20
     static const char ST_SETTING_TEXFILTER[]   = "viewTexFilter";
21
     static const char ST_SETTING_GAMMA[]       = "viewGamma";
22
     static const char ST_SETTING_RATIO[]       = "ratio";
23
+    static const char ST_SETTING_HEAL_ANAMORPHIC[]    = "toHealAnamorphic";
24
     static const char ST_SETTING_UPDATES_LAST_CHECK[] = "updatesLastCheck";
25
     static const char ST_SETTING_UPDATES_INTERVAL[]   = "updatesInterval";
26
     static const char ST_SETTING_IMAGELIB[]    = "imageLib";
27
 
28
     static const char ST_ARGUMENT_FILE_LEFT[]  = "left";
29
     static const char ST_ARGUMENT_FILE_RIGHT[] = "right";
30
+    static const char ST_ARGUMENT_FILE_LAST[]  = "last";
31
 
32
 }
33
 
34
@@ -165,6 +171,23 @@
35
     ST_LOCAL const StString& getPathLeft()  const { return myPathLeft; }
36
 
37
     /**
38
+     * Set paths to open.
39
+     */
40
+    ST_LOCAL void setPaths(const StString& thePathLeft,
41
+                           const StString& thePathRight) {
42
+        StMutexAuto aLock(myMutex);
43
+        if(myState != StOpenImage::Dialog_Inactive) {
44
+            return;
45
+        }
46
+
47
+        myPathLeft  = thePathLeft;
48
+        myPathRight = thePathRight;
49
+        if(!myPathLeft.isEmpty()) {
50
+            myState = StOpenImage::Dialog_HasFiles;
51
+        }
52
+    }
53
+
54
+    /**
55
      * Return path to the right file.
56
      * Should NOT be called within Active state.
57
      */
58
@@ -227,7 +250,7 @@
59
                              const StHandle<StOpenInfo>&        theOpenInfo,
60
                              const StString&                    theAppName)
61
 : StApplication(theResMgr, theParentWin, theOpenInfo),
62
-  myAppName(theAppName),
63
+  myAppName(!theAppName.isEmpty() ? theAppName : ST_DRAWER_PLUGIN_NAME),
64
   myEventLoaded(false),
65
   //
66
   mySlideShowTimer(false),
67
@@ -238,9 +261,9 @@
68
   myToRecreateMenu(false),
69
   myToSaveSrcFormat(false),
70
   myEscNoQuit(false),
71
-  myToHideUIFullScr(false) {
72
-    const StString& anAppName = !theAppName.isEmpty() ? theAppName : ST_DRAWER_PLUGIN_NAME;
73
-    mySettings = new StSettings(myResMgr, anAppName);
74
+  myToHideUIFullScr(false),
75
+  myToCheckPoorOrient(true) {
76
+    mySettings = new StSettings(myResMgr, myAppName);
77
     myLangMap  = new StTranslations(myResMgr, StImageViewer::ST_DRAWER_PLUGIN_NAME);
78
     myOpenDialog = new StOpenImage(this);
79
     StImageViewerStrings::loadDefaults(*myLangMap);
80
@@ -267,6 +290,7 @@
81
     params.checkUpdatesDays = new StInt32Param(7);
82
     params.srcFormat        = new StInt32Param(StFormat_AUTO);
83
     params.srcFormat->signals.onChanged.connect(this, &StImageViewer::doSwitchSrcFormat);
84
+    params.ToTrackHead   = new StBoolParamNamed(true,  tr(StImageViewerStrings::MENU_VIEW_TRACK_HEAD));
85
     params.ToShowFps     = new StBoolParamNamed(false, tr(StImageViewerStrings::MENU_SHOW_FPS));
86
     params.ToShowToolbar = new StBoolParamNamed(true, "Show toolbar");
87
     params.IsMobileUI = new StBoolParamNamed(StWindow::isMobile(), "Mobile UI");
88
@@ -274,6 +298,7 @@
89
     params.IsVSyncOn  = new StBoolParam(true);
90
     params.IsVSyncOn->signals.onChanged = stSlot(this, &StImageViewer::doSwitchVSync);
91
     StApplication::params.VSyncMode->setValue(StGLContext::VSync_ON);
92
+    params.ToSaveRecent = new StBoolParam(false);
93
 
94
     params.imageLib = StImageFile::ST_LIBAV,
95
     params.TargetFps = 0;
96
@@ -282,6 +307,7 @@
97
     mySettings->loadString(ST_SETTING_LAST_FOLDER,        params.lastFolder);
98
     mySettings->loadInt32 (ST_SETTING_UPDATES_LAST_CHECK, myLastUpdateDay);
99
     mySettings->loadParam (ST_SETTING_UPDATES_INTERVAL,   params.checkUpdatesDays);
100
+    myToCheckPoorOrient = !mySettings->loadParam(ST_SETTING_TRACK_HEAD, params.ToTrackHead);
101
     mySettings->loadParam (ST_SETTING_SHOW_FPS,           params.ToShowFps);
102
     mySettings->loadParam (ST_SETTING_MOBILE_UI,          params.IsMobileUI);
103
     mySettings->loadParam (ST_SETTING_VSYNC,              params.IsVSyncOn);
104
@@ -369,6 +395,9 @@
105
 
106
     anAction = new StActionIntSlot(stCString("DoImageAdjustReset"), stSlot(this, &StImageViewer::doImageAdjustReset), 0);
107
     addAction(Action_ImageAdjustReset, anAction);
108
+
109
+    anAction = new StActionIntSlot(stCString("DoPanoramaOnOff"), stSlot(this, &StImageViewer::doPanoramaOnOff), 0);
110
+    addAction(Action_PanoramaOnOff, anAction, ST_VK_P);
111
 }
112
 
113
 bool StImageViewer::resetDevice() {
114
@@ -393,6 +422,7 @@
115
 
116
     mySettings->saveParam(ST_SETTING_STEREO_MODE, myGUI->myImage->params.displayMode);
117
     mySettings->saveInt32(ST_SETTING_GAMMA, stRound(100.0f * myGUI->myImage->params.gamma->getValue()));
118
+    mySettings->saveParam(ST_SETTING_HEAL_ANAMORPHIC, myGUI->myImage->params.ToHealAnamorphicRatio);
119
     if(params.toRestoreRatio->getValue()) {
120
         mySettings->saveParam(ST_SETTING_RATIO, myGUI->myImage->params.displayRatio);
121
     } else {
122
@@ -401,7 +431,7 @@
123
     mySettings->saveParam(ST_SETTING_TEXFILTER, myGUI->myImage->params.textureFilter);
124
 }
125
 
126
-void StImageViewer::releaseDevice() {
127
+void StImageViewer::saveAllParams() {
128
     saveGuiParams();
129
     if(!myGUI.isNull()) {
130
         mySettings->saveParam (ST_SETTING_SCALE_ADJUST,  params.ScaleAdjust);
131
@@ -411,6 +441,7 @@
132
         mySettings->saveInt32(ST_SETTING_UPDATES_LAST_CHECK, myLastUpdateDay);
133
         mySettings->saveParam(ST_SETTING_UPDATES_INTERVAL, params.checkUpdatesDays);
134
         mySettings->saveString(ST_SETTING_IMAGELIB,  StImageFile::imgLibToString(params.imageLib));
135
+        mySettings->saveParam (ST_SETTING_TRACK_HEAD,params.ToTrackHead);
136
         mySettings->saveParam (ST_SETTING_SHOW_FPS,  params.ToShowFps);
137
         mySettings->saveParam (ST_SETTING_MOBILE_UI, params.IsMobileUI);
138
         mySettings->saveParam (ST_SETTING_VSYNC,     params.IsVSyncOn);
139
@@ -425,6 +456,25 @@
140
         }
141
     }
142
 
143
+    StString aLastL, aLastR;
144
+    StHandle<StFileNode> aFile = myLoader->getPlayList().getCurrentFile();
145
+    if(params.ToSaveRecent->getValue()
146
+    && !aFile.isNull()) {
147
+        if(aFile->isEmpty()) {
148
+            aLastL = aFile->getPath();
149
+        } else if(aFile->size() == 2) {
150
+            aLastL = aFile->getValue(0)->getPath();
151
+            aLastR = aFile->getValue(1)->getPath();
152
+        }
153
+    }
154
+    mySettings->saveString(ST_SETTING_RECENT_L, aLastL);
155
+    mySettings->saveString(ST_SETTING_RECENT_R, aLastR);
156
+    mySettings->flush();
157
+}
158
+
159
+void StImageViewer::releaseDevice() {
160
+    saveAllParams();
161
+
162
     // release GUI data and GL resources before closing the window
163
     myKeyActions.clear();
164
     myGUI.nullify();
165
@@ -456,6 +506,7 @@
166
     mySettings->loadParam (ST_SETTING_STEREO_MODE,        myGUI->myImage->params.displayMode);
167
     mySettings->loadParam (ST_SETTING_TEXFILTER,          myGUI->myImage->params.textureFilter);
168
     mySettings->loadParam (ST_SETTING_RATIO,              myGUI->myImage->params.displayRatio);
169
+    mySettings->loadParam (ST_SETTING_HEAL_ANAMORPHIC,    myGUI->myImage->params.ToHealAnamorphicRatio);
170
     params.toRestoreRatio->setValue(myGUI->myImage->params.displayRatio->getValue() != StGLImageRegion::RATIO_AUTO);
171
     int32_t loadedGamma = 100; // 1.0f
172
         mySettings->loadInt32(ST_SETTING_GAMMA, loadedGamma);
173
@@ -555,6 +606,7 @@
174
     StArgument argEscNoQuit  = theArguments[ST_SETTING_ESCAPENOQUIT];
175
     StArgument argFullScreenUI = theArguments[ST_SETTING_FULLSCREENUI];
176
     StArgument argToolbar    = theArguments[ST_SETTING_SHOW_TOOLBAR];
177
+    StArgument argSaveRecent = theArguments[ST_SETTING_SAVE_RECENT];
178
     if(argToCompress.isValid()) {
179
         myLoader->setCompressMemory(!argToCompress.isValueOff());
180
     }
181
@@ -584,6 +636,9 @@
182
         params.imageLib = StImageFile::imgLibFromString(argImgLibrary.getValue());
183
         myLoader->setImageLib(params.imageLib);
184
     }
185
+    if(argSaveRecent.isValid()) {
186
+        params.ToSaveRecent->setValue(!argSaveRecent.isValueOff());
187
+    }
188
 }
189
 
190
 bool StImageViewer::open() {
191
@@ -594,6 +649,13 @@
192
         return false;
193
     }
194
 
195
+    // disable head-tracking by default for poor sensors
196
+    if(myToCheckPoorOrient
197
+    && myWindow->isPoorOrientationSensor()) {
198
+        myToCheckPoorOrient = false;
199
+        params.ToTrackHead->setValue(false);
200
+    }
201
sview-15_08.tar.gz/StImageViewer/StImageViewer.h -> sview-15_10.tar.gz/StImageViewer/StImageViewer.h Changed
72
 
1
@@ -80,6 +80,7 @@
2
         private: //! @name window events slots
3
 
4
     ST_LOCAL virtual void doChangeDevice(const int32_t theValue);
5
+    ST_LOCAL virtual void doPause    (const StPauseEvent&  theEvent);
6
     ST_LOCAL virtual void doResize   (const StSizeEvent&   theEvent);
7
     ST_LOCAL virtual void doKeyDown  (const StKeyEvent&    theEvent);
8
     ST_LOCAL virtual void doKeyHold  (const StKeyEvent&    theEvent);
9
@@ -91,6 +92,7 @@
10
 
11
         public: //! @name callback Slots
12
 
13
+    ST_LOCAL void doOpen1FileFromGui(StHandle<StString> thePath);
14
     ST_LOCAL void doOpen1FileDialog(const size_t dummy = 0);
15
     ST_LOCAL void doOpen2FilesDialog(const size_t dummy = 0);
16
     ST_LOCAL void doSaveImageAs(const size_t theImgType) { myLoader->doSaveImageAs(theImgType); }
17
@@ -128,10 +130,12 @@
18
         StHandle<StBoolParam>    ScaleHiDPI2X;     //!< option to set HiDPI resolution to 2.0
19
         StHandle<StInt32Param>   checkUpdatesDays; //!< days count between updates checks
20
         StHandle<StInt32Param>   srcFormat;        //!< source format
21
+        StHandle<StBoolParam>    ToTrackHead;      //!< enable/disable head-tracking
22
         StHandle<StBoolParam>    ToShowToolbar;    //!< show/hide toolbar
23
         StHandle<StBoolParam>    ToShowFps;        //!< display FPS meter
24
         StHandle<StBoolParam>    IsMobileUI;       //!< display mobile interface
25
         StHandle<StBoolParam>    IsVSyncOn;        //!< flag to use VSync
26
+        StHandle<StBoolParam>    ToSaveRecent;     //!< load/save recent file
27
         StString                 lastFolder;       //!< laster folder used to open / save file
28
         StImageFile::ImageClass  imageLib;         //!< preferred image library
29
         int                      TargetFps;        //!< limit or not rendering FPS
30
@@ -153,6 +157,7 @@
31
     ST_LOCAL void doFullscreen(const bool theIsFullscreen);
32
     ST_LOCAL void doSwitchSrcFormat(const int32_t theSrcFormat);
33
     ST_LOCAL void doSwitchViewMode(const int32_t theMode);
34
+    ST_LOCAL void doPanoramaOnOff(const size_t );
35
 
36
         public:
37
 
38
@@ -178,7 +183,8 @@
39
         Action_DeleteFile,
40
         Action_ImageAdjustReset,
41
         Action_StereoParamsBegin,
42
-        Action_StereoParamsEnd = Action_StereoParamsBegin + StGLImageRegion::ActionsNb,
43
+        Action_StereoParamsEnd = Action_StereoParamsBegin + StGLImageRegion::ActionsNb - 1,
44
+        Action_PanoramaOnOff,
45
     };
46
 
47
         private:
48
@@ -189,6 +195,7 @@
49
     ST_LOCAL bool init();
50
     ST_LOCAL bool createGui();
51
     ST_LOCAL void saveGuiParams();
52
+    ST_LOCAL void saveAllParams();
53
 
54
     /**
55
      * Parse arguments.
56
@@ -218,6 +225,7 @@
57
     StString                   myAppName;         //!< name of customized application
58
 
59
     StCondition                myEventLoaded;     //!< indicate that new file was open
60
+    StTimer                    myInactivityTimer; //!< timer initialized when application goes into paused state
61
 
62
     StTimer                    mySlideShowTimer;  //!< slideshow stuff
63
     double                     mySlideShowDelay;
64
@@ -228,6 +236,7 @@
65
     bool                       myToSaveSrcFormat; //!< indicates that active source format should be saved or not
66
     bool                       myEscNoQuit;       //!< if true then Escape will not quit application
67
     bool                       myToHideUIFullScr; //!< if true then GUI will be hidden in full-screen mode
68
+    bool                       myToCheckPoorOrient; //!< switch off orientation sensor with poor quality
69
 
70
         private:
71
 
72
sview-15_08.tar.gz/StImageViewer/StImageViewerGUI.cpp -> sview-15_10.tar.gz/StImageViewer/StImageViewerGUI.cpp Changed
201
 
1
@@ -34,6 +34,7 @@
2
 #include <StGLWidgets/StGLMenu.h>
3
 #include <StGLWidgets/StGLMenuItem.h>
4
 #include <StGLWidgets/StGLMsgStack.h>
5
+#include <StGLWidgets/StGLOpenFile.h>
6
 #include <StGLWidgets/StGLRangeFieldFloat32.h>
7
 #include <StGLWidgets/StGLScrollArea.h>
8
 #include <StGLWidgets/StGLSwitchTextured.h>
9
@@ -143,7 +144,7 @@
10
         iconTexture(stCString("menuOverUnderRL"),    anIconSize),
11
         iconTexture(stCString("menuRowLR"),          anIconSize),
12
         iconTexture(stCString("menuColLR"),          anIconSize),
13
-        iconTexture(stCString("menuSrcSeparate"),    anIconSize),
14
+        iconTexture(stCString("menuDual"),           anIconSize),
15
         iconTexture(stCString("menuFrameSeqLR"),     anIconSize),
16
         iconTexture(stCString("menuRedCyanLR"),      anIconSize),
17
         iconTexture(stCString("menuGreenMagentaLR"), anIconSize),
18
@@ -161,6 +162,16 @@
19
                                            StGLCorner(ST_VCORNER_TOP, ST_HCORNER_LEFT));
20
     myBtnSwapLR->setDrawShadow(true);
21
     myBtnSwapLR->changeMargins() = aButtonMargins;
22
+
23
+    StHandle<StBoolParam> aTrackedPano = new StBoolParam(false);
24
+    myBtnPanorama = new StGLCheckboxTextured(myPanelUpper, aTrackedPano,
25
+                                             iconTexture(stCString("actionPanoramaOff"), anIconSize),
26
+                                             iconTexture(stCString("actionPanorama"),    anIconSize),
27
+                                             aLeft + (aBtnIter++) * anIconStep, aTop,
28
+                                             StGLCorner(ST_VCORNER_TOP, ST_HCORNER_LEFT));
29
+    myBtnPanorama->signals.onBtnClick += stSlot(this, &StImageViewerGUI::doPanoramaCombo);
30
+    myBtnPanorama->setDrawShadow(true);
31
+    myBtnPanorama->changeMargins() = aButtonMargins;
32
 }
33
 
34
 /**
35
@@ -278,7 +289,8 @@
36
     StGLMenu* aMenuView = new StGLMenu(this, 0, 0, StGLMenu::MENU_VERTICAL);
37
     StGLMenu* aMenuDispMode  = createDisplayModeMenu();
38
     StGLMenu* aMenuDispRatio = createDisplayRatioMenu();
39
-    StGLMenu* aMenuSurface   = createSurfaceMenu();
40
+    StGLMenu* aMenuPanorama  = new StGLMenu(this, 0, 0, StGLMenu::MENU_VERTICAL);
41
+    fillPanoramaMenu(aMenuPanorama);
42
     StGLMenu* aMenuTexFilter = createSmoothFilterMenu();
43
     StGLMenu* aMenuImgAdjust = createImageAdjustMenu();
44
 
45
@@ -292,7 +304,8 @@
46
     aMenuView->addItem(tr(MENU_VIEW_SWAP_LR),       myImage->params.swapLR);
47
     aMenuView->addItem(tr(MENU_VIEW_DISPLAY_RATIO), aMenuDispRatio)
48
              ->setIcon(stCMenuIcon("actionDisplayRatio"), false);
49
-    aMenuView->addItem(tr(MENU_VIEW_SURFACE),       aMenuSurface);
50
+    aMenuView->addItem(tr(MENU_VIEW_PANORAMA),      aMenuPanorama)
51
+             ->setIcon(stCMenuIcon("actionPanorama"), false);
52
     aMenuView->addItem(tr(MENU_VIEW_TEXFILTER),     aMenuTexFilter)
53
              ->setIcon(stCMenuIcon("actionInterpolation"), false);
54
     aMenuView->addItem(tr(MENU_VIEW_IMAGE_ADJUST),  aMenuImgAdjust)
55
@@ -331,22 +344,28 @@
56
          ->setIcon(stCMenuIcon("menuRatio5_4_"));
57
     aMenu->addItem("1:1",    myImage->params.displayRatio, StGLImageRegion::RATIO_1_1)
58
          ->setIcon(stCMenuIcon("menuRatio1_1_"));
59
-    aMenu->addItem(tr(MENU_VIEW_KEEP_ON_RESTART),   myPlugin->params.toRestoreRatio);
60
+    aMenu->addItem(tr(MENU_VIEW_RATIO_KEEP_ON_RESTART), myPlugin->params.toRestoreRatio);
61
+    aMenu->addItem(tr(MENU_VIEW_RATIO_HEAL_ANAMORPHIC), myImage->params.ToHealAnamorphicRatio);
62
     return aMenu;
63
 }
64
 
65
-/**
66
- * Root -> View menu -> Surface
67
- */
68
-StGLMenu* StImageViewerGUI::createSurfaceMenu() {
69
-    StGLMenu* aMenu = new StGLMenu(this, 0, 0, StGLMenu::MENU_VERTICAL);
70
-    aMenu->addItem(tr(MENU_VIEW_SURFACE_PLANE),
71
-                   myImage->params.ViewMode, StStereoParams::FLAT_IMAGE);
72
-    aMenu->addItem(tr(MENU_VIEW_SURFACE_SPHERE),
73
-                   myImage->params.ViewMode, StStereoParams::PANORAMA_SPHERE);
74
-    aMenu->addItem("Cubemap",
75
-                   myImage->params.ViewMode, StStereoParams::PANORAMA_CUBEMAP);
76
-    return aMenu;
77
+void StImageViewerGUI::fillPanoramaMenu(StGLMenu* theMenu) {
78
+    theMenu->addItem(tr(MENU_VIEW_SURFACE_PLANE),
79
+                     myImage->params.ViewMode, StStereoParams::FLAT_IMAGE);
80
+    theMenu->addItem(tr(MENU_VIEW_SURFACE_SPHERE),
81
+                     myImage->params.ViewMode, StStereoParams::PANORAMA_SPHERE);
82
+    theMenu->addItem(tr(MENU_VIEW_SURFACE_CUBEMAP),
83
+                     myImage->params.ViewMode, StStereoParams::PANORAMA_CUBEMAP);
84
+    if(myWindow->hasOrientationSensor()) {
85
+        theMenu->addItem(tr(myWindow->isPoorOrientationSensor() ? MENU_VIEW_TRACK_HEAD_POOR : MENU_VIEW_TRACK_HEAD),
86
+                         myPlugin->params.ToTrackHead);
87
+    }
88
+}
89
+
90
+void StImageViewerGUI::doPanoramaCombo(const size_t ) {
91
+    StGLCombobox::ListBuilder aBuilder(this);
92
+    fillPanoramaMenu(aBuilder.getMenu());
93
+    aBuilder.display();
94
 }
95
 
96
 /**
97
@@ -685,8 +704,7 @@
98
     aParams.add(myPlugin->params.IsMobileUI);
99
     myLangMap->params.language->setName(tr(MENU_HELP_LANGS));
100
 
101
-    const StString aTitle  = "Settings";
102
-    StInfoDialog*  aDialog = new StInfoDialog(myPlugin, this, aTitle, scale(512), scale(300));
103
+    StInfoDialog* aDialog = new StInfoDialog(myPlugin, this, tr(MENU_HELP_SETTINGS), scale(512), scale(300));
104
 
105
     const int aWidthMax  = aDialog->getContent()->getRectPx().width();
106
     int       aRowLast   = (int )aParams.size();
107
@@ -804,6 +822,12 @@
108
 
109
     int aBtnIter = 0;
110
 
111
+    myBtnOpen = new StGLTextureButton(myPanelUpper, (aBtnIter++) * anIconStep, 0);
112
+    myBtnOpen->signals.onBtnClick.connect(this, &StImageViewerGUI::doOpenFile);
113
+    myBtnOpen->setTexturePath(iconTexture(stCString("actionOpen"), anIconSize));
114
+    myBtnOpen->setDrawShadow(true);
115
+    myBtnOpen->changeMargins() = aButtonMargins;
116
+
117
     StGLTextureButton* aSrcBtn = new StGLTextureButton(myPanelUpper, (aBtnIter++) * anIconStep, 0,
118
                                                        StGLCorner(ST_VCORNER_TOP, ST_HCORNER_LEFT), StFormat_NB);
119
     aSrcBtn->changeMargins() = aButtonMargins;
120
@@ -816,7 +840,7 @@
121
         iconTexture(stCString("menuOverUnderRL"),    anIconSize),
122
         iconTexture(stCString("menuRowLR"),          anIconSize),
123
         iconTexture(stCString("menuColLR"),          anIconSize),
124
-        iconTexture(stCString("menuSrcSeparate"),    anIconSize),
125
+        iconTexture(stCString("menuDual"),           anIconSize),
126
         iconTexture(stCString("menuFrameSeqLR"),     anIconSize),
127
         iconTexture(stCString("menuRedCyanLR"),      anIconSize),
128
         iconTexture(stCString("menuGreenMagentaLR"), anIconSize),
129
@@ -835,6 +859,16 @@
130
     myBtnSwapLR->setDrawShadow(true);
131
     myBtnSwapLR->changeMargins() = aButtonMargins;
132
 
133
+    StHandle<StBoolParam> aTrackedPano = new StBoolParam(false);
134
+    myBtnPanorama = new StGLCheckboxTextured(myPanelUpper, aTrackedPano,
135
+                                             iconTexture(stCString("actionPanoramaOff"), anIconSize),
136
+                                             iconTexture(stCString("actionPanorama"),    anIconSize),
137
+                                             (aBtnIter++) * anIconStep, 0,
138
+                                             StGLCorner(ST_VCORNER_TOP, ST_HCORNER_LEFT));
139
+    myBtnPanorama->signals.onBtnClick += stSlot(this, &StImageViewerGUI::doPanoramaCombo);
140
+    myBtnPanorama->setDrawShadow(true);
141
+    myBtnPanorama->changeMargins() = aButtonMargins;
142
+
143
     aBtnIter = 0;
144
     StGLTextureButton* aBtnEx = new StGLTextureButton(myPanelUpper, (aBtnIter--) * (-anIconStep), 0,
145
                                                       StGLCorner(ST_VCORNER_TOP, ST_HCORNER_RIGHT));
146
@@ -876,14 +910,6 @@
147
     myBtnInfo->changeMargins() = aButtonMargins;
148
 
149
     aBtnIter = 0;
150
-    StGLTextureButton* aBtnZoomOut = new StGLTextureButton(myPanelBottom, (aBtnIter++) * (-anIconStep), 0,
151
-                                                           StGLCorner(ST_VCORNER_TOP, ST_HCORNER_RIGHT));
152
-    aBtnZoomOut->changeMargins() = aButtonMargins;
153
-    aBtnZoomOut->setTexturePath(iconTexture(stCString("actionZoomOut"), anIconSize));
154
-    aBtnZoomOut->setDrawShadow(true);
155
-    aBtnZoomOut->setUserData(StImageViewer::Action_StereoParamsBegin + StGLImageRegion::Action_ScaleOut);
156
-    aBtnZoomOut->signals.onBtnHold += stSlot(this, &StImageViewerGUI::doAction);
157
-
158
     StGLTextureButton* aBtnZoomIn = new StGLTextureButton(myPanelBottom, (aBtnIter++) * (-anIconStep), 0,
159
                                                           StGLCorner(ST_VCORNER_TOP, ST_HCORNER_RIGHT));
160
     aBtnZoomIn->changeMargins() = aButtonMargins;
161
@@ -891,6 +917,35 @@
162
     aBtnZoomIn->setDrawShadow(true);
163
     aBtnZoomIn->setUserData(StImageViewer::Action_StereoParamsBegin + StGLImageRegion::Action_ScaleIn);
164
     aBtnZoomIn->signals.onBtnHold += stSlot(this, &StImageViewerGUI::doAction);
165
+
166
+    StGLTextureButton* aBtnZoomOut = new StGLTextureButton(myPanelBottom, (aBtnIter++) * (-anIconStep), 0,
167
+        StGLCorner(ST_VCORNER_TOP, ST_HCORNER_RIGHT));
168
+    aBtnZoomOut->changeMargins() = aButtonMargins;
169
+    aBtnZoomOut->setTexturePath(iconTexture(stCString("actionZoomOut"), anIconSize));
170
+    aBtnZoomOut->setDrawShadow(true);
171
+    aBtnZoomOut->setUserData(StImageViewer::Action_StereoParamsBegin + StGLImageRegion::Action_ScaleOut);
172
+    aBtnZoomOut->signals.onBtnHold += stSlot(this, &StImageViewerGUI::doAction);
173
+}
174
+
175
+void StImageViewerGUI::doOpenFile(const size_t ) {
176
+    /*if(!isMobile()) {
177
+        myPlugin->doOpen1FileDialog();
178
+        return;
179
+    }*/
180
+
181
+    StGLOpenFile* aDialog = new StGLOpenFile(this, tr(DIALOG_OPEN_FILE), tr(BUTTON_CLOSE));
182
+    aDialog->setMimeList(myPlugin->myLoader->getMimeList());
183
+    aDialog->addHotItem(getResourceManager()->getFolder(StResourceManager::FolderId_Downloads));
184
+    aDialog->addHotItem(getResourceManager()->getFolder(StResourceManager::FolderId_Pictures));
185
+    aDialog->signals.onFileSelected = stSlot(myPlugin, &StImageViewer::doOpen1FileFromGui);
186
+
187
+    if(myPlugin->params.lastFolder.isEmpty()) {
188
+        StHandle<StFileNode> aCurrFile = myPlugin->myLoader->getPlayList().getCurrentFile();
189
+        if(!aCurrFile.isNull()) {
190
+            myPlugin->params.lastFolder = aCurrFile->isEmpty() ? aCurrFile->getFolderPath() : aCurrFile->getValue(0)->getFolderPath();
191
+        }
192
+    }
193
+    aDialog->openFolder(myPlugin->params.lastFolder);
194
 }
195
 
196
 void StImageViewerGUI::doShowMobileExMenu(const size_t ) {
197
@@ -917,7 +972,7 @@
198
     anItem->setIcon(stCMenuIcon("actionHelp"));
199
     anItem->signals.onItemClick += stSlot(this, &StImageViewerGUI::doAboutProgram);
200
     //anItem = aMenu->addItem(myPlugin->StApplication::params.ActiveDevice->getActiveValue());
201
sview-15_08.tar.gz/StImageViewer/StImageViewerGUI.h -> sview-15_10.tar.gz/StImageViewer/StImageViewerGUI.h Changed
45
 
1
@@ -27,6 +27,7 @@
2
 #include <StThreads/StCondition.h>
3
 
4
 // forward declarations
5
+class StGLCheckboxTextured;
6
 class StGLDescription;
7
 class StGLTextureButton;
8
 class StImageViewer;
9
@@ -145,7 +146,6 @@
10
     ST_LOCAL StGLMenu* createViewMenu();         // Root -> View menu
11
     ST_LOCAL StGLMenu* createDisplayModeMenu();  // Root -> View menu -> Output
12
     ST_LOCAL StGLMenu* createDisplayRatioMenu(); // Root -> View menu -> Display Ratio
13
-    ST_LOCAL StGLMenu* createSurfaceMenu();      // Root -> View   -> Surface
14
     ST_LOCAL StGLMenu* createSmoothFilterMenu(); // Root -> View menu -> Smooth Filter
15
     ST_LOCAL StGLMenu* createImageAdjustMenu();  // Root -> View menu -> Image Adjust
16
     ST_LOCAL StGLMenu* createOutputMenu();       // Root -> Output menu
17
@@ -155,6 +155,7 @@
18
     ST_LOCAL StGLMenu* createLanguageMenu();     // Root -> Help -> Language menu
19
 
20
     ST_LOCAL void fillSrcFormatMenu(StGLMenu* theMenu);
21
+    ST_LOCAL void fillPanoramaMenu (StGLMenu* theMenu);
22
 
23
         private: //! @name mobile interface creation routines
24
 
25
@@ -183,9 +184,11 @@
26
     ST_LOCAL void doResetHotKeys(const size_t );
27
     ST_LOCAL void doListHotKeys(const size_t );
28
 
29
+    ST_LOCAL void doOpenFile(const size_t );
30
     ST_LOCAL void doShowMobileExMenu(const size_t );
31
     ST_LOCAL void doMobileSettings(const size_t );
32
     ST_LOCAL void doDisplayStereoFormatCombo(const size_t );
33
+    ST_LOCAL void doPanoramaCombo(const size_t );
34
 
35
         private: //! @name private fields
36
 
37
@@ -208,6 +211,7 @@
38
     StGLTextureButton*  myBtnNext;
39
     StGLTextureButton*  myBtnInfo;
40
     StGLTextureButton*  myBtnSwapLR;
41
+    StGLCheckboxTextured* myBtnPanorama;
42
     StGLTextureButton*  myBtnSrcFrmt;
43
     StGLTextureButton*  myBtnPlayList;
44
     StGLTextureButton*  myBtnFull;
45
sview-15_08.tar.gz/StImageViewer/StImageViewerStrings.cpp -> sview-15_10.tar.gz/StImageViewer/StImageViewerStrings.cpp Changed
75
 
1
@@ -67,7 +67,7 @@
2
     theStrings(MENU_MEDIA_OPEN_IMAGE_2,
3
                "Left+Right files");
4
     theStrings(MENU_SRC_FORMAT_AUTO,
5
-               "Autodetection");
6
+               "Source");
7
     theStrings(MENU_SRC_FORMAT_MONO,
8
                "Mono");
9
     theStrings(MENU_SRC_FORMAT_CROSS_EYED,
10
@@ -110,14 +110,20 @@
11
                "Saturation");
12
     theStrings(MENU_VIEW_ADJUST_GAMMA,
13
                "Gamma");
14
-    theStrings(MENU_VIEW_SURFACE,
15
-               "Surface");
16
+    theStrings(MENU_VIEW_PANORAMA,
17
+               "Panorama");
18
     theStrings(MENU_VIEW_SURFACE_PLANE,
19
                "Plane");
20
     theStrings(MENU_VIEW_SURFACE_SPHERE,
21
                "Sphere");
22
     theStrings(MENU_VIEW_SURFACE_CYLINDER,
23
                "Cylinder");
24
+    theStrings(MENU_VIEW_SURFACE_CUBEMAP,
25
+               "Cubemap");
26
+    theStrings(MENU_VIEW_TRACK_HEAD,
27
+               "Track orientation");
28
+    theStrings(MENU_VIEW_TRACK_HEAD_POOR,
29
+               "Track orientation (poor)");
30
     theStrings(MENU_VIEW_DISPLAY_MODE_STEREO,
31
                "Stereo");
32
     theStrings(MENU_VIEW_DISPLAY_MODE_LEFT,
33
@@ -130,8 +136,10 @@
34
                "Cross-eyed pair");
35
     theStrings(MENU_VIEW_DISPLAY_RATIO_SRC,
36
                "Source");
37
-    theStrings(MENU_VIEW_KEEP_ON_RESTART,
38
+    theStrings(MENU_VIEW_RATIO_KEEP_ON_RESTART,
39
                "Keep on restart");
40
+    theStrings(MENU_VIEW_RATIO_HEAL_ANAMORPHIC,
41
+               "Heal anamorphic 1080p/720p");
42
     theStrings(MENU_VIEW_TEXFILTER_NEAREST,
43
                "Nearest");
44
     theStrings(MENU_VIEW_TEXFILTER_LINEAR,
45
@@ -190,6 +198,8 @@
46
                "Never"),
47
     theStrings(MENU_HELP_HOTKEYS,
48
                "Hotkeys");
49
+    theStrings(MENU_HELP_SETTINGS,
50
+               "Settings");
51
     theStrings(IMAGE_OPEN,
52
                "Open another image");
53
     theStrings(IMAGE_PREVIOUS,
54
@@ -380,7 +390,7 @@
55
               "Rotate clockwise");
56
     addAction(theStrings, StImageViewer::Action_StereoParamsBegin + StGLImageRegion::Action_ModeNext,
57
               "DoParamsModeNext",
58
-              "Select next mode");
59
+              "Select next view mode");
60
     addAction(theStrings, StImageViewer::Action_StereoParamsBegin + StGLImageRegion::Action_PanLeft,
61
               "DoParamsPanLeft",
62
               "Panning - navigate to the left");
63
@@ -411,6 +421,11 @@
64
     addAction(theStrings, StImageViewer::Action_StereoParamsBegin + StGLImageRegion::Action_RotXDown,
65
               "DoParamsRotXDown",
66
               "X Rotation - down");
67
+
68
+    // new actions
69
+    addAction(theStrings, StImageViewer::Action_PanoramaOnOff,
70
+              "DoPanoramaOnOff",
71
+              "Enable/disable panorama mode");
72
 }
73
 
74
 };
75
sview-15_08.tar.gz/StImageViewer/StImageViewerStrings.h -> sview-15_10.tar.gz/StImageViewer/StImageViewerStrings.h Changed
40
 
1
@@ -70,7 +70,7 @@
2
         MENU_VIEW_DISPLAY_RATIO = 1205,
3
         MENU_VIEW_TEXFILTER     = 1206,
4
         MENU_VIEW_IMAGE_ADJUST  = 1207,
5
-        MENU_VIEW_SURFACE       = 1208,
6
+        MENU_VIEW_PANORAMA      = 1208,
7
 
8
         MENU_VIEW_DISPLAY_MODE_STEREO       = 1210,
9
         MENU_VIEW_DISPLAY_MODE_LEFT         = 1211,
10
@@ -78,8 +78,9 @@
11
         MENU_VIEW_DISPLAY_MODE_PARALLEL     = 1213,
12
         MENU_VIEW_DISPLAY_MODE_CROSSYED     = 1214,
13
 
14
-        MENU_VIEW_DISPLAY_RATIO_SRC = 1250,
15
-        MENU_VIEW_KEEP_ON_RESTART   = 1251,
16
+        MENU_VIEW_DISPLAY_RATIO_SRC     = 1250,
17
+        MENU_VIEW_RATIO_KEEP_ON_RESTART = 1251,
18
+        MENU_VIEW_RATIO_HEAL_ANAMORPHIC = 1252,
19
 
20
         MENU_VIEW_TEXFILTER_NEAREST = 1260,
21
         MENU_VIEW_TEXFILTER_LINEAR  = 1261,
22
@@ -92,6 +93,9 @@
23
         MENU_VIEW_SURFACE_PLANE     = 1280,
24
         MENU_VIEW_SURFACE_SPHERE    = 1281,
25
         MENU_VIEW_SURFACE_CYLINDER  = 1282,
26
+        MENU_VIEW_SURFACE_CUBEMAP   = 1283,
27
+        MENU_VIEW_TRACK_HEAD        = 1285,
28
+        MENU_VIEW_TRACK_HEAD_POOR   = 1286,
29
 
30
         // Root -> Output -> Change Device menu
31
         MENU_CHANGE_DEVICE  = 1400,
32
@@ -109,6 +113,7 @@
33
         MENU_HELP_SYSINFO = 1508,
34
         MENU_HELP_SCALE   = 1509,
35
         MENU_HELP_HOTKEYS = 1510,
36
+        MENU_HELP_SETTINGS= 1511,
37
 
38
         // Root -> Help -> Check for updates menu
39
         MENU_HELP_UPDATES_NOW   = 1520,
40
sview-15_08.tar.gz/StImageViewer/lang/chinese/StImageViewer.lng -> sview-15_10.tar.gz/StImageViewer/lang/chinese/StImageViewer.lng Changed
41
 
1
@@ -44,6 +44,7 @@
2
 1214="对眼"
3
 1250="源格式"
4
 1251="重启维持"
5
+?1252="Heal anamorphic 1080p/720p"
6
 1260="接近"
7
 1261="线状"
8
 1270="重置默认"
9
@@ -53,6 +54,9 @@
10
 1280="平面"
11
 1281="球面"
12
 1282="圆柱"
13
+?1283="Cubemap"
14
+?1285="Track orientation"
15
+?1286="Track orientation (poor)"
16
 1400="改变设备->>"
17
 1401="关于插件..."
18
 1402="显示 FPS"
19
@@ -66,6 +70,7 @@
20
 1508="关于系统"
21
 1509="界面大小->>"
22
 ?1510="Hotkeys"
23
+?1511="Settings"
24
 1520="现在"
25
 1521="每天"
26
 1522="每周"
27
@@ -150,7 +155,7 @@
28
 ?6028="Rotate 90 degrees clockwise"
29
 ?6029="Rotate counterclockwise"
30
 ?6030="Rotate clockwise"
31
-?6031="Enable/disable panorama mode"
32
+?6031="Select next view mode"
33
 ?6032="Panning - navigate to the left"
34
 ?6033="Panning - navigate to the right"
35
 ?6034="Panning - navigate to the top"
36
@@ -161,3 +166,4 @@
37
 ?6039="Y Rotation - right"
38
 ?6040="X Rotation - up"
39
 ?6041="X Rotation - down"
40
+?6042="Enable/disable panorama mode"
41
sview-15_10.tar.gz/StImageViewer/lang/czech Added
2
 
1
+(directory)
2
sview-15_10.tar.gz/StImageViewer/lang/czech/StImageViewer.lng Added
172
 
1
@@ -0,0 +1,170 @@
2
+# Czech translation file for StImageViewer program
3
+# @author Kirill Gavrilov
4
+# @translator Marek Audy
5
+--------
6
+1000=Zpět
7
+1001=Další
8
+1002=Přehodit levá/pravá
9
+1003=Vypnout přehození levá/pravá
10
+1004=Vstupní stereoskopický formát:
11
+1015=Otevřít soubor
12
+1028=zobrazit/skrýt soubory
13
+1029=Okno/přes celou obrazovku
14
+1100=Soubor
15
+1101=Otevřít soubor
16
+1102=Uložit jako…
17
+1103=Vstupní stereoformát
18
+1104=Informace o souboru
19
+1109=Zavřít (ESC)
20
+1110=Jeden stereosoubor
21
+1111=Dva soubory levý/pravý zvlášť
22
+1130=Původní
23
+1131=Mono
24
+1132=Křížem vedle sebe
25
+1133=Paralel vedle sebe
26
+1134=Nad/pod P/L
27
+1135=Nad/pod L/P
28
+1136=Prokládaný
29
+1137=Anaglyf červená/modrá
30
+1138=Anaglyf purporová
31
+1139=Anaglyf žlutá
32
+1142=2 stream
33
+1200=Zobrazení
34
+1201=Výstupní formát
35
+1202=Celá obrazovka (Enter)
36
+1203=Vrátit
37
+1204=Přehodit levá/pravá
38
+1205=Poměr stran
39
+1206=Vyhlazení
40
+1207=Barevné korekce
41
+1208=Panorama
42
+1210=Stereo
43
+1211=Levá
44
+1212=Pravá
45
+1213=Paralel vedle sebe
46
+1214=Křížem vedle sebe
47
+1250=Původní
48
+1251=Neukládat nastavení
49
+?1252=Heal anamorphic 1080p/720p
50
+1260=Sousední
51
+1261=Lineární
52
+1270=Resetovat nastavení
53
+1271=Jas
54
+1272=Sytost
55
+1273=Gama
56
+1280=Plocha
57
+1281=Koule
58
+1282=Válec
59
+?1283=Cubemap
60
+?1285="Track orientation"
61
+?1286="Track orientation (poor)"
62
+1400=Zobrazovací zařizení
63
+1401=O modulu
64
+1402=Zobrazovat snímkování (fps)
65
+1403=Vertikální synchronizace
66
+1500=Nápověda
67
+1501=O aplikaci sView…
68
+1502=Aktualizace
69
+1503=Licenční ujednání
70
+1504=Language
71
+1506=Nápověda/klávesové zkratky
72
+1508=O systému
73
+1509=Vzhled
74
+?1510=Hotkeys
75
+?1511=Settings
76
+1520=Nyní
77
+1521=Denně
78
+1522=Týdně
79
+1523=Ročně
80
+1524=Nikdy
81
+1590=Menší
82
+1591=Normální
83
+1592=Velké
84
+1593=Extravelké HiDPI 2x
85
+2000=Otevřít
86
+2001=Otevřít LEVÝ
87
+2002=Otevřít PRAVÝ
88
+2003=Informace o souboru
89
+2004=Žadné informace
90
+2005=Vymazat soubor
91
+2006=Skutečně chcete hodit soubor do koše?
92
+2007=Ukládání metadat
93
+2008=Skutečně chcete vložit metadata do souboru?
94
+2009=Ukládání metadat je možné jen v souborech JPEG
95
+2010=Vyberte místo uložení
96
+2011=Nic není otevřeno!
97
+2012=Obraz není možné uložit!
98
+?2013=Assign new Hot Key for action\n<i>{0}</i>
99
+?2014=Conflicts with: <i>{0}</i>
100
+3000=sView - aplikace pro zobrazení stereovizualizace.
101
+3001=verze
102
+3002=Aplikace zobrazuje soubory JPEG, PNG, MPO.\n © {0} Гаврилов Кирилл <{1}>\nOficiální stránka: {2}\n\nAplikace je vytvořena na platformě GPL3.0{3}\nČeská lokalizace Marek Audy
103
+3003=Nové verze aplikace jsou dostupné na:www.sview.ru.\nProsím aktualizujte svoji aplikaci
104
+3004=Informace o systému
105
+4000=Zavřít
106
+4001=Zrušit
107
+4006=Uložit
108
+4007=Smazat
109
+?4008=Default
110
+?4009=Defaults
111
+?4010=Assign
112
+5000=[levý]
113
+5001=[pravý]
114
+5002=Jméno souboru
115
+5003=Rozlišení
116
+5004=Načítání
117
+5005=ms
118
+5006=Poměr stran pixelu
119
+5007=Barevný model
120
+5008=(metada nejsou v informaci obsažena)
121
+5009=(neobsahuje metadata)
122
+5011=(informace není obsažena v metadatech,\nale byla přidělena podle jména souboru)
123
+5100=JPEG komentář
124
+5101=JPS komentář
125
+5200=Výrobce kamery
126
+5201=Model kamery
127
+5202=Komentář uživatele
128
+5203=Datum snímku
129
+?6000=Switch fullscreen/windowed
130
+?6001=Show/hide FPS meter
131
+?6002=Stereo format - Auto
132
+?6003=Stereo format - Mono
133
+?6004=Stereo format - Over/Under
134
+?6005=Stereo format - Side by side
135
+?6006=Show file info
136
+?6007=Playlist - Go to the first item
137
+?6008=Playlist - Go to the last item
138
+?6009=Playlist - Go to the previous item
139
+?6010=Playlist - Go to the next item
140
+?6011=Playlist - Start/stop slideshow
141
+?6012=Save in PNG format
142
+?6013=Save in JPEG format
143
+?6014=Save file metadata
144
+?6015=Delete the file from file system
145
+?6016=Reset image adjustment
146
+?6017=Reset image position
147
+?6018=Swap Left/Right
148
+?6019=Gamma correction - decrease
149
+?6020=Gamma correction - increase
150
+?6021=DX separation - decrease
151
+?6022=DX separation - increase
152
+?6023=DY separation - decrease
153
+?6024=DY separation - increase
154
+?6025=Angular separation - decrease
155
+?6026=Angular separation - increase
156
+?6027=Rotate 90 degrees counterclockwise
157
+?6028=Rotate 90 degrees clockwise
158
+?6029=Rotate counterclockwise
159
+?6030=Rotate clockwise
160
+?6031=Select next view mode
161
+?6032=Panning - navigate to the left
162
+?6033=Panning - navigate to the right
163
+?6034=Panning - navigate to the top
164
+?6035=Panning - navigate to the bottom
165
+?6036=Scale - increment
166
+?6037=Scale - decrement
167
+?6038=Y Rotation - left
168
+?6039=Y Rotation - right
169
+?6040=X Rotation - up
170
+?6041=X Rotation - down
171
+?6042=Enable/disable panorama mode
172
sview-15_10.tar.gz/StImageViewer/lang/czech/language.lng Added
4
 
1
@@ -0,0 +1,1 @@
2
+Čeština
3
\ No newline at end of file
4
sview-15_08.tar.gz/StImageViewer/lang/english/StImageViewer.lng -> sview-15_10.tar.gz/StImageViewer/lang/english/StImageViewer.lng Changed
62
 
1
@@ -17,7 +17,7 @@
2
 1109="Quit"
3
 1110="From One file"
4
 1111="Left+Right files"
5
-1130="Autodetection"
6
+1130="Source"
7
 1131="Mono"
8
 1132="Cross-eyed"
9
 1133="Parallel Pair"
10
@@ -36,7 +36,7 @@
11
 1205="Display Ratio"
12
 1206="Smooth Filter"
13
 1207="Image Adjust"
14
-1208="Surface"
15
+1208="Panorama"
16
 1210="Stereo"
17
 1211="Left View"
18
 1212="Right View"
19
@@ -44,15 +44,19 @@
20
 1214="Cross-eyed"
21
 1250="Source"
22
 1251="Keep on restart"
23
+1252="Heal anamorphic 1080p/720p"
24
 1260="Nearest"
25
 1261="Linear"
26
 1270="Reset to defaults"
27
 1271="Brightness"
28
 1272="Saturation"
29
 1273="Gamma"
30
-1280="Plane"
31
+1280="Off"
32
 1281="Sphere"
33
 1282="Cylinder"
34
+1283="Cubemap"
35
+1285="Track orientation"
36
+1286="Track orientation (poor)"
37
 1400="Change device"
38
 1401="About Plugin..."
39
 1402="Show FPS"
40
@@ -66,6 +70,7 @@
41
 1508="About system"
42
 1509="Interface Scale"
43
 1510="Hotkeys"
44
+1511="Settings"
45
 1520="Now"
46
 1521="Each day"
47
 1522="Each week"
48
@@ -150,7 +155,7 @@
49
 6028="Rotate 90 degrees clockwise"
50
 6029="Rotate counterclockwise"
51
 6030="Rotate clockwise"
52
-6031="Enable/disable panorama mode"
53
+6031="Select next view mode"
54
 6032="Panning - navigate to the left"
55
 6033="Panning - navigate to the right"
56
 6034="Panning - navigate to the top"
57
@@ -161,3 +166,4 @@
58
 6039="Y Rotation - right"
59
 6040="X Rotation - up"
60
 6041="X Rotation - down"
61
+6042="Enable/disable panorama mode"
62
sview-15_08.tar.gz/StImageViewer/lang/french/StImageViewer.lng -> sview-15_10.tar.gz/StImageViewer/lang/french/StImageViewer.lng Changed
59
 
1
@@ -17,7 +17,7 @@
2
 1109="Quitter"
3
 1110="Depuis un fichier"
4
 1111="2 Fichiers Gauche+Droit"
5
-1130="Auto-détection"
6
+1130="Source"
7
 1131="Mono"
8
 1132="Cross-eyed"
9
 1133="Coté/Coté (SbS)"
10
@@ -36,7 +36,7 @@
11
 1205="Ratio d'affichage"
12
 1206="Lissage antialiasing"
13
 1207="Réglage de l'image"
14
-1208="Surface"
15
+1208="Panorama"
16
 1210="Stéréo"
17
 1211="Vue Gauche"
18
 1212="Vue Droite"
19
@@ -44,6 +44,7 @@
20
 1214="Cross-eyed"
21
 1250="Source"
22
 1251="Garder après redémarrage"
23
+?1252="Heal anamorphic 1080p/720p"
24
 1260="Plus proche"
25
 1261="Lineaire"
26
 1270="Rétablir par défaut"
27
@@ -53,6 +54,9 @@
28
 1280="Plan"
29
 1281="Sphère"
30
 1282="Cylindre"
31
+1283="Cubemap"
32
+?1285="Track orientation"
33
+?1286="Track orientation (poor)"
34
 1400="Changer la sortie"
35
 1401="A propos du Plugin..."
36
 1402="Voir I/S"
37
@@ -66,6 +70,7 @@
38
 ?1508="About system"
39
 ?1509="Scale Interface"
40
 1510="Raccourcis"
41
+1511="Paramètres"
42
 1520="Maintenant"
43
 1521="Chaque Jour"
44
 1522="Chaque Mois"
45
@@ -150,7 +155,7 @@
46
 6028="Faire pivoter un objet de 90 degrés vers la droite"
47
 6029="Sens inverse des aiguilles d’une montre"
48
 6030="Sens des aiguilles d’une montre"
49
-6031="Activer / désactiver le mode panorama"
50
+?6031="Select next view mode"
51
 6032="Naviguer vers la gauche"
52
 6033="Naviguer vers la droite"
53
 6034="Naviguer vers le haut"
54
@@ -161,3 +166,4 @@
55
 ?6039="Y Rotation - right"
56
 ?6040="X Rotation - up"
57
 ?6041="X Rotation - down"
58
+6042="Activer / désactiver le mode panorama"
59
sview-15_08.tar.gz/StImageViewer/lang/german/StImageViewer.lng -> sview-15_10.tar.gz/StImageViewer/lang/german/StImageViewer.lng Changed
62
 
1
@@ -17,7 +17,7 @@
2
 1109="Beenden"
3
 1110="Einer Datei"
4
 1111="Zwei Dateien"
5
-1130="Autoerkennung"
6
+1130="Quelle"
7
 1131="Mono"
8
 1132="Schielend"
9
 1133="Parallel Pair"
10
@@ -36,7 +36,7 @@
11
 1205="Seitenverhältnis"
12
 1206="Glatte Filter"
13
 1207="Bildeinstellung"
14
-1208="Oberfläche"
15
+1208="Panorama"
16
 1210="Stereo"
17
 1211="Linke Bild"
18
 1212="Rechte Bild"
19
@@ -44,15 +44,19 @@
20
 1214="Cross-eyed"
21
 1250="Quelle"
22
 1251="Halten beim Neustart"
23
+?1252="Heal anamorphic 1080p/720p"
24
 1260="Nearest"
25
 1261="Linear"
26
 1270="Auf Standardwerte zurücksetzen"
27
 1271="Helligkeit"
28
 1272="Sättigung"
29
 1273="Gamma"
30
-1280="Fläche"
31
+1280="Aus"
32
 1281="Kugel"
33
 1282="Zylinder"
34
+1283="Cubemap"
35
+?1285="Track orientation"
36
+?1286="Track orientation (poor)"
37
 1400="Gerät ändern"
38
 1401="Über Plugin..."
39
 1402="FPS anzeigen"
40
@@ -66,6 +70,7 @@
41
 1508="Über System"
42
 1509="Maßstab Benutzeroberfläche"
43
 1510="Hotkeys"
44
+1511="Einstellungen"
45
 1520="jetzt"
46
 1521="täglich"
47
 1522="wöchentlich"
48
@@ -150,7 +155,7 @@
49
 6028="Um 90 Grad im Uhrzeigersinn drehen"
50
 6029="Drehen gegen den Uhrzeigersinn"
51
 6030="Im Uhrzeigersinn drehen"
52
-6031="Aktivieren / Deaktivieren der Panorama-Modus"
53
+?6031="Select next view mode"
54
 6032="Navigieren nach links"
55
 6033="Navigieren nach rechts"
56
 6034="Navigieren nach oben"
57
@@ -161,3 +166,4 @@
58
 6039="Y-Drehung - rechts"
59
 6040="X-Drehung - nach oben"
60
 6041="X-Drehung - nach unten"
61
+6042="Aktivieren / Deaktivieren der Panorama-Modus"
62
sview-15_08.tar.gz/StImageViewer/lang/korean/StImageViewer.lng -> sview-15_10.tar.gz/StImageViewer/lang/korean/StImageViewer.lng Changed
53
 
1
@@ -37,7 +37,7 @@
2
 1205="화면 비율"
3
 ?1206="Smooth Filter"
4
 1207="이미지 보정"
5
-?1208="Surface"
6
+?1208="Panorama"
7
 ?1210="Stereo"
8
 ?1211="Left View"
9
 ?1212="Right View"
10
@@ -45,15 +45,19 @@
11
 1214="크로스-아이"
12
 ?1250="Source"
13
 1251="재시작시 유지"
14
+?1252="Heal anamorphic 1080p/720p"
15
 ?1260="Nearest"
16
 ?1261="Linear"
17
 1270="기본값으로 리셋"
18
 1271="밝기"
19
 ?1272="Saturation"
20
 1273="감마"
21
-?1280="Plane"
22
+?1280="Off"
23
 ?1281="Sphere"
24
 ?1282="Cylinder"
25
+?1283="Cubemap"
26
+?1285="Track orientation"
27
+?1286="Track orientation (poor)"
28
 1400="장치 변경"
29
 ?1401="About Plugin..."
30
 ?1402="Show FPS"
31
@@ -67,6 +71,7 @@
32
 ?1508="About system"
33
 ?1509="Interface Scale"
34
 ?1510="Hotkeys"
35
+?1511="Settings"
36
 1520="지금"
37
 1521="매일Each day"
38
 1522="매주Each week"
39
@@ -151,7 +156,7 @@
40
 ?6028="Rotate 90 degrees clockwise"
41
 ?6029="Rotate counterclockwise"
42
 ?6030="Rotate clockwise"
43
-?6031="Enable/disable panorama mode"
44
+?6031="Select next view mode"
45
 ?6032="Panning - navigate to the left"
46
 ?6033="Panning - navigate to the right"
47
 ?6034="Panning - navigate to the top"
48
@@ -162,3 +167,4 @@
49
 ?6039="Y Rotation - right"
50
 ?6040="X Rotation - up"
51
 ?6041="X Rotation - down"
52
+?6042="Enable/disable panorama mode"
53
sview-15_08.tar.gz/StImageViewer/lang/russian/StImageViewer.lng -> sview-15_10.tar.gz/StImageViewer/lang/russian/StImageViewer.lng Changed
50
 
1
@@ -17,7 +17,7 @@
2
 1109="Выход"
3
 1110="Из одного файла"
4
 1111="Левый+Правый файлы"
5
-1130="Автоопределение"
6
+1130="Исходный"
7
 1131="Моно"
8
 1132="Перекрёстная пара"
9
 1133="Параллельная пара"
10
@@ -44,6 +44,7 @@
11
 1214="Перекрёстная пара"
12
 1250="Исходное"
13
 1251="Запомнить"
14
+?1252="Heal anamorphic 1080p/720p"
15
 1260="Nearest"
16
 1261="Linear"
17
 1270="Сбросить настройки"
18
@@ -53,6 +54,9 @@
19
 1280="Плоскость"
20
 1281="Сфера"
21
 1282="Цилиндр"
22
+1283="Куб"
23
+1285="Отслеживать ориентацию"
24
+1286="Отслеживать ориентацию (poor)"
25
 1400="Выбрать устройство"
26
 1401="О модуле..."
27
 1402="Отображать FPS"
28
@@ -66,6 +70,7 @@
29
 1508="О системе"
30
 1509="Масштаб. интерфейса"
31
 1510="Горячие клавиши"
32
+1511="Настройки"
33
 1520="Сейчас"
34
 1521="Каждый день"
35
 1522="Каждую неделю"
36
@@ -150,7 +155,7 @@
37
 6028="Поворот на 90 градусов по часовой стрелке"
38
 6029="Поворот против часовой стрелки"
39
 6030="Поворот по часовой стрелке"
40
-6031="Включить/выключить панорамный режим"
41
+6031="Выбрать следующий режим"
42
 6032="Паннинг - движение налево"
43
 6033="Паннинг - движение направо"
44
 6034="Паннинг - движение наверх"
45
@@ -161,3 +166,4 @@
46
 6039="Y наклон - направо"
47
 6040="X наклон - наверх"
48
 6041="X наклон - вниз"
49
+6042="Включить/выключить панорамный режим"
50
sview-15_08.tar.gz/StMonitorsDump/StMonitorsDump.cbp -> sview-15_10.tar.gz/StMonitorsDump/StMonitorsDump.cbp Changed
14
 
1
@@ -240,6 +240,12 @@
2
            <Add directory="../bin/$(TARGET_NAME)" />
3
        </Linker>
4
        <Unit filename="main.cpp" />
5
+       <Unit filename="main_1.mm">
6
+           <Option compile="1" />
7
+           <Option link="1" />
8
+           <Option target="MAC_gcc" />
9
+           <Option target="MAC_gcc_DEBUG" />
10
+       </Unit>
11
        <Extensions>
12
            <code_completion />
13
            <envvars />
14
sview-15_08.tar.gz/StMonitorsDump/main.cpp -> sview-15_10.tar.gz/StMonitorsDump/main.cpp Changed
52
 
1
@@ -1,5 +1,5 @@
2
 /**
3
- * Copyright © 2009-2013 Kirill Gavrilov <kirill@sview.ru>
4
+ * Copyright © 2009-2015 Kirill Gavrilov <kirill@sview.ru>
5
  *
6
  * StMonitorsDump program is free software: you can redistribute it and/or modify
7
  * it under the terms of the GNU General Public License as published by
8
@@ -175,7 +175,12 @@
9
 
10
 };
11
 
12
-int main(int , char** ) { // force console output
13
+#if defined(__APPLE__)
14
+int stMonitorsDump_main() {
15
+#else
16
+int main(int , char** ) {
17
+#endif
18
+
19
 #ifdef _WIN32
20
     setlocale(LC_ALL, ".OCP"); // we set default locale for console output (useful only for debug)
21
 #endif
22
@@ -270,7 +275,9 @@
23
             }
24
             genInf(anInputEdid, anOutInfFilename + ".inf");
25
         }
26
+    #if !defined(__APPLE__)
27
         st::cout << stostream_text("Press any key to exit...") << st::SYS_PAUSE_EMPTY;
28
+    #endif
29
         return 0;
30
     }
31
 
32
@@ -331,7 +338,9 @@
33
         aFileOut.open(aFileName.toCString());
34
         if(aFileOut.fail()) {
35
             st::cout << st::COLOR_FOR_RED << stostream_text("Couldn't open file \"stMonitorsDump.htm\"!\n") << st::COLOR_FOR_WHITE;
36
+        #if !defined(__APPLE__)
37
             st::cout << stostream_text("Press any key to exit...") << st::SYS_PAUSE_EMPTY;
38
+        #endif
39
             return -1;
40
         }
41
     }
42
@@ -343,7 +352,9 @@
43
     st::cout << st::COLOR_FOR_GREEN << stostream_text("Dump stored to file \"stMonitorsDump.htm\"\n") << st::COLOR_FOR_WHITE;
44
 
45
     StProcess::openURL(aFileName);
46
+#if !defined(__APPLE__)
47
     st::cout << stostream_text("Press any key to exit...") << st::SYS_PAUSE_EMPTY;
48
+#endif
49
     if(isTmpFile) {
50
         StFileNode::removeFile(aFileName);
51
     }
52
sview-15_10.tar.gz/StMonitorsDump/main_1.mm Added
137
 
1
@@ -0,0 +1,135 @@
2
+/**
3
+ * Copyright © 2015 Kirill Gavrilov <kirill@sview.ru>
4
+ *
5
+ * StMonitorsDump program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or
8
+ * (at your option) any later version.
9
+ *
10
+ * StMonitorsDump program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13
+ * See the GNU General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU General Public
16
+ * License along with this program.
17
+ * If not, see <http://www.gnu.org/licenses/>.
18
+ */
19
+
20
+#if defined(__APPLE__)
21
+
22
+#include <StThreads/StThread.h>
23
+
24
+#import <Cocoa/Cocoa.h>
25
+
26
+#include <StCore/StApplication.h>
27
+#include <StCocoa/StCocoaLocalPool.h>
28
+#include <StStrings/stConsole.h>
29
+#include <StThreads/StProcess.h>
30
+
31
+extern int stMonitorsDump_main();
32
+
33
+/**
34
+ * Main Cocoa application responder.
35
+ */
36
+@interface StTestResponder : NSObject <NSApplicationDelegate>
37
+    {
38
+    }
39
+
40
+    + (StTestResponder* ) sharedInstance;
41
+
42
+    /**
43
+     * Default constructor.
44
+     */
45
+    - (id ) init;
46
+
47
+    /**
48
+     * Dummy method for thread-safety Cocoa initialization.
49
+     */
50
+    + (void ) doDummyThread: (id ) theParam;
51
+
52
+@end
53
+
54
+namespace {
55
+
56
+    static StTestResponder* TheAppResponder = NULL;
57
+
58
+}
59
+
60
+@implementation StTestResponder
61
+
62
+        /// Singletone implementation.
63
+
64
+    - (id ) init {
65
+        if(TheAppResponder != NULL) {
66
+            if(self != TheAppResponder) {
67
+                // should never happens
68
+                [self release];
69
+            }
70
+            return TheAppResponder;
71
+        }
72
+
73
+        self = [super init];
74
+        if(self == NULL) {
75
+            return NULL;
76
+        }
77
+        return self;
78
+    }
79
+
80
+    + (StTestResponder* ) sharedInstance {
81
+        if(TheAppResponder == NULL) {
82
+            TheAppResponder = [[super allocWithZone: NULL] init];
83
+        }
84
+        return TheAppResponder;
85
+    }
86
+
87
+    + (id ) allocWithZone: (NSZone* ) theZone { return [[self sharedInstance] retain]; }
88
+    - (id ) copyWithZone: (NSZone* ) theZone { return self; }
89
+    - (id ) retain { return self; }
90
+    - (NSUInteger ) retainCount { return NSUIntegerMax; } //denotes an object that cannot be released
91
+    - (oneway void ) release {}
92
+    - (id ) autorelease { return self; }
93
+
94
+        /// application logic
95
+
96
+    - (BOOL ) application: (NSApplication* ) theApplication
97
+                 openFile: (NSString* ) theFilename {
98
+        return YES;
99
+    }
100
+
101
+    - (void ) applicationDidFinishLaunching: (NSNotification* ) theNotification {
102
+        int aResult = stMonitorsDump_main();
103
+        exit(aResult);
104
+    }
105
+
106
+    - (void ) applicationWillTerminate: (NSNotification* ) theNotification {}
107
+    + (void ) doDummyThread: (id ) theParam {}
108
+
109
+@end
110
+
111
+int main(int , char** ) {
112
+    StCocoaLocalPool aPool;
113
+
114
+    // dummy NSThread to ensure Cocoa thread-safety
115
+    [NSThread detachNewThreadSelector: @selector(doDummyThread: )
116
+                             toTarget: [StTestResponder class]
117
+                           withObject: NULL];
118
+
119
+    NSApplication* anAppNs = [NSApplication sharedApplication];
120
+    StTestResponder* anAppResp = [StTestResponder sharedInstance];
121
+    [anAppNs setDelegate: anAppResp];
122
+
123
+    // dummy hidden window for as workaround
124
+    NSWindow* aWin = [NSWindow alloc];
125
+    [aWin initWithContentRect: NSMakeRect(16, 16, 16, 16)
126
+                    styleMask: NSBorderlessWindowMask
127
+                      backing: NSBackingStoreBuffered
128
+                        defer: NO];
129
+    [aWin release];
130
+
131
+    [anAppNs activateIgnoringOtherApps: YES];
132
+    [anAppNs run];
133
+    return 0;
134
+}
135
+
136
+#endif // __APPLE__
137
sview-15_08.tar.gz/StMoviePlayer/StMoviePlayer.cpp -> sview-15_10.tar.gz/StMoviePlayer/StMoviePlayer.cpp Changed
201
 
1
@@ -21,6 +21,7 @@
2
 #include "StMoviePlayerGUI.h"
3
 #include "StMoviePlayerStrings.h"
4
 #include "StVideo/StVideo.h"
5
+#include "StSeekBar.h"
6
 #include "StTimeBox.h"
7
 
8
 #include <StImage/StImageFile.h>
9
@@ -63,6 +64,7 @@
10
     static const char ST_SETTING_OPENAL_DEVICE[] = "alDevice";
11
     static const char ST_SETTING_RECENT_FILES[]  = "recent";
12
     static const char ST_SETTING_SHOW_LIST[]     = "showPlaylist";
13
+    static const char ST_SETTING_TRACK_HEAD[]    = "toTrackHead";
14
     static const char ST_SETTING_SHOW_FPS[]      = "toShowFps";
15
     static const char ST_SETTING_MOBILE_UI[]     = "isMobileUI";
16
     static const char ST_SETTING_LIMIT_FPS[]     = "toLimitFps";
17
@@ -71,6 +73,9 @@
18
 
19
     static const char ST_SETTING_SCALE_ADJUST[]  = "scaleAdjust";
20
     static const char ST_SETTING_SCALE_FORCE2X[] = "scale2X";
21
+    static const char ST_SETTING_SUBTITLES_PLACE[]="subsPlace";
22
+    static const char ST_SETTING_SUBTITLES_TOPDY[]="subsTopDY";
23
+    static const char ST_SETTING_SUBTITLES_BOTTOMDY[]="subsBottomDY";
24
     static const char ST_SETTING_SUBTITLES_SIZE[]= "subsSize";
25
     static const char ST_SETTING_SUBTITLES_PARALLAX[] = "subsParallax";
26
     static const char ST_SETTING_SUBTITLES_PARSER[] = "subsParser";
27
@@ -84,6 +89,7 @@
28
     static const char ST_SETTING_LOOP_SINGLE[]   = "loopSingle";
29
     static const char ST_SETTING_GLOBAL_MKEYS[]  = "globalMediaKeys";
30
     static const char ST_SETTING_RATIO[]         = "ratio";
31
+    static const char ST_SETTING_HEAL_ANAMORPHIC[] = "toHealAnamorphic";
32
     static const char ST_SETTING_UPDATES_LAST_CHECK[] = "updatesLastCheck";
33
     static const char ST_SETTING_UPDATES_INTERVAL[]   = "updatesInterval";
34
     static const char ST_SETTING_SAVE_IMG_TYPE[] = "snapImgType";
35
@@ -271,6 +277,25 @@
36
      */
37
     ST_LOCAL const StString& getPathSubtitles() const { return myPathSubs; }
38
 
39
+    /**
40
+     * Set paths to open.
41
+     */
42
+    ST_LOCAL void setPaths(const StString& thePathLeft,
43
+                           const StString& thePathRight) {
44
+        StMutexAuto aLock(myMutex);
45
+        if(myState != StOpenVideo::Dialog_Inactive) {
46
+            return;
47
+        }
48
+
49
+        myPathVideoL = thePathLeft;
50
+        myPathVideoR = thePathRight;
51
+        myPathAudio.clear();
52
+        myPathSubs .clear();
53
+        if(!myPathVideoL.isEmpty()) {
54
+            myState = StOpenVideo::Dialog_HasFiles;
55
+        }
56
+    }
57
+
58
         private:
59
 
60
     /**
61
@@ -368,6 +393,11 @@
62
     // update menu
63
 }
64
 
65
+void StMoviePlayer::doPause(const StPauseEvent& theEvent) {
66
+    StApplication::doPause(theEvent);
67
+    saveAllParams();
68
+}
69
+
70
 StMoviePlayer::StMoviePlayer(const StHandle<StResourceManager>& theResMgr,
71
                              const StNativeWin_t                theParentWin,
72
                              const StHandle<StOpenInfo>&        theOpenInfo)
73
@@ -384,7 +414,8 @@
74
   myToRecreateMenu(false),
75
   myToUpdateALList(false),
76
   myIsBenchmark(false),
77
-  myToCheckUpdates(true) {
78
+  myToCheckUpdates(true),
79
+  myToCheckPoorOrient(true) {
80
     mySettings = new StSettings(myResMgr, ST_DRAWER_PLUGIN_NAME);
81
     myLangMap  = new StTranslations(myResMgr, StMoviePlayer::ST_DRAWER_PLUGIN_NAME);
82
     myOpenDialog = new StOpenVideo(this);
83
@@ -402,6 +433,17 @@
84
     params.ScaleHiDPI2X     = new StBoolParam(false);
85
     mySettings->loadParam (ST_SETTING_SCALE_FORCE2X, params.ScaleHiDPI2X);
86
     params.ScaleHiDPI2X->signals.onChanged = stSlot(this, &StMoviePlayer::doScaleHiDPI);
87
+    params.SubtitlesPlace   = new StInt32Param(ST_VCORNER_BOTTOM);
88
+    params.SubtitlesTopDY   = new StFloat32Param(100.0f,      // initial value
89
+                                                 0.0f, 400.0f,// min, max values
90
+                                                 100.0f,      // default value
91
+                                                 5.0f,        // incremental step
92
+                                                 0.1f);       // equality tolerance
93
+    params.SubtitlesBottomDY= new StFloat32Param(100.0f,      // initial value
94
+                                                 0.0f, 400.0f,// min, max values
95
+                                                 100.0f,      // default value
96
+                                                 5.0f,        // incremental step
97
+                                                 0.1f);       // equality tolerance
98
     params.SubtitlesSize    = new StFloat32Param(28.0f,       // initial value
99
                                                  8.0f, 96.0f, // min, max values
100
                                                  28.0f,       // default value
101
@@ -441,6 +483,7 @@
102
     params.srcFormat->signals.onChanged = stSlot(this, &StMoviePlayer::doSwitchSrcFormat);
103
     params.ToShowPlayList   = new StBoolParam(false);
104
     params.ToShowPlayList->signals.onChanged = stSlot(this, &StMoviePlayer::doShowPlayList);
105
+    params.ToTrackHead = new StBoolParamNamed(true,  tr(MENU_VIEW_TRACK_HEAD));
106
     params.ToShowFps   = new StBoolParamNamed(false, tr(MENU_FPS_METER));
107
     params.IsMobileUI  = new StBoolParamNamed(StWindow::isMobile(), "Mobile UI");
108
     params.IsMobileUI->signals.onChanged = stSlot(this, &StMoviePlayer::doScaleHiDPI);
109
@@ -473,11 +516,15 @@
110
     mySettings->loadParam (ST_SETTING_LOOP_SINGLE,        params.ToLoopSingle);
111
     mySettings->loadParam (ST_SETTING_GLOBAL_MKEYS,       params.areGlobalMKeys);
112
     mySettings->loadParam (ST_SETTING_SHOW_LIST,          params.ToShowPlayList);
113
+    mySettings->loadParam (ST_SETTING_SUBTITLES_PLACE,    params.SubtitlesPlace);
114
+    mySettings->loadParam (ST_SETTING_SUBTITLES_TOPDY,    params.SubtitlesTopDY);
115
+    mySettings->loadParam (ST_SETTING_SUBTITLES_BOTTOMDY, params.SubtitlesBottomDY);
116
     mySettings->loadParam (ST_SETTING_SUBTITLES_SIZE,     params.SubtitlesSize);
117
     mySettings->loadParam (ST_SETTING_SUBTITLES_PARALLAX, params.SubtitlesParallax);
118
     mySettings->loadParam (ST_SETTING_SUBTITLES_PARSER,   params.SubtitlesParser);
119
     mySettings->loadParam (ST_SETTING_SEARCH_SUBS,        params.ToSearchSubs);
120
 
121
+    myToCheckPoorOrient = !mySettings->loadParam(ST_SETTING_TRACK_HEAD, params.ToTrackHead);
122
     mySettings->loadParam (ST_SETTING_SHOW_FPS,           params.ToShowFps);
123
     mySettings->loadParam (ST_SETTING_MOBILE_UI,          params.IsMobileUI);
124
     mySettings->loadParam (ST_SETTING_VSYNC,              params.IsVSyncOn);
125
@@ -639,6 +686,9 @@
126
 
127
     anAction = new StActionIntSlot(stCString("DoImageAdjustReset"), stSlot(this, &StMoviePlayer::doImageAdjustReset), 0);
128
     addAction(Action_ImageAdjustReset, anAction);
129
+
130
+    anAction = new StActionIntSlot(stCString("DoPanoramaOnOff"), stSlot(this, &StMoviePlayer::doPanoramaOnOff), 0);
131
+    addAction(Action_PanoramaOnOff, anAction, ST_VK_P);
132
 }
133
 
134
 bool StMoviePlayer::resetDevice() {
135
@@ -663,6 +713,7 @@
136
 
137
     mySettings->saveParam (ST_SETTING_STEREO_MODE, myGUI->myImage->params.displayMode);
138
     mySettings->saveInt32 (ST_SETTING_GAMMA,       stRound(100.0f * myGUI->myImage->params.gamma->getValue()));
139
+    mySettings->saveParam (ST_SETTING_HEAL_ANAMORPHIC, myGUI->myImage->params.ToHealAnamorphicRatio);
140
     if(params.toRestoreRatio->getValue()) {
141
         mySettings->saveParam(ST_SETTING_RATIO,    myGUI->myImage->params.displayRatio);
142
     } else {
143
@@ -671,11 +722,14 @@
144
     mySettings->saveParam (ST_SETTING_TEXFILTER,   myGUI->myImage->params.textureFilter);
145
 }
146
 
147
-void StMoviePlayer::releaseDevice() {
148
+void StMoviePlayer::saveAllParams() {
149
     saveGuiParams();
150
     if(!myGUI.isNull()) {
151
         mySettings->saveParam (ST_SETTING_SCALE_ADJUST,       params.ScaleAdjust);
152
         mySettings->saveParam (ST_SETTING_SCALE_FORCE2X,      params.ScaleHiDPI2X);
153
+        mySettings->saveParam (ST_SETTING_SUBTITLES_PLACE,    params.SubtitlesPlace);
154
+        mySettings->saveParam (ST_SETTING_SUBTITLES_TOPDY,    params.SubtitlesTopDY);
155
+        mySettings->saveParam (ST_SETTING_SUBTITLES_BOTTOMDY, params.SubtitlesBottomDY);
156
         mySettings->saveParam (ST_SETTING_SUBTITLES_SIZE,     params.SubtitlesSize);
157
         mySettings->saveParam (ST_SETTING_SUBTITLES_PARALLAX, params.SubtitlesParallax);
158
         mySettings->saveParam (ST_SETTING_SUBTITLES_PARSER,   params.SubtitlesParser);
159
@@ -690,6 +744,7 @@
160
         mySettings->saveParam (ST_SETTING_GLOBAL_MKEYS,       params.areGlobalMKeys);
161
         mySettings->saveParam (ST_SETTING_SHOW_LIST,          params.ToShowPlayList);
162
 
163
+        mySettings->saveParam (ST_SETTING_TRACK_HEAD,         params.ToTrackHead);
164
         mySettings->saveParam (ST_SETTING_SHOW_FPS,           params.ToShowFps);
165
         mySettings->saveParam (ST_SETTING_MOBILE_UI,          params.IsMobileUI);
166
         mySettings->saveParam (ST_SETTING_VSYNC,              params.IsVSyncOn);
167
@@ -708,6 +763,13 @@
168
             mySettings->saveHotKey(anIter->second);
169
         }
170
     }
171
+    myPlayList->currentToRecent();
172
+    mySettings->saveString(ST_SETTING_RECENT_FILES, myPlayList->dumpRecentList());
173
+    mySettings->flush();
174
+}
175
+
176
+void StMoviePlayer::releaseDevice() {
177
+    saveAllParams();
178
 
179
     // release GUI data and GL resources before closing the window
180
     myKeyActions.clear();
181
@@ -722,8 +784,6 @@
182
     releaseDevice();
183
     // wait video playback thread to quit and release resources
184
     myVideo.nullify();
185
-
186
-    mySettings->saveString(ST_SETTING_RECENT_FILES, myPlayList->dumpRecentList());
187
 }
188
 
189
 bool StMoviePlayer::createGui(StHandle<StGLTextureQueue>& theTextureQueue,
190
@@ -750,6 +810,7 @@
191
     mySettings->loadParam (ST_SETTING_STEREO_MODE, myGUI->myImage->params.displayMode);
192
     mySettings->loadParam (ST_SETTING_TEXFILTER,   myGUI->myImage->params.textureFilter);
193
     mySettings->loadParam (ST_SETTING_RATIO,       myGUI->myImage->params.displayRatio);
194
+    mySettings->loadParam (ST_SETTING_HEAL_ANAMORPHIC, myGUI->myImage->params.ToHealAnamorphicRatio);
195
     params.toRestoreRatio->setValue(myGUI->myImage->params.displayRatio->getValue() != StGLImageRegion::RATIO_AUTO);
196
     int32_t loadedGamma = 100; // 1.0f
197
         mySettings->loadInt32(ST_SETTING_GAMMA, loadedGamma);
198
@@ -980,6 +1041,13 @@
199
         return false;
200
     }
201
sview-15_08.tar.gz/StMoviePlayer/StMoviePlayer.h -> sview-15_10.tar.gz/StMoviePlayer/StMoviePlayer.h Changed
84
 
1
@@ -1,5 +1,5 @@
2
 /**
3
- * Copyright © 2007-2014 Kirill Gavrilov <kirill@sview.ru>
4
+ * Copyright © 2007-2015 Kirill Gavrilov <kirill@sview.ru>
5
  *
6
  * StMoviePlayer program is free software: you can redistribute it and/or modify
7
  * it under the terms of the GNU General Public License as published by
8
@@ -164,6 +164,7 @@
9
     ST_LOCAL void doQuit(const size_t dummy = 0);
10
 
11
     ST_LOCAL void doFileNext();
12
+    ST_LOCAL void doOpen1FileFromGui(StHandle<StString> thePath);
13
     ST_LOCAL void doOpen1File(const size_t dummy = 0);
14
     ST_LOCAL void doOpen2Files(const size_t dummy = 0);
15
     ST_LOCAL void doSaveFileInfo(const size_t theToSave);
16
@@ -195,6 +196,9 @@
17
         StHandle<StInt32Param>    ScaleAdjust;      //!< adjust GUI size, see StGLRootWidget::ScaleAdjust
18
         StHandle<StFloat32Param>  ScaleHiDPI;       //!< adapt  GUI size for HiDPI resolution
19
         StHandle<StBoolParam>     ScaleHiDPI2X;     //!< option to set HiDPI resolution to 2.0
20
+        StHandle<StInt32Param>    SubtitlesPlace;   //!< subtitles placement
21
+        StHandle<StFloat32Param>  SubtitlesTopDY;   //!< subtitles vertical displacement
22
+        StHandle<StFloat32Param>  SubtitlesBottomDY;//!< subtitles vertical displacement
23
         StHandle<StFloat32Param>  SubtitlesSize;    //!< subtitles font size
24
         StHandle<StFloat32Param>  SubtitlesParallax;//!< subtitles parallax
25
         StHandle<StBoolParam>     ToSearchSubs;     //!< automatically search for additional subtitles/audio track files nearby video file
26
@@ -210,6 +214,7 @@
27
         StHandle<StBoolParam>     areGlobalMKeys;   //!< capture global multimedia keys
28
         StHandle<StInt32Param>    checkUpdatesDays; //!< days count between updates checks
29
         StHandle<StInt32Param>    srcFormat;        //!< source format
30
+        StHandle<StBoolParam>     ToTrackHead;      //!< enable/disable head-tracking
31
         StHandle<StBoolParam>     ToShowPlayList;   //!< display playlist
32
         StHandle<StBoolParam>     ToShowFps;        //!< display FPS meter
33
         StHandle<StBoolParam>     IsMobileUI;       //!< display mobile interface
34
@@ -232,6 +237,7 @@
35
         private: //! @name window events slots
36
 
37
     ST_LOCAL virtual void doChangeDevice(const int32_t theValue);
38
+    ST_LOCAL virtual void doPause    (const StPauseEvent&  theEvent);
39
     ST_LOCAL virtual void doResize   (const StSizeEvent&   theEvent);
40
     ST_LOCAL virtual void doKeyDown  (const StKeyEvent&    theEvent);
41
     ST_LOCAL virtual void doKeyHold  (const StKeyEvent&    theEvent);
42
@@ -248,6 +254,7 @@
43
      */
44
     ST_LOCAL bool init();
45
     ST_LOCAL void saveGuiParams();
46
+    ST_LOCAL void saveAllParams();
47
     ST_LOCAL bool createGui(StHandle<StGLTextureQueue>& theTextureQueue,
48
                             StHandle<StSubQueue>&       theSubQueue);
49
 
50
@@ -287,6 +294,7 @@
51
     ST_LOCAL void doSwitchLoopSingle(const bool theValue);
52
     ST_LOCAL void doFullscreen(const bool theIsFullscreen);
53
     ST_LOCAL void doSwitchSrcFormat(const int32_t theSrcFormat);
54
+    ST_LOCAL void doPanoramaOnOff(const size_t );
55
     ST_LOCAL void doSwitchAudioStream(const int32_t theStreamId);
56
     ST_LOCAL void doSwitchSubtitlesStream(const int32_t theStreamId);
57
     ST_LOCAL void doShowPlayList(const bool theToShow);
58
@@ -333,7 +341,8 @@
59
         Action_ShowList,
60
         Action_ImageAdjustReset,
61
         Action_StereoParamsBegin,
62
-        Action_StereoParamsEnd = Action_StereoParamsBegin + StGLImageRegion::ActionsNb,
63
+        Action_StereoParamsEnd = Action_StereoParamsBegin + StGLImageRegion::ActionsNb - 1,
64
+        Action_PanoramaOnOff,
65
     };
66
 
67
         private: //! @name Web UI methods
68
@@ -361,6 +370,7 @@
69
     StHandle<StOpenVideo>      myOpenDialog;      //!< file open dialog
70
 
71
     StCondition                myEventLoaded;     //!< indicate that new file was open
72
+    StTimer                    myInactivityTimer; //!< timer initialized when application goes into paused state
73
     double                     mySeekOnLoad;      //!< seeking target
74
     int32_t                    myAudioOnLoad;     //!< audio     track on load
75
     int32_t                    mySubsOnLoad;      //!< subtitles track on load
76
@@ -372,6 +382,7 @@
77
     bool                       myToUpdateALList;
78
     bool                       myIsBenchmark;
79
     bool                       myToCheckUpdates;
80
+    bool                       myToCheckPoorOrient; //!< switch off orientation sensor with poor quality
81
 
82
     friend class StMoviePlayerGUI;
83
 
84
sview-15_08.tar.gz/StMoviePlayer/StMoviePlayerGUI.cpp -> sview-15_10.tar.gz/StMoviePlayer/StMoviePlayerGUI.cpp Changed
201
 
1
@@ -47,6 +47,7 @@
2
 #include <StGLWidgets/StGLMenuItem.h>
3
 #include <StGLWidgets/StGLMessageBox.h>
4
 #include <StGLWidgets/StGLMsgStack.h>
5
+#include <StGLWidgets/StGLOpenFile.h>
6
 #include <StGLWidgets/StGLPlayList.h>
7
 #include <StGLWidgets/StGLRangeFieldFloat32.h>
8
 #include <StGLWidgets/StGLScrollArea.h>
9
@@ -124,6 +125,7 @@
10
  */
11
 void StMoviePlayerGUI::createUpperToolbar() {
12
     int aBtnIter = 0;
13
+    int aNbBtnRight = 0;
14
     const int aTop  = scale(DISPL_Y_REGION_UPPER);
15
     const int aLeft = scale(DISPL_X_REGION_UPPER);
16
     StMarginsI aButtonMargins;
17
@@ -159,7 +161,7 @@
18
         iconTexture(stCString("menuOverUnderRL"),    anIconSize),
19
         iconTexture(stCString("menuRowLR"),          anIconSize),
20
         iconTexture(stCString("menuColLR"),          anIconSize),
21
-        iconTexture(stCString("menuSrcSeparate"),    anIconSize),
22
+        iconTexture(stCString("menuDual"),           anIconSize),
23
         iconTexture(stCString("menuFrameSeqLR"),     anIconSize),
24
         iconTexture(stCString("menuRedCyanLR"),      anIconSize),
25
         iconTexture(stCString("menuGreenMagentaLR"), anIconSize),
26
@@ -177,6 +179,37 @@
27
                                            StGLCorner(ST_VCORNER_TOP, ST_HCORNER_LEFT));
28
     myBtnSwapLR->setDrawShadow(true);
29
     myBtnSwapLR->changeMargins() = aButtonMargins;
30
+
31
+    StHandle<StBoolParam> aTrackedPano = new StBoolParam(false);
32
+    myBtnPanorama = new StGLCheckboxTextured(myPanelUpper, aTrackedPano,
33
+                                             iconTexture(stCString("actionPanoramaOff"), anIconSize),
34
+                                             iconTexture(stCString("actionPanorama"),    anIconSize),
35
+                                             aLeft + (aBtnIter++) * anIconStep, aTop,
36
+                                             StGLCorner(ST_VCORNER_TOP, ST_HCORNER_LEFT));
37
+    myBtnPanorama->signals.onBtnClick += stSlot(this, &StMoviePlayerGUI::doPanoramaCombo);
38
+    myBtnPanorama->setDrawShadow(true);
39
+    myBtnPanorama->changeMargins() = aButtonMargins;
40
+
41
+    // right buttons
42
+    StHandle<StBoolParam> aTrackedSubs = new StBoolParam(false);
43
+    myBtnSubs = new StGLCheckboxTextured(myPanelUpper, aTrackedSubs,
44
+                                         iconTexture(stCString("actionStreamSubtitlesOff"), anIconSize),
45
+                                         iconTexture(stCString("actionStreamSubtitles"),    anIconSize),
46
+                                         (aNbBtnRight++) * (-anIconStep) - aLeft, aTop,
47
+                                         StGLCorner(ST_VCORNER_TOP, ST_HCORNER_RIGHT));
48
+    myBtnSubs->signals.onBtnClick = stSlot(this, &StMoviePlayerGUI::doSubtitlesStreamsCombo);
49
+    myBtnSubs->setDrawShadow(true);
50
+    myBtnSubs->changeMargins() = aButtonMargins;
51
+
52
+    StHandle<StBoolParam> aTrackedAudio = new StBoolParam(false);
53
+    myBtnAudio = new StGLCheckboxTextured(myPanelUpper, aTrackedAudio,
54
+                                          iconTexture(stCString("actionStreamAudioOff"), anIconSize),
55
+                                          iconTexture(stCString("actionStreamAudio"),    anIconSize),
56
+                                          (aNbBtnRight++) * (-anIconStep) - aLeft, aTop,
57
+                                          StGLCorner(ST_VCORNER_TOP, ST_HCORNER_RIGHT));
58
+    myBtnAudio->signals.onBtnClick = stSlot(this, &StMoviePlayerGUI::doAudioStreamsCombo);
59
+    myBtnAudio->setDrawShadow(true);
60
+    myBtnAudio->changeMargins() = aButtonMargins;
61
 }
62
 
63
 /**
64
@@ -282,16 +315,12 @@
65
 
66
     StGLMenu* aMenuMedia   = createMediaMenu();     // Root -> Media menu
67
     StGLMenu* aMenuView    = createViewMenu();      // Root -> View menu
68
-              myMenuAudio  = createAudioMenu();     // Root -> Audio menu
69
-           myMenuSubtitles = createSubtitlesMenu(); // Root -> Subtitles menu
70
     StGLMenu* aDevicesMenu = createOutputMenu();    // Root -> Output menu
71
     StGLMenu* aMenuHelp    = createHelpMenu();      // Root -> Help menu
72
 
73
     // Attach sub menus to root
74
     myMenuRoot->addItem(tr(MENU_MEDIA),     aMenuMedia);
75
     myMenuRoot->addItem(tr(MENU_VIEW),      aMenuView);
76
-    myMenuRoot->addItem(tr(MENU_AUDIO),     myMenuAudio);
77
-    myMenuRoot->addItem(tr(MENU_SUBTITLES), myMenuSubtitles);
78
     myMenuRoot->addItem(myPlugin->StApplication::params.ActiveDevice->getActiveValue(), aDevicesMenu);
79
     myMenuRoot->addItem(tr(MENU_HELP),      aMenuHelp);
80
 }
81
@@ -514,7 +543,8 @@
82
     StGLMenu* aMenuView = new StGLMenu(this, 0, 0, StGLMenu::MENU_VERTICAL);
83
     StGLMenu* aMenuDispMode  = createDisplayModeMenu();
84
     StGLMenu* aMenuDispRatio = createDisplayRatioMenu();
85
-    StGLMenu* aMenuSurface   = createSurfaceMenu();
86
+    StGLMenu* aMenuPanorama  = new StGLMenu(this, 0, 0, StGLMenu::MENU_VERTICAL);
87
+    fillPanoramaMenu(aMenuPanorama);
88
     StGLMenu* aMenuTexFilter = createSmoothFilterMenu();
89
     StGLMenu* aMenuImgAdjust = createImageAdjustMenu();
90
 
91
@@ -528,7 +558,8 @@
92
     aMenuView->addItem(tr(MENU_VIEW_SWAP_LR),       myImage->params.swapLR);
93
     aMenuView->addItem(tr(MENU_VIEW_DISPLAY_RATIO), aMenuDispRatio)
94
              ->setIcon(stCMenuIcon("actionDisplayRatio"), false);
95
-    aMenuView->addItem(tr(MENU_VIEW_SURFACE),       aMenuSurface);
96
+    aMenuView->addItem(tr(MENU_VIEW_PANORAMA),      aMenuPanorama)
97
+             ->setIcon(stCMenuIcon("actionPanorama"), false);
98
     aMenuView->addItem(tr(MENU_VIEW_TEXFILTER),     aMenuTexFilter)
99
              ->setIcon(stCMenuIcon("actionInterpolation"), false);
100
     aMenuView->addItem(tr(MENU_VIEW_IMAGE_ADJUST),  aMenuImgAdjust)
101
@@ -554,12 +585,13 @@
102
 StGLMenu* StMoviePlayerGUI::createDisplayRatioMenu() {
103
     StGLMenu* aMenu = new StGLMenu(this, 0, 0, StGLMenu::MENU_VERTICAL);
104
     fillDisplayRatioMenu(aMenu);
105
-    aMenu->addItem("Keep on restart", myPlugin->params.toRestoreRatio);
106
+    aMenu->addItem(tr(MENU_VIEW_RATIO_KEEP_ON_RESTART), myPlugin->params.toRestoreRatio);
107
+    aMenu->addItem(tr(MENU_VIEW_RATIO_HEAL_ANAMORPHIC), myImage->params.ToHealAnamorphicRatio);
108
     return aMenu;
109
 }
110
 
111
 void StMoviePlayerGUI::fillDisplayRatioMenu(StGLMenu* theMenu) {
112
-    theMenu->addItem("Source", myImage->params.displayRatio, StGLImageRegion::RATIO_AUTO)
113
+    theMenu->addItem(tr(MENU_VIEW_DISPLAY_RATIO_SRC), myImage->params.displayRatio, StGLImageRegion::RATIO_AUTO)
114
            ->setIcon(stCMenuIcon("menuAuto"));
115
     theMenu->addItem("2.21:1", myImage->params.displayRatio, StGLImageRegion::RATIO_221_1)
116
            ->setIcon(stCMenuIcon("menuRatio2_1_"));
117
@@ -578,21 +610,27 @@
118
 void StMoviePlayerGUI::doDisplayRatioCombo(const size_t ) {
119
     StGLCombobox::ListBuilder aBuilder(this);
120
     fillDisplayRatioMenu(aBuilder.getMenu());
121
+    aBuilder.getMenu()->addItem(tr(MENU_VIEW_RATIO_HEAL_ANAMORPHIC), myImage->params.ToHealAnamorphicRatio);
122
     aBuilder.display();
123
 }
124
 
125
-/**
126
- * Root -> View menu -> Surface
127
- */
128
-StGLMenu* StMoviePlayerGUI::createSurfaceMenu() {
129
-    StGLMenu* aMenu = new StGLMenu(this, 0, 0, StGLMenu::MENU_VERTICAL);
130
-    aMenu->addItem(tr(MENU_VIEW_SURFACE_PLANE),
131
-                   myImage->params.ViewMode, StStereoParams::FLAT_IMAGE);
132
-    aMenu->addItem(tr(MENU_VIEW_SURFACE_SPHERE),
133
-                   myImage->params.ViewMode, StStereoParams::PANORAMA_SPHERE);
134
-    aMenu->addItem("Cubemap",
135
-                   myImage->params.ViewMode, StStereoParams::PANORAMA_CUBEMAP);
136
-    return aMenu;
137
+void StMoviePlayerGUI::fillPanoramaMenu(StGLMenu* theMenu) {
138
+    theMenu->addItem(tr(MENU_VIEW_SURFACE_PLANE),
139
+                     myImage->params.ViewMode, StStereoParams::FLAT_IMAGE);
140
+    theMenu->addItem(tr(MENU_VIEW_SURFACE_SPHERE),
141
+                     myImage->params.ViewMode, StStereoParams::PANORAMA_SPHERE);
142
+    theMenu->addItem(tr(MENU_VIEW_SURFACE_CUBEMAP),
143
+                     myImage->params.ViewMode, StStereoParams::PANORAMA_CUBEMAP);
144
+    if(myWindow->hasOrientationSensor()) {
145
+        theMenu->addItem(tr(myWindow->isPoorOrientationSensor() ? MENU_VIEW_TRACK_HEAD_POOR : MENU_VIEW_TRACK_HEAD),
146
+                         myPlugin->params.ToTrackHead);
147
+    }
148
+}
149
+
150
+void StMoviePlayerGUI::doPanoramaCombo(const size_t ) {
151
+    StGLCombobox::ListBuilder aBuilder(this);
152
+    fillPanoramaMenu(aBuilder.getMenu());
153
+    aBuilder.display();
154
 }
155
 
156
 /**
157
@@ -1142,6 +1180,12 @@
158
 
159
     int aBtnIter = 0;
160
 
161
+    myBtnOpen = new StGLTextureButton(myPanelUpper, (aBtnIter++) * myIconStep, 0);
162
+    myBtnOpen->signals.onBtnClick.connect(this, &StMoviePlayerGUI::doOpenFile);
163
+    myBtnOpen->setTexturePath(iconTexture(stCString("actionOpen"), anIconSize));
164
+    myBtnOpen->setDrawShadow(true);
165
+    myBtnOpen->changeMargins() = aButtonMargins;
166
+
167
     StGLTextureButton* aSrcBtn = new StGLTextureButton(myPanelUpper, (aBtnIter++) * myIconStep, 0,
168
                                                        StGLCorner(ST_VCORNER_TOP, ST_HCORNER_LEFT), StFormat_NB);
169
     aSrcBtn->changeMargins() = aButtonMargins;
170
@@ -1154,7 +1198,7 @@
171
         iconTexture(stCString("menuOverUnderRL"),    anIconSize),
172
         iconTexture(stCString("menuRowLR"),          anIconSize),
173
         iconTexture(stCString("menuColLR"),          anIconSize),
174
-        iconTexture(stCString("menuSrcSeparate"),    anIconSize),
175
+        iconTexture(stCString("menuDual"),           anIconSize),
176
         iconTexture(stCString("menuFrameSeqLR"),     anIconSize),
177
         iconTexture(stCString("menuRedCyanLR"),      anIconSize),
178
         iconTexture(stCString("menuGreenMagentaLR"), anIconSize),
179
@@ -1173,6 +1217,16 @@
180
     myBtnSwapLR->setDrawShadow(true);
181
     myBtnSwapLR->changeMargins() = aButtonMargins;
182
 
183
+    StHandle<StBoolParam> aTrackedPano = new StBoolParam(false);
184
+    myBtnPanorama = new StGLCheckboxTextured(myPanelUpper, aTrackedPano,
185
+                                             iconTexture(stCString("actionPanoramaOff"), anIconSize),
186
+                                             iconTexture(stCString("actionPanorama"),    anIconSize),
187
+                                             (aBtnIter++) * myIconStep, 0,
188
+                                             StGLCorner(ST_VCORNER_TOP, ST_HCORNER_LEFT));
189
+    myBtnPanorama->signals.onBtnClick += stSlot(this, &StMoviePlayerGUI::doPanoramaCombo);
190
+    myBtnPanorama->setDrawShadow(true);
191
+    myBtnPanorama->changeMargins() = aButtonMargins;
192
+
193
     aBtnIter = 0;
194
     StGLTextureButton* aBtnEx = new StGLTextureButton(myPanelUpper, (aBtnIter--) * (-myIconStep), 0,
195
                                                       StGLCorner(ST_VCORNER_TOP, ST_HCORNER_RIGHT));
196
@@ -1242,6 +1296,28 @@
197
     myTimeBox->changeRectPx().bottom() = myTimeBox->getRectPx().top()  + scale(56);
198
 }
199
 
200
+void StMoviePlayerGUI::doOpenFile(const size_t ) {
201
sview-15_08.tar.gz/StMoviePlayer/StMoviePlayerGUI.h -> sview-15_10.tar.gz/StMoviePlayer/StMoviePlayerGUI.h Changed
76
 
1
@@ -112,8 +112,7 @@
2
 
3
     using StGLRootWidget::stglUpdate;
4
     ST_LOCAL void stglUpdate(const StPointD_t& thePointZo,
5
-                             const GLfloat     theProgress,
6
-                             const double      thePTS);
7
+                             bool              theIsMouseMoved);
8
     ST_LOCAL void setVisibility(const StPointD_t& theCursor,
9
                                 bool              theIsMouseMoved);
10
 
11
@@ -124,12 +123,8 @@
12
 
13
         public: //! @name menu update routines
14
 
15
+    ST_LOCAL void stglResizeSeekBar();
16
     ST_LOCAL void updateOpenALDeviceMenu();
17
-    ST_LOCAL void updateAudioStreamsMenu    (const StHandle< StArrayList<StString> >& theStreamsList,
18
-                                             const bool theHasVideo);
19
-    ST_LOCAL void updateSubtitlesStreamsMenu(const StHandle< StArrayList<StString> >& theStreamsList,
20
-                                             const bool theIsFilePlayed);
21
-
22
     ST_LOCAL void updateRecentMenu();
23
 
24
     ST_LOCAL void doAboutFile(const size_t );
25
@@ -155,7 +150,6 @@
26
     ST_LOCAL StGLMenu* createViewMenu();         // Root -> View menu
27
     ST_LOCAL StGLMenu* createDisplayModeMenu();  // Root -> View   -> Output
28
     ST_LOCAL StGLMenu* createDisplayRatioMenu(); // Root -> View   -> Display Ratio
29
-    ST_LOCAL StGLMenu* createSurfaceMenu();      // Root -> View   -> Surface
30
     ST_LOCAL StGLMenu* createSmoothFilterMenu(); // Root -> View   -> Smooth Filter
31
     ST_LOCAL StGLMenu* createImageAdjustMenu();  // Root -> View   -> Image Adjust
32
     ST_LOCAL StGLMenu* createAudioMenu();        // Root -> Audio menu
33
@@ -172,6 +166,7 @@
34
     ST_LOCAL void fillRecentMenu(StGLMenu* theMenu);
35
     ST_LOCAL void fillDisplayRatioMenu(StGLMenu* theMenu);
36
     ST_LOCAL void fillSrcFormatMenu(StGLMenu* theMenu);
37
+    ST_LOCAL void fillPanoramaMenu (StGLMenu* theMenu);
38
 
39
         private: //! @name mobile interface creation routines
40
 
41
@@ -199,12 +194,14 @@
42
     ST_LOCAL void doChangeHotKey1(const size_t );
43
     ST_LOCAL void doChangeHotKey2(const size_t );
44
 
45
+    ST_LOCAL void doOpenFile(const size_t );
46
     ST_LOCAL void doShowMobileExMenu(const size_t );
47
     ST_LOCAL void doMobileSettings(const size_t );
48
     ST_LOCAL void doAudioStreamsCombo(const size_t );
49
     ST_LOCAL void doSubtitlesStreamsCombo(const size_t );
50
     ST_LOCAL void doDisplayRatioCombo(const size_t );
51
     ST_LOCAL void doDisplayStereoFormatCombo(const size_t );
52
+    ST_LOCAL void doPanoramaCombo(const size_t );
53
 
54
         private: //! @name private fields
55
 
56
@@ -223,15 +220,17 @@
57
     StGLMenu*           myMenuRoot;         //!< root of the main menu
58
     StGLMenu*           myMenuOpenAL;
59
     StGLMenu*           myMenuRecent;
60
-    StGLMenu*           myMenuAudio;
61
-    StGLMenu*           myMenuSubtitles;
62
 
63
     StGLWidget*         myPanelUpper;       //!< upper toolbar
64
     StGLTextureButton*  myBtnOpen;
65
     StGLTextureButton*  myBtnInfo;
66
     StGLTextureButton*  myBtnSwapLR;
67
+    StGLCheckboxTextured* myBtnPanorama;
68
     StGLTextureButton*  myBtnSrcFrmt;
69
 
70
+    StGLCheckboxTextured* myBtnAudio;
71
+    StGLCheckboxTextured* myBtnSubs;
72
+
73
     StGLWidget*         myPanelBottom;      //!< bottom toolbar
74
     StSeekBar*          mySeekBar;
75
     StSeekBar*          myVolumeBar;
76
sview-15_08.tar.gz/StMoviePlayer/StMoviePlayerStrings.cpp -> sview-15_10.tar.gz/StMoviePlayer/StMoviePlayerStrings.cpp Changed
79
 
1
@@ -80,6 +80,12 @@
2
                "Parallax");
3
     theStrings(MENU_SUBTITLES_PARSER,
4
                "Parser");
5
+    theStrings(MENU_SUBTITLES_PLACEMENT,
6
+               "Placement");
7
+    theStrings(MENU_SUBTITLES_TOP,
8
+               "Top");
9
+    theStrings(MENU_SUBTITLES_BOTTOM,
10
+               "Bottom");
11
     theStrings(MENU_SUBTITLES_PLAIN_TEXT,
12
                "Plain text");
13
     theStrings(MENU_SUBTITLES_LITE_HTML,
14
@@ -121,7 +127,7 @@
15
     theStrings(MENU_MEDIA_OPEN_MOVIE_2,
16
                "Left+Right files");
17
     theStrings(MENU_SRC_FORMAT_AUTO,
18
-               "Autodetection");
19
+               "Source");
20
     theStrings(MENU_SRC_FORMAT_MONO,
21
                "Mono");
22
     theStrings(MENU_SRC_FORMAT_CROSS_EYED,
23
@@ -170,14 +176,20 @@
24
                "Saturation");
25
     theStrings(MENU_VIEW_ADJUST_GAMMA,
26
                "Gamma");
27
-    theStrings(MENU_VIEW_SURFACE,
28
-               "Surface");
29
+    theStrings(MENU_VIEW_PANORAMA,
30
+               "Panorama");
31
     theStrings(MENU_VIEW_SURFACE_PLANE,
32
                "Plane");
33
     theStrings(MENU_VIEW_SURFACE_SPHERE,
34
                "Sphere");
35
     theStrings(MENU_VIEW_SURFACE_CYLINDER,
36
                "Cylinder");
37
+    theStrings(MENU_VIEW_SURFACE_CUBEMAP,
38
+               "Cubemap");
39
+    theStrings(MENU_VIEW_TRACK_HEAD,
40
+               "Track orientation");
41
+    theStrings(MENU_VIEW_TRACK_HEAD_POOR,
42
+               "Track orientation (poor)");
43
     theStrings(MENU_VIEW_DISPLAY_MODE_STEREO,
44
                "Stereo");
45
     theStrings(MENU_VIEW_DISPLAY_MODE_LEFT,
46
@@ -190,8 +202,10 @@
47
                "Cross-eyed pair");
48
     theStrings(MENU_VIEW_DISPLAY_RATIO_SRC,
49
                "Source");
50
-    theStrings(MENU_VIEW_KEEP_ON_RESTART,
51
+    theStrings(MENU_VIEW_RATIO_KEEP_ON_RESTART,
52
                "Keep on restart");
53
+    theStrings(MENU_VIEW_RATIO_HEAL_ANAMORPHIC,
54
+               "Heal anamorphic 1080p/720p");
55
     theStrings(MENU_VIEW_TEXFILTER_NEAREST,
56
                "Nearest");
57
     theStrings(MENU_VIEW_TEXFILTER_LINEAR,
58
@@ -269,6 +283,8 @@
59
                "Never");
60
     theStrings(MENU_HELP_HOTKEYS,
61
                "Hotkeys");
62
+    theStrings(MENU_HELP_SETTINGS,
63
+               "Settings");
64
     theStrings(FILE_VIDEO_OPEN,
65
                "Open another movie");
66
     theStrings(BTN_SRC_FORMAT,
67
@@ -599,6 +615,11 @@
68
     addAction(theStrings, StMoviePlayer::Action_StereoParamsBegin + StGLImageRegion::Action_RotXDown,
69
               "DoParamsRotXDown",
70
               "X Rotation - down");
71
+
72
+    // new actions
73
+    addAction(theStrings, StMoviePlayer::Action_PanoramaOnOff,
74
+              "DoPanoramaOnOff",
75
+              "Enable/disable panorama mode");
76
 }
77
 
78
 };
79
sview-15_08.tar.gz/StMoviePlayer/StMoviePlayerStrings.h -> sview-15_10.tar.gz/StMoviePlayer/StMoviePlayerStrings.h Changed
50
 
1
@@ -88,7 +88,7 @@
2
         MENU_VIEW_DISPLAY_RATIO = 1205,
3
         MENU_VIEW_TEXFILTER     = 1206,
4
         MENU_VIEW_IMAGE_ADJUST  = 1207,
5
-        MENU_VIEW_SURFACE       = 1208,
6
+        MENU_VIEW_PANORAMA      = 1208,
7
 
8
         MENU_VIEW_DISPLAY_MODE_STEREO       = 1210,
9
         MENU_VIEW_DISPLAY_MODE_LEFT         = 1211,
10
@@ -96,8 +96,9 @@
11
         MENU_VIEW_DISPLAY_MODE_PARALLEL     = 1213,
12
         MENU_VIEW_DISPLAY_MODE_CROSSYED     = 1214,
13
 
14
-        MENU_VIEW_DISPLAY_RATIO_SRC = 1250,
15
-        MENU_VIEW_KEEP_ON_RESTART   = 1251,
16
+        MENU_VIEW_DISPLAY_RATIO_SRC     = 1250,
17
+        MENU_VIEW_RATIO_KEEP_ON_RESTART = 1251,
18
+        MENU_VIEW_RATIO_HEAL_ANAMORPHIC = 1252,
19
 
20
         MENU_VIEW_TEXFILTER_NEAREST = 1260,
21
         MENU_VIEW_TEXFILTER_LINEAR  = 1261,
22
@@ -111,6 +112,9 @@
23
         MENU_VIEW_SURFACE_PLANE     = 1280,
24
         MENU_VIEW_SURFACE_SPHERE    = 1281,
25
         MENU_VIEW_SURFACE_CYLINDER  = 1282,
26
+        MENU_VIEW_SURFACE_CUBEMAP   = 1283,
27
+        MENU_VIEW_TRACK_HEAD        = 1285,
28
+        MENU_VIEW_TRACK_HEAD_POOR   = 1286,
29
 
30
         // Root -> Audio menu
31
         MENU_AUDIO = 1300,
32
@@ -131,6 +135,9 @@
33
         MENU_SUBTITLES_SIZE     = 1354,
34
         MENU_SUBTITLES_PARALLAX = 1355,
35
         MENU_SUBTITLES_PARSER   = 1356,
36
+        MENU_SUBTITLES_PLACEMENT= 1357,
37
+        MENU_SUBTITLES_TOP      = 1358,
38
+        MENU_SUBTITLES_BOTTOM   = 1359,
39
 
40
         MENU_SUBTITLES_PLAIN_TEXT = 1360,
41
         MENU_SUBTITLES_LITE_HTML  = 1361,
42
@@ -157,6 +164,7 @@
43
         MENU_HELP_SYSINFO = 1508,
44
         MENU_HELP_SCALE   = 1509,
45
         MENU_HELP_HOTKEYS = 1510,
46
+        MENU_HELP_SETTINGS= 1511,
47
 
48
         // Root -> Help -> Check for updates menu
49
         MENU_HELP_UPDATES_NOW   = 1520,
50
sview-15_08.tar.gz/StMoviePlayer/StSeekBar.cpp -> sview-15_10.tar.gz/StMoviePlayer/StSeekBar.cpp Changed
19
 
1
@@ -169,6 +169,7 @@
2
     myRoot->getRectGl(aRectPx, aVertices, 8);
3
 
4
     myVertices.init(getContext(), aVertices);
5
+    myIsResized = false;
6
 }
7
 
8
 bool StSeekBar::stglInit() {
9
@@ -204,7 +205,8 @@
10
     StGLContext& aCtx = getContext();
11
 
12
     // need to update vertices buffer?
13
-    if(myProgressPx != int(myProgress * GLfloat((getRectPx().width() - myMargins.left - myMargins.right - 2)))) {
14
+    if(myIsResized
15
+    || myProgressPx != int(myProgress * GLfloat((getRectPx().width() - myMargins.left - myMargins.right - 2)))) {
16
         stglUpdateVertices();
17
     }
18
 
19
sview-15_08.tar.gz/StMoviePlayer/StTimeBox.h -> sview-15_10.tar.gz/StMoviePlayer/StTimeBox.h Changed
77
 
1
@@ -36,11 +36,13 @@
2
               const StGLCorner& theCorner,
3
               const StGLTextArea::FontSize theSize = StGLTextArea::SIZE_NORMAL)
4
     : StGLTextureButton(theParent, theLeft, theTop, theCorner),
5
-      myProgressSec(0.0),
6
-      myDurationSec(0.0),
7
+      myProgressSec(-1.0),
8
+      myDurationSec(-1.0),
9
       myToShowElapsed(true),
10
       myIsOverlay(false) {
11
-        myTextArea = new StGLTextArea(this, 0, 0, StGLCorner(ST_VCORNER_CENTER, ST_HCORNER_CENTER),
12
+        myMargins.left  = myRoot->scale(8);
13
+        myMargins.right = myRoot->scale(8);
14
+        myTextArea = new StGLTextArea(this, 0, 0, StGLCorner(ST_VCORNER_CENTER, ST_HCORNER_LEFT),
15
                                       myRoot->scale(32), myRoot->scale(32), theSize);
16
         myTextArea->setBorder(false);
17
         myTextArea->setTextColor(StGLVec3(1.0f, 1.0f, 1.0f));
18
@@ -69,18 +71,15 @@
19
         bool isBtnInit = StGLTextureButton::stglInit();
20
         myTextArea->changeRectPx().right()  = getRectPx().width();
21
         myTextArea->changeRectPx().bottom() = getRectPx().height();
22
-        return isBtnInit && myTextArea->stglInit();
23
+        const bool isOk = isBtnInit && myTextArea->stglInit();
24
+        myTextArea->setTextWidth(-1);
25
+        return isOk;
26
     }
27
 
28
     virtual void stglDraw(unsigned int theView) {
29
-        if(myToShowElapsed) {
30
-            myTextArea->setText(StFormatTime::formatSeconds(myProgressSec) + " / "
31
-                              + StFormatTime::formatSeconds(myDurationSec));
32
-        } else {
33
-            myTextArea->setText(StFormatTime::formatSeconds(myProgressSec - myDurationSec));
34
-        }
35
         StGLTextureButton::stglDraw(theView);
36
         myTextArea->stglDraw(theView);
37
+        myIsResized = false;
38
     }
39
 
40
     virtual bool tryClick(const StPointD_t& theCursor,
41
@@ -99,10 +98,33 @@
42
              : StGLTextureButton::tryUnClick(theCursor, theMouseBtn, theIsItemUnclicked);
43
     }
44
 
45
-    void setTime(const double theProgressSec,
46
-                 const double theDurationSec) {
47
+    void stglUpdateTime(const double theProgressSec,
48
+                        const double theDurationSec) {
49
+        if(std::abs(myDurationSec - theDurationSec) > 0.1
50
+        && (theDurationSec > 0.1 || myDurationSec < 0.0)) {
51
+            int aWidth  = 0;
52
+            int aHeight = 0;
53
+            myTextArea->computeTextWidth(StFormatTime::formatSeconds(theDurationSec) + " / "
54
+                                       + StFormatTime::formatSeconds(theDurationSec),
55
+                                        -1.0f, aWidth, aHeight);
56
+            const int aWidthNew = aWidth + myMargins.left + myMargins.right;
57
+            const int aWidthOld = getRectPx().width();
58
+            const int aToler    = myRoot->scale(4);
59
+            if(std::abs(aWidthNew - aWidthOld) > aToler) {
60
+                myTextArea->changeRectPx().right() = myTextArea->getRectPx().left() + aWidthNew;
61
+                myTextArea->setTextWidth(aWidthNew);
62
+                changeRectPx().right() = getRectPx().left() + aWidthNew;
63
+            }
64
+        }
65
+
66
         myProgressSec = theProgressSec;
67
         myDurationSec = theDurationSec;
68
+        if(myToShowElapsed) {
69
+            myTextArea->setText(StFormatTime::formatSeconds(myProgressSec) + " / "
70
+                              + StFormatTime::formatSeconds(myDurationSec));
71
+        } else {
72
+            myTextArea->setText(StFormatTime::formatSeconds(myProgressSec - myDurationSec));
73
+        }
74
     }
75
 
76
         public: //! @name callback Slots
77
sview-15_08.tar.gz/StMoviePlayer/StVideo/StVideo.cpp -> sview-15_10.tar.gz/StMoviePlayer/StVideo/StVideo.cpp Changed
101
 
1
@@ -205,6 +205,7 @@
2
         #endif
3
         }
4
     }
5
+    myFileList.clear();
6
     myCtxList.clear();
7
     myPlayCtxList.clear();
8
     mySlaveCtx    = NULL;
9
@@ -318,9 +319,9 @@
10
                     const int aCodedSizeX = myVideoMaster->getCodedSizeX();
11
                     const int aCodedSizeY = myVideoMaster->getCodedSizeY();
12
                     StString  aDimsStr    = StString() + aSizeX + " x " + aSizeY;
13
-                    if(aCodedSizeX != aSizeX
14
-                    || aCodedSizeY != aSizeY) {
15
-                        aDimsStr += StString(" (") + aCodedSizeX + " x " + aCodedSizeY + ")";
16
+                    if((aCodedSizeX != aSizeX && aCodedSizeX != 0)
17
+                    || (aCodedSizeY != aSizeY && aCodedSizeY != 0)) {
18
+                        aDimsStr += StString(" [") + aCodedSizeX + " x " + aCodedSizeY + "]";
19
                     }
20
 
21
                     StDictEntry& aDimInfo = myFileInfoTmp->Info.addChange(tr(INFO_DIMENSIONS));
22
@@ -344,9 +345,9 @@
23
                     const int aCodedSizeX = myVideoSlave->getCodedSizeX();
24
                     const int aCodedSizeY = myVideoSlave->getCodedSizeY();
25
                     StString  aDimsStr    = StString() + aSizeX + " x " + aSizeY;
26
-                    if(aCodedSizeX != aSizeX
27
-                    || aCodedSizeY != aSizeY) {
28
-                        aDimsStr += StString(" (") + aCodedSizeX + " x " + aCodedSizeY + ")";
29
+                    if((aCodedSizeX != aSizeX && aCodedSizeX != 0)
30
+                    || (aCodedSizeY != aSizeY && aCodedSizeY != 0)) {
31
+                        aDimsStr += StString(" [") + aCodedSizeX + " x " + aCodedSizeY + "]";
32
                     }
33
                     aDimsStr += " [2]";
34
 
35
@@ -465,6 +466,7 @@
36
     }
37
 
38
     myCtxList.add(aFormatCtx);
39
+    myFileList.add(theFileToLoad);
40
     return true;
41
 }
42
 
43
@@ -717,6 +719,9 @@
44
             }
45
             while(!myVideoMaster->isEmpty() || !myVideoMaster->isInDowntime()
46
                || !myVideoSlave->isEmpty()  || !myVideoSlave->isInDowntime()) {
47
+                if(toQuit) {
48
+                    break;
49
+                }
50
                 StThread::sleep(10);
51
             }
52
             myVideoMaster->deinit();
53
@@ -738,8 +743,9 @@
54
 }
55
 
56
 void StVideo::packetsLoop() {
57
-    double aPts     = 0.0;
58
-    double aPtsbar  = 10.0; /// debug variable
59
+#ifdef ST_DEBUG
60
+    double aPtsbar  = 10.0;
61
+#endif
62
     double aSeekPts = 0.0;
63
     bool toSeekBack = false;
64
     StPlayEvent_t aPlayEvent = ST_PLAYEVENT_NONE;
65
@@ -880,6 +886,9 @@
66
             if(myAudio->isInitialized()) {
67
                 myAudio->pushEnd();
68
                 while(!myAudio->isEmpty() || !myAudio->isInDowntime()) {
69
+                    if(toQuit) {
70
+                        break;
71
+                    }
72
                     StThread::sleep(10);
73
                 }
74
                 myAudio->deinit();
75
@@ -933,6 +942,9 @@
76
             if(mySubtitles->isInitialized()) {
77
                 mySubtitles->pushEnd();
78
                 while(!mySubtitles->isEmpty() || !mySubtitles->isInDowntime()) {
79
+                    if(toQuit) {
80
+                        break;
81
+                    }
82
                     StThread::sleep(10);
83
                 }
84
                 mySubtitles->deinit();
85
@@ -988,12 +1000,14 @@
86
             StThread::sleep(2);
87
         }
88
 
89
-        aPts = getPts();
90
+    #ifdef ST_DEBUG
91
+        const double aPts = getPts();
92
         if(aPts > aPtsbar) {
93
             aPtsbar = aPts + 10.0;
94
             ST_DEBUG_LOG("Current position: " + StFormatTime::formatSeconds(aPts)
95
                       + " from "              + StFormatTime::formatSeconds(myDuration));
96
         }
97
+    #endif
98
 
99
         // All packets sent
100
         if(anEmptyQueues == myPlayCtxList.size()) {
101
sview-15_08.tar.gz/StMoviePlayer/StVideo/StVideo.h -> sview-15_10.tar.gz/StMoviePlayer/StVideo/StVideo.h Changed
9
 
1
@@ -384,6 +384,7 @@
2
     StHandle<StThread>            myThread;      //!< main loop thread
3
     StHandle<StTranslations>      myLangMap;     //!< translations dictionary
4
 
5
+    StArrayList<StString>         myFileList;    //!< file list
6
     StArrayList<AVFormatContext*> myCtxList;     //!< format context for each file
7
     StArrayList<AVFormatContext*> myPlayCtxList; //!< currently played contexts
8
 
9
sview-15_08.tar.gz/StMoviePlayer/StVideo/StVideoQueue.cpp -> sview-15_10.tar.gz/StMoviePlayer/StVideo/StVideoQueue.cpp Changed
23
 
1
@@ -531,6 +531,21 @@
2
         return;
3
     }
4
 
5
+    if(!theSrcDataLeft.isNull()) {
6
+        theStParams->Src1SizeX = theSrcDataLeft.getSizeX();
7
+        theStParams->Src1SizeY = theSrcDataLeft.getSizeY();
8
+    } else {
9
+        theStParams->Src1SizeX = 0;
10
+        theStParams->Src1SizeY = 0;
11
+    }
12
+    if(!theSrcDataRight.isNull()) {
13
+        theStParams->Src2SizeX = theSrcDataRight.getSizeX();
14
+        theStParams->Src2SizeY = theSrcDataRight.getSizeY();
15
+    } else {
16
+        theStParams->Src2SizeX = 0;
17
+        theStParams->Src2SizeY = 0;
18
+    }
19
+
20
     myTextureQueue->push(theSrcDataLeft, theSrcDataRight, theStParams, theSrcFormat, theCubemapFormat, theSrcPTS);
21
     myTextureQueue->setConnectedStream(true);
22
     if(myWasFlushed) {
23
sview-15_08.tar.gz/StMoviePlayer/lang/chinese/StMoviePlayer.lng -> sview-15_10.tar.gz/StMoviePlayer/lang/chinese/StMoviePlayer.lng Changed
42
 
1
@@ -58,6 +58,7 @@
2
 1214="对眼"
3
 1250="源格式"
4
 1251="重启维持"
5
+?1252="Heal anamorphic 1080p/720p"
6
 1260="接近"
7
 1261="线性"
8
 1262="混纺交织"
9
@@ -68,6 +69,9 @@
10
 1280="平面"
11
 1281="球面"
12
 1282="圆筒"
13
+?1283="Cubemap"
14
+?1285="Track orientation"
15
+?1286="Track orientation (poor)"
16
 1300="音频"
17
 1301="无"
18
 1302="音/视频 延迟"
19
@@ -82,6 +86,9 @@
20
 1354="字体大小"
21
 1355="视差"
22
 1356="文本解析"
23
+?1357="Placement"
24
+?1358="Top"
25
+?1359="Bottom"
26
 ?1360="Plain text"
27
 ?1361="Lite HTML"
28
 1400="改变设备->>"
29
@@ -101,6 +108,7 @@
30
 1508="关于系统"
31
 1509="界面尺寸->>"
32
 ?1510="Hotkeys"
33
+?1511="Settings"
34
 1520="现在"
35
 1521="每天"
36
 1522="每周"
37
@@ -235,3 +243,4 @@
38
 ?6054="Y Rotation - right"
39
 ?6055="X Rotation - up"
40
 ?6056="X Rotation - down"
41
+?6057="Enable/disable panorama mode"
42
sview-15_10.tar.gz/StMoviePlayer/lang/czech Added
2
 
1
+(directory)
2
sview-15_10.tar.gz/StMoviePlayer/lang/czech/StMoviePlayer.lng Added
201
 
1
@@ -0,0 +1,247 @@
2
+# Czech translation file for StMoviePlayer program
3
+# @author Kirill Gavrilov
4
+# @translator Marek Audy
5
+--------
6
+1002=Přehodit levá/pravá
7
+1003=Vypnout přehození levá/pravá
8
+1004=Vstupní stereoskopický formát:
9
+1015=Otevřít soubor
10
+1020=Play/Pause
11
+1021=Zobrazit/skrýt playlist
12
+1022=Předchozí soubor
13
+1023=Další soubor
14
+1029=Okno/přes celou obrazovku
15
+1100=Soubor
16
+1101=Otevřít soubor...
17
+1102=Uložit jako...
18
+1103=Vstupní stereoformát
19
+1170=Informace o souboru
20
+1104=Audio zařízení
21
+1105=Náhodné pořadí
22
+1106=Otevřít poslední položku
23
+1107=Dekódování videa na GPU
24
+1108=Web UI
25
+1109=Zavřít (ESC)
26
+1110=Jeden stereosoubor
27
+1111=Dva soubory levý/pravý zvlášť
28
+1130=Původní
29
+1131=Mono
30
+1132=Křížem vedle sebe
31
+1133=Paralel vedle sebe
32
+1134=Nad/pod P/L
33
+1135=Nad/pod L/P
34
+1136=Prokládaný
35
+1137=Anaglyf červená/modrá
36
+1138=Anaglyf purporová
37
+1139=Anaglyf žlutá
38
+1140=Střídání L/R
39
+1141=2x720p v 1080p dlaždice
40
+1142=2 stream
41
+1160=Smazat historii
42
+1180=Vypnout
43
+1181=Spustit jednou
44
+1182=Spustit při startu
45
+1185=Zobrazit chyby
46
+1186=Web-připojení nemůže být na portu {0}!
47
+1200=Zobrazení
48
+1201=Výstupní formát
49
+1202=Celá obrazovka (Enter)
50
+1203=Vrátit
51
+1204=Přehodit levá/pravá
52
+1205=Poměr stran
53
+1206=Vyhlazení
54
+1207=Barevné korekce
55
+1208=Panorama
56
+1210=Stereo
57
+1211=Levá
58
+1212=Pravá
59
+1213=Paralel vedle sebe
60
+1214=Křížem vedle sebe
61
+1250=Původní
62
+1251=Neukládat nastavení
63
+?1252=Heal anamorphic 1080p/720p
64
+1260=Nevyhlazovat
65
+1261=Lineární
66
+1262=Odstranit prokládání
67
+1270=Resetovat nastavení
68
+1271=Jas
69
+1272=Sytost
70
+1273=Gama
71
+1280=Plocha
72
+1281=Koule
73
+1282=Válec
74
+?1283=Cubemap
75
+?1285="Track orientation"
76
+?1286="Track orientation (poor)"
77
+1300=Zvuk
78
+1301=Vypnout zvuk
79
+1302=Zpoždění zvuku
80
+1303=Přidat stopu ze souboru
81
+1320=Synchronizace zvuk/video
82
+1321=Zadejte kladnou hodnotu v případě, že zvuk předbíhá video, kladnou je-li opožděn.
83
+1322=Zpoždění zvuku
84
+1323=sekund (s)
85
+1350=Titulky
86
+1351=Bez titulků
87
+1353=Přidat soubor
88
+1354=Velikost textu
89
+1355=Paralaxa
90
+1356=Text parser
91
+?1357=Placement
92
+?1358=Top
93
+?1359=Bottom
94
+1360=Plain text
95
+1361=Lite HTML
96
+1400=Vybrat zařízení
97
+1401=O modulu…
98
+1402=FPS nastavení
99
+1420=Vertikální synchronizace
100
+1421=Zobrazovat snímkování (fps)
101
+1422=Omezit využití CPU
102
+1500=Nápověda
103
+1501=O aplikaci…
104
+1502=Aktualizace
105
+1503=Licenční ujednání
106
+1504=Language
107
+1505=Zakázat usínání
108
+1506=Nápověda/Tipy
109
+1507=Experimentální funkce
110
+1508=O systému
111
+1509=Vzhled/měřítko
112
+?1510=Hotkeys
113
+?1511=Settings
114
+1520=Nyní
115
+1521=Denně
116
+1522=Týdně
117
+1523=Ročně
118
+1524=Nikdy
119
+1550=Nikdy
120
+1551=Vždy
121
+1552=Během přehrávání
122
+1553=V režimu celé obrazovky
123
+1590=Menší
124
+1591=Normální
125
+1592=Velké
126
+1593=Extravelké HiDPI 2x
127
+2000=Otevřít video
128
+2001=Otevřít video s LEVOU stopou
129
+2002=Otevřít video s PRAVOU stopou
130
+2003=Informace o souboru
131
+2004=Žadné informace
132
+2005=Vymazat soubor
133
+2006=Skutečně chcete hodit soubor do koše?
134
+2007=Aktivní dekódery
135
+2010=Zvolte místo pro uložení obrázku
136
+2011=Nic není otevřeno!
137
+2012=Obraz není možné uložit!
138
+?2013=Assign new Hot Key for action\n<i>{0}</i>
139
+?2014=Conflicts with: <i>{0}</i>
140
+3000=sView - aplikace na přehrávání stereoskopického videa
141
+3001=verze
142
+3002=Aplikace přehrává stereoskopické video.\n © {0} Гаврилов Кирилл <{1}>\nOficiální stránka: {2}\n\nAplikace je vytvořena na platformě GPL3.0 {3}\nČeská lokalizace Marek Audy
143
+3003=Nové verze aplikace jsou dostupné na: www.sview.ru
144
+3004=Informace o systému
145
+4000=Zavřít
146
+4001=Zrušit
147
+4005=Obnovit
148
+4006=Uložit
149
+4007=Smazat
150
+?4008=Default
151
+?4009=Defaults
152
+?4010=Assign
153
+5000=[levý]
154
+5001=[pravý]
155
+5002=Jména souborů
156
+5003=Rozlišení videa
157
+5004=Načítání
158
+5005=мс
159
+5006=Poměr stran pixelu
160
+5007=Formát pixelu
161
+5008=(metada nejsou v informaci obsažena)
162
+5009=(neobsahuje metadata)
163
+5010=Doba trvání
164
+5011=(informace není obsažena v metadatech,\nale byla přidělena podle jména souboru)
165
+5300=Nadpis
166
+5301=Skladatel
167
+5302=Interpret
168
+5303=Výtvarník
169
+5304=Album
170
+5305=Disk
171
+5306=Kvalita disku
172
+5307=Žánr
173
+5308=Komentář
174
+5309=Poznámky
175
+5310=Popis
176
+5311=Vydavatel
177
+5312=Copyright
178
+5313=Encoder
179
+5314=Engineer
180
+5315=Původ
181
+5316=Datum vydání
182
+5317=Datum
183
+5318=Rok
184
+5319=Jazyk
185
+5320=Stopa
186
+5321=Počet stop
187
+5322=Track gain
188
+5323=Track peak
189
+5324=Album gain
190
+5325=Album peak
191
+?6000=Quit program
192
+?6001=Switch fullscreen/windowed
193
+?6002=Show/hide FPS meter
194
+?6003=Stereo format - Auto
195
+?6004=Stereo format - Mono
196
+?6005=Stereo format - Over/Under
197
+?6006=Stereo format - Side by side
198
+?6007=Show file info
199
+?6008=Playlist - Go to the first item
200
+?6009=Playlist - Go to the last item
201
sview-15_10.tar.gz/StMoviePlayer/lang/czech/language.lng Added
4
 
1
@@ -0,0 +1,1 @@
2
+Čeština
3
\ No newline at end of file
4
sview-15_08.tar.gz/StMoviePlayer/lang/english/StMoviePlayer.lng -> sview-15_10.tar.gz/StMoviePlayer/lang/english/StMoviePlayer.lng Changed
60
 
1
@@ -23,7 +23,7 @@
2
 1109="Quit"
3
 1110="From One file"
4
 1111="Left+Right files"
5
-1130="Autodetection"
6
+1130="Source"
7
 1131="Mono"
8
 1132="Cross-eyed"
9
 1133="Parallel Pair"
10
@@ -50,7 +50,7 @@
11
 1205="Display Ratio"
12
 1206="Smooth Filter"
13
 1207="Image Adjust"
14
-1208="Surface"
15
+1208="Panorama"
16
 1210="Stereo"
17
 1211="Left View"
18
 1212="Right View"
19
@@ -58,6 +58,7 @@
20
 1214="Cross-eyed"
21
 1250="Source"
22
 1251="Keep on restart"
23
+1252="Heal anamorphic 1080p/720p"
24
 1260="Nearest"
25
 1261="Linear"
26
 1262="Blend Deinterlace"
27
@@ -68,6 +69,9 @@
28
 1280="Plane"
29
 1281="Sphere"
30
 1282="Cylinder"
31
+1283="Cubemap"
32
+1285="Track orientation"
33
+1286="Track orientation (poor)"
34
 1300="Audio"
35
 1301="None"
36
 1302="Audio/Video delay"
37
@@ -82,6 +86,9 @@
38
 1354="Font Size"
39
 1355="Parallax"
40
 1356="Text parser"
41
+1357="Placement"
42
+1358="Top"
43
+1359="Bottom"
44
 1360="Plain text"
45
 1361="Lite HTML"
46
 1400="Change device"
47
@@ -101,6 +108,7 @@
48
 1508="About system"
49
 1509="Interface Scale"
50
 1510="Hotkeys"
51
+1511="Settings"
52
 1520="Now"
53
 1521="Each day"
54
 1522="Each week"
55
@@ -235,3 +243,4 @@
56
 6054="Y Rotation - right"
57
 6055="X Rotation - up"
58
 6056="X Rotation - down"
59
+6057="Enable/disable panorama mode"
60
sview-15_08.tar.gz/StMoviePlayer/lang/french/StMoviePlayer.lng -> sview-15_10.tar.gz/StMoviePlayer/lang/french/StMoviePlayer.lng Changed
60
 
1
@@ -23,7 +23,7 @@
2
 1109="Quitter"
3
 1110="Depuis un fichier"
4
 1111="2 Fichiers Gauche+Droit"
5
-1130="Auto-détection"
6
+1130="Source"
7
 1131="Mono"
8
 1132="Cross-eyed"
9
 1133="Coté/Coté (SbS)"
10
@@ -50,7 +50,7 @@
11
 1205="Ratio d'affichage"
12
 1206="Lissage antialiasing"
13
 1207="Réglage de l'image"
14
-1208="Surface"
15
+1208="Panorama"
16
 1210="Stéréo"
17
 1211="Vue Gauche"
18
 1212="Vue Droite"
19
@@ -58,6 +58,7 @@
20
 1214="Cross-eyed"
21
 1250="Source"
22
 1251="Garder après redémarrage"
23
+?1252="Heal anamorphic 1080p/720p"
24
 1260="Plus proche"
25
 1261="Lineaire"
26
 1262="Blend Deinterlace"
27
@@ -68,6 +69,9 @@
28
 1280="Plan"
29
 1281="Sphère"
30
 1282="Cylindre"
31
+1283="Cubemap"
32
+?1285="Track orientation"
33
+?1286="Track orientation (poor)"
34
 1300="Audio"
35
 1301="Aucun"
36
 1302="Audio/Video delay"
37
@@ -82,6 +86,9 @@
38
 1354="Taille De Police"
39
 1355="Parallaxe"
40
 ?1356="Text parser"
41
+1357="Placement"
42
+1358="En haut"
43
+1359="Au fond"
44
 ?1360="Plain text"
45
 ?1361="Lite HTML"
46
 1400="Changer la sortie"
47
@@ -101,6 +108,7 @@
48
 ?1508="About system"
49
 ?1509="Scale Interface"
50
 1510="Raccourcis"
51
+1511="Paramètres"
52
 1520="Maintenant"
53
 1521="Chaque Jour"
54
 1522="Chaque Mois"
55
@@ -235,3 +243,4 @@
56
 ?6054="Y Rotation - right"
57
 ?6055="X Rotation - up"
58
 ?6056="X Rotation - down"
59
+6057="Activer / désactiver le mode panorama"
60
sview-15_08.tar.gz/StMoviePlayer/lang/german/StMoviePlayer.lng -> sview-15_10.tar.gz/StMoviePlayer/lang/german/StMoviePlayer.lng Changed
60
 
1
@@ -23,7 +23,7 @@
2
 1109="Beenden"
3
 1110="Einer Datei"
4
 1111="Zwei Dateien"
5
-1130="Autoerkennung"
6
+1130="Quelle"
7
 1131="Mono"
8
 1132="Schielend"
9
 1133="Parallel Pair"
10
@@ -50,7 +50,7 @@
11
 1205="Seitenverhältnis"
12
 1206="Glatte Filter"
13
 1207="Bildeinstellung"
14
-1208="Oberfläche"
15
+1208="Panorama"
16
 1210="Stereo"
17
 1211="Linke Bild"
18
 1212="Rechte Bild"
19
@@ -58,6 +58,7 @@
20
 1214="Cross-eyed"
21
 1250="Quelle"
22
 1251="Halten beim Neustart"
23
+?1252="Heal anamorphic 1080p/720p"
24
 1260="Nearest"
25
 1261="Linear"
26
 1262="Blend Deinterlace"
27
@@ -68,6 +69,9 @@
28
 1280="Fläche"
29
 1281="Kugel"
30
 1282="Zylinder"
31
+1283="Cubemap"
32
+?1285="Track orientation"
33
+?1286="Track orientation (poor)"
34
 1300="Audio"
35
 1301="keiner"
36
 1302="Audio/Video Verzögerung"
37
@@ -82,6 +86,9 @@
38
 1354="Schriftgröße"
39
 1355="Parallax"
40
 1356="Text parser"
41
+1357="Platzierungen"
42
+1358="Top"
43
+1359="Boden"
44
 1360="Plain text"
45
 1361="Lite HTML"
46
 1400="Gerät ändern"
47
@@ -101,6 +108,7 @@
48
 1508="Über System"
49
 1509="Maßstab Benutzeroberfläche"
50
 1510="Hotkeys"
51
+1511="Einstellungen"
52
 1520="jetzt"
53
 1521="täglich"
54
 1522="wöchentlich"
55
@@ -235,3 +243,4 @@
56
 6054="Y-Drehung - rechts"
57
 6055="X-Drehung - nach oben"
58
 6056="X-Drehung - nach unten"
59
+6057="Aktivieren / Deaktivieren der Panorama-Modus"
60
sview-15_08.tar.gz/StMoviePlayer/lang/korean/StMoviePlayer.lng -> sview-15_10.tar.gz/StMoviePlayer/lang/korean/StMoviePlayer.lng Changed
51
 
1
@@ -51,7 +51,7 @@
2
 1205="화면 비율"
3
 1206="Smooth 필터"
4
 1207="이미지 수정"
5
-1208="Surface"
6
+?1208="Panorama"
7
 1210="Stereo"
8
 1211="왼쪽 View"
9
 1212="오른쪽 View"
10
@@ -59,6 +59,7 @@
11
 1214="크로스 아이"
12
 ?1250="Source"
13
 1251="재시작시 유지"
14
+?1252="Heal anamorphic 1080p/720p"
15
 ?1260="Nearest"
16
 ?1261="Linear"
17
 ?1262="Blend Deinterlace"
18
@@ -69,6 +70,9 @@
19
 ?1280="Plane"
20
 ?1281="Sphere"
21
 ?1282="Cylinder"
22
+?1283="Cubemap"
23
+?1285="Track orientation"
24
+?1286="Track orientation (poor)"
25
 ?1300="Audio"
26
 1301="없음"
27
 1302="오디오/비디오 지연시간"
28
@@ -83,6 +87,9 @@
29
 1354="폰트 크기"
30
 ?1355="Parallax"
31
 ?1356="Text parser"
32
+?1357="Placement"
33
+?1358="Top"
34
+?1359="Bottom"
35
 ?1360="Plain text"
36
 ?1361="Lite HTML"
37
 1400="장치 변경"
38
@@ -102,6 +109,7 @@
39
 1508="시스템에 대해"
40
 ?1509="Interface Scale"
41
 ?1510="Hotkeys"
42
+?1511="Settings"
43
 1520="지금"
44
 1521="매일"
45
 1522="매주"
46
@@ -236,3 +244,4 @@
47
 ?6054="Y Rotation - right"
48
 ?6055="X Rotation - up"
49
 ?6056="X Rotation - down"
50
+?6057="Enable/disable panorama mode"
51
sview-15_08.tar.gz/StMoviePlayer/lang/russian/StMoviePlayer.lng -> sview-15_10.tar.gz/StMoviePlayer/lang/russian/StMoviePlayer.lng Changed
51
 
1
@@ -23,7 +23,7 @@
2
 1109="Выход"
3
 1110="Из одного файла"
4
 1111="Левый+Правый файлы"
5
-1130="Автоопределение"
6
+1130="Исходный"
7
 1131="Моно"
8
 1132="Перекрёстная пара"
9
 1133="Параллельная пара"
10
@@ -59,6 +59,7 @@
11
 1140="Чередование кадров"
12
 1250="Исходное"
13
 1251="Запомнить"
14
+?1252="Heal anamorphic 1080p/720p"
15
 1260="Без сглаживания"
16
 1261="Линейное"
17
 1262="Blend Deinterlace"
18
@@ -69,6 +70,9 @@
19
 1280="Плоскость"
20
 1281="Сфера"
21
 1282="Цилиндр
22
+1283="Куб"
23
+1285="Отслеживать ориентацию"
24
+1286="Отслеживать ориентацию (poor)"
25
 1300="Аудио"
26
 1301="Без звука"
27
 1302="Задержка звука"
28
@@ -97,6 +101,7 @@
29
 1508="О системе"
30
 1509="Масштаб. интерфейса"
31
 1510="Горячие клавиши"
32
+1511="Настройки"
33
 1520="Сейчас"
34
 1521="Каждый день"
35
 1522="Каждую неделю"
36
@@ -109,6 +114,9 @@
37
 1354="Размер текста"
38
 1355="Параллакс"
39
 1356="Text parser"
40
+1357="Положение"
41
+1358="Сверху"
42
+1359="Снизу"
43
 1360="Plain text"
44
 1361="Lite HTML"
45
 1590="Мелко"
46
@@ -236,3 +244,4 @@
47
 6054="Y наклон - направо"
48
 6055="X наклон - наверх"
49
 6056="X наклон - вниз"
50
+6057="Включить/выключить панорамный режим"
51
sview-15_08.tar.gz/StOutAnaglyph/StOutAnaglyph.cpp -> sview-15_10.tar.gz/StOutAnaglyph/StOutAnaglyph.cpp Changed
27
 
1
@@ -197,12 +197,15 @@
2
     StWindow::hide(ST_WIN_MASTER);
3
     if(isMovable()) {
4
         StWindow::setFullScreen(false);
5
-        StRect<int32_t> savedRect = StWindow::getPlacement();
6
-        mySettings->saveInt32Rect(ST_SETTING_WINDOWPOS, savedRect);
7
     }
8
+}
9
+
10
+void StOutAnaglyph::beforeClose() {
11
+    mySettings->saveInt32Rect(ST_SETTING_WINDOWPOS, StWindow::getWindowedPlacement());
12
     mySettings->saveParam(ST_SETTING_GLASSES,   params.Glasses);
13
     mySettings->saveParam(ST_SETTING_REDCYAN,   params.RedCyan);
14
     mySettings->saveParam(ST_SETTING_AMBERBLUE, params.AmberBlue);
15
+    mySettings->flush();
16
 }
17
 
18
 StOutAnaglyph::~StOutAnaglyph() {
19
@@ -238,6 +241,7 @@
20
 
21
 void StOutAnaglyph::close() {
22
     StWindow::params.VSyncMode->signals.onChanged -= stSlot(this, &StOutAnaglyph::doSwitchVSync);
23
+    beforeClose();
24
     releaseResources();
25
     StWindow::close();
26
 }
27
sview-15_08.tar.gz/StOutAnaglyph/StOutAnaglyph.h -> sview-15_10.tar.gz/StOutAnaglyph/StOutAnaglyph.h Changed
13
 
1
@@ -83,6 +83,11 @@
2
     ST_CPPEXPORT virtual void close();
3
 
4
     /**
5
+     * Extra routines to be processed before window close.
6
+     */
7
+    ST_CPPEXPORT virtual void beforeClose();
8
+
9
+    /**
10
      * Process callback.
11
      */
12
     ST_CPPEXPORT virtual void processEvents();
13
sview-15_10.tar.gz/StOutAnaglyph/lang/czech Added
2
 
1
+(directory)
2
sview-15_10.tar.gz/StOutAnaglyph/lang/czech/StOutAnaglyph.lng Added
23
 
1
@@ -0,0 +1,21 @@
2
+# Czech translation file for StOutAnaglyph library
3
+# @author Kirill Gavrilov
4
+# @translator Marek Audy
5
+--------
6
+1000=Brýle anaglyf
7
+1001=Brýle s barevnými filtry
8
+1010=Typ brýlí
9
+1011=Červená-azurová
10
+1012=Žlutá-modrá
11
+1013=Zelená-purpurová
12
+1102=Červeno-azurový filtr
13
+1120=Jednoduchý
14
+1121=Optimalizovaný
15
+1122=Šedý
16
+1123=Tmavý
17
+1103=Žluto-modrý filtr
18
+1130=Jednoduchý
19
+1131=Dubios
20
+2000=sView - modul pro výstup anaglyf
21
+2001=verze
22
+2002=© {0} Гаврилов Кирилл <{1}>\nОфициальный сайт: {2}\n\nБиблиотека распространяется на условиях LGPL3.0
23
sview-15_10.tar.gz/StOutAnaglyph/lang/czech/language.lng Added
4
 
1
@@ -0,0 +1,1 @@
2
+Čeština
3
\ No newline at end of file
4
sview-15_08.tar.gz/StOutDistorted/StOutDistorted.cpp -> sview-15_10.tar.gz/StOutDistorted/StOutDistorted.cpp Changed
40
 
1
@@ -369,7 +369,7 @@
2
     aDevDistorted->PluginId = ST_OUT_PLUGIN_NAME;
3
     aDevDistorted->DeviceId = "Distorted";
4
     aDevDistorted->Priority = ST_DEVICE_SUPPORT_NONE;
5
-    aDevDistorted->Name     = aLangMap.changeValueId(STTR_DISTORTED_NAME, "Parallel Pair");
6
+    aDevDistorted->Name     = aLangMap.changeValueId(STTR_DISTORTED_NAME, "TV (parallel pair)");
7
     aDevDistorted->Desc     = aLangMap.changeValueId(STTR_DISTORTED_DESC, "Distorted Output");
8
     myDevices.add(aDevDistorted);
9
 
10
@@ -443,8 +443,11 @@
11
     StWindow::hide();
12
     if(isMovable()) {
13
         StWindow::setFullScreen(false);
14
-        mySettings->saveInt32Rect(ST_SETTING_WINDOWPOS, StWindow::getPlacement());
15
     }
16
+}
17
+
18
+void StOutDistorted::beforeClose() {
19
+    mySettings->saveInt32Rect(ST_SETTING_WINDOWPOS, StWindow::getWindowedPlacement());
20
 
21
     StRectI_t aMargins;
22
     aMargins.left()   = myBarMargins.left;
23
@@ -461,6 +464,7 @@
24
     if(myWasUsed) {
25
         mySettings->saveInt32(ST_SETTING_DEVICE_ID, myDevice);
26
     }
27
+    mySettings->flush();
28
 }
29
 
30
 StOutDistorted::~StOutDistorted() {
31
@@ -473,6 +477,8 @@
32
 }
33
 
34
 void StOutDistorted::close() {
35
+    beforeClose();
36
+
37
 #ifdef ST_HAVE_LIBOVR
38
     if(myOvrHmd != NULL) {
39
         ovrHmd_Destroy(myOvrHmd);
40
sview-15_08.tar.gz/StOutDistorted/StOutDistorted.h -> sview-15_10.tar.gz/StOutDistorted/StOutDistorted.h Changed
13
 
1
@@ -99,6 +99,11 @@
2
     ST_CPPEXPORT virtual void close();
3
 
4
     /**
5
+     * Extra routines to be processed before window close.
6
+     */
7
+    ST_CPPEXPORT virtual void beforeClose();
8
+
9
+    /**
10
      * Process callback.
11
      */
12
     ST_CPPEXPORT virtual void processEvents();
13
sview-15_08.tar.gz/StOutDistorted/lang/chinese/StOutDistorted.lng -> sview-15_10.tar.gz/StOutDistorted/lang/chinese/StOutDistorted.lng Changed
10
 
1
@@ -1,7 +1,7 @@
2
 # Chinese translation file for StOutDistorted library
3
 # @author YSC
4
 --------
5
-1000="平行配对"
6
+1000="TV (平行配对)"
7
 1001="扭曲输出"
8
 1002="眼镜裂隙"
9
 1003="桶变形"
10
sview-15_10.tar.gz/StOutDistorted/lang/czech Added
2
 
1
+(directory)
2
sview-15_10.tar.gz/StOutDistorted/lang/czech/StOutDistorted.lng Added
19
 
1
@@ -0,0 +1,17 @@
2
+# Czech translation file for StOutDistorted library
3
+# @author Kirill Gavrilov
4
+# @translator Marek Audy
5
+--------
6
+1000=Paralel vedle sebe
7
+1001=Deformovaný výstup
8
+1002=Oculus Rift
9
+1003=Soudková deformace
10
+1110=Uspořádání dvojice
11
+1111=Vedle sebe
12
+1112=Dvojice Nad/pod
13
+1120=Filtr
14
+1121=Žádný
15
+1123=Zobrazit mono ve stereu
16
+2000=sView - Modul deformace výstupu
17
+2001=verze
18
+2002=© {0} Гаврилов Кирилл <{1}>\nОфициальный сайт: {2}\n\nБиблиотека распространяется на условиях LGPL3.0
19
sview-15_10.tar.gz/StOutDistorted/lang/czech/language.lng Added
4
 
1
@@ -0,0 +1,1 @@
2
+Čeština
3
\ No newline at end of file
4
sview-15_08.tar.gz/StOutDistorted/lang/english/StOutDistorted.lng -> sview-15_10.tar.gz/StOutDistorted/lang/english/StOutDistorted.lng Changed
10
 
1
@@ -1,7 +1,7 @@
2
 # English translation file for StOutDistorted library
3
 # @author Kirill Gavrilov
4
 --------
5
-1000="Parallel Pair"
6
+1000="TV (parallel pair)"
7
 1001="Distorted Output"
8
 1002="Oculus Rift"
9
 1003="Barrel distortion"
10
sview-15_08.tar.gz/StOutDistorted/lang/french/StOutDistorted.lng -> sview-15_10.tar.gz/StOutDistorted/lang/french/StOutDistorted.lng Changed
10
 
1
@@ -1,7 +1,7 @@
2
 # French translation file for StOutDistorted library
3
 # @author gramoun for Kirill Gavrilov
4
 --------
5
-1000="Parallel Pair"
6
+1000="TV (parallel pair)"
7
 1001="Distorted Output"
8
 1002="Oculus Rift"
9
 1003="Barrel distortion"
10
sview-15_08.tar.gz/StOutDistorted/lang/german/StOutDistorted.lng -> sview-15_10.tar.gz/StOutDistorted/lang/german/StOutDistorted.lng Changed
10
 
1
@@ -1,7 +1,7 @@
2
 # German translation file for StOutDistorted library
3
 # @author Kirill Gavrilov
4
 --------
5
-1000="Parallel Pair"
6
+1000="TV (parallel pair)"
7
 1001="Distorted Output"
8
 1002="Oculus Rift"
9
 1003="Barrel distortion"
10
sview-15_08.tar.gz/StOutDistorted/lang/korean/StOutDistorted.lng -> sview-15_10.tar.gz/StOutDistorted/lang/korean/StOutDistorted.lng Changed
20
 
1
@@ -1,14 +1,15 @@
2
 # English translation file for StOutDistorted library
3
 # @author Kirill Gavrilov
4
 --------
5
-?1000="Distorted Output"
6
-?1001="Oculur Rift"
7
+?1000="TV (parallel pair)"
8
+?1001="Distorted Output"
9
+?1002="Oculus Rift"
10
+?1003="Barrel distortion"
11
 ?1110="Layout"
12
 ?1111="Side-by-Side"
13
 ?1112="Top-and-Bottom"
14
 ?1120="Distortion"
15
 ?1121="None"
16
-?1122="Barrel"
17
 ?1123="Show Mono in Stereo"
18
 ?2000="sView - Distorted Output module"
19
 ?2001="version"
20
sview-15_08.tar.gz/StOutDistorted/lang/russian/StOutDistorted.lng -> sview-15_10.tar.gz/StOutDistorted/lang/russian/StOutDistorted.lng Changed
10
 
1
@@ -1,7 +1,7 @@
2
 # Russian translation file for StOutDistorted library
3
 # @author Kirill Gavrilov
4
 --------
5
-1000="Параллельная пара"
6
+1000="TV (параллельная пара)"
7
 1001="Distorted Output"
8
 1002="Oculus Rift"
9
 1003="Barrel distortion"
10
sview-15_08.tar.gz/StOutDual/StOutDual.cpp -> sview-15_10.tar.gz/StOutDual/StOutDual.cpp Changed
26
 
1
@@ -288,11 +288,15 @@
2
     StWindow::hide();
3
     if(isMovable()) {
4
         StWindow::setFullScreen(false);
5
-        mySettings->saveInt32Rect(ST_SETTING_WINDOWPOS, StWindow::getPlacement());
6
     }
7
+}
8
+
9
+void StOutDual::beforeClose() {
10
+    mySettings->saveInt32Rect(ST_SETTING_WINDOWPOS, StWindow::getWindowedPlacement());
11
     mySettings->saveParam(ST_SETTING_SLAVE_ID,  params.SlaveMonId);
12
     mySettings->saveParam(ST_SETTING_MONOCLONE, params.MonoClone);
13
     mySettings->saveInt32(ST_SETTING_DEVICE_ID, myDevice);
14
+    mySettings->flush();
15
 }
16
 
17
 StOutDual::~StOutDual() {
18
@@ -302,6 +306,7 @@
19
 
20
 void StOutDual::close() {
21
     StWindow::params.VSyncMode->signals.onChanged -= stSlot(this, &StOutDual::doSwitchVSync);
22
+    beforeClose();
23
     releaseResources();
24
     StWindow::close();
25
 }
26
sview-15_08.tar.gz/StOutDual/StOutDual.h -> sview-15_10.tar.gz/StOutDual/StOutDual.h Changed
13
 
1
@@ -88,6 +88,11 @@
2
     ST_CPPEXPORT virtual void close();
3
 
4
     /**
5
+     * Extra routines to be processed before window close.
6
+     */
7
+    ST_CPPEXPORT virtual void beforeClose();
8
+
9
+    /**
10
      * Process callback.
11
      */
12
     ST_CPPEXPORT virtual void processEvents();
13
sview-15_10.tar.gz/StOutDual/lang/czech Added
2
 
1
+(directory)
2
sview-15_10.tar.gz/StOutDual/lang/czech/StOutDual.lng Added
15
 
1
@@ -0,0 +1,13 @@
2
+# Czech translation file for StOutDual library
3
+# @author Kirill Gavrilov
4
+# @translator Marek Audy
5
+--------
6
+1000=Duální výstup
7
+1001=Stereozařízení s duálním vstupem: dvojice projektorů, monitory se zrcadlem, HMD
8
+1002=Zrcadlově převrácený výstup
9
+1003=Svépomocné zrcadlové systémy
10
+1102=Druhý monitor
11
+1103=Zobrazovat mono ve stereu
12
+2000=sView - modul výstupu na zrcadlové a duální systémy
13
+2001=verze
14
+2002=© {0} Гаврилов Кирилл <{1}>\nОфициальный сайт: {2}\n\nБиблиотека распространяется на условиях LGPL3.0
15
sview-15_10.tar.gz/StOutDual/lang/czech/language.lng Added
4
 
1
@@ -0,0 +1,1 @@
2
+Čeština
3
\ No newline at end of file
4
sview-15_08.tar.gz/StOutIZ3D/StOutIZ3D.cpp -> sview-15_10.tar.gz/StOutIZ3D/StOutIZ3D.cpp Changed
24
 
1
@@ -190,9 +190,13 @@
2
     StWindow::hide();
3
     if(isMovable()) {
4
         StWindow::setFullScreen(false);
5
-        mySettings->saveInt32Rect(ST_SETTING_WINDOWPOS, StWindow::getPlacement());
6
     }
7
+}
8
+
9
+void StOutIZ3D::beforeClose() {
10
+    mySettings->saveInt32Rect(ST_SETTING_WINDOWPOS, StWindow::getWindowedPlacement());
11
     mySettings->saveParam(ST_SETTING_TABLE, params.Glasses);
12
+    mySettings->flush();
13
 }
14
 
15
 StOutIZ3D::~StOutIZ3D() {
16
@@ -202,6 +206,7 @@
17
 
18
 void StOutIZ3D::close() {
19
     StWindow::params.VSyncMode->signals.onChanged -= stSlot(this, &StOutIZ3D::doSwitchVSync);
20
+    beforeClose();
21
     releaseResources();
22
     StWindow::close();
23
 }
24
sview-15_08.tar.gz/StOutIZ3D/StOutIZ3D.h -> sview-15_10.tar.gz/StOutIZ3D/StOutIZ3D.h Changed
13
 
1
@@ -84,6 +84,11 @@
2
     ST_CPPEXPORT virtual void close();
3
 
4
     /**
5
+     * Extra routines to be processed before window close.
6
+     */
7
+    ST_CPPEXPORT virtual void beforeClose();
8
+
9
+    /**
10
      * Process callback.
11
      */
12
     ST_CPPEXPORT virtual void processEvents();
13
sview-15_10.tar.gz/StOutIZ3D/lang/czech Added
2
 
1
+(directory)
2
sview-15_10.tar.gz/StOutIZ3D/lang/czech/StOutIZ3D.lng Added
15
 
1
@@ -0,0 +1,13 @@
2
+# Czech translation file for StOutIZ3D library
3
+# @author Kirill Gavrilov
4
+# @translator Marek Audy
5
+--------
6
+1000=Monitor IZ3D
7
+1001=Monitor IZ3D
8
+1102=Typ brýlí
9
+1120=Klasické
10
+1121=Moderní
11
+1122=Klasické (rychlé)
12
+2000=sView - Modul stereovýstupu pro monitor iZ3D
13
+2001=версия
14
+2002=© {0} Гаврилов Кирилл <{1}>\n© 2007-2009 iZ3D LLC\nОфициальный сайт: {2}\nСайт iZ3D LLC: www.iz3d.com\n\nБиблиотека распространяется на условиях LGPL3.0
15
sview-15_10.tar.gz/StOutIZ3D/lang/czech/language.lng Added
4
 
1
@@ -0,0 +1,1 @@
2
+Čeština
3
\ No newline at end of file
4
sview-15_08.tar.gz/StOutInterlace/StOutInterlace.cpp -> sview-15_10.tar.gz/StOutInterlace/StOutInterlace.cpp Changed
152
 
1
@@ -276,8 +276,8 @@
2
 #endif
3
 
4
     // detect connected displays
5
-    bool myIsMonReversed = false;
6
-    StHandle<StMonitor> aMonInterlaced = StOutInterlace::getHInterlaceMonitor(aMonitors, myIsMonReversed);
7
+    bool isDummyReversed= false;
8
+    StHandle<StMonitor> aMonInterlaced = StOutInterlace::getHInterlaceMonitor(aMonitors, isDummyReversed);
9
     if(!aMonInterlaced.isNull()) {
10
         aDevRow->Priority = ST_DEVICE_SUPPORT_PREFER;
11
     }
12
@@ -300,7 +300,7 @@
13
         StMonitor aMonitor = aMonitors[aRect.center()];
14
         if(params.BindToMon->getValue()
15
         && !aMonInterlaced.isNull()
16
-        && !isInterlacedMonitor(aMonitor, myIsMonReversed)) {
17
+        && !isInterlacedMonitor(aMonitor, isDummyReversed)) {
18
             aMonitor = *aMonInterlaced;
19
         }
20
         if(isLoadedPosition) {
21
@@ -320,6 +320,13 @@
22
         StWindow::setPlacement(aRect);
23
     }
24
 
25
+    // setup myIsMonReversed value for actual placement
26
+    if(!aMonInterlaced.isNull()) {
27
+        myIsMonReversed = false;
28
+        StMonitor aMonitor = aMonitors[StWindow::getPlacement().center()];
29
+        isInterlacedMonitor(aMonitor, myIsMonReversed);
30
+    }
31
+
32
     // load device settings
33
     mySettings->loadInt32(ST_SETTING_DEVICE_ID, myDevice);
34
     if(myDevice == DEVICE_AUTO) {
35
@@ -354,11 +361,7 @@
36
     StWindow::hide();
37
     if(isMovable()) {
38
         StWindow::setFullScreen(false);
39
-        mySettings->saveInt32Rect(ST_SETTING_WINDOWPOS, StWindow::getPlacement());
40
     }
41
-    mySettings->saveParam(ST_SETTING_BIND_MONITOR, params.BindToMon);
42
-    mySettings->saveParam(ST_SETTING_REVERSE,      params.ToReverse);
43
-    mySettings->saveInt32(ST_SETTING_DEVICE_ID,    myDevice);
44
 }
45
 
46
 StOutInterlace::~StOutInterlace() {
47
@@ -374,6 +377,12 @@
48
 }
49
 
50
 void StOutInterlace::beforeClose() {
51
+    mySettings->saveInt32Rect(ST_SETTING_WINDOWPOS, StWindow::getWindowedPlacement());
52
+    mySettings->saveParam(ST_SETTING_BIND_MONITOR, params.BindToMon);
53
+    mySettings->saveParam(ST_SETTING_REVERSE,      params.ToReverse);
54
+    mySettings->saveInt32(ST_SETTING_DEVICE_ID,    myDevice);
55
+    mySettings->flush();
56
+
57
     // process exit from StApplication
58
     if((myDevice == DEVICE_HINTERLACE_ED) && myIsEDactive) {
59
         // disactivate eDimensional shuttered glasses
60
@@ -433,7 +442,7 @@
61
     if(!aShaderRow.init(*myContext,
62
                         ST_SHADER_TEMPLATE[0],
63
                         // drop odd horizontal line (starts from bottom)
64
-                        "if(int(mod(gl_FragCoord.y + 1.5, 2.0)) == 1) { discard; }\n",
65
+                        "if(int(mod(gl_FragCoord.y - 1023.5, 2.0)) != 1) { discard; }\n",
66
                         ST_SHADER_TEMPLATE[2])) {
67
         myMsgQueue->pushError(aShadersError);
68
         myIsBroken = true;
69
@@ -441,7 +450,7 @@
70
     } else if(!aShaderRowRev.init(*myContext,
71
                                   ST_SHADER_TEMPLATE[0],
72
               // drop even horizontal line (starts from bottom)
73
-              "if(int(mod(gl_FragCoord.y + 1.5, 2.0)) != 1) { discard; }\n",
74
+              "if(int(mod(gl_FragCoord.y - 1023.5, 2.0)) == 1) { discard; }\n",
75
               ST_SHADER_TEMPLATE[2])) {
76
         myMsgQueue->pushError(aShadersError);
77
         myIsBroken = true;
78
@@ -464,7 +473,7 @@
79
     if(!aShaderCol.init(*myContext,
80
                         ST_SHADER_TEMPLATE[0],
81
                         // drop odd column (starts from left)
82
-                        "if(int(mod(gl_FragCoord.x + 1.5, 2.0)) != 1) { discard; }\n",
83
+                        "if(int(mod(gl_FragCoord.x - 1023.5, 2.0)) == 1) { discard; }\n",
84
                         ST_SHADER_TEMPLATE[2])) {
85
         myMsgQueue->pushError(aShadersError);
86
         myIsBroken = true;
87
@@ -472,7 +481,7 @@
88
     } else if(!aShaderColRev.init(*myContext,
89
                                   ST_SHADER_TEMPLATE[0],
90
               // drop even column (starts from left)
91
-              "if(int(mod(gl_FragCoord.x + 1.5, 2.0)) == 1) { discard; }\n",
92
+              "if(int(mod(gl_FragCoord.x - 1023.5, 2.0)) != 1) { discard; }\n",
93
               ST_SHADER_TEMPLATE[2])) {
94
         myMsgQueue->pushError(aShadersError);
95
         myIsBroken = true;
96
@@ -494,8 +503,8 @@
97
     StGLAutoRelease aTmp7(*myContext, aShaderChessRev);
98
     if(!aShaderChess.init(*myContext,
99
                           ST_SHADER_TEMPLATE[0],
100
-                          "bool isEvenX = int(mod(floor(gl_FragCoord.x + 1.5), 2.0)) == 1;\n"
101
-                          "bool isEvenY = int(mod(floor(gl_FragCoord.y + 1.5), 2.0)) != 1;\n"
102
+                          "bool isEvenX = int(mod(floor(gl_FragCoord.x - 1023.5), 2.0)) != 1;\n"
103
+                          "bool isEvenY = int(mod(floor(gl_FragCoord.y - 1023.5), 2.0)) == 1;\n"
104
                           "if((isEvenX && isEvenY) || (!isEvenX && !isEvenY)) { discard; }\n",
105
                            ST_SHADER_TEMPLATE[2])) {
106
         myMsgQueue->pushError(aShadersError);
107
@@ -503,8 +512,8 @@
108
         return true;
109
     } else if(!aShaderChessRev.init(*myContext,
110
                                     ST_SHADER_TEMPLATE[0],
111
-              "bool isEvenX = int(mod(floor(gl_FragCoord.x + 1.5), 2.0)) == 1;\n"
112
-              "bool isEvenY = int(mod(floor(gl_FragCoord.y + 1.5), 2.0)) != 1;\n"
113
+              "bool isEvenX = int(mod(floor(gl_FragCoord.x - 1023.5), 2.0)) != 1;\n"
114
+              "bool isEvenY = int(mod(floor(gl_FragCoord.y - 1023.5), 2.0)) == 1;\n"
115
               "if(!((isEvenX && isEvenY) || (!isEvenX && !isEvenY))) { discard; }\n",
116
               ST_SHADER_TEMPLATE[2])) {
117
         myMsgQueue->pushError(aShadersError);
118
@@ -850,20 +859,21 @@
119
     const StSearchMonitors& aMonitors = StWindow::getMonitors();
120
     StRectI_t aRect = StWindow::getPlacement();
121
     StMonitor aMon  = aMonitors[aRect.center()];
122
-    StHandle<StMonitor> anInterlacedMon = StOutInterlace::getHInterlaceMonitor(aMonitors, myIsMonReversed);
123
-
124
-    if(isMovable()) {
125
+    if(isInterlacedMonitor(aMon, myIsMonReversed)
126
+    || !isMovable()) {
127
         return;
128
     }
129
 
130
-    if(!anInterlacedMon.isNull()
131
-    && !isInterlacedMonitor(aMon, myIsMonReversed)) {
132
-        int aWidth  = aRect.width();
133
-        int aHeight = aRect.height();
134
-        aRect.left()   = anInterlacedMon->getVRect().left() + 256;
135
-        aRect.right()  = aRect.left() + aWidth;
136
-        aRect.top()    = anInterlacedMon->getVRect().top() + 256;
137
-        aRect.bottom() = aRect.top() + aHeight;
138
-        StWindow::setPlacement(aRect);
139
+    StHandle<StMonitor> anInterlacedMon = StOutInterlace::getHInterlaceMonitor(aMonitors, myIsMonReversed);
140
+    if(anInterlacedMon.isNull()) {
141
+        return;
142
     }
143
+
144
+    int aWidth  = aRect.width();
145
+    int aHeight = aRect.height();
146
+    aRect.left()   = anInterlacedMon->getVRect().left() + 256;
147
+    aRect.right()  = aRect.left() + aWidth;
148
+    aRect.top()    = anInterlacedMon->getVRect().top() + 256;
149
+    aRect.bottom() = aRect.top() + aHeight;
150
+    StWindow::setPlacement(aRect);
151
 }
152
sview-15_10.tar.gz/StOutInterlace/lang/czech Added
2
 
1
+(directory)
2
sview-15_10.tar.gz/StOutInterlace/lang/czech/StOutInterlace.lng Added
19
 
1
@@ -0,0 +1,17 @@
2
+# Russian translation file for StOutInterlace library
3
+# @author Kirill Gavrilov
4
+# @translator Marek Audy
5
+--------
6
+1000=Prokládání řádků
7
+1001=Vodorovně prokládané monitory: Zalman, Hyundai, LG…
8
+1002=Prokládání sloupců
9
+1003=Svisle proklásané monitory
10
+1006=DLP TV (šachovnice)
11
+1007=DLP TV (šachovnice)
12
+1008=Prokládaný ED
13
+1009=EDimensional v prokládaném režimu
14
+1102=Přeskládat obráceně
15
+1103=Provázat s monitorem
16
+2000=sView - modul prokládaného zobrazování
17
+2001=verze
18
+2002=© {0} Гаврилов Кирилл <{1}>\noficiální strana: {2}\n\nБиблиотека распространяется на условиях LGPL3.0
19
sview-15_10.tar.gz/StOutInterlace/lang/czech/language.lng Added
4
 
1
@@ -0,0 +1,1 @@
2
+Čeština
3
\ No newline at end of file
4
sview-15_08.tar.gz/StOutPageFlip/StOutPageFlip.cpp -> sview-15_10.tar.gz/StOutPageFlip/StOutPageFlip.cpp Changed
28
 
1
@@ -578,13 +578,17 @@
2
     StWindow::hide();
3
     if(isMovable()) {
4
         StWindow::setFullScreen(false);
5
-        mySettings->saveInt32Rect(ST_SETTING_WINDOWPOS, StWindow::getPlacement());
6
     }
7
+}
8
+
9
+void StOutPageFlip::beforeClose() {
10
+    mySettings->saveInt32Rect(ST_SETTING_WINDOWPOS, StWindow::getWindowedPlacement());
11
     mySettings->saveInt32(ST_SETTING_DEVICE_ID,  myDevice);
12
     mySettings->saveParam(ST_SETTING_ADVANCED,   params.ToShowExtra);
13
     if(myWasUsed) {
14
         mySettings->saveParam(ST_SETTING_QUADBUFFER, params.QuadBuffer);
15
     }
16
+    mySettings->flush();
17
 }
18
 
19
 StOutPageFlip::~StOutPageFlip() {
20
@@ -592,6 +596,7 @@
21
 }
22
 
23
 void StOutPageFlip::close() {
24
+    beforeClose();
25
     StWindow::params.VSyncMode->signals.onChanged -= stSlot(this, &StOutPageFlip::doSwitchVSync);
26
     myToResetDevice = false;
27
     releaseResources();
28
sview-15_08.tar.gz/StOutPageFlip/StOutPageFlip.h -> sview-15_10.tar.gz/StOutPageFlip/StOutPageFlip.h Changed
13
 
1
@@ -114,6 +114,11 @@
2
     ST_CPPEXPORT virtual void close();
3
 
4
     /**
5
+     * Extra routines to be processed before window close.
6
+     */
7
+    ST_CPPEXPORT virtual void beforeClose();
8
+
9
+    /**
10
      * Process callback.
11
      */
12
     ST_CPPEXPORT virtual void processEvents();
13
sview-15_08.tar.gz/StOutPageFlip/StOutPageFlipExt.cpp -> sview-15_10.tar.gz/StOutPageFlip/StOutPageFlipExt.cpp Changed
25
 
1
@@ -89,7 +89,6 @@
2
         myCodesLine.release(*myContext);
3
         myCodesEDOnOff.release(*myContext);
4
     }
5
-    mySettings->saveParam(ST_SETTING_DEV_CONTROL, params.ControlCode);
6
     StOutPageFlip::releaseResources();
7
 }
8
 
9
@@ -97,12 +96,10 @@
10
     releaseResources();
11
 }
12
 
13
-void StOutPageFlipExt::close() {
14
-    beforeClose();
15
-    StOutPageFlip::close();
16
-}
17
-
18
 void StOutPageFlipExt::beforeClose() {
19
+    StOutPageFlip::beforeClose();
20
+    mySettings->saveParam(ST_SETTING_DEV_CONTROL, params.ControlCode);
21
+    mySettings->flush();
22
     if(!StOutPageFlip::params.ToShowExtra->getValue()) {
23
         return;
24
     }
25
sview-15_08.tar.gz/StOutPageFlip/StOutPageFlipExt.h -> sview-15_10.tar.gz/StOutPageFlip/StOutPageFlipExt.h Changed
13
 
1
@@ -52,11 +52,6 @@
2
     ST_CPPEXPORT virtual bool create();
3
 
4
     /**
5
-     * Close the window.
6
-     */
7
-    ST_CPPEXPORT virtual void close();
8
-
9
-    /**
10
      * Extra routines to be processed before window close.
11
      */
12
     ST_CPPEXPORT virtual void beforeClose();
13
sview-15_10.tar.gz/StOutPageFlip/lang/czech Added
2
 
1
+(directory)
2
sview-15_10.tar.gz/StOutPageFlip/lang/czech/StOutPageFlip.lng Added
28
 
1
@@ -0,0 +1,26 @@
2
+# Czech translation file for StOutPageFlip library
3
+# @author Kirill Gavrilov
4
+# @translator Marek Audy
5
+--------
6
+1000=Aktivní brýle (závěrkové)
7
+1001=Aktivní brýle (závěrkové)
8
+1002=Vuzix HMD
9
+1003=Vuzix HMD
10
+1102=Typ vícenásobného bufferingu
11
+1103=Nastavení brýlí
12
+1120=OpenGL emulovaný
13
+1122=OpenGL hardwarový
14
+1123=Direct3D (Celá obrazovka)
15
+1124=Direct3D (Nedostupné)
16
+1125=Direct3D AMD (Celá obrazovka)
17
+1126=Direct3D AMD (Nedostupné)
18
+1127=Direct3D NVIDIA (Celá obrazovka)
19
+1128=Direct3D NVIDIA (Vypnuto)
20
+1130=Bez ovládání
21
+1131=Modrá linka sync
22
+1132=Bílá linka sync
23
+1134=eDimensional auto on/off
24
+2000=sView - modul stereovýstupu pro aktivní závěrkové brýle
25
+2001=версия
26
+2002=© {0} Гаврилов Кирилл <{1}>\nОфициальный сайт: {2}\n\nБиблиотека распространяется на условиях LGPL3.0
27
+3001=OpenGL Hardware QuadBuffer není dostupný!
28
sview-15_10.tar.gz/StOutPageFlip/lang/czech/language.lng Added
4
 
1
@@ -0,0 +1,1 @@
2
+Čeština
3
\ No newline at end of file
4
sview-15_10.tar.gz/StShared/StAVVideoMuxer.cpp Added
201
 
1
@@ -0,0 +1,349 @@
2
+/**
3
+ * Copyright © 2015 Kirill Gavrilov <kirill@sview.ru>
4
+ *
5
+ * Distributed under the Boost Software License, Version 1.0.
6
+ * See accompanying file license-boost.txt or copy at
7
+ * http://www.boost.org/LICENSE_1_0.txt
8
+ */
9
+
10
+#include <StAV/StAVVideoMuxer.h>
11
+
12
+#include <StAV/StAVPacket.h>
13
+#include <StStrings/StLogger.h>
14
+#include <StFile/StFileNode.h>
15
+
16
+#include <vector>
17
+
18
+StAVVideoMuxer::StAVVideoMuxer()
19
+: myStereoFormat(StFormat_Mono) {
20
+    //
21
+}
22
+
23
+StAVVideoMuxer::~StAVVideoMuxer() {
24
+    close();
25
+}
26
+
27
+void StAVVideoMuxer::close() {
28
+    for(size_t aCtxId = 0; aCtxId < myCtxListSrc.size(); ++aCtxId) {
29
+        AVFormatContext*& aFormatCtx = myCtxListSrc[aCtxId];
30
+        if(aFormatCtx != NULL) {
31
+        #if(LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53, 17, 0))
32
+            avformat_close_input(&aFormatCtx);
33
+        #else
34
+            av_close_input_file(aFormatCtx);
35
+        #endif
36
+        }
37
+    }
38
+    myCtxListSrc.clear();
39
+}
40
+
41
+bool StAVVideoMuxer::addFile(const StString& theFileToLoad) {
42
+    StString aFileName, aDummy;
43
+    StFileNode::getFolderAndFile(theFileToLoad, aDummy, aFileName);
44
+
45
+    AVFormatContext* aFormatCtx = NULL;
46
+#if(LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53, 2, 0))
47
+    int avErrCode = avformat_open_input(&aFormatCtx, theFileToLoad.toCString(), NULL, NULL);
48
+#else
49
+    int avErrCode = av_open_input_file (&aFormatCtx, theFileToLoad.toCString(), NULL, 0, NULL);
50
+#endif
51
+    if(avErrCode != 0) {
52
+        signals.onError(StString("FFmpeg: Couldn't open video file '") + theFileToLoad
53
+                      + "'\nError: " + stAV::getAVErrorDescription(avErrCode));
54
+        if(aFormatCtx != NULL) {
55
+        #if(LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53, 17, 0))
56
+            avformat_close_input(&aFormatCtx);
57
+        #else
58
+            av_close_input_file(aFormatCtx);
59
+        #endif
60
+        }
61
+        return false;
62
+    }
63
+
64
+    // retrieve stream information
65
+#if(LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53, 6, 0))
66
+    if(avformat_find_stream_info(aFormatCtx, NULL) < 0) {
67
+#else
68
+    if(av_find_stream_info(aFormatCtx) < 0) {
69
+#endif
70
+        signals.onError(StString("FFmpeg: Couldn't find stream information in '") + theFileToLoad + "'");
71
+        if(aFormatCtx != NULL) {
72
+        #if(LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53, 17, 0))
73
+            avformat_close_input(&aFormatCtx);
74
+        #else
75
+            av_close_input_file(aFormatCtx); // close video file at all
76
+        #endif
77
+        }
78
+        return false;
79
+    }
80
+
81
+#ifdef ST_DEBUG
82
+#if(LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(52, 101, 0))
83
+    av_dump_format(aFormatCtx, 0, theFileToLoad.toCString(), false);
84
+#else
85
+    dump_format   (aFormatCtx, 0, theFileToLoad.toCString(), false);
86
+#endif
87
+#endif
88
+
89
+    myCtxListSrc.add(aFormatCtx);
90
+    return true;
91
+}
92
+
93
+class StAVOutContext {
94
+
95
+        public:
96
+
97
+    AVFormatContext* Context;
98
+
99
+    /**
100
+     * Empty constructor.
101
+     */
102
+    StAVOutContext() : Context(NULL), myFormat(NULL) {}
103
+
104
+    /**
105
+     * Determine the format.
106
+     */
107
+    bool findFormat(const char* theShortName,
108
+                    const char* theFilename,
109
+                    const char* theMimeType = NULL) {
110
+        myFormat = av_guess_format(theShortName, theFilename, theMimeType);
111
+        return myFormat != NULL;
112
+    }
113
+
114
+    /**
115
+     * Create context.
116
+     */
117
+    bool create(const StString& theFile) {
118
+        if(myFormat == NULL) {
119
+            return false;
120
+        }
121
+
122
+    #if !defined(ST_LIBAV_FORK)
123
+        avformat_alloc_output_context2(&Context, myFormat, NULL, theFile.toCString());
124
+    #else
125
+        Context = avformat_alloc_context();
126
+        if(Context == NULL) {
127
+            return false;
128
+        }
129
+
130
+        Context->oformat = myFormat;
131
+        if(Context->oformat->priv_data_size > 0) {
132
+            Context->priv_data = av_mallocz(Context->oformat->priv_data_size);
133
+            if(!Context->priv_data) {
134
+                //goto nomem;
135
+            }
136
+            if(Context->oformat->priv_class) {
137
+                *(const AVClass**)Context->priv_data = Context->oformat->priv_class;
138
+                //av_opt_set_defaults(aCtxOut->priv_data);
139
+            }
140
+        } else {
141
+            Context->priv_data = NULL;
142
+        }
143
+
144
+        const size_t aStrLen = stMin(theFile.Size + 1, size_t(1024));
145
+        stMemCpy(Context->filename, theFile.toCString(), aStrLen);
146
+        Context->filename[1023] = '\0';
147
+    #endif
148
+        return Context != NULL;
149
+    }
150
+
151
+    /**
152
+     * Destructor.
153
+     */
154
+    ~StAVOutContext() {
155
+        if(Context == NULL) {
156
+            return;
157
+        }
158
+
159
+        if(!(Context->oformat->flags & AVFMT_NOFILE)) {
160
+            avio_close(Context->pb);
161
+        }
162
+        avformat_free_context(Context);
163
+    }
164
+
165
+        private:
166
+
167
+    AVOutputFormat* myFormat;
168
+
169
+};
170
+
171
+/**
172
+ * Return string identifier for specified stereo format.
173
+ */
174
+const char* formatToMetadata(const StFormat theFormat) {
175
+    switch(theFormat) {
176
+        case StFormat_Mono:                 return "mono";
177
+        case StFormat_SideBySide_RL:        return "right_left";
178
+        case StFormat_SideBySide_LR:        return "left_right";
179
+        case StFormat_TopBottom_RL:         return "bottom_top";
180
+        case StFormat_TopBottom_LR:         return "top_bottom";
181
+        case StFormat_Rows:                 return "row_interleaved_lr";
182
+        case StFormat_Columns:              return "col_interleaved_lr";
183
+        case StFormat_FrameSequence:        return "block_lr";
184
+        case StFormat_AnaglyphRedCyan:      return "anaglyph_cyan_red";
185
+        case StFormat_AnaglyphGreenMagenta: return "anaglyph_green_magenta";
186
+        case StFormat_AUTO:
187
+        case StFormat_SeparateFrames:
188
+        case StFormat_AnaglyphYellowBlue:
189
+        case StFormat_Tiled4x:
190
+        case StFormat_NB:
191
+            return NULL;
192
+    }
193
+    return NULL;
194
+}
195
+
196
+bool StAVVideoMuxer::addStream(AVFormatContext* theContext,
197
+                               const AVStream*  theStream) {
198
+    AVStream* aStreamOut = avformat_new_stream(theContext, theStream->codec->codec);
199
+    if(aStreamOut == NULL) {
200
+        signals.onError(StString("Failed allocating output stream."));
201
sview-15_08.tar.gz/StShared/StConfigImpl.cpp -> sview-15_10.tar.gz/StShared/StConfigImpl.cpp Changed
166
 
1
@@ -1,5 +1,5 @@
2
 /**
3
- * Copyright © 2007-2014 Kirill Gavrilov
4
+ * Copyright © 2007-2015 Kirill Gavrilov
5
  *
6
  * Distributed under the Boost Software License, Version 1.0.
7
  * See accompanying file license-boost.txt or copy at
8
@@ -8,22 +8,6 @@
9
 
10
 #include <StSettings/StSettings.h>
11
 
12
-/*#if defined(__ANDROID__)
13
-
14
-bool StSettings::load() { return true; }
15
-bool StSettings::save() { return false; }
16
-StSettings::StSettings(const StString& theSettingsSet) {}
17
-StSettings::~StSettings() {}
18
-bool StSettings::loadInt32 (const StString& ,
19
-                            int32_t&        ) { return false; }
20
-bool StSettings::saveInt32 (const StString& ,
21
-                            const int32_t&  ) { return false; }
22
-bool StSettings::loadString(const StString& ,
23
-                            StString&       ) { return false; }
24
-bool StSettings::saveString(const StString& ,
25
-                            const StString& ) { return false; }
26
-
27
-#elif !defined(_WIN32) && !defined(__APPLE__)*/
28
 #if !defined(_WIN32) && !defined(__APPLE__)
29
 
30
 #include <StStrings/StLogger.h>
31
@@ -36,43 +20,65 @@
32
 using namespace libconfig;
33
 
34
 bool StSettings::load() {
35
-    if(myIsLoaded) {
36
-        return true;
37
+    if(myFullFileName.isEmpty()
38
+    || !StFileNode::isFileExists(myFullFileName)) {
39
+        myIsLoaded = false;
40
+        ST_DEBUG_LOG("StSettings, file " + myFullFileName + " does not exist");
41
+        return false;
42
     }
43
 
44
     try {
45
-        myConfig->readFile(myFullFileName.toCString()); // load the configuration
46
+        myConfig->readFile(myFullFileName.toCString());
47
+        myIsLoaded = true;
48
+        return true;
49
     } catch(...) {
50
-        ST_DEBUG_LOG("StSettings, failed to parse " + myFullFileName);
51
+        //
52
+    }
53
+
54
+    // the only option to recover?
55
+    delete myConfig;
56
+    myConfig = new Config();
57
+    ST_ERROR_LOG("StSettings, failed to parse " + myFullFileName);
58
+    if(!StFileNode::removeFile(myFullFileName)) {
59
+        ST_ERROR_LOG("StSettings, file " + myFullFileName + " can not be removed");
60
         return false;
61
     }
62
-    return true;
63
+    return false;
64
 }
65
 
66
-bool StSettings::save() {
67
+bool StSettings::flush() {
68
+    if(!myToFlush) {
69
+        return true;
70
+    }
71
+
72
     try {
73
         myConfig->writeFile(myFullFileName.toCString());
74
     } catch(...) {
75
         ST_DEBUG_LOG("StSettings, failed write to " + myFullFileName);
76
         return false;
77
     }
78
+
79
+    myToFlush = false;
80
     return true;
81
 }
82
 
83
 StSettings::StSettings(const StHandle<StResourceManager>& theResMgr,
84
                        const StString&                    theSettingsSet)
85
 : myConfig(new Config()),
86
-  myIsLoaded(false) {
87
+  myIsLoaded(false),
88
+  myToFlush(false) {
89
     myFullFileName = theResMgr->getSettingsFolder() + theSettingsSet + ".cfg";
90
+    load();
91
 }
92
 
93
 StSettings::~StSettings() {
94
+    flush();
95
     delete myConfig;
96
 }
97
 
98
 bool StSettings::loadInt32(const StString& theParamPath,
99
                            int32_t&        theValue) {
100
-    if(!load()) {
101
+    if(!myIsLoaded) {
102
         return false;
103
     }
104
     try {
105
@@ -105,9 +111,8 @@
106
 
107
 bool StSettings::saveInt32(const StString& theParamPath,
108
                            const int32_t&  theValue) {
109
-    bool isLoaded = load(); // try to load config firstly
110
     try {
111
-        if(!isLoaded || !myConfig->exists(theParamPath.toCString())) {
112
+        if(!myConfig->exists(theParamPath.toCString())) {
113
             Setting& aRoot = myConfig->getRoot();
114
             StString aParamGroup, aParamName;
115
             if(groupName(theParamPath, aParamGroup, aParamName)) {
116
@@ -126,7 +131,6 @@
117
             );*/
118
         }
119
         myConfig->lookup(theParamPath.toCString()) = theValue;
120
-        save();
121
     } catch(ParseException& ex) {
122
         ST_DEBUG_LOG("StSettings, error on line " + ex.getLine() + ": " + ex.getError());
123
         return false;
124
@@ -137,12 +141,13 @@
125
         ST_DEBUG_LOG("StSettings[" + theParamPath + "], config exception!");
126
         return false;
127
     }
128
+    myToFlush = true;
129
     return true;
130
 }
131
 
132
 bool StSettings::loadString(const StString& theParamPath,
133
                             StString&       theValue) {
134
-    if(!load()) {
135
+    if(!myIsLoaded) {
136
         return false;
137
     }
138
     try {
139
@@ -161,9 +166,8 @@
140
 
141
 bool StSettings::saveString(const StString& theParamPath,
142
                             const StString& theValue) {
143
-    bool isLoaded = load(); // try to load config firstly
144
     try {
145
-        if(!isLoaded || !myConfig->exists(theParamPath.toCString())) {
146
+        if(!myConfig->exists(theParamPath.toCString())) {
147
             Setting& aRoot = myConfig->getRoot();
148
             StString aParamGroup, aParamName;
149
             if(groupName(theParamPath, aParamGroup, aParamName)) {
150
@@ -182,7 +186,6 @@
151
             );*/
152
         }
153
         myConfig->lookup(theParamPath.toCString()) = theValue.toCString();
154
-        save();
155
     } catch(ParseException& ex) {
156
         ST_DEBUG_LOG("StSettings, error on line " + ex.getLine() + ": " + ex.getError());
157
         return false;
158
@@ -193,6 +196,7 @@
159
         ST_DEBUG_LOG("StSettings[" + theParamPath + "], config exception!");
160
         return false;
161
     }
162
+    myToFlush = true;
163
     return true;
164
 }
165
 
166
sview-15_08.tar.gz/StShared/StFileNode.cpp -> sview-15_10.tar.gz/StShared/StFileNode.cpp Changed
11
 
1
@@ -182,7 +182,8 @@
2
         }
3
     }
4
 
5
-    if(aLastSplit != thePath.getSize()) {
6
+    if(aLastSplit != size_t(-1)
7
+    && aLastSplit + 1 == thePath.getLength()) {
8
         aLastSplit = aPreSplit;
9
     }
10
     if(aLastSplit == size_t(-1)) {
11
sview-15_08.tar.gz/StShared/StGLContext.cpp -> sview-15_10.tar.gz/StShared/StGLContext.cpp Changed
90
 
1
@@ -19,6 +19,8 @@
2
 #include <StStrings/StDictionary.h>
3
 #include <StStrings/StLogger.h>
4
 
5
+#include <StTemplates/StQuaternion.h>
6
+
7
 #include <stAssert.h>
8
 
9
 #if defined(__APPLE__)
10
@@ -51,10 +53,12 @@
11
   arbTexRG(false),
12
   arbTexClear(false),
13
 #if defined(GL_ES_VERSION_2_0)
14
+  hasUnpack(false),
15
   hasHighp(false),
16
   hasTexRGBA8(false),
17
   extTexBGRA8(false),
18
 #else
19
+  hasUnpack(true),
20
   hasHighp(true),
21
   hasTexRGBA8(true), // always available on desktop
22
   extTexBGRA8(true),
23
@@ -101,12 +105,14 @@
24
   arbTexRG(false),
25
   arbTexClear(false),
26
 #if defined(GL_ES_VERSION_2_0)
27
+  hasUnpack(false),
28
   hasHighp(false),
29
   hasTexRGBA8(false),
30
   extTexBGRA8(false),
31
 #else
32
+  hasUnpack(true), // always available on desktop
33
   hasHighp(true),
34
-  hasTexRGBA8(true), // always available on desktop
35
+  hasTexRGBA8(true),
36
   extTexBGRA8(true),
37
 #endif
38
   extAll(NULL),
39
@@ -508,6 +514,16 @@
40
                    StString() + (aDedicatedFree / 1024)  + " MiB (from " + (aDedicated / 1024) + " MiB)"));
41
     }
42
 #endif
43
+
44
+#if !defined(GL_ES_VERSION_2_0) && !defined(__APPLE__) && !defined(_WIN32)
45
+    // GLX_RENDERER_VENDOR_ID_MESA
46
+    if(myFuncs->glXQueryCurrentRendererIntegerMESA != NULL) {
47
+        unsigned int aVMemMiB = 0;
48
+        if(myFuncs->glXQueryCurrentRendererIntegerMESA(GLX_RENDERER_VIDEO_MEMORY_MESA, &aVMemMiB) != False) {
49
+            theMap.add(StDictEntry("GPU memory", StString() + aVMemMiB  + " MiB"));
50
+        }
51
+    }
52
+#endif
53
 }
54
 
55
 void StGLContext::stglSyncState() {
56
@@ -697,6 +713,12 @@
57
     if(stglCheckExtension(aGlxExts, "GLX_SGI_swap_control")) {
58
         STGL_READ_FUNC(glXSwapIntervalSGI);
59
     }
60
+    if(stglCheckExtension(aGlxExts, "GLX_MESA_query_renderer")) {
61
+        STGL_READ_FUNC(glXQueryRendererIntegerMESA);
62
+        STGL_READ_FUNC(glXQueryCurrentRendererIntegerMESA);
63
+        STGL_READ_FUNC(glXQueryRendererStringMESA);
64
+        STGL_READ_FUNC(glXQueryCurrentRendererStringMESA);
65
+    }
66
     extSwapTear = stglCheckExtension(aGlxExts, "GLX_EXT_swap_control_tear");
67
 #endif
68
 
69
@@ -712,6 +734,7 @@
70
                || stglCheckExtension("GL_EXT_texture_rg");
71
     const bool hasFBO = isGlGreaterEqual(2, 0)
72
                      || stglCheckExtension("GL_OES_framebuffer_object");
73
+    hasUnpack = isGlGreaterEqual(3, 0);
74
 
75
     if(isGlGreaterEqual(2, 0)) {
76
         // enable compatible functions
77
@@ -1632,3 +1655,12 @@
78
 
79
     return true;
80
 }
81
+
82
+template class StVec2<float>;
83
+template class StVec2<double>;
84
+template class StVec3<float>;
85
+template class StVec3<double>;
86
+template class StVec4<float>;
87
+template class StVec4<double>;
88
+template class StQuaternion<float>;
89
+template class StQuaternion<double>;
90
sview-15_08.tar.gz/StShared/StGLMatrix.cpp -> sview-15_10.tar.gz/StShared/StGLMatrix.cpp Changed
47
 
1
@@ -1,5 +1,5 @@
2
 /**
3
- * Copyright © 2010-2011 Kirill Gavrilov <kirill@sview.ru>
4
+ * Copyright © 2010-2015 Kirill Gavrilov <kirill@sview.ru>
5
  *
6
  * Distributed under the Boost Software License, Version 1.0.
7
  * See accompanying file license-boost.txt or copy at
8
@@ -17,7 +17,7 @@
9
         0.0f, 0.0f, 1.0f, 0.0f,
10
         0.0f, 0.0f, 0.0f, 1.0f
11
     };
12
-};
13
+}
14
 
15
 StGLMatrix::StGLMatrix() {
16
     initIdentity();
17
@@ -32,6 +32,29 @@
18
     return *this;
19
 }
20
 
21
+StGLMatrix::StGLMatrix(const StGLQuaternion& theQ) {
22
+    initIdentity();
23
+
24
+    float wx, wy, wz, xx, yy, yz, xy, xz, zz, x2, y2, z2;
25
+    float s = 2.0f / theQ.vec4().squareModulus();
26
+    x2 = theQ.x() * s;    y2 = theQ.y() * s;    z2 = theQ.z() * s;
27
+    xx = theQ.x() * x2;   xy = theQ.x() * y2;   xz = theQ.x() * z2;
28
+    yy = theQ.y() * y2;   yz = theQ.y() * z2;   zz = theQ.z() * z2;
29
+    wx = theQ.w() * x2;   wy = theQ.w() * y2;   wz = theQ.w() * z2;
30
+
31
+    changeValue(0, 0) = 1.0f - (yy + zz);
32
+    changeValue(0, 1) = xy - wz;
33
+    changeValue(0, 2) = xz + wy;
34
+
35
+    changeValue(1, 0) = xy + wz;
36
+    changeValue(1, 1) = 1.0f - (xx + zz);
37
+    changeValue(1, 2) = yz - wx;
38
+
39
+    changeValue(2, 0) = xz - wy;
40
+    changeValue(2, 1) = yz + wx;
41
+    changeValue(2, 2) = 1.0f - (xx + yy);
42
+}
43
+
44
 StGLMatrix::~StGLMatrix() {
45
     //
46
 }
47
sview-15_08.tar.gz/StShared/StGLTexture.cpp -> sview-15_10.tar.gz/StShared/StGLTexture.cpp Changed
71
 
1
@@ -564,7 +564,7 @@
2
     theCtx.core20fwd->glPixelStorei(GL_UNPACK_ALIGNMENT, GLint(anAligment));
3
 
4
     bool toBatchCopy = theData.getSizeX() <= size_t(getSizeX())
5
-                    && theBatchRows > 1;
6
+                    && theBatchRows != 1;
7
 
8
     size_t anExtraBytes       = theData.getRowExtraBytes();
9
     size_t aPixelsWidth       = theData.getSizeRowBytes() / theData.getSizePixelBytes();
10
@@ -576,42 +576,42 @@
11
         toBatchCopy  = false;
12
     }
13
 
14
-#if defined(GL_ES_VERSION_2_0)
15
-    if(anExtraBytes >= anAligment) {
16
+    if(!theCtx.hasUnpack
17
+    && anExtraBytes >= anAligment) {
18
         toBatchCopy = false;
19
     }
20
-#endif
21
+
22
     if(toBatchCopy) {
23
-    #if !defined(GL_ES_VERSION_2_0)
24
-        // notice that GL_UNPACK_ROW_LENGTH is not available on OpenGL ES 2.0 without GL_EXT_unpack_subimage extension!
25
-        theCtx.core20fwd->glPixelStorei(GL_UNPACK_ROW_LENGTH, GLint(aPixelsWidth));
26
-    #endif
27
+        if(theCtx.hasUnpack) {
28
+            theCtx.core20fwd->glPixelStorei(GL_UNPACK_ROW_LENGTH, GLint(aPixelsWidth));
29
+        }
30
 
31
         // do batch copy (more effective)
32
         GLsizei aPatchWidth = GLsizei(theData.getSizeX());
33
-        GLsizei aBatchRows = theBatchRows;
34
-        for(GLsizei aRow(theRowFrom), aRowsRemain(aRowTo); aRow < aRowTo; aRow += theBatchRows) {
35
+        GLsizei aBatchRows  = theBatchRows >= 1 ? theBatchRows : (aRowTo - theRowFrom);
36
+        GLsizei aNbRows     = aBatchRows;
37
+        for(GLsizei aRow(theRowFrom), aRowsRemain(aRowTo); aRow < aRowTo; aRow += aBatchRows) {
38
             aRowsRemain = aRowTo - aRow;
39
-            if(aRowsRemain < aBatchRows) {
40
-                aBatchRows = aRowsRemain;
41
+            if(aNbRows > aRowsRemain) {
42
+                aNbRows = aRowsRemain;
43
             }
44
 
45
             theCtx.core20fwd->glTexSubImage2D(theTarget, 0,     // 0 = LOD number
46
                                               0, aRow,          // a texel offset in the (x, y) direction
47
-                                              aPatchWidth, aBatchRows,
48
+                                              aPatchWidth, aNbRows,
49
                                               aPixelFormat,     // format of the pixel data
50
                                               aDataType,        // data type of the pixel data
51
                                               theData.getData(aRow, 0));
52
         }
53
 
54
-    #if !defined(GL_ES_VERSION_2_0)
55
-        theCtx.core20fwd->glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
56
-    #endif
57
+        if(theCtx.hasUnpack) {
58
+            theCtx.core20fwd->glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
59
+        }
60
     } else {
61
         // copy row by row copy (the image plane greater than texture or batch copy is impossible)
62
-    #if !defined(GL_ES_VERSION_2_0)
63
-        theCtx.core20fwd->glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
64
-    #endif
65
+        if(theCtx.hasUnpack) {
66
+            theCtx.core20fwd->glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
67
+        }
68
 
69
         GLsizei aPatchWidth = stMin(GLsizei(theData.getSizeX()), getSizeX());
70
         for(GLsizei aRow = theRowFrom; aRow < aRowTo; ++aRow) {
71
sview-15_08.tar.gz/StShared/StGLTextureData.cpp -> sview-15_10.tar.gz/StShared/StGLTextureData.cpp Changed
101
 
1
@@ -300,6 +300,31 @@
2
     return aBufferSize;
3
 }
4
 
5
+/**
6
+ * Determine packed cubemap format (6:1 or 3:2).
7
+ */
8
+inline bool checkCubeMap(const StImagePlane& thePlane,
9
+                         size_t&             theCoeffX,
10
+                         size_t&             theCoeffY) {
11
+    if(thePlane.isNull()) {
12
+        return true;
13
+    }
14
+
15
+    if(theCoeffX == 0) {
16
+        if(thePlane.getSizeX() / 6 == thePlane.getSizeY()) {
17
+            theCoeffX = 6;
18
+            theCoeffY = 1;
19
+            return true;
20
+        } else if(thePlane.getSizeX() / 3 == thePlane.getSizeY() / 2) {
21
+            theCoeffX = 3;
22
+            theCoeffY = 2;
23
+            return true;
24
+        }
25
+        return false;
26
+    }
27
+    return thePlane.getSizeX() / theCoeffX == thePlane.getSizeY() / theCoeffY;
28
+}
29
+
30
 void StGLTextureData::updateData(const StImage&                  theDataL,
31
                                  const StImage&                  theDataR,
32
                                  const StHandle<StStereoParams>& theStParams,
33
@@ -400,10 +425,11 @@
34
         }
35
     }
36
     if(myCubemapFormat == StCubemap_Packed) {
37
+        size_t aCoeffs[2] = {0, 0};
38
         if(!myDataL.isNull()) {
39
             for(size_t aPlaneId = 0; aPlaneId < 4; ++aPlaneId) {
40
                 const StImagePlane& aPlane = myDataL.getPlane(aPlaneId);
41
-                if(aPlane.getSizeX() / 6 != aPlane.getSizeY()) {
42
+                if(!checkCubeMap(aPlane, aCoeffs[0], aCoeffs[1])) {
43
                     myCubemapFormat = StCubemap_OFF;
44
                     break;
45
                 }
46
@@ -412,7 +438,7 @@
47
         if(!myDataR.isNull()) {
48
             for(size_t aPlaneId = 0; aPlaneId < 4; ++aPlaneId) {
49
                 const StImagePlane& aPlane = myDataR.getPlane(aPlaneId);
50
-                if(aPlane.getSizeX() / 6 != aPlane.getSizeY()) {
51
+                if(!checkCubeMap(aPlane, aCoeffs[0], aCoeffs[1])) {
52
                     myCubemapFormat = StCubemap_OFF;
53
                     break;
54
                 }
55
@@ -433,8 +459,13 @@
56
         return;
57
     }
58
 
59
-    size_t aPatchX = theData.getSizeX() / 6;
60
-    if(aPatchX < 2) {
61
+    size_t aCoeffs[2] = {0, 0};
62
+    if(!checkCubeMap(theData, aCoeffs[0], aCoeffs[1])) {
63
+        return;
64
+    }
65
+
66
+    const size_t aPatch = theData.getSizeX() / aCoeffs[0];
67
+    if(aPatch < 2) {
68
         return;
69
     }
70
 
71
@@ -446,8 +477,11 @@
72
                                  GL_TEXTURE_CUBE_MAP_NEGATIVE_Z };
73
     for(size_t aTargetIter = 0; aTargetIter < 6; ++aTargetIter) {
74
         StImagePlane aPlane;
75
-        if(!aPlane.initWrapper(theData.getFormat(), const_cast<GLubyte* >(theData.getData(0, aPatchX * aTargetIter)),
76
-                               aPatchX, theData.getSizeY(), theData.getSizeRowBytes())) {
77
+        const bool isSecondRow = (aCoeffs[1] == 2 && aTargetIter >= 3);
78
+        const size_t aLeft = isSecondRow ? (aPatch * (aTargetIter - 3)) : (aPatch * aTargetIter);
79
+        const size_t aTop  = isSecondRow ? aPatch : 0;
80
+        if(!aPlane.initWrapper(theData.getFormat(), const_cast<GLubyte* >(theData.getData(aTop, aLeft)),
81
+                               aPatch, aPatch, theData.getSizeRowBytes())) {
82
             ST_DEBUG_LOG("StGLTextureData::fillTexture(). wrapping failure");
83
             continue;
84
         }
85
@@ -506,8 +540,14 @@
86
         GLsizei aSizeX  = (GLsizei )anImgPlane.getSizeX();
87
         GLsizei aSizeY  = (GLsizei )anImgPlane.getSizeY();
88
         if(theCubemap == StCubemap_Packed) {
89
+            size_t aCoeffs[2] = {0, 0};
90
+            if(!checkCubeMap(anImgPlane, aCoeffs[0], aCoeffs[1])) {
91
+                aTexture.release(theCtx);
92
+                continue;
93
+            }
94
             aTarget = GL_TEXTURE_CUBE_MAP;
95
-            aSizeX  = aSizeX / 6;
96
+            aSizeX  = aSizeX / GLsizei(aCoeffs[0]);
97
+            aSizeY  = aSizeY / GLsizei(aCoeffs[1]);
98
         }
99
         if(aSizeX < 1) {
100
             aTexture.release(theCtx);
101
sview-15_08.tar.gz/StShared/StPListImpl.mm -> sview-15_10.tar.gz/StShared/StPListImpl.mm Changed
64
 
1
@@ -1,5 +1,5 @@
2
 /**
3
- * Copyright © 2011-2014 Kirill Gavrilov
4
+ * Copyright © 2011-2015 Kirill Gavrilov
5
  *
6
  * Distributed under the Boost Software License, Version 1.0.
7
  * See accompanying file license-boost.txt or copy at
8
@@ -35,25 +35,32 @@
9
     return true;
10
 }
11
 
12
-bool StSettings::save() {
13
+bool StSettings::flush() {
14
+    if(!myToFlush) {
15
+        return true;
16
+    }
17
+
18
     StCocoaLocalPool aLocalPool;
19
     StCocoaString aPath(myFilePath);
20
     if([myDict writeToFile: aPath.toStringNs() atomically: NO] == NO) {
21
         ST_DEBUG_LOG("StConfig, failed write to " + myFilePath);
22
         return false;
23
     }
24
+
25
+    myToFlush = false;
26
     return true;
27
 }
28
 
29
 StSettings::StSettings(const StHandle<StResourceManager>& theResMgr,
30
                        const StString&                    theSettingsSet)
31
-: myDict(NULL){
32
+: myDict(NULL),
33
+  myToFlush(false) {
34
     myFilePath = theResMgr->getSettingsFolder() + theSettingsSet + ".plist";
35
     load();
36
 }
37
 
38
 StSettings::~StSettings() {
39
-    save();
40
+    flush();
41
     [myDict release];
42
 }
43
 
44
@@ -76,7 +83,8 @@
45
     NSNumber* aNumber = [[NSNumber alloc] initWithInt: theValue];
46
     [myDict setObject: aNumber forKey: aPath.toStringNs()];
47
     [aNumber release];
48
-    return save();
49
+    myToFlush = true;
50
+    return true;
51
 }
52
 
53
 bool StSettings::loadString(const StString& theParamPath,
54
@@ -98,7 +106,8 @@
55
     StCocoaString aPath(theParamPath);
56
     StCocoaString aValue(theValue);
57
     [myDict setObject: aValue.toStringNs() forKey: aPath.toStringNs()];
58
-    return save();
59
+    myToFlush = true;
60
+    return true;
61
 }
62
 
63
 #endif // __APPLE__
64
sview-15_08.tar.gz/StShared/StPlayList.cpp -> sview-15_10.tar.gz/StShared/StPlayList.cpp Changed
27
 
1
@@ -159,7 +159,7 @@
2
   myLast(NULL),
3
   myCurrent(NULL),
4
   myItemsCount(0),
5
-  myDefStParams(StStereoParams::FLAT_IMAGE),
6
+  myDefStParams(),
7
   myPlayedCount(0),
8
   myRecursionDeep(theRecursionDeep),
9
   myIsShuffle(false),
10
@@ -866,6 +866,16 @@
11
     }
12
 }
13
 
14
+void StPlayList::currentToRecent() {
15
+    StMutexAuto anAutoLock(myMutex);
16
+    if( myCurrent == NULL
17
+    || !myPlsFile.isNull()) {
18
+        return;
19
+    }
20
+
21
+    addRecentFile(*myCurrent->getFileNode());
22
+}
23
+
24
 const StHandle<StPlayList::StRecentItem>& StPlayList::addRecentFile(const StFileNode& theFile,
25
                                                                     const bool        theToFront) {
26
     // remove duplicates
27
sview-15_08.tar.gz/StShared/StRegisterImpl.cpp -> sview-15_10.tar.gz/StShared/StRegisterImpl.cpp Changed
33
 
1
@@ -1,5 +1,5 @@
2
 /**
3
- * Copyright © 2007-2014 Kirill Gavrilov
4
+ * Copyright © 2007-2015 Kirill Gavrilov
5
  *
6
  * Distributed under the Boost Software License, Version 1.0.
7
  * See accompanying file license-boost.txt or copy at
8
@@ -56,7 +56,8 @@
9
 StSettings::StSettings(const StHandle<StResourceManager>& /*theResMgr*/,
10
                        const StString&                    theSettingsSet)
11
 : mySettingsSet(theSettingsSet.toUtfWide()),
12
-  myRegisterPath(StStringUtfWide("SOFTWARE\\sView\\") + theSettingsSet.toUtfWide()) {
13
+  myRegisterPath(StStringUtfWide("SOFTWARE\\sView\\") + theSettingsSet.toUtfWide()),
14
+  myToFlush(false) {
15
     //
16
 }
17
 
18
@@ -64,6 +65,14 @@
19
     //
20
 }
21
 
22
+bool StSettings::load() {
23
+    return true; // has no effect
24
+}
25
+
26
+bool StSettings::flush() {
27
+    return true; // has no effect
28
+}
29
+
30
 bool StSettings::loadInt32(const StString& theParam,
31
                            int32_t&        theValue) {
32
     StRegKey aKey;
33
sview-15_08.tar.gz/StShared/StResourceManager.cpp -> sview-15_10.tar.gz/StShared/StResourceManager.cpp Changed
79
 
1
@@ -1,5 +1,5 @@
2
 /**
3
- * Copyright © 2014 Kirill Gavrilov <kirill@sview.ru>
4
+ * Copyright © 2014-2015 Kirill Gavrilov <kirill@sview.ru>
5
  *
6
  * Distributed under the Boost Software License, Version 1.0.
7
  * See accompanying file license-boost.txt or copy at
8
@@ -100,6 +100,11 @@
9
         const GUID THE_FOLDER_APPROA = { 0x3EB685DB, 0x65F9, 0x4CF6, {0xA0, 0x3A, 0xE3, 0xEF, 0x65, 0x72, 0x9F, 0x3D} }; // FOLDERID_RoamingAppData
10
         const GUID THE_FOLDER_DOCS   = { 0xFDD39AD0, 0x238F, 0x46AF, {0xAD, 0xB4, 0x6C, 0x85, 0x48, 0x03, 0x69, 0xC7} }; // FOLDERID_Documents
11
 
12
+        const GUID THE_FOLDER_DOWN   = { 0x374DE290, 0x123F, 0x4565, {0x91, 0x64, 0x39, 0xC4, 0x92, 0x5E, 0x46, 0x7B} }; // FOLDERID_Downloads
13
+        const GUID THE_FOLDER_PICS   = { 0x33E28130, 0x4E1E, 0x4676, {0x83, 0x5A, 0x98, 0x39, 0x5C, 0x3B, 0xC3, 0xBB} }; // FOLDERID_Pictures
14
+        const GUID THE_FOLDER_MUSIC  = { 0x4BD8D571, 0x6D19, 0x48D3, {0xBE, 0x97, 0x42, 0x22, 0x20, 0x08, 0x0E, 0x43} }; // FOLDERID_Music
15
+        const GUID THE_FOLDER_VIDS   = { 0x18989B1D, 0x99B5, 0x455B, {0x84, 0x1C, 0xAB, 0x7C, 0x74, 0xE4, 0xDD, 0xFC} }; // FOLDERID_Videos
16
+
17
         if(aGetFolder(&THE_FOLDER_APPLOC, 0, NULL, &aPath) == S_OK) {
18
             anAppDataLocal.fromUnicode(aPath);
19
             ::CoTaskMemFree(aPath);
20
@@ -117,6 +122,23 @@
21
             myUserHomeFolder += "\\";
22
             ::CoTaskMemFree(aPath);
23
         }
24
+
25
+        if(aGetFolder(&THE_FOLDER_DOWN, 0, NULL, &aPath) == S_OK) {
26
+            myFolders[FolderId_Downloads].fromUnicode(aPath);
27
+            ::CoTaskMemFree(aPath);
28
+        }
29
+        if(aGetFolder(&THE_FOLDER_PICS, 0, NULL, &aPath) == S_OK) {
30
+            myFolders[FolderId_Pictures].fromUnicode(aPath);
31
+            ::CoTaskMemFree(aPath);
32
+        }
33
+        if(aGetFolder(&THE_FOLDER_MUSIC, 0, NULL, &aPath) == S_OK) {
34
+            myFolders[FolderId_Music].fromUnicode(aPath);
35
+            ::CoTaskMemFree(aPath);
36
+        }
37
+        if(aGetFolder(&THE_FOLDER_VIDS, 0, NULL, &aPath) == S_OK) {
38
+            myFolders[FolderId_Videos].fromUnicode(aPath);
39
+            ::CoTaskMemFree(aPath);
40
+        }
41
     } else {
42
         wchar_t aPath[MAX_PATH];
43
         if(::SHGetFolderPathW(NULL, CSIDL_FLAG_CREATE | CSIDL_LOCAL_APPDATA, NULL, 0, aPath) == S_OK) {
44
@@ -154,6 +176,12 @@
45
     myUserDataFolder = myUserHomeFolder + "Library/Application Support/" + myAppName + "/";
46
     mySettingsFolder = myUserHomeFolder + "Library/Preferences/"         + myAppName + "/";
47
     myCacheFolder    = myUserHomeFolder + "Library/Caches/"              + myAppName + "/";
48
+
49
+    myFolders[FolderId_Downloads] = myUserHomeFolder + "Downloads";
50
+    myFolders[FolderId_Pictures]  = myUserHomeFolder + "Pictures";
51
+    myFolders[FolderId_Music]     = myUserHomeFolder + "Music";
52
+    myFolders[FolderId_Videos]    = myUserHomeFolder + "Movies";
53
+
54
     // make sure parent paths are also exist (on broken home)
55
     StFolder::createFolder(myUserHomeFolder + "Library");
56
     StFolder::createFolder(myUserHomeFolder + "Library/Application Support");
57
@@ -164,6 +192,12 @@
58
     myUserDataFolder = myUserHomeFolder + ".local/share/" + myAppName + "/";
59
     mySettingsFolder = myUserHomeFolder + ".config/"      + myAppName + "/";
60
     myCacheFolder    = myUserHomeFolder + ".cache/"       + myAppName + "/";
61
+
62
+    myFolders[FolderId_Downloads] = myUserHomeFolder + "Downloads";
63
+    myFolders[FolderId_Pictures]  = myUserHomeFolder + "Pictures";
64
+    myFolders[FolderId_Music]     = myUserHomeFolder + "Music";
65
+    myFolders[FolderId_Videos]    = myUserHomeFolder + "Videos";
66
+
67
     // make sure parent paths are also exist (on broken home)
68
     StFolder::createFolder(myUserHomeFolder + ".local");
69
     StFolder::createFolder(myUserHomeFolder + ".local/share");
70
@@ -192,6 +226,8 @@
71
         myLang = "ko";
72
     } else if(aSysLoc.isStartsWith(stCString("chinese"))) {
73
         myLang = "zh";
74
+    } else if(aSysLoc.isStartsWith(stCString("czech"))) {
75
+        myLang = "cs";
76
     }
77
 #endif
78
 }
79
sview-15_08.tar.gz/StShared/StShared.cbp -> sview-15_10.tar.gz/StShared/StShared.cbp Changed
17
 
1
@@ -265,6 +265,7 @@
2
        <Unit filename="StAVFrame.cpp" />
3
        <Unit filename="StAVImage.cpp" />
4
        <Unit filename="StAVPacket.cpp" />
5
+       <Unit filename="StAVVideoMuxer.cpp" />
6
        <Unit filename="StAction.cpp" />
7
        <Unit filename="StBndBox.cpp" />
8
        <Unit filename="StBndCameraBox.cpp" />
9
@@ -391,6 +392,7 @@
10
        <Unit filename="../include/StAV/StAVFrame.h" />
11
        <Unit filename="../include/StAV/StAVImage.h" />
12
        <Unit filename="../include/StAV/StAVPacket.h" />
13
+       <Unit filename="../include/StAV/StAVVideoMuxer.h" />
14
        <Unit filename="../include/StAV/stAV.h" />
15
        <Unit filename="../include/StAlienData.h" />
16
        <Unit filename="../include/StCocoa/StCocoaCoords.h">
17
sview-15_08.tar.gz/StShared/StShared.vcxproj -> sview-15_10.tar.gz/StShared/StShared.vcxproj Changed
9
 
1
@@ -209,6 +209,7 @@
2
     <ClCompile Include="StAVFrame.cpp" />
3
     <ClCompile Include="StAVImage.cpp" />
4
     <ClCompile Include="StAVPacket.cpp" />
5
+    <ClCompile Include="StAVVideoMuxer.cpp" />
6
     <ClCompile Include="StAction.cpp" />
7
     <ClCompile Include="StBndBox.cpp" />
8
     <ClCompile Include="StBndCameraBox.cpp" />
9
sview-15_08.tar.gz/StShared/StTranslations.cpp -> sview-15_10.tar.gz/StShared/StTranslations.cpp Changed
33
 
1
@@ -69,6 +69,10 @@
2
             params.language->changeValues().add("한국어");
3
             myLangFolderList.add("Korean");
4
         }
5
+        if(myResMgr->isResourceExist(StString("lang" ST_FILE_SPLITTER "Czech"  ST_FILE_SPLITTER) + myModuleName + StTranslations::DEFAULT_SUFFIX)) {
6
+            params.language->changeValues().add("Čeština");
7
+            myLangFolderList.add("Czech");
8
+        }
9
     }
10
 #endif
11
 
12
@@ -113,6 +117,11 @@
13
                 params.language->setValue(int32_t(anIdInList));
14
                 isLangSet = true;
15
             }
16
+        } else if(aLang.isEqualsIgnoreCase(stCString("cs"))) {
17
+            if(myLangFolderList.contains(stCString("Čeština"), anIdInList)) {
18
+                params.language->setValue(int32_t(anIdInList));
19
+                isLangSet = true;
20
+            }
21
         }
22
     }
23
     if(!isLangSet) {
24
@@ -162,6 +171,8 @@
25
         myLangCode = "kor";
26
     } else if(aLang == stCString("简体中文")) {
27
         myLangCode = "chi";
28
+    } else if(aLang == stCString("Čeština")) {
29
+        myLangCode = "cze";
30
     } else if(aLang == stCString("English")) {
31
         myLangCode = "eng";
32
     } else {
33
sview-15_08.tar.gz/copy_res.bat -> sview-15_10.tar.gz/copy_res.bat Changed
17
 
1
@@ -11,6 +11,7 @@
2
 if not exist "%TARGET_OUTPUT_DIR%lang\Deutsch"  mkdir "%TARGET_OUTPUT_DIR%lang\Deutsch"
3
 if not exist "%TARGET_OUTPUT_DIR%lang\ChineseS" mkdir "%TARGET_OUTPUT_DIR%lang\ChineseS"
4
 if not exist "%TARGET_OUTPUT_DIR%lang\Korean"   mkdir "%TARGET_OUTPUT_DIR%lang\Korean"
5
+if not exist "%TARGET_OUTPUT_DIR%lang\Czech"    mkdir "%TARGET_OUTPUT_DIR%lang\Czech"
6
 
7
 copy /Y lang\english\* "%TARGET_OUTPUT_DIR%lang\English\"
8
 copy /Y lang\russian\* "%TARGET_OUTPUT_DIR%lang\русский\"
9
@@ -18,6 +19,7 @@
10
 copy /Y lang\german\*  "%TARGET_OUTPUT_DIR%lang\Deutsch\"
11
 copy /Y lang\chinese\* "%TARGET_OUTPUT_DIR%lang\ChineseS\"
12
 copy /Y lang\korean\*  "%TARGET_OUTPUT_DIR%lang\Korean\"
13
+copy /Y lang\czech\*   "%TARGET_OUTPUT_DIR%lang\Czech\"
14
 
15
 if exist "shaders" (
16
   if not exist "%TARGET_OUTPUT_DIR%shaders\%TARGET_OUTPUT_BASENAME%" mkdir "%TARGET_OUTPUT_DIR%shaders\%TARGET_OUTPUT_BASENAME%"
17
sview-15_08.tar.gz/copy_res.sh -> sview-15_10.tar.gz/copy_res.sh Changed
16
 
1
@@ -10,12 +10,14 @@
2
 mkdir -p "${TARGET_OUTPUT_DIR}lang/Deutsch/"
3
 mkdir -p "${TARGET_OUTPUT_DIR}lang/ChineseS/"
4
 mkdir -p "${TARGET_OUTPUT_DIR}lang/Korean/"
5
+mkdir -p "${TARGET_OUTPUT_DIR}lang/Czech/"
6
 cp -f -r lang/english/* "${TARGET_OUTPUT_DIR}lang/English/"
7
 cp -f -r lang/russian/* "${TARGET_OUTPUT_DIR}lang/русский/"
8
 cp -f -r lang/french/*  "${TARGET_OUTPUT_DIR}lang/français/"
9
 cp -f -r lang/german/*  "${TARGET_OUTPUT_DIR}lang/Deutsch/"
10
 cp -f -r lang/chinese/* "${TARGET_OUTPUT_DIR}lang/ChineseS/"
11
 cp -f -r lang/korean/*  "${TARGET_OUTPUT_DIR}lang/Korean/"
12
+cp -f -r lang/czech/*   "${TARGET_OUTPUT_DIR}lang/Czech/"
13
 
14
 if [ -d "shaders" ]; then
15
   mkdir -p "${TARGET_OUTPUT_DIR}shaders/${PROJECT_NAME}"
16
sview-15_08.tar.gz/debian/changelog.tmpl -> sview-15_10.tar.gz/debian/changelog.tmpl Changed
19
 
1
@@ -4,6 +4,17 @@
2
 
3
  -- Kirill Gavrilov <kirill@sview.ru>  unknown_date
4
 
5
+sview (unknown_version) unknown_distrib; urgency=low
6
+
7
+  + Support reading cubemaps in format 3:2 (two rows per 3 quad sides).
8
+  + Add panorama icon to toolbar.
9
+  + Add Czech translation files.
10
+  * Improve handling of recent files when file has been selected within automatically generated playlist.
11
+  * Add option to automatically workaround aspect ratio of anamorphic videos (turned on by default).
12
+  * Improve settings processing on Linux and Android - eliminate redundant file store/restore operations and add recovery for broken files.
13
+
14
+ -- Kirill Gavrilov <kirill@sview.ru>  Sun, 04 Oct 2015 19:52:13 +0300
15
+
16
 sview (15.08-1~unknown_distrib) unknown_distrib; urgency=low
17
 
18
   + Support Cubemap images (6 sides of the cube stacked horizontally).
19
sview-15_08.tar.gz/distribution/build.bat -> sview-15_10.tar.gz/distribution/build.bat Changed
40
 
1
@@ -26,6 +26,7 @@
2
 if exist "%~dp0env.bat" call "%~dp0env.bat"
3
 
4
 set YEAR=%date:~-2,4%
5
+set MONTH00=%date:~-7,2%
6
 set MONTH=%date:~-7,2%
7
 set DAY=%date:~0,2%
8
 
9
@@ -79,9 +80,9 @@
10
 echo   #define SVIEW_SDK_VERSION ^%YEAR%^, ^%MONTH%^, ^%SVIEW_VER_TYPE_NUM%^, ^%DAY%>> "%SVIEW_BUILD_CONF%"
11
 echo #endif>> "%SVIEW_BUILD_CONF%"
12
 
13
-echo     Version String="%YEAR%.%MONTH%%SVIEW_VER_TYPE%%DAY%"
14
+echo     Version String="%YEAR%.%MONTH00%%SVIEW_VER_TYPE%%DAY%"
15
 echo #ifndef SVIEW_SDK_VER_STRING>> "%SVIEW_BUILD_CONF%"
16
-echo   #define SVIEW_SDK_VER_STRING "%YEAR%.%MONTH%%SVIEW_VER_TYPE%%DAY%">> "%SVIEW_BUILD_CONF%"
17
+echo   #define SVIEW_SDK_VER_STRING "%YEAR%.%MONTH00%%SVIEW_VER_TYPE%%DAY%">> "%SVIEW_BUILD_CONF%"
18
 echo #endif>> "%SVIEW_BUILD_CONF%"
19
 
20
 rem Activate experimental WebP support
21
@@ -89,8 +90,8 @@
22
 
23
 rem Create configuration for InnoSetup build script
24
 echo #define SVIEW_VER      "%YEAR%.%MONTH%.%SVIEW_VER_TYPE_NUM%.%DAY%"> config.iss
25
-echo #define SVIEW_VER_FULL "v.%YEAR%.%MONTH%%SVIEW_VER_TYPE%%DAY%">> config.iss
26
-echo #define SVIEW_VER_NAME "sView (version %YEAR%.%MONTH%%SVIEW_VER_TYPE%%DAY%)">> config.iss
27
+echo #define SVIEW_VER_FULL "v.%YEAR%.%MONTH00%%SVIEW_VER_TYPE%%DAY%">> config.iss
28
+echo #define SVIEW_VER_NAME "sView (version %YEAR%.%MONTH00%%SVIEW_VER_TYPE%%DAY%)">> config.iss
29
 echo #define SVIEW_DISTR_PATH_x86   "%SVIEW_DISTR_PATH_X86%">> config.iss
30
 echo #define SVIEW_DISTR_PATH_AMD64 "%SVIEW_DISTR_PATH_AMD64%">> config.iss
31
 
32
@@ -129,6 +130,7 @@
33
 
34
 rem shared resources
35
 xcopy /Y ..\share\sView\demo\demo.jps       %SVIEW_DISTR_PATH_X86%\
36
+xcopy /Y ..\share\sView\demo\demo_robot.jps %SVIEW_DISTR_PATH_X86%\
37
 xcopy /S /Y ..\bin\WIN_vc_x86\lang\*        %SVIEW_DISTR_PATH_X86%\lang\
38
 xcopy /S /Y ..\bin\WIN_vc_x86\shaders\*     %SVIEW_DISTR_PATH_X86%\shaders\
39
 xcopy /Y ..\bin\WIN_vc_x86\textures\*       %SVIEW_DISTR_PATH_X86%\textures\
40
sview-15_08.tar.gz/distribution/build.iss -> sview-15_10.tar.gz/distribution/build.iss Changed
66
 
1
@@ -1,4 +1,4 @@
2
-
3
+
4
 #include "temp\config.iss"
5
 
6
 ; Should be defined in config file
7
@@ -169,6 +169,7 @@
8
 Source: {#SVIEW_DISTR_PATH_x86}\shaders\StGLWidgets\*;         DestDir: {app}\shaders\StGLWidgets;       Flags: 32bit ignoreversion; Components: StCore
9
 Source: {#SVIEW_DISTR_PATH_x86}\lang\Korean\language.lng;      DestDir: {app}\lang\Korean;               Flags: 32bit ignoreversion; Components: StCore
10
 Source: {#SVIEW_DISTR_PATH_x86}\lang\ChineseS\language.lng;    DestDir: {app}\lang\ChineseS;             Flags: 32bit ignoreversion; Components: StCore
11
+Source: {#SVIEW_DISTR_PATH_x86}\lang\Czech\language.lng;       DestDir: {app}\lang\Czech;                Flags: 32bit ignoreversion; Components: StCore
12
 ; MSVC C-Runtime libraries (mask compatible for vc100)
13
 Source: {#SVIEW_DISTR_PATH_x86}\msvc*.dll;        DestDir: {app};        Flags: 32bit ignoreversion; Components: StCore
14
 Source: {#SVIEW_DISTR_PATH_AMD64}\msvc*.dll;      DestDir: {app}\amd64;  Flags: 64bit ignoreversion; Components: StCore; Check: IsWin64
15
@@ -224,6 +225,7 @@
16
 Source: {#SVIEW_DISTR_PATH_x86}\icons\sView_JPS.ico;           DestDir: {app}\icons;           Flags: 32bit ignoreversion; Components: StDrawers\StImageViewer
17
 Source: {#SVIEW_DISTR_PATH_x86}\icons\sView_PNS.ico;           DestDir: {app}\icons;           Flags: 32bit ignoreversion; Components: StDrawers\StImageViewer
18
 Source: {#SVIEW_DISTR_PATH_x86}\demo.jps;                      DestDir: {app};                 Flags: 32bit ignoreversion; Components: StDrawers\StImageViewer
19
+Source: {#SVIEW_DISTR_PATH_x86}\demo_robot.jps;                DestDir: {app};                 Flags: 32bit ignoreversion; Components: StDrawers\StImageViewer
20
 Source: {#SVIEW_DISTR_PATH_AMD64}\StImageViewer.dll;           DestDir: {app}\amd64;           Flags: 64bit ignoreversion; Components: StCore; Check: IsWin64
21
 ; FreeImage library (should be optional)
22
 Source: {#SVIEW_DISTR_PATH_x86}\FreeImage.dll;                 DestDir: {app};                 Flags: 32bit ignoreversion; Components: StDrawers\StImageViewer
23
@@ -311,12 +313,16 @@
24
 
25
 Root: HKCR; SubKey: .bmp;                                      ValueType: string; ValueData: sView Image;                   Tasks: flagAssocImages;       Flags: uninsdeletekey
26
 Root: HKCR; SubKey: .jpg;                                      ValueType: string; ValueData: sView Image;                   Tasks: flagAssocImages;       Flags: uninsdeletekey
27
+Root: HKCR; SubKey: .j2k;                                      ValueType: string; ValueData: sView Image;                   Tasks: flagAssocImages;       Flags: uninsdeletekey
28
+Root: HKCR; SubKey: .jp2;                                      ValueType: string; ValueData: sView Image;                   Tasks: flagAssocImages;       Flags: uninsdeletekey
29
 Root: HKCR; SubKey: .tga;                                      ValueType: string; ValueData: sView Image;                   Tasks: flagAssocImages;       Flags: uninsdeletekey
30
 Root: HKCR; SubKey: .png;                                      ValueType: string; ValueData: sView Image;                   Tasks: flagAssocImages;       Flags: uninsdeletekey
31
 Root: HKCR; SubKey: .exr;                                      ValueType: string; ValueData: sView Image;                   Tasks: flagAssocImages;       Flags: uninsdeletekey
32
 Root: HKCR; SubKey: .hdr;                                      ValueType: string; ValueData: sView Image;                   Tasks: flagAssocImages;       Flags: uninsdeletekey
33
 Root: HKCR; SubKey: .webp;                                     ValueType: string; ValueData: sView Image;                   Tasks: flagAssocImages;       Flags: uninsdeletekey
34
 Root: HKCR; SubKey: .webpll;                                   ValueType: string; ValueData: sView Image;                   Tasks: flagAssocImages;       Flags: uninsdeletekey
35
+Root: HKCR; SubKey: .tif;                                      ValueType: string; ValueData: sView Image;                   Tasks: flagAssocImages;       Flags: uninsdeletekey
36
+Root: HKCR; SubKey: .tiff;                                     ValueType: string; ValueData: sView Image;                   Tasks: flagAssocImages;       Flags: uninsdeletekey
37
 
38
 ; Associations Video
39
 Root: HKCR; SubKey: sView Video;                               ValueType: string; ValueData: sView Video;                   Tasks: flagAssocMovies; Flags: uninsdeletekey
40
@@ -330,6 +336,17 @@
41
 Root: HKCR; SubKey: .webm;                                     ValueType: string; ValueData: sView Video;                   Tasks: flagAssocMovies; Flags: uninsdeletekey
42
 Root: HKCR; SubKey: .wmv;                                      ValueType: string; ValueData: sView Video;                   Tasks: flagAssocMovies; Flags: uninsdeletekey
43
 Root: HKCR; SubKey: .ts;                                       ValueType: string; ValueData: sView Video;                   Tasks: flagAssocMovies; Flags: uninsdeletekey
44
+Root: HKCR; SubKey: .mts;                                      ValueType: string; ValueData: sView Video;                   Tasks: flagAssocMovies; Flags: uninsdeletekey
45
+Root: HKCR; SubKey: .m2ts;                                     ValueType: string; ValueData: sView Video;                   Tasks: flagAssocMovies; Flags: uninsdeletekey
46
+Root: HKCR; SubKey: .mt2s;                                     ValueType: string; ValueData: sView Video;                   Tasks: flagAssocMovies; Flags: uninsdeletekey
47
+Root: HKCR; SubKey: .vob;                                      ValueType: string; ValueData: sView Video;                   Tasks: flagAssocMovies; Flags: uninsdeletekey
48
+Root: HKCR; SubKey: .mp4;                                      ValueType: string; ValueData: sView Video;                   Tasks: flagAssocMovies; Flags: uninsdeletekey
49
+Root: HKCR; SubKey: .mpg;                                      ValueType: string; ValueData: sView Video;                   Tasks: flagAssocMovies; Flags: uninsdeletekey
50
+Root: HKCR; SubKey: .flv;                                      ValueType: string; ValueData: sView Video;                   Tasks: flagAssocMovies; Flags: uninsdeletekey
51
+Root: HKCR; SubKey: .mov;                                      ValueType: string; ValueData: sView Video;                   Tasks: flagAssocMovies; Flags: uninsdeletekey
52
+Root: HKCR; SubKey: .ogm;                                      ValueType: string; ValueData: sView Video;                   Tasks: flagAssocMovies; Flags: uninsdeletekey
53
+Root: HKCR; SubKey: .bik;                                      ValueType: string; ValueData: sView Video;                   Tasks: flagAssocMovies; Flags: uninsdeletekey
54
+Root: HKCR; SubKey: .mj2;                                      ValueType: string; ValueData: sView Video;                   Tasks: flagAssocMovies; Flags: uninsdeletekey
55
 
56
 ; Associations Audio
57
 Root: HKCR; SubKey: sView Audio;                               ValueType: string; ValueData: sView Audio;                   Tasks: flagAssocMusic;  Flags: uninsdeletekey
58
@@ -345,6 +362,7 @@
59
 Root: HKCR; SubKey: .wav;                                      ValueType: string; ValueData: sView Audio;                   Tasks: flagAssocMusic;  Flags: uninsdeletekey
60
 Root: HKCR; SubKey: .flac;                                     ValueType: string; ValueData: sView Audio;                   Tasks: flagAssocMusic;  Flags: uninsdeletekey
61
 Root: HKCR; SubKey: .ape;                                      ValueType: string; ValueData: sView Audio;                   Tasks: flagAssocMusic;  Flags: uninsdeletekey
62
+Root: HKCR; SubKey: .mka;                                      ValueType: string; ValueData: sView Audio;                   Tasks: flagAssocMusic;  Flags: uninsdeletekey
63
 
64
 ; StCoreXX environment variables
65
 Root: HKLM32; SubKey: SYSTEM\CurrentControlSet\Control\Session Manager\Environment; ValueType: string; ValueName: StShare;  ValueData: {app}\; Flags: uninsdeletevalue
66
sview-15_10.tar.gz/distribution/media/sView_Logo.svg Added
201
 
1
@@ -0,0 +1,746 @@
2
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
3
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
4
+
5
+<svg
6
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
7
+   xmlns:cc="http://creativecommons.org/ns#"
8
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
9
+   xmlns:svg="http://www.w3.org/2000/svg"
10
+   xmlns="http://www.w3.org/2000/svg"
11
+   xmlns:xlink="http://www.w3.org/1999/xlink"
12
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
13
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
14
+   width="128"
15
+   height="128"
16
+   id="svg3214"
17
+   version="1.1"
18
+   inkscape:version="0.91 r13725"
19
+   sodipodi:docname="sView_Logo.svg"
20
+   inkscape:export-filename="sView_Logo.png"
21
+   inkscape:export-xdpi="720"
22
+   inkscape:export-ydpi="720">
23
+  <defs
24
+     id="defs3216">
25
+    <linearGradient
26
+       y2="20.731297"
27
+       x2="27.375"
28
+       y1="31.77206"
29
+       x1="28.029287"
30
+       gradientUnits="userSpaceOnUse"
31
+       id="linearGradient5820"
32
+       xlink:href="#linearGradient6234"
33
+       inkscape:collect="always" />
34
+    <filter
35
+       id="filter5737"
36
+       height="1.4385543"
37
+       y="-0.21927714"
38
+       width="1.3626142"
39
+       x="-0.18130708"
40
+       inkscape:collect="always"
41
+       style="color-interpolation-filters:sRGB">
42
+      <feGaussianBlur
43
+         id="feGaussianBlur5739"
44
+         stdDeviation="2.1813507"
45
+         inkscape:collect="always" />
46
+    </filter>
47
+    <filter
48
+       id="filter5729"
49
+       height="2.4825463"
50
+       y="-0.74127316"
51
+       width="1.3227895"
52
+       x="-0.16139475"
53
+       inkscape:collect="always"
54
+       style="color-interpolation-filters:sRGB">
55
+      <feGaussianBlur
56
+         id="feGaussianBlur5731"
57
+         stdDeviation="2.1813507"
58
+         inkscape:collect="always" />
59
+    </filter>
60
+    <linearGradient
61
+       inkscape:collect="always"
62
+       id="linearGradient6234">
63
+      <stop
64
+         style="stop-color:#ffffff;stop-opacity:1;"
65
+         offset="0"
66
+         id="stop6236" />
67
+      <stop
68
+         style="stop-color:#ffffff;stop-opacity:0;"
69
+         offset="1"
70
+         id="stop6238" />
71
+    </linearGradient>
72
+    <linearGradient
73
+       id="linearGradient4467-1">
74
+      <stop
75
+         id="stop4469-8"
76
+         style="stop-color:#ffffff;stop-opacity:1;"
77
+         offset="0" />
78
+      <stop
79
+         id="stop4471-9"
80
+         style="stop-color:#ffffff;stop-opacity:0.24761905;"
81
+         offset="1.0000000" />
82
+    </linearGradient>
83
+    <radialGradient
84
+       gradientTransform="matrix(0.617019,0,0,0.617019,9.054796,7.969543)"
85
+       cx="25.0527"
86
+       cy="39.5928"
87
+       gradientUnits="userSpaceOnUse"
88
+       fy="39.5928"
89
+       fx="25.0527"
90
+       id="aigrd2-2-3"
91
+       r="15.7572">
92
+      <stop
93
+         id="stop8602-3"
94
+         style="stop-color:#777777;stop-opacity:1.0000000;"
95
+         offset="0.0000000" />
96
+      <stop
97
+         id="stop8604-3"
98
+         style="stop-color:#000000"
99
+         offset="1" />
100
+    </radialGradient>
101
+    <linearGradient
102
+       id="linearGradient3290-6">
103
+      <stop
104
+         id="stop3292-0"
105
+         style="stop-color:#fffcde;stop-opacity:1.0000000;"
106
+         offset="0.0000000" />
107
+      <stop
108
+         id="stop3294-4"
109
+         style="stop-color:#f6e76a;stop-opacity:1.0000000;"
110
+         offset="0.64485979" />
111
+      <stop
112
+         id="stop3296-8"
113
+         style="stop-color:#ffb738;stop-opacity:1.0000000;"
114
+         offset="1.0000000" />
115
+    </linearGradient>
116
+    <linearGradient
117
+       inkscape:collect="always"
118
+       id="linearGradient4565-8">
119
+      <stop
120
+         id="stop4567-9"
121
+         style="stop-color:#000000;stop-opacity:1;"
122
+         offset="0" />
123
+      <stop
124
+         id="stop4569-7"
125
+         style="stop-color:#000000;stop-opacity:0;"
126
+         offset="1" />
127
+    </linearGradient>
128
+    <filter
129
+       inkscape:collect="always"
130
+       id="filter78486-7"
131
+       style="color-interpolation-filters:sRGB">
132
+      <feGaussianBlur
133
+         inkscape:collect="always"
134
+         id="feGaussianBlur78488-6"
135
+         stdDeviation="0.246274" />
136
+    </filter>
137
+    <filter
138
+       inkscape:collect="always"
139
+       id="filter78694-4"
140
+       style="color-interpolation-filters:sRGB">
141
+      <feGaussianBlur
142
+         inkscape:collect="always"
143
+         id="feGaussianBlur78696-3"
144
+         stdDeviation="0.84984893" />
145
+    </filter>
146
+    <filter
147
+       inkscape:collect="always"
148
+       height="1.2604995"
149
+       x="-0.046955407"
150
+       y="-0.13024975"
151
+       width="1.0939108"
152
+       id="filter78638-0"
153
+       style="color-interpolation-filters:sRGB">
154
+      <feGaussianBlur
155
+         inkscape:collect="always"
156
+         id="feGaussianBlur78640-3"
157
+         stdDeviation="1.1747766" />
158
+    </filter>
159
+    <filter
160
+       inkscape:collect="always"
161
+       id="filter78450-0"
162
+       style="color-interpolation-filters:sRGB">
163
+      <feGaussianBlur
164
+         inkscape:collect="always"
165
+         id="feGaussianBlur78452-9"
166
+         stdDeviation="0.39648414" />
167
+    </filter>
168
+    <radialGradient
169
+       gradientTransform="matrix(1.158233,-0.08160287,0.05119299,1.1715514,-36.462915,48.248828)"
170
+       cx="134.13086"
171
+       cy="81.594727"
172
+       gradientUnits="userSpaceOnUse"
173
+       fy="81.594727"
174
+       fx="134.13086"
175
+       id="XMLID_55_-5"
176
+       r="95.281982">
177
+      <stop
178
+         id="stop382-4"
179
+         style="stop-color:#0099ff;stop-opacity:1.0000000;"
180
+         offset="0.0056179999" />
181
+      <stop
182
+         id="stop384-0"
183
+         style="stop-color:#0066cc;stop-opacity:1.0000000;"
184
+         offset="0.39887601" />
185
+      <stop
186
+         id="stop386-5"
187
+         style="stop-color:#00008d;stop-opacity:1.0000000;"
188
+         offset="1.0000000" />
189
+    </radialGradient>
190
+    <radialGradient
191
+       gradientTransform="matrix(1.158233,-0.08160287,0.05119299,1.1715514,-36.462915,48.248828)"
192
+       cx="138.71191"
193
+       cy="128.80225"
194
+       gradientUnits="userSpaceOnUse"
195
+       fy="128.80225"
196
+       fx="138.71191"
197
+       id="XMLID_54_-4"
198
+       r="103.02309">
199
+      <stop
200
+         id="stop361-6"
201
sview-15_10.tar.gz/include/StAV/StAVVideoMuxer.h Added
104
 
1
@@ -0,0 +1,102 @@
2
+/**
3
+ * Copyright © 2015 Kirill Gavrilov <kirill@sview.ru>
4
+ *
5
+ * Distributed under the Boost Software License, Version 1.0.
6
+ * See accompanying file license-boost.txt or copy at
7
+ * http://www.boost.org/LICENSE_1_0.txt
8
+ */
9
+
10
+#ifndef __StAVVideoMuxer_h_
11
+#define __StAVVideoMuxer_h_
12
+
13
+#include <StGLStereo/StFormatEnum.h>
14
+#include <StSlots/StSignal.h>
15
+#include <StTemplates/StArrayList.h>
16
+
17
+struct AVFormatContext;
18
+struct AVCodecContext;
19
+struct AVCodec;
20
+struct AVFrame;
21
+struct AVStream;
22
+
23
+/**
24
+ * This class implements video re-muxing operation using libav* libraries.
25
+ */
26
+class StAVVideoMuxer {
27
+
28
+        protected:
29
+
30
+    struct StRemuxContext {
31
+        AVFormatContext*          Context;
32
+        bool                      State;
33
+        StArrayList<unsigned int> Streams;
34
+
35
+        StRemuxContext() : Context(NULL), State(true) {}
36
+    };
37
+
38
+        public:
39
+
40
+    /**
41
+     * Initialize empty image.
42
+     */
43
+    ST_CPPEXPORT StAVVideoMuxer();
44
+
45
+    /**
46
+     * Destructor.
47
+     */
48
+    ST_CPPEXPORT virtual ~StAVVideoMuxer();
49
+
50
+    /**
51
+     * Close currently opened files.
52
+     */
53
+    ST_CPPEXPORT void close();
54
+
55
+    /**
56
+     * Return stereo format.
57
+     */
58
+    ST_LOCAL StFormat getStereoFormat() const { return myStereoFormat; }
59
+
60
+    /**
61
+     * Set stereo format.
62
+     */
63
+    ST_LOCAL void setStereoFormat(const StFormat theStereoFormat) { myStereoFormat = theStereoFormat; }
64
+
65
+    /**
66
+     * Add input file.
67
+     */
68
+    ST_CPPEXPORT bool addFile(const StString& theFileToLoad);
69
+
70
+    /**
71
+     * Save to the file.
72
+     */
73
+    ST_CPPEXPORT virtual bool save(const StString& theFile);
74
+
75
+        public: //! @name signals
76
+
77
+    /**
78
+     * All callback handlers should be thread-safe.
79
+     */
80
+    struct {
81
+        /**
82
+         * Emit callback Slot on error.
83
+         * @param theUserData (const StString& ) - error description.
84
+         */
85
+        StSignal<void (const StCString& )> onError;
86
+    } signals;
87
+
88
+        protected:
89
+
90
+    /**
91
+     * Create output stream from input stream.
92
+     */
93
+    ST_CPPEXPORT bool addStream(AVFormatContext* theContext,
94
+                                const AVStream*  theStream);
95
+
96
+        private:
97
+
98
+    StArrayList<AVFormatContext*> myCtxListSrc;
99
+    StFormat                      myStereoFormat;
100
+
101
+};
102
+
103
+#endif // __StAVVideoMuxer_h_
104
sview-15_08.tar.gz/include/StAV/stAV.h -> sview-15_10.tar.gz/include/StAV/stAV.h Changed
13
 
1
@@ -21,8 +21,11 @@
2
 
3
     #include <libavcodec/avcodec.h>
4
     #include <libavformat/avformat.h>
5
+    #include <libavutil/avutil.h>
6
     #include <libswscale/swscale.h>
7
 
8
+    #include <libavutil/mathematics.h>
9
+
10
     // new stereoscopic info API
11
 #if(LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(52, 56, 100))
12
     #define ST_AV_NEWSTEREO
13
sview-15_08.tar.gz/include/StCore/StAndroidGlue.h -> sview-15_10.tar.gz/include/StCore/StAndroidGlue.h Changed
120
 
1
@@ -1,5 +1,5 @@
2
 /**
3
- * Copyright © 2014 Kirill Gavrilov <kirill@sview.ru>
4
+ * Copyright © 2014-2015 Kirill Gavrilov <kirill@sview.ru>
5
  *
6
  * StCore library is free software: you can redistribute it and/or modify
7
  * it under the terms of the GNU Lesser General Public License as published by
8
@@ -25,6 +25,7 @@
9
 #include <StStrings/StString.h>
10
 #include <StThreads/StMutex.h>
11
 #include <StThreads/StThread.h>
12
+#include <StTemplates/StQuaternion.h>
13
 
14
 #include <android/configuration.h>
15
 #include <android/native_activity.h>
16
@@ -80,6 +81,7 @@
17
         CommandId_Pause,         //!< activity has been paused
18
         CommandId_Stop,          //!< activity has been stopped
19
         CommandId_Destroy,       //!< activity is being destroyed, and waiting for the application thread to clean up and exit before proceeding
20
+        CommandId_BackPressed,   //!< pressed special back button
21
     };
22
 
23
     /**
24
@@ -152,9 +154,28 @@
25
     }
26
 
27
     /**
28
-     * Pop onNewIntent() open file event.
29
+     * Return true if device has orientation sensor.
30
      */
31
-    ST_CPPEXPORT bool popOpenNewFile(StString& theNewFile);
32
+    ST_LOCAL bool hasOrientationSensor() const { return myHasOrientSensor; }
33
+
34
+    /**
35
+     * Return true if orientation sensor has poor quality.
36
+     */
37
+    ST_LOCAL bool isPoorOrientationSensor() const { return myIsPoorOrient; }
38
+
39
+    /**
40
+     * Turn orientation sensor on/off.
41
+     * Has no effect in case if sensor is unavailable.
42
+     */
43
+    ST_CPPEXPORT void setTrackOrientation(const bool theToTrack);
44
+
45
+    /**
46
+     * Fetch current state:
47
+     * @param theNewFile pop onNewIntent() open file event
48
+     * @param theQuaternion device orientation
49
+     */
50
+    ST_CPPEXPORT void fetchState(StString&             theNewFile,
51
+                                 StQuaternion<double>& theQuaternion);
52
 
53
     /**
54
      * Return device memory class.
55
@@ -178,6 +199,11 @@
56
      */
57
     ST_CPPEXPORT void postExit();
58
 
59
+    /**
60
+     * Low-level method to write command into queue.
61
+     */
62
+    ST_CPPEXPORT bool writeCommand(const int8_t theCmd);
63
+
64
         public:  //! @name Signals
65
 
66
     struct {
67
@@ -200,7 +226,6 @@
68
 
69
     ST_CPPEXPORT void readOpenPath();
70
 
71
-    ST_CPPEXPORT bool writeCommand(const int8_t theCmd);
72
     ST_CPPEXPORT void printConfig();
73
     ST_CPPEXPORT void freeSavedState();
74
 
75
@@ -227,6 +252,29 @@
76
 
77
     ST_CPPEXPORT void threadEntry();
78
 
79
+        public: //! @name StActivity callbacks
80
+
81
+    /**
82
+     * Define device orientation sensor.
83
+     * @param theHasSensor flag indicating that device has orientation sensors
84
+     * @param theIsPoor    flag indicating that available orientation sensor provides imprecise values
85
+     */
86
+    ST_LOCAL void defineOrientationSensor(bool theHasSensor,
87
+                                          bool theIsPoor) {
88
+        myHasOrientSensor = theHasSensor;
89
+        myIsPoorOrient    = theIsPoor;
90
+    }
91
+
92
+    /**
93
+     * Define device orientation by quaternion.
94
+     */
95
+    ST_LOCAL void setQuaternion(const StQuaternion<float>& theQ, const float theScreenRotDeg);
96
+
97
+    /**
98
+     * Define device orientation using deprecated Android API.
99
+     */
100
+    ST_LOCAL void setOrientation(float theAzimuthDeg, float thePitchDeg, float theRollDeg, float theScreenRotDeg);
101
+
102
         private: //! @name ANativeActivity callbacks
103
 
104
     ST_LOCAL static void processInputWrapper(StAndroidGlue*       theApp,
105
@@ -335,8 +383,13 @@
106
     StAndroidPollSource     myCmdPollSource;
107
     StAndroidPollSource     myInputPollSource;
108
 
109
-    StMutex                 myDndLock;           //!< Drag & Drop data lock
110
+    StMutex                 myFetchLock;         //!< fetch data lock
111
     StString                myDndPath;           //!< intent data string
112
+    StString                myCreatePath;        //!< intent data string used to open this activity
113
+    StQuaternion<double>    myQuaternion;        //!< device orientation
114
+    bool                    myHasOrientSensor;   //!< flag indicating that device has orientation sensors
115
+    bool                    myIsPoorOrient;      //!< flag indicating that available orientation sensor provides imprecise values
116
+    bool                    myToTrackOrient;     //!< track device orientation
117
 
118
     bool                    myIsRunning;
119
     bool                    myIsStateSaved;
120
sview-15_08.tar.gz/include/StCore/StApplication.h -> sview-15_10.tar.gz/include/StCore/StApplication.h Changed
14
 
1
@@ -196,6 +196,12 @@
2
     ST_CPPEXPORT virtual void doClose(const StCloseEvent& theEvent);
3
 
4
     /**
5
+     * Process window pause event - application can be closed at any moment.
6
+     * Implementation should save the state to avoid data loss.
7
+     */
8
+    ST_CPPEXPORT virtual void doPause(const StPauseEvent& theEvent);
9
+
10
+    /**
11
      * Process window resize.
12
      */
13
     ST_CPPEXPORT virtual void doResize(const StSizeEvent& theEvent);
14
sview-15_08.tar.gz/include/StCore/StEvent.h -> sview-15_10.tar.gz/include/StCore/StEvent.h Changed
34
 
1
@@ -27,6 +27,7 @@
2
 enum StEventType {
3
     stEvent_None,       //!< StAnyEvent,    undefined event
4
     stEvent_Close,      //!< StCloseEvent,  window close requested
5
+    stEvent_Pause,      //!< StPauseEvent,  window can be closed at any moment
6
     stEvent_Size,       //!< StSizeEvent,   window resized
7
     stEvent_NewMonitor, //!< StSizeEvent,   window moved to another monitor
8
     stEvent_KeyDown,    //!< StKeyEvent,    keyboard key pressed
9
@@ -60,6 +61,16 @@
10
 };
11
 
12
 /**
13
+ * Pause window request.
14
+ */
15
+struct StPauseEvent {
16
+
17
+    StEventType   Type;   //!< event type
18
+    double        Time;   //!< time in seconds when event was registered
19
+
20
+};
21
+
22
+/**
23
  * Window resize event.
24
  */
25
 struct StSizeEvent {
26
@@ -150,6 +161,7 @@
27
     StEventType   Type;     //!< event type
28
     StAnyEvent    Base;     //!< fields shared between all event
29
     StCloseEvent  Close;    //!< window close  event
30
+    StPauseEvent  Pause;    //!< window pause  event
31
     StSizeEvent   Size;     //!< window resize event
32
     StKeyEvent    Key;      //!< keyboard key down/up event
33
     StClickEvent  Button;   //!< mouse button down/up event
34
sview-15_08.tar.gz/include/StCore/StOpenInfo.h -> sview-15_10.tar.gz/include/StCore/StOpenInfo.h Changed
23
 
1
@@ -69,8 +69,8 @@
2
     /**
3
      * Automatically create formatted string from MIME.
4
      */
5
-    void setMIME(const StMIME& mime) {
6
-        this->mime = mime.toString();
7
+    void setMIME(const StMIME& theMime) {
8
+        this->mime = theMime.toString();
9
     }
10
 
11
     /**
12
@@ -90,8 +90,8 @@
13
     /**
14
      * Set path to open.
15
      */
16
-    void setPath(const StString& path) {
17
-        this->path = path;
18
+    void setPath(const StString& thePath) {
19
+        this->path = thePath;
20
     }
21
 
22
     /**
23
sview-15_08.tar.gz/include/StCore/StWindow.h -> sview-15_10.tar.gz/include/StCore/StWindow.h Changed
75
 
1
@@ -195,6 +195,12 @@
2
     ST_CPPEXPORT bool isActive() const;
3
 
4
     /**
5
+     * Return true if window is in paused state (e.g. it is hidden and can be closed by system at any moment).
6
+     * Similar to !isActive() but more aggressive - application should consider destroying itself.
7
+     */
8
+    ST_CPPEXPORT bool isPaused() const;
9
+
10
+    /**
11
      * Show up the window.
12
      */
13
     ST_CPPEXPORT virtual void show();
14
@@ -227,6 +233,11 @@
15
     ST_CPPEXPORT StRectI_t getPlacement() const;
16
 
17
     /**
18
+     * Return GUI GL window placement in windowed state (ignores active full-screen placement).
19
+     */
20
+    ST_CPPEXPORT StRectI_t getWindowedPlacement() const;
21
+
22
+    /**
23
      * Return false if window position or dimensions can not be changes
24
      * (systems supports only full-screen mode, or window is embedded).
25
      */
26
@@ -408,6 +419,40 @@
27
     ST_CPPEXPORT void setTargetFps(const double theFPS);
28
 
29
     /**
30
+     * Return optional statistics for verbose output.
31
+     */
32
+    ST_CPPEXPORT const StString& getStatistics() const;
33
+
34
+    /**
35
+     * Return true if device has orientation sensor.
36
+     */
37
+    ST_CPPEXPORT virtual bool hasOrientationSensor() const;
38
+
39
+    /**
40
+     * Return true if orientation sensor has poor quality.
41
+     */
42
+    ST_CPPEXPORT virtual bool isPoorOrientationSensor() const;
43
+
44
+    /**
45
+     * Return true if orientation sensor has been enabled.
46
+     */
47
+    ST_CPPEXPORT virtual bool toTrackOrientation() const;
48
+
49
+    /**
50
+     * Turn orientation sensor on/off.
51
+     * Has no effect in case if sensor is unavailable.
52
+     */
53
+    ST_CPPEXPORT virtual void setTrackOrientation(const bool theToTrack);
54
+
55
+    /**
56
+     * Return device orientation (for head-tracking) within right-handed coordinate system:
57
+     * - Y is positive in up direction (towards the sky, perpendicular to the ground).
58
+     * - X is positive to the right (tangential to the ground).
59
+     * - Z is positive heading backwards (tangential to the ground).
60
+     */
61
+    ST_CPPEXPORT virtual StQuaternion<double> getDeviceOrientation() const;
62
+
63
+    /**
64
      * Retrieve options list.
65
      */
66
     ST_CPPEXPORT virtual void getOptions(StParamsList& theList) const;
67
@@ -446,6 +491,7 @@
68
         StSignal<void (const unsigned int   )> onRedraw;
69
 
70
         StSignal<void (const StCloseEvent&  )> onClose;
71
+        StSignal<void (const StPauseEvent&  )> onPause;
72
         StSignal<void (const StSizeEvent&   )> onResize;
73
         StSignal<void (const StSizeEvent&   )> onAnotherMonitor;
74
         StSignal<void (const StKeyEvent&    )> onKeyUp;
75
sview-15_08.tar.gz/include/StFile/StNode.h -> sview-15_10.tar.gz/include/StFile/StNode.h Changed
19
 
1
@@ -1,5 +1,5 @@
2
 /**
3
- * Copyright © 2010 Kirill Gavrilov <kirill@sview.ru>
4
+ * Copyright © 2010-2015 Kirill Gavrilov <kirill@sview.ru>
5
  *
6
  * Distributed under the Boost Software License, Version 1.0.
7
  * See accompanying file license-boost.txt or copy at
8
@@ -67,8 +67,8 @@
9
         return subPath;
10
     }
11
 
12
-    virtual void setSubPath(const StString& subPath) {
13
-        this->subPath = subPath;
14
+    virtual void setSubPath(const StString& theSubPath) {
15
+        this->subPath = theSubPath;
16
     }
17
 
18
     virtual StString getPath() const {
19
sview-15_08.tar.gz/include/StGL/StGLContext.h -> sview-15_10.tar.gz/include/StGL/StGLContext.h Changed
9
 
1
@@ -148,6 +148,7 @@
2
     bool            arbNPTW;    //!< GL_ARB_texture_non_power_of_two
3
     bool            arbTexRG;   //!< GL_ARB_texture_rg
4
     bool            arbTexClear;//!< GL_ARB_clear_texture
5
+    bool            hasUnpack;  //!< GL_PACK_ROW_LENGTH / GL_UNPACK_ROW_LENGTH can be used - OpenGL ES 3.0+ or any desktop
6
     bool            hasHighp;   //!< highp in GLSL ES fragment shader is supported
7
     bool            hasTexRGBA8;//!< always available on desktop; on OpenGL ES - since 3.0 or as extension GL_OES_rgb8_rgba8
8
     bool            extTexBGRA8;//!< GL_EXT_texture_format_BGRA8888 for OpenGL ES
9
sview-15_08.tar.gz/include/StGL/StGLFunctions.h -> sview-15_10.tar.gz/include/StGL/StGLFunctions.h Changed
67
 
1
@@ -44,6 +44,14 @@
2
     #include <GLES2/gl2.h>
3
     ///#include <GLES3/gl3.h>
4
 
5
+    // in core since OpenGL ES 3.0
6
+    #define GL_UNPACK_ROW_LENGTH  0x0CF2
7
+    #define GL_UNPACK_SKIP_ROWS   0x0CF3
8
+    #define GL_UNPACK_SKIP_PIXELS 0x0CF4
9
+    #define GL_PACK_ROW_LENGTH    0x0D02
10
+    #define GL_PACK_SKIP_ROWS     0x0D03
11
+    #define GL_PACK_SKIP_PIXELS   0x0D04
12
+
13
     // in core since OpenGL ES 3.0, extension GL_EXT_texture_rg
14
     #define GL_RED   0x1903
15
     #define GL_R8    0x8229
16
@@ -1454,7 +1462,7 @@
17
         public: //! @name CGL extensions
18
 
19
 #else
20
-        public: //! @name glX extensions
21
+        public: //! @name GLX extensions
22
 
23
     // GLX_EXT_swap_control
24
     //typedef int         (*glXSwapIntervalEXT_t)(Display* theDisplay, GLXDrawable theDrawable, int theInterval);
25
@@ -1463,6 +1471,41 @@
26
 
27
     typedef int         (*glXSwapIntervalSGI_t)(int theInterval);
28
     glXSwapIntervalSGI_t glXSwapIntervalSGI;
29
+
30
+        // GLX_MESA_query_renderer
31
+
32
+#ifndef GLX_RENDERER_VENDOR_ID_MESA
33
+    // for glXQueryRendererIntegerMESA() and glXQueryCurrentRendererIntegerMESA()
34
+    #define GLX_RENDERER_VENDOR_ID_MESA                      0x8183
35
+    #define GLX_RENDERER_DEVICE_ID_MESA                      0x8184
36
+    #define GLX_RENDERER_VERSION_MESA                        0x8185
37
+    #define GLX_RENDERER_ACCELERATED_MESA                    0x8186
38
+    #define GLX_RENDERER_VIDEO_MEMORY_MESA                   0x8187
39
+    #define GLX_RENDERER_UNIFIED_MEMORY_ARCHITECTURE_MESA    0x8188
40
+    #define GLX_RENDERER_PREFERRED_PROFILE_MESA              0x8189
41
+    #define GLX_RENDERER_OPENGL_CORE_PROFILE_VERSION_MESA    0x818A
42
+    #define GLX_RENDERER_OPENGL_COMPATIBILITY_PROFILE_VERSION_MESA 0x818B
43
+    #define GLX_RENDERER_OPENGL_ES_PROFILE_VERSION_MESA      0x818C
44
+    #define GLX_RENDERER_OPENGL_ES2_PROFILE_VERSION_MESA     0x818D
45
+
46
+    #define GLX_RENDERER_ID_MESA                             0x818E
47
+#endif // GLX_RENDERER_VENDOR_ID_MESA
48
+
49
+    typedef void* stglxDisplay_t; // Display*
50
+    typedef int   stglxBool;      // Bool
51
+    typedef stglxBool (*glXQueryRendererIntegerMESA_t)(stglxDisplay_t dpy, int screen,
52
+                                                       int renderer, int attribute,
53
+                                                       unsigned int *value);
54
+    typedef stglxBool (*glXQueryCurrentRendererIntegerMESA_t)(int attribute, unsigned int *value);
55
+    typedef const char* (*glXQueryRendererStringMESA_t)(stglxDisplay_t dpy, int screen,
56
+                                                        int renderer, int attribute);
57
+    typedef const char* (*glXQueryCurrentRendererStringMESA_t)(int attribute);
58
+
59
+    glXQueryRendererIntegerMESA_t        glXQueryRendererIntegerMESA;
60
+    glXQueryCurrentRendererIntegerMESA_t glXQueryCurrentRendererIntegerMESA;
61
+    glXQueryRendererStringMESA_t         glXQueryRendererStringMESA;
62
+    glXQueryCurrentRendererStringMESA_t  glXQueryCurrentRendererStringMESA;
63
+
64
 #endif
65
 
66
 #endif // OpenGL desktop or ES
67
sview-15_08.tar.gz/include/StGL/StGLMatrix.h -> sview-15_10.tar.gz/include/StGL/StGLMatrix.h Changed
20
 
1
@@ -1,5 +1,5 @@
2
 /**
3
- * Copyright © 2010-2013 Kirill Gavrilov <kirill@sview.ru>
4
+ * Copyright © 2010-2015 Kirill Gavrilov <kirill@sview.ru>
5
  *
6
  * Distributed under the Boost Software License, Version 1.0.
7
  * See accompanying file license-boost.txt or copy at
8
@@ -79,6 +79,11 @@
9
     ST_CPPEXPORT StGLMatrix(const StGLMatrix& copyMat);
10
 
11
     /**
12
+     * Construct rotation matrix from quaternion.
13
+     */
14
+    ST_CPPEXPORT explicit StGLMatrix(const StGLQuaternion& theQ);
15
+
16
+    /**
17
      * Assignment operator.
18
      */
19
     ST_CPPEXPORT const StGLMatrix& operator=(const StGLMatrix& copyMat);
20
sview-15_08.tar.gz/include/StGL/StGLTexture.h -> sview-15_10.tar.gz/include/StGL/StGLTexture.h Changed
14
 
1
@@ -178,8 +178,11 @@
2
      * @param theData      the image plane to copy data from
3
      * @param theTarget    texture target
4
      * @param theRowFrom   fill data from row (for both - input image plane and the texture!)
5
-     * @param theRowTo     fill data up to the row (if zero - all rows)
6
+     * @param theRowTo     fill data up to the row (0 means all rows)
7
      * @param theBatchRows maximal step for GL function call (greater - more effective)
8
+     *                     0 to copy in single batch
9
+     *                     1 to copy row-by-row
10
+     *                     N to copy in batches of specified number of rows
11
      * @return true on success
12
      */
13
     ST_CPPEXPORT bool fillPatch(StGLContext&        theCtx,
14
sview-15_08.tar.gz/include/StGL/StGLVec.h -> sview-15_10.tar.gz/include/StGL/StGLVec.h Changed
15
 
1
@@ -13,11 +13,13 @@
2
 #include <StTemplates/StVec2.h>
3
 #include <StTemplates/StVec3.h>
4
 #include <StTemplates/StVec4.h>
5
+#include <StTemplates/StQuaternion.h>
6
 #include <StTemplates/StArrayList.h>
7
 
8
 typedef StVec2<GLfloat> StGLVec2;
9
 typedef StVec3<GLfloat> StGLVec3;
10
 typedef StVec4<GLfloat> StGLVec4;
11
+typedef StQuaternion<GLfloat> StGLQuaternion;
12
 
13
 /**
14
  * POD structure for OpenGL rectangle in window coordinates (y coordinates is from bottom corner).
15
sview-15_08.tar.gz/include/StGL/StParams.h -> sview-15_10.tar.gz/include/StGL/StParams.h Changed
83
 
1
@@ -54,8 +54,12 @@
2
     /**
3
      * Main constructor - default parameters.
4
      */
5
-    StStereoParams(ViewMode theViewMode = FLAT_IMAGE)
6
-    : ViewingMode(theViewMode),
7
+    StStereoParams()
8
+    : Src1SizeX(0),
9
+      Src1SizeY(0),
10
+      Src2SizeX(0),
11
+      Src2SizeY(0),
12
+      ViewingMode(FLAT_IMAGE),
13
       Timestamp(0.0f),
14
       StereoFormat(StFormat_Mono),
15
       ToSwapLR(false),
16
@@ -241,7 +245,7 @@
17
 
18
     void moveSphere(const StGLVec2& theMoveVec) {
19
         PanPhi   += theMoveVec.x();
20
-        PanTheta += theMoveVec.y();
21
+        PanTheta = clipPitch(PanTheta + theMoveVec.y());
22
     }
23
 
24
     void moveToRight(const GLfloat theDuration = 0.02f) {
25
@@ -262,21 +266,41 @@
26
         }
27
     }
28
 
29
+    /**
30
+     * Clip pitch angle to the range [-90, 90] degrees.
31
+     */
32
+    static float clipPitch(const float thePitchDeg) {
33
+        if(thePitchDeg <= -90.0f) {
34
+            return -90.0f;
35
+        } else if(thePitchDeg >= 90.0f) {
36
+            return  90.0f;
37
+        }
38
+        return thePitchDeg;
39
+    }
40
+
41
     void moveToDown(const GLfloat theDuration = 0.02f) {
42
         switch(ViewingMode) {
43
             case PANORAMA_SPHERE:
44
-            case PANORAMA_CUBEMAP: PanTheta -= 100.0f * theDuration; break;
45
+            case PANORAMA_CUBEMAP:
46
+                PanTheta = clipPitch(PanTheta - 100.0f * theDuration);
47
+                break;
48
             case FLAT_IMAGE:
49
-            default: PanCenter.y() -= 0.5f * theDuration / ScaleFactor;
50
+            default:
51
+                PanCenter.y() -= 0.5f * theDuration / ScaleFactor;
52
+                break;
53
         }
54
     }
55
 
56
     void moveToUp(const GLfloat theDuration = 0.02f) {
57
         switch(ViewingMode) {
58
             case PANORAMA_SPHERE:
59
-            case PANORAMA_CUBEMAP: PanTheta += 100.0f * theDuration; break;
60
+            case PANORAMA_CUBEMAP:
61
+                PanTheta = clipPitch(PanTheta + 100.0f * theDuration);
62
+                break;
63
             case FLAT_IMAGE:
64
-            default: PanCenter.y() += 0.5f * theDuration / ScaleFactor;
65
+            default:
66
+                PanCenter.y() += 0.5f * theDuration / ScaleFactor;
67
+                break;
68
         }
69
     }
70
 
71
@@ -315,6 +339,11 @@
72
 
73
         public:
74
 
75
+    size_t       Src1SizeX;        //!< width  of the 1st original image
76
+    size_t       Src1SizeY;        //!< height of the 1st original image
77
+    size_t       Src2SizeX;        //!< width  of the 2nd original image
78
+    size_t       Src2SizeY;        //!< height of the 2nd original image
79
+
80
     ViewMode     ViewingMode;      //!< viewing mode - panorama or flat image
81
     GLfloat      Timestamp;        //!< playback timestamp
82
 
83
sview-15_08.tar.gz/include/StGL/StPlayList.h -> sview-15_10.tar.gz/include/StGL/StPlayList.h Changed
14
 
1
@@ -338,6 +338,12 @@
2
     ST_CPPEXPORT StString dumpRecentList() const;
3
 
4
     /**
5
+     * Set last recent file to the currently played file.
6
+     * Has effect only for playlist automatically generated from opened file (not folder).
7
+     */
8
+    ST_CPPEXPORT void currentToRecent();
9
+
10
+    /**
11
      * Open recent file at specified position.
12
      * @param theItemId Position in recent files list
13
      * @return saved parameters or NULL
14
sview-15_08.tar.gz/include/StGLStereo/StFormatEnum.h -> sview-15_10.tar.gz/include/StGLStereo/StFormatEnum.h Changed
54
 
1
@@ -44,6 +44,13 @@
2
     StCubemap_Packed     //!< cubemap data packed into single image frame - 6 horizontally stacked planes
3
 };
4
 
5
+enum StPanorama {
6
+    StPanorama_OFF  =  0,  //!< no cubemap data
7
+    StPanorama_Sphere,     //!< spherical panorama
8
+    StPanorama_Cubemap6_1, //!< cubemap data packed into single image frame - 6:1
9
+    StPanorama_Cubemap3_2  //!< cubemap data packed into single image frame - 3:2
10
+};
11
+
12
 namespace st {
13
 
14
     /**
15
@@ -115,6 +122,38 @@
16
         }
17
     }
18
 
19
+    /**
20
+     * Probe panorama mode from image dimensions.
21
+     */
22
+    ST_LOCAL inline StPanorama probePanorama(StFormat theFormat,
23
+                                             size_t   theSrc1SizeX,
24
+                                             size_t   theSrc1SizeY,
25
+                                             size_t   theSrc2SizeX,
26
+                                             size_t   theSrc2SizeY) {
27
+        StPairRatio aPairRatio = st::formatToPairRatio(theFormat);
28
+        if(aPairRatio == StPairRatio_HalfWidth) {
29
+            theSrc1SizeX /= 2;
30
+        } else if(aPairRatio == StPairRatio_HalfHeight) {
31
+            theSrc1SizeY /= 2;
32
+        }
33
+        if(theSrc1SizeX < 8
34
+        || theSrc1SizeY < 8) {
35
+            return StPanorama_OFF;
36
+        }
37
+
38
+        if(theSrc1SizeX / 2 == theSrc1SizeY
39
+        && theSrc2SizeX / 2 == theSrc2SizeY) {
40
+            return StPanorama_Sphere;
41
+        } else if(theSrc1SizeX / 6 == theSrc1SizeY
42
+               && theSrc2SizeX / 6 == theSrc2SizeY) {
43
+            return StPanorama_Cubemap6_1;
44
+        } else if(theSrc1SizeX / 3 == theSrc1SizeY / 2
45
+               && theSrc2SizeX / 3 == theSrc2SizeY / 2) {
46
+            return StPanorama_Cubemap3_2;
47
+        }
48
+        return StPanorama_OFF;
49
+    }
50
+
51
 };
52
 
53
 #endif // __StFormatEnum_h_
54
sview-15_08.tar.gz/include/StGLWidgets/StGLCheckboxTextured.h -> sview-15_10.tar.gz/include/StGLWidgets/StGLCheckboxTextured.h Changed
15
 
1
@@ -36,6 +36,13 @@
2
     ST_CPPEXPORT virtual void stglUpdate(const StPointD_t& theCursorZo);
3
 
4
     /**
5
+     * Return tracked value.
6
+     */
7
+    ST_LOCAL StHandle<StBoolParam>& getTrackedValue() {
8
+        return myTrackValue;
9
+    }
10
+
11
+    /**
12
      * Return opacity scale for FALSE value, 0.5f by default.
13
      */
14
     ST_LOCAL float getFalseOpacity() const {
15
sview-15_08.tar.gz/include/StGLWidgets/StGLFpsLabel.h -> sview-15_10.tar.gz/include/StGLWidgets/StGLFpsLabel.h Changed
59
 
1
@@ -1,5 +1,5 @@
2
 /**
3
- * Copyright © 2013 Kirill Gavrilov <kirill@sview.ru>
4
+ * Copyright © 2013-2015 Kirill Gavrilov <kirill@sview.ru>
5
  *
6
  * Distributed under the Boost Software License, Version 1.0.
7
  * See accompanying file license-boost.txt or copy at
8
@@ -13,7 +13,8 @@
9
 #include <StGLWidgets/StGLMenuProgram.h>
10
 
11
 /**
12
- * FPS widget.
13
+ * Widget for displaying diagnostic information
14
+ * (frame rate, buffers state, etc.).
15
  */
16
 class StGLFpsLabel : public StGLTextArea {
17
 
18
@@ -24,32 +25,25 @@
19
 
20
         public:
21
 
22
-    ST_CPPEXPORT void update(const bool   theIsStereo,
23
-                             const double theTargetFps);
24
+    ST_CPPEXPORT void update(const bool      theIsStereo,
25
+                             const double    theTargetFps,
26
+                             const StString& theExtraInfo);
27
 
28
-    ST_LOCAL inline double& changePlayFps() {
29
-        return myPlayFps;
30
-    }
31
-
32
-    ST_LOCAL inline int& changePlayQueued() {
33
-        return myPlayQueued;
34
-    }
35
-
36
-    ST_LOCAL inline int& changePlayQueueLength() {
37
-        return myPlayQueueLen;
38
-    }
39
+    ST_LOCAL double& changePlayFps()         { return myPlayFps; }
40
+    ST_LOCAL int&    changePlayQueued()      { return myPlayQueued; }
41
+    ST_LOCAL int&    changePlayQueueLength() { return myPlayQueueLen; }
42
 
43
         public:  //! @name Signals
44
 
45
     struct {
46
         /**
47
          * Emit callback Slot on button click.
48
-         * @param theUserData (const size_t ) - user predefined data.
49
+         * @param theUserData user predefined data
50
          */
51
         StSignal<void (const size_t )> onBtnClick;
52
     } signals;
53
 
54
-        private: //!< callback Slots (private overriders)
55
+        private: //! @name callback Slots (private overriders)
56
 
57
     ST_LOCAL void doMouseUnclick(const int theBtnId);
58
 
59
sview-15_08.tar.gz/include/StGLWidgets/StGLImageProgram.h -> sview-15_10.tar.gz/include/StGLWidgets/StGLImageProgram.h Changed
10
 
1
@@ -97,7 +97,7 @@
2
 
3
         public:
4
 
5
-    ST_CPPEXPORT StGLImageProgram(const StString& theTitle);
6
+    ST_CPPEXPORT StGLImageProgram();
7
 
8
     ST_CPPEXPORT virtual ~StGLImageProgram();
9
 
10
sview-15_08.tar.gz/include/StGLWidgets/StGLImageRegion.h -> sview-15_10.tar.gz/include/StGLWidgets/StGLImageRegion.h Changed
75
 
1
@@ -13,8 +13,7 @@
2
 #include <StGLMesh/StGLQuads.h>
3
 
4
 #include <StGLWidgets/StGLWidget.h>
5
-#include <StGLWidgets/StGLImageFlatProgram.h>
6
-#include <StGLWidgets/StGLImageSphereProgram.h>
7
+#include <StGLWidgets/StGLImageProgram.h>
8
 #include <StGLStereo/StGLTextureQueue.h>
9
 
10
 #include <StGL/StParams.h>
11
@@ -87,6 +86,11 @@
12
                                  const bool  theUsePanningKeys);
13
 
14
     /**
15
+     * Setup device orientation.
16
+     */
17
+    ST_LOCAL void setDeviceOrientation(const StGLQuaternion& theQ) { myDeviceQuat = theQ; }
18
+
19
+    /**
20
      * Dragging delay in milliseconds, 0.0 by default.
21
      */
22
     ST_LOCAL inline double getDragDelayMs() const {
23
@@ -106,6 +110,11 @@
24
 
25
     ST_CPPEXPORT StHandle<StStereoParams> getSource();
26
 
27
+    /**
28
+     * Return true if there is any video stream.
29
+     */
30
+    ST_LOCAL bool hasVideoStream() { return myHasVideoStream; }
31
+
32
     const StArrayList< StHandle<StAction> >& getActions() const {
33
         return myActions;
34
     }
35
@@ -134,6 +143,7 @@
36
 
37
         StHandle<StEnumParam>    displayMode;   //!< StGLImageRegion::DisplayMode    - display mode
38
         StHandle<StInt32Param>   displayRatio;  //!< StGLImageRegion::DisplayRatio   - display ratio
39
+        StHandle<StBoolParam>    ToHealAnamorphicRatio; //!< correct aspect ratio for 1080p/720p anamorphic pairs
40
         StHandle<StInt32Param>   textureFilter; //!< StGLImageProgram::TextureFilter - texture filter;
41
         StHandle<StFloat32Param> gamma;         //!< gamma correction coefficient
42
         StHandle<StFloat32Param> brightness;    //!< brightness level
43
@@ -204,7 +214,7 @@
44
         const int aMode = params.ViewMode->getValue();
45
         switch(aMode) {
46
             case StStereoParams::FLAT_IMAGE: {
47
-                params.ViewMode->setValue(StStereoParams::PANORAMA_CUBEMAP);
48
+                params.ViewMode->setValue(StStereoParams::PANORAMA_SPHERE);
49
                 return;
50
             }
51
             case StStereoParams::PANORAMA_CUBEMAP: {
52
@@ -212,7 +222,7 @@
53
                 return;
54
             }
55
             case StStereoParams::PANORAMA_SPHERE: {
56
-                params.ViewMode->setValue(StStereoParams::FLAT_IMAGE);
57
+                params.ViewMode->setValue(StStereoParams::PANORAMA_CUBEMAP);
58
                 return;
59
             }
60
         }
61
@@ -267,11 +277,11 @@
62
 
63
     StGLQuads                  myQuad;           //!< flat quad
64
     StGLUVSphere               myUVSphere;       //!< sphere output helper class
65
-    StGLImageFlatProgram       myProgramFlat;    //!< GL program to draw flat image
66
-    StGLImageSphereProgram     myProgramSphere;  //!< GL program to draw spheric panorama
67
+    StGLImageProgram           myProgram;        //!< GL program to draw flat image
68
     StHandle<StGLTextureQueue> myTextureQueue;   //!< shared texture queue
69
     StPointD_t                 myClickPntZo;     //!< remembered mouse click position
70
     StTimer                    myClickTimer;     //!< timer to delay dragging action
71
+    StGLQuaternion             myDeviceQuat;     //!< device orientation
72
     StVirtFlags                myKeyFlags;       //!< active key flags
73
     double                     myDragDelayMs;    //!< dragging delay in milliseconds
74
     bool                       myIsClickAborted;
75
sview-15_08.tar.gz/include/StGLWidgets/StGLMenu.h -> sview-15_10.tar.gz/include/StGLWidgets/StGLMenu.h Changed
33
 
1
@@ -107,6 +107,20 @@
2
     }
3
 
4
     /**
5
+     * Return minimum width of item in this menu.
6
+     */
7
+    ST_LOCAL int getItemWidthMin() const {
8
+        return myWidthMin;
9
+    }
10
+
11
+    /**
12
+     * Setup minimum width of item in this menu.
13
+     */
14
+    ST_LOCAL void setItemWidthMin(const int theWidth) {
15
+        myWidthMin = theWidth;
16
+    }
17
+
18
+    /**
19
      * Setup background color of menu.
20
      */
21
     inline void setColor(const StGLVec3& theColor) {
22
@@ -185,8 +199,9 @@
23
     StGLVec4                   myColorVec;
24
     int                        myOrient;
25
     int                        myItemHeight;
26
+    int                        myWidthMin;
27
     int                        myWidth;
28
-    bool                       myIsRootMenu;
29
+    bool                       myIsRootMenu;    //!< the root menu does not show sub-menus until first click
30
     bool                       myIsContextual;
31
     bool                       myIsActive;
32
     bool                       myKeepActive;
33
sview-15_08.tar.gz/include/StGLWidgets/StGLMenuItem.h -> sview-15_10.tar.gz/include/StGLWidgets/StGLMenuItem.h Changed
20
 
1
@@ -91,6 +91,18 @@
2
     ST_CPPEXPORT void setHilightText();
3
 
4
     /**
5
+     * Get assigned icon.
6
+     */
7
+    ST_LOCAL StGLIcon* getIcon() {
8
+        return myIcon;
9
+    }
10
+
11
+    /**
12
+     * Assign new icon.
13
+     */
14
+    ST_CPPEXPORT void setIcon(StGLIcon* theIcon);
15
+
16
+    /**
17
      * Setup icon.
18
      */
19
     ST_CPPEXPORT StGLMenuItem* setIcon(const StString* theImgPaths,
20
sview-15_08.tar.gz/include/StGLWidgets/StGLMessageBox.h -> sview-15_10.tar.gz/include/StGLWidgets/StGLMessageBox.h Changed
71
 
1
@@ -22,14 +22,25 @@
2
 
3
         public:
4
 
5
+    /**
6
+     * Main constructor creating message box of size 384 x 200 (clipped by root widget size).
7
+     */
8
     ST_CPPEXPORT StGLMessageBox(StGLWidget*     theParent,
9
                                 const StString& theTitle,
10
                                 const StString& theText);
11
+
12
+    /**
13
+     * Main constructor creating message box of specified size (clipped by root widget size).
14
+     */
15
     ST_CPPEXPORT StGLMessageBox(StGLWidget*     theParent,
16
                                 const StString& theTitle,
17
                                 const StString& theText,
18
                                 const int       theWidth,
19
                                 const int       theHeight);
20
+
21
+    /**
22
+     * Destructor.
23
+     */
24
     ST_CPPEXPORT virtual ~StGLMessageBox();
25
     ST_CPPEXPORT virtual bool stglInit();
26
     ST_CPPEXPORT virtual void stglResize();
27
@@ -66,7 +77,7 @@
28
     ST_CPPEXPORT void setTitle(const StString& theTitle);
29
 
30
     /**
31
-     * Set content to the plain text.
32
+     * Set content to the plain text (previous content will be discarded).
33
      */
34
     ST_CPPEXPORT void setText(const StString& theText);
35
 
36
@@ -84,6 +95,22 @@
37
     ST_LOCAL int getMarginTop()    const { return myMarginTop; }
38
     ST_LOCAL int getMarginBottom() const { return myMarginBottom; }
39
 
40
+        protected:
41
+
42
+    /**
43
+     * Protected empty constructor (does not call create()).
44
+     */
45
+    ST_CPPEXPORT StGLMessageBox(StGLWidget* theParent);
46
+
47
+    /**
48
+     * Initializes the layout of the widget.
49
+     * Should be called once, in constructor.
50
+     */
51
+    ST_CPPEXPORT void create(const StString& theTitle,
52
+                             const StString& theText,
53
+                             const int       theWidth,
54
+                             const int       theHeight);
55
+
56
         private:   //! @name callback Slots (private overriders)
57
 
58
     ST_LOCAL void doMouseUnclick(const int theBtnId);
59
@@ -95,11 +122,6 @@
60
      */
61
     ST_LOCAL bool doNextButton(const int theDir);
62
 
63
-    ST_LOCAL void create(const StString& theTitle,
64
-                         const StString& theText,
65
-                         const int       theWidth,
66
-                         const int       theHeight);
67
-
68
         public:    //! @name Signals
69
 
70
     struct {
71
sview-15_10.tar.gz/include/StGLWidgets/StGLOpenFile.h Added
121
 
1
@@ -0,0 +1,119 @@
2
+/**
3
+ * Copyright © 2015 Kirill Gavrilov <kirill@sview.ru>
4
+ *
5
+ * Distributed under the Boost Software License, Version 1.0.
6
+ * See accompanying file license-boost.txt or copy at
7
+ * http://www.boost.org/LICENSE_1_0.txt
8
+ */
9
+
10
+#ifndef __StGLOpenFile_h_
11
+#define __StGLOpenFile_h_
12
+
13
+#include <StGLWidgets/StGLMessageBox.h>
14
+#include <StGLWidgets/StGLRootWidget.h>
15
+#include <StFile/StMIMEList.h>
16
+
17
+class StGLMenu;
18
+class StGLMenuItem;
19
+
20
+/**
21
+ * Widget for file system navigation.
22
+ */
23
+class StGLOpenFile : public StGLMessageBox {
24
+
25
+        public:
26
+
27
+    /**
28
+     * Main constructor.
29
+     */
30
+    ST_CPPEXPORT StGLOpenFile(StGLWidget*     theParent,
31
+                              const StString& theTitle,
32
+                              const StString& theCloseText);
33
+
34
+    /**
35
+     * Destructor.
36
+     */
37
+    ST_CPPEXPORT virtual ~StGLOpenFile();
38
+
39
+    /**
40
+     * Define file filter.
41
+     */
42
+    ST_CPPEXPORT void setMimeList(const StMIMEList& theFilter);
43
+
44
+    /**
45
+     * Open new folder.
46
+     */
47
+    ST_CPPEXPORT void addHotItem(const StString& theTarget,
48
+                                 const StString& theName = "");
49
+
50
+    /**
51
+     * Open new folder.
52
+     */
53
+    ST_CPPEXPORT void openFolder(const StString& theFolder);
54
+
55
+        public:    //! @name Signals
56
+
57
+    struct {
58
+        /**
59
+         * @param path to selected file
60
+         */
61
+        StSignal<void (StHandle<StString> )> onFileSelected;
62
+    } signals;
63
+
64
+        protected:
65
+
66
+    /**
67
+     * Assign icon to the item.
68
+     */
69
+    ST_CPPEXPORT void setItemIcon(StGLMenuItem*   theItem,
70
+                                  const StGLVec4& theColor,
71
+                                  const bool      theisFolder);
72
+
73
+    /**
74
+     * Handle hot-item click event - just remember item id.
75
+     */
76
+    ST_CPPEXPORT void doHotItemClick(const size_t theItemId);
77
+
78
+    /**
79
+     * Handle item click event - just remember item id.
80
+     */
81
+    ST_CPPEXPORT void doFileItemClick(const size_t theItemId);
82
+
83
+    /**
84
+     * Handle folder-up event.
85
+     */
86
+    ST_CPPEXPORT void doFolderUpClick(const size_t );
87
+
88
+    /**
89
+     * Override unclick to open new folder.
90
+     */
91
+    ST_CPPEXPORT virtual bool tryUnClick(const StPointD_t& theCursorZo,
92
+                                         const int&        theMouseBtn,
93
+                                         bool&             isItemUnclicked);
94
+
95
+        protected: //! @name class fields
96
+
97
+    StHandle<StGLTextureArray> myTextureFolder;
98
+    StHandle<StGLTextureArray> myTextureFile;
99
+    StGLTextArea*              myCurrentPath;
100
+    StGLMenu*                  myHotList;       //!< widget containing the list of predefined libraries
101
+    StGLMenu*                  myList;          //!< widget containing the file list of currently opened folder
102
+    StArrayList<StString>      myHotPaths;      //!< array of hot-links
103
+    StHandle<StFolder>         myFolder;        //!< currently opened folder
104
+    StMIMEList                 myFilter;        //!< file filter
105
+    StArrayList<StString>      myExtensions;    //!< extensions filter
106
+    StString                   myItemToLoad;    //!< new item to open
107
+
108
+        protected: //! @name main file list settings
109
+
110
+    StGLVec4                   myHighlightColor;//!< item highlighting
111
+    StGLVec4                   myItemColor;     //!< color of icons and text labels for the list
112
+    StGLVec4                   myFileColor;     //!< color of icons and text labels for the list
113
+    StGLVec4                   myHotColor;      //!< color of icons and text labels for the hot-list
114
+    int                        myHotSizeX;
115
+    int                        myMarginX;
116
+    int                        myIconSizeX;
117
+
118
+};
119
+
120
+#endif // __StGLOpenFile_h_
121
sview-15_08.tar.gz/include/StGLWidgets/StGLRootWidget.h -> sview-15_10.tar.gz/include/StGLWidgets/StGLRootWidget.h Changed
30
 
1
@@ -74,6 +74,8 @@
2
         IconImage_CheckboxOn,
3
         IconImage_RadioButtonOff,
4
         IconImage_RadioButtonOn,
5
+        IconImage_Folder,
6
+        IconImage_File,
7
         IconImage_NB
8
     };
9
 
10
@@ -185,6 +187,11 @@
11
     }
12
 
13
     /**
14
+     * Cursor distance between click/unclick events to determine as clicking.
15
+     */
16
+    ST_LOCAL int getClickThreshold() const { return myClickThreshold; }
17
+
18
+    /**
19
      * @return scale factor for GUI elements (text, icons), 1.0 for normal displays
20
      */
21
     ST_LOCAL inline GLfloat getScale() const {
22
@@ -446,6 +453,7 @@
23
         protected:
24
 
25
     IconSize                  myMenuIconSize;  //!< scaled size of menu icon
26
+    int                       myClickThreshold;//!< cursor distance between click/unclick events to determine as clicking
27
 
28
 };
29
 
30
sview-15_08.tar.gz/include/StGLWidgets/StGLScrollArea.h -> sview-15_10.tar.gz/include/StGLWidgets/StGLScrollArea.h Changed
14
 
1
@@ -59,9 +59,12 @@
2
     StGLVertexBuffer myBarVertBuf; //!< vertices buffer
3
     StGLVec4         myBarColor;   //!< color of scroll bar
4
 
5
+    bool       myIsLeftClick; //!< flag to perform dragging - some item has been clicked (but not yet unclicked)
6
+    bool       myHasDragged;  //!< indicates that dragging has been confirmed
7
     StPointD_t myClickPntZo;  //!< remembered mouse click position
8
     StTimer    myDragTimer;   //!< timer between dragging animation
9
     double     myDragYDelta;  //!< last dragged distance
10
+    int        myDragYCumul;  //!< cumulative dragged distance
11
     double     myFlingAccel;  //!< (positive) fling acceleration
12
     StTimer    myFlingTimer;  //!< timer for dragging inertia
13
     double     myFlingYSpeed; //!< the dragging velocity for inertial scrolling
14
sview-15_08.tar.gz/include/StGLWidgets/StGLSubtitles.h -> sview-15_10.tar.gz/include/StGLWidgets/StGLSubtitles.h Changed
28
 
1
@@ -1,5 +1,5 @@
2
 /**
3
- * Copyright © 2010-2014 Kirill Gavrilov <kirill@sview.ru>
4
+ * Copyright © 2010-2015 Kirill Gavrilov <kirill@sview.ru>
5
  *
6
  * Distributed under the Boost Software License, Version 1.0.
7
  * See accompanying file license-boost.txt or copy at
8
@@ -62,6 +62,9 @@
9
 
10
     ST_CPPEXPORT StGLSubtitles(StGLWidget*                     theParent,
11
                                const StHandle<StSubQueue>&     theSubQueue,
12
+                               const StHandle<StInt32Param>&   thePlace,
13
+                               const StHandle<StFloat32Param>& theTopDY,
14
+                               const StHandle<StFloat32Param>& theBottomDY,
15
                                const StHandle<StFloat32Param>& theFontSize,
16
                                const StHandle<StFloat32Param>& theParallax,
17
                                const StHandle<StEnumParam>&    theParser);
18
@@ -83,6 +86,9 @@
19
 
20
         private:
21
 
22
+    StHandle<StInt32Param>   myPlace;     //!< placement
23
+    StHandle<StFloat32Param> myTopDY;     //!< displacement
24
+    StHandle<StFloat32Param> myBottomDY;  //!< displacement
25
     StHandle<StFloat32Param> myFontSize;  //!< font size parameter
26
     StHandle<StFloat32Param> myParallax;  //!< text parallax
27
     StHandle<StEnumParam>    myParser;    //!< text parser option
28
sview-15_08.tar.gz/include/StGLWidgets/StGLTextArea.h -> sview-15_10.tar.gz/include/StGLWidgets/StGLTextArea.h Changed
12
 
1
@@ -50,8 +50,9 @@
2
 
3
     /**
4
      * @param theText new text to draw
5
+     * @return true if text has been changed
6
      */
7
-    ST_CPPEXPORT void setText(const StString& theText);
8
+    ST_CPPEXPORT bool setText(const StString& theText);
9
 
10
     /**
11
      * Setup alignment style.
12
sview-15_08.tar.gz/include/StGLWidgets/StGLTextureButton.h -> sview-15_10.tar.gz/include/StGLWidgets/StGLTextureButton.h Changed
25
 
1
@@ -171,9 +171,23 @@
2
                           const StGLCorner theCorner = StGLCorner(ST_VCORNER_TOP, ST_HCORNER_LEFT),
3
                           const size_t     theFacesCount = 1);
4
 
5
+    ST_CPPEXPORT virtual ~StGLIcon();
6
+
7
     ST_CPPEXPORT virtual bool tryClick(const StPointD_t& cursorZo, const int& mouseBtn, bool& isItemClicked);
8
     ST_CPPEXPORT virtual bool tryUnClick(const StPointD_t& cursorZo, const int& mouseBtn, bool& isItemUnclicked);
9
 
10
+    /**
11
+     * Define externally managed textures.
12
+     */
13
+    ST_LOCAL void setExternalTextures(const StHandle<StGLTextureArray>& theTextures) {
14
+        myTextures          = theTextures;
15
+        myIsExternalTexture = true;
16
+    }
17
+
18
+        protected:
19
+
20
+    bool myIsExternalTexture; //!< flag indicating that assigned texture should not be released
21
+
22
 };
23
 
24
 #endif // __StGLTextureButton_h_
25
sview-15_08.tar.gz/include/StGLWidgets/StGLWidget.h -> sview-15_10.tar.gz/include/StGLWidgets/StGLWidget.h Changed
51
 
1
@@ -182,9 +182,9 @@
2
     /**
3
      * Assign new area rectangle for modification and set IsResized flag on.
4
      */
5
-    ST_LOCAL void setRectPx(const StRectI_t& rectPx) {
6
+    ST_LOCAL void setRectPx(const StRectI_t& theRectPx) {
7
         myIsResized = true;
8
-        this->rectPx = rectPx;
9
+        this->rectPx = theRectPx;
10
     }
11
 
12
     /**
13
@@ -197,6 +197,11 @@
14
     }
15
 
16
     /**
17
+     * Return true if widget has been marked resized, but not yet updated.
18
+     */
19
+    ST_LOCAL bool wasResized() const { return myIsResized; }
20
+
21
+    /**
22
      * Function returns <i>global</i> area rectangle (in pixels).
23
      * @return rectangle
24
      */
25
@@ -238,6 +243,14 @@
26
     }
27
 
28
     /**
29
+     * Check visibility of this widget taking into account visibility of parents.
30
+     */
31
+    ST_LOCAL bool isVisibleWithParents() const {
32
+        return myOpacity > 0.0f
33
+            && (myParent == NULL || myParent->isVisibleWithParents());
34
+    }
35
+
36
+    /**
37
      * Return opacity value.
38
      */
39
     ST_LOCAL float getOpacity() const {
40
@@ -347,8 +360,8 @@
41
     /**
42
      * @param userData user-defined data
43
      */
44
-    inline void setUserData(const size_t userData) {
45
-        this->userData = userData;
46
+    inline void setUserData(const size_t theUserData) {
47
+        this->userData = theUserData;
48
     }
49
 
50
     /**
51
sview-15_08.tar.gz/include/StSettings/StFloat32Param.h -> sview-15_10.tar.gz/include/StSettings/StFloat32Param.h Changed
16
 
1
@@ -27,6 +27,14 @@
2
         return myMinValue;
3
     }
4
 
5
+    bool hasMinValue() const {
6
+        return myMinValue != -1E+37f;
7
+    }
8
+
9
+    bool hasMaxValue() const {
10
+        return myMaxValue !=  1E+37f;
11
+    }
12
+
13
     float getMaxValue() const {
14
         return myMaxValue;
15
     }
16
sview-15_08.tar.gz/include/StSettings/StSettings.h -> sview-15_10.tar.gz/include/StSettings/StSettings.h Changed
57
 
1
@@ -1,5 +1,5 @@
2
 /**
3
- * Copyright © 2007-2014 Kirill Gavrilov
4
+ * Copyright © 2007-2015 Kirill Gavrilov
5
  *
6
  * Distributed under the Boost Software License, Version 1.0.
7
  * See accompanying file license-boost.txt or copy at
8
@@ -52,6 +52,18 @@
9
      */
10
     ST_CPPEXPORT virtual ~StSettings();
11
 
12
+    /**
13
+     * Immediately write settings into external storage (e.g. file).
14
+     * Has no effect on implementations storing data on saving each individual parameter.
15
+     *
16
+     * Usually settings will be stored automatically within class destruction.
17
+     * This method can be used to perform this more frequently in environments
18
+     * where application can be destroyed in unsafe way.
19
+     *
20
+     * @return true if settings have been saved
21
+     */
22
+    ST_CPPEXPORT bool flush();
23
+
24
         public: //! @name persistence implementation
25
 
26
     /**
27
@@ -219,10 +231,11 @@
28
 
29
         private:
30
 
31
-#ifndef _WIN32
32
+    /**
33
+     * Read settings from external storage.
34
+     * Called within main constructor.
35
+     */
36
     ST_LOCAL bool load();
37
-    ST_LOCAL bool save();
38
-#endif
39
 
40
         private:
41
 
42
@@ -233,10 +246,11 @@
43
     StString             myFilePath;
44
     NSMutableDictionary* myDict;
45
 #else
46
-    StString             myFullFileName;
47
-    libconfig::Config*   myConfig;
48
-    bool                 myIsLoaded;
49
+    StString             myFullFileName;  //!< path to the file
50
+    libconfig::Config*   myConfig;        //!< config instance
51
+    bool                 myIsLoaded;      //!< flag indicating last parsing state
52
 #endif
53
+    bool                 myToFlush;       //!< settings have been changed but not yet saved
54
 
55
 };
56
 
57
sview-15_08.tar.gz/include/StTemplates/StHandle.h -> sview-15_10.tar.gz/include/StTemplates/StHandle.h Changed
22
 
1
@@ -173,16 +173,16 @@
2
     /**
3
      * Cast handle to contained type
4
      */
5
-    inline Type* operator->() {
6
+    inline Type* operator->() const {
7
         return myEntity->myPointer;
8
     }
9
 
10
     /**
11
      * Cast handle to contained type
12
      */
13
-    inline const Type* operator->() const {
14
-        return myEntity->myPointer;
15
-    }
16
+    //inline const Type* operator->() const {
17
+    //    return myEntity->myPointer;
18
+    //}
19
 
20
     /**
21
      * Cast handle to contained type
22
sview-15_10.tar.gz/include/StTemplates/StQuaternion.h Added
96
 
1
@@ -0,0 +1,94 @@
2
+/**
3
+ * Copyright © 2015 Kirill Gavrilov <kirill@sview.ru>
4
+ *
5
+ * Distributed under the Boost Software License, Version 1.0.
6
+ * See accompanying file license-boost.txt or copy at
7
+ * http://www.boost.org/LICENSE_1_0.txt
8
+ */
9
+
10
+#ifndef __StQuaternion_h_
11
+#define __StQuaternion_h_
12
+
13
+#include <StTemplates/StVec4.h>
14
+
15
+template<typename Element_t>
16
+class StQuaternion {
17
+
18
+        public:
19
+
20
+    /**
21
+     * Construct identity quaternion.
22
+     */
23
+    StQuaternion() : myV((Element_t )0, (Element_t )0, (Element_t )0, (Element_t )1) {}
24
+
25
+    /**
26
+     * Construct quaternion from component values.
27
+     */
28
+    StQuaternion(const Element_t theX, const Element_t theY, const Element_t theZ, const Element_t theW)
29
+    : myV(theX, theY, theZ, theW) {}
30
+
31
+    /**
32
+     * Construct orientation as rotation around axis.
33
+     */
34
+    StQuaternion(const StVec3<Element_t>& theAxis,
35
+                 const Element_t          theAngle) {
36
+        setVectorAndAngle(theAxis, theAngle);
37
+    }
38
+
39
+    /**
40
+     * Setup orientation as rotation around axis.
41
+     */
42
+    void setVectorAndAngle(const StVec3<Element_t>& theAxis,
43
+                           const Element_t          theAngle) {
44
+        StVec3<Element_t> anAxis = theAxis.normalized();
45
+        Element_t anAngleHalf = Element_t(0.5) * theAngle;
46
+        Element_t aSin        = std::sin(anAngleHalf);
47
+        myV.x() = anAxis.x() * aSin;
48
+        myV.y() = anAxis.y() * aSin;
49
+        myV.z() = anAxis.z() * aSin;
50
+        myV.w() = std::cos(anAngleHalf);
51
+    }
52
+
53
+    /**
54
+     * Return quaternion components.
55
+     */
56
+    const StVec4<Element_t>& vec4() const { return myV; }
57
+
58
+    /**
59
+     * Get x component.
60
+     */
61
+    Element_t x() const { return myV.x(); }
62
+
63
+    /**
64
+     * Get y component.
65
+     */
66
+    Element_t y() const { return myV.y(); }
67
+
68
+    /**
69
+     * Get z component.
70
+     */
71
+    Element_t z() const { return myV.z(); }
72
+
73
+    /**
74
+     * Get w component.
75
+     */
76
+    Element_t w() const { return myV.w(); }
77
+
78
+    /**
79
+     * Multiply two quaternions (e.g. rotate object by theQ2 and then by theQ1 - order is important!).
80
+     */
81
+    static StQuaternion multiply(const StQuaternion& theQ1,
82
+                                 const StQuaternion& theQ2) {
83
+        return StQuaternion(theQ1.w() * theQ2.x() + theQ1.x() * theQ2.w() + theQ1.y() * theQ2.z() - theQ1.z() * theQ2.y(),
84
+                            theQ1.w() * theQ2.y() + theQ1.y() * theQ2.w() + theQ1.z() * theQ2.x() - theQ1.x() * theQ2.z(),
85
+                            theQ1.w() * theQ2.z() + theQ1.z() * theQ2.w() + theQ1.x() * theQ2.y() - theQ1.y() * theQ2.x(),
86
+                            theQ1.w() * theQ2.w() - theQ1.x() * theQ2.x() - theQ1.y() * theQ2.y() - theQ1.z() * theQ2.z());
87
+    }
88
+
89
+        private:
90
+
91
+    StVec4<Element_t> myV;
92
+
93
+};
94
+
95
+#endif //__StQuaternion_h_
96
sview-15_08.tar.gz/include/StTemplates/StVec4.h -> sview-15_10.tar.gz/include/StTemplates/StVec4.h Changed
29
 
1
@@ -1,5 +1,5 @@
2
 /**
3
- * Copyright © 2010-2013 Kirill Gavrilov <kirill@sview.ru>
4
+ * Copyright © 2010-2015 Kirill Gavrilov <kirill@sview.ru>
5
  *
6
  * Distributed under the Boost Software License, Version 1.0.
7
  * See accompanying file license-boost.txt or copy at
8
@@ -250,6 +250,20 @@
9
         return result /= invFactor;
10
     }
11
 
12
+    /**
13
+     * Computes the vector modulus (magnitude, length).
14
+     */
15
+    Element_t modulus() const {
16
+        return std::sqrt(x() * x() + y() * y() + z() * z() + w() * w());
17
+    }
18
+
19
+    /**
20
+     * Computes the square of vector modulus (magnitude, length).
21
+     */
22
+    Element_t squareModulus() const {
23
+        return x() * x() + y() * y() + z() * z() + w() * w();
24
+    }
25
+
26
     StString toString() const {
27
         return StString('(') + x() + "; " + y() + "; " + z() + "; " + w() + ')';
28
     }
29
sview-15_08.tar.gz/include/StThreads/StResourceManager.h -> sview-15_10.tar.gz/include/StThreads/StResourceManager.h Changed
50
 
1
@@ -1,5 +1,5 @@
2
 /**
3
- * Copyright © 2014 Kirill Gavrilov <kirill@sview.ru>
4
+ * Copyright © 2014-2015 Kirill Gavrilov <kirill@sview.ru>
5
  *
6
  * Distributed under the Boost Software License, Version 1.0.
7
  * See accompanying file license-boost.txt or copy at
8
@@ -89,6 +89,19 @@
9
         public:
10
 
11
     /**
12
+     * The list of standard folders.
13
+     */
14
+    enum FolderId {
15
+        FolderId_Downloads,
16
+        FolderId_Pictures,
17
+        FolderId_Music,
18
+        FolderId_Videos,
19
+        FolderId_NB
20
+    };
21
+
22
+        public:
23
+
24
+    /**
25
      * Main constructor.
26
      */
27
     ST_CPPEXPORT StResourceManager(const StString& theAppName = "sview");
28
@@ -107,6 +120,13 @@
29
     ST_CPPEXPORT virtual ~StResourceManager();
30
 
31
     /**
32
+     * Return folder for specified task.
33
+     */
34
+    ST_LOCAL const StString& getFolder(const FolderId theId) const {
35
+        return myFolders[theId];
36
+    }
37
+
38
+    /**
39
      * Folder containing user-specific application data.
40
      */
41
     ST_LOCAL const StString& getUserDataFolder() const {
42
@@ -152,6 +172,7 @@
43
 
44
         protected:
45
 
46
+    StString       myFolders[FolderId_NB];
47
     StString       myAppName;        //!< application name - "sview" by default
48
     StString       myUserHomeFolder; //!< user home folder
49
     StString       myUserDataFolder; //!< folder for saving user-specific application data
50
sview-15_08.tar.gz/include/stTypes.h -> sview-15_10.tar.gz/include/stTypes.h Changed
27
 
1
@@ -525,8 +525,22 @@
2
     return isOddNumber(number) ? (number + 1) : number;
3
 }
4
 
5
-#ifdef __cplusplus
6
-    #include <StTemplates/StTemplates.h> // include commonly-used templates
7
-#endif
8
+#include <StTemplates/StTemplates.h> // include commonly-used templates
9
+
10
+/**
11
+ * Convert degrees to radians.
12
+ */
13
+template<typename Type>
14
+inline Type stToRadians(const Type theDegrees) {
15
+    return Type(3.14159265358979323846) * theDegrees / Type(180.0);
16
+}
17
+
18
+/**
19
+ * Convert radians to degrees.
20
+ */
21
+template<typename Type>
22
+inline Type stToDegrees(const Type theRadians) {
23
+    return Type(180.0) * theRadians / Type(3.14159265358979323846);
24
+}
25
 
26
 #endif //__stTypes_h_
27
sview-15_08.tar.gz/share/sView/demo/demo.jps -> sview-15_10.tar.gz/share/sView/demo/demo.jps Changed
sview-15_10.tar.gz/share/sView/demo/demo_robot.jps Added
sview-15_08.tar.gz/sview/AndroidManifest.xml -> sview-15_10.tar.gz/sview/AndroidManifest.xml Changed
12
 
1
@@ -1,8 +1,8 @@
2
 <?xml version="1.0" encoding="utf-8"?>
3
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
4
           package="com.sview"
5
-          android:versionCode="6"
6
-          android:versionName="15.08">
7
+          android:versionCode="8"
8
+          android:versionName="15.10">
9
     <application android:label="@string/app_name"
10
                  android:hasCode="true"
11
                  android:icon="@drawable/ic_launcher">
12
sview-15_08.tar.gz/sview/jni/main.cpp -> sview-15_10.tar.gz/sview/jni/main.cpp Changed
34
 
1
@@ -1,7 +1,7 @@
2
 /**
3
  * This is source code for sView
4
  *
5
- * Copyright © Kirill Gavrilov, 2014
6
+ * Copyright © Kirill Gavrilov, 2014-2015
7
  */
8
 
9
 #if defined(__ANDROID__)
10
@@ -35,8 +35,8 @@
11
      * Choose and instantiate StApplication.
12
      */
13
     ST_LOCAL virtual void createApplication() override {
14
-        StMutexAuto aLock(myDndLock);
15
-        const StString aFileExtension = StFileNode::getExtension(myDndPath);
16
+        StMutexAuto aLock(myFetchLock);
17
+        const StString aFileExtension = StFileNode::getExtension(myCreatePath);
18
 
19
         StHandle<StOpenInfo> anInfo = new StOpenInfo();
20
         anInfo->setPath(myDndPath);
21
@@ -47,6 +47,12 @@
22
         const StMIMEList aMimeImg(ST_IMAGE_PLUGIN_MIME_CHAR);
23
         for(size_t aMimeIter = 0; aMimeIter < aMimeImg.size(); ++aMimeIter) {
24
             if(aFileExtension.isEqualsIgnoreCase(aMimeImg[aMimeIter].getExtension())) {
25
+                StArgumentsMap anArgs = anInfo->getArgumentsMap();
26
+                if(anInfo->isEmpty()) {
27
+                    anArgs.set(StDictEntry("last",    "true"));
28
+                }
29
+                anArgs.set(StDictEntry("toSaveRecent","true"));
30
+                anInfo->setArgumentsMap(anArgs);
31
                 myApp = new StImageViewer(aResMgr, this, anInfo);
32
                 return;
33
             }
34
sview-15_08.tar.gz/sview/sViewMake.cbp -> sview-15_10.tar.gz/sview/sViewMake.cbp Changed
50
 
1
@@ -3,8 +3,9 @@
2
    <FileVersion major="1" minor="6" />
3
    <Project>
4
        <Option title="sViewMakefile" />
5
+       <Option makefile="$(PROJECT_DIRECTORY)../Makefile" />
6
        <Option makefile_is_custom="1" />
7
-       <Option execution_dir="/home/kirill/develop/sview" />
8
+       <Option execution_dir="$(PROJECT_DIRECTORY).." />
9
        <Option pch_mode="2" />
10
        <Option compiler="gcc" />
11
        <Build>
12
@@ -15,12 +16,12 @@
13
                <Option type="1" />
14
                <Option compiler="gcc" />
15
                <MakeCommands>
16
-                   <Build command="$make -f $makefile all" />
17
-                   <CompileFile command="$make -f $makefile $file" />
18
-                   <Clean command="$make -f $makefile clean" />
19
-                   <DistClean command="$make -f $makefile distclean$target" />
20
-                   <AskRebuildNeeded command="$make -q -f $makefile all" />
21
-                   <SilentBuild command="$make -f $makefile all &gt; $(CMD_NULL)" />
22
+                   <Build command="$make -j6 --directory=$(PROJECT_DIRECTORY).. -f $makefile all" />
23
+                   <CompileFile command="$make --directory=$(PROJECT_DIRECTORY).. -f $makefile $file" />
24
+                   <Clean command="$make --directory=$(PROJECT_DIRECTORY).. -f $makefile clean" />
25
+                   <DistClean command="$make --directory=$(PROJECT_DIRECTORY).. -f $makefile distclean$target" />
26
+                   <AskRebuildNeeded command="$make -j6 --directory=$(PROJECT_DIRECTORY).. -q -f $makefile all" />
27
+                   <SilentBuild command="$make --directory=$(PROJECT_DIRECTORY).. -f $makefile all &gt; $(CMD_NULL)" />
28
                </MakeCommands>
29
            </Target>
30
            <Target title="make_android">
31
@@ -28,12 +29,12 @@
32
                <Option type="0" />
33
                <Option compiler="gcc" />
34
                <MakeCommands>
35
-                   <Build command="$make -f $makefile android" />
36
-                   <CompileFile command="$make -f $makefile $file" />
37
-                   <Clean command="$make -f $makefile clean" />
38
-                   <DistClean command="$make -f $makefile distclean$target" />
39
-                   <AskRebuildNeeded command="$make -q -f $makefile android" />
40
-                   <SilentBuild command="$make -f $makefile android &gt; $(CMD_NULL)" />
41
+                   <Build command="$make -j6 --directory=$(PROJECT_DIRECTORY).. -f $makefile android" />
42
+                   <CompileFile command="$make --directory=$(PROJECT_DIRECTORY).. -f $makefile $file" />
43
+                   <Clean command="$make --directory=$(PROJECT_DIRECTORY).. -f $makefile clean" />
44
+                   <DistClean command="$make --directory=$(PROJECT_DIRECTORY).. -f $makefile distclean$target" />
45
+                   <AskRebuildNeeded command="$make -j6 --directory=$(PROJECT_DIRECTORY).. -q -f $makefile android" />
46
+                   <SilentBuild command="$make --directory=$(PROJECT_DIRECTORY).. -f $makefile android &gt; $(CMD_NULL)" />
47
                </MakeCommands>
48
            </Target>
49
        </Build>
50
sview-15_08.tar.gz/sview/src/com/sview/StActivity.java -> sview-15_10.tar.gz/sview/src/com/sview/StActivity.java Changed
201
 
1
@@ -12,13 +12,19 @@
2
 import android.content.ContextWrapper;
3
 import android.content.DialogInterface;
4
 import android.content.Intent;
5
+import android.hardware.Sensor;
6
+import android.hardware.SensorEvent;
7
+import android.hardware.SensorEventListener;
8
+import android.hardware.SensorManager;
9
 import android.os.Bundle;
10
 import android.widget.Toast;
11
 
12
 /**
13
  * Customize NativeActivity
14
  */
15
-public class StActivity extends NativeActivity {
16
+public class StActivity extends NativeActivity implements SensorEventListener {
17
+
18
+//region Native libraries loading routines
19
 
20
     /**
21
      * Auxiliary method to close activity on critical error
22
@@ -50,17 +56,17 @@
23
             theErrors.append(theLibName);
24
             theErrors.append("\" has been loaded\n");
25
             return true;
26
-       } catch(java.lang.UnsatisfiedLinkError theError) {
27
+        } catch(java.lang.UnsatisfiedLinkError theError) {
28
             theErrors.append("Error: native library \"");
29
             theErrors.append(theLibName);
30
             theErrors.append("\" is unavailable:\n  " + theError.getMessage());
31
             return false;
32
-       } catch(SecurityException theError) {
33
+        } catch(SecurityException theError) {
34
             theErrors.append("Error: native library \"");
35
             theErrors.append(theLibName);
36
             theErrors.append("\" can not be loaded for security reasons:\n  " + theError.getMessage());
37
             return false;
38
-       }
39
+        }
40
     }
41
 
42
     private static boolean wasNativesLoadCalled = false;
43
@@ -105,6 +111,10 @@
44
         return true;
45
     }
46
 
47
+//endregion
48
+
49
+//region Overridden methods of NativeActivity class
50
+
51
     /**
52
      * Create activity.
53
      */
54
@@ -117,6 +127,14 @@
55
         myContext = new ContextWrapper(this);
56
         myContext.getExternalFilesDir(null);
57
 
58
+        mySensorMgr = (SensorManager )getSystemService(Context.SENSOR_SERVICE);
59
+        mySensorOri = mySensorMgr.getDefaultSensor(Sensor.TYPE_ROTATION_VECTOR);
60
+        if(mySensorOri == null) {
61
+            myIsPoorOri = true;
62
+            mySensorOri = mySensorMgr.getDefaultSensor(Sensor.TYPE_ORIENTATION);
63
+        } else {
64
+            myIsPoorOri = mySensorMgr.getDefaultSensor(Sensor.TYPE_GYROSCOPE) == null;
65
+        }
66
         super.onCreate(theSavedInstanceState);
67
     }
68
 
69
@@ -130,14 +148,139 @@
70
     }
71
 
72
     /**
73
+     * Handle resume event.
74
+     */
75
+    @Override
76
+    protected void onResume() {
77
+        super.onResume();
78
+        if(myToTrackOrient) {
79
+            updateTrackOrientation(true);
80
+        }
81
+    }
82
+
83
+    /**
84
+     * Handle pause event.
85
+     */
86
+    @Override
87
+    protected void onPause() {
88
+       super.onPause();
89
+       updateTrackOrientation(false);
90
+    }
91
+
92
+    /**
93
+     * Redirect back button to C++ level.
94
+     */
95
+    @Override
96
+    public void onBackPressed() {
97
+        if(myCppGlue != 0) {
98
+            cppOnBackPressed(myCppGlue);
99
+        } else {
100
+            super.onBackPressed();
101
+        }
102
+    }
103
+
104
+//endregion
105
+
106
+//region Implementation of SensorEventListener interface
107
+
108
+    @Override
109
+    public void onAccuracyChanged(Sensor theSensor, int theAccuracy) {}
110
+
111
+    /**
112
+     * Fetch new orientation quaternion.
113
+     */
114
+    @Override
115
+    public void onSensorChanged(SensorEvent theEvent) {
116
+        if(myCppGlue == 0) {
117
+            return;
118
+        }
119
+
120
+        float aScreenRot = 0.0f;
121
+        switch(getWindowManager().getDefaultDisplay().getRotation()) {
122
+            case android.view.Surface.ROTATION_0:   aScreenRot = 0.0f;   break;
123
+            case android.view.Surface.ROTATION_90:  aScreenRot = 90.0f;  break;
124
+            case android.view.Surface.ROTATION_180: aScreenRot = 180.0f; break;
125
+            case android.view.Surface.ROTATION_270: aScreenRot = 270.0f; break;
126
+        }
127
+
128
+        switch(theEvent.sensor.getType()) {
129
+            case Sensor.TYPE_ORIENTATION: {
130
+                cppSetOrientation(myCppGlue, theEvent.values[0], theEvent.values[1], theEvent.values[2], aScreenRot);
131
+                return;
132
+            }
133
+            case Sensor.TYPE_ROTATION_VECTOR: {
134
+                SensorManager.getQuaternionFromVector(myQuat, theEvent.values);
135
+                cppSetQuaternion(myCppGlue, myQuat[0], myQuat[1], myQuat[2], myQuat[3], aScreenRot);
136
+                return;
137
+            }
138
+        }
139
+    }
140
+
141
+//endregion
142
+
143
+//region Auxiliary methods
144
+
145
+    /**
146
+     * Wrapper to turn orientation sensor on/off (regardless off myToTrackOrient flag).
147
+     */
148
+    protected void updateTrackOrientation(boolean theToTrack) {
149
+        if(mySensorOri == null) {
150
+            return;
151
+        }
152
+
153
+        if(theToTrack) {
154
+            mySensorMgr.registerListener(this, mySensorOri, SensorManager.SENSOR_DELAY_FASTEST);
155
+        } else {
156
+            mySensorMgr.unregisterListener(this);
157
+        }
158
+    }
159
+
160
+//endregion
161
+
162
+//region Methods to be called from C++ level
163
+
164
+    /**
165
+     * Method is called when StAndroidGlue has been created (BEFORE starting application thread!)
166
+     * or during destruction.
167
+     */
168
+    public void setCppInstance(long theCppInstance) {
169
+        myCppGlue = theCppInstance;
170
+        if(myCppGlue != 0) {
171
+            cppDefineOrientationSensor(myCppGlue, mySensorOri != null, myIsPoorOri);
172
+            if(myToTrackOrient) {
173
+                updateTrackOrientation(true);
174
+            }
175
+        } else {
176
+            updateTrackOrientation(false);
177
+        }
178
+    }
179
+
180
+    /**
181
+     * Method to turn orientation sensor on/off.
182
+     */
183
+    public void setTrackOrientation(boolean theToTrack) {
184
+        final boolean toTrack = theToTrack;
185
+        this.runOnUiThread (new Runnable() { public void run() {
186
+            if(myToTrackOrient == toTrack
187
+            || mySensorOri     == null) {
188
+                myToTrackOrient = toTrack;
189
+                return;
190
+            }
191
+
192
+            myToTrackOrient = toTrack;
193
+            updateTrackOrientation(toTrack);
194
+        }});
195
+    }
196
+
197
+    /**
198
      * Auxiliary method to show temporary info message.
199
      */
200
     public void postToast(String theInfo) {
201
sview-15_10.tar.gz/textures/actionFile128.png Added
sview-15_10.tar.gz/textures/actionFile144.png Added
sview-15_10.tar.gz/textures/actionFile16.png Added
sview-15_10.tar.gz/textures/actionFile192.png Added
sview-15_10.tar.gz/textures/actionFile24.png Added
sview-15_10.tar.gz/textures/actionFile256.png Added
sview-15_10.tar.gz/textures/actionFile32.png Added
sview-15_10.tar.gz/textures/actionFile48.png Added
sview-15_10.tar.gz/textures/actionFile64.png Added
sview-15_10.tar.gz/textures/actionFile72.png Added
sview-15_10.tar.gz/textures/actionFile96.png Added
sview-15_10.tar.gz/textures/actionPanorama128.png Added
sview-15_10.tar.gz/textures/actionPanorama144.png Added
sview-15_10.tar.gz/textures/actionPanorama16.png Added
sview-15_10.tar.gz/textures/actionPanorama192.png Added
sview-15_10.tar.gz/textures/actionPanorama24.png Added
sview-15_10.tar.gz/textures/actionPanorama256.png Added
sview-15_10.tar.gz/textures/actionPanorama32.png Added
sview-15_10.tar.gz/textures/actionPanorama48.png Added
sview-15_10.tar.gz/textures/actionPanorama64.png Added
sview-15_10.tar.gz/textures/actionPanorama72.png Added
sview-15_10.tar.gz/textures/actionPanorama96.png Added
sview-15_10.tar.gz/textures/actionPanoramaOff128.png Added
sview-15_10.tar.gz/textures/actionPanoramaOff144.png Added
sview-15_10.tar.gz/textures/actionPanoramaOff16.png Added
sview-15_10.tar.gz/textures/actionPanoramaOff192.png Added
sview-15_10.tar.gz/textures/actionPanoramaOff24.png Added
sview-15_10.tar.gz/textures/actionPanoramaOff256.png Added
sview-15_10.tar.gz/textures/actionPanoramaOff32.png Added
sview-15_10.tar.gz/textures/actionPanoramaOff48.png Added
sview-15_10.tar.gz/textures/actionPanoramaOff64.png Added
sview-15_10.tar.gz/textures/actionPanoramaOff72.png Added
sview-15_10.tar.gz/textures/actionPanoramaOff96.png Added
sview-15_10.tar.gz/textures/actionStreamAudioOff128.png Added
sview-15_10.tar.gz/textures/actionStreamAudioOff144.png Added
sview-15_10.tar.gz/textures/actionStreamAudioOff16.png Added
sview-15_10.tar.gz/textures/actionStreamAudioOff192.png Added
sview-15_10.tar.gz/textures/actionStreamAudioOff24.png Added
sview-15_10.tar.gz/textures/actionStreamAudioOff256.png Added
sview-15_10.tar.gz/textures/actionStreamAudioOff32.png Added
sview-15_10.tar.gz/textures/actionStreamAudioOff48.png Added
sview-15_10.tar.gz/textures/actionStreamAudioOff64.png Added
sview-15_10.tar.gz/textures/actionStreamAudioOff72.png Added
sview-15_10.tar.gz/textures/actionStreamAudioOff96.png Added
sview-15_10.tar.gz/textures/actionStreamSubtitlesOff128.png Added
sview-15_10.tar.gz/textures/actionStreamSubtitlesOff144.png Added
sview-15_10.tar.gz/textures/actionStreamSubtitlesOff16.png Added
sview-15_10.tar.gz/textures/actionStreamSubtitlesOff192.png Added
sview-15_10.tar.gz/textures/actionStreamSubtitlesOff24.png Added
sview-15_10.tar.gz/textures/actionStreamSubtitlesOff256.png Added
sview-15_10.tar.gz/textures/actionStreamSubtitlesOff32.png Added
sview-15_10.tar.gz/textures/actionStreamSubtitlesOff48.png Added
sview-15_10.tar.gz/textures/actionStreamSubtitlesOff64.png Added
sview-15_10.tar.gz/textures/actionStreamSubtitlesOff72.png Added
sview-15_10.tar.gz/textures/actionStreamSubtitlesOff96.png Added
sview-15_10.tar.gz/textures/menuDual128.png Added
sview-15_10.tar.gz/textures/menuDual144.png Added
sview-15_10.tar.gz/textures/menuDual16.png Added
sview-15_10.tar.gz/textures/menuDual192.png Added
sview-15_10.tar.gz/textures/menuDual24.png Added
sview-15_10.tar.gz/textures/menuDual256.png Added
sview-15_10.tar.gz/textures/menuDual32.png Added
sview-15_10.tar.gz/textures/menuDual48.png Added
sview-15_10.tar.gz/textures/menuDual64.png Added
sview-15_10.tar.gz/textures/menuDual72.png Added
sview-15_10.tar.gz/textures/menuDual96.png Added
sview-15_10.tar.gz/texturesSrc/actionFile.svg Added
72
 
1
@@ -0,0 +1,70 @@
2
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
3
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
4
+
5
+<svg
6
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
7
+   xmlns:cc="http://creativecommons.org/ns#"
8
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
9
+   xmlns:svg="http://www.w3.org/2000/svg"
10
+   xmlns="http://www.w3.org/2000/svg"
11
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
12
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
13
+   width="32"
14
+   height="32"
15
+   id="svg2"
16
+   version="1.1"
17
+   inkscape:version="0.48.5 r10040"
18
+   sodipodi:docname="actionFile.svg"
19
+   inkscape:export-filename="actionFile.png"
20
+   inkscape:export-xdpi="90"
21
+   inkscape:export-ydpi="90">
22
+  <defs
23
+     id="defs4" />
24
+  <sodipodi:namedview
25
+     id="base"
26
+     pagecolor="#ffffff"
27
+     bordercolor="#666666"
28
+     borderopacity="1.0"
29
+     inkscape:pageopacity="1"
30
+     inkscape:pageshadow="2"
31
+     inkscape:zoom="16"
32
+     inkscape:cx="15.611319"
33
+     inkscape:cy="19.490394"
34
+     inkscape:document-units="px"
35
+     inkscape:current-layer="layer1"
36
+     showgrid="false"
37
+     inkscape:window-width="2560"
38
+     inkscape:window-height="1364"
39
+     inkscape:window-x="-9"
40
+     inkscape:window-y="-9"
41
+     inkscape:window-maximized="1" />
42
+  <metadata
43
+     id="metadata7">
44
+    <rdf:RDF>
45
+      <cc:Work
46
+         rdf:about="">
47
+        <dc:format>image/svg+xml</dc:format>
48
+        <dc:type
49
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
50
+        <dc:title />
51
+      </cc:Work>
52
+    </rdf:RDF>
53
+  </metadata>
54
+  <g
55
+     inkscape:label="Layer 1"
56
+     inkscape:groupmode="layer"
57
+     id="layer1"
58
+     transform="translate(0,-1020.3622)">
59
+    <path
60
+       d="m 0,1020.3622 h 32 v 32 H 0 z"
61
+       id="path5998"
62
+       inkscape:connector-curvature="0"
63
+       style="fill:none" />
64
+    <path
65
+       style="fill:#000000;fill-opacity:1;stroke:none"
66
+       d="m 8.0625,1023.034 c -1.4735,0 -2.71875,1.0482 -2.71875,2.6564 l 0,13.3437 0,8 c 0,1.4734 1.18265,2.6563 2.65625,2.6563 l 16,0 c 1.4733,0 2.65625,-1.183 2.65625,-2.6563 l 0,-18.375 -5.75,-5.6251 z m 12.28125,1.3595 4.96875,4.9063 c 0.131547,0.1315 0.05739,0.4375 -0.1875,0.4375 l -4.53125,0 c -0.506916,0.019 -0.65817,-0.2807 -0.6875,-0.7188 l 0,-4.4687 c 0,-0.2934 0.23552,-0.3583 0.4375,-0.1563 z"
67
+       id="path3006"
68
+       inkscape:connector-curvature="0"
69
+       sodipodi:nodetypes="sscssssccsccccccc" />
70
+  </g>
71
+</svg>
72
sview-15_10.tar.gz/texturesSrc/actionPanorama.svg Added
74
 
1
@@ -0,0 +1,72 @@
2
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
3
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
4
+
5
+<svg
6
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
7
+   xmlns:cc="http://creativecommons.org/ns#"
8
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
9
+   xmlns:svg="http://www.w3.org/2000/svg"
10
+   xmlns="http://www.w3.org/2000/svg"
11
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
12
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
13
+   width="32"
14
+   height="32"
15
+   id="svg2"
16
+   version="1.1"
17
+   inkscape:version="0.48.5 r10040"
18
+   sodipodi:docname="actionPanorama.svg"
19
+   inkscape:export-filename="actionPanorama.png"
20
+   inkscape:export-xdpi="90"
21
+   inkscape:export-ydpi="90">
22
+  <defs
23
+     id="defs4" />
24
+  <sodipodi:namedview
25
+     id="base"
26
+     pagecolor="#ffffff"
27
+     bordercolor="#666666"
28
+     borderopacity="1.0"
29
+     inkscape:pageopacity="1"
30
+     inkscape:pageshadow="2"
31
+     inkscape:zoom="16"
32
+     inkscape:cx="15.609629"
33
+     inkscape:cy="18.000209"
34
+     inkscape:document-units="px"
35
+     inkscape:current-layer="layer1"
36
+     showgrid="false"
37
+     inkscape:window-width="1920"
38
+     inkscape:window-height="1004"
39
+     inkscape:window-x="-9"
40
+     inkscape:window-y="-9"
41
+     inkscape:window-maximized="1"
42
+     showguides="true"
43
+     inkscape:guide-bbox="true" />
44
+  <metadata
45
+     id="metadata7">
46
+    <rdf:RDF>
47
+      <cc:Work
48
+         rdf:about="">
49
+        <dc:format>image/svg+xml</dc:format>
50
+        <dc:type
51
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
52
+        <dc:title />
53
+      </cc:Work>
54
+    </rdf:RDF>
55
+  </metadata>
56
+  <g
57
+     inkscape:label="Layer 1"
58
+     inkscape:groupmode="layer"
59
+     id="layer1"
60
+     transform="translate(0,-1020.3622)">
61
+    <path
62
+       d="m 0,1020.3622 h 32 v 32 H 0 z"
63
+       id="path5998"
64
+       inkscape:connector-curvature="0"
65
+       style="fill:none" />
66
+    <path
67
+       sodipodi:nodetypes="ccccccccccc"
68
+       inkscape:connector-curvature="0"
69
+       id="path2984"
70
+       d="m 3.5063587,1046.9456 c 7.7876473,-4.5065 16.1588333,-4.5115 25.1131473,-0.018 l 0.0027,-21.0774 c -7.378842,3.4895 -17.670722,3.2974 -25.1157603,0 z m 15.1068073,-14.2561 5.950444,8.5923 c -5.687323,-1.7259 -11.408219,-2.3901 -16.860485,-0.1197 l 4.814396,-6.8289 2.404354,3.0736 z"
71
+       style="fill:#000000;fill-opacity:1;stroke:none" />
72
+  </g>
73
+</svg>
74
sview-15_10.tar.gz/texturesSrc/actionPanoramaOff.svg Added
78
 
1
@@ -0,0 +1,76 @@
2
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
3
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
4
+
5
+<svg
6
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
7
+   xmlns:cc="http://creativecommons.org/ns#"
8
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
9
+   xmlns:svg="http://www.w3.org/2000/svg"
10
+   xmlns="http://www.w3.org/2000/svg"
11
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
12
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
13
+   width="32"
14
+   height="32"
15
+   id="svg2"
16
+   version="1.1"
17
+   inkscape:version="0.48.5 r10040"
18
+   sodipodi:docname="actionPanoramaOff.svg"
19
+   inkscape:export-filename="actionPanoramaOff.png"
20
+   inkscape:export-xdpi="90"
21
+   inkscape:export-ydpi="90">
22
+  <defs
23
+     id="defs4" />
24
+  <sodipodi:namedview
25
+     id="base"
26
+     pagecolor="#ffffff"
27
+     bordercolor="#666666"
28
+     borderopacity="1.0"
29
+     inkscape:pageopacity="1"
30
+     inkscape:pageshadow="2"
31
+     inkscape:zoom="16"
32
+     inkscape:cx="15.609629"
33
+     inkscape:cy="18.000209"
34
+     inkscape:document-units="px"
35
+     inkscape:current-layer="layer1"
36
+     showgrid="false"
37
+     inkscape:window-width="1920"
38
+     inkscape:window-height="1004"
39
+     inkscape:window-x="-9"
40
+     inkscape:window-y="-9"
41
+     inkscape:window-maximized="1"
42
+     showguides="true"
43
+     inkscape:guide-bbox="true" />
44
+  <metadata
45
+     id="metadata7">
46
+    <rdf:RDF>
47
+      <cc:Work
48
+         rdf:about="">
49
+        <dc:format>image/svg+xml</dc:format>
50
+        <dc:type
51
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
52
+        <dc:title />
53
+      </cc:Work>
54
+    </rdf:RDF>
55
+  </metadata>
56
+  <g
57
+     inkscape:label="Layer 1"
58
+     inkscape:groupmode="layer"
59
+     id="layer1"
60
+     transform="translate(0,-1020.3622)">
61
+    <path
62
+       d="m 0,1020.3622 h 32 v 32 H 0 z"
63
+       id="path5998"
64
+       inkscape:connector-curvature="0"
65
+       style="fill:none" />
66
+    <path
67
+       style="fill:#000000;fill-opacity:1;stroke:none"
68
+       d="M 3.5 5.5 L 3.5 26.59375 C 10.211288 22.71011 17.359715 22.168001 24.9375 24.96875 L 22.125 22.15625 L 19.71875 19.75 C 15.645714 19.051532 11.595784 19.185036 7.6875 20.8125 L 12.53125 13.96875 L 14.9375 17.03125 L 15.84375 15.875 L 13.34375 13.375 L 7.15625 7.1875 L 6.65625 6.6875 L 6.6875 6.65625 C 5.5806328 6.323486 4.5155463 5.9497844 3.5 5.5 z M 28.625 5.5 C 23.507501 7.9200967 16.998384 8.5543072 11 7.625 L 17.34375 13.96875 L 18.625 12.3125 L 24.5625 20.90625 C 24.438001 20.868469 24.312028 20.849244 24.1875 20.8125 L 28.625 25.25 L 28.625 5.5 z "
69
+       transform="translate(0,1020.3622)"
70
+       id="path2984" />
71
+    <path
72
+       id="path3122"
73
+       d="m 4.6875,1025.0341 -1.71875,1.6875 0.5,0.5 6.1875,6.1875 8.78125,8.7813 5.5,5.5 1.71875,-1.6875 -20.96875,-20.9688 z"
74
+       inkscape:connector-curvature="0"
75
+       style="fill:#000000;fill-opacity:1;stroke:none" />
76
+  </g>
77
+</svg>
78
sview-15_10.tar.gz/texturesSrc/actionStreamAudioOff.svg Added
76
 
1
@@ -0,0 +1,74 @@
2
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
3
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
4
+
5
+<svg
6
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
7
+   xmlns:cc="http://creativecommons.org/ns#"
8
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
9
+   xmlns:svg="http://www.w3.org/2000/svg"
10
+   xmlns="http://www.w3.org/2000/svg"
11
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
12
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
13
+   width="32"
14
+   height="32"
15
+   id="svg2"
16
+   version="1.1"
17
+   inkscape:version="0.48.5 r10040"
18
+   sodipodi:docname="actionStreamAudioOff.svg"
19
+   inkscape:export-filename="actionStreamAudioOff.png"
20
+   inkscape:export-xdpi="90"
21
+   inkscape:export-ydpi="90">
22
+  <defs
23
+     id="defs4" />
24
+  <sodipodi:namedview
25
+     id="base"
26
+     pagecolor="#ffffff"
27
+     bordercolor="#666666"
28
+     borderopacity="1.0"
29
+     inkscape:pageopacity="1"
30
+     inkscape:pageshadow="2"
31
+     inkscape:zoom="11.313709"
32
+     inkscape:cx="62.163495"
33
+     inkscape:cy="13.93474"
34
+     inkscape:document-units="px"
35
+     inkscape:current-layer="layer1"
36
+     showgrid="false"
37
+     inkscape:window-width="2560"
38
+     inkscape:window-height="1364"
39
+     inkscape:window-x="-9"
40
+     inkscape:window-y="-9"
41
+     inkscape:window-maximized="1" />
42
+  <metadata
43
+     id="metadata7">
44
+    <rdf:RDF>
45
+      <cc:Work
46
+         rdf:about="">
47
+        <dc:format>image/svg+xml</dc:format>
48
+        <dc:type
49
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
50
+        <dc:title />
51
+      </cc:Work>
52
+    </rdf:RDF>
53
+  </metadata>
54
+  <g
55
+     inkscape:label="Layer 1"
56
+     inkscape:groupmode="layer"
57
+     id="layer1"
58
+     transform="translate(0,-1020.3622)">
59
+    <path
60
+       d="m 0,1020.3622 h 32 v 32 H 0 z"
61
+       id="path4"
62
+       inkscape:connector-curvature="0"
63
+       style="fill:none" />
64
+    <path
65
+       style="fill:#000000;fill-opacity:1"
66
+       d="M 4 8 L 4 10.65625 L 10.625 10.65625 L 7.96875 8 L 4 8 z M 11.375 8 L 14.03125 10.65625 L 20 10.65625 L 20 8 L 11.375 8 z M 22.65625 8 L 22.65625 18.90625 C 22.478039 18.841203 22.311431 18.790898 22.125 18.75 L 25.34375 21.96875 L 25.34375 10.65625 L 29.34375 10.65625 L 29.34375 8 L 22.65625 8 z M 4 13.34375 L 4 16 L 15.96875 16 L 13.3125 13.34375 L 4 13.34375 z M 16.71875 13.34375 L 19.375 16 L 20 16 L 20 13.34375 L 16.71875 13.34375 z M 4 18.65625 L 4 21.34375 L 14.65625 21.34375 L 14.65625 18.65625 L 4 18.65625 z M 19.25 19.28125 C 18.108742 19.986285 17.34375 21.218205 17.34375 22.65625 C 17.34375 24.86285 19.137084 26.65625 21.34375 26.65625 C 22.781773 26.65625 24.013708 25.891259 24.71875 24.75 L 21.8125 21.84375 L 19.25 19.28125 z "
67
+       transform="translate(0,1020.3622)"
68
+       id="path6" />
69
+    <path
70
+       id="path3122"
71
+       d="m 4.6875,1025.0341 -1.71875,1.6875 0.5,0.5 6.1875,6.1875 8.78125,8.7813 5.5,5.5 1.71875,-1.6875 -20.96875,-20.9688 z"
72
+       inkscape:connector-curvature="0"
73
+       style="fill:#000000;fill-opacity:1;stroke:none" />
74
+  </g>
75
+</svg>
76
sview-15_10.tar.gz/texturesSrc/actionStreamSubtitlesOff.svg Added
76
 
1
@@ -0,0 +1,74 @@
2
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
3
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
4
+
5
+<svg
6
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
7
+   xmlns:cc="http://creativecommons.org/ns#"
8
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
9
+   xmlns:svg="http://www.w3.org/2000/svg"
10
+   xmlns="http://www.w3.org/2000/svg"
11
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
12
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
13
+   width="32"
14
+   height="32"
15
+   id="svg2"
16
+   version="1.1"
17
+   inkscape:version="0.48.5 r10040"
18
+   sodipodi:docname="actionStreamSubtitlesOff.svg"
19
+   inkscape:export-filename="actionStreamSubtitlesOff.png"
20
+   inkscape:export-xdpi="90"
21
+   inkscape:export-ydpi="90">
22
+  <defs
23
+     id="defs4" />
24
+  <sodipodi:namedview
25
+     id="base"
26
+     pagecolor="#ffffff"
27
+     bordercolor="#666666"
28
+     borderopacity="1.0"
29
+     inkscape:pageopacity="1"
30
+     inkscape:pageshadow="2"
31
+     inkscape:zoom="16"
32
+     inkscape:cx="20.649495"
33
+     inkscape:cy="6.3567748"
34
+     inkscape:document-units="px"
35
+     inkscape:current-layer="layer1"
36
+     showgrid="false"
37
+     inkscape:window-width="2560"
38
+     inkscape:window-height="1364"
39
+     inkscape:window-x="-9"
40
+     inkscape:window-y="-9"
41
+     inkscape:window-maximized="1" />
42
+  <metadata
43
+     id="metadata7">
44
+    <rdf:RDF>
45
+      <cc:Work
46
+         rdf:about="">
47
+        <dc:format>image/svg+xml</dc:format>
48
+        <dc:type
49
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
50
+        <dc:title />
51
+      </cc:Work>
52
+    </rdf:RDF>
53
+  </metadata>
54
+  <g
55
+     inkscape:label="Layer 1"
56
+     inkscape:groupmode="layer"
57
+     id="layer1"
58
+     transform="translate(0,-1020.3622)">
59
+    <path
60
+       d="m 0,1020.3622 h 32 v 32 H 0 z"
61
+       id="path4"
62
+       inkscape:connector-curvature="0"
63
+       style="fill:none" />
64
+    <path
65
+       style="fill:#000000;fill-opacity:1"
66
+       d="M 5.34375 5.34375 C 3.8704167 5.34375 2.65625 6.5267 2.65625 8 L 2.65625 24 C 2.65625 25.4733 3.8704167 26.65625 5.34375 26.65625 L 26.65625 26.65625 L 24 24 L 21.34375 24 L 21.34375 21.34375 L 18.65625 18.65625 L 13.34375 18.65625 L 13.34375 16 L 16 16 L 13.0625 13.0625 L 6.875 6.875 L 5.34375 5.34375 z M 8.75 5.34375 L 19.40625 16 L 26.65625 16 L 26.65625 18.65625 L 22.0625 18.65625 L 24.75 21.34375 L 26.65625 21.34375 L 26.65625 23.25 L 28.875 25.46875 C 29.153405 25.047558 29.34375 24.542929 29.34375 24 L 29.34375 8 C 29.34375 6.5267 28.129583 5.34375 26.65625 5.34375 L 8.75 5.34375 z M 5.34375 16 L 10.65625 16 L 10.65625 18.65625 L 5.34375 18.65625 L 5.34375 16 z M 5.34375 21.34375 L 18.65625 21.34375 L 18.65625 24 L 5.34375 24 L 5.34375 21.34375 z "
67
+       transform="translate(0,1020.3622)"
68
+       id="path6" />
69
+    <path
70
+       id="path3122"
71
+       d="m 4.6875,1025.0341 -1.71875,1.6875 0.5,0.5 6.1875,6.1875 8.78125,8.7813 5.5,5.5 1.71875,-1.6875 -20.96875,-20.9688 z"
72
+       inkscape:connector-curvature="0"
73
+       style="fill:#000000;fill-opacity:1;stroke:none" />
74
+  </g>
75
+</svg>
76
sview-15_08.tar.gz/texturesSrc/menuSrcFormat.svg -> sview-15_10.tar.gz/texturesSrc/menuSrcFormat.svg Changed
125
 
1
@@ -14,7 +14,7 @@
2
    height="16"
3
    id="svg2"
4
    version="1.1"
5
-   inkscape:version="0.48.3.1 r9886"
6
+   inkscape:version="0.48.5 r10040"
7
    sodipodi:docname="menuSrcFormat.svg"
8
    inkscape:export-filename="/home/menuSbsLR16.png"
9
    inkscape:export-xdpi="90"
10
@@ -210,16 +210,16 @@
11
      borderopacity="1.0"
12
      inkscape:pageopacity="0.0"
13
      inkscape:pageshadow="2"
14
-     inkscape:zoom="11.313708"
15
-     inkscape:cx="3.695895"
16
-     inkscape:cy="23.911929"
17
+     inkscape:zoom="31.999999"
18
+     inkscape:cx="8.3167614"
19
+     inkscape:cy="6.1548109"
20
      inkscape:document-units="px"
21
-     inkscape:current-layer="g4541"
22
+     inkscape:current-layer="layer8"
23
      showgrid="false"
24
      inkscape:window-width="1920"
25
-     inkscape:window-height="1109"
26
-     inkscape:window-x="0"
27
-     inkscape:window-y="0"
28
+     inkscape:window-height="1004"
29
+     inkscape:window-x="-9"
30
+     inkscape:window-y="-9"
31
      inkscape:window-maximized="1"
32
      inkscape:snap-grids="true" />
33
   <metadata
34
@@ -230,7 +230,7 @@
35
         <dc:format>image/svg+xml</dc:format>
36
         <dc:type
37
            rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
38
-        <dc:title></dc:title>
39
+        <dc:title />
40
       </cc:Work>
41
     </rdf:RDF>
42
   </metadata>
43
@@ -238,7 +238,8 @@
44
      inkscape:label="Rectangle"
45
      inkscape:groupmode="layer"
46
      id="layer1"
47
-     transform="translate(0,-1036.3622)">
48
+     transform="translate(0,-1036.3622)"
49
+     sodipodi:insensitive="true">
50
     <rect
51
        style="fill:#c8c8c8;fill-opacity:1;stroke:#000000;stroke-width:0.99977112;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
52
        id="rect2985"
53
@@ -979,9 +980,52 @@
54
   </g>
55
   <g
56
      inkscape:groupmode="layer"
57
+     id="layer8"
58
+     inkscape:label="DualStream">
59
+    <rect
60
+       y="2"
61
+       x="2"
62
+       height="8"
63
+       width="8"
64
+       id="rect4448-1"
65
+       style="fill:#808080;fill-opacity:1;stroke:none;display:inline" />
66
+    <text
67
+       xml:space="preserve"
68
+       style="font-size:8px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#fcfcfc;fill-opacity:1;stroke:none;display:inline;font-family:Sans"
69
+       x="3.3710938"
70
+       y="8.8398438"
71
+       id="text3829-8"
72
+       sodipodi:linespacing="125%"><tspan
73
+         sodipodi:role="line"
74
+         id="tspan3831-2"
75
+         x="3.3710938"
76
+         y="8.8398438"
77
+         style="font-weight:bold;-inkscape-font-specification:Sans Bold">L</tspan></text>
78
+    <rect
79
+       y="6"
80
+       x="6"
81
+       height="8"
82
+       width="8"
83
+       id="rect4448-2-9-0"
84
+       style="fill:#fcfcfc;fill-opacity:1;stroke:none;display:inline" />
85
+    <text
86
+       xml:space="preserve"
87
+       style="font-size:8px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:Sans"
88
+       x="6.8398438"
89
+       y="12.863281"
90
+       id="text3835-4"
91
+       sodipodi:linespacing="125%"><tspan
92
+         sodipodi:role="line"
93
+         id="tspan3837-5"
94
+         x="6.8398438"
95
+         y="12.863281"
96
+         style="font-weight:bold;-inkscape-font-specification:Sans Bold">R</tspan></text>
97
+  </g>
98
+  <g
99
+     inkscape:groupmode="layer"
100
      id="g4541"
101
      inkscape:label="Tiled720in1080"
102
-     style="display:inline">
103
+     style="display:none">
104
     <rect
105
        style="fill:#fcfcfc;fill-opacity:1;stroke:none;display:inline"
106
        id="rect4545"
107
@@ -991,7 +1035,7 @@
108
        y="2.9835343" />
109
     <text
110
        xml:space="preserve"
111
-       style="font-size:7.10074090999999985px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:url(#linearGradient4640);fill-opacity:1;stroke:none;display:inline;font-family:Sans"
112
+       style="font-size:7.10074091px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:url(#linearGradient4640);fill-opacity:1;stroke:none;display:inline;font-family:Sans"
113
        x="9.524538"
114
        y="9.9912825"
115
        id="text4046-0"
116
@@ -1001,7 +1045,7 @@
117
          id="tspan4048-7"
118
          x="9.524538"
119
          y="9.9912825"
120
-         style="font-weight:bold;-inkscape-font-specification:Sans Bold;fill-opacity:1;fill:url(#linearGradient4640)">R</tspan></text>
121
+         style="font-weight:bold;fill:url(#linearGradient4640);fill-opacity:1;-inkscape-font-specification:Sans Bold">R</tspan></text>
122
     <rect
123
        style="fill:#fcfcfc;fill-opacity:1;stroke:none;display:inline"
124
        id="rect4545-2"
125