X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;ds=sidebyside;f=otk_c%2Fdisplay.h;h=a36cd8538a5dfa2fdffbe9bf4a38362086accd3c;hb=187e7db9c039d7369766aeae7dfdf87f191ac446;hp=fd9b706fb76349aa143e4729d6450774d421a6bd;hpb=edc47eb5580babdca6547989c1cb5cdf317f4835;p=chaz%2Fopenbox diff --git a/otk_c/display.h b/otk_c/display.h index fd9b706f..a36cd853 100644 --- a/otk_c/display.h +++ b/otk_c/display.h @@ -5,10 +5,12 @@ #include #include -typedef OtkScreenInfo; -typedef OtkGCCache; +struct OtkScreenInfo; +struct OtkDisplay; -typedef struct { +extern struct OtkDisplay *OBDisplay; // the global display XXX: move this to app.h and ob.h? + +typedef struct OtkDisplay { PyObject_HEAD //! The X display @@ -32,25 +34,15 @@ typedef struct { //! A list of information for all screens on the display PyObject *screenInfoList; // PyListObject - - //! A cache for re-using GCs, used by the drawing objects - /*! - @see BPen - @see BFont - @see BImage - @see BImageControl - @see BTexture - */ - OtkGCCache *gccache; } OtkDisplay; -//! Creates a struct, opens the X display +//! Opens the X display, and sets the global OBDisplay variable /*! @see OBDisplay::display @param name The name of the X display to open. If it is null, the DISPLAY environment variable is used instead. */ -PyObject *OtkDisplay_New(char *name); +void OtkDisplay_Initialize(char *name); //! Grabs the display void OtkDisplay_Grab(OtkDisplay *self); @@ -58,4 +50,7 @@ void OtkDisplay_Grab(OtkDisplay *self); //! Ungrabs the display void OtkDisplay_Ungrab(OtkDisplay *self); +//! Get the screen info for a specific screen +struct OtkScreenInfo *OtkDisplay_ScreenInfo(OtkDisplay *self, int num); + #endif // __display_h