File: uniqueinternals.h

package info (click to toggle)
libunique 1.1.6-4
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 2,704 kB
  • sloc: sh: 10,371; ansic: 2,472; xml: 1,345; makefile: 238
file content (56 lines) | stat: -rw-r--r-- 1,954 bytes parent folder | download | duplicates (3)
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
#ifndef __UNIQUE_INTERNALS_H__
#define __UNIQUE_INTERNALS_H__

#include <time.h>

#include "uniqueapp.h"
#include "uniquebackend.h"
#include "uniquemessage.h"
#include "uniqueversion.h"

G_BEGIN_DECLS

struct _UniqueMessageData
{
  guchar *data;
  gint length;

  GdkScreen *screen;
  gchar *startup_id;
  guint workspace;
};

/* GObject ought to export symbols like these */
#define UNIQUE_PARAM_READABLE   (G_PARAM_READABLE | \
                                 G_PARAM_STATIC_NAME | \
                                 G_PARAM_STATIC_NICK | \
                                 G_PARAM_STATIC_BLURB)
#define UNIQUE_PARAM_READWRITE  (G_PARAM_READABLE | G_PARAM_WRITABLE | \
                                 G_PARAM_STATIC_NAME | \
                                 G_PARAM_STATIC_NICK | \
                                 G_PARAM_STATIC_BLURB)

#define I_(str) (g_intern_static_string ((str)))

/* this method emits the UniqueApp::message-received signal on app; it
 * should be called by the backend on its parent UniqueApp instance.
 */
UniqueResponse unique_app_emit_message_received (UniqueApp         *app,
                                                 gint               command_id,
                                                 UniqueMessageData *message,
                                                 guint              time_);

/* transform a command or a response id to something more readable,
 * and then back into an id
 */
UniqueResponse        unique_response_from_string  (const gchar    *response);
const gchar *         unique_response_to_string    (UniqueResponse  response);

gint                  unique_command_from_string   (UniqueApp      *app,
                                                    const gchar    *command);
const gchar *         unique_command_to_string     (UniqueApp      *app,
                                                    gint            command);

G_END_DECLS

#endif /* __UNIQUE_INTERNALS_H__ */