summaryrefslogtreecommitdiff
path: root/engines/engineinterface.h
blob: 2a364e22558e1609e68edd9716bf1279297a2377 (plain)
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
#ifndef __engineinterface_h
#define __engineinterface_h

#include "../kernel/frame.h"
#include <glib.h>

/* startup */
typedef gboolean EngineStartup();

/* shutdown */
typedef void EngineShutdown();

/* frame_new */
typedef Frame *EngineFrameNew();

/* frame_grab_client */
typedef void EngineFrameGrabClient(Frame *self, Client *client);
/* frame_release_client */
typedef void EngineFrameReleaseClient(Frame *self, Client *client);

/* frame_adjust_size */
/*! Update the frame's size to match the client */
typedef void EngineFrameAdjustSize(Frame *self);
/* frame_adjust_position */
/*! Update the frame's position to match the client */
typedef void EngineFrameAdjustPosition(Frame *self);
/* frame_adjust_shape */
/*! Shape the frame window to the client window */
typedef void EngineFrameAdjustShape(Frame *self);
/* frame_adjust_state */
/*! Update the frame to match the client's new state (for things like toggle
  buttons, focus, and the title) XXX break this up */
typedef void EngineFrameAdjustState(Frame *self);
/* frame_adjust_focus */
/*! Update the frame to match the client's focused state */
typedef void EngineFrameAdjustFocus(Frame *self);
/* frame_adjust_title */
/*! Update the frame to display the client's current title */
typedef void EngineFrameAdjustTitle(Frame *self);
/* frame_adjust_icon */
/*! Update the frame to display the client's current icon */
typedef void EngineFrameAdjustIcon(Frame *self);

/* frame_show */
/*! Shows the frame */
typedef void EngineFrameShow(Frame *self);
/*! Hides the frame */
typedef void EngineFrameHide(Frame *self);

/* get_context */
typedef GQuark EngineGetContext(Client *client, Window win);

/* frame_mouse_enter */
typedef void EngineMouseEnter(Frame *self, Window win);
/* frame_mouse_leave */
typedef void EngineMouseLeave(Frame *self, Window win);
/* frame_mouse_press */
typedef void EngineMousePress(Frame *self, Window win, int x, int y);
/* frame_mouse_release */
typedef void EngineMouseRelease(Frame *self, Window win, int x, int y);

#endif