]>
git.saurik.com Git - wxWidgets.git/blob - src/gtk/dcscreen.cpp
935f9bea2bb3450e4ebe5923b66fc09e5ce6a4df
   1 ///////////////////////////////////////////////////////////////////////////// 
   2 // Name:        src/gtk/dcscreen.cpp 
   4 // Author:      Robert Roebling 
   6 // Copyright:   (c) 1998 Robert Roebling 
   7 // Licence:     wxWindows licence 
   8 ///////////////////////////////////////////////////////////////////////////// 
  10 // For compilers that support precompilation, includes "wx.h". 
  11 #include "wx/wxprec.h" 
  13 #include "wx/dcscreen.h" 
  14 #include "wx/gtk/dcscreen.h" 
  17 #ifdef GDK_WINDOWING_X11 
  21 //----------------------------------------------------------------------------- 
  23 //----------------------------------------------------------------------------- 
  25 IMPLEMENT_ABSTRACT_CLASS(wxScreenDCImpl
, wxWindowDCImpl
) 
  27 wxScreenDCImpl::wxScreenDCImpl( wxScreenDC 
*owner 
) 
  28   : wxWindowDCImpl( owner 
) 
  33 void wxScreenDCImpl::Init() 
  36     m_cmap 
= gdk_colormap_get_system(); 
  37     m_gdkwindow 
= gdk_get_default_root_window(); 
  39     m_context 
= gdk_pango_context_get(); 
  40     // Note: The Sun customised version of Pango shipping with Solaris 10 
  41     // crashes if the language is left NULL (see bug 1374114) 
  42     pango_context_set_language( m_context
, gtk_get_default_language() ); 
  43     m_layout 
= pango_layout_new( m_context 
); 
  44 //    m_fontdesc = pango_font_description_copy( widget->style->font_desc ); 
  50     gdk_gc_set_subwindow( m_penGC
, GDK_INCLUDE_INFERIORS 
); 
  51     gdk_gc_set_subwindow( m_brushGC
, GDK_INCLUDE_INFERIORS 
); 
  52     gdk_gc_set_subwindow( m_textGC
, GDK_INCLUDE_INFERIORS 
); 
  53     gdk_gc_set_subwindow( m_bgGC
, GDK_INCLUDE_INFERIORS 
); 
  56 wxScreenDCImpl::~wxScreenDCImpl() 
  58     g_object_unref(m_context
); 
  60     gdk_gc_set_subwindow( m_penGC
, GDK_CLIP_BY_CHILDREN 
); 
  61     gdk_gc_set_subwindow( m_brushGC
, GDK_CLIP_BY_CHILDREN 
); 
  62     gdk_gc_set_subwindow( m_textGC
, GDK_CLIP_BY_CHILDREN 
); 
  63     gdk_gc_set_subwindow( m_bgGC
, GDK_CLIP_BY_CHILDREN 
); 
  66 void wxScreenDCImpl::DoGetSize(int *width
, int *height
) const 
  68     wxDisplaySize(width
, height
);