Пример #1
0
int wxDisplayDepth()
{
#ifdef __WXGTK4__
    return 24;
#else
    return gdk_visual_get_depth(gdk_window_get_visual(wxGetTopLevelGDK()));
#endif
}
Пример #2
0
void wxClientDisplayRect(int* x, int* y, int* width, int* height)
{
#if wxUSE_LIBHILDON || wxUSE_LIBHILDON2
    GdkRectangle rect = { 0, 0, 672, 396 };
#else
    GdkRectangle rect;
    GdkWindow* window = wxGetTopLevelGDK();
    GdkScreen* screen = gdk_window_get_screen(window);
    int monitor = gdk_screen_get_monitor_at_window(screen, window);
    gdk_screen_get_monitor_workarea(screen, monitor, &rect);
#endif
    if (x)
        *x = rect.x;
    if (y)
        *y = rect.y;
    if (width)
        *width = rect.width;
    if (height)
        *height = rect.height;
}
Пример #3
0
void *wxGetDisplay()
{
    return GDK_DISPLAY_XDISPLAY(gdk_window_get_display(wxGetTopLevelGDK()));
}