summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opierdesktop/qtwin.cpp16
1 files changed, 0 insertions, 16 deletions
diff --git a/noncore/net/opierdesktop/qtwin.cpp b/noncore/net/opierdesktop/qtwin.cpp
index d2a5ef1..e350bf6 100644
--- a/noncore/net/opierdesktop/qtwin.cpp
+++ b/noncore/net/opierdesktop/qtwin.cpp
@@ -7,74 +7,66 @@
7 This program is free software; you can redistribute it and/or modify 7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by 8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or 9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version. 10 (at your option) any later version.
11 11
12 This program is distributed in the hope that it will be useful, 12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details. 15 GNU General Public License for more details.
16 16
17 You should have received a copy of the GNU General Public License 17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software 18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20*/ 20*/
21 21
22#include "rdesktop.h" 22#include "rdesktop.h"
23#ifdef SHARP
24#include <qpe/qpeapplication.h> 23#include <qpe/qpeapplication.h>
25#else
26#include <qapplication.h>
27#endif
28#include <qmainwindow.h> 24#include <qmainwindow.h>
29#include <qwidget.h> 25#include <qwidget.h>
30#include <qpainter.h> 26#include <qpainter.h>
31#include <qimage.h> 27#include <qimage.h>
32#include <qsocketnotifier.h> 28#include <qsocketnotifier.h>
33#include <qscrollview.h> 29#include <qscrollview.h>
34#include <qmessagebox.h> 30#include <qmessagebox.h>
35#include <qpushbutton.h> 31#include <qpushbutton.h>
36#include <qlineedit.h> 32#include <qlineedit.h>
37#include <qcombobox.h> 33#include <qcombobox.h>
38#include <qlabel.h> 34#include <qlabel.h>
39#include <qfile.h> 35#include <qfile.h>
40#include <qcheckbox.h> 36#include <qcheckbox.h>
41#include <qpopupmenu.h> 37#include <qpopupmenu.h>
42#include "qtwin.h" 38#include "qtwin.h"
43#include <stdlib.h> 39#include <stdlib.h>
44 40
45uint32 flags; 41uint32 flags;
46char server[64] = ""; 42char server[64] = "";
47char domain[16] = ""; 43char domain[16] = "";
48char password[16] = ""; 44char password[16] = "";
49char shell[128] = ""; 45char shell[128] = "";
50char directory[32] = ""; 46char directory[32] = "";
51 47
52extern int g_width; 48extern int g_width;
53extern int g_height; 49extern int g_height;
54extern int server_bpp; 50extern int server_bpp;
55extern BOOL fullscreen; 51extern BOOL fullscreen;
56extern char username[]; 52extern char username[];
57int global_sock; 53int global_sock;
58 54
59QSocketNotifier* SocketNotifier; 55QSocketNotifier* SocketNotifier;
60#ifdef SHARP
61QPEApplication* App; 56QPEApplication* App;
62#else
63QApplication* App;
64#endif
65QMyMainWindow* MW; 57QMyMainWindow* MW;
66QMyScrollView* SV; 58QMyScrollView* SV;
67struct QColorMap 59struct QColorMap
68{ 60{
69 uint32 RGBColors[256]; 61 uint32 RGBColors[256];
70 int NumColors; 62 int NumColors;
71}; 63};
72QColorMap* CM; 64QColorMap* CM;
73uint8* BS; 65uint8* BS;
74int clipx; 66int clipx;
75int clipy; 67int clipy;
76int clipcx; 68int clipcx;
77int clipcy; 69int clipcy;
78 70
79struct bitmap 71struct bitmap
80{ 72{
@@ -1014,37 +1006,33 @@ void QMyMainWindow::dataReceived()
1014//***************************************************************************** 1006//*****************************************************************************
1015void redraw(int x, int y, int cx, int cy) 1007void redraw(int x, int y, int cx, int cy)
1016{ 1008{
1017 if (WarpCoords(&x, &y, &cx, &cy, NULL, NULL)) 1009 if (WarpCoords(&x, &y, &cx, &cy, NULL, NULL))
1018 { 1010 {
1019 MW->update(x, y, cx, cy); 1011 MW->update(x, y, cx, cy);
1020 } 1012 }
1021} 1013}
1022 1014
1023/* 1015/*
1024BOOL ui_init(void) 1016BOOL ui_init(void)
1025{ 1017{
1026 QWidget* d; 1018 QWidget* d;
1027 1019
1028 CM = NULL; 1020 CM = NULL;
1029 BS = NULL; 1021 BS = NULL;
1030#ifdef SHARP
1031 App = new QPEApplication(g_argc, g_argv); 1022 App = new QPEApplication(g_argc, g_argv);
1032#else
1033 App = new QApplication(g_argc, g_argv, QApplication::GuiServer);
1034#endif
1035 if (fullscreen) 1023 if (fullscreen)
1036 { 1024 {
1037 d = QApplication::desktop(); 1025 d = QApplication::desktop();
1038 width = d->width(); // returns screen width 1026 width = d->width(); // returns screen width
1039 height = d->height(); // returns screen height 1027 height = d->height(); // returns screen height
1040 } 1028 }
1041 return True; 1029 return True;
1042} 1030}
1043*/ 1031*/
1044 1032
1045/* 1033/*
1046void ui_deinit(void) 1034void ui_deinit(void)
1047{ 1035{
1048 delete App; 1036 delete App;
1049} 1037}
1050*/ 1038*/
@@ -1603,37 +1591,33 @@ void ui_desktop_restore(uint32 offset, int x, int y, int cx, int cy)
1603{ 1591{
1604 uint8* data; 1592 uint8* data;
1605 int i, j; 1593 int i, j;
1606 1594
1607 data = cache_get_desktop(offset, cx, cy, 1); 1595 data = cache_get_desktop(offset, cx, cy, 1);
1608 for (i = 0; i < cy; i++) 1596 for (i = 0; i < cy; i++)
1609 for (j = 0; j < cx; j++) 1597 for (j = 0; j < cx; j++)
1610 set_pixel(x + j, y + i, data[i * cx + j]); 1598 set_pixel(x + j, y + i, data[i * cx + j]);
1611 redraw(x, y, cx, cy); 1599 redraw(x, y, cx, cy);
1612} 1600}
1613 1601
1614//***************************************************************************** 1602//*****************************************************************************
1615int main(int argc, char** argv) 1603int main(int argc, char** argv)
1616{ 1604{
1617 CM = NULL; 1605 CM = NULL;
1618 BS = NULL; 1606 BS = NULL;
1619#ifdef SHARP
1620 App = new QPEApplication(argc, argv); 1607 App = new QPEApplication(argc, argv);
1621#else
1622 App = new QApplication(argc, argv, QApplication::GuiServer);
1623#endif
1624 SV = new QMyScrollView(); 1608 SV = new QMyScrollView();
1625 App->setMainWidget(SV); 1609 App->setMainWidget(SV);
1626 SV->showMaximized(); 1610 SV->showMaximized();
1627 SV->timer_id = SV->startTimer(1000); 1611 SV->timer_id = SV->startTimer(1000);
1628 App->exec(); 1612 App->exec();
1629 delete SV; 1613 delete SV;
1630 delete App; 1614 delete App;
1631 if (CM != NULL) 1615 if (CM != NULL)
1632 xfree(CM); 1616 xfree(CM);
1633 if (BS !=NULL) 1617 if (BS !=NULL)
1634 xfree(BS); 1618 xfree(BS);
1635 return 0; 1619 return 0;
1636} 1620}
1637 1621
1638/* 1622/*
1639 MW = new QMyMainWindow(); 1623 MW = new QMyMainWindow();