DrawCaml
Public Member Functions | Public Attributes | List of all members
SWindow Class Reference

#include <window.h>

Collaboration diagram for SWindow:
Collaboration graph
[legend]

Public Member Functions

 SWindow (string name, int posX, int posY, int width, int height, int borderSize)
 
void close ()
 
void draw ()
 
void listener ()
 
value keyEventToCaml (int keycode, bool is_pressed)
 

Public Attributes

string mName
 
int mPosX
 
int mPosY
 
int mWidth
 
int mHeight
 
int mBorderSize
 
thread * mThread
 
mutex mActionMutex
 
queue< ActionmSharedQueue
 
bool mClosed = false
 
SContainermContainer
 
Window mWindow
 
Display * mDisplay
 
int mScreen
 
XEvent mEvent
 
Atom mDeleteWindow
 
unsigned long mValuemask = 0
 
XGCValues mValues
 
GC mGC
 
Colormap mColormap
 
XdbeBackBuffer mBackBuffer
 
value mEventHandler
 
bool is_Xlib = false
 

Detailed Description

Class for printing the window and its graphical elements by calling X11 library.

Member Function Documentation

◆ close()

void SWindow::close ( )

Clean closure of X window.

◆ draw()

void SWindow::draw ( )

Create the "Xlib" thread that will listen to events and draw the window.

◆ keyEventToCaml()

value SWindow::keyEventToCaml ( int  keycode,
bool  is_pressed 
)

Method that construct the right Ocaml type for an event by making an ocaml callback

◆ listener()

void SWindow::listener ( )

Loop for listening X11 events.

Member Data Documentation

◆ mBackBuffer

XdbeBackBuffer SWindow::mBackBuffer

Back buffer used for clean redraw operations using XDoubleBufferExtension.

◆ mSharedQueue

queue<Action> SWindow::mSharedQueue

Queue of actions to perform on the window.


The documentation for this class was generated from the following files: