MCPcopy Create free account
hub / github.com/HandBrake/HandBrake / get_display_size

Function get_display_size

gtk/src/preview.c:65–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63static void live_preview_progress_cb(GtkMediaStream *video, GParamSpec *spec, signal_user_data_t *ud);
64
65static void
66get_display_size (GtkWidget *widget, int *w, int *h)
67{
68 *w = *h = 0;
69
70 GdkDisplay *display = gtk_widget_get_display(widget);
71 GtkRoot *root = gtk_widget_get_root(widget);
72 GdkSurface *surface = gtk_native_get_surface(GTK_NATIVE(root));
73
74 if (surface != NULL && display != NULL)
75 {
76 GdkMonitor * monitor;
77
78 monitor = gdk_display_get_monitor_at_surface(display, surface);
79 if (monitor != NULL)
80 {
81 GdkRectangle rect;
82
83 gdk_monitor_get_geometry(monitor, &rect);
84 *w = rect.width;
85 *h = rect.height;
86 }
87 }
88}
89
90static void
91screen_par (signal_user_data_t *ud, gint *par_n, gint *par_d)

Callers 1

preview_set_render_sizeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected