]> Dogcows Code - chaz/openbox/blob - wrap/ob.i
remove some include/import we dont need.
[chaz/openbox] / wrap / ob.i
1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
2
3 %module ob
4
5 %{
6 #include <X11/Xlib.h>
7 #include "otk/display.hh"
8 void send_client_msg(Window target, Atom type, Window about,
9 long data=0, long data1=0, long data2=0,
10 long data3=0, long data4=0)
11 {
12 XEvent e;
13 e.xclient.type = ClientMessage;
14 e.xclient.format = 32;
15 e.xclient.message_type = type;
16 e.xclient.window = about;
17 e.xclient.data.l[0] = data;
18 e.xclient.data.l[1] = data1;
19 e.xclient.data.l[2] = data2;
20 e.xclient.data.l[3] = data3;
21 e.xclient.data.l[4] = data4;
22
23 XSendEvent(**otk::display, target, false,
24 SubstructureRedirectMask | SubstructureNotifyMask,
25 &e);
26 }
27
28 %}
29
30 %include "ob_openbox.i"
31 %include "ob_screen.i"
32 %include "ob_client.i"
33 %include "ob_frame.i"
34 %include "ob_python.i"
35 %include "callback.i"
36
37 // for Window etc
38 %import "X11/X.h"
39
40 %inline %{
41 #include <string>
42 #include "bindings.hh"
43 #include "otk/display.hh"
44 #include "otk/screeninfo.hh"
45
46 void set_reset_key(const std::string &key)
47 {
48 ob::openbox->bindings()->setResetKey(key);
49 }
50
51 void execute(const std::string &bin, int screen=0)
52 {
53 if (screen >= ScreenCount(**otk::display))
54 screen = 0;
55 otk::bexec(bin, otk::display->screenInfo(screen)->displayString());
56 }
57
58 %};
59
60 // globals
61 %pythoncode %{
62 openbox = cvar.openbox;
63 %}
This page took 0.035605 seconds and 4 git commands to generate.