X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=otk_c%2Fdisplay.h;h=32e92c4a6aee6e1c9f6356a4ae50d55668f5ad60;hb=390d447d9ba92878fbd1a0f7955edb5f83256195;hp=87574b761d147f5d9aea136565a790d8a62b0dde;hpb=e5c5b4bf700f9bf00dd88bd4b6a471ac1ccefaff;p=chaz%2Fopenbox diff --git a/otk_c/display.h b/otk_c/display.h index 87574b76..32e92c4a 100644 --- a/otk_c/display.h +++ b/otk_c/display.h @@ -1,4 +1,4 @@ -// -*- mode: C; indent-tabs-mode: nil; -*- +// -*- mode: C; indent-tabs-mode: nil; c-basic-offset: 2; -*- #ifndef __display_h #define __display_h @@ -6,10 +6,11 @@ #include struct OtkScreenInfo; -struct OtkGCCache; struct OtkDisplay; -struct OtkDisplay *OBDisplay; // the global display XXX: move this to app.h and ob.h? +extern struct OtkDisplay *OBDisplay; // the global display XXX: move this to app.h and ob.h? + +extern PyTypeObject OtkDisplay_Type; typedef struct OtkDisplay { PyObject_HEAD @@ -34,26 +35,16 @@ typedef struct OtkDisplay { int grab_count; //! 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 - */ - struct OtkGCCache *gccache; + PyListObject *screenInfoList; } 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); @@ -61,4 +52,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