]> Dogcows Code - chaz/openbox/blob - wrap/ob.i
add the client_set_focused function.
[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 "ob_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 #include "otk/util.hh"
46
47 void set_reset_key(const std::string &key)
48 {
49 ob::openbox->bindings()->setResetKey(key);
50 }
51
52 void execute(const std::string &bin, int screen=0)
53 {
54 if (screen >= ScreenCount(**otk::display))
55 screen = 0;
56 otk::bexec(bin, otk::display->screenInfo(screen)->displayString());
57 }
58
59 %};
60
61 // globals
62 %pythoncode %{
63 openbox = cvar.openbox;
64 %}
This page took 0.042351 seconds and 4 git commands to generate.