[xdg-desktop-portal-gnome/gbsneto/screencast-cleanup: 1/6] screencast: Trivial style cleanups
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [xdg-desktop-portal-gnome/gbsneto/screencast-cleanup: 1/6] screencast: Trivial style cleanups
- Date: Wed, 10 Nov 2021 22:56:27 +0000 (UTC)
commit d9c897c8b91165f95f011d44f2fea731b4b7eb16
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Wed Nov 10 15:32:18 2021 -0300
screencast: Trivial style cleanups
Move some code around, and cleanup some of the styling.
It's getting increasingly harder to follow these files,
so start this series of cleanups with them.
src/screencast.c | 30 ++---
src/screencastdialog.c | 62 +++++----
src/screencastdialog.h | 2 +-
src/screencastwidget.c | 356 +++++++++++++++++++++++++------------------------
src/screencastwidget.h | 10 +-
5 files changed, 238 insertions(+), 222 deletions(-)
---
diff --git a/src/screencast.c b/src/screencast.c
index 27d8946..38d1d05 100644
--- a/src/screencast.c
+++ b/src/screencast.c
@@ -572,21 +572,6 @@ on_gnome_screen_cast_disabled (GDBusConnection *connection,
}
}
-gboolean
-screen_cast_init (GDBusConnection *connection,
- GError **error)
-{
- impl_connection = connection;
- gnome_screen_cast = gnome_screen_cast_new (connection);
-
- g_signal_connect (gnome_screen_cast, "enabled",
- G_CALLBACK (on_gnome_screen_cast_enabled), NULL);
- g_signal_connect (gnome_screen_cast, "disabled",
- G_CALLBACK (on_gnome_screen_cast_disabled), NULL);
-
- return TRUE;
-}
-
static void
screen_cast_session_close (Session *session)
{
@@ -636,3 +621,18 @@ screen_cast_session_class_init (ScreenCastSessionClass *klass)
session_class = (SessionClass *)klass;
session_class->close = screen_cast_session_close;
}
+
+gboolean
+screen_cast_init (GDBusConnection *connection,
+ GError **error)
+{
+ impl_connection = connection;
+ gnome_screen_cast = gnome_screen_cast_new (connection);
+
+ g_signal_connect (gnome_screen_cast, "enabled",
+ G_CALLBACK (on_gnome_screen_cast_enabled), NULL);
+ g_signal_connect (gnome_screen_cast, "disabled",
+ G_CALLBACK (on_gnome_screen_cast_disabled), NULL);
+
+ return TRUE;
+}
diff --git a/src/screencastdialog.c b/src/screencastdialog.c
index 306992d..56d4d49 100644
--- a/src/screencastdialog.c
+++ b/src/screencastdialog.c
@@ -51,6 +51,10 @@ static guint signals[N_SIGNALS];
G_DEFINE_TYPE (ScreenCastDialog, screen_cast_dialog, GTK_TYPE_WINDOW)
+/*
+ * Callbacks
+ */
+
static void
button_clicked (GtkWidget *button,
ScreenCastDialog *dialog)
@@ -84,7 +88,7 @@ button_clicked (GtkWidget *button,
static void
on_has_selection_changed (ScreenCastWidget *screen_cast_widget,
- gboolean has_selection,
+ gboolean has_selection,
ScreenCastDialog *dialog)
{
if (has_selection)
@@ -93,32 +97,9 @@ on_has_selection_changed (ScreenCastWidget *screen_cast_widget,
gtk_widget_set_sensitive (dialog->accept_button, FALSE);
}
-ScreenCastDialog *
-screen_cast_dialog_new (const char *app_id,
- ScreenCastSelection *select)
-{
- ScreenCastDialog *dialog;
- ScreenCastWidget *screen_cast_widget;
-
- dialog = g_object_new (SCREEN_CAST_TYPE_DIALOG, NULL);
- screen_cast_widget = SCREEN_CAST_WIDGET (dialog->screen_cast_widget);
- screen_cast_widget_set_app_id (screen_cast_widget, app_id);
- screen_cast_widget_set_allow_multiple (screen_cast_widget, select->multiple);
- screen_cast_widget_set_source_types (screen_cast_widget,
- select->source_types);
-
- return dialog;
-}
-
-static void
-screen_cast_dialog_init (ScreenCastDialog *dialog)
-{
- gtk_widget_init_template (GTK_WIDGET (dialog));
-
- g_signal_connect (dialog->screen_cast_widget, "has-selection-changed",
- G_CALLBACK (on_has_selection_changed), dialog);
- gtk_widget_show (dialog->screen_cast_widget);
-}
+/*
+ * GtkWindow overrides
+ */
static gboolean
screen_cast_dialog_close_request (GtkWindow *dialog)
@@ -155,3 +136,30 @@ screen_cast_dialog_class_init (ScreenCastDialogClass *klass)
gtk_widget_class_bind_template_child (widget_class, ScreenCastDialog, screen_cast_widget);
gtk_widget_class_bind_template_callback (widget_class, button_clicked);
}
+
+static void
+screen_cast_dialog_init (ScreenCastDialog *dialog)
+{
+ gtk_widget_init_template (GTK_WIDGET (dialog));
+
+ g_signal_connect (dialog->screen_cast_widget, "has-selection-changed",
+ G_CALLBACK (on_has_selection_changed), dialog);
+ gtk_widget_show (dialog->screen_cast_widget);
+}
+
+ScreenCastDialog *
+screen_cast_dialog_new (const char *app_id,
+ ScreenCastSelection *select)
+{
+ ScreenCastDialog *dialog;
+ ScreenCastWidget *screen_cast_widget;
+
+ dialog = g_object_new (SCREEN_CAST_TYPE_DIALOG, NULL);
+ screen_cast_widget = SCREEN_CAST_WIDGET (dialog->screen_cast_widget);
+ screen_cast_widget_set_app_id (screen_cast_widget, app_id);
+ screen_cast_widget_set_allow_multiple (screen_cast_widget, select->multiple);
+ screen_cast_widget_set_source_types (screen_cast_widget,
+ select->source_types);
+
+ return dialog;
+}
diff --git a/src/screencastdialog.h b/src/screencastdialog.h
index 247d93b..1fca470 100644
--- a/src/screencastdialog.h
+++ b/src/screencastdialog.h
@@ -26,5 +26,5 @@
G_DECLARE_FINAL_TYPE (ScreenCastDialog, screen_cast_dialog,
SCREEN_CAST, DIALOG, GtkWindow)
-ScreenCastDialog * screen_cast_dialog_new (const char *app_id,
+ScreenCastDialog * screen_cast_dialog_new (const char *app_id,
ScreenCastSelection *select);
diff --git a/src/screencastwidget.c b/src/screencastwidget.c
index be1c703..a311ef7 100644
--- a/src/screencastwidget.c
+++ b/src/screencastwidget.c
@@ -70,6 +70,64 @@ static GQuark quark_window_widget_data;
G_DEFINE_TYPE (ScreenCastWidget, screen_cast_widget, GTK_TYPE_BOX)
+/*
+ * Auxiliary methods
+ */
+
+static gboolean
+add_selections (ScreenCastWidget *widget,
+ GVariantBuilder *source_selections_builder)
+{
+ GList *selected_monitor_rows;
+ GList *selected_window_rows;
+ gboolean selected_virtual;
+ GList *l;
+
+ selected_monitor_rows =
+ gtk_list_box_get_selected_rows (GTK_LIST_BOX (widget->monitor_list));
+ selected_window_rows =
+ gtk_list_box_get_selected_rows (GTK_LIST_BOX (widget->window_list));
+ selected_virtual = gtk_switch_get_state (GTK_SWITCH (widget->virtual_switch));
+ if (!selected_monitor_rows && !selected_window_rows && !selected_virtual)
+ return FALSE;
+
+ for (l = selected_monitor_rows; l; l = l->next)
+ {
+ GtkWidget *monitor_widget = gtk_list_box_row_get_child (l->data);
+ Monitor *monitor;
+
+ monitor = g_object_get_qdata (G_OBJECT (monitor_widget),
+ quark_monitor_widget_data);
+
+ g_variant_builder_add (source_selections_builder, "(us)",
+ SCREEN_CAST_SOURCE_TYPE_MONITOR,
+ monitor_get_connector (monitor));
+ }
+ g_list_free (selected_monitor_rows);
+ for (l = selected_window_rows; l; l = l->next)
+ {
+ GtkWidget *window_widget = gtk_list_box_row_get_child (l->data);
+ Window *window;
+
+ window = g_object_get_qdata (G_OBJECT (window_widget),
+ quark_window_widget_data);
+
+ g_variant_builder_add (source_selections_builder, "(ut)",
+ SCREEN_CAST_SOURCE_TYPE_WINDOW,
+ window_get_id (window));
+ }
+ g_list_free (selected_window_rows);
+
+ if (selected_virtual)
+ {
+ g_variant_builder_add (source_selections_builder, "(ud)",
+ SCREEN_CAST_SOURCE_TYPE_VIRTUAL,
+ 1);
+ }
+
+ return TRUE;
+}
+
static GtkWidget *
create_window_widget (Window *window)
{
@@ -136,7 +194,7 @@ create_monitor_widget (LogicalMonitor *logical_monitor)
}
static gboolean
-should_skip_window (Window *window,
+should_skip_window (Window *window,
GtkWindow *toplevel)
{
g_autofree char *processed_app_id = NULL;
@@ -259,7 +317,7 @@ unselect_rows (GtkListBox *listbox)
}
static void
-on_windows_changed (ShellIntrospect *shell_introspect,
+on_windows_changed (ShellIntrospect *shell_introspect,
ScreenCastWidget *widget)
{
update_windows_list (widget);
@@ -288,9 +346,9 @@ disconnect_windows_changed_listener (ScreenCastWidget *widget)
}
static void
-on_stack_switch (GtkStack *stack,
+on_stack_switch (GtkStack *stack,
GParamSpec *pspec,
- gpointer *data)
+ gpointer *data)
{
ScreenCastWidget *widget = (ScreenCastWidget *)data;
GtkWidget *visible_child;
@@ -312,9 +370,9 @@ on_stack_switch (GtkStack *stack,
}
static void
-on_row_activated (GtkListBox *box,
+on_row_activated (GtkListBox *box,
GtkListBoxRow *row,
- gpointer *data)
+ gpointer *data)
{
if (!row)
return;
@@ -385,7 +443,7 @@ schedule_selection_change (ScreenCastWidget *widget)
}
static void
-on_selected_rows_changed (GtkListBox *box,
+on_selected_rows_changed (GtkListBox *box,
ScreenCastWidget *widget)
{
/* GtkListBox activates rows after selecting them, which prevents
@@ -394,8 +452,8 @@ on_selected_rows_changed (GtkListBox *box,
}
static gboolean
-on_virtual_switch_state_set (GtkSwitch *virtual_switch,
- gboolean state,
+on_virtual_switch_state_set (GtkSwitch *virtual_switch,
+ gboolean state,
ScreenCastWidget *widget)
{
schedule_selection_change (widget);
@@ -419,68 +477,135 @@ update_list_box_header (GtkListBoxRow *row,
static void
on_monitors_changed (DisplayStateTracker *display_state_tracker,
- ScreenCastWidget *widget)
+ ScreenCastWidget *widget)
{
update_monitors_list (widget);
}
-static gboolean
-add_selections (ScreenCastWidget *widget,
- GVariantBuilder *source_selections_builder)
+/*
+ * GObject overrides
+ */
+
+static void
+screen_cast_widget_finalize (GObject *object)
{
- GList *selected_monitor_rows;
- GList *selected_window_rows;
- gboolean selected_virtual;
- GList *l;
+ ScreenCastWidget *widget = SCREEN_CAST_WIDGET (object);
- selected_monitor_rows =
- gtk_list_box_get_selected_rows (GTK_LIST_BOX (widget->monitor_list));
- selected_window_rows =
- gtk_list_box_get_selected_rows (GTK_LIST_BOX (widget->window_list));
- selected_virtual = gtk_switch_get_state (GTK_SWITCH (widget->virtual_switch));
- if (!selected_monitor_rows && !selected_window_rows && !selected_virtual)
- return FALSE;
+ g_signal_handler_disconnect (widget->display_state_tracker,
+ widget->monitors_changed_handler_id);
- for (l = selected_monitor_rows; l; l = l->next)
+ if (widget->windows_changed_handler_id)
+ disconnect_windows_changed_listener (widget);
+
+ if (widget->selection_changed_timeout_id > 0)
{
- GtkWidget *monitor_widget = gtk_list_box_row_get_child (l->data);
- Monitor *monitor;
+ g_source_remove (widget->selection_changed_timeout_id);
+ widget->selection_changed_timeout_id = 0;
+ }
- monitor = g_object_get_qdata (G_OBJECT (monitor_widget),
- quark_monitor_widget_data);
+ G_OBJECT_CLASS (screen_cast_widget_parent_class)->finalize (object);
+}
- g_variant_builder_add (source_selections_builder, "(us)",
- SCREEN_CAST_SOURCE_TYPE_MONITOR,
- monitor_get_connector (monitor));
- }
- g_list_free (selected_monitor_rows);
- for (l = selected_window_rows; l; l = l->next)
- {
- GtkWidget *window_widget = gtk_list_box_row_get_child (l->data);
- Window *window;
+static void
+screen_cast_widget_class_init (ScreenCastWidgetClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
- window = g_object_get_qdata (G_OBJECT (window_widget),
- quark_window_widget_data);
+ object_class->finalize = screen_cast_widget_finalize;
- g_variant_builder_add (source_selections_builder, "(ut)",
- SCREEN_CAST_SOURCE_TYPE_WINDOW,
- window_get_id (window));
- }
- g_list_free (selected_window_rows);
+ signals[HAS_SELECTION_CHANGED] = g_signal_new ("has-selection-changed",
+ G_TYPE_FROM_CLASS (klass),
+ G_SIGNAL_RUN_LAST,
+ 0,
+ NULL, NULL,
+ NULL,
+ G_TYPE_NONE, 1,
+ G_TYPE_BOOLEAN);
- if (selected_virtual)
- {
- g_variant_builder_add (source_selections_builder, "(ud)",
- SCREEN_CAST_SOURCE_TYPE_VIRTUAL,
- 1);
- }
+ gtk_widget_class_set_template_from_resource (widget_class,
"/org/freedesktop/portal/desktop/gnome/screencastwidget.ui");
+ gtk_widget_class_bind_template_child (widget_class, ScreenCastWidget, source_type_switcher);
+ gtk_widget_class_bind_template_child (widget_class, ScreenCastWidget, source_type);
+ gtk_widget_class_bind_template_child (widget_class, ScreenCastWidget, monitor_selection);
+ gtk_widget_class_bind_template_child (widget_class, ScreenCastWidget, window_selection);
+ gtk_widget_class_bind_template_child (widget_class, ScreenCastWidget, virtual_selection);
+ gtk_widget_class_bind_template_child (widget_class, ScreenCastWidget, monitor_heading);
+ gtk_widget_class_bind_template_child (widget_class, ScreenCastWidget, monitor_list);
+ gtk_widget_class_bind_template_child (widget_class, ScreenCastWidget, window_heading);
+ gtk_widget_class_bind_template_child (widget_class, ScreenCastWidget, window_list);
+ gtk_widget_class_bind_template_child (widget_class, ScreenCastWidget, window_list_scrolled);
+ gtk_widget_class_bind_template_child (widget_class, ScreenCastWidget, virtual_heading);
+ gtk_widget_class_bind_template_child (widget_class, ScreenCastWidget, virtual_switch);
- return TRUE;
+ quark_monitor_widget_data = g_quark_from_static_string ("-monitor-widget-connector-quark");
+ quark_window_widget_data = g_quark_from_static_string ("-window-widget-connector-quark");
+}
+
+static void
+screen_cast_widget_init (ScreenCastWidget *widget)
+{
+ GtkScrolledWindow *scrolled_window;
+ GtkAdjustment *vadjustment;
+
+ gtk_widget_init_template (GTK_WIDGET (widget));
+
+ screen_cast_widget_set_app_id (widget, NULL);
+ screen_cast_widget_set_allow_multiple (widget, FALSE);
+
+ gtk_list_box_set_header_func (GTK_LIST_BOX (widget->monitor_list),
+ update_list_box_header,
+ NULL, NULL);
+ gtk_list_box_set_header_func (GTK_LIST_BOX (widget->window_list),
+ update_list_box_header,
+ NULL, NULL);
+ scrolled_window = GTK_SCROLLED_WINDOW (widget->window_list_scrolled);
+ vadjustment = gtk_scrolled_window_get_vadjustment (scrolled_window);
+ gtk_list_box_set_adjustment (GTK_LIST_BOX (widget->window_list), vadjustment);
+
+ g_signal_connect (widget->source_type, "notify::visible-child",
+ G_CALLBACK (on_stack_switch),
+ widget);
+ g_signal_connect (widget->monitor_list, "row-activated",
+ G_CALLBACK (on_row_activated),
+ NULL);
+ g_signal_connect (widget->window_list, "row-activated",
+ G_CALLBACK (on_row_activated),
+ NULL);
+ g_signal_connect (widget->monitor_list, "selected-rows-changed",
+ G_CALLBACK (on_selected_rows_changed),
+ widget);
+ g_signal_connect (widget->window_list, "selected-rows-changed",
+ G_CALLBACK (on_selected_rows_changed),
+ widget);
+ g_signal_connect (widget->virtual_switch, "state-set",
+ G_CALLBACK (on_virtual_switch_state_set),
+ widget);
+
+ widget->display_state_tracker = display_state_tracker_get ();
+ widget->monitors_changed_handler_id =
+ g_signal_connect (widget->display_state_tracker,
+ "monitors-changed",
+ G_CALLBACK (on_monitors_changed),
+ widget);
+ widget->shell_introspect = shell_introspect_get ();
+
+ update_monitors_list (widget);
+ update_windows_list (widget);
+
+ gtk_widget_show (widget->monitor_list);
+ gtk_widget_show (widget->window_list);
+ gtk_widget_show (widget->virtual_switch);
+}
+
+void
+init_screen_cast_widget (void)
+{
+ g_type_ensure (screen_cast_widget_get_type ());
}
void
screen_cast_widget_add_selections (ScreenCastWidget *widget,
- GVariantBuilder *selections_builder)
+ GVariantBuilder *selections_builder)
{
GVariantBuilder source_selections_builder;
@@ -499,7 +624,7 @@ screen_cast_widget_add_selections (ScreenCastWidget *widget,
void
screen_cast_widget_set_app_id (ScreenCastWidget *widget,
- const char *app_id)
+ const char *app_id)
{
g_autofree char *monitor_heading = NULL;
g_autofree char *window_heading = NULL;
@@ -538,7 +663,7 @@ screen_cast_widget_set_app_id (ScreenCastWidget *widget,
void
screen_cast_widget_set_allow_multiple (ScreenCastWidget *widget,
- gboolean multiple)
+ gboolean multiple)
{
gtk_list_box_set_selection_mode (GTK_LIST_BOX (widget->monitor_list),
multiple ? GTK_SELECTION_MULTIPLE
@@ -549,8 +674,8 @@ screen_cast_widget_set_allow_multiple (ScreenCastWidget *widget,
}
void
-screen_cast_widget_set_source_types (ScreenCastWidget *screen_cast_widget,
- ScreenCastSourceType source_types)
+screen_cast_widget_set_source_types (ScreenCastWidget *screen_cast_widget,
+ ScreenCastSourceType source_types)
{
if (source_types & SCREEN_CAST_SOURCE_TYPE_MONITOR)
gtk_widget_show (screen_cast_widget->monitor_selection);
@@ -564,120 +689,3 @@ screen_cast_widget_set_source_types (ScreenCastWidget *screen_cast_widget,
if (__builtin_popcount (source_types) > 1)
gtk_widget_show (screen_cast_widget->source_type_switcher);
}
-
-static void
-screen_cast_widget_finalize (GObject *object)
-{
- ScreenCastWidget *widget = SCREEN_CAST_WIDGET (object);
-
- g_signal_handler_disconnect (widget->display_state_tracker,
- widget->monitors_changed_handler_id);
-
- if (widget->windows_changed_handler_id)
- disconnect_windows_changed_listener (widget);
-
- if (widget->selection_changed_timeout_id > 0)
- {
- g_source_remove (widget->selection_changed_timeout_id);
- widget->selection_changed_timeout_id = 0;
- }
-
- G_OBJECT_CLASS (screen_cast_widget_parent_class)->finalize (object);
-}
-
-static void
-screen_cast_widget_init (ScreenCastWidget *widget)
-{
- GtkScrolledWindow *scrolled_window;
- GtkAdjustment *vadjustment;
-
- gtk_widget_init_template (GTK_WIDGET (widget));
-
- screen_cast_widget_set_app_id (widget, NULL);
- screen_cast_widget_set_allow_multiple (widget, FALSE);
-
- gtk_list_box_set_header_func (GTK_LIST_BOX (widget->monitor_list),
- update_list_box_header,
- NULL, NULL);
- gtk_list_box_set_header_func (GTK_LIST_BOX (widget->window_list),
- update_list_box_header,
- NULL, NULL);
- scrolled_window = GTK_SCROLLED_WINDOW (widget->window_list_scrolled);
- vadjustment = gtk_scrolled_window_get_vadjustment (scrolled_window);
- gtk_list_box_set_adjustment (GTK_LIST_BOX (widget->window_list), vadjustment);
-
- g_signal_connect (widget->source_type, "notify::visible-child",
- G_CALLBACK (on_stack_switch),
- widget);
- g_signal_connect (widget->monitor_list, "row-activated",
- G_CALLBACK (on_row_activated),
- NULL);
- g_signal_connect (widget->window_list, "row-activated",
- G_CALLBACK (on_row_activated),
- NULL);
- g_signal_connect (widget->monitor_list, "selected-rows-changed",
- G_CALLBACK (on_selected_rows_changed),
- widget);
- g_signal_connect (widget->window_list, "selected-rows-changed",
- G_CALLBACK (on_selected_rows_changed),
- widget);
- g_signal_connect (widget->virtual_switch, "state-set",
- G_CALLBACK (on_virtual_switch_state_set),
- widget);
-
- widget->display_state_tracker = display_state_tracker_get ();
- widget->monitors_changed_handler_id =
- g_signal_connect (widget->display_state_tracker,
- "monitors-changed",
- G_CALLBACK (on_monitors_changed),
- widget);
- widget->shell_introspect = shell_introspect_get ();
-
- update_monitors_list (widget);
- update_windows_list (widget);
-
- gtk_widget_show (widget->monitor_list);
- gtk_widget_show (widget->window_list);
- gtk_widget_show (widget->virtual_switch);
-}
-
-static void
-screen_cast_widget_class_init (ScreenCastWidgetClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
- GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
-
- object_class->finalize = screen_cast_widget_finalize;
-
- signals[HAS_SELECTION_CHANGED] = g_signal_new ("has-selection-changed",
- G_TYPE_FROM_CLASS (klass),
- G_SIGNAL_RUN_LAST,
- 0,
- NULL, NULL,
- NULL,
- G_TYPE_NONE, 1,
- G_TYPE_BOOLEAN);
-
- gtk_widget_class_set_template_from_resource (widget_class,
"/org/freedesktop/portal/desktop/gnome/screencastwidget.ui");
- gtk_widget_class_bind_template_child (widget_class, ScreenCastWidget, source_type_switcher);
- gtk_widget_class_bind_template_child (widget_class, ScreenCastWidget, source_type);
- gtk_widget_class_bind_template_child (widget_class, ScreenCastWidget, monitor_selection);
- gtk_widget_class_bind_template_child (widget_class, ScreenCastWidget, window_selection);
- gtk_widget_class_bind_template_child (widget_class, ScreenCastWidget, virtual_selection);
- gtk_widget_class_bind_template_child (widget_class, ScreenCastWidget, monitor_heading);
- gtk_widget_class_bind_template_child (widget_class, ScreenCastWidget, monitor_list);
- gtk_widget_class_bind_template_child (widget_class, ScreenCastWidget, window_heading);
- gtk_widget_class_bind_template_child (widget_class, ScreenCastWidget, window_list);
- gtk_widget_class_bind_template_child (widget_class, ScreenCastWidget, window_list_scrolled);
- gtk_widget_class_bind_template_child (widget_class, ScreenCastWidget, virtual_heading);
- gtk_widget_class_bind_template_child (widget_class, ScreenCastWidget, virtual_switch);
-
- quark_monitor_widget_data = g_quark_from_static_string ("-monitor-widget-connector-quark");
- quark_window_widget_data = g_quark_from_static_string ("-window-widget-connector-quark");
-}
-
-void
-init_screen_cast_widget (void)
-{
- g_type_ensure (screen_cast_widget_get_type ());
-}
diff --git a/src/screencastwidget.h b/src/screencastwidget.h
index 3a1ebd2..34360a3 100644
--- a/src/screencastwidget.h
+++ b/src/screencastwidget.h
@@ -31,13 +31,13 @@ G_DECLARE_FINAL_TYPE (ScreenCastWidget, screen_cast_widget,
void init_screen_cast_widget (void);
void screen_cast_widget_set_app_id (ScreenCastWidget *widget,
- const char *app_id);
+ const char *app_id);
void screen_cast_widget_set_allow_multiple (ScreenCastWidget *widget,
- gboolean multiple);
+ gboolean multiple);
-void screen_cast_widget_set_source_types (ScreenCastWidget *screen_cast_widget,
- ScreenCastSourceType source_types);
+void screen_cast_widget_set_source_types (ScreenCastWidget *screen_cast_widget,
+ ScreenCastSourceType source_types);
void screen_cast_widget_add_selections (ScreenCastWidget *widget,
- GVariantBuilder *selections_builder);
+ GVariantBuilder *selections_builder);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]