Beispiel #1
0
wxScreenDCImpl::~wxScreenDCImpl()
{
    gdk_gc_set_subwindow( m_penGC, GDK_CLIP_BY_CHILDREN );
    gdk_gc_set_subwindow( m_brushGC, GDK_CLIP_BY_CHILDREN );
    gdk_gc_set_subwindow( m_textGC, GDK_CLIP_BY_CHILDREN );
    gdk_gc_set_subwindow( m_bgGC, GDK_CLIP_BY_CHILDREN );
}
Beispiel #2
0
wxScreenDCImpl::~wxScreenDCImpl()
{
    g_object_unref(m_context);

    gdk_gc_set_subwindow( m_penGC, GDK_CLIP_BY_CHILDREN );
    gdk_gc_set_subwindow( m_brushGC, GDK_CLIP_BY_CHILDREN );
    gdk_gc_set_subwindow( m_textGC, GDK_CLIP_BY_CHILDREN );
    gdk_gc_set_subwindow( m_bgGC, GDK_CLIP_BY_CHILDREN );
}
Beispiel #3
0
/* GDK_CLIP_BY_CHILDREN		only draw onto the window itself.
   GDK_INCLUDE_INFERIORS	Draw onto the window and child windows. */
int
clip_GDK_GCSETSUBWINDOW(ClipMachine * cm)
{
	C_object         *cgc = _fetch_co_arg(cm);
	GdkSubwindowMode mode = _clip_parni (cm, 2);

	CHECKCOBJ(cgc,GDK_IS_GC(cgc)); CHECKARG(2,NUMERIC_t);
	gdk_gc_set_subwindow(GDK_GC(cgc->object), mode);
	return 0;
err:
	return 1;
}
Beispiel #4
0
void wxScreenDCImpl::Init()
{
    m_ok = false;
    m_cmap = gdk_colormap_get_system();
    m_gdkwindow = gdk_get_default_root_window();

    m_context = gdk_pango_context_get();
    // Note: The Sun customised version of Pango shipping with Solaris 10
    // crashes if the language is left NULL (see bug 1374114)
    pango_context_set_language( m_context, gtk_get_default_language() );
    m_layout = pango_layout_new( m_context );
//    m_fontdesc = pango_font_description_copy( widget->style->font_desc );

    m_isScreenDC = true;

    SetUpDC();

    gdk_gc_set_subwindow( m_penGC, GDK_INCLUDE_INFERIORS );
    gdk_gc_set_subwindow( m_brushGC, GDK_INCLUDE_INFERIORS );
    gdk_gc_set_subwindow( m_textGC, GDK_INCLUDE_INFERIORS );
    gdk_gc_set_subwindow( m_bgGC, GDK_INCLUDE_INFERIORS );
}
static void DrawFrame( GtkWidget *widget, int x, int y, int w, int h )
{
    int org_x = 0;
    int org_y = 0;
    gdk_window_get_origin( widget->window, &org_x, &org_y );
    x += org_x;
    y += org_y;

    GdkGC *gc = gdk_gc_new( GDK_ROOT_PARENT() );
    gdk_gc_set_subwindow( gc, GDK_INCLUDE_INFERIORS );
    gdk_gc_set_function( gc, GDK_INVERT );

    gdk_draw_rectangle( GDK_ROOT_PARENT(), gc, FALSE, x, y, w, h );
    gdk_gc_unref( gc );
}
Beispiel #6
0
static void
mt_main_draw_line (MTClosure *mt, gint x1, gint y1, gint x2, gint y2)
{
    GdkWindow *root;
    GdkGC *gc;

    root = gdk_screen_get_root_window (mt_main_current_screen (mt));
    gc = gdk_gc_new (root);
    gdk_gc_set_subwindow (gc, GDK_INCLUDE_INFERIORS);
    gdk_gc_set_function (gc, GDK_INVERT);
    gdk_gc_set_line_attributes (gc, 1,
				GDK_LINE_SOLID,
				GDK_CAP_ROUND,
				GDK_JOIN_ROUND);
    gdk_draw_arc (root, gc, TRUE, x1 - 4, y1 - 4, 8, 8, 0, 23040);
    gdk_draw_line (root, gc, x1, y1, x2, y2);
    g_object_unref (gc);
}
Beispiel #7
0
static VALUE
rg_set_subwindow_mode(VALUE self, VALUE mode)
{
    gdk_gc_set_subwindow(_SELF(self), RVAL2GENUM(mode, GDK_TYPE_SUBWINDOW_MODE));
    return self;
}