X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;f=simple_window.cc;h=f0905dfcaa3955a2db6f4ff52e130c9e74f2f9fe;hb=1ee596cd46c3bed0aa291b78c99fa7f8efc0538e;hp=449ca36a25c45efdec95dbe2c9daf1c16ceff227;hpb=ba46b057f3e2613a86f2dea7fa8022990482c735;p=universe.git diff --git a/simple_window.cc b/simple_window.cc index 449ca36..f0905df 100644 --- a/simple_window.cc +++ b/simple_window.cc @@ -1,25 +1,15 @@ -//////////////////////////////////////////////////////////////////////////////// -// This program is free software; you can redistribute it and/or // -// modify it under the terms of the GNU General Public License // -// version 2 as published by the Free Software Foundation. // -// // -// This program is distributed in the hope that it will be useful, but // -// WITHOUT ANY WARRANTY; without even the implied warranty of // -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // -// General Public License for more details. // -// // -// Written and (C) by François Fleuret // -// Contact for comments & bug reports // -//////////////////////////////////////////////////////////////////////////////// - -// $Id: simple_window.cc,v 1.2 2007-04-24 21:22:52 fleuret Exp $ +// Written and (C) by Francois Fleuret +// Contact for comments & bug reports + +#include +#include #include "simple_window.h" SimpleEvent::SimpleEvent() : type(UNDEFINED) {} -SimpleWindow::SimpleWindow(char *name, int x, int y, int w, int h) { +SimpleWindow::SimpleWindow(const char *name, int x, int y, int w, int h) { _width = w; _height = h; @@ -134,7 +124,7 @@ void SimpleWindow::draw_circle(int x, int y, int r) { XDrawArc(_display, _pixmap, _gc, x-r, y-r, 2*r, 2*r, 0, 360*64); } -void SimpleWindow::draw_text(char *s, int x, int y) { +void SimpleWindow::draw_text(const char *s, int x, int y) { XDrawString(_display, _pixmap, _gc, x, y, s, strlen(s)); }