/************************************************************************************
libsj
Copyright (c) 2010, Segway-Japan, Ltd.
All rights reserved.

Contact us if you use this software for sell.
If you use this software not for sell, you can use this software under BSD lisence.
See the files LICENSE.TXT and LICENSE-BSD.TXT for more details.                     
************************************************************************************/
#ifndef __X11WIN_H__
#define __X11WIN_H__


#include <X11/Xlib.h> 
#include <X11/Xutil.h> 


class x11win
{
  Display *mydisplay; 
  Window mywindow; 
  GC mygc; 
  XEvent myevent; 
  XSizeHints myhint; 
  int myscreen; 
  unsigned long myforeground, mybackground; 

 public:

  void drawlock();
  void drawunlock();
  void drawimage( char* image_buf, int x, int y, int width, int height );
  void drawimage2( char* image_buf, int sw, int sh, int sx, int sy, int x, int y, int w, int h);
  void drawarc(int x, int y, int w, int h);
  void drawrect(int x, int y, int w, int h);
  void drawrectfill(int x, int y, int w, int h);
  void drawline(int x1, int y1, int x2, int y2);
  void drawstring(int x, int y, char* str);
  void drawfrush(); 
  void start(int argc, char** argv, int x, int y, int w, int h, char* name);
  void end();
  void eventloop();
};









#endif
