event-editor/multi-choice: Document public methods
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/603>
This commit is contained in:
@@ -562,12 +562,26 @@ gcal_multi_choice_init (GcalMultiChoice *self)
|
|||||||
* Public methods
|
* Public methods
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gcal_multi_choice_new:
|
||||||
|
*
|
||||||
|
* Creates a new #GcalMultiChoice.
|
||||||
|
*
|
||||||
|
* Returns: (transfer full): a newly created #GcalEventPopover
|
||||||
|
*/
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
gcal_multi_choice_new (void)
|
gcal_multi_choice_new (void)
|
||||||
{
|
{
|
||||||
return GTK_WIDGET (g_object_new (GCAL_TYPE_MULTI_CHOICE, NULL));
|
return GTK_WIDGET (g_object_new (GCAL_TYPE_MULTI_CHOICE, NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gcal_multi_choice_set_value:
|
||||||
|
* @self: a #GcalMultiChoice
|
||||||
|
* @value: the value
|
||||||
|
*
|
||||||
|
* Sets the value for @self.
|
||||||
|
*/
|
||||||
void
|
void
|
||||||
gcal_multi_choice_set_value (GcalMultiChoice *self,
|
gcal_multi_choice_set_value (GcalMultiChoice *self,
|
||||||
gint value)
|
gint value)
|
||||||
@@ -575,12 +589,27 @@ gcal_multi_choice_set_value (GcalMultiChoice *self,
|
|||||||
set_value (self, value, GTK_STACK_TRANSITION_TYPE_NONE);
|
set_value (self, value, GTK_STACK_TRANSITION_TYPE_NONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gcal_multi_choice_get_value:
|
||||||
|
* @self: a #GcalMultiChoice
|
||||||
|
*
|
||||||
|
* Gets the value for @self.
|
||||||
|
*
|
||||||
|
* Returns: The value for @self.
|
||||||
|
*/
|
||||||
gint
|
gint
|
||||||
gcal_multi_choice_get_value (GcalMultiChoice *self)
|
gcal_multi_choice_get_value (GcalMultiChoice *self)
|
||||||
{
|
{
|
||||||
return self->value;
|
return self->value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gcal_multi_choice_set_choices:
|
||||||
|
* @self: a #GcalMultiChoice
|
||||||
|
* @choices: an array of strings
|
||||||
|
*
|
||||||
|
* Sets the available choices for @self.
|
||||||
|
*/
|
||||||
void
|
void
|
||||||
gcal_multi_choice_set_choices (GcalMultiChoice *self,
|
gcal_multi_choice_set_choices (GcalMultiChoice *self,
|
||||||
const gchar **choices)
|
const gchar **choices)
|
||||||
@@ -605,6 +634,15 @@ gcal_multi_choice_set_choices (GcalMultiChoice *self,
|
|||||||
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_CHOICES]);
|
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_CHOICES]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gcal_multi_choice_set_format_callback:
|
||||||
|
* @self: a #GcalMultiChoice
|
||||||
|
* @callback: (nullable) (scope notified) (closure user_data) (destroy destroy): callback
|
||||||
|
* @user_data: user data passed to @callback
|
||||||
|
* @destroy: destroy notifier for @user_data
|
||||||
|
*
|
||||||
|
* Sets the format callback.
|
||||||
|
*/
|
||||||
void
|
void
|
||||||
gcal_multi_choice_set_format_callback (GcalMultiChoice *self,
|
gcal_multi_choice_set_format_callback (GcalMultiChoice *self,
|
||||||
GcalMultiChoiceFormatCallback callback,
|
GcalMultiChoiceFormatCallback callback,
|
||||||
@@ -621,6 +659,13 @@ gcal_multi_choice_set_format_callback (GcalMultiChoice *self,
|
|||||||
apply_value (self, GTK_STACK_TRANSITION_TYPE_NONE);
|
apply_value (self, GTK_STACK_TRANSITION_TYPE_NONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gcal_multi_choice_set_popover:
|
||||||
|
* @self: a #GcalMultiChoice
|
||||||
|
* @popover: a popover widget.
|
||||||
|
*
|
||||||
|
* Sets the popover for @self.
|
||||||
|
*/
|
||||||
void
|
void
|
||||||
gcal_multi_choice_set_popover (GcalMultiChoice *self,
|
gcal_multi_choice_set_popover (GcalMultiChoice *self,
|
||||||
GtkWidget *popover)
|
GtkWidget *popover)
|
||||||
@@ -663,6 +708,14 @@ gcal_multi_choice_set_popover (GcalMultiChoice *self,
|
|||||||
g_object_thaw_notify (G_OBJECT (self));
|
g_object_thaw_notify (G_OBJECT (self));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gcal_multi_choice_get_popover:
|
||||||
|
* @self: a #GcalMultiChoice
|
||||||
|
*
|
||||||
|
* Gets the popover for @self.
|
||||||
|
*
|
||||||
|
* Returns: (transfer none): a #GtkPopover
|
||||||
|
*/
|
||||||
GtkPopover *
|
GtkPopover *
|
||||||
gcal_multi_choice_get_popover (GcalMultiChoice *self)
|
gcal_multi_choice_get_popover (GcalMultiChoice *self)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user