Make MetaSelection, MetaSelectionSource and MetaMemorySelectionSource public
This exposes the base so that we can reimplement StClipboard on top. Some gtk-docs have been added for documentation and introspection purposes. https://gitlab.gnome.org/GNOME/mutter/merge_requests/320
This commit is contained in:
@ -21,8 +21,8 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "core/meta-selection.h"
|
||||
#include "core/meta-selection-source.h"
|
||||
#include "meta/meta-selection.h"
|
||||
#include "meta/meta-selection-source.h"
|
||||
|
||||
typedef struct MetaSelectionSourcePrivate MetaSelectionSourcePrivate;
|
||||
|
||||
@ -107,6 +107,16 @@ meta_selection_source_read_async (MetaSelectionSource *source,
|
||||
user_data);
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_selection_source_read_finish:
|
||||
* @source: The selection source
|
||||
* @result: The async result
|
||||
* @error: Location for returned error
|
||||
*
|
||||
* Finishes a read from the selection source.
|
||||
*
|
||||
* Returns: (transfer full): The resulting #GInputStream
|
||||
*/
|
||||
GInputStream *
|
||||
meta_selection_source_read_finish (MetaSelectionSource *source,
|
||||
GAsyncResult *result,
|
||||
@ -120,6 +130,14 @@ meta_selection_source_read_finish (MetaSelectionSource *source,
|
||||
error);
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_selection_source_get_mimetypes:
|
||||
* @source: The selection source
|
||||
*
|
||||
* Returns the list of supported mimetypes.
|
||||
*
|
||||
* Returns: (element-type utf8) (transfer full): The supported mimetypes
|
||||
*/
|
||||
GList *
|
||||
meta_selection_source_get_mimetypes (MetaSelectionSource *source)
|
||||
{
|
||||
@ -128,6 +146,14 @@ meta_selection_source_get_mimetypes (MetaSelectionSource *source)
|
||||
return META_SELECTION_SOURCE_GET_CLASS (source)->get_mimetypes (source);
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_selection_source_is_active:
|
||||
* @source: the selection source
|
||||
*
|
||||
* Returns #TRUE if the source is active on a selection.
|
||||
*
|
||||
* Returns: #TRUE if the source owns a selection.
|
||||
**/
|
||||
gboolean
|
||||
meta_selection_source_is_active (MetaSelectionSource *source)
|
||||
{
|
||||
|
Reference in New Issue
Block a user