-rw-r--r-- | noncore/net/opierdesktop/qtwin.cpp | 16 |
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 | |||
@@ -11,29 +11,25 @@ | |||
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> |
@@ -48,29 +44,25 @@ char domain[16] = ""; | |||
48 | char password[16] = ""; | 44 | char password[16] = ""; |
49 | char shell[128] = ""; | 45 | char shell[128] = ""; |
50 | char directory[32] = ""; | 46 | char directory[32] = ""; |
51 | 47 | ||
52 | extern int g_width; | 48 | extern int g_width; |
53 | extern int g_height; | 49 | extern int g_height; |
54 | extern int server_bpp; | 50 | extern int server_bpp; |
55 | extern BOOL fullscreen; | 51 | extern BOOL fullscreen; |
56 | extern char username[]; | 52 | extern char username[]; |
57 | int global_sock; | 53 | int global_sock; |
58 | 54 | ||
59 | QSocketNotifier* SocketNotifier; | 55 | QSocketNotifier* SocketNotifier; |
60 | #ifdef SHARP | ||
61 | QPEApplication* App; | 56 | QPEApplication* App; |
62 | #else | ||
63 | QApplication* App; | ||
64 | #endif | ||
65 | QMyMainWindow* MW; | 57 | QMyMainWindow* MW; |
66 | QMyScrollView* SV; | 58 | QMyScrollView* SV; |
67 | struct QColorMap | 59 | struct QColorMap |
68 | { | 60 | { |
69 | uint32 RGBColors[256]; | 61 | uint32 RGBColors[256]; |
70 | int NumColors; | 62 | int NumColors; |
71 | }; | 63 | }; |
72 | QColorMap* CM; | 64 | QColorMap* CM; |
73 | uint8* BS; | 65 | uint8* BS; |
74 | int clipx; | 66 | int clipx; |
75 | int clipy; | 67 | int clipy; |
76 | int clipcx; | 68 | int clipcx; |
@@ -1018,29 +1010,25 @@ void redraw(int x, int y, int cx, int cy) | |||
1018 | { | 1010 | { |
1019 | MW->update(x, y, cx, cy); | 1011 | MW->update(x, y, cx, cy); |
1020 | } | 1012 | } |
1021 | } | 1013 | } |
1022 | 1014 | ||
1023 | /* | 1015 | /* |
1024 | BOOL ui_init(void) | 1016 | BOOL 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 | /* |
1046 | void ui_deinit(void) | 1034 | void ui_deinit(void) |
@@ -1607,29 +1595,25 @@ void ui_desktop_restore(uint32 offset, int x, int y, int cx, int cy) | |||
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 | //***************************************************************************** |
1615 | int main(int argc, char** argv) | 1603 | int 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; |