Compare commits
No commits in common. "master" and "5a6aef942463c91bd27ed56f602c94e7b222895e" have entirely different histories.
master
...
5a6aef9424
|
@ -1,5 +1,4 @@
|
|||
/Debug
|
||||
/.settings
|
||||
/.vscode
|
||||
.project
|
||||
.cproject
|
||||
|
|
82
README.md
82
README.md
|
@ -1,83 +1,3 @@
|
|||
# GUI для FreeRDP
|
||||
|
||||
- Основано на базе [FreeRDP 2.10.0](https://github.com/FreeRDP/FreeRDP) ([локальная версия](http://git.belpig.ru/forks/FreeRDP))
|
||||
- Надстройка для FreeRDP на основе библиотеки [`IUP`](https://www.tecgraf.puc-rio.br/iup/).
|
||||
|
||||
![main.png](img/main.png)
|
||||
![settings.png](img/settings.png)
|
||||
|
||||
## Сборка программы
|
||||
|
||||
- [xrandr.patch](xrandr.patch) - исправления поиска библиотеки `Xrandr`
|
||||
- [gui.patch](gui.patch) - включение использования GUI в оригинальный проект `freerdp`
|
||||
|
||||
### Подготовка
|
||||
|
||||
Скопировать файлы из [freerdp](freerdp/) в оригинальный проект `(2.10.0)`:
|
||||
|
||||
```sh
|
||||
cp -r GUI-FreeRDP/freerdp/* freerdp-2.10.0/
|
||||
```
|
||||
|
||||
Перейти в оригинальный каталог:
|
||||
|
||||
```sh
|
||||
cd freerdp-2.10.0
|
||||
```
|
||||
|
||||
Применить патчи:
|
||||
|
||||
```sh
|
||||
git apply ../GUI-FreeRDP/gui.patch
|
||||
git apply ../GUI-FreeRDP/xrandr.patch
|
||||
```
|
||||
|
||||
## Сборка
|
||||
|
||||
Параметры сборки:
|
||||
|
||||
- `IUP_WITH_COLOR_BUTTONS` - поддержка цветных кнопок (по умолчанию `OFF`)
|
||||
- `IUP_WITH_SOUND_CHECKBOX` - поддержка параметров звука (по умолчанию `OFF`)
|
||||
- `IUP_DESCRIPTION_ABOUT_ARCH_X32` - в описании "О прогамме" отобразить пометку для x32 архитектур (по умолчанию `OFF`)
|
||||
- `IUP_WITH_LANGUAGE_KEYBOARD_ICON` - поддержка отображения раскладки клавиатуры (по умолчанию `OFF`)
|
||||
- `IUP_DESCRIPTION_ABOUT_MIRATORG` - в описании "О прогамме" отобразить рабочие контактные данные (по умолчанию `OFF`)
|
||||
|
||||
Создать отдельный каталог `build`:
|
||||
|
||||
```sh
|
||||
mkdir build
|
||||
cd build
|
||||
```
|
||||
|
||||
и выполнить в нём сборку:
|
||||
|
||||
```sh
|
||||
cmake -B . -S ../freerdp-2.10.0 \
|
||||
-DWITH_WAYLAND=OFF \
|
||||
-DWITH_OSS=OFF \
|
||||
-DWITH_ALSA=OFF \
|
||||
-DWITH_PULSE=OFF \
|
||||
-DWITH_CUPS=OFF \
|
||||
-DWITH_PCSC=OFF \
|
||||
-DWITH_FFMPEG=OFF \
|
||||
-DWITH_OPENSSL=ON \
|
||||
-DWITH_XV=OFF \
|
||||
-DWITH_FUSE=OFF \
|
||||
-DWITH_SWSCALE=OFF \
|
||||
-DWITH_CAIRO=OFF \
|
||||
-DWITH_DSP_FFMPEG=OFF \
|
||||
-DWITH_FAAC=OFF \
|
||||
-DWITH_SSE2=ON \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
-DIUP_WITH_COLOR_BUTTONS=ON \
|
||||
-DIUP_WITH_SOUND_CHECKBOX=OFF \
|
||||
-DIUP_DESCRIPTION_ABOUT_ARCH_X32=OFF \
|
||||
-DIUP_WITH_LANGUAGE_KEYBOARD_ICON=ON \
|
||||
-DIUP_DESCRIPTION_ABOUT_MIRATORG=ON
|
||||
```
|
||||
|
||||
и компиляцию программы:
|
||||
|
||||
```sh
|
||||
make -j16
|
||||
```
|
||||
Надстройка для FreeRDP на основе библиотеки [`IUP`](https://www.tecgraf.puc-rio.br/iup/).
|
||||
|
|
|
@ -10,23 +10,20 @@
|
|||
#include "node_settings.h"
|
||||
#include "concat.h"
|
||||
|
||||
#include "rxrandr.h"
|
||||
#include "db.h"
|
||||
#include "monitor.h"
|
||||
|
||||
void settingsLoad(char *pathDB)
|
||||
void settingsLoad()
|
||||
{
|
||||
getPathDB(pathDB);
|
||||
|
||||
dbLoadData();
|
||||
|
||||
Monitors *monitors = loadMonitors();
|
||||
for (size_t i = 0; i < monitors->size; ++i)
|
||||
{
|
||||
addParameterValue(PARAMETER_MONITORS, i, monitors->monitor[i]->data[3], !i);
|
||||
}
|
||||
|
||||
dbFreeMonitors(monitors);
|
||||
addParameterKey(PARAMETER_XFREERDP, "xfreerdp", true, true);
|
||||
addParameterKey(PARAMETER_SERVER, "/v:", true, true);
|
||||
addParameterKey(PARAMETER_USERNAME, "/u:", true, true);
|
||||
addParameterKey(PARAMETER_PASSWORD, "/p:", true, true);
|
||||
addParameterKey(PARAMETER_MULTIMONITOR, "/multimon", true, true);
|
||||
addParameterKey(PARAMETER_FULLSCREEN, "/f", true, true);
|
||||
addParameterKey(PARAMETER_AUTHENTICATION, "-authentication", true, true);
|
||||
addParameterKey(PARAMETER_SECURITY, "/sec:", true, true);
|
||||
addParameterValue(PARAMETER_SECURITY, VALUE_SECURITY_TLS, "tls", true);
|
||||
addParameterValue(PARAMETER_SECURITY, VALUE_SECURITY_RDP, "rdp", false);
|
||||
addParameterValue(PARAMETER_SECURITY, VALUE_SECURITY_NLA, "nla", false);
|
||||
addParameterValue(PARAMETER_SECURITY, VALUE_SECURITY_EXT, "ext", false);
|
||||
}
|
||||
|
||||
void settingsFree()
|
|
@ -17,7 +17,7 @@ typedef struct
|
|||
void buildArguments(Arguments *args);
|
||||
void freeArguments(Arguments *args);
|
||||
|
||||
void settingsLoad(char *pathDB);
|
||||
void settingsLoad();
|
||||
void settingsFree();
|
||||
|
||||
#endif /* ARGUMENTS_H_ */
|
|
@ -26,11 +26,11 @@ char* concat(char *s1, char *s2)
|
|||
|
||||
if (s1)
|
||||
{
|
||||
strncpy(result, s1, (len1 + 1));
|
||||
strcpy(result, s1);
|
||||
}
|
||||
if (s2)
|
||||
{
|
||||
strncpy(result + len1, s2, (len2 + 1));
|
||||
strcpy(result + len1, s2);
|
||||
}
|
||||
|
||||
return result;
|
BIN
freerdp.db
BIN
freerdp.db
Binary file not shown.
|
@ -1,32 +0,0 @@
|
|||
/*
|
||||
* about.c
|
||||
*
|
||||
* Created on: 16 февр. 2023 г.
|
||||
* Author: alexander
|
||||
*/
|
||||
|
||||
#include "about.h"
|
||||
|
||||
char* getAbout()
|
||||
{
|
||||
char *about =
|
||||
"GUI FreeRDP v1.2.0\n"
|
||||
"Собрано на основе FreeRDP v2.10.0\n"
|
||||
#ifdef IUP_DESCRIPTION_ABOUT_ARCH_X32
|
||||
"Для тонкого клиента архитектуры x32\n"
|
||||
#else
|
||||
"Для тонкого клиента архитектуры x64\n"
|
||||
#endif
|
||||
"Все вопросы оставлять по адресу:\n"
|
||||
#ifdef IUP_DESCRIPTION_ABOUT_MIRATORG
|
||||
"http://git.belpig.ru/a.zhirov/GUI-FreeRDP/issues\n"
|
||||
"Электронная почта: a.zhirov@agrohold.ru\n"
|
||||
"© Александр Жиров"
|
||||
#else
|
||||
"https://git.zhirov.kz/alexander/GUI-FreeRDP\n"
|
||||
"Электронная почта: alexander@zhirov.kz\n"
|
||||
"© Александр Жиров"
|
||||
#endif
|
||||
;
|
||||
return about;
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
/*
|
||||
* about.h
|
||||
*
|
||||
* Created on: 16 февр. 2023 г.
|
||||
* Author: alexander
|
||||
*/
|
||||
|
||||
#ifndef CLIENT_X11_CLI_ABOUT_H_
|
||||
#define CLIENT_X11_CLI_ABOUT_H_
|
||||
|
||||
char* getAbout();
|
||||
|
||||
#endif /* CLIENT_X11_CLI_ABOUT_H_ */
|
|
@ -1,29 +0,0 @@
|
|||
/*
|
||||
* address.c
|
||||
*
|
||||
* Created on: 15 июл. 2022 г.
|
||||
* Author: alexander
|
||||
*/
|
||||
|
||||
#include "address.h"
|
||||
|
||||
#include <netdb.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
char *getHostIP(char *dnsName)
|
||||
{
|
||||
char *result = NULL;
|
||||
struct hostent *he = gethostbyname(dnsName);
|
||||
if (he)
|
||||
{
|
||||
char *ip = inet_ntoa(*(struct in_addr*)he->h_addr);
|
||||
size_t size = strlen(ip) + 1;
|
||||
result = (char *)malloc(sizeof(char) * size);
|
||||
strncpy(result, ip, size);
|
||||
}
|
||||
return result;
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
/*
|
||||
* address.h
|
||||
*
|
||||
* Created on: 15 июл. 2022 г.
|
||||
* Author: alexander
|
||||
*/
|
||||
|
||||
#ifndef ADDRESS_H_
|
||||
#define ADDRESS_H_
|
||||
|
||||
char *getHostIP(char *dnsName);
|
||||
|
||||
#endif /* ADDRESS_H_ */
|
|
@ -1,602 +0,0 @@
|
|||
/*
|
||||
* db.c
|
||||
*
|
||||
* Created on: 13 июл. 2022 г.
|
||||
* Author: alexander
|
||||
*/
|
||||
|
||||
#include "sqlite3.h"
|
||||
//#include <sqlite3.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "db.h"
|
||||
#include "node_settings.h"
|
||||
|
||||
char* getPathDB(char *path)
|
||||
{
|
||||
static char *current = NULL;
|
||||
if (path && !current)
|
||||
{
|
||||
current = path;
|
||||
}
|
||||
|
||||
return current;
|
||||
}
|
||||
|
||||
static sqlite3* dbGetBase(char *path)
|
||||
{
|
||||
sqlite3 *db = NULL;
|
||||
|
||||
if (sqlite3_open(path, &db) != SQLITE_OK)
|
||||
{
|
||||
fprintf(stderr, "Cannot open database: %s\n", sqlite3_errmsg(db));
|
||||
sqlite3_close(db);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return db;
|
||||
}
|
||||
|
||||
/*
|
||||
* 0 - parameter
|
||||
* 1 - key
|
||||
* 2 - set_key
|
||||
* 3 - single
|
||||
* 4 - value
|
||||
* 5 - current (data)
|
||||
* 6 - set_val
|
||||
* 7 - dependence
|
||||
* 8 - conflict
|
||||
*/
|
||||
static int dbLoad(void *NotUsed, int argc, char **argv, char **azColName)
|
||||
{
|
||||
if (!getParameter(atoi(argv[0])))
|
||||
{
|
||||
addParameterKey(atoi(argv[0]), argv[1], atoi(argv[2]), atoi(argv[3]),
|
||||
(argv[7] ? getParameter(atoi(argv[7])) : NULL),
|
||||
(argv[8] ? getParameter(atoi(argv[8])) : NULL));
|
||||
}
|
||||
|
||||
if (argv[4] && argv[5])
|
||||
{
|
||||
addParameterValue(atoi(argv[0]), atoi(argv[4]), argv[5], atoi(argv[6]));
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool dbLoadData()
|
||||
{
|
||||
sqlite3 *db = dbGetBase(getPathDB(NULL));
|
||||
if (!db)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
char *err_msg = 0;
|
||||
char *sql =
|
||||
"SELECT `parameters`.`id` as `parameter`, `parameters`.`data` as `key`, `parameters`.`set` as `set_key`, `parameters`.`single` as `single`, `values`.`id` as `value`, `values`.`data` as `current`, `values`.`set` as `set_val`,`dependencies`.`dependence` as `dependence`, `conflicts`.`conflict` as `conflict` \
|
||||
FROM `parameters` as `parameters` \
|
||||
LEFT JOIN `arguments` as `arguments` ON `parameters`.`id` = `arguments`.`parameter` \
|
||||
LEFT JOIN `values` as `values` ON `arguments`.`value` = `values`.`id` \
|
||||
LEFT JOIN `dependencies` as `dependencies` ON `dependencies`.`parameter` = `parameters`.`id` \
|
||||
LEFT JOIN `conflicts` as `conflicts` ON `conflicts`.`parameter` = `parameters`.`id`";
|
||||
|
||||
if (sqlite3_exec(db, sql, dbLoad, 0, &err_msg) != SQLITE_OK)
|
||||
{
|
||||
fprintf(stderr, "Ошибка выполнения запроса: %s\n", err_msg);
|
||||
sqlite3_free(err_msg);
|
||||
sqlite3_close(db);
|
||||
return false;
|
||||
}
|
||||
|
||||
sqlite3_close(db);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static int dbCreateHostsList(void *answer, int argc, char **argv, char **azColName)
|
||||
{
|
||||
Hosts *hosts = *(Hosts**) answer;
|
||||
Host *host = (Host*) malloc(sizeof(Host));
|
||||
host->data = (char**) malloc(sizeof(char*) * argc);
|
||||
host->size = argc;
|
||||
|
||||
for (int i = 0; i < argc; i++)
|
||||
{
|
||||
size_t size = strlen(argv[i]) + 1;
|
||||
host->data[i] = (char*) malloc(sizeof(char) * size);
|
||||
strncpy(host->data[i], argv[i], size);
|
||||
}
|
||||
|
||||
Host **tmp = hosts->host;
|
||||
hosts->host = (Host**) malloc(sizeof(Host*) * ++hosts->size);
|
||||
for (size_t i = 0; i < hosts->size - 1; ++i)
|
||||
{
|
||||
hosts->host[i] = tmp[i];
|
||||
}
|
||||
if (tmp)
|
||||
{
|
||||
free(tmp);
|
||||
}
|
||||
hosts->host[hosts->size - 1] = host;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Hosts* dbGetHostsList()
|
||||
{
|
||||
sqlite3 *db = dbGetBase(getPathDB(NULL));
|
||||
if (!db)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
char *err_msg = 0;
|
||||
char *sql = "SELECT ROW_NUMBER () OVER (ORDER BY `hosts`.`ip`) `item`, `hosts`.`dns` as `dns`, `hosts`.`set` as `set` FROM `hosts` as `hosts`";
|
||||
Hosts *hosts = (Hosts*) malloc(sizeof(Hosts));
|
||||
hosts->size = 0;
|
||||
hosts->host = NULL;
|
||||
|
||||
if (sqlite3_exec(db, sql, dbCreateHostsList, &hosts, &err_msg) != SQLITE_OK)
|
||||
{
|
||||
fprintf(stderr, "Ошибка выполнения запроса: %s\n", err_msg);
|
||||
sqlite3_free(err_msg);
|
||||
sqlite3_close(db);
|
||||
exit(-1);
|
||||
}
|
||||
sqlite3_close(db);
|
||||
return hosts;
|
||||
}
|
||||
|
||||
void dbFreeHosts(Hosts *hosts)
|
||||
{
|
||||
for (size_t i = 0; i < hosts->size; ++i)
|
||||
{
|
||||
for (size_t j = 0; j < hosts->host[i]->size; ++j)
|
||||
{
|
||||
free(hosts->host[i]->data[j]);
|
||||
}
|
||||
free(hosts->host[i]->data);
|
||||
free(hosts->host[i]);
|
||||
}
|
||||
free(hosts);
|
||||
}
|
||||
|
||||
bool dbWriteParameter(Parameter name, bool set)
|
||||
{
|
||||
sqlite3 *db = dbGetBase(getPathDB(NULL));
|
||||
if (!db)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
sqlite3_stmt *res;
|
||||
char *sql = "UPDATE `parameters` set `set` = ? where id = ?";
|
||||
|
||||
if (sqlite3_prepare_v2(db, sql, -1, &res, 0) == SQLITE_OK)
|
||||
{
|
||||
sqlite3_bind_int(res, 1, set);
|
||||
sqlite3_bind_int(res, 2, name);
|
||||
}
|
||||
|
||||
if (sqlite3_step(res) == SQLITE_BUSY)
|
||||
{
|
||||
fprintf(stderr, "[ЗАНЯТО] %s - \"%s\"\n", set ? "включено" : "выключено", getParameter(name)->key);
|
||||
}
|
||||
if (sqlite3_step(res) == SQLITE_ERROR)
|
||||
{
|
||||
fprintf(stderr, "[ОШИБКА] %s - \"%s\"\n", set ? "включено" : "выключено", getParameter(name)->key);
|
||||
}
|
||||
if (sqlite3_step(res) == SQLITE_DONE)
|
||||
{
|
||||
fprintf(stdout, "[УСПЕШНО] %s - \"%s\"\n", set ? "включено" : "выключено", getParameter(name)->key);
|
||||
}
|
||||
|
||||
sqlite3_finalize(res);
|
||||
sqlite3_close(db);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool dbWriteValue(Value name, bool set)
|
||||
{
|
||||
sqlite3 *db = dbGetBase(getPathDB(NULL));
|
||||
if (!db)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
sqlite3_stmt *res;
|
||||
char *sql = "UPDATE `values` set `set` = ? where id = ?";
|
||||
|
||||
if (sqlite3_prepare_v2(db, sql, -1, &res, 0) == SQLITE_OK)
|
||||
{
|
||||
sqlite3_bind_int(res, 1, set);
|
||||
sqlite3_bind_int(res, 2, name);
|
||||
}
|
||||
|
||||
if (sqlite3_step(res) == SQLITE_BUSY)
|
||||
{
|
||||
fprintf(stderr, "[ЗАНЯТО] %s - \"%s\"\n", set ? "включено" : "выключено", getValue(name)->current);
|
||||
}
|
||||
if (sqlite3_step(res) == SQLITE_ERROR)
|
||||
{
|
||||
fprintf(stderr, "[ОШИБКА] %s - \"%s\"\n", set ? "включено" : "выключено", getValue(name)->current);
|
||||
}
|
||||
if (sqlite3_step(res) == SQLITE_DONE)
|
||||
{
|
||||
fprintf(stdout, "[УСПЕШНО] %s - \"%s\"\n", set ? "включено" : "выключено", getValue(name)->current);
|
||||
}
|
||||
|
||||
sqlite3_finalize(res);
|
||||
sqlite3_close(db);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
int dbAddServer(char *ip, char *dns)
|
||||
{
|
||||
int result = 0;
|
||||
|
||||
if (!(ip && strlen(ip) && dns && strlen(dns)))
|
||||
return -1;
|
||||
|
||||
sqlite3 *db = dbGetBase(getPathDB(NULL));
|
||||
if (!db)
|
||||
{
|
||||
return -2;
|
||||
}
|
||||
|
||||
sqlite3_stmt *res;
|
||||
char *sql = "SELECT * FROM `hosts` WHERE `ip` = ? OR `dns` = ?";
|
||||
if (sqlite3_prepare_v2(db, sql, -1, &res, 0) == SQLITE_OK)
|
||||
{
|
||||
sqlite3_bind_text(res, 1, ip, -1, 0);
|
||||
sqlite3_bind_text(res, 2, dns, -1, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
sqlite3_finalize(res);
|
||||
sqlite3_close(db);
|
||||
return -3;
|
||||
}
|
||||
|
||||
if (sqlite3_step(res) == SQLITE_ROW)
|
||||
{
|
||||
int id = atoi((const char*) sqlite3_column_text(res, 0));
|
||||
sqlite3_finalize(res);
|
||||
|
||||
sql = "UPDATE `hosts` set `set` = 0";
|
||||
if (sqlite3_exec(db, sql, NULL, NULL, NULL) == SQLITE_OK)
|
||||
{
|
||||
sql = "UPDATE `hosts` set `dns` = ?, `ip` = ?, `set` = 1 where id = ?";
|
||||
|
||||
if (sqlite3_prepare_v2(db, sql, -1, &res, 0) == SQLITE_OK)
|
||||
{
|
||||
sqlite3_bind_text(res, 1, dns, -1, 0);
|
||||
sqlite3_bind_text(res, 2, ip, -1, 0);
|
||||
sqlite3_bind_int(res, 3, id);
|
||||
}
|
||||
|
||||
if (sqlite3_step(res) == SQLITE_BUSY)
|
||||
{
|
||||
fprintf(stderr, "[ЗАНЯТО] %s - \"%s\"\n", dns ? "установлено" : "очищено", ip);
|
||||
result = 5;
|
||||
}
|
||||
if (sqlite3_step(res) == SQLITE_ERROR)
|
||||
{
|
||||
fprintf(stderr, "[ОШИБКА] %s - \"%s\"\n", dns ? "установлено" : "очищено", ip);
|
||||
result = 4;
|
||||
}
|
||||
if (sqlite3_step(res) == SQLITE_DONE)
|
||||
{
|
||||
fprintf(stdout, "[УСПЕШНО] %s - \"%s\"\n", dns ? "установлено" : "очищено", ip);
|
||||
result = 3;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
result = -5;
|
||||
}
|
||||
}
|
||||
else if (sqlite3_step(res) == SQLITE_DONE)
|
||||
{
|
||||
sqlite3_finalize(res);
|
||||
|
||||
sql = "UPDATE `hosts` set `set` = 0";
|
||||
if (sqlite3_exec(db, sql, NULL, NULL, NULL) == SQLITE_OK)
|
||||
{
|
||||
sql = "INSERT INTO `hosts` (`ip`, `dns`, `set`) VALUES (?, ?, 1)";
|
||||
if (sqlite3_prepare_v2(db, sql, -1, &res, 0) == SQLITE_OK)
|
||||
{
|
||||
sqlite3_bind_text(res, 1, ip, -1, 0);
|
||||
sqlite3_bind_text(res, 2, dns, -1, 0);
|
||||
}
|
||||
|
||||
if (sqlite3_step(res) == SQLITE_BUSY)
|
||||
{
|
||||
fprintf(stderr, "[ЗАНЯТО] %s - \"%s\"\n", dns ? "установлено" : "очищено", ip);
|
||||
result = 2;
|
||||
}
|
||||
if (sqlite3_step(res) == SQLITE_ERROR)
|
||||
{
|
||||
fprintf(stderr, "[ОШИБКА] %s - \"%s\"\n", dns ? "установлено" : "очищено", ip);
|
||||
result = 1;
|
||||
}
|
||||
if (sqlite3_step(res) == SQLITE_DONE)
|
||||
{
|
||||
fprintf(stdout, "[УСПЕШНО] %s - \"%s\"\n", dns ? "установлено" : "очищено", ip);
|
||||
result = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
result = -6;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
result = -4;
|
||||
}
|
||||
|
||||
sqlite3_finalize(res);
|
||||
sqlite3_close(db);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
bool dbSetUserNameCurrent(char *current)
|
||||
{
|
||||
sqlite3 *db = dbGetBase(getPathDB(NULL));
|
||||
if (!db)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
char *text = strlen(current) ? current : NULL;
|
||||
sqlite3_stmt *res;
|
||||
char *sql = "UPDATE `values` set `data` = ?, `set` = ? where id = ?";
|
||||
|
||||
if (sqlite3_prepare_v2(db, sql, -1, &res, 0) == SQLITE_OK)
|
||||
{
|
||||
sqlite3_bind_text(res, 1, text, -1, 0);
|
||||
sqlite3_bind_int(res, 2, text ? true : false);
|
||||
sqlite3_bind_int(res, 3, VALUE_USERNAME);
|
||||
}
|
||||
|
||||
if (sqlite3_step(res) == SQLITE_BUSY)
|
||||
{
|
||||
fprintf(stderr, "[ЗАНЯТО] %s - \"%s\"\n", text ? "установлено" : "очищено", text ? getValue(VALUE_USERNAME)->current : "");
|
||||
}
|
||||
if (sqlite3_step(res) == SQLITE_ERROR)
|
||||
{
|
||||
fprintf(stderr, "[ОШИБКА] %s - \"%s\"\n", text ? "установлено" : "очищено", text ? getValue(VALUE_USERNAME)->current : "");
|
||||
}
|
||||
if (sqlite3_step(res) == SQLITE_DONE)
|
||||
{
|
||||
fprintf(stdout, "[УСПЕШНО] %s - \"%s\"\n", text ? "установлено" : "очищено", text ? getValue(VALUE_USERNAME)->current : "");
|
||||
}
|
||||
|
||||
sqlite3_finalize(res);
|
||||
sqlite3_close(db);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static int dbCreateMonitorsList(void *answer, int argc, char **argv, char **azColName)
|
||||
{
|
||||
Monitors *monitors = *(Monitors**) answer;
|
||||
Monitor *monitor = (Monitor*) malloc(sizeof(Monitor));
|
||||
monitor->data = (char**) malloc(sizeof(char*) * argc);
|
||||
monitor->size = argc;
|
||||
|
||||
for (int i = 0; i < argc; i++)
|
||||
{
|
||||
size_t size = strlen(argv[i]) + 1;
|
||||
monitor->data[i] = (char*) malloc(sizeof(char) * size);
|
||||
strncpy(monitor->data[i], argv[i], size);
|
||||
}
|
||||
|
||||
Monitor **tmp = monitors->monitor;
|
||||
monitors->monitor = (Monitor**) malloc(sizeof(Monitor*) * ++monitors->size);
|
||||
for (size_t i = 0; i < monitors->size - 1; ++i)
|
||||
{
|
||||
monitors->monitor[i] = tmp[i];
|
||||
}
|
||||
if (tmp)
|
||||
{
|
||||
free(tmp);
|
||||
}
|
||||
monitors->monitor[monitors->size - 1] = monitor;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Monitors* dbGetMonitorsList()
|
||||
{
|
||||
sqlite3 *db = dbGetBase(getPathDB(NULL));
|
||||
if (!db)
|
||||
{
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
char *err_msg = 0;
|
||||
char *sql =
|
||||
"SELECT ROW_NUMBER () OVER (ORDER BY `monitors`.`set` DESC) `item`, `monitors`.`name` as `name`, `monitors`.`set` as `set`, (ROW_NUMBER () OVER (ORDER BY `monitors`.`id`)) - 1 `item` FROM `monitors` as `monitors`";
|
||||
|
||||
Monitors *monitors = (Monitors*) malloc(sizeof(Monitors));
|
||||
monitors->size = 0;
|
||||
monitors->monitor = NULL;
|
||||
|
||||
if (sqlite3_exec(db, sql, dbCreateMonitorsList, &monitors, &err_msg) != SQLITE_OK)
|
||||
{
|
||||
fprintf(stderr, "Получение списка мониторов. Ошибка выполнения запроса: %s\n", err_msg);
|
||||
sqlite3_free(err_msg);
|
||||
sqlite3_close(db);
|
||||
exit(-2);
|
||||
}
|
||||
|
||||
sqlite3_close(db);
|
||||
|
||||
return monitors;
|
||||
}
|
||||
|
||||
void dbFreeMonitors(Monitors *monitors)
|
||||
{
|
||||
for (size_t i = 0; i < monitors->size; ++i)
|
||||
{
|
||||
for (size_t j = 0; j < monitors->monitor[i]->size; ++j)
|
||||
{
|
||||
free(monitors->monitor[i]->data[j]);
|
||||
}
|
||||
free(monitors->monitor[i]->data);
|
||||
free(monitors->monitor[i]);
|
||||
}
|
||||
free(monitors);
|
||||
}
|
||||
|
||||
bool deleteAllMonitors()
|
||||
{
|
||||
sqlite3 *db = dbGetBase(getPathDB(NULL));
|
||||
if (!db)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool result = false;
|
||||
char *sql = "DELETE FROM `monitors`";
|
||||
|
||||
if (sqlite3_exec(db, sql, NULL, NULL, NULL) == SQLITE_OK)
|
||||
{
|
||||
result = true;
|
||||
}
|
||||
|
||||
sqlite3_close(db);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
int dbAddMonitor(char *monitor, bool set)
|
||||
{
|
||||
if (!(monitor && strlen(monitor)))
|
||||
return -1;
|
||||
|
||||
sqlite3 *db = dbGetBase(getPathDB(NULL));
|
||||
if (!db)
|
||||
{
|
||||
return -2;
|
||||
}
|
||||
|
||||
sqlite3_stmt *res;
|
||||
char *sql = "INSERT INTO `monitors` (`name`, `set`) VALUES (?, ?)";
|
||||
if (sqlite3_prepare_v2(db, sql, -1, &res, 0) == SQLITE_OK)
|
||||
{
|
||||
sqlite3_bind_text(res, 1, monitor, -1, 0);
|
||||
sqlite3_bind_int(res, 2, set);
|
||||
}
|
||||
|
||||
// if (sqlite3_step(res) == SQLITE_BUSY)
|
||||
// {
|
||||
// fprintf(stderr, "[ЗАНЯТО] %s - \"%s\"\n", text ? "установлено" : "очищено", text ? getValue(VALUE_USERNAME)->current : "");
|
||||
// }
|
||||
// if (sqlite3_step(res) == SQLITE_ERROR)
|
||||
// {
|
||||
// fprintf(stderr, "[ОШИБКА] %s - \"%s\"\n", text ? "установлено" : "очищено", text ? getValue(VALUE_USERNAME)->current : "");
|
||||
// }
|
||||
if (sqlite3_step(res) == SQLITE_DONE)
|
||||
{
|
||||
fprintf(stdout, "[УСПЕШНО] %s - \"%s\"\n", monitor ? "установлено" : "очищено", monitor ? monitor : "");
|
||||
return 0;
|
||||
}
|
||||
|
||||
sqlite3_finalize(res);
|
||||
sqlite3_close(db);
|
||||
|
||||
return -3;
|
||||
}
|
||||
|
||||
int dbSaveMonitors(char *name)
|
||||
{
|
||||
int result = 0;
|
||||
|
||||
if (!(name && strlen(name)))
|
||||
return -1;
|
||||
|
||||
sqlite3 *db = dbGetBase(getPathDB(NULL));
|
||||
if (!db)
|
||||
{
|
||||
return -2;
|
||||
}
|
||||
|
||||
char *sql = "UPDATE `monitors` set `set` = 0";
|
||||
if (sqlite3_exec(db, sql, NULL, NULL, NULL) == SQLITE_OK)
|
||||
{
|
||||
sqlite3_stmt *res;
|
||||
sql = "UPDATE `monitors` SET `set` = 1 WHERE `name` = ?";
|
||||
if (sqlite3_prepare_v2(db, sql, -1, &res, 0) == SQLITE_OK)
|
||||
{
|
||||
sqlite3_bind_text(res, 1, name, -1, 0);
|
||||
}
|
||||
|
||||
if (sqlite3_step(res) == SQLITE_BUSY)
|
||||
{
|
||||
fprintf(stderr, "[ЗАНЯТО] %s - \"%s\"\n", name ? "установлено" : "очищено", name);
|
||||
result = 2;
|
||||
}
|
||||
if (sqlite3_step(res) == SQLITE_ERROR)
|
||||
{
|
||||
fprintf(stderr, "[ОШИБКА] %s - \"%s\"\n", name ? "установлено" : "очищено", name);
|
||||
result = 1;
|
||||
}
|
||||
if (sqlite3_step(res) == SQLITE_DONE)
|
||||
{
|
||||
fprintf(stdout, "[УСПЕШНО] %s - \"%s\"\n", name ? "установлено" : "очищено", name);
|
||||
result = 0;
|
||||
}
|
||||
sqlite3_finalize(res);
|
||||
}
|
||||
|
||||
sqlite3_close(db);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
int dbInsertHistory(char *login, char *host)
|
||||
{
|
||||
int result = 0;
|
||||
|
||||
if (!(login && strlen(login)) || !(host && strlen(host)))
|
||||
return -1;
|
||||
|
||||
sqlite3 *db = dbGetBase(getPathDB(NULL));
|
||||
|
||||
if (!db)
|
||||
{
|
||||
return -2;
|
||||
}
|
||||
|
||||
sqlite3_stmt *res;
|
||||
char *sql = "INSERT INTO `history` (`login`, `host`, `time`) VALUES (?, ?, ?)";
|
||||
if (sqlite3_prepare_v2(db, sql, -1, &res, 0) == SQLITE_OK)
|
||||
{
|
||||
sqlite3_bind_text(res, 1, login, -1, 0);
|
||||
sqlite3_bind_text(res, 2, host, -1, 0);
|
||||
sqlite3_bind_int(res, 3, (unsigned)time(NULL));
|
||||
}
|
||||
|
||||
if (sqlite3_step(res) == SQLITE_DONE)
|
||||
{
|
||||
sqlite3_finalize(res);
|
||||
sqlite3_close(db);
|
||||
return 0;
|
||||
}
|
||||
|
||||
sqlite3_finalize(res);
|
||||
sqlite3_close(db);
|
||||
|
||||
return result;
|
||||
}
|
|
@ -1,57 +0,0 @@
|
|||
/*
|
||||
* db.h
|
||||
*
|
||||
* Created on: 13 июл. 2022 г.
|
||||
* Author: alexander
|
||||
*/
|
||||
|
||||
#ifndef DB_H_
|
||||
#define DB_H_
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "parameter.h"
|
||||
#include "value.h"
|
||||
|
||||
typedef struct Host
|
||||
{
|
||||
char **data;
|
||||
size_t size;
|
||||
} Host;
|
||||
|
||||
typedef struct Hosts
|
||||
{
|
||||
Host **host;
|
||||
size_t size;
|
||||
} Hosts;
|
||||
|
||||
typedef struct Monitor
|
||||
{
|
||||
char **data;
|
||||
size_t size;
|
||||
} Monitor;
|
||||
|
||||
typedef struct Monitors
|
||||
{
|
||||
Monitor **monitor;
|
||||
size_t size;
|
||||
} Monitors;
|
||||
|
||||
char *getPathDB(char *path);
|
||||
|
||||
bool dbLoadData();
|
||||
Hosts *dbGetHostsList();
|
||||
void dbFreeHosts(Hosts *hosts);
|
||||
Monitors *dbGetMonitorsList();
|
||||
void dbFreeMonitors(Monitors *monitors);
|
||||
bool deleteAllMonitors();
|
||||
int dbAddMonitor(char *monitor, bool set);
|
||||
int dbSaveMonitors(char *name);
|
||||
bool dbWriteParameter(Parameter name, bool set);
|
||||
bool dbWriteValue(Value name, bool set);
|
||||
bool dbSetUserNameCurrent(char *current);
|
||||
int dbAddServer(char *ip, char *dns);
|
||||
int dbInsertHistory(char *login, char *host);
|
||||
|
||||
#endif /* DB_H_ */
|
|
@ -1,285 +0,0 @@
|
|||
/*
|
||||
* gui.c
|
||||
*
|
||||
* Created on: 6 июл. 2022 г.
|
||||
* Author: alexander
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "gui.h"
|
||||
#include "settings.h"
|
||||
#include "node_settings.h"
|
||||
#include "images.h"
|
||||
#include "arguments.h"
|
||||
#include "address.h"
|
||||
#include "keylang.h"
|
||||
|
||||
#include "db.h"
|
||||
#include "xrdp.h"
|
||||
#include "../xfreerdp.h"
|
||||
|
||||
static int guiExit(Ihandle *self)
|
||||
{
|
||||
return IUP_CLOSE;
|
||||
}
|
||||
|
||||
int isEmptyFieldServerUser(Ihandle *self)
|
||||
{
|
||||
char *name = IupGetAttribute(self, "NAME");
|
||||
if (!strcmp(name, "SERVER"))
|
||||
return !strcmp(IupGetAttribute(IupGetDialogChild(self, "USER"), "LINEVALUE"), "\0");
|
||||
else
|
||||
return !strcmp(IupGetAttribute(IupGetDialogChild(self, "SERVER"), "VALUE"), "\0");
|
||||
}
|
||||
|
||||
static int activeBtnConnect(Ihandle *self, int c, char *value)
|
||||
{
|
||||
if (!strcmp(value, "\0") || isEmptyFieldServerUser(self))
|
||||
{
|
||||
IupSetInt(IupGetDialogChild(self, "CONNECT"), "ACTIVE", 0);
|
||||
#ifdef IUP_WITH_COLOR_BUTTONS
|
||||
IupSetAttribute(IupGetDialogChild(self, "CONNECT"), "BGCOLOR", "49 54 61");
|
||||
IupSetAttribute(IupGetDialogChild(self, "CONNECT"), "FGCOLOR", "238 238 238");
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
IupSetInt(IupGetDialogChild(self, "CONNECT"), "ACTIVE", 1);
|
||||
#ifdef IUP_WITH_COLOR_BUTTONS
|
||||
IupSetAttribute(IupGetDialogChild(self, "CONNECT"), "BGCOLOR", "0 179 0");
|
||||
IupSetAttribute(IupGetDialogChild(self, "CONNECT"), "FGCOLOR", "255 255 255");
|
||||
#endif
|
||||
}
|
||||
return IUP_DEFAULT;
|
||||
}
|
||||
|
||||
static int guiConnect(Ihandle *self)
|
||||
{
|
||||
char *host = IupGetAttribute(IupGetDialogChild(self, "SERVER"), "VALUE");
|
||||
char *result = getHostIP(host);
|
||||
|
||||
if (!result)
|
||||
return IUP_IGNORE;
|
||||
|
||||
char *login = IupGetAttribute(IupGetDialogChild(self, "USER"), "LINEVALUE");
|
||||
|
||||
if (!strcmp(login, "\0"))
|
||||
return IUP_IGNORE;
|
||||
|
||||
setParameterValue(PARAMETER_SERVER, VALUE_SERVER, result);
|
||||
setParameterValue(PARAMETER_USERNAME, VALUE_USERNAME, login);
|
||||
setParameterValue(PARAMETER_PASSWORD, VALUE_PASSWORD, IupGetAttribute(IupGetDialogChild(self, "PASSWORD"), "LINEVALUE"));
|
||||
|
||||
Arguments args;
|
||||
buildArguments(&args);
|
||||
for (int i = 0; i < args.argc; ++i)
|
||||
{
|
||||
printf("%s\n", args.argv[i]);
|
||||
}
|
||||
|
||||
// Добавление в историю любой попытки подключиться к удаленному серверу
|
||||
dbInsertHistory(login, host);
|
||||
|
||||
enum XF_EXIT_CODE xCode = free_rdp_connect(args.argc, args.argv);
|
||||
|
||||
if (!(xCode == XF_EXIT_DNS_NAME_NOT_FOUND || xCode == XF_EXIT_CONNECT_FAILED || xCode == XF_EXIT_TLS_CONNECT_FAILED))
|
||||
{
|
||||
IupSetAttribute(IupGetDialogChild(self, "PASSWORD"), "VALUE", "");
|
||||
|
||||
if (!dbAddServer(result, host))
|
||||
{
|
||||
IupSetAttribute(IupGetDialogChild(self, "SERVER"), "APPENDITEM", host);
|
||||
}
|
||||
dbSetUserNameCurrent(login);
|
||||
}
|
||||
|
||||
freeArguments(&args);
|
||||
|
||||
return IUP_DEFAULT;
|
||||
}
|
||||
|
||||
static char* createHostsList(Ihandle *iupList)
|
||||
{
|
||||
Hosts *hosts = dbGetHostsList();
|
||||
char *indexItem = NULL;
|
||||
char *serverName = NULL;
|
||||
|
||||
for (size_t i = 0; i < hosts->size; ++i)
|
||||
{
|
||||
Host *host = hosts->host[i];
|
||||
size_t size = strlen(host->data[0]) + 1;
|
||||
indexItem = (char *)malloc(sizeof(char) * size);
|
||||
strncpy(indexItem, host->data[0], size);
|
||||
size = strlen(host->data[1]) + 1;
|
||||
serverName = (char *)malloc(sizeof(char) * size);
|
||||
strncpy(serverName, host->data[1], size);
|
||||
|
||||
IupSetAttribute(iupList, indexItem, serverName);
|
||||
if (atoi(host->data[2]))
|
||||
IupSetAttribute(iupList, "VALUE", serverName);
|
||||
}
|
||||
dbFreeHosts(hosts);
|
||||
|
||||
return serverName;
|
||||
}
|
||||
|
||||
#ifdef IUP_WITH_LANGUAGE_KEYBOARD_ICON
|
||||
static int k_any(Ihandle *self, int key)
|
||||
{
|
||||
int langcode = getKeyboardLanguage();
|
||||
if (langcode)
|
||||
{
|
||||
if (langcode == 1)
|
||||
IupSetAttribute(IupGetDialogChild(self, "KEYBOARD"), "IMAGE", "keyboardUs");
|
||||
else if (langcode == 2)
|
||||
IupSetAttribute(IupGetDialogChild(self, "KEYBOARD"), "IMAGE", "keyboardRu");
|
||||
else
|
||||
IupSetAttribute(IupGetDialogChild(self, "KEYBOARD"), "IMAGE", "keyboardEmpty");
|
||||
}
|
||||
return IUP_DEFAULT;
|
||||
}
|
||||
#endif
|
||||
|
||||
Ihandle* guiStart()
|
||||
{
|
||||
Ihandle *dlg;
|
||||
Ihandle *icon, *bgHead;
|
||||
Ihandle *vBoxMain, *hBoxServer, *hBoxUser, *hBoxPassword, *hBoxButtons; // Boxes
|
||||
Ihandle *labelImage;
|
||||
Ihandle *labelServer, *inputServer;
|
||||
Ihandle *labelUser, *inputUser;
|
||||
Ihandle *labelPassword, *inputPassword;
|
||||
Ihandle *btnConnect, *btnClose, *btnSettings;
|
||||
|
||||
icon = IupImageRGBA(64, 64, idata_icon);
|
||||
IupSetHandle("icon", icon);
|
||||
|
||||
labelImage = IupLabel(NULL);
|
||||
|
||||
bgHead = IupImageRGBA(405, 72, idata_head);
|
||||
IupSetAttributeHandle(labelImage, "IMAGE", bgHead);
|
||||
|
||||
labelServer = IupLabel("Компьютер:");
|
||||
IupSetAttribute(labelServer, "SIZE", "80x16");
|
||||
IupSetAttribute(labelServer, "ALIGNMENT", "ARIGHT:ACENTER");
|
||||
IupSetAttribute(labelServer, "PADDING", "5");
|
||||
|
||||
inputServer = IupList(NULL);
|
||||
IupSetAttribute(inputServer, "NAME", "SERVER");
|
||||
IupSetAttribute(inputServer, "TIP", "IP-адрес или имя удаленного сервера\n(обязательное для заполнения поле)");
|
||||
char *hostname = createHostsList(inputServer);
|
||||
IupSetAttribute(inputServer, "SIZE", "100");
|
||||
IupSetAttribute(inputServer, "EDITBOX", "YES");
|
||||
IupSetAttribute(inputServer, "DROPDOWN", "YES");
|
||||
IupSetAttribute(inputServer, "MASK", "[A-Za-z0-9/./-]*");
|
||||
IupSetCallback(inputServer, "EDIT_CB", (Icallback) activeBtnConnect);
|
||||
hBoxServer = IupHbox(labelServer, inputServer, NULL);
|
||||
IupSetAttribute(hBoxServer, "MARGIN", "10x10");
|
||||
|
||||
labelUser = IupLabel("Пользователь:");
|
||||
IupSetAttribute(labelUser, "SIZE", "80x16");
|
||||
IupSetAttribute(labelUser, "ALIGNMENT", "ARIGHT:ACENTER");
|
||||
IupSetAttribute(labelUser, "PADDING", "5");
|
||||
inputUser = IupText(NULL);
|
||||
IupSetAttribute(inputUser, "NAME", "USER");
|
||||
IupSetAttribute(inputUser, "TIP", "<домен>\\<имя пользователя>\n<имя пользователя>@<домен>\n(обязательное для заполнения поле)");
|
||||
char *username = getSetValueCurrent(PARAMETER_USERNAME);
|
||||
IupSetAttribute(inputUser, "VALUE", username);
|
||||
IupSetAttribute(inputUser, "SIZE", "100");
|
||||
IupSetAttribute(inputUser, "MASK", "(/w|[/./\\/@/-])*");
|
||||
IupSetCallback(inputUser, "ACTION", (Icallback) activeBtnConnect);
|
||||
hBoxUser = IupHbox(labelUser, inputUser, NULL);
|
||||
IupSetAttribute(hBoxUser, "MARGIN", "10x0");
|
||||
|
||||
labelPassword = IupLabel("Пароль:");
|
||||
IupSetAttribute(labelPassword, "SIZE", "80x16");
|
||||
IupSetAttribute(labelPassword, "ALIGNMENT", "ARIGHT:ACENTER");
|
||||
IupSetAttribute(labelPassword, "PADDING", "5");
|
||||
inputPassword = IupText(NULL);
|
||||
IupSetAttribute(inputPassword, "SIZE", "100");
|
||||
IupSetAttribute(inputPassword, "NAME", "PASSWORD");
|
||||
IupSetAttribute(inputPassword, "TIP", "Пароль пользователя (необязательно)");
|
||||
IupSetAttribute(inputPassword, "VALUE", getSetValueCurrent(PARAMETER_PASSWORD));
|
||||
IupSetAttribute(inputPassword, "PASSWORD", "YES");
|
||||
hBoxPassword = IupHbox(labelPassword, inputPassword, NULL);
|
||||
IupSetAttribute(hBoxPassword, "MARGIN", "10x10");
|
||||
|
||||
#ifdef IUP_WITH_LANGUAGE_KEYBOARD_ICON
|
||||
Ihandle *keyboardRu, *keyboardUs, *keyboardEmpty, *iconLang;
|
||||
keyboardEmpty = IupImageRGBA(32, 32, empty_keyboard);
|
||||
IupSetHandle("keyboardEmpty", keyboardEmpty);
|
||||
keyboardRu = IupImageRGBA(32, 32, ru_keyboard);
|
||||
IupSetHandle("keyboardRu", keyboardRu);
|
||||
keyboardUs = IupImageRGBA(32, 32, us_keyboard);
|
||||
IupSetHandle("keyboardUs", keyboardUs);
|
||||
iconLang = IupLabel(NULL);
|
||||
IupSetAttribute(iconLang, "NAME", "KEYBOARD");
|
||||
IupSetAttribute(iconLang, "IMAGE", "keyboardRu");
|
||||
IupSetAttribute(iconLang, "FLOATING", "YES");
|
||||
IupSetAttribute(iconLang, "POSITION", "13,222");
|
||||
IupSetAttribute(iconLang, "TIP", "Текущая раскладка клавиатуры (Alt+Shift)");
|
||||
#endif
|
||||
|
||||
btnConnect = IupButton("Подключение", NULL);
|
||||
IupSetHandle("CONNECT", btnConnect);
|
||||
IupSetAttribute(btnConnect, "NAME", "CONNECT");
|
||||
IupSetAttribute(btnConnect, "TIP", "Выполнить подключение");
|
||||
if (username && hostname)
|
||||
IupSetAttribute(btnConnect, "ACTIVE", "YES");
|
||||
else
|
||||
IupSetAttribute(btnConnect, "ACTIVE", "NO");
|
||||
#ifdef IUP_WITH_COLOR_BUTTONS
|
||||
IupSetAttribute(btnConnect, "BGCOLOR", "0 179 0");
|
||||
IupSetAttribute(btnConnect, "FGCOLOR", "255 255 255");
|
||||
#endif
|
||||
|
||||
btnClose = IupButton("Закрыть", NULL);
|
||||
IupSetHandle("CLOSE", btnClose);
|
||||
IupSetAttribute(btnClose, "NAME", "CLOSE");
|
||||
IupSetAttribute(btnClose, "TIP", "Закрыть FreeRDP");
|
||||
#ifdef IUP_WITH_COLOR_BUTTONS
|
||||
IupSetAttribute(btnClose, "BGCOLOR", "204 0 0");
|
||||
IupSetAttribute(btnClose, "FGCOLOR", "255 255 255");
|
||||
#endif
|
||||
|
||||
btnSettings = IupButton("Настройки", NULL);
|
||||
IupSetAttribute(btnSettings, "NAME", "SETTINGS");
|
||||
IupSetAttribute(btnSettings, "TIP", "Перейти в настройки");
|
||||
#ifdef IUP_WITH_COLOR_BUTTONS
|
||||
IupSetAttribute(btnSettings, "BGCOLOR", "0 136 204");
|
||||
IupSetAttribute(btnSettings, "FGCOLOR", "255 255 255");
|
||||
#endif
|
||||
|
||||
hBoxButtons = IupHbox(IupFill(), btnSettings, btnConnect, btnClose, IupFill(), NULL);
|
||||
IupSetAttribute(hBoxButtons, "ALIGNMENT", "ACENTER:ACENTER");
|
||||
IupSetAttribute(hBoxButtons, "GAP", "10");
|
||||
IupSetAttribute(hBoxButtons, "MARGIN", "10x10");
|
||||
|
||||
vBoxMain = IupVbox(
|
||||
#ifdef IUP_WITH_LANGUAGE_KEYBOARD_ICON
|
||||
iconLang,
|
||||
#endif
|
||||
labelImage, hBoxServer, hBoxUser, hBoxPassword, hBoxButtons, NULL);
|
||||
|
||||
IupSetCallback(btnConnect, "ACTION", (Icallback) guiConnect);
|
||||
IupSetCallback(btnClose, "ACTION", (Icallback) guiExit);
|
||||
IupSetCallback(btnSettings, "ACTION", (Icallback) settingsMainWindow);
|
||||
|
||||
dlg = IupDialog(vBoxMain);
|
||||
IupSetAttribute(dlg, "IMAGE", "BG_HEAD");
|
||||
IupSetAttribute(dlg, "ICON", "icon");
|
||||
IupSetAttribute(dlg, "TITLE", "GUI FreeRDP");
|
||||
IupSetAttribute(dlg, "RESIZE", "NO");
|
||||
IupSetAttribute(dlg, "PARENTDIALOG", "MAIN_WINDOW");
|
||||
IupSetAttribute(dlg, "DEFAULTENTER", "CONNECT");
|
||||
IupSetAttribute(dlg, "DEFAULTESC", "CLOSE");
|
||||
#ifdef IUP_WITH_LANGUAGE_KEYBOARD_ICON
|
||||
IupSetCallback(dlg, "iup_XkeyAlt(K_LSHIFT)", (Icallback) k_any);
|
||||
IupSetCallback(dlg, "GETFOCUS_CB", (Icallback) k_any);
|
||||
#endif
|
||||
|
||||
return dlg;
|
||||
}
|
|
@ -1,53 +0,0 @@
|
|||
/*
|
||||
* keylang.c
|
||||
*
|
||||
* Created on: 17 февр. 2023 г.
|
||||
* Author: alexander
|
||||
*/
|
||||
|
||||
#include "keylang.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <X11/XKBlib.h>
|
||||
#include <X11/extensions/XKBrules.h>
|
||||
|
||||
/*
|
||||
* 0 - unknown
|
||||
* 1 - us
|
||||
* 2 - ru
|
||||
*/
|
||||
|
||||
int getKeyboardLanguage()
|
||||
{
|
||||
Display *dpy = XOpenDisplay(NULL);
|
||||
|
||||
XkbStateRec state;
|
||||
XkbGetState(dpy, XkbUseCoreKbd, &state);
|
||||
|
||||
XkbRF_VarDefsRec vd;
|
||||
XkbRF_GetNamesProp(dpy, NULL, &vd);
|
||||
|
||||
int length = strlen(vd.layout) + 1;
|
||||
char *current = (char *)malloc(sizeof(char) * length);
|
||||
strncpy(current, vd.layout, length);
|
||||
current[length] = '\0';
|
||||
|
||||
XCloseDisplay(dpy);
|
||||
|
||||
char *lang = strtok(current, ",");
|
||||
|
||||
for (int i = 0; i < state.group; i++)
|
||||
lang = strtok(NULL, ",");
|
||||
|
||||
int langcode = 0;
|
||||
|
||||
if (!strcmp(lang, "us")) langcode = 1;
|
||||
if (!strcmp(lang, "ru")) langcode = 2;
|
||||
|
||||
free(current);
|
||||
|
||||
return langcode;
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
/*
|
||||
* keylang.h
|
||||
*
|
||||
* Created on: 17 февр. 2023 г.
|
||||
* Author: alexander
|
||||
*/
|
||||
|
||||
#ifndef CLIENT_X11_CLI_KEYLANG_H_
|
||||
#define CLIENT_X11_CLI_KEYLANG_H_
|
||||
|
||||
int getKeyboardLanguage();
|
||||
|
||||
#endif /* CLIENT_X11_CLI_KEYLANG_H_ */
|
|
@ -1,84 +0,0 @@
|
|||
/*
|
||||
* monitor.c
|
||||
*
|
||||
* Created on: 18 июл. 2022 г.
|
||||
* Author: alexander
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "monitor.h"
|
||||
#include "rxrandr.h"
|
||||
|
||||
static bool checkMonitor(Monitors *dbMonitors, x_info *pcMonitors)
|
||||
{
|
||||
if (!dbMonitors->size || !pcMonitors->count ||
|
||||
!(dbMonitors->size == pcMonitors->count))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool compare = false;
|
||||
|
||||
for (size_t i = 0; i < dbMonitors->size; ++i)
|
||||
{
|
||||
for (size_t j = 0; j < pcMonitors->count; ++j)
|
||||
{
|
||||
if (!strcmp(pcMonitors->monitor[j].name, dbMonitors->monitor[i]->data[1]))
|
||||
{
|
||||
compare = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!compare)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
compare = false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Monitors *loadMonitors()
|
||||
{
|
||||
Monitors *dbMonitors = dbGetMonitorsList();
|
||||
x_info *pcMonitors = getXInfo();
|
||||
if (!checkMonitor(dbMonitors, pcMonitors)) // Если строки не равны, произвести перезапись в БД
|
||||
{
|
||||
if (dbMonitors)
|
||||
dbFreeMonitors(dbMonitors);
|
||||
|
||||
if (!deleteAllMonitors())
|
||||
{
|
||||
fprintf(stderr, "Не удалось удалить записи мониторов из БД\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < pcMonitors->count; ++i)
|
||||
{
|
||||
dbAddMonitor(pcMonitors->monitor[i].name, pcMonitors->monitor[i].primary);
|
||||
}
|
||||
freeXInfo(pcMonitors);
|
||||
|
||||
return dbGetMonitorsList();
|
||||
}
|
||||
|
||||
freeXInfo(pcMonitors);
|
||||
|
||||
return dbMonitors;
|
||||
}
|
||||
|
||||
void freeMonitors(Monitors *monitors)
|
||||
{
|
||||
for (size_t i = 0; i < monitors->size; ++i)
|
||||
{
|
||||
free(monitors->monitor[i]->data[2]);
|
||||
free(monitors->monitor[i]->data[3]);
|
||||
free(monitors->monitor[i]->data);
|
||||
free(monitors->monitor[i]);
|
||||
}
|
||||
free(monitors);
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
/*
|
||||
* monitor.h
|
||||
*
|
||||
* Created on: 18 июл. 2022 г.
|
||||
* Author: alexander
|
||||
*/
|
||||
|
||||
#ifndef MONITOR_H_
|
||||
#define MONITOR_H_
|
||||
|
||||
#include "db.h"
|
||||
|
||||
Monitors *loadMonitors();
|
||||
void freeMonitors(Monitors *monitors);
|
||||
|
||||
#endif /* MONITOR_H_ */
|
File diff suppressed because it is too large
Load Diff
|
@ -1,32 +0,0 @@
|
|||
/*
|
||||
* xrandr.h
|
||||
*
|
||||
* Created on: 11 июл. 2022 г.
|
||||
* Author: alexander
|
||||
*/
|
||||
|
||||
#ifndef XRANDR_H_
|
||||
#define XRANDR_H_
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char name[10];
|
||||
char *ptrName;
|
||||
char *ptrIndexItem;
|
||||
char *ptrIndexMonitor;
|
||||
int width;
|
||||
int height;
|
||||
int primary;
|
||||
} x_monitor;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int count;
|
||||
x_monitor monitor[5];
|
||||
} x_info;
|
||||
|
||||
int XInfo(x_info *info);
|
||||
x_info *getXInfo();
|
||||
void freeXInfo(x_info *info);
|
||||
|
||||
#endif /* XRANDR_H_ */
|
|
@ -1,48 +0,0 @@
|
|||
/*
|
||||
* xrandr_broker.c
|
||||
*
|
||||
* Created on: 11 июл. 2022 г.
|
||||
* Author: alexander
|
||||
*/
|
||||
|
||||
#include "rxrandr.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
x_info *getXInfo()
|
||||
{
|
||||
x_info *monitors = (x_info *) malloc(sizeof(x_info));
|
||||
monitors->count = 0;
|
||||
XInfo(monitors);
|
||||
|
||||
for (int i = 0; i < monitors->count; ++i)
|
||||
{
|
||||
size_t size = strlen(monitors->monitor[i].name) + 1;
|
||||
|
||||
monitors->monitor[i].ptrName = (char *)malloc(sizeof(char) * size);
|
||||
monitors->monitor[i].ptrIndexItem = (char *)malloc(sizeof(char) * 3);
|
||||
monitors->monitor[i].ptrIndexMonitor = (char *)malloc(sizeof(char) * 3);
|
||||
|
||||
strncpy(monitors->monitor[i].ptrName, monitors->monitor[i].name, size);
|
||||
sprintf(monitors->monitor[i].ptrIndexItem, "%d", i + 1);
|
||||
sprintf(monitors->monitor[i].ptrIndexMonitor, "%d", i);
|
||||
}
|
||||
|
||||
return monitors;
|
||||
}
|
||||
|
||||
void freeXInfo(x_info *info)
|
||||
{
|
||||
for (int i = 0; i < info->count; ++i)
|
||||
{
|
||||
if (info->monitor[i].ptrName)
|
||||
free(info->monitor[i].ptrName);
|
||||
if (info->monitor[i].ptrIndexItem)
|
||||
free(info->monitor[i].ptrIndexItem);
|
||||
if (info->monitor[i].ptrIndexMonitor)
|
||||
free(info->monitor[i].ptrIndexMonitor);
|
||||
}
|
||||
free(info);
|
||||
}
|
|
@ -1,474 +0,0 @@
|
|||
/*
|
||||
* settings.c
|
||||
*
|
||||
* Created on: 6 июл. 2022 г.
|
||||
* Author: alexander
|
||||
*/
|
||||
|
||||
#include <iup.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "monitor.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#include "settings.h"
|
||||
#include "arguments.h"
|
||||
#include "node_settings.h"
|
||||
#include "about.h"
|
||||
|
||||
void toggleActive(Ihandle *self, char *name)
|
||||
{
|
||||
IupSetInt(IupGetDialogChild(self, name), "ACTIVE", !IupGetInt(IupGetDialogChild(self, name), "ACTIVE"));
|
||||
}
|
||||
|
||||
static int settingsClose(Ihandle *self)
|
||||
{
|
||||
resetChangeSettings();
|
||||
IupSetAttribute(IupGetDialog(self), "SIMULATEMODAL", "OFF");
|
||||
IupHide(IupGetDialog(self));
|
||||
return IUP_DEFAULT;
|
||||
}
|
||||
|
||||
static int settingsSave(Ihandle *self)
|
||||
{
|
||||
saveChangeSettings();
|
||||
dbSaveMonitors(IupGetAttribute(IupGetDialogChild(self, "MONITORS"), "VALUESTRING"));
|
||||
IupSetAttribute(IupGetDialog(self), "SIMULATEMODAL", "OFF");
|
||||
IupHide(IupGetDialog(self));
|
||||
return IUP_DEFAULT;
|
||||
}
|
||||
|
||||
static int settingsTglAuthentication(Ihandle *self)
|
||||
{
|
||||
changeParameter(PARAMETER_AUTHENTICATION);
|
||||
return IUP_DEFAULT;
|
||||
}
|
||||
|
||||
static int settingsTglCertIgnore(Ihandle *self)
|
||||
{
|
||||
changeParameter(PARAMETER_CERTIGNORE);
|
||||
return IUP_DEFAULT;
|
||||
}
|
||||
|
||||
static int settingsTglThemes(Ihandle *self)
|
||||
{
|
||||
changeParameter(PARAMETER_THEMES);
|
||||
return IUP_DEFAULT;
|
||||
}
|
||||
|
||||
static int settingsTglWallpaper(Ihandle *self)
|
||||
{
|
||||
changeParameter(PARAMETER_WALLPAPER);
|
||||
return IUP_DEFAULT;
|
||||
}
|
||||
|
||||
static int settingsTglDecorations(Ihandle *self)
|
||||
{
|
||||
changeParameter(PARAMETER_DECORATIONS);
|
||||
return IUP_DEFAULT;
|
||||
}
|
||||
|
||||
static int settingsTglSound(Ihandle *self)
|
||||
{
|
||||
changeParameter(PARAMETER_SOUND);
|
||||
return IUP_DEFAULT;
|
||||
}
|
||||
|
||||
static int settingsTglFonts(Ihandle *self)
|
||||
{
|
||||
changeParameter(PARAMETER_FONTS);
|
||||
return IUP_DEFAULT;
|
||||
}
|
||||
|
||||
static int settingsTglEncryption(Ihandle *self)
|
||||
{
|
||||
changeParameter(PARAMETER_ENCRYPTION);
|
||||
return IUP_DEFAULT;
|
||||
}
|
||||
|
||||
static int settingsTglCompression(Ihandle *self)
|
||||
{
|
||||
changeParameter(PARAMETER_COMPRESSION);
|
||||
return IUP_DEFAULT;
|
||||
}
|
||||
|
||||
static int settingsUseSecurity(Ihandle *self)
|
||||
{
|
||||
changeParameter(PARAMETER_SECURITY);
|
||||
toggleActive(self, "SECURITY_TLS");
|
||||
toggleActive(self, "SECURITY_RDP");
|
||||
toggleActive(self, "SECURITY_NLA");
|
||||
toggleActive(self, "SECURITY_EXT");
|
||||
|
||||
return IUP_DEFAULT;
|
||||
}
|
||||
|
||||
static void settingsChooseSecurity(Ihandle *self, int state)
|
||||
{
|
||||
if (state == 1)
|
||||
{
|
||||
int tool_index = IupGetInt(self, "TOOLINDEX");
|
||||
switch (tool_index)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
changeValue(PARAMETER_SECURITY, VALUE_SECURITY_TLS);
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
changeValue(PARAMETER_SECURITY, VALUE_SECURITY_RDP);
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
changeValue(PARAMETER_SECURITY, VALUE_SECURITY_NLA);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
changeValue(PARAMETER_SECURITY, VALUE_SECURITY_EXT);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static int settingsUseBitsPerPixel(Ihandle *self)
|
||||
{
|
||||
changeParameter(PARAMETER_BITSPERPIXEL);
|
||||
toggleActive(self, "BITSPERPIXEL_8");
|
||||
toggleActive(self, "BITSPERPIXEL_16");
|
||||
toggleActive(self, "BITSPERPIXEL_24");
|
||||
toggleActive(self, "BITSPERPIXEL_32");
|
||||
|
||||
return IUP_DEFAULT;
|
||||
}
|
||||
|
||||
static void settingsChooseBitsPerPixel(Ihandle *self, int state)
|
||||
{
|
||||
if (state == 1)
|
||||
{
|
||||
int tool_index = IupGetInt(self, "TOOLINDEX");
|
||||
switch (tool_index)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
changeValue(PARAMETER_BITSPERPIXEL, VALUES_BITSPERPIXEL_8);
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
changeValue(PARAMETER_BITSPERPIXEL, VALUES_BITSPERPIXEL_16);
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
changeValue(PARAMETER_BITSPERPIXEL, VALUES_BITSPERPIXEL_24);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
changeValue(PARAMETER_BITSPERPIXEL, VALUES_BITSPERPIXEL_32);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static int settingsChooseMonitor(Ihandle *ih, char *text, int item, int state)
|
||||
{
|
||||
if (state == 1)
|
||||
{
|
||||
changeValue(PARAMETER_MONITORS, item - 1);
|
||||
}
|
||||
|
||||
return IUP_DEFAULT;
|
||||
}
|
||||
|
||||
static int settingsTglMultimonitor(Ihandle *self)
|
||||
{
|
||||
changeParameter(PARAMETER_MULTIMONITOR);
|
||||
|
||||
IupSetInt(IupGetDialogChild(self, "MONITORS"), "ACTIVE", !IupGetInt(IupGetDialogChild(self, "SETTINGS_TGL_MULTIMONITOR"), "VALUE"));
|
||||
setParameter(PARAMETER_MONITORS, !IupGetInt(IupGetDialogChild(self, "SETTINGS_TGL_MULTIMONITOR"), "VALUE"));
|
||||
return IUP_DEFAULT;
|
||||
}
|
||||
|
||||
static int settingsTglFullscreen(Ihandle *self)
|
||||
{
|
||||
changeParameter(PARAMETER_FULLSCREEN);
|
||||
toggleActive(self, "SETTINGS_TGL_MULTIMONITOR");
|
||||
IupSetInt(IupGetDialogChild(self, "MONITORS"), "ACTIVE", !IupGetInt(IupGetDialogChild(self, "SETTINGS_TGL_MULTIMONITOR"), "VALUE") && IupGetInt(IupGetDialogChild(self, "SETTINGS_TGL_FULLSCREEN"), "VALUE"));
|
||||
setParameter(PARAMETER_MONITORS, !IupGetInt(IupGetDialogChild(self, "SETTINGS_TGL_MULTIMONITOR"), "VALUE"));
|
||||
return IUP_DEFAULT;
|
||||
}
|
||||
|
||||
/*
|
||||
* Блок настроек
|
||||
*/
|
||||
static Ihandle* settingsBoxCheckbox()
|
||||
{
|
||||
Ihandle *tglAuthentication, *tglCertIgnore, *tglThemes, *tglWallpaper, *tglDecorations, *tglSound, *tglFonts, *tglEncryption, *tglCompression;
|
||||
|
||||
tglAuthentication = IupToggle("Аутентификация", NULL);
|
||||
tglCertIgnore = IupToggle("Игнорировать сертификат", NULL);
|
||||
tglThemes = IupToggle("Отключить темы", NULL);
|
||||
tglWallpaper = IupToggle("Отключить обои", NULL);
|
||||
tglDecorations = IupToggle("Отключить оформление окон", NULL);
|
||||
|
||||
tglSound = IupToggle("Поддержка звука", NULL);
|
||||
tglFonts = IupToggle("Отключить прорисовку шрифтов", NULL);
|
||||
tglEncryption = IupToggle("Отключить шифрование", NULL);
|
||||
tglCompression = IupToggle("Сжатие данных", NULL);
|
||||
|
||||
IupSetInt(tglAuthentication, "VALUE", getSetParameter(PARAMETER_AUTHENTICATION));
|
||||
IupSetInt(tglCertIgnore, "VALUE", getSetParameter(PARAMETER_CERTIGNORE));
|
||||
IupSetInt(tglThemes, "VALUE", getSetParameter(PARAMETER_THEMES));
|
||||
IupSetInt(tglWallpaper, "VALUE", getSetParameter(PARAMETER_WALLPAPER));
|
||||
IupSetInt(tglDecorations, "VALUE", getSetParameter(PARAMETER_DECORATIONS));
|
||||
IupSetInt(tglSound, "VALUE", getSetParameter(PARAMETER_SOUND));
|
||||
IupSetInt(tglFonts, "VALUE", getSetParameter(PARAMETER_FONTS));
|
||||
IupSetInt(tglEncryption, "VALUE", getSetParameter(PARAMETER_ENCRYPTION));
|
||||
IupSetInt(tglCompression, "VALUE", getSetParameter(PARAMETER_COMPRESSION));
|
||||
|
||||
return IupSetAttributes(
|
||||
IupFrame(
|
||||
IupVbox(
|
||||
IupSetCallbacks(IupSetAttributes(tglAuthentication, "NAME=SETTINGS_TGL_AUTHENTICATION, TIP=\"Получить окно входа авторизации\""), "ACTION", (Icallback) settingsTglAuthentication, NULL),
|
||||
IupSetCallbacks(IupSetAttributes(tglCertIgnore, "NAME=SETTINGS_TGL_AUTHENTICATION, TIP=\"Игнорировать подтверждение принятия сертификата\""), "ACTION", (Icallback) settingsTglCertIgnore, NULL),
|
||||
IupSetCallbacks(IupSetAttributes(tglThemes, "NAME=SETTINGS_TGL_THEMES, TIP=\"Отключить поддержку тем оформления (улучшает скорость соединения)\""), "ACTION", (Icallback) settingsTglThemes, NULL),
|
||||
IupSetCallbacks(IupSetAttributes(tglWallpaper, "NAME=SETTINGS_TGL_WALLPAPER, TIP=\"Отключить поддержку обоев рабочего стола (улучшает скорость соединения)\""), "ACTION", (Icallback) settingsTglWallpaper, NULL),
|
||||
IupSetCallbacks(IupSetAttributes(tglDecorations, "NAME=SETTINGS_TGL_DECORATIONS, TIP=\"Отключить поддержку оформления окон (улучшает скорость соединения)\""), "ACTION", (Icallback) settingsTglDecorations, NULL),
|
||||
#ifdef IUP_WITH_SOUND_CHECKBOX
|
||||
IupSetCallbacks(IupSetAttributes(tglSound, "NAME=SETTINGS_TGL_SOUND, TIP=\"Включить поддержку звука с удаленного сервера\""), "ACTION", (Icallback) settingsTglSound, NULL),
|
||||
#endif
|
||||
IupSetCallbacks(IupSetAttributes(tglFonts, "NAME=SETTINGS_TGL_FONTS, TIP=\"Отключить прорисовку шрифтов (улучшает скорость соединения)\""), "ACTION", (Icallback) settingsTglFonts, NULL),
|
||||
IupSetCallbacks(IupSetAttributes(tglEncryption, "NAME=SETTINGS_TGL_ENCRYPTION, TIP=\"Отключить шифрование данных\""), "ACTION", (Icallback) settingsTglEncryption, NULL),
|
||||
IupSetCallbacks(IupSetAttributes(tglCompression, "NAME=SETTINGS_TGL_COMPRESSION, TIP=\"Включить сжатие данных (улучшает скорость соединения)\""), "ACTION", (Icallback) settingsTglCompression, NULL),
|
||||
NULL
|
||||
)
|
||||
), "TITLE=\"Общие\", MARGIN=10x10"
|
||||
);
|
||||
}
|
||||
|
||||
static Ihandle* settingsBoxSecurity()
|
||||
{
|
||||
Ihandle *tglSecurity;
|
||||
Ihandle *tglTLS, *tglRDP, *tglNLA, *tglEXT;
|
||||
Ihandle *grdSecurity;
|
||||
|
||||
tglSecurity = IupToggle("Использовать", NULL);
|
||||
IupSetInt(tglSecurity, "VALUE", getSetParameter(PARAMETER_SECURITY));
|
||||
IupSetAttribute(tglSecurity, "TIP", "Выбрать конкретный протокол передачи данных");
|
||||
IupSetCallback(tglSecurity, "ACTION", (Icallback) settingsUseSecurity);
|
||||
|
||||
tglTLS = IupToggle("TLS", NULL);
|
||||
IupSetInt(tglTLS, "VALUE", getSetValue(PARAMETER_SECURITY, VALUE_SECURITY_TLS));
|
||||
IupSetInt(tglTLS, "ACTIVE", getSetParameter(PARAMETER_SECURITY));
|
||||
tglRDP = IupToggle("RDP", NULL);
|
||||
IupSetInt(tglRDP, "VALUE", getSetValue(PARAMETER_SECURITY, VALUE_SECURITY_RDP));
|
||||
IupSetInt(tglRDP, "ACTIVE", getSetParameter(PARAMETER_SECURITY));
|
||||
tglNLA = IupToggle("NLA", NULL);
|
||||
IupSetInt(tglNLA, "VALUE", getSetValue(PARAMETER_SECURITY, VALUE_SECURITY_NLA));
|
||||
IupSetInt(tglNLA, "ACTIVE", getSetParameter(PARAMETER_SECURITY));
|
||||
tglEXT = IupToggle("EXT", NULL);
|
||||
IupSetInt(tglEXT, "VALUE", getSetValue(PARAMETER_SECURITY, VALUE_SECURITY_EXT));
|
||||
IupSetInt(tglEXT, "ACTIVE", getSetParameter(PARAMETER_SECURITY));
|
||||
|
||||
grdSecurity = IupRadio(
|
||||
IupGridBox(
|
||||
IupSetCallbacks(IupSetAttributes(tglTLS, "NAME=SECURITY_TLS, TOOLINDEX=0"), "ACTION", (Icallback) settingsChooseSecurity, NULL),
|
||||
IupSetCallbacks(IupSetAttributes(tglRDP, "NAME=SECURITY_RDP, TOOLINDEX=1"), "ACTION", (Icallback) settingsChooseSecurity, NULL),
|
||||
IupSetCallbacks(IupSetAttributes(tglNLA, "NAME=SECURITY_NLA, TOOLINDEX=2"), "ACTION", (Icallback) settingsChooseSecurity, NULL),
|
||||
IupSetCallbacks(IupSetAttributes(tglEXT, "NAME=SECURITY_EXT, TOOLINDEX=3"), "ACTION", (Icallback) settingsChooseSecurity, NULL),
|
||||
NULL));
|
||||
|
||||
return IupHbox(IupSetAttributes(IupFrame(IupVbox(tglSecurity, grdSecurity, NULL)), "TITLE=\"Протокол безопасности\", MARGIN=15x10"), NULL);
|
||||
}
|
||||
|
||||
static Ihandle* settingsBoxBitsPerPixel()
|
||||
{
|
||||
Ihandle *tglBitsPerPixel;
|
||||
Ihandle *tgl8, *tgl16, *tgl24, *tgl32;
|
||||
Ihandle *grdBitsPerPixel;
|
||||
|
||||
tglBitsPerPixel = IupToggle("Использовать", NULL);
|
||||
IupSetInt(tglBitsPerPixel, "VALUE", getSetParameter(PARAMETER_BITSPERPIXEL));
|
||||
IupSetAttribute(tglBitsPerPixel, "TIP", "Выбрать конкретную глубину цвета (меньше глубина - выше скорость и хуже качество)");
|
||||
IupSetCallback(tglBitsPerPixel, "ACTION", (Icallback) settingsUseBitsPerPixel);
|
||||
|
||||
tgl8 = IupToggle("8 бит", NULL);
|
||||
IupSetInt(tgl8, "VALUE", getSetValue(PARAMETER_BITSPERPIXEL, VALUES_BITSPERPIXEL_8));
|
||||
IupSetInt(tgl8, "ACTIVE", getSetParameter(PARAMETER_BITSPERPIXEL));
|
||||
tgl16 = IupToggle("16 бит", NULL);
|
||||
IupSetInt(tgl16, "VALUE", getSetValue(PARAMETER_BITSPERPIXEL, VALUES_BITSPERPIXEL_16));
|
||||
IupSetInt(tgl16, "ACTIVE", getSetParameter(PARAMETER_BITSPERPIXEL));
|
||||
tgl24 = IupToggle("24 бит", NULL);
|
||||
IupSetInt(tgl24, "VALUE", getSetValue(PARAMETER_BITSPERPIXEL, VALUES_BITSPERPIXEL_24));
|
||||
IupSetInt(tgl24, "ACTIVE", getSetParameter(PARAMETER_BITSPERPIXEL));
|
||||
tgl32 = IupToggle("32 бит", NULL);
|
||||
IupSetInt(tgl32, "VALUE", getSetValue(PARAMETER_BITSPERPIXEL, VALUES_BITSPERPIXEL_32));
|
||||
IupSetInt(tgl32, "ACTIVE", getSetParameter(PARAMETER_BITSPERPIXEL));
|
||||
|
||||
grdBitsPerPixel = IupRadio(
|
||||
IupGridBox(IupSetCallbacks(IupSetAttributes(tgl8, "NAME=BITSPERPIXEL_8, TOOLINDEX=0"), "ACTION", (Icallback) settingsChooseBitsPerPixel,
|
||||
NULL), IupSetCallbacks(IupSetAttributes(tgl16, "NAME=BITSPERPIXEL_16, TOOLINDEX=1"), "ACTION", (Icallback) settingsChooseBitsPerPixel,
|
||||
NULL), IupSetCallbacks(IupSetAttributes(tgl24, "NAME=BITSPERPIXEL_24, TOOLINDEX=2"), "ACTION", (Icallback) settingsChooseBitsPerPixel,
|
||||
NULL), IupSetCallbacks(IupSetAttributes(tgl32, "NAME=BITSPERPIXEL_32, TOOLINDEX=3"), "ACTION", (Icallback) settingsChooseBitsPerPixel,
|
||||
NULL),
|
||||
NULL));
|
||||
|
||||
return IupHbox(IupSetAttributes(IupFrame(IupVbox(tglBitsPerPixel, grdBitsPerPixel, NULL)), "TITLE=\"Глубина цвета\", MARGIN=15x10"), NULL);
|
||||
}
|
||||
|
||||
static Ihandle* settingsBoxMonitor()
|
||||
{
|
||||
Ihandle *tglFullscreen, *tglMultimonitor, *ddMonitor;
|
||||
|
||||
tglMultimonitor = IupToggle("Все мониторы", NULL);
|
||||
tglFullscreen = IupToggle("На весь экран", NULL);
|
||||
ddMonitor = IupList(NULL);
|
||||
|
||||
Monitors *monitors = loadMonitors();
|
||||
for (size_t i = 0; i < monitors->size; ++i)
|
||||
{
|
||||
IupSetAttribute(ddMonitor, monitors->monitor[i]->data[0], monitors->monitor[i]->data[1]);
|
||||
if (monitors->monitor[i]->data[2][0] == '1')
|
||||
IupSetAttribute(ddMonitor, "VALUE", monitors->monitor[i]->data[0]);
|
||||
}
|
||||
freeMonitors(monitors);
|
||||
|
||||
IupSetInt(tglMultimonitor, "VALUE", getSetParameter(PARAMETER_MULTIMONITOR));
|
||||
IupSetInt(tglFullscreen, "VALUE", getSetParameter(PARAMETER_FULLSCREEN));
|
||||
|
||||
IupSetInt(tglMultimonitor, "ACTIVE", getSetParameter(PARAMETER_FULLSCREEN));
|
||||
IupSetInt(ddMonitor, "ACTIVE", getSetParameter(PARAMETER_FULLSCREEN) && !getSetParameter(PARAMETER_MULTIMONITOR));
|
||||
|
||||
return IupSetAttributes(
|
||||
IupFrame(
|
||||
IupVbox(
|
||||
IupSetAttributes(
|
||||
IupVbox(
|
||||
IupSetCallbacks(IupSetAttributes(tglFullscreen, "NAME=SETTINGS_TGL_FULLSCREEN, EXPAND=YES, TIP=\"Выполнить подключение на весь экран\""), "ACTION", (Icallback) settingsTglFullscreen, NULL),
|
||||
IupSetCallbacks(IupSetAttributes(tglMultimonitor, "NAME=SETTINGS_TGL_MULTIMONITOR, TIP=\"Задействовать все подключенные мониторы\""), "ACTION", (Icallback) settingsTglMultimonitor, NULL),
|
||||
NULL
|
||||
), "MARGIN=0x0, GAP=0x0"),
|
||||
IupSetCallbacks(IupSetAttributes(ddMonitor, "NAME=MONITORS, DROPDOWN=YES, EXPAND=YES, TIP=\"Выбрать конкретный монитор для подключения\""), "ACTION", (Icallback) settingsChooseMonitor, NULL),
|
||||
NULL)
|
||||
), "TITLE=\"Монитор\", MARGIN=15x10, GAP=15x0");
|
||||
}
|
||||
|
||||
static Ihandle* settingsBoxAbout()
|
||||
{
|
||||
Ihandle *inputAbout, *formattag;
|
||||
|
||||
inputAbout = IupText(NULL);
|
||||
|
||||
formattag = IupUser();
|
||||
IupSetAttribute(formattag, "FONTSIZE", "8");
|
||||
IupSetAttribute(formattag, "ALIGNMENT", "CENTER");
|
||||
IupSetAttribute(formattag, "SELECTION", "1,1:7,50");
|
||||
IupSetAttribute(inputAbout, "ADDFORMATTAG_HANDLE", (char*)formattag);
|
||||
|
||||
formattag = IupUser();
|
||||
IupSetAttribute(formattag, "WEIGHT", "BOLD");
|
||||
IupSetAttribute(formattag, "SELECTION", "1,1:1,20");
|
||||
IupSetAttribute(inputAbout, "ADDFORMATTAG_HANDLE", (char*)formattag);
|
||||
|
||||
formattag = IupUser();
|
||||
IupSetAttribute(formattag, "FONTSIZE", "9");
|
||||
IupSetAttribute(formattag, "SELECTION", "1,1:1,20");
|
||||
IupSetAttribute(inputAbout, "ADDFORMATTAG_HANDLE", (char*)formattag);
|
||||
|
||||
formattag = IupUser();
|
||||
IupSetAttribute(formattag, "FGCOLOR", "0 0 255");
|
||||
IupSetAttribute(formattag, "SELECTION", "5,1:5,100");
|
||||
IupSetAttribute(inputAbout, "ADDFORMATTAG_HANDLE", (char*)formattag);
|
||||
|
||||
formattag = IupUser();
|
||||
IupSetAttribute(formattag, "WEIGHT", "BOLD");
|
||||
IupSetAttribute(formattag, "SELECTION", "6,20:6,100");
|
||||
IupSetAttribute(inputAbout, "ADDFORMATTAG_HANDLE", (char*)formattag);
|
||||
|
||||
IupSetAttribute(inputAbout, "READONLY", "YES");
|
||||
IupSetAttribute(inputAbout, "MULTILINE", "YES");
|
||||
IupSetAttribute(inputAbout, "SIZE", "160");
|
||||
IupSetAttribute(inputAbout, "VISIBLELINES", "6");
|
||||
IupSetAttribute(inputAbout, "PADDING", "5");
|
||||
IupSetAttribute(inputAbout, "FORMATTING", "YES");
|
||||
IupSetAttribute(inputAbout, "EXPAND", "YES");
|
||||
IupSetAttribute(inputAbout, "VALUE", getAbout());
|
||||
|
||||
return IupSetAttributes(IupFrame(IupHbox(inputAbout, NULL)), "TITLE=\"О программе\", MARGIN=5x5");
|
||||
}
|
||||
|
||||
static Ihandle* settingsHorizontalBox()
|
||||
{
|
||||
return IupSetAttributes(
|
||||
IupHbox(
|
||||
IupSetAttributes(
|
||||
IupVbox(settingsBoxCheckbox(), settingsBoxMonitor(), NULL),
|
||||
"NMARGIN=0x0"
|
||||
),
|
||||
IupSetAttributes(
|
||||
IupVbox(
|
||||
IupSetAttributes(IupHbox(settingsBoxSecurity(), settingsBoxBitsPerPixel(), NULL), "GAP=10x0"),
|
||||
settingsBoxAbout(),
|
||||
NULL),
|
||||
"MARGIN=0x0"),
|
||||
NULL), "NMARGIN=10x0, NGAP=10x0"
|
||||
);
|
||||
}
|
||||
|
||||
/*
|
||||
* Блок кнопок
|
||||
*/
|
||||
static Ihandle* settingsHorizontalBoxButtons()
|
||||
{
|
||||
Ihandle *btnSave, *btnClose;
|
||||
|
||||
btnSave = IupButton("Сохранить", NULL);
|
||||
IupSetAttribute(btnSave, "NAME", "SETTIGS_BTN_SAVE");
|
||||
IupSetAttribute(btnSave, "TIP", "Сохранить настройки");
|
||||
#ifdef IUP_WITH_COLOR_BUTTONS
|
||||
IupSetAttribute(btnSave, "BGCOLOR", "0 179 0");
|
||||
IupSetAttribute(btnSave, "FGCOLOR", "255 255 255");
|
||||
#endif
|
||||
|
||||
btnClose = IupButton("Закрыть", NULL);
|
||||
IupSetAttribute(btnClose, "NAME", "SETTIGS_BTN_CLOSE");
|
||||
IupSetAttribute(btnClose, "TIP", "Отменить изменения");
|
||||
#ifdef IUP_WITH_COLOR_BUTTONS
|
||||
IupSetAttribute(btnClose, "BGCOLOR", "204 0 0");
|
||||
IupSetAttribute(btnClose, "FGCOLOR", "255 255 255");
|
||||
#endif
|
||||
|
||||
IupSetHandle("btnClosePointer", btnClose);
|
||||
|
||||
return IupSetAttributes(
|
||||
IupHbox(IupFill(), IupSetCallbacks(btnSave, "ACTION", (Icallback) settingsSave, NULL),
|
||||
IupSetCallbacks(btnClose, "ACTION", (Icallback) settingsClose, NULL), IupFill(),
|
||||
NULL), "ALIGNMENT=ACENTER:ACENTER, GAP=10, MARGIN=10x10");
|
||||
}
|
||||
|
||||
int settingsMainWindow(Ihandle *self)
|
||||
{
|
||||
Ihandle *dlg;
|
||||
Ihandle *vBoxMain;
|
||||
|
||||
vBoxMain = IupSetAttributes(IupVbox(settingsHorizontalBox(), settingsHorizontalBoxButtons(), NULL), "NMARGIN=2x2, ALIGNMENT=ACENTER");
|
||||
|
||||
dlg = IupDialog(vBoxMain);
|
||||
IupSetAttribute(dlg, "TITLE", "Настройки");
|
||||
IupSetCallback(
|
||||
IupSetAttributes(dlg,
|
||||
"ICON=icon, DIALOGFRAME=ON, SIMULATEMODAL=ON, DEFAULTESC=btnClosePointer, TOPMOST=YES, BRINGFRONT=YES, NAME=SETTINGS_MAIN_WINDOW"),
|
||||
"CLOSE_CB", (Icallback) settingsClose);
|
||||
|
||||
IupShowXY(dlg, IUP_CURRENT, IUP_CURRENT);
|
||||
|
||||
return IUP_DEFAULT;
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
/*
|
||||
* value.h
|
||||
*
|
||||
* Created on: 8 июл. 2022 г.
|
||||
* Author: alexander
|
||||
*/
|
||||
|
||||
#ifndef VALUE_H_
|
||||
#define VALUE_H_
|
||||
|
||||
typedef enum
|
||||
{
|
||||
VALUE_SERVER,
|
||||
VALUE_USERNAME,
|
||||
VALUE_PASSWORD,
|
||||
VALUE_SECURITY_TLS,
|
||||
VALUE_SECURITY_RDP,
|
||||
VALUE_SECURITY_NLA,
|
||||
VALUE_SECURITY_EXT,
|
||||
VALUES_BITSPERPIXEL_8,
|
||||
VALUES_BITSPERPIXEL_16,
|
||||
VALUES_BITSPERPIXEL_24,
|
||||
VALUES_BITSPERPIXEL_32,
|
||||
VALUES_USB_DRIVE
|
||||
} Value;
|
||||
|
||||
#endif /* VALUE_H_ */
|
|
@ -1,71 +0,0 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <winpr/crt.h>
|
||||
#include <winpr/synch.h>
|
||||
#include <winpr/thread.h>
|
||||
|
||||
#include <freerdp/freerdp.h>
|
||||
#include <freerdp/client/cmdline.h>
|
||||
|
||||
#include "../xf_client.h"
|
||||
#include "../xfreerdp.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <iup.h>
|
||||
|
||||
#include "xrdp.h"
|
||||
|
||||
int free_rdp_connect(int argc, char **argv)
|
||||
{
|
||||
int rc = 1;
|
||||
int status;
|
||||
HANDLE thread;
|
||||
xfContext *xfc;
|
||||
DWORD dwExitCode;
|
||||
rdpContext *context;
|
||||
rdpSettings *settings;
|
||||
RDP_CLIENT_ENTRY_POINTS clientEntryPoints;
|
||||
|
||||
ZeroMemory(&clientEntryPoints, sizeof(RDP_CLIENT_ENTRY_POINTS));
|
||||
clientEntryPoints.Size = sizeof(RDP_CLIENT_ENTRY_POINTS);
|
||||
clientEntryPoints.Version = RDP_CLIENT_INTERFACE_VERSION;
|
||||
|
||||
RdpClientEntry(&clientEntryPoints);
|
||||
|
||||
context = freerdp_client_context_new(&clientEntryPoints);
|
||||
if (!context)
|
||||
return 1;
|
||||
|
||||
settings = context->settings;
|
||||
xfc = (xfContext*) context;
|
||||
|
||||
status = freerdp_client_settings_parse_command_line(context->settings, argc, argv, FALSE);
|
||||
if (status)
|
||||
{
|
||||
rc = freerdp_client_settings_command_line_status_print(settings, status, argc, argv);
|
||||
|
||||
if (settings->ListMonitors)
|
||||
xf_list_monitors(xfc);
|
||||
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (freerdp_client_start(context) != 0)
|
||||
goto out;
|
||||
|
||||
thread = freerdp_client_get_thread(context);
|
||||
|
||||
WaitForSingleObject(thread, INFINITE);
|
||||
GetExitCodeThread(thread, &dwExitCode);
|
||||
rc = xf_exit_code_from_disconnect_reason(dwExitCode);
|
||||
|
||||
freerdp_client_stop(context);
|
||||
|
||||
out: freerdp_client_context_free(context);
|
||||
|
||||
return rc;
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
/*
|
||||
* xrdp.h
|
||||
*
|
||||
* Created on: 15 июл. 2022 г.
|
||||
* Author: alexander
|
||||
*/
|
||||
|
||||
#ifndef XRDP_H_
|
||||
#define XRDP_H_
|
||||
|
||||
int free_rdp_connect(int argc, char **argv);
|
||||
|
||||
#endif /* XRDP_H_ */
|
|
@ -1,19 +0,0 @@
|
|||
find_path(IUP_INCLUDE_DIR NAMES iup.h
|
||||
PATHS /home/alexander/repositories/iup/include
|
||||
DOC "The IUP include directory"
|
||||
)
|
||||
|
||||
find_library(IUP_LIBRARY NAMES iup
|
||||
PATHS /home/alexander/repositories/iup
|
||||
DOC "The IUP library"
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(IUP DEFAULT_MSG IUP_LIBRARY IUP_INCLUDE_DIR)
|
||||
|
||||
if(IUP_FOUND)
|
||||
set( IUP_LIBRARIES ${IUP_LIBRARY} )
|
||||
set( IUP_INCLUDE_DIRS ${IUP_INCLUDE_DIR} )
|
||||
endif()
|
||||
|
||||
mark_as_advanced(IUP_INCLUDE_DIR IUP_LIBRARY)
|
|
@ -1,19 +0,0 @@
|
|||
find_path(SQLITE_INCLUDE_DIR NAMES sqlite3.h
|
||||
PATHS /usr/include
|
||||
DOC "The SQLITE include directory"
|
||||
)
|
||||
|
||||
find_library(SQLITE_LIBRARY NAMES sqlite3
|
||||
PATHS /usr/lib64
|
||||
DOC "The SQLITE library"
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SQLite DEFAULT_MSG SQLITE_LIBRARY SQLITE_INCLUDE_DIR)
|
||||
|
||||
if(SQLITE_FOUND)
|
||||
set( SQLITE_LIBRARIES ${SQLITE_LIBRARY} )
|
||||
set( SQLITE_INCLUDE_DIRS ${SQLITE_INCLUDE_DIR} )
|
||||
endif()
|
||||
|
||||
mark_as_advanced(SQLITE_INCLUDE_DIR SQLITE_LIBRARY)
|
|
@ -0,0 +1,125 @@
|
|||
/*
|
||||
* gui.c
|
||||
*
|
||||
* Created on: 6 июл. 2022 г.
|
||||
* Author: alexander
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "gui.h"
|
||||
#include "settings.h"
|
||||
#include "node_settings.h"
|
||||
#include "images.h"
|
||||
#include "arguments.h"
|
||||
|
||||
static int guiExit(Ihandle *self)
|
||||
{
|
||||
return IUP_CLOSE;
|
||||
}
|
||||
|
||||
static int guiConnect(Ihandle *self)
|
||||
{
|
||||
setParameterValue(PARAMETER_SERVER, VALUE_SERVER, IupGetAttribute(IupGetDialogChild(self, "SERVER"), "LINEVALUE"));
|
||||
setParameterValue(PARAMETER_USERNAME, VALUE_USERNAME, IupGetAttribute(IupGetDialogChild(self, "USER"), "LINEVALUE"));
|
||||
setParameterValue(PARAMETER_PASSWORD, VALUE_PASSWORD, IupGetAttribute(IupGetDialogChild(self, "PASSWORD"), "LINEVALUE"));
|
||||
|
||||
Arguments args;
|
||||
buildArguments(&args);
|
||||
for (int i = 0; i < args.argc; ++i)
|
||||
{
|
||||
printf("%s\n", args.argv[i]);
|
||||
}
|
||||
printf("\n");
|
||||
freeArguments(&args);
|
||||
|
||||
return IUP_DEFAULT;
|
||||
}
|
||||
|
||||
Ihandle* guiStart()
|
||||
{
|
||||
Ihandle *dlg;
|
||||
Ihandle *icon, *bgHead;
|
||||
Ihandle *vBoxMain, *hBoxServer, *hBoxUser, *hBoxPassword, *hBoxButtons; // Boxes
|
||||
Ihandle *labelImage;
|
||||
Ihandle *labelServer, *inputServer;
|
||||
Ihandle *labelUser, *inputUser;
|
||||
Ihandle *labelPassword, *inputPassword;
|
||||
Ihandle *btnConnect, *btnClose, *btnSettings;
|
||||
|
||||
icon = IupImageRGBA(64, 64, idata_icon);
|
||||
IupSetHandle("icon", icon);
|
||||
|
||||
labelImage = IupLabel(NULL);
|
||||
|
||||
bgHead = IupImageRGBA(405, 72, idata_head);
|
||||
IupSetAttributeHandle(labelImage, "IMAGE", bgHead);
|
||||
|
||||
labelServer = IupLabel("Компьютер:");
|
||||
IupSetAttribute(labelServer, "SIZE", "80x16");
|
||||
// IupSetAttribute(labelServer, "FONT", "Helvetica, 14");
|
||||
IupSetAttribute(labelServer, "ALIGNMENT", "ARIGHT:ACENTER");
|
||||
IupSetAttribute(labelServer, "PADDING", "5");
|
||||
inputServer = IupText(NULL);
|
||||
IupSetAttribute(inputServer, "NAME", "SERVER");
|
||||
// IupSetAttribute(inputServer, "BORDER", "NO");
|
||||
IupSetAttribute(inputServer, "SIZE", "100");
|
||||
// IupSetAttribute(inputServer, "PADDING", "10x");
|
||||
hBoxServer = IupHbox(labelServer, inputServer, NULL);
|
||||
IupSetAttribute(hBoxServer, "MARGIN", "10x10");
|
||||
|
||||
labelUser = IupLabel("Пользователь:");
|
||||
IupSetAttribute(labelUser, "SIZE", "80x16");
|
||||
IupSetAttribute(labelUser, "ALIGNMENT", "ARIGHT:ACENTER");
|
||||
IupSetAttribute(labelUser, "PADDING", "5");
|
||||
inputUser = IupText(NULL);
|
||||
IupSetAttribute(inputUser, "NAME", "USER");
|
||||
IupSetAttribute(inputUser, "SIZE", "100");
|
||||
// IupSetAttribute(inputUser, "PADDING", "10x10");
|
||||
hBoxUser = IupHbox(labelUser, inputUser, NULL);
|
||||
IupSetAttribute(hBoxUser, "MARGIN", "10x0");
|
||||
|
||||
labelPassword = IupLabel("Пароль:");
|
||||
IupSetAttribute(labelPassword, "SIZE", "80x16");
|
||||
IupSetAttribute(labelPassword, "ALIGNMENT", "ARIGHT:ACENTER");
|
||||
IupSetAttribute(labelPassword, "PADDING", "5");
|
||||
inputPassword = IupText(NULL);
|
||||
IupSetAttribute(inputPassword, "SIZE", "100");
|
||||
// IupSetAttribute(inputPassword, "PADDING", "10x10");
|
||||
IupSetAttribute(inputPassword, "NAME", "PASSWORD");
|
||||
IupSetAttribute(inputPassword, "PASSWORD", "YES");
|
||||
hBoxPassword = IupHbox(labelPassword, inputPassword, NULL);
|
||||
IupSetAttribute(hBoxPassword, "MARGIN", "10x10");
|
||||
|
||||
btnConnect = IupButton("Подключение", NULL);
|
||||
IupSetHandle("CONNECT", btnConnect);
|
||||
IupSetAttribute(btnConnect, "NAME", "CONNECT");
|
||||
btnClose = IupButton("Закрыть", NULL);
|
||||
IupSetHandle("CLOSE", btnClose);
|
||||
IupSetAttribute(btnClose, "NAME", "CLOSE");
|
||||
btnSettings = IupButton("Настройки", NULL);
|
||||
IupSetAttribute(btnSettings, "NAME", "SETTINGS");
|
||||
hBoxButtons = IupHbox(IupFill(), btnConnect, btnClose, btnSettings, IupFill(), NULL);
|
||||
IupSetAttribute(hBoxButtons, "ALIGNMENT", "ACENTER:ACENTER");
|
||||
IupSetAttribute(hBoxButtons, "GAP", "10");
|
||||
IupSetAttribute(hBoxButtons, "MARGIN", "10x10");
|
||||
|
||||
vBoxMain = IupVbox(labelImage, hBoxServer, hBoxUser, hBoxPassword, hBoxButtons, NULL);
|
||||
|
||||
IupSetCallback(btnConnect, "ACTION", (Icallback) guiConnect);
|
||||
IupSetCallback(btnClose, "ACTION", (Icallback) guiExit);
|
||||
IupSetCallback(btnSettings, "ACTION", (Icallback) settingsMainWindow);
|
||||
|
||||
dlg = IupDialog(vBoxMain);
|
||||
IupSetAttribute(dlg, "IMAGE", "BG_HEAD");
|
||||
IupSetAttribute(dlg, "ICON", "icon");
|
||||
IupSetAttribute(dlg, "TITLE", "GUI FreeRDP");
|
||||
IupSetAttribute(dlg, "RESIZE", "NO");
|
||||
IupSetAttribute(dlg, "PARENTDIALOG", "MAIN_WINDOW");
|
||||
IupSetAttribute(dlg, "DEFAULTENTER", "CONNECT");
|
||||
IupSetAttribute(dlg, "DEFAULTESC", "CLOSE");
|
||||
|
||||
return dlg;
|
||||
}
|
193
gui.patch
193
gui.patch
|
@ -1,193 +0,0 @@
|
|||
diff --git a/client/X11/CMakeLists.txt b/client/X11/CMakeLists.txt
|
||||
index 869652c..ab6fe67 100644
|
||||
--- a/client/X11/CMakeLists.txt
|
||||
+++ b/client/X11/CMakeLists.txt
|
||||
@@ -57,6 +57,39 @@ set(${MODULE_PREFIX}_SRCS
|
||||
xf_client.c
|
||||
xf_client.h)
|
||||
|
||||
+set(${GUI_IUP}_SRCS
|
||||
+ cli/xfreerdp.c
|
||||
+ cli/images.c
|
||||
+ xfreerdp.h
|
||||
+ cli/xrdp.h
|
||||
+ cli/arguments.c
|
||||
+ cli/concat.c
|
||||
+ cli/gui.c
|
||||
+ cli/node_settings.c
|
||||
+ cli/rxrandr_broker.c
|
||||
+ cli/rxrandr.c
|
||||
+ cli/settings.c
|
||||
+ cli/db.c
|
||||
+ cli/address.c
|
||||
+ cli/monitor.c
|
||||
+ cli/about.c
|
||||
+ cli/keylang.c
|
||||
+ cli/xrdp.c)
|
||||
+
|
||||
+set(IUP_FEATURE_TYPE "REQUIRED")
|
||||
+set(IUP_FEATURE_PURPOSE "IUP extension")
|
||||
+set(IUP_FEATURE_DESCRIPTION "Multi-platform toolkit")
|
||||
+
|
||||
+include_directories(${IUP_INCLUDE_DIRS})
|
||||
+find_feature(IUP ${IUP_FEATURE_TYPE} ${IUP_FEATURE_PURPOSE} ${IUP_FEATURE_DESCRIPTION})
|
||||
+
|
||||
+set(SQLITE_FEATURE_TYPE "REQUIRED")
|
||||
+set(SQLITE_FEATURE_PURPOSE "SQLite extension")
|
||||
+set(SQLITE_FEATURE_DESCRIPTION "C-language library SQL database engine")
|
||||
+
|
||||
+include_directories(${SQLITE_INCLUDE_DIRS})
|
||||
+find_feature(SQLite ${SQLITE_FEATURE_TYPE} ${SQLITE_FEATURE_PURPOSE} ${SQLITE_FEATURE_DESCRIPTION})
|
||||
+
|
||||
if (CHANNEL_TSMF_CLIENT)
|
||||
set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS}
|
||||
xf_tsmf.c
|
||||
@@ -74,7 +107,7 @@ if(WITH_CLIENT_INTERFACE)
|
||||
endif()
|
||||
|
||||
else()
|
||||
- set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} cli/xfreerdp.c xfreerdp.h)
|
||||
+ set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} ${${GUI_IUP}_SRCS})
|
||||
add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
|
||||
set_target_properties(${MODULE_NAME} PROPERTIES OUTPUT_NAME "xfreerdp")
|
||||
include_directories(..)
|
||||
@@ -226,13 +259,33 @@ if(WITH_XFIXES)
|
||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${XFIXES_LIBRARIES})
|
||||
endif()
|
||||
|
||||
+if(IUP_WITH_COLOR_BUTTONS)
|
||||
+ add_definitions(-DIUP_WITH_COLOR_BUTTONS)
|
||||
+endif()
|
||||
+
|
||||
+if(IUP_WITH_SOUND_CHECKBOX)
|
||||
+ add_definitions(-DIUP_WITH_SOUND_CHECKBOX)
|
||||
+endif()
|
||||
+
|
||||
+if(IUP_DESCRIPTION_ABOUT_ARCH_X32)
|
||||
+ add_definitions(-DIUP_DESCRIPTION_ABOUT_ARCH_X32)
|
||||
+endif()
|
||||
+
|
||||
+if(IUP_DESCRIPTION_ABOUT_MIRATORG)
|
||||
+ add_definitions(-DIUP_DESCRIPTION_ABOUT_MIRATORG)
|
||||
+endif()
|
||||
+
|
||||
+if(IUP_WITH_LANGUAGE_KEYBOARD_ICON)
|
||||
+ add_definitions(-DIUP_WITH_LANGUAGE_KEYBOARD_ICON)
|
||||
+endif()
|
||||
+
|
||||
include_directories(${CMAKE_SOURCE_DIR}/resources)
|
||||
|
||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-client freerdp m)
|
||||
if (NOT APPLE)
|
||||
list(APPEND ${MODULE_PREFIX}_LIBS rt)
|
||||
endif()
|
||||
-target_link_libraries(${MODULE_NAME} ${PRIVATE_KEYWORD} ${${MODULE_PREFIX}_LIBS})
|
||||
+target_link_libraries(${MODULE_NAME} ${PRIVATE_KEYWORD} ${${MODULE_PREFIX}_LIBS} ${IUP_LIBRARIES} ${SQLITE_LIBRARIES})
|
||||
|
||||
if(WITH_IPP)
|
||||
target_link_libraries(${MODULE_NAME} ${PRIVATE_KEYWORD} ${IPP_LIBRARY_LIST})
|
||||
diff --git a/client/X11/cli/xfreerdp.c b/client/X11/cli/xfreerdp.c
|
||||
index 8db4d39..abdf3ca 100644
|
||||
--- a/client/X11/cli/xfreerdp.c
|
||||
+++ b/client/X11/cli/xfreerdp.c
|
||||
@@ -1,85 +1,24 @@
|
||||
-/**
|
||||
- * FreeRDP: A Remote Desktop Protocol Implementation
|
||||
- * X11 Client
|
||||
- *
|
||||
- * Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
|
||||
- * Copyright 2012 HP Development Company, LLC
|
||||
- *
|
||||
- * Licensed under the Apache License, Version 2.0 (the "License");
|
||||
- * you may not use this file except in compliance with the License.
|
||||
- * You may obtain a copy of the License at
|
||||
- *
|
||||
- * http://www.apache.org/licenses/LICENSE-2.0
|
||||
- *
|
||||
- * Unless required by applicable law or agreed to in writing, software
|
||||
- * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
- * See the License for the specific language governing permissions and
|
||||
- * limitations under the License.
|
||||
- */
|
||||
+#include <stdlib.h>
|
||||
+#include "gui.h"
|
||||
+#include "arguments.h"
|
||||
|
||||
-#ifdef HAVE_CONFIG_H
|
||||
-#include "config.h"
|
||||
-#endif
|
||||
+#include <stdio.h>
|
||||
|
||||
-#include <winpr/crt.h>
|
||||
-#include <winpr/synch.h>
|
||||
-#include <winpr/thread.h>
|
||||
-
|
||||
-#include <freerdp/freerdp.h>
|
||||
-#include <freerdp/client/cmdline.h>
|
||||
-
|
||||
-#include "../xf_client.h"
|
||||
-#include "../xfreerdp.h"
|
||||
-
|
||||
-int main(int argc, char* argv[])
|
||||
+int main(int argc, char **argv)
|
||||
{
|
||||
- int rc = 1;
|
||||
- int status;
|
||||
- HANDLE thread;
|
||||
- xfContext* xfc;
|
||||
- DWORD dwExitCode;
|
||||
- rdpContext* context;
|
||||
- rdpSettings* settings;
|
||||
- RDP_CLIENT_ENTRY_POINTS clientEntryPoints;
|
||||
-
|
||||
- ZeroMemory(&clientEntryPoints, sizeof(RDP_CLIENT_ENTRY_POINTS));
|
||||
- clientEntryPoints.Size = sizeof(RDP_CLIENT_ENTRY_POINTS);
|
||||
- clientEntryPoints.Version = RDP_CLIENT_INTERFACE_VERSION;
|
||||
-
|
||||
- RdpClientEntry(&clientEntryPoints);
|
||||
-
|
||||
- context = freerdp_client_context_new(&clientEntryPoints);
|
||||
- if (!context)
|
||||
- return 1;
|
||||
-
|
||||
- settings = context->settings;
|
||||
- xfc = (xfContext*)context;
|
||||
-
|
||||
- status = freerdp_client_settings_parse_command_line(context->settings, argc, argv, FALSE);
|
||||
- if (status)
|
||||
- {
|
||||
- rc = freerdp_client_settings_command_line_status_print(settings, status, argc, argv);
|
||||
-
|
||||
- if (settings->ListMonitors)
|
||||
- xf_list_monitors(xfc);
|
||||
-
|
||||
- goto out;
|
||||
- }
|
||||
-
|
||||
- if (freerdp_client_start(context) != 0)
|
||||
- goto out;
|
||||
+ if (argc > 1)
|
||||
+ settingsLoad(argv[1]);
|
||||
+ else
|
||||
+ settingsLoad("/etc/freerdp/freerdp.db");
|
||||
|
||||
- thread = freerdp_client_get_thread(context);
|
||||
+ IupOpen(&argc, &argv);
|
||||
|
||||
- WaitForSingleObject(thread, INFINITE);
|
||||
- GetExitCodeThread(thread, &dwExitCode);
|
||||
- rc = xf_exit_code_from_disconnect_reason(dwExitCode);
|
||||
+ IupShowXY(guiStart(), IUP_CENTER, IUP_CENTER);
|
||||
+ IupMainLoop();
|
||||
|
||||
- freerdp_client_stop(context);
|
||||
+ IupClose();
|
||||
|
||||
-out:
|
||||
- freerdp_client_context_free(context);
|
||||
+ settingsFree();
|
||||
|
||||
- return rc;
|
||||
+ return EXIT_SUCCESS;
|
||||
}
|
|
@ -1,398 +1,5 @@
|
|||
#include "images.h"
|
||||
|
||||
const unsigned char empty_keyboard[] = {
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|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0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119,
|
||||
0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 116, 0, 0, 0, 36,
|
||||
0, 0, 0, 219, 0, 0, 0, 130, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119,
|
||||
0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119,
|
||||
0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119,
|
||||
0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 131, 0, 0, 0, 218,
|
||||
0, 0, 0, 239, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 239,
|
||||
0, 0, 0, 239, 0, 0, 0, 0, 0, 0, 0, 0, 0,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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 3, 18, 30, 36, 83, 34, 43, 48, 201, 30, 39, 45, 228, 30, 39, 45, 228, 30, 39, 45, 228, 30, 39, 45, 228, 30, 39, 45, 228,
|
||||
30, 39, 45, 228, 30, 39, 45, 228, 30, 39, 45, 228, 30, 39, 45, 228, 30, 39, 45, 228, 30, 39, 45, 228, 30, 39, 45, 228, 30, 39, 45, 228,
|
||||
30, 39, 45, 228, 30, 39, 45, 228, 30, 39, 45, 228, 30, 39, 45, 228, 30, 39, 45, 228, 30, 39, 45, 228, 30, 39, 45, 228, 30, 39, 45, 228,
|
||||
30, 39, 45, 228, 30, 39, 45, 228, 30, 39, 45, 228, 30, 39, 45, 228, 30, 39, 45, 228, 34, 43, 48, 201, 18, 30, 36, 83, 0, 0, 0, 3,
|
||||
26, 33, 38, 107, 60, 67, 72, 244, 185, 188, 190, 255, 211, 213, 214, 255, 211, 213, 214, 255, 211, 213, 214, 255, 211, 213, 214, 255, 211, 213, 214, 255,
|
||||
211, 213, 214, 255, 211, 213, 214, 255, 211, 213, 214, 255, 211, 213, 214, 255, 211, 213, 214, 255, 211, 213, 214, 255, 211, 213, 214, 255, 211, 213, 214, 255,
|
||||
211, 213, 214, 255, 211, 213, 214, 255, 211, 213, 214, 255, 211, 213, 214, 255, 211, 213, 214, 255, 211, 213, 214, 255, 211, 213, 214, 255, 211, 213, 214, 255,
|
||||
211, 213, 214, 255, 211, 213, 214, 255, 211, 213, 214, 255, 211, 213, 214, 255, 211, 213, 214, 255, 185, 188, 190, 255, 60, 67, 72, 244, 26, 33, 38, 107,
|
||||
33, 42, 47, 224, 208, 209, 211, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
||||
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
||||
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
||||
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 208, 209, 211, 255, 33, 42, 47, 224,
|
||||
18, 27, 33, 255, 248, 248, 248, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
||||
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
||||
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
||||
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 248, 248, 248, 255, 18, 27, 33, 255,
|
||||
18, 27, 33, 255, 248, 248, 248, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
||||
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
||||
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
||||
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 248, 248, 248, 255, 18, 27, 33, 255,
|
||||
18, 27, 33, 255, 248, 248, 248, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
||||
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
||||
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
||||
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 248, 248, 248, 255, 18, 27, 33, 255,
|
||||
18, 27, 33, 255, 248, 248, 248, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
||||
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
||||
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
||||
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 248, 248, 248, 255, 18, 27, 33, 255,
|
||||
18, 27, 33, 255, 22, 31, 37, 253, 22, 31, 37, 253, 22, 31, 37, 253, 22, 31, 37, 253, 22, 31, 37, 253, 22, 31, 37, 253, 22, 31, 37, 253,
|
||||
22, 31, 37, 253, 22, 31, 37, 253, 22, 31, 37, 253, 22, 31, 37, 253, 22, 31, 37, 253, 22, 31, 37, 253, 22, 31, 37, 253, 22, 31, 37, 253,
|
||||
22, 31, 37, 253, 22, 31, 37, 253, 22, 31, 37, 253, 22, 31, 37, 253, 22, 31, 37, 253, 22, 31, 37, 253, 22, 31, 37, 253, 22, 31, 37, 253,
|
||||
22, 31, 37, 253, 22, 31, 37, 253, 22, 31, 37, 253, 22, 31, 37, 253, 22, 31, 37, 253, 22, 31, 37, 253, 22, 31, 37, 253, 18, 27, 33, 255,
|
||||
18, 27, 33, 255, 16, 56, 144, 255, 16, 57, 147, 255, 16, 57, 147, 255, 16, 57, 147, 255, 16, 57, 147, 255, 16, 57, 147, 255, 16, 57, 147, 255,
|
||||
16, 57, 147, 255, 16, 57, 147, 255, 16, 57, 147, 255, 16, 57, 147, 255, 16, 57, 147, 255, 16, 57, 147, 255, 16, 57, 147, 255, 16, 57, 147, 255,
|
||||
16, 57, 147, 255, 16, 57, 147, 255, 16, 57, 147, 255, 16, 57, 147, 255, 16, 57, 147, 255, 16, 57, 147, 255, 16, 57, 147, 255, 16, 57, 147, 255,
|
||||
16, 57, 147, 255, 16, 57, 147, 255, 16, 57, 147, 255, 16, 57, 147, 255, 16, 57, 147, 255, 16, 57, 147, 255, 16, 56, 144, 255, 18, 27, 33, 255,
|
||||
18, 27, 33, 255, 16, 58, 151, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255,
|
||||
16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255,
|
||||
16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255,
|
||||
16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 58, 151, 255, 18, 27, 33, 255,
|
||||
18, 27, 33, 255, 16, 58, 151, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255,
|
||||
16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255,
|
||||
16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255,
|
||||
16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 58, 151, 255, 18, 27, 33, 255,
|
||||
18, 27, 33, 255, 16, 58, 151, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255,
|
||||
16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255,
|
||||
16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255,
|
||||
16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 58, 151, 255, 18, 27, 33, 255,
|
||||
18, 27, 33, 255, 16, 58, 151, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255,
|
||||
16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255,
|
||||
16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255,
|
||||
16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 59, 155, 255, 16, 58, 151, 255, 18, 27, 33, 255,
|
||||
18, 27, 33, 255, 16, 56, 144, 255, 16, 57, 147, 255, 16, 57, 147, 255, 16, 57, 147, 255, 16, 57, 147, 255, 16, 57, 147, 255, 16, 57, 147, 255,
|
||||
16, 57, 147, 255, 16, 57, 147, 255, 16, 57, 147, 255, 16, 57, 147, 255, 16, 57, 147, 255, 16, 57, 147, 255, 16, 57, 147, 255, 16, 57, 147, 255,
|
||||
16, 57, 147, 255, 16, 57, 147, 255, 16, 57, 147, 255, 16, 57, 147, 255, 16, 57, 147, 255, 16, 57, 147, 255, 16, 57, 147, 255, 16, 57, 147, 255,
|
||||
16, 57, 147, 255, 16, 58, 153, 255, 16, 59, 155, 255, 16, 58, 150, 255, 16, 57, 147, 255, 16, 57, 147, 255, 16, 56, 144, 255, 18, 27, 33, 255,
|
||||
18, 27, 33, 255, 21, 27, 34, 253, 21, 27, 34, 253, 21, 27, 34, 253, 21, 27, 34, 253, 21, 27, 34, 253, 21, 27, 34, 253, 21, 27, 34, 253,
|
||||
21, 27, 34, 253, 21, 27, 34, 253, 21, 27, 34, 253, 21, 27, 34, 253, 21, 27, 34, 253, 21, 27, 34, 253, 21, 27, 34, 253, 21, 27, 34, 253,
|
||||
21, 27, 34, 253, 21, 27, 34, 253, 21, 27, 34, 253, 21, 27, 34, 253, 21, 27, 34, 253, 21, 27, 34, 253, 21, 27, 34, 253, 21, 27, 34, 253,
|
||||
21, 27, 34, 253, 82, 31, 51, 227, 176, 38, 76, 194, 35, 28, 37, 247, 21, 27, 34, 253, 21, 27, 34, 253, 21, 27, 34, 253, 18, 27, 33, 255,
|
||||
18, 27, 33, 255, 230, 31, 51, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255,
|
||||
237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255,
|
||||
237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255,
|
||||
237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 230, 31, 51, 255, 18, 27, 33, 255,
|
||||
18, 27, 33, 255, 230, 31, 51, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255,
|
||||
237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255,
|
||||
237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255,
|
||||
237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 230, 31, 51, 255, 18, 27, 33, 255,
|
||||
18, 27, 33, 255, 230, 31, 51, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255,
|
||||
237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255,
|
||||
237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255,
|
||||
237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 230, 31, 51, 255, 18, 27, 33, 255,
|
||||
18, 27, 33, 255, 230, 31, 51, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255,
|
||||
237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255,
|
||||
237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255,
|
||||
237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 230, 31, 51, 255, 18, 27, 33, 255,
|
||||
31, 27, 34, 224, 193, 30, 48, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255,
|
||||
237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255,
|
||||
237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255,
|
||||
237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 237, 31, 52, 255, 193, 30, 48, 255, 31, 27, 34, 224,
|
||||
26, 26, 33, 107, 56, 28, 37, 244, 173, 30, 46, 255, 197, 30, 48, 255, 197, 30, 48, 255, 197, 30, 48, 255, 197, 30, 48, 255, 197, 30, 48, 255,
|
||||
197, 30, 48, 255, 197, 30, 48, 255, 197, 30, 48, 255, 197, 30, 48, 255, 197, 30, 48, 255, 197, 30, 48, 255, 197, 30, 48, 255, 197, 30, 48, 255,
|
||||
197, 30, 48, 255, 197, 30, 48, 255, 197, 30, 48, 255, 197, 30, 48, 255, 197, 30, 48, 255, 197, 30, 48, 255, 197, 30, 48, 255, 197, 30, 48, 255,
|
||||
197, 30, 48, 255, 197, 30, 48, 255, 197, 30, 48, 255, 197, 30, 48, 255, 197, 30, 48, 255, 173, 30, 46, 255, 56, 28, 37, 244, 26, 26, 33, 107,
|
||||
0, 0, 0, 3, 18, 30, 36, 83, 34, 27, 34, 201, 30, 27, 34, 228, 30, 27, 34, 228, 30, 27, 34, 228, 30, 27, 34, 228, 30, 27, 34, 228,
|
||||
30, 27, 34, 228, 30, 27, 34, 228, 30, 27, 34, 228, 30, 27, 34, 228, 30, 27, 34, 228, 30, 27, 34, 228, 30, 27, 34, 228, 30, 27, 34, 228,
|
||||
30, 27, 34, 228, 30, 27, 34, 228, 30, 27, 34, 228, 30, 27, 34, 228, 30, 27, 34, 228, 30, 27, 34, 228, 30, 27, 34, 228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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 37, 0, 0, 0, 116, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119,
|
||||
0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119,
|
||||
0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119,
|
||||
0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 116, 0, 0, 0, 36,
|
||||
13, 8, 15, 248, 31, 31, 70, 255, 43, 45, 85, 255, 43, 45, 85, 255, 43, 45, 85, 255, 43, 45, 85, 255, 43, 45, 85, 255, 43, 45, 85, 255,
|
||||
43, 45, 85, 255, 43, 45, 85, 255, 43, 45, 85, 255, 43, 45, 85, 255, 43, 45, 85, 255, 43, 45, 85, 255, 43, 45, 85, 255, 43, 45, 85, 255,
|
||||
5, 3, 4, 255, 122, 53, 59, 255, 122, 53, 59, 255, 122, 53, 59, 255, 122, 53, 59, 255, 122, 53, 59, 255, 122, 53, 59, 255, 122, 53, 59, 255,
|
||||
122, 53, 59, 255, 122, 53, 59, 255, 122, 53, 59, 255, 122, 53, 59, 255, 122, 53, 59, 255, 122, 53, 59, 255, 110, 48, 53, 253, 12, 6, 6, 230,
|
||||
6, 4, 8, 254, 63, 63, 143, 255, 36, 38, 72, 255, 80, 85, 160, 255, 80, 85, 160, 255, 36, 38, 72, 255, 80, 85, 160, 255, 80, 85, 160, 255,
|
||||
36, 38, 72, 255, 80, 85, 160, 255, 80, 85, 160, 255, 36, 38, 72, 255, 80, 85, 160, 255, 80, 85, 160, 255, 36, 38, 72, 255, 80, 85, 160, 255,
|
||||
10, 6, 8, 255, 229, 100, 110, 255, 229, 100, 110, 255, 229, 100, 110, 255, 229, 100, 110, 255, 229, 100, 110, 255, 229, 100, 110, 255, 229, 100, 110, 255,
|
||||
229, 100, 110, 255, 229, 100, 110, 255, 229, 100, 110, 255, 229, 100, 110, 255, 229, 100, 110, 255, 229, 100, 110, 255, 229, 100, 110, 255, 8, 3, 4, 247,
|
||||
6, 4, 8, 254, 63, 63, 143, 255, 74, 79, 148, 255, 57, 60, 114, 255, 60, 63, 119, 255, 74, 79, 148, 255, 57, 61, 114, 255, 59, 63, 118, 255,
|
||||
74, 79, 148, 255, 57, 61, 114, 255, 59, 63, 118, 255, 74, 79, 148, 255, 58, 62, 116, 255, 58, 62, 117, 255, 74, 79, 148, 255, 80, 85, 160, 255,
|
||||
7, 4, 6, 255, 92, 49, 53, 255, 92, 49, 53, 255, 92, 49, 53, 255, 92, 49, 53, 255, 92, 49, 53, 255, 92, 49, 53, 255, 92, 49, 53, 255,
|
||||
92, 49, 53, 255, 92, 49, 53, 255, 92, 49, 53, 255, 92, 49, 53, 255, 176, 93, 100, 255, 183, 97, 105, 255, 92, 49, 53, 255, 3, 2, 2, 252,
|
||||
6, 4, 8, 254, 63, 63, 143, 255, 36, 39, 73, 255, 77, 81, 153, 255, 77, 82, 154, 255, 36, 39, 73, 255, 77, 82, 154, 255, 77, 82, 154, 255,
|
||||
36, 39, 73, 255, 77, 82, 154, 255, 77, 82, 154, 255, 36, 39, 73, 255, 77, 82, 154, 255, 77, 82, 154, 255, 36, 39, 73, 255, 80, 85, 160, 255,
|
||||
8, 7, 9, 255, 161, 161, 164, 255, 161, 161, 164, 255, 161, 161, 164, 255, 161, 161, 164, 255, 161, 161, 164, 255, 161, 161, 164, 255, 161, 161, 164, 255,
|
||||
161, 161, 164, 255, 161, 161, 164, 255, 161, 161, 164, 255, 161, 161, 164, 255, 219, 219, 223, 255, 223, 223, 227, 255, 161, 161, 164, 255, 8, 7, 7, 253,
|
||||
6, 4, 8, 254, 63, 63, 143, 255, 74, 79, 148, 255, 57, 60, 114, 255, 60, 63, 119, 255, 74, 79, 148, 255, 57, 61, 115, 255, 59, 63, 118, 255,
|
||||
74, 79, 148, 255, 57, 61, 115, 255, 59, 63, 118, 255, 74, 79, 148, 255, 58, 62, 116, 255, 58, 62, 117, 255, 74, 79, 148, 255, 80, 85, 160, 255,
|
||||
10, 8, 11, 255, 242, 242, 246, 255, 242, 242, 246, 255, 242, 242, 246, 255, 242, 242, 246, 255, 242, 242, 246, 255, 242, 242, 246, 255, 242, 242, 246, 255,
|
||||
242, 242, 246, 255, 242, 242, 246, 255, 242, 242, 246, 255, 242, 242, 246, 255, 242, 242, 246, 255, 242, 242, 246, 255, 242, 242, 246, 255, 12, 10, 10, 251,
|
||||
6, 4, 8, 254, 63, 63, 143, 255, 37, 39, 73, 255, 77, 81, 153, 255, 77, 82, 154, 255, 36, 39, 73, 255, 77, 81, 153, 255, 77, 82, 154, 255,
|
||||
37, 39, 73, 255, 77, 81, 153, 255, 77, 82, 154, 255, 36, 39, 73, 255, 77, 82, 154, 255, 77, 82, 154, 255, 36, 39, 73, 255, 80, 85, 160, 255,
|
||||
6, 5, 6, 255, 63, 54, 55, 255, 63, 54, 55, 255, 63, 54, 55, 255, 63, 54, 55, 255, 63, 54, 55, 255, 63, 54, 55, 255, 63, 54, 55, 255,
|
||||
63, 54, 55, 255, 63, 54, 55, 255, 63, 54, 55, 255, 63, 54, 55, 255, 63, 54, 55, 255, 63, 54, 55, 255, 63, 54, 55, 255, 3, 2, 2, 254,
|
||||
6, 4, 8, 254, 63, 63, 143, 255, 74, 78, 147, 255, 57, 61, 114, 255, 60, 63, 119, 255, 74, 78, 147, 255, 57, 61, 115, 255, 59, 63, 119, 255,
|
||||
74, 78, 147, 255, 57, 61, 115, 255, 59, 63, 119, 255, 74, 78, 147, 255, 58, 62, 116, 255, 59, 62, 117, 255, 74, 78, 147, 255, 80, 85, 160, 255,
|
||||
8, 5, 7, 255, 183, 80, 88, 255, 183, 80, 88, 255, 183, 80, 88, 255, 183, 80, 88, 255, 183, 80, 88, 255, 183, 80, 88, 255, 183, 80, 88, 255,
|
||||
183, 80, 88, 255, 183, 80, 88, 255, 183, 80, 88, 255, 183, 80, 88, 255, 183, 80, 88, 255, 183, 80, 88, 255, 183, 80, 88, 255, 6, 3, 3, 249,
|
||||
6, 4, 8, 254, 63, 63, 143, 255, 37, 39, 74, 255, 76, 81, 152, 255, 77, 82, 154, 255, 37, 39, 73, 255, 77, 81, 153, 255, 77, 82, 154, 255,
|
||||
37, 39, 74, 255, 77, 81, 153, 255, 77, 82, 154, 255, 37, 39, 73, 255, 77, 81, 153, 255, 77, 82, 154, 255, 37, 39, 73, 255, 80, 85, 160, 255,
|
||||
10, 6, 8, 255, 229, 100, 110, 255, 229, 100, 110, 255, 229, 100, 110, 255, 229, 100, 110, 255, 229, 100, 110, 255, 229, 100, 110, 255, 229, 100, 110, 255,
|
||||
229, 100, 110, 255, 229, 100, 110, 255, 229, 100, 110, 255, 229, 100, 110, 255, 229, 100, 110, 255, 229, 100, 110, 255, 229, 100, 110, 255, 8, 3, 4, 247,
|
||||
6, 4, 8, 254, 63, 63, 143, 255, 73, 78, 147, 255, 57, 61, 114, 255, 60, 64, 120, 255, 73, 78, 146, 255, 57, 61, 115, 255, 59, 63, 119, 255,
|
||||
73, 78, 147, 255, 57, 61, 115, 255, 59, 63, 119, 255, 73, 78, 146, 255, 58, 62, 117, 255, 59, 62, 117, 255, 73, 78, 146, 255, 80, 85, 160, 255,
|
||||
6, 4, 6, 255, 31, 21, 22, 255, 31, 21, 22, 255, 31, 21, 22, 255, 31, 21, 22, 255, 31, 21, 22, 255, 31, 21, 22, 255, 31, 21, 22, 255,
|
||||
31, 21, 22, 255, 31, 21, 22, 255, 31, 21, 22, 255, 31, 21, 22, 255, 31, 21, 22, 255, 31, 21, 22, 255, 31, 21, 22, 255, 1, 1, 1, 254,
|
||||
6, 4, 8, 254, 63, 63, 143, 255, 37, 40, 75, 255, 76, 81, 152, 255, 77, 82, 154, 255, 37, 39, 74, 255, 77, 81, 153, 255, 77, 82, 154, 255,
|
||||
37, 40, 75, 255, 77, 81, 153, 255, 77, 82, 154, 255, 37, 39, 74, 255, 77, 81, 153, 255, 77, 81, 153, 255, 37, 39, 74, 255, 80, 85, 160, 255,
|
||||
9, 9, 11, 255, 226, 226, 230, 255, 226, 226, 230, 255, 226, 226, 230, 255, 226, 226, 230, 255, 226, 226, 230, 255, 226, 226, 230, 255, 226, 226, 230, 255,
|
||||
226, 226, 230, 255, 226, 226, 230, 255, 226, 226, 230, 255, 226, 226, 230, 255, 226, 226, 230, 255, 226, 226, 230, 255, 226, 226, 230, 255, 11, 9, 9, 252,
|
||||
5, 4, 8, 254, 59, 59, 133, 255, 69, 72, 136, 255, 75, 79, 149, 255, 75, 79, 149, 255, 69, 72, 136, 255, 75, 79, 149, 255, 75, 79, 149, 255,
|
||||
69, 72, 136, 255, 75, 79, 149, 255, 75, 79, 149, 255, 69, 72, 136, 255, 75, 79, 149, 255, 75, 79, 149, 255, 69, 72, 136, 255, 75, 79, 149, 255,
|
||||
9, 8, 11, 255, 226, 226, 230, 255, 226, 226, 230, 255, 226, 226, 230, 255, 226, 226, 230, 255, 226, 226, 230, 255, 226, 226, 230, 255, 226, 226, 230, 255,
|
||||
226, 226, 230, 255, 226, 226, 230, 255, 226, 226, 230, 255, 226, 226, 230, 255, 226, 226, 230, 255, 226, 226, 230, 255, 226, 226, 230, 255, 11, 9, 9, 252,
|
||||
1, 1, 1, 255, 17, 9, 17, 255, 23, 13, 17, 255, 23, 13, 17, 255, 23, 13, 17, 255, 23, 13, 17, 255, 23, 13, 17, 255, 23, 13, 17, 255,
|
||||
23, 13, 17, 255, 23, 13, 17, 255, 23, 13, 17, 255, 23, 13, 17, 255, 23, 13, 17, 255, 23, 13, 17, 255, 23, 13, 17, 255, 23, 13, 17, 255,
|
||||
27, 16, 19, 255, 31, 21, 22, 255, 31, 21, 22, 255, 31, 21, 22, 255, 31, 21, 22, 255, 31, 21, 22, 255, 31, 21, 22, 255, 31, 21, 22, 255,
|
||||
31, 21, 22, 255, 31, 21, 22, 255, 31, 21, 22, 255, 31, 21, 22, 255, 31, 21, 22, 255, 31, 21, 22, 255, 31, 21, 22, 255, 1, 1, 1, 254,
|
||||
11, 4, 5, 251, 219, 71, 86, 255, 229, 100, 110, 255, 229, 100, 110, 255, 229, 100, 110, 255, 229, 100, 110, 255, 229, 100, 110, 255, 229, 100, 110, 255,
|
||||
229, 100, 110, 255, 229, 100, 110, 255, 229, 100, 110, 255, 229, 100, 110, 255, 229, 100, 110, 255, 229, 100, 110, 255, 229, 100, 110, 255, 229, 100, 110, 255,
|
||||
229, 100, 110, 255, 229, 100, 110, 255, 229, 100, 110, 255, 229, 100, 110, 255, 229, 100, 110, 255, 229, 100, 110, 255, 229, 100, 110, 255, 229, 100, 110, 255,
|
||||
229, 100, 110, 255, 229, 100, 110, 255, 229, 100, 110, 255, 229, 100, 110, 255, 229, 100, 110, 255, 229, 100, 110, 255, 229, 100, 110, 255, 8, 3, 4, 247,
|
||||
9, 3, 4, 252, 175, 57, 69, 255, 199, 87, 96, 255, 229, 100, 110, 255, 197, 86, 94, 255, 183, 80, 88, 255, 183, 80, 88, 255, 183, 80, 88, 255,
|
||||
183, 80, 88, 255, 183, 80, 88, 255, 183, 80, 88, 255, 183, 80, 88, 255, 183, 80, 88, 255, 183, 80, 88, 255, 183, 80, 88, 255, 183, 80, 88, 255,
|
||||
183, 80, 88, 255, 183, 80, 88, 255, 183, 80, 88, 255, 183, 80, 88, 255, 183, 80, 88, 255, 183, 80, 88, 255, 183, 80, 88, 255, 183, 80, 88, 255,
|
||||
183, 80, 88, 255, 183, 80, 88, 255, 183, 80, 88, 255, 183, 80, 88, 255, 183, 80, 88, 255, 183, 80, 88, 255, 183, 80, 88, 255, 6, 3, 3, 249,
|
||||
3, 3, 3, 255, 61, 58, 59, 255, 91, 76, 79, 255, 238, 201, 207, 255, 81, 69, 71, 255, 63, 54, 55, 255, 63, 54, 55, 255, 63, 54, 55, 255,
|
||||
63, 54, 55, 255, 63, 54, 55, 255, 63, 54, 55, 255, 63, 54, 55, 255, 63, 54, 55, 255, 63, 54, 55, 255, 63, 54, 55, 255, 63, 54, 55, 255,
|
||||
63, 54, 55, 255, 63, 54, 55, 255, 63, 54, 55, 255, 63, 54, 55, 255, 63, 54, 55, 255, 63, 54, 55, 255, 63, 54, 55, 255, 63, 54, 55, 255,
|
||||
63, 54, 55, 255, 63, 54, 55, 255, 63, 54, 55, 255, 63, 54, 55, 255, 63, 54, 55, 255, 63, 54, 55, 255, 63, 54, 55, 255, 3, 2, 2, 254,
|
||||
14, 12, 13, 254, 226, 226, 231, 255, 242, 242, 246, 255, 242, 242, 246, 255, 242, 242, 246, 255, 242, 242, 246, 255, 242, 242, 246, 255, 242, 242, 246, 255,
|
||||
242, 242, 246, 255, 242, 242, 246, 255, 242, 242, 246, 255, 242, 242, 246, 255, 242, 242, 246, 255, 242, 242, 246, 255, 242, 242, 246, 255, 242, 242, 246, 255,
|
||||
242, 242, 246, 255, 242, 242, 246, 255, 242, 242, 246, 255, 242, 242, 246, 255, 242, 242, 246, 255, 242, 242, 246, 255, 242, 242, 246, 255, 242, 242, 246, 255,
|
||||
242, 242, 246, 255, 242, 242, 246, 255, 242, 242, 246, 255, 242, 242, 246, 255, 242, 242, 246, 255, 242, 242, 246, 255, 242, 242, 246, 255, 12, 10, 10, 251,
|
||||
9, 8, 9, 254, 150, 150, 153, 255, 161, 161, 164, 255, 161, 161, 164, 255, 161, 161, 164, 255, 161, 161, 164, 255, 161, 161, 164, 255, 161, 161, 164, 255,
|
||||
161, 161, 164, 255, 161, 161, 164, 255, 161, 161, 164, 255, 161, 161, 164, 255, 161, 161, 164, 255, 161, 161, 164, 255, 161, 161, 164, 255, 161, 161, 164, 255,
|
||||
161, 161, 164, 255, 161, 161, 164, 255, 161, 161, 164, 255, 161, 161, 164, 255, 161, 161, 164, 255, 161, 161, 164, 255, 161, 161, 164, 255, 161, 161, 164, 255,
|
||||
161, 161, 164, 255, 161, 161, 164, 255, 161, 161, 164, 255, 161, 161, 164, 255, 161, 161, 164, 255, 161, 161, 164, 255, 161, 161, 164, 255, 8, 7, 7, 253,
|
||||
4, 2, 2, 254, 89, 46, 51, 255, 91, 45, 49, 255, 92, 49, 53, 255, 92, 49, 53, 255, 92, 49, 53, 255, 92, 49, 53, 255, 92, 49, 53, 255,
|
||||
92, 49, 53, 255, 92, 49, 53, 255, 92, 49, 53, 255, 92, 49, 53, 255, 92, 49, 53, 255, 92, 49, 53, 255, 92, 49, 53, 255, 92, 49, 53, 255,
|
||||
92, 49, 53, 255, 92, 49, 53, 255, 92, 49, 53, 255, 92, 49, 53, 255, 92, 49, 53, 255, 92, 49, 53, 255, 92, 49, 53, 255, 92, 49, 53, 255,
|
||||
92, 49, 53, 255, 92, 49, 53, 255, 92, 49, 53, 255, 92, 49, 53, 255, 92, 49, 53, 255, 92, 49, 53, 255, 92, 49, 53, 255, 3, 2, 2, 252,
|
||||
11, 4, 5, 251, 219, 70, 85, 255, 219, 70, 85, 255, 221, 78, 91, 255, 224, 85, 97, 255, 224, 86, 99, 255, 224, 86, 99, 255, 224, 86, 99, 255,
|
||||
224, 86, 99, 255, 224, 86, 99, 255, 224, 86, 99, 255, 224, 86, 99, 255, 224, 86, 99, 255, 224, 86, 99, 255, 224, 86, 99, 255, 224, 86, 99, 255,
|
||||
224, 86, 99, 255, 224, 86, 99, 255, 224, 86, 99, 255, 224, 86, 99, 255, 224, 86, 99, 255, 224, 86, 99, 255, 224, 86, 99, 255, 224, 86, 99, 255,
|
||||
224, 86, 99, 255, 224, 86, 99, 255, 224, 86, 99, 255, 224, 86, 99, 255, 224, 86, 99, 255, 224, 86, 99, 255, 224, 86, 99, 255, 9, 4, 4, 249,
|
||||
19, 8, 9, 238, 107, 35, 42, 255, 117, 37, 45, 255, 117, 37, 45, 255, 117, 37, 45, 255, 117, 37, 45, 255, 117, 37, 45, 255, 117, 37, 45, 255,
|
||||
117, 37, 45, 255, 117, 37, 45, 255, 117, 37, 45, 255, 117, 37, 45, 255, 117, 37, 45, 255, 117, 37, 45, 255, 117, 37, 45, 255, 117, 37, 45, 255,
|
||||
117, 37, 45, 255, 117, 37, 45, 255, 117, 37, 45, 255, 117, 37, 45, 255, 117, 37, 45, 255, 117, 37, 45, 255, 117, 37, 45, 255, 117, 37, 45, 255,
|
||||
117, 37, 45, 255, 117, 37, 45, 255, 117, 37, 45, 255, 117, 37, 45, 255, 117, 37, 45, 255, 117, 37, 45, 255, 107, 35, 42, 255, 19, 8, 9, 238,
|
||||
0, 0, 0, 36, 0, 0, 0, 115, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119,
|
||||
0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119,
|
||||
0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119,
|
||||
0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 119, 0, 0, 0, 115, 0, 0, 0, 35,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
@ -8,9 +8,6 @@
|
|||
#ifndef IMAGE_H_
|
||||
#define IMAGE_H_
|
||||
|
||||
extern const unsigned char empty_keyboard[];
|
||||
extern const unsigned char ru_keyboard[];
|
||||
extern const unsigned char us_keyboard[];
|
||||
extern const unsigned char idata_head[];
|
||||
extern const unsigned char idata_icon[];
|
||||
|
BIN
img/main.png
BIN
img/main.png
Binary file not shown.
Before Width: | Height: | Size: 27 KiB |
BIN
img/settings.png
BIN
img/settings.png
Binary file not shown.
Before Width: | Height: | Size: 58 KiB |
|
@ -0,0 +1,21 @@
|
|||
#include <stdlib.h>
|
||||
#include "gui.h"
|
||||
#include "arguments.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
settingsLoad();
|
||||
|
||||
IupOpen(&argc, &argv);
|
||||
|
||||
IupShowXY(guiStart(), IUP_CENTER, IUP_CENTER);
|
||||
IupMainLoop();
|
||||
|
||||
IupClose();
|
||||
|
||||
settingsFree();
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
|
@ -11,7 +11,6 @@
|
|||
|
||||
#include "node_settings.h"
|
||||
#include "concat.h"
|
||||
#include "db.h"
|
||||
|
||||
NodeHead settings =
|
||||
{ NULL, 0 };
|
||||
|
@ -24,9 +23,8 @@ static NodeValue* newNodeValue(Value name, char *current, bool set)
|
|||
node->change = false;
|
||||
node->next = NULL;
|
||||
|
||||
size_t size = strlen(current) + 1;
|
||||
node->current = (char*) malloc(sizeof(char) * size);
|
||||
strncpy(node->current, current, size);
|
||||
node->current = (char*) malloc(sizeof(char) * strlen(current));
|
||||
strcpy(node->current, current);
|
||||
|
||||
return node;
|
||||
}
|
||||
|
@ -50,7 +48,7 @@ static void freeAllNodeValue(NodeValue *node)
|
|||
}
|
||||
}
|
||||
|
||||
static NodeParameter* newNodeParameter(Parameter name, char *key, bool set, bool singleValue, NodeParameter *dependence, NodeParameter *conflict)
|
||||
static NodeParameter* newNodeParameter(Parameter name, char *key, bool set, bool singleValue)
|
||||
{
|
||||
NodeParameter *node = (NodeParameter*) malloc(sizeof(NodeParameter));
|
||||
node->name = name;
|
||||
|
@ -58,15 +56,11 @@ static NodeParameter* newNodeParameter(Parameter name, char *key, bool set, bool
|
|||
node->change = false;
|
||||
node->value = NULL;
|
||||
node->countValue = 0;
|
||||
node->countValueSet = 0;
|
||||
node->singleValue = singleValue;
|
||||
node->dependence = dependence;
|
||||
node->conflict = conflict;
|
||||
node->next = NULL;
|
||||
|
||||
size_t size = strlen(key) + 1;
|
||||
node->key = (char*) malloc(sizeof(char) * size);
|
||||
strncpy(node->key, key, size);
|
||||
node->key = (char*) malloc(sizeof(char) * strlen(key));
|
||||
strcpy(node->key, key);
|
||||
|
||||
return node;
|
||||
}
|
||||
|
@ -122,41 +116,11 @@ static NodeParameter* getNodeParameter(Parameter name)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
NodeValue* getValue(Value name)
|
||||
{
|
||||
for (NodeParameter *pNode = settings.parameter; pNode; pNode = pNode->next)
|
||||
{
|
||||
for (NodeValue *vNode = pNode->value; vNode; vNode = vNode->next)
|
||||
{
|
||||
if (vNode->name == name)
|
||||
{
|
||||
return vNode;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
NodeParameter* getParameter(Parameter name)
|
||||
{
|
||||
for (NodeParameter *head = settings.parameter; head; head = head->next)
|
||||
{
|
||||
if (head->name == name)
|
||||
{
|
||||
return head;
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
void addParameterKey(Parameter name, char *key, bool set, bool singleValue, NodeParameter *dependence, NodeParameter *conflict)
|
||||
void addParameterKey(Parameter name, char *key, bool set, bool singleValue)
|
||||
{
|
||||
if (!settings.parameter)
|
||||
{
|
||||
settings.parameter = newNodeParameter(name, key, set, singleValue, dependence, conflict);
|
||||
settings.parameter = newNodeParameter(name, key, set, singleValue);
|
||||
++settings.countParameter;
|
||||
if (set)
|
||||
{
|
||||
|
@ -174,7 +138,7 @@ void addParameterKey(Parameter name, char *key, bool set, bool singleValue, Node
|
|||
else
|
||||
{
|
||||
node = getLastNodeParameter();
|
||||
node->next = newNodeParameter(name, key, set, singleValue, dependence, conflict);
|
||||
node->next = newNodeParameter(name, key, set, singleValue);
|
||||
++settings.countParameter;
|
||||
if (set)
|
||||
{
|
||||
|
@ -274,26 +238,6 @@ NodeValue* getSetNodeValue(NodeParameter *node)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
char *getSetValueCurrent(Parameter name)
|
||||
{
|
||||
NodeParameter *nodeParameter = getNodeParameter(name);
|
||||
|
||||
if (!nodeParameter)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
for (NodeValue *head = nodeParameter->value; head; head = head->next)
|
||||
{
|
||||
if (head->set)
|
||||
{
|
||||
return head->current;
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
|
||||
void setParameterValue(Parameter pName, Value vName, char *current)
|
||||
|
@ -306,7 +250,7 @@ void setParameterValue(Parameter pName, Value vName, char *current)
|
|||
return;
|
||||
}
|
||||
|
||||
size_t length = strlen(current) + 1;
|
||||
size_t length = strlen(current);
|
||||
|
||||
if (!length)
|
||||
{
|
||||
|
@ -340,7 +284,7 @@ void setParameterValue(Parameter pName, Value vName, char *current)
|
|||
{
|
||||
free(nodeValue->current);
|
||||
nodeValue->current = (char*) malloc(sizeof(char) * length);
|
||||
strncpy(nodeValue->current, current, length);
|
||||
strcpy(nodeValue->current, current);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -362,12 +306,6 @@ void changeParameter(Parameter name)
|
|||
|
||||
}
|
||||
|
||||
void setParameter(Parameter name, bool set)
|
||||
{
|
||||
NodeParameter *node = getNodeParameter(name);
|
||||
node->set = set;
|
||||
}
|
||||
|
||||
void changeValue(Parameter pName, Value vName)
|
||||
{
|
||||
NodeParameter *pNode = getNodeParameter(pName);
|
||||
|
@ -406,14 +344,7 @@ static void saveChangeSingleValueSettings(NodeParameter *node)
|
|||
{
|
||||
nChange->change = false;
|
||||
nChange->set = true;
|
||||
|
||||
dbWriteValue(nChange->name, nChange->set);
|
||||
|
||||
if (nSet)
|
||||
{
|
||||
nSet->set = false;
|
||||
dbWriteValue(nSet->name, nSet->set);
|
||||
}
|
||||
nSet->set = false;
|
||||
++node->countValueSet;
|
||||
}
|
||||
}
|
||||
|
@ -445,21 +376,11 @@ void saveChangeSettings()
|
|||
pHead->change = false;
|
||||
pHead->set = !pHead->set;
|
||||
}
|
||||
if (pHead->dependence && !pHead->dependence->set)
|
||||
{
|
||||
pHead->set = false;
|
||||
}
|
||||
if (pHead->conflict && pHead->conflict->set)
|
||||
{
|
||||
pHead->set = false;
|
||||
}
|
||||
if (pHead->set)
|
||||
{
|
||||
++settings.countParameterSet;
|
||||
}
|
||||
|
||||
dbWriteParameter(pHead->name, pHead->set);
|
||||
|
||||
pHead->countValueSet = 0;
|
||||
|
||||
if (pHead->singleValue)
|
||||
|
@ -510,13 +431,3 @@ bool getSetValue(Parameter pName, Value vName)
|
|||
|
||||
return false;
|
||||
}
|
||||
|
||||
int getCountValue(Parameter name)
|
||||
{
|
||||
NodeParameter *node = getNodeParameter(name);
|
||||
if (!node)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
return node->countValue;
|
||||
}
|
|
@ -32,8 +32,6 @@ typedef struct NodeParameter
|
|||
bool singleValue;
|
||||
size_t countValue;
|
||||
size_t countValueSet;
|
||||
struct NodeParameter *dependence;
|
||||
struct NodeParameter *conflict;
|
||||
struct NodeParameter *next;
|
||||
} NodeParameter;
|
||||
|
||||
|
@ -46,22 +44,18 @@ typedef struct NodeHead
|
|||
|
||||
extern NodeHead settings;
|
||||
|
||||
NodeParameter* getParameter(Parameter name);
|
||||
NodeValue* getValue(Value name);
|
||||
void addParameterKey(Parameter name, char *key, bool set, bool singleValue, NodeParameter *dependence, NodeParameter *conflict);
|
||||
void addParameterKey(Parameter name, char *key, bool set, bool singleValue);
|
||||
void addParameterValue(Parameter pName, Value vName, char *current, bool set);
|
||||
void freeSettings();
|
||||
|
||||
NodeValue *getSetNodeValue(NodeParameter *node);
|
||||
char *getSetValueCurrent(Parameter name);
|
||||
bool getSetParameter(Parameter name);
|
||||
bool getSetValue(Parameter pName, Value vName);
|
||||
int getCountValue(Parameter name);
|
||||
void changeParameter(Parameter name);
|
||||
void changeValue(Parameter pName, Value vName);
|
||||
void saveChangeSettings();
|
||||
void resetChangeSettings();
|
||||
void setParameter(Parameter name, bool set);
|
||||
|
||||
void setParameterValue(Parameter pName, Value vName, char *current);
|
||||
|
||||
#endif /* SETTINGS_H_ */
|
|
@ -14,21 +14,10 @@ typedef enum
|
|||
PARAMETER_SERVER,
|
||||
PARAMETER_USERNAME,
|
||||
PARAMETER_PASSWORD,
|
||||
PARAMETER_CERTIGNORE,
|
||||
PARAMETER_THEMES,
|
||||
PARAMETER_WALLPAPER,
|
||||
PARAMETER_ENCRYPTION,
|
||||
PARAMETER_FONTS,
|
||||
PARAMETER_SOUND,
|
||||
PARAMETER_COMPRESSION,
|
||||
PARAMETER_FULLSCREEN,
|
||||
PARAMETER_MULTIMONITOR,
|
||||
PARAMETER_MONITORS,
|
||||
PARAMETER_FULLSCREEN,
|
||||
PARAMETER_AUTHENTICATION,
|
||||
PARAMETER_SECURITY,
|
||||
PARAMETER_BITSPERPIXEL,
|
||||
PARAMETER_USB,
|
||||
PARAMETER_DECORATIONS
|
||||
PARAMETER_SECURITY
|
||||
} Parameter;
|
||||
|
||||
#endif /* PARAMETERS_H_ */
|
201
parameters.txt
201
parameters.txt
|
@ -1,201 +0,0 @@
|
|||
/flag (enables flag)
|
||||
/option:<value> (specifies option with value)
|
||||
+toggle -toggle (enables or disables toggle, where '/' is a synonym of '+')
|
||||
|
||||
/a:<addin>[,<options>] Addin
|
||||
/action-script:<file-name> Action script
|
||||
/admin Admin (or console) session
|
||||
+aero Enable desktop composition
|
||||
/app:<path> or ||<alias> Remote application program
|
||||
/app-cmd:<parameters> Remote application command-line parameters
|
||||
/app-file:<file-name> File to open with remote application
|
||||
/app-guid:<app-guid> Remote application GUID
|
||||
/app-icon:<icon-path> Remote application icon for user interface
|
||||
/app-name:<app-name> Remote application name for user interface
|
||||
/app-workdir:<workspace path> Remote application workspace path
|
||||
/assistance:<password> Remote assistance password
|
||||
/auto-request-control Automatically request remote assistance input control
|
||||
+async-channels Enable Asynchronous channels (experimental)
|
||||
+async-input Enable Asynchronous input
|
||||
+async-update Enable Asynchronous update
|
||||
/audio-mode:<mode> Audio output mode
|
||||
+auth-only Enable Authenticate only
|
||||
-authentication Disable Authentication (experimental)
|
||||
+auto-reconnect Enable Automatic reconnection
|
||||
/auto-reconnect-max-retries:<retries>
|
||||
Automatic reconnection maximum retries, 0 for unlimited [0,1000]
|
||||
+bitmap-cache Enable bitmap cache
|
||||
/bpp:<depth> Session bpp (color depth)
|
||||
/buildconfig Print the build configuration
|
||||
/cert:[deny,ignore,name:<name>,tofu,fingerprint:<hash>:<hash as hex>
|
||||
[,fingerprint:<hash>:<another hash>]]
|
||||
Certificate accept options. Use with care!
|
||||
* deny ... Automatically abort connection if the certificate does not match, no user interaction.
|
||||
* ignore ... Ignore the certificate checks altogether (overrules all other options)
|
||||
* name ... Use the alternate <name> instead of the certificate subject to match locally stored certificates
|
||||
* tofu ... Accept certificate unconditionally on first connect and deny on subsequent connections if the certificate does not match
|
||||
* fingerprints ... A list of certificate hashes that are accepted unconditionally for a connection
|
||||
/cert-deny [deprecated, use /cert:deny] Automatically abort connection for any certificate that can not be validated.
|
||||
/cert-ignore [deprecated, use /cert:ignore] Ignore certificate
|
||||
/cert-name:<name> [deprecated, use /cert:name:<name>] Certificate name
|
||||
/cert-tofu [deprecated, use /cert:tofu] Automatically accept certificate on first connect
|
||||
/client-build-number:<number> Client Build Number sent to server (influences smartcard behaviour, see [MS-RDPESC])
|
||||
/client-hostname:<name> Client Hostname to send to server
|
||||
-clipboard[:[use-selection:<atom>]]
|
||||
Disable Redirect clipboard.
|
||||
* use-selection:<atom> ... (X11) Specify which X selection to access. Default is CLIPBOARD. PRIMARY is the X-style middle-click selection.
|
||||
/codec-cache:[rfx|nsc|jpeg] Bitmap codec cache
|
||||
-compression Disable compression
|
||||
/compression-level:<level> Compression level (0,1,2)
|
||||
+credentials-delegation Enable credentials delegation
|
||||
/d:<domain> Domain
|
||||
-decorations Disable Window decorations
|
||||
/disp Display control
|
||||
/drive:<name>,<path> Redirect directory <path> as named share <name>. Hotplug support is enabled with /drive:hotplug,*. This argument provides the same function as "Drives that I plug in later" option in MSTSC.
|
||||
+drives Enable Redirect all mount points as shares
|
||||
/dvc:<channel>[,<options>] Dynamic virtual channel
|
||||
/dynamic-resolution Send resolution updates when the window is resized
|
||||
/echo Echo channel
|
||||
-encryption Disable Encryption (experimental)
|
||||
/encryption-methods:[40,][56,][128,][FIPS]
|
||||
RDP standard security encryption methods
|
||||
/f Fullscreen mode (<Ctrl>+<Alt>+<Enter> toggles fullscreen)
|
||||
-fast-path Disable fast-path input/output
|
||||
+fipsmode Enable FIPS mode
|
||||
/floatbar[:sticky:[on|off],default:[visible|hidden],show:
|
||||
[always|fullscreen||window]]
|
||||
floatbar is disabled by default (when enabled defaults to sticky in fullscreen mode)
|
||||
-fonts Disable smooth fonts (ClearType)
|
||||
/frame-ack:<number> Number of frame acknowledgement
|
||||
/from-stdin[:force] Read credentials from stdin. With <force> the prompt is done before connection, otherwise on server request.
|
||||
/g:<gateway>[:<port>] Gateway Hostname
|
||||
/gateway-usage-method:[direct|detect]
|
||||
Gateway usage method
|
||||
/gd:<domain> Gateway domain
|
||||
/gdi:sw|hw GDI rendering
|
||||
/geometry Geometry tracking channel
|
||||
+gestures Enable Consume multitouch input locally
|
||||
/gfx[:RFX] RDP8 graphics pipeline
|
||||
+gfx-progressive Enable RDP8 graphics pipeline using progressive codec
|
||||
+gfx-small-cache Enable RDP8 graphics pipeline using small cache mode
|
||||
+gfx-thin-client Enable RDP8 graphics pipeline using thin client mode
|
||||
+glyph-cache Enable Glyph cache (experimental)
|
||||
/gp:<password> Gateway password
|
||||
-grab-keyboard Disable Grab keyboard
|
||||
/gt:[rpc|http[,no-websockets]|auto[,no-websockets]]
|
||||
Gateway transport type
|
||||
/gu:[[<domain>\]<user>|<user>[@<domain>]]
|
||||
Gateway username
|
||||
/gat:<access token> Gateway Access Token
|
||||
/h:<height> Height
|
||||
-heartbeat Disable Support heartbeat PDUs
|
||||
/help Print help
|
||||
+home-drive Enable Redirect user home as share
|
||||
/ipv6 Prefer IPv6 AAA record over IPv4 A record
|
||||
/kbd:0x<id> or <name> Keyboard layout
|
||||
/kbd-lang:0x<id> Keyboard active language identifier
|
||||
/kbd-fn-key:<value> Function key value
|
||||
/kbd-list List keyboard layouts
|
||||
/kbd-lang-list List keyboard languages
|
||||
/kbd-remap:List of <key>=<value>,... pairs to remap scancodes
|
||||
Keyboard scancode remapping
|
||||
/kbd-subtype:<id> Keyboard subtype
|
||||
/kbd-type:<id> Keyboard type
|
||||
/load-balance-info:<info-string> Load balance info
|
||||
/log-filters:<tag>:<level>[,<tag>:<level>[,...]]
|
||||
Set logger filters, see wLog(7) for details
|
||||
/log-level:[OFF|FATAL|ERROR|WARN|INFO|DEBUG|TRACE]
|
||||
Set the default log level, see wLog(7) for details
|
||||
/max-fast-path-size:<size> Specify maximum fast-path update size
|
||||
/max-loop-time:<time> Specify maximum time in milliseconds spend treating packets
|
||||
+menu-anims Enable menu animations
|
||||
/microphone[:[sys:<sys>,][dev:<dev>,][format:<format>,][rate:<rate>,]
|
||||
[channel:<channel>]] Audio input (microphone)
|
||||
/monitor-list List detected monitors
|
||||
/monitors:<id>[,<id>[,...]] Select monitors to use
|
||||
-mouse-motion Disable Send mouse motion
|
||||
/multimon[:force] Use multiple monitors
|
||||
+multitouch Enable Redirect multitouch input
|
||||
+multitransport Enable Support multitransport protocol
|
||||
-nego Disable protocol security negotiation
|
||||
/network:[modem|broadband|broadband-low|broadband-high|wan|lan|auto]
|
||||
Network connection type
|
||||
/nsc NSCodec support
|
||||
+offscreen-cache Enable offscreen bitmap cache
|
||||
/orientation:[0|90|180|270] Orientation of display in degrees
|
||||
+old-license Enable Use the old license workflow (no CAL and hwId set to 0)
|
||||
/p:<password> Password
|
||||
/parallel[:<name>[,<path>]] Redirect parallel device
|
||||
/parent-window:<window-id> Parent window id
|
||||
+password-is-pin Enable Use smart card authentication with password as smart card PIN
|
||||
/pcb:<blob> Preconnection Blob
|
||||
/pcid:<id> Preconnection Id
|
||||
/pheight:<height> Physical height of display (in millimeters)
|
||||
/play-rfx:<pcap-file> Replay rfx pcap file
|
||||
/port:<number> Server port
|
||||
-suppress-output Disable suppress output when minimized
|
||||
+print-reconnect-cookie Enable Print base64 reconnect cookie after connecting
|
||||
/printer[:<name>[,<driver>]] Redirect printer device
|
||||
/proxy:[<proto>://][<user>:<password>@]<host>:<port>
|
||||
Proxy settings: override env. var (see also environment variable below). Protocol "socks5" should be given explicitly where "http" is default.
|
||||
/pth:<password-hash> Pass the hash (restricted admin mode)
|
||||
/pwidth:<width> Physical width of display (in millimeters)
|
||||
/rdp2tcp:<executable path[:arg...]>
|
||||
TCP redirection
|
||||
/reconnect-cookie:<base64-cookie> Pass base64 reconnect cookie to the connection
|
||||
/redirect-prefer:<FQDN|IP|NETBIOS>,[...]
|
||||
Override the preferred redirection order
|
||||
/relax-order-checks Do not check if a RDP order was announced during capability exchange, only use when connecting to a buggy server
|
||||
/restricted-admin Restricted admin mode
|
||||
/rfx RemoteFX
|
||||
/rfx-mode:[image|video] RemoteFX mode
|
||||
/scale:[100|140|180] Scaling factor of the display
|
||||
/scale-desktop:<percentage> Scaling factor for desktop applications (value between 100 and 500)
|
||||
/scale-device:100|140|180 Scaling factor for app store applications
|
||||
/sec:[rdp|tls|nla|ext] Force specific protocol security
|
||||
+sec-ext Enable NLA extended protocol security
|
||||
-sec-nla Disable NLA protocol security
|
||||
-sec-rdp Disable RDP protocol security
|
||||
-sec-tls Disable TLS protocol security
|
||||
/serial[:<name>[,<path>[,<driver>[,permissive]]]]
|
||||
Redirect serial device
|
||||
/shell:<shell> Alternate shell
|
||||
/shell-dir:<dir> Shell working directory
|
||||
/size:<width>x<height> or <percent>%[wh]
|
||||
Screen size
|
||||
/smart-sizing[:<width>x<height>] Scale remote desktop to window size
|
||||
/smartcard[:<str>[,<str>...]] Redirect the smartcard devices containing any of the <str> in their names.
|
||||
/smartcard-logon Activates Smartcard Logon authentication.
|
||||
(EXPERIMENTAL: NLA not supported)
|
||||
/sound[:[sys:<sys>,][dev:<dev>,][format:<format>,][rate:<rate>,]
|
||||
[channel:<channel>,][latency:<latency>,][quality:<quality>]]
|
||||
Audio output (sound)
|
||||
/span Span screen over multiple monitors
|
||||
/spn-class:<service-class> SPN authentication service class
|
||||
/ssh-agent SSH Agent forwarding channel
|
||||
/t:<title> Window title
|
||||
-themes Disable themes
|
||||
/timeout:<time in ms> Advanced setting for high latency links: Adjust connection timeout, use if you encounter timeout failures with your connection
|
||||
/tls-ciphers:[netmon|ma|ciphers] Allowed TLS ciphers
|
||||
/tls-seclevel:<level> TLS security level - defaults to 1
|
||||
+enforce-tlsv1_2 Enable Force use of TLS1.2 for connection. Some servers have a buggy TLS version negotiation and might fail without this
|
||||
-toggle-fullscreen Disable Alt+Ctrl+Enter to toggle fullscreen
|
||||
/tune:<setting:value>,<setting:value>
|
||||
[experimental] directly manipulate freerdp settings, use with extreme caution!
|
||||
/tune-list Print options allowed for /tune
|
||||
/u:[[<domain>\]<user>|<user>[@<domain>]]
|
||||
Username
|
||||
+unmap-buttons Enable Let server see real physical pointer button
|
||||
/usb:[dbg,][id:<vid>:<pid>#...,][addr:<bus>:<addr>#...,][auto]
|
||||
Redirect USB device
|
||||
/v:<server>[:port] Server hostname
|
||||
/vc:<channel>[,<options>] Static virtual channel
|
||||
/version Print version
|
||||
/video Video optimized remoting channel
|
||||
/vmconnect[:<vmid>] Hyper-V console (use port 2179, disable negotiation)
|
||||
/w:<width> Width
|
||||
-wallpaper Disable wallpaper
|
||||
+window-drag Enable full window drag
|
||||
/window-position:<xpos>x<ypos> window position
|
||||
/wm-class:<class-name> Set the WM_CLASS hint for the window instance
|
||||
/workarea Use available work area
|
|
@ -0,0 +1,202 @@
|
|||
/*
|
||||
* settings.c
|
||||
*
|
||||
* Created on: 6 июл. 2022 г.
|
||||
* Author: alexander
|
||||
*/
|
||||
|
||||
#include <iup.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "settings.h"
|
||||
#include "arguments.h"
|
||||
#include "node_settings.h"
|
||||
|
||||
void toggleActive(Ihandle *self, char *name)
|
||||
{
|
||||
IupSetInt(IupGetDialogChild(self, name), "ACTIVE", !IupGetInt(IupGetDialogChild(self, name), "ACTIVE"));
|
||||
}
|
||||
|
||||
|
||||
static int settingsClose(Ihandle *self)
|
||||
{
|
||||
resetChangeSettings();
|
||||
IupSetAttribute(IupGetDialog(self), "SIMULATEMODAL", "OFF");
|
||||
IupHide(IupGetDialog(self));
|
||||
return IUP_DEFAULT;
|
||||
}
|
||||
|
||||
static int settingsSave(Ihandle *self)
|
||||
{
|
||||
saveChangeSettings();
|
||||
IupSetAttribute(IupGetDialog(self), "SIMULATEMODAL", "OFF");
|
||||
IupHide(IupGetDialog(self));
|
||||
return IUP_DEFAULT;
|
||||
}
|
||||
|
||||
static int settingsTglMultimonitor(Ihandle *self)
|
||||
{
|
||||
changeParameter(PARAMETER_MULTIMONITOR);
|
||||
return IUP_DEFAULT;
|
||||
}
|
||||
|
||||
static int settingsTglFullscreen(Ihandle *self)
|
||||
{
|
||||
changeParameter(PARAMETER_FULLSCREEN);
|
||||
return IUP_DEFAULT;
|
||||
}
|
||||
|
||||
static int settingsTglAuthentication(Ihandle *self)
|
||||
{
|
||||
changeParameter(PARAMETER_AUTHENTICATION);
|
||||
return IUP_DEFAULT;
|
||||
}
|
||||
|
||||
static int settingsUseSecurity(Ihandle *self)
|
||||
{
|
||||
changeParameter(PARAMETER_SECURITY);
|
||||
toggleActive(self, "SECURITY_TLS");
|
||||
toggleActive(self, "SECURITY_RDP");
|
||||
toggleActive(self, "SECURITY_NLA");
|
||||
toggleActive(self, "SECURITY_EXT");
|
||||
|
||||
return IUP_DEFAULT;
|
||||
}
|
||||
|
||||
static void settingsChooseSecurity(Ihandle *self, int state)
|
||||
{
|
||||
if (state == 1)
|
||||
{
|
||||
int tool_index = IupGetInt(self, "TOOLINDEX");
|
||||
switch (tool_index)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
changeValue(PARAMETER_SECURITY, VALUE_SECURITY_TLS);
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
changeValue(PARAMETER_SECURITY, VALUE_SECURITY_RDP);
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
changeValue(PARAMETER_SECURITY, VALUE_SECURITY_NLA);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
changeValue(PARAMETER_SECURITY, VALUE_SECURITY_EXT);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Блок настроек
|
||||
*/
|
||||
static Ihandle* settingsBoxCheckbox()
|
||||
{
|
||||
Ihandle *tglMultimonitor, *tglFullscreen, *tglAuthentication;
|
||||
|
||||
tglMultimonitor = IupToggle("Несколько мониторов", NULL);
|
||||
tglFullscreen = IupToggle("На весь экран", NULL);
|
||||
tglAuthentication = IupToggle("Аутентификация", NULL);
|
||||
|
||||
IupSetInt(tglMultimonitor, "VALUE", getSetParameter(PARAMETER_MULTIMONITOR));
|
||||
IupSetInt(tglFullscreen, "VALUE", getSetParameter(PARAMETER_FULLSCREEN));
|
||||
IupSetInt(tglAuthentication, "VALUE", getSetParameter(PARAMETER_AUTHENTICATION));
|
||||
|
||||
return IupHbox(IupSetAttributes(IupFrame(IupVbox(
|
||||
IupSetCallbacks(IupSetAttributes(tglMultimonitor, "NAME=SETTINGS_TGL_MULTIMONITOR"), "ACTION",
|
||||
(Icallback) settingsTglMultimonitor, NULL),
|
||||
IupSetCallbacks(IupSetAttributes(tglFullscreen, "NAME=SETTINGS_TGL_FULLSCREEN"), "ACTION",
|
||||
(Icallback) settingsTglFullscreen, NULL),
|
||||
IupSetCallbacks(IupSetAttributes(tglAuthentication, "NAME=SETTINGS_TGL_AUTHENTICATION"), "ACTION",
|
||||
(Icallback) settingsTglAuthentication, NULL),
|
||||
NULL)), "TITLE=\"Общие\""), NULL);
|
||||
}
|
||||
|
||||
static Ihandle* settingsBoxSecurity()
|
||||
{
|
||||
Ihandle *tglSecurity;
|
||||
Ihandle *tglTLS, *tglRDP, *tglNLA, *tglEXT;
|
||||
Ihandle *grdSecurity;
|
||||
|
||||
tglSecurity = IupToggle("Использовать", NULL);
|
||||
IupSetInt(tglSecurity, "VALUE", getSetParameter(PARAMETER_SECURITY));
|
||||
IupSetCallback(tglSecurity, "ACTION", (Icallback)settingsUseSecurity);
|
||||
|
||||
tglTLS = IupToggle("TLS", NULL);
|
||||
IupSetInt(tglTLS, "VALUE", getSetValue(PARAMETER_SECURITY, VALUE_SECURITY_TLS));
|
||||
IupSetInt(tglTLS, "ACTIVE", getSetParameter(PARAMETER_SECURITY));
|
||||
tglRDP = IupToggle("RDP", NULL);
|
||||
IupSetInt(tglRDP, "VALUE", getSetValue(PARAMETER_SECURITY, VALUE_SECURITY_RDP));
|
||||
IupSetInt(tglRDP, "ACTIVE", getSetParameter(PARAMETER_SECURITY));
|
||||
tglNLA = IupToggle("NLA", NULL);
|
||||
IupSetInt(tglNLA, "VALUE", getSetValue(PARAMETER_SECURITY, VALUE_SECURITY_NLA));
|
||||
IupSetInt(tglNLA, "ACTIVE", getSetParameter(PARAMETER_SECURITY));
|
||||
tglEXT = IupToggle("EXT", NULL);
|
||||
IupSetInt(tglEXT, "VALUE", getSetValue(PARAMETER_SECURITY, VALUE_SECURITY_EXT));
|
||||
IupSetInt(tglEXT, "ACTIVE", getSetParameter(PARAMETER_SECURITY));
|
||||
|
||||
grdSecurity = IupRadio(IupGridBox(
|
||||
IupSetCallbacks(IupSetAttributes(tglTLS, "NAME=SECURITY_TLS, TOOLINDEX=0"), "ACTION", (Icallback)settingsChooseSecurity, NULL),
|
||||
IupSetCallbacks(IupSetAttributes(tglRDP, "NAME=SECURITY_RDP, TOOLINDEX=1"), "ACTION", (Icallback)settingsChooseSecurity, NULL),
|
||||
IupSetCallbacks(IupSetAttributes(tglNLA, "NAME=SECURITY_NLA, TOOLINDEX=2"), "ACTION", (Icallback)settingsChooseSecurity, NULL),
|
||||
IupSetCallbacks(IupSetAttributes(tglEXT, "NAME=SECURITY_EXT, TOOLINDEX=3"), "ACTION", (Icallback)settingsChooseSecurity, NULL),
|
||||
NULL));
|
||||
|
||||
return IupHbox(IupSetAttributes(IupFrame(IupVbox(tglSecurity, grdSecurity, NULL)), "TITLE=\"Протокол безопасности\", MARGIN=15x10"), NULL);
|
||||
}
|
||||
|
||||
static Ihandle* settingsHorizontalBox()
|
||||
{
|
||||
return IupSetAttributes(IupHbox(settingsBoxCheckbox(), settingsBoxSecurity(), NULL), "MARGIN=5x5");
|
||||
}
|
||||
|
||||
/*
|
||||
* Блок кнопок
|
||||
*/
|
||||
static Ihandle* settingsHorizontalBoxButtons()
|
||||
{
|
||||
Ihandle *btnSave, *btnClose;
|
||||
|
||||
btnSave = IupButton("Сохранить", NULL);
|
||||
IupSetAttribute(btnSave, "NAME", "SETTIGS_BTN_SAVE");
|
||||
IupSetAttribute(btnSave, "TIP", "Сохранить настройки");
|
||||
|
||||
btnClose = IupButton("Закрыть", NULL);
|
||||
IupSetAttribute(btnClose, "NAME", "SETTIGS_BTN_CLOSE");
|
||||
IupSetAttribute(btnClose, "TIP", "Отменить изменения");
|
||||
|
||||
IupSetHandle("btnClosePointer", btnClose);
|
||||
|
||||
return IupSetAttributes(
|
||||
IupHbox(IupFill(), IupSetCallbacks(btnSave, "ACTION", (Icallback) settingsSave, NULL),
|
||||
IupSetCallbacks(btnClose, "ACTION", (Icallback) settingsClose, NULL), IupFill(),
|
||||
NULL), "ALIGNMENT=ACENTER:ACENTER, GAP=10, MARGIN=10x10");
|
||||
}
|
||||
|
||||
int settingsMainWindow(Ihandle *self)
|
||||
{
|
||||
Ihandle *dlg;
|
||||
Ihandle *vBoxMain;
|
||||
|
||||
vBoxMain = IupSetAttributes(IupVbox(settingsHorizontalBox(), settingsHorizontalBoxButtons(), NULL), "NMARGIN=2x2, ALIGNMENT=ACENTER");
|
||||
|
||||
dlg = IupDialog(vBoxMain);
|
||||
IupSetAttribute(dlg, "TITLE", "Настройки");
|
||||
IupSetCallback(
|
||||
IupSetAttributes(dlg,
|
||||
"ICON=icon, DIALOGFRAME=ON, SIMULATEMODAL=ON, DEFAULTESC=btnClosePointer, TOPMOST=YES, BRINGFRONT=YES, NAME=SETTINGS_MAIN_WINDOW"),
|
||||
"CLOSE_CB", (Icallback) settingsClose);
|
||||
|
||||
IupShowXY(dlg, IUP_CURRENT, IUP_CURRENT);
|
||||
|
||||
return IUP_DEFAULT;
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
diff --git a/client/X11/cli/gui.c b/client/X11/cli/gui.c
|
||||
index e2147a4..9b97a83 100644
|
||||
--- a/client/X11/cli/gui.c
|
||||
+++ b/client/X11/cli/gui.c
|
||||
@@ -217,7 +217,11 @@ Ihandle* guiStart()
|
||||
IupSetAttribute(iconLang, "NAME", "KEYBOARD");
|
||||
IupSetAttribute(iconLang, "IMAGE", "keyboardRu");
|
||||
IupSetAttribute(iconLang, "FLOATING", "YES");
|
||||
- IupSetAttribute(iconLang, "POSITION", "13,222");
|
||||
+#ifdef IUP_DESCRIPTION_ABOUT_ARCH_X32
|
||||
+ IupSetAttribute(iconLang, "POSITION", "13,235");
|
||||
+#else
|
||||
+ IupSetAttribute(iconLang, "POSITION", "13,228");
|
||||
+#endif
|
||||
IupSetAttribute(iconLang, "TIP", "Текущая раскладка клавиатуры (Alt+Shift)");
|
||||
#endif
|
||||
|
||||
@@ -275,7 +279,7 @@ Ihandle* guiStart()
|
||||
IupSetAttribute(dlg, "DEFAULTENTER", "CONNECT");
|
||||
IupSetAttribute(dlg, "DEFAULTESC", "CLOSE");
|
||||
#ifdef IUP_WITH_LANGUAGE_KEYBOARD_ICON
|
||||
- IupSetCallback(dlg, "iup_XkeyAlt(K_LSHIFT)", (Icallback) k_any);
|
||||
+ IupSetCallback(dlg, "K_ANY", (Icallback) k_any);
|
||||
IupSetCallback(dlg, "GETFOCUS_CB", (Icallback) k_any);
|
||||
#endif
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
* value.h
|
||||
*
|
||||
* Created on: 8 июл. 2022 г.
|
||||
* Author: alexander
|
||||
*/
|
||||
|
||||
#ifndef VALUE_H_
|
||||
#define VALUE_H_
|
||||
|
||||
typedef enum
|
||||
{
|
||||
VALUE_SERVER, VALUE_USERNAME, VALUE_PASSWORD, VALUE_SECURITY_TLS, VALUE_SECURITY_RDP, VALUE_SECURITY_NLA, VALUE_SECURITY_EXT,
|
||||
} Value;
|
||||
|
||||
#endif /* VALUE_H_ */
|
13
xrandr.patch
13
xrandr.patch
|
@ -1,13 +0,0 @@
|
|||
diff --git a/cmake/FindXRandR.cmake b/cmake/FindXRandR.cmake
|
||||
index 7b0ec71..4b2a79e 100644
|
||||
--- a/cmake/FindXRandR.cmake
|
||||
+++ b/cmake/FindXRandR.cmake
|
||||
@@ -38,7 +38,7 @@ find_library(XRANDR_LIBRARY NAMES Xrandr
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(XRANDR DEFAULT_MSG XRANDR_LIBRARY XRANDR_INCLUDE_DIR)
|
||||
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(XRandR DEFAULT_MSG XRANDR_LIBRARY XRANDR_INCLUDE_DIR)
|
||||
|
||||
if(XRANDR_FOUND)
|
||||
set( XRANDR_LIBRARIES ${XRANDR_LIBRARY} )
|
Loading…
Reference in New Issue