Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

qtwin.cpp File Reference

#include "rdesktop.h"
#include <qpe/qpeapplication.h>
#include <qmainwindow.h>
#include <qwidget.h>
#include <qpainter.h>
#include <qimage.h>
#include <qsocketnotifier.h>
#include <qscrollview.h>
#include <qmessagebox.h>
#include <qpushbutton.h>
#include <qlineedit.h>
#include <qcombobox.h>
#include <qlabel.h>
#include <qfile.h>
#include <qcheckbox.h>
#include <qpopupmenu.h>
#include "qtwin.h"
#include <stdlib.h>

Include dependency graph for qtwin.cpp:

Go to the source code of this file.

Defines

#define NOT(x)   (255-(x))
#define DO_GLYPH(ttext, idx)

Functions

void CleanString (QString *Item)
void WriteString (QFile *File, QString *Line)
void GetScanCode (QKeyEvent *e, int *ScanCode, int *code)
uint8 rop (int rop, uint8 src, uint8 dst)
uint8 get_pixel (int x, int y)
void set_pixel (int x, int y, uint8 pixel, int op=0xc)
bool WarpCoords (int *x, int *y, int *cx, int *cy, int *srcx, int *srcy)
void redraw (int x, int y, int cx, int cy)
int ui_select (int rdp_socket)
void ui_move_pointer (int, int)
HBITMAP ui_create_bitmap (int width, int height, uint8 *data)
void ui_paint_bitmap (int x, int y, int cx, int cy, int width, int height, uint8 *data)
void ui_destroy_bitmap (HBITMAP bmp)
bool is_pixel_on (uint8 *data, int x, int y, int width, int bpp)
void set_pixel_on (uint8 *data, int x, int y, int width, int bpp, uint8 pixel)
HGLYPH ui_create_glyph (int width, int height, uint8 *data)
void ui_destroy_glyph (HGLYPH glyph)
HCURSOR ui_create_cursor (unsigned int, unsigned int, int, int, uint8 *, uint8 *)
void ui_set_cursor (HCURSOR)
void ui_destroy_cursor (HCURSOR)
HCOLOURMAP ui_create_colourmap (COLOURMAP *colours)
void ui_destroy_colourmap (HCOLOURMAP)
void ui_set_colourmap (HCOLOURMAP)
void ui_begin_update (void)
void ui_end_update (void)
void ui_set_clip (int x, int y, int cx, int cy)
void ui_reset_clip (void)
void ui_bell (void)
void ui_destblt (uint8 opcode, int x, int y, int cx, int cy)
void fill_rect (int x, int y, int cx, int cy, int colour, int opcode=0xc)
void ui_rect (int x, int y, int cx, int cy, int colour)
void ui_patblt (uint8 opcode, int x, int y, int cx, int cy, BRUSH *brush, int bgcolour, int fgcolour)
void ui_screenblt (uint8 opcode, int x, int y, int cx, int cy, int srcx, int srcy)
void ui_memblt (uint8 opcode, int x, int y, int cx, int cy, HBITMAP src, int srcx, int srcy)
void ui_triblt (uint8, int, int, int, int, HBITMAP, int, int, BRUSH *, int, int)
void ui_line (uint8 opcode, int startx, int starty, int endx, int endy, PEN *pen)
void draw_glyph (int x, int y, HGLYPH glyph, int fgcolour)
void ui_draw_text (uint8 font, uint8 flags, int mixmode, int x, int y, int clipx, int clipy, int clipcx, int clipcy, int boxx, int boxy, int boxcx, int boxcy, int bgcolour, int fgcolour, uint8 *text, uint8 length)
void ui_desktop_save (uint32 offset, int x, int y, int cx, int cy)
void ui_desktop_restore (uint32 offset, int x, int y, int cx, int cy)
int main (int argc, char **argv)

Variables

uint32 flags
char server [64] = ""
char domain [16] = ""
char password [16] = ""
char shell [128] = ""
char directory [32] = ""
int g_width
int g_height
int server_bpp
BOOL fullscreen
char username []
int global_sock
QSocketNotifier * SocketNotifier
QPEApplicationApp
QMyMainWindowMW
QMyScrollViewSV
QColorMapCM
uint8BS
int clipx
int clipy
int clipcx
int clipcy
BOOL owncolmap = False


Define Documentation

#define DO_GLYPH ttext,
idx   ) 
 

Value:

{\
  glyph = cache_get_font (font, ttext[idx]);\
  if (!(flags & TEXT2_IMPLICIT_X))\
    {\
      xyoffset = ttext[++idx];\
      if ((xyoffset & 0x80))\
        {\
          if (flags & TEXT2_VERTICAL) \
            y += ttext[idx+1] | (ttext[idx+2] << 8);\
          else\
            x += ttext[idx+1] | (ttext[idx+2] << 8);\
          idx += 2;\
        }\
      else\
        {\
          if (flags & TEXT2_VERTICAL) \
            y += xyoffset;\
          else\
            x += xyoffset;\
        }\
    }\
  if (glyph != NULL)\
    {\
      draw_glyph (x + glyph->offset, y + glyph->baseline, glyph->pixmap, fgcolour);\
      if (flags & TEXT2_IMPLICIT_X)\
        x += glyph->width;\
    }\
}

Definition at line 1460 of file qtwin.cpp.

Referenced by ui_draw_text().

#define NOT  )     (255-(x))
 

Definition at line 872 of file qtwin.cpp.

Referenced by rop().


Function Documentation

void CleanString QString Item  ) 
 

Definition at line 81 of file qtwin.cpp.

References QString::at(), i, QString::length(), and QString::remove().

Referenced by QMyDialog::QMyDialog().

void draw_glyph int  x,
int  y,
HGLYPH  glyph,
int  fgcolour
 

Definition at line 1446 of file qtwin.cpp.

References bitmap::data, bitmap::h, i, is_pixel_on(), NULL, set_pixel(), and bitmap::w.

void fill_rect int  x,
int  y,
int  cx,
int  cy,
int  colour,
int  opcode = 0xc
 

Definition at line 1279 of file qtwin.cpp.

References i, and set_pixel().

Referenced by ui_draw_text(), ui_patblt(), and ui_rect().

uint8 get_pixel int  x,
int  y
 

Definition at line 900 of file qtwin.cpp.

References BS, g_height, and g_width.

Referenced by QMyMainWindow::paintEvent(), ui_desktop_save(), ui_destblt(), and ui_screenblt().

void GetScanCode QKeyEvent *  e,
int *  ScanCode,
int *  code
 

Definition at line 440 of file qtwin.cpp.

References mod, and printf.

Referenced by QMyScrollView::keyPressEvent(), and QMyScrollView::keyReleaseEvent().

bool is_pixel_on uint8 data,
int  x,
int  y,
int  width,
int  bpp
 

Definition at line 1126 of file qtwin.cpp.

References shift, and start.

Referenced by draw_glyph(), ui_create_glyph(), and ui_patblt().

int main int  argc,
char **  argv
 

Definition at line 1589 of file qtwin.cpp.

References BS, QPEApplication::exec(), NULL, QMyScrollView::timer_id, tr, and xfree().

void redraw int  x,
int  y,
int  cx,
int  cy
 

Definition at line 993 of file qtwin.cpp.

References NULL, and WarpCoords().

Referenced by Qt3::QTextEdit::contentsMousePressEvent(), QTReader::getNextLink(), Qt3::QTextEdit::handleMouseMove(), DateBook::initDay(), DateBook::initMonth(), DateBook::initWeek(), DateBook::initWeekLst(), Qt3::QTextEdit::moveCursor(), StoneWidget::paintEvent(), ui_desktop_restore(), ui_destblt(), ui_draw_text(), ui_line(), ui_memblt(), ui_paint_bitmap(), ui_patblt(), ui_rect(), ui_screenblt(), VolumeControl::volMoved(), VolumeControl::volMuteToggled(), and VolumeControl::volumeChanged().

uint8 rop int  rop,
uint8  src,
uint8  dst
 

Definition at line 875 of file qtwin.cpp.

References NOT.

Referenced by QPEOutputDev::drawContents(), and set_pixel().

void set_pixel int  x,
int  y,
uint8  pixel,
int  op = 0xc
 

Definition at line 909 of file qtwin.cpp.

References BS, clipcy, clipx, clipy, g_height, g_width, and rop().

Referenced by draw_glyph(), fill_rect(), ui_desktop_restore(), ui_destblt(), ui_line(), ui_memblt(), ui_paint_bitmap(), ui_patblt(), and ui_screenblt().

void set_pixel_on uint8 data,
int  x,
int  y,
int  width,
int  bpp,
uint8  pixel
 

Definition at line 1144 of file qtwin.cpp.

Referenced by ui_create_glyph().

void ui_begin_update void   ) 
 

Definition at line 1233 of file qtwin.cpp.

Referenced by process_update_pdu().

void ui_bell void   ) 
 

Definition at line 1261 of file qtwin.cpp.

Referenced by process_data_pdu().

HBITMAP ui_create_bitmap int  width,
int  height,
uint8 data
 

Definition at line 1079 of file qtwin.cpp.

References bitmap::data, bitmap::h, i, bitmap::w, and xmalloc().

Referenced by process_bmpcache(), and process_raw_bmpcache().

HCOLOURMAP ui_create_colourmap COLOURMAP colours  ) 
 

Definition at line 1203 of file qtwin.cpp.

References _COLOURENTRY::blue, _COLOURMAP::colours, g, _COLOURENTRY::green, i, _COLOURMAP::ncolours, QColorMap::NumColors, _COLOURENTRY::red, QColorMap::RGBColors, and Opie::MM::x.

Referenced by process_colcache(), and process_palette().

HCURSOR ui_create_cursor unsigned  int,
unsigned  int,
int  ,
int  ,
uint8 ,
uint8
 

Definition at line 1185 of file qtwin.cpp.

Referenced by process_pointer_pdu().

HGLYPH ui_create_glyph int  width,
int  height,
uint8 data
 

Definition at line 1151 of file qtwin.cpp.

References bitmap::data, bitmap::h, i, is_pixel_on(), set_pixel_on(), bitmap::w, and xmalloc().

Referenced by process_fontcache().

void ui_desktop_restore uint32  offset,
int  x,
int  y,
int  cx,
int  cy
 

Definition at line 1576 of file qtwin.cpp.

References cache_get_desktop(), data, i, redraw(), and set_pixel().

Referenced by process_desksave().

void ui_desktop_save uint32  offset,
int  x,
int  y,
int  cx,
int  cy
 

Definition at line 1562 of file qtwin.cpp.

References cache_put_desktop(), data, get_pixel(), i, xfree(), and xmalloc().

Referenced by process_desksave().

void ui_destblt uint8  opcode,
int  x,
int  y,
int  cx,
int  cy
 

Definition at line 1267 of file qtwin.cpp.

References get_pixel(), i, redraw(), and set_pixel().

Referenced by process_destblt().

void ui_destroy_bitmap HBITMAP  bmp  ) 
 

Definition at line 1112 of file qtwin.cpp.

References bitmap::data, NULL, and xfree().

Referenced by cache_put_bitmap().

void ui_destroy_colourmap HCOLOURMAP   ) 
 

Definition at line 1223 of file qtwin.cpp.

void ui_destroy_cursor HCURSOR   ) 
 

Definition at line 1198 of file qtwin.cpp.

Referenced by cache_put_cursor().

void ui_destroy_glyph HGLYPH  glyph  ) 
 

Definition at line 1171 of file qtwin.cpp.

References bitmap::data, NULL, and xfree().

Referenced by cache_put_font().

void ui_draw_text uint8  font,
uint8  flags,
int  mixmode,
int  x,
int  y,
int  clipx,
int  clipy,
int  clipcx,
int  clipcy,
int  boxx,
int  boxy,
int  boxcx,
int  boxcy,
int  bgcolour,
int  fgcolour,
uint8 text,
uint8  length
 

Definition at line 1491 of file qtwin.cpp.

References cache_get_text(), cache_put_text(), _DATABLOB::data, DO_GLYPH, error(), fill_rect(), i, MIX_OPAQUE, NULL, redraw(), size, TEXT2_IMPLICIT_X, and TEXT2_VERTICAL.

Referenced by process_text2().

void ui_end_update void   ) 
 

Definition at line 1238 of file qtwin.cpp.

Referenced by process_update_pdu().

void ui_line uint8  opcode,
int  startx,
int  starty,
int  endx,
int  endy,
PEN pen
 

Definition at line 1367 of file qtwin.cpp.

References _PEN::colour, p, redraw(), and set_pixel().

Referenced by process_line(), and process_polyline().

void ui_memblt uint8  opcode,
int  x,
int  y,
int  cx,
int  cy,
HBITMAP  src,
int  srcx,
int  srcy
 

Definition at line 1341 of file qtwin.cpp.

References bitmap::data, bitmap::h, i, NULL, redraw(), set_pixel(), and bitmap::w.

Referenced by process_memblt().

void ui_move_pointer int  ,
int 
 

Definition at line 1074 of file qtwin.cpp.

Referenced by process_pointer_pdu().

void ui_paint_bitmap int  x,
int  y,
int  cx,
int  cy,
int  width,
int  height,
uint8 data
 

Definition at line 1098 of file qtwin.cpp.

References i, redraw(), and set_pixel().

Referenced by process_bitmap_updates().

void ui_patblt uint8  opcode,
int  x,
int  y,
int  cx,
int  cy,
BRUSH brush,
int  bgcolour,
int  fgcolour
 

Definition at line 1296 of file qtwin.cpp.

References fill_rect(), i, is_pixel_on(), _BRUSH::pattern, redraw(), set_pixel(), _BRUSH::style, _BRUSH::xorigin, and _BRUSH::yorigin.

Referenced by process_patblt().

void ui_rect int  x,
int  y,
int  cx,
int  cy,
int  colour
 

Definition at line 1289 of file qtwin.cpp.

References fill_rect(), and redraw().

Referenced by process_rect().

void ui_reset_clip void   ) 
 

Definition at line 1252 of file qtwin.cpp.

References clipcx, clipcy, clipx, clipy, g_height, and g_width.

Referenced by process_orders().

void ui_screenblt uint8  opcode,
int  x,
int  y,
int  cx,
int  cy,
int  srcx,
int  srcy
 

Definition at line 1323 of file qtwin.cpp.

References get_pixel(), i, redraw(), set_pixel(), xfree(), and xmalloc().

Referenced by process_screenblt().

int ui_select int  rdp_socket  ) 
 

Definition at line 1067 of file qtwin.cpp.

References global_sock.

Referenced by tcp_recv().

void ui_set_clip int  x,
int  y,
int  cx,
int  cy
 

Definition at line 1243 of file qtwin.cpp.

References clipcx, clipcy, clipx, and clipy.

Referenced by process_orders().

void ui_set_colourmap HCOLOURMAP   ) 
 

Definition at line 1228 of file qtwin.cpp.

Referenced by process_colcache(), and process_palette().

void ui_set_cursor HCURSOR   ) 
 

Definition at line 1193 of file qtwin.cpp.

Referenced by process_pointer_pdu().

void ui_triblt uint8  ,
int  ,
int  ,
int  ,
int  ,
HBITMAP  ,
int  ,
int  ,
BRUSH ,
int  ,
int 
 

Definition at line 1359 of file qtwin.cpp.

Referenced by process_triblt().

bool WarpCoords int *  x,
int *  y,
int *  cx,
int *  cy,
int *  srcx,
int *  srcy
 

Definition at line 921 of file qtwin.cpp.

References clipcx, clipcy, clipx, clipy, and NULL.

Referenced by redraw().

void WriteString QFile File,
QString Line
 

Definition at line 323 of file qtwin.cpp.

References QFile::writeBlock().

Referenced by QMyDialog::SaveClicked().


Variable Documentation

QPEApplication* App
 

Definition at line 56 of file qtwin.cpp.

Referenced by main().

uint8* BS
 

Definition at line 65 of file qtwin.cpp.

Referenced by get_pixel(), main(), set_pixel(), and QMyScrollView::timerEvent().

int clipcx
 

Definition at line 68 of file qtwin.cpp.

Referenced by QMyScrollView::timerEvent(), ui_reset_clip(), ui_set_clip(), and WarpCoords().

int clipcy
 

Definition at line 69 of file qtwin.cpp.

Referenced by set_pixel(), QMyScrollView::timerEvent(), ui_reset_clip(), ui_set_clip(), and WarpCoords().

int clipx
 

Definition at line 66 of file qtwin.cpp.

Referenced by set_pixel(), QMyScrollView::timerEvent(), ui_reset_clip(), ui_set_clip(), and WarpCoords().

int clipy
 

Definition at line 67 of file qtwin.cpp.

Referenced by set_pixel(), QMyScrollView::timerEvent(), ui_reset_clip(), ui_set_clip(), and WarpCoords().

QColorMap* CM
 

Definition at line 64 of file qtwin.cpp.

Referenced by Opietooth2::OTDriver::getClass().

char directory[32] = ""
 

Definition at line 46 of file qtwin.cpp.

Referenced by LibraryDialog::download_newEtext(), FileManager::ensurePathExists(), QDawgPrivate::QDawgPrivate(), QMyScrollView::timerEvent(), and Opie::Core::ODirNotification::watch().

char domain[16] = ""
 

Definition at line 43 of file qtwin.cpp.

Referenced by QMyScrollView::timerEvent().

uint32 flags
 

Definition at line 41 of file qtwin.cpp.

Referenced by KateView::config(), LiquidDecoInterface::drawArea(), QPEStyle::drawComplexControl(), QPEStyle::drawControl(), MainWindowImp::getAllInterfaces(), CUtf8::getch(), CInputScript::GetCxform(), InstallOptionsDlgImpl::getFlags(), SearchDialog::getFlags(), MailTableItem::MailTableItem(), KateViewInternal::mouseMoveEvent(), KateViewInternal::mousePressEvent(), CReb::OpenFile(), Modem::opentty(), operator>>(), LauncherTabBar::paint(), Palm2QImage(), CInputScript::ParseDefineFont2(), CInputScript::ParseDefineFontInfo(), CInputScript::ParseDefineSound(), IMAPResponseParser::parseFlagList(), IMAPResponseParser::parseResponse(), ParseShapeRecord(), CInputScript::ParseShapeRecord(), CInputScript::ParseTextRecord(), process_polyline(), CSoundFile::ReadAMS(), CSoundFile::ReadAMS2(), FontDatabase::readFonts(), CSoundFile::ReadPSM(), sec_establish_key(), KateDocument::selection(), QtRec::setupAudio(), QMyScrollView::timerEvent(), QLocale::toString(), ProcessInfo::updateData(), KateDocument::updateViews(), and UnixMakefileGenerator::writeMakeParts().

BOOL fullscreen
 

Definition at line 64 of file rdesktop.cpp.

Referenced by QMyMainWindow::MemuClicked(), OwnerDlg::OwnerDlg(), PasswdDlg::PasswdDlg(), PinDlg::PinDlg(), Opie::Security::SecOwnerDlg::SecOwnerDlg(), QMyMainWindow::timerEvent(), and QMyScrollView::timerEvent().

int g_height
 

Definition at line 55 of file rdesktop.cpp.

Referenced by get_pixel(), QMyMainWindow::MemuClicked(), sec_out_mcs_data(), set_pixel(), QMyScrollView::timerEvent(), and ui_reset_clip().

int g_width
 

Definition at line 53 of file rdesktop.cpp.

Referenced by get_pixel(), QMyMainWindow::MemuClicked(), sec_out_mcs_data(), set_pixel(), QMyScrollView::timerEvent(), and ui_reset_clip().

int global_sock
 

Definition at line 53 of file qtwin.cpp.

Referenced by QMyScrollView::timerEvent(), and ui_select().

QMyMainWindow* MW
 

Definition at line 57 of file qtwin.cpp.

BOOL owncolmap = False
 

Definition at line 78 of file qtwin.cpp.

char password[16] = ""
 

Definition at line 44 of file qtwin.cpp.

Referenced by OpieFtp::deleteServer(), OpieFtp::fillCombos(), ZSafe::openDocument(), ZSafe::readAllEntries(), NetworkServer::receive(), OpieFtp::serverComboSelected(), InterfacePPP::start(), QMyScrollView::timerEvent(), and OpieFtp::writeConfig().

char server[64] = ""
 

Definition at line 42 of file qtwin.cpp.

Referenced by SMTPwrapper::connect_server(), KVNCBookmarkDlg::deleteBookmark(), IRCServerEditor::getServer(), KVNCBookmarkDlg::getServer(), OPackageManager::loadAvailablePackages(), POP3wrapper::login(), NNTPwrapper::login(), IMAPwrapper::login(), main(), KVNCBookmarkDlg::readBookmarks(), KVNCBookmarkDlg::refresh(), DataManager::reloadServerData(), OIpkgConfigDlg::slotServerDelete(), OIpkgConfigDlg::slotServerNew(), QMyScrollView::timerEvent(), PackageListRemote::update(), MainWindow::updateData(), KVNCBookmarkDlg::writeBookmarks(), and DataManager::writeOutIpkgConf().

int server_bpp
 

Definition at line 57 of file rdesktop.cpp.

Referenced by sec_out_mcs_data().

char shell[128] = ""
 

Definition at line 45 of file qtwin.cpp.

Referenced by Konsole::Konsole(), ConsoleConfigWidget::load(), main(), and QMyScrollView::timerEvent().

QSocketNotifier* SocketNotifier
 

Definition at line 55 of file qtwin.cpp.

Referenced by QMyScrollView::timerEvent().

QMyScrollView* SV
 

Definition at line 58 of file qtwin.cpp.

char username[]
 

Definition at line 49 of file rdesktop.cpp.


Generated on Sat Nov 5 17:04:10 2005 for OPIE by  doxygen 1.4.2