Exemple #1
0
void BlockStream::SetPos(int64 p)
{
	SyncSize();
	pos = p & pagemask;
	ptr = p - pos + buffer;
	rdlim = wrlim = buffer;
}
Exemple #2
0
void BlockStream::Flush() {
	if(!IsOpen() || IsError()) return;
	if(pagedirty && pagepos >= 0) {
		SyncSize();
		int size = (int)min<int64>(streamsize - pagepos, pagesize);
		LLOG("Write: " << pagepos << ", " << size);
		Write(pagepos, buffer, size);
		streamsize = max(streamsize, pagepos + size);
	}
	wrlim = buffer;
	pagedirty = false;
}
Exemple #3
0
LWindowFrame::LWindowFrame(WId client, QWidget *parent) : QFrame(parent, Qt::X11BypassWindowManagerHint){
  activeState = LWindowFrame::Normal;
  CID = client;
  lastAction = LWM::WA_NONE;
  Closing = false;
  //qDebug() << "New Window:" << CID << "Frame:" << this->winId();
  this->setMouseTracking(true); //need this to determine mouse location when not clicked
  this->setObjectName("LWindowFrame");
  this->setStyleSheet("LWindowFrame#LWindowFrame{ border: 2px solid white; border-radius:3px; } QWidget#TitleBar{background: grey; } QLabel{ color: black; }");
  InitWindow(); //initially create all the child widgets
  //LWM::SYSTEM->setupEventsForFrame(this->winId());
  updateAppearance(); //this loads the appearance based on window/theme settings
  //QApplication::processEvents();
  //Now set the frame size on this window
  SyncSize();
  SyncText();	
  this->show();
}
Exemple #4
0
 virtual bool on_draw(const Cairo::RefPtr<Cairo::Context> &cr)
 {
     SyncSize();
     return Gtk::Fixed::on_draw(cr);
 }