UniqueBackend

UniqueBackend — Backend abstraction

Functions

Types and Values

Object Hierarchy

    GObject
    ╰── UniqueBackend

Description

UniqueBackend is the base, abstract class implemented by the different IPC mechanisms used by Unique. Each UniqueApp instance creates a UniqueBackend to request the name or to send messages.

Functions

unique_backend_create ()

UniqueBackend *
unique_backend_create (void);

Creates a UniqueBackend using the default backend defined at compile time. You can override the default backend by setting the UNIQUE_BACKEND environment variable with the name of the desired backend.

Returns

the newly created UniqueBackend instance


unique_backend_get_name ()

const gchar *
unique_backend_get_name (UniqueBackend *backend);

FIXME

Parameters

backend

FIXME

 

Returns

FIXME


unique_backend_set_name ()

void
unique_backend_set_name (UniqueBackend *backend,
                         const gchar *name);

FIXME

Parameters

backend

FIXME

 

name

FIXME

 

unique_backend_get_startup_id ()

const gchar *
unique_backend_get_startup_id (UniqueBackend *backend);

FIXME

Parameters

backend

FIXME

 

Returns

FIXME


unique_backend_set_startup_id ()

void
unique_backend_set_startup_id (UniqueBackend *backend,
                               const gchar *startup_id);

FIXME

Parameters

backend

FIXME

 

startup_id

FIXME

 

unique_backend_get_screen ()

GdkScreen *
unique_backend_get_screen (UniqueBackend *backend);

FIXME

Parameters

backend

FIXME

 

Returns

FIXME


unique_backend_set_screen ()

void
unique_backend_set_screen (UniqueBackend *backend,
                           GdkScreen *screen);

FIXME

Parameters

backend

FIXME

 

screen

FIXME

 

unique_backend_get_workspace ()

guint
unique_backend_get_workspace (UniqueBackend *backend);

Retrieves the current workspace.

Parameters

backend

a UniqueBackend

 

Returns

a workspace number


unique_backend_request_name ()

gboolean
unique_backend_request_name (UniqueBackend *backend);

Requests the name set using unique_backend_set_name() using backend .

Parameters

backend

a UniqueBackend

 

Returns

TRUE if the name was assigned to us, FALSE if there already is a registered name


unique_backend_send_message ()

UniqueResponse
unique_backend_send_message (UniqueBackend *backend,
                             gint command_id,
                             UniqueMessageData *message_data,
                             guint time_);

Sends command_id , and optionally message_data , to a running instance using backend .

Parameters

backend

a UniqueBackend

 

command_id

command to send

 

message_data

message to send, or NULL

 

time_

time of the command emission, or 0 for the current time

 

Returns

a UniqueResponse value sent by the running instance

Types and Values

struct UniqueBackend

struct UniqueBackend;

The UniqueBackend structure contains only private data and should only be accessed using the provided functions.


struct UniqueBackendClass

struct UniqueBackendClass {
  /* vtable, not signals */
  gboolean       (* request_name) (UniqueBackend     *backend);
  UniqueResponse (* send_message) (UniqueBackend     *backend,
                                   gint               command_id,
                                   UniqueMessageData *message_data,
                                   guint              time_);
};

The class that should be implemented by every backend for UniqueApp.

Members

request_name ()

This method should be used to request the name for the instance set using unique_backend_set_name()

 

send_message ()

This method should be used to send a message to a running instance