ubit::UNatDisp Class Reference

[Impl] Native Display Context. More...

#include <unatdisp.hpp>

List of all members.

Public Member Functions

 UNatDisp (UDisp &)
bool isOpened () const
 returns true if the UNatDisp was sucessufully opened.
UDispgetDisp () const
 returns the corresponding Display counterpart.
int getID () const
 returns the int ID of this Display.
void realize ()
 creates X data.
bool isRealized () const
 is X data created ?.
USysDisp getSysDisp () const
USysScreen getSysScreen () const
USysVisual getSysVisual () const
USysWin getSysRoot () const
USysWin getSysFrame () const
UNatWingetNatFrame ()
USysColormap getSysColormap () const
USysPixel getBlackPixel () const
USysPixel getWhitePixel () const
int getDepth () const
 depth of this UNatDisp.
int getScreenWidth () const
int getScreenHeight () const
 returns the width or the height of the screen.
int getScreenNumber () const
 number of the Screen in this display.
int getScreenCount () const
 total number of Screens available on this display.
unsigned long getRedMask () const
unsigned long getGreenMask () const
unsigned long getBlueMask () const
int getRedShift () const
int getGreenShift () const
int getBlueShift () const
int getRedBits () const
int getGreenBits () const
int getBlueBits () const
 attention: les masks varient suivant l'architecture (big endian ou little endian).
int getShiftMask () const
int getControlMask () const
int getMetaMask () const
int getAltMask () const
int getAltGraphMask () const
USysPixel getColorPixel (const UColor &c)
USysPixel getColorPixel (UColorImpl &)
 returns the native color corresponding to this UColor.
bool realizeColor (const UColor &c)
bool realizeColor (UColorImpl &)
 allocates physical resources for this UColor on this display.
USysCursor getCursor (const UCursor &)
 returns the native cursor corresponding to this UCursor.
bool setCursor (UNatWin &, const UCursor *)
 sets the cursor of this window.
bool realizeCursor (const UCursor &)
 allocates physical resources for this UCursor on this display.
UNatFontgetFont (const UFontDesc &)
 returns the native font corresponding to this UFont.
UNatFontrealizeFont (const UFont &)
UNatFontrealizeFont (const UFontDesc &)
void realizeFontFamily (const UFontFamily &)
 Allocates physical resources for this UFont/UFontDesc on this UDisp.
void resizeGLViewport (int w, int h)
 [requires the OpenGL lib] resizes the GL viewport.
int setVisual (int visual_class, int depth_hint, bool linear_gamma, USysColormap=None)
 sets the visual of this display according to 'visual_class' and 'depth_hint'.
int setVisual (const XVisualInfo &, USysColormap=None)
 sets the visual of this UDisp according to the XVisualInfo argument.
int chooseVisual (XVisualInfo &, int visual_class, int depth_hint, bool linear_gamma)
 searches a visual on this UDisp.
bool findExactVisual (XVisualInfo &, int visual_class, int depth, bool linear_gamma)
bool setSelectionOwner (UEvent &)
 [impl] tells the server we own the X selection.
void copySelectionCallback (USysEvent)
 [impl] copie reellement la selection (ou plus exactement envoie son contenu a l'appli qui la demande).
void pasteSelectionRequest (UEvent &)
 [impl] asks the X selection.
void pasteSelectionCallback (USysEvent)
 [impl] recupere effectivement le contenu de la X selection.
void dispatchEvent (USysEvent)
 dispatches X Event to Windows (function called by the event loop).
UEventFlowobtainFlow (unsigned int ev_state, unsigned long channel)
 returns the corresponding Event Flow (creates it if does not already exist).
void on_selection (UWin *, UView *, USysEvent)
void on_expose (UWin *, UView *, USysEvent)
void on_mpress (UWin *, UView *, USysEvent)
void on_mrelease (UWin *, UView *, USysEvent)
void on_mmove (UWin *, UView *, USysEvent)
void on_kpress (UWin *, UView *, USysEvent)
void on_krelease (UWin *, UView *, USysEvent)
void on_enter (UWin *, UView *, USysEvent)
void on_leave (UWin *, UView *, USysEvent)
void on_focus (UWin *, UView *, USysEvent)
void on_configure (UWin *, UView *, USysEvent)
void on_winstate (UWin *, UView *, USysEvent)
void on_property (UWin *, UView *, USysEvent)
void on_clientmsg (UWin *, UView *, USysEvent)
void on_misc (UWin *, UView *, USysEvent)
USysPix getDefaultPixmap () const
 impl: default Pixmap with same depth as UNatDisp.
UNatGraphgetNatGraph () const
 impl: returns the graphics context (only one GC for a given Display!).
void initModifiers ()
 impl: init the key modifiers.

Public Attributes

struct {
   USysAtom   _PRIMARY_SELECTION
   USysAtom   _SECONDARY_SELECTION
   USysAtom   _WM_PROTOCOLS
   USysAtom   _WM_DELETE_WINDOW
   USysAtom   _WM_TAKE_FOCUS
   USysAtom   _UMS_WINDOW
   USysAtom   _UMS_MESSAGE
atoms
 useful X11 Atoms.

Friends

class UAppliImpl
class UNatAppli
class UNatWin
class UGraph
class UGraphElem
class UNatGraph
class UFontFamily
class UDisp


Detailed Description

[Impl] Native Display Context.


Member Function Documentation

int ubit::UNatDisp::chooseVisual ( XVisualInfo &  ,
int  visual_class,
int  depth_hint,
bool  linear_gamma 
)

searches a visual on this UDisp.

Arguments:

void ubit::UNatDisp::copySelectionCallback ( USysEvent   ) 

[impl] copie reellement la selection (ou plus exactement envoie son contenu a l'appli qui la demande).

l'event doit etre un XSelectionRequestEvent

USysPixel ubit::UNatDisp::getColorPixel ( UColorImpl  ) 

returns the native color corresponding to this UColor.

Note: the color is implicitely realized if necessary

USysCursor ubit::UNatDisp::getCursor ( const UCursor  ) 

returns the native cursor corresponding to this UCursor.

the cursor is implicitely realized if necessary

UNatFont * ubit::UNatDisp::getFont ( const UFontDesc  ) 

returns the native font corresponding to this UFont.

Note: the font is implicitely realized if necessary

void ubit::UNatDisp::pasteSelectionCallback ( USysEvent   ) 

[impl] recupere effectivement le contenu de la X selection.

l'appel de cette fct est provoque par pasteSelectionRequest() the XEvent must be a XSelectionEvent event.

void ubit::UNatDisp::pasteSelectionRequest ( UEvent  ) 

[impl] asks the X selection.

cette fct ne recupere PAS tout de suite le contenu de la selection mais entrainera un appel ulterieur de pasteSelectionCallback(). the UEvent must be a button event.

bool ubit::UNatDisp::realizeColor ( UColorImpl  ) 

allocates physical resources for this UColor on this display.

Returns true if the color could be allocated. returns false and sets a default color otherwise

bool ubit::UNatDisp::realizeCursor ( const UCursor  ) 

allocates physical resources for this UCursor on this display.

returns true if the cursor could be realized and false otherwise

void ubit::UNatDisp::realizeFontFamily ( const UFontFamily &   ) 

Allocates physical resources for this UFont/UFontDesc on this UDisp.

returns true if the font was found and false otherwise

bool ubit::UNatDisp::setCursor ( UNatWin ,
const UCursor  
)

sets the cursor of this window.

the default cursor will used if argument is null.

bool ubit::UNatDisp::setSelectionOwner ( UEvent  ) 

[impl] tells the server we own the X selection.

the UEvent must be a button event

int ubit::UNatDisp::setVisual ( const XVisualInfo &  ,
USysColormap  = None 
)

sets the visual of this UDisp according to the XVisualInfo argument.

Notes:

int ubit::UNatDisp::setVisual ( int  visual_class,
int  depth_hint,
bool  linear_gamma,
USysColormap  = None 
)

sets the visual of this display according to 'visual_class' and 'depth_hint'.

Arguments:


Member Data Documentation

struct { ... } ubit::UNatDisp::atoms

useful X11 Atoms.


The documentation for this class was generated from the following files:
Generated on Mon Jan 29 00:20:53 2007 for Ubit by  doxygen 1.4.7