1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
#pragma once
#include <glib-object.h>
#include <gio/gio.h>
G_BEGIN_DECLS
#define FOOBAR_TYPE_WORKSPACE_FLAGS foobar_workspace_flags_get_type( )
#define FOOBAR_TYPE_WORKSPACE foobar_workspace_get_type( )
#define FOOBAR_TYPE_WORKSPACE_SERVICE foobar_workspace_service_get_type( )
typedef enum
{
FOOBAR_WORKSPACE_FLAGS_NONE = 0,
// Indicates that the workspace is a globally active one (i.e. visible on the focused monitor).
FOOBAR_WORKSPACE_FLAGS_ACTIVE = 1 << 0,
// Indicates that the workspace is currently visible.
FOOBAR_WORKSPACE_FLAGS_VISIBLE = 1 << 1,
// Indicates that the workspace is a special workspace.
FOOBAR_WORKSPACE_FLAGS_SPECIAL = 1 << 2,
// Indicates that the workspace is persistent (i.e. configured in the config file).
FOOBAR_WORKSPACE_FLAGS_PERSISTENT = 1 << 3,
// Indicates that the workspace requires an urgent action (e.g. a notification).
FOOBAR_WORKSPACE_FLAGS_URGENT = 1 << 4,
} FoobarWorkspaceFlags;
GType foobar_workspace_flags_get_type( void );
G_DECLARE_INTERFACE( FoobarWorkspace, foobar_workspace, FOOBAR, WORKSPACE, GObject )
struct _FoobarWorkspaceInterface
{
GTypeInterface parent_iface;
gint64 ( *get_id ) ( FoobarWorkspace* self );
gchar const* ( *get_name ) ( FoobarWorkspace* self );
gchar const* ( *get_monitor )( FoobarWorkspace* self );
FoobarWorkspaceFlags ( *get_flags ) ( FoobarWorkspace* self );
void ( *activate ) ( FoobarWorkspace* self );
};
gint64 foobar_workspace_get_id ( FoobarWorkspace* self );
gchar const* foobar_workspace_get_name ( FoobarWorkspace* self );
gchar const* foobar_workspace_get_monitor( FoobarWorkspace* self );
FoobarWorkspaceFlags foobar_workspace_get_flags ( FoobarWorkspace* self );
void foobar_workspace_activate ( FoobarWorkspace* self );
gint foobar_workspace_sort_func ( gconstpointer item_a,
gconstpointer item_b,
gpointer userdata );
G_DECLARE_INTERFACE( FoobarWorkspaceService, foobar_workspace_service, FOOBAR, WORKSPACE_SERVICE, GObject )
struct _FoobarWorkspaceServiceInterface
{
GTypeInterface parent_iface;
GListModel* ( *get_workspaces )( FoobarWorkspaceService* self );
gboolean ( *is_available ) ( FoobarWorkspaceService* self );
};
GListModel* foobar_workspace_service_get_workspaces( FoobarWorkspaceService* self );
gboolean foobar_workspace_service_is_available ( FoobarWorkspaceService* self );
G_END_DECLS
|