<<
Home , XCB

ooxcb Documentation Release 1.2

samurai-x.org

February 12, 2014

Contents

i ii ooxcb Documentation, Release 1.2

Contents:

Contents 1 ooxcb Documentation, Release 1.2

2 Contents CHAPTER 1

Introduction

1.1 What is ooxcb? ooxcb (the object oriented X binding, yes, the C doesn’t fit here) is a new Python binding to the X server, developed for the samurai-x . xpyb uses a wrapper generator to create python modules out of the XML X protocol descriptions of the xcb project. It aims to provide with an easy-to-use object-oriented interface to the X server.

1.2 Why?

There already is a similar project called xpyb which is able to create an usable Python module for every X extension supported by xcb-proto. However, the most important parts of xpyb are in a C extension, and we wanted samurai-x to be pure-python. So we ported the whole C code of xpyb to Python, just using some functions of the libxcb API invoked by the ctypes module (you can get it here, but beware: it’s a bit unstable). Apart from that, xpyb-generated bindings are very close to the X protocol. For every extension, you have one class that has some methods for each request. On the one hand, xpyb is able to cover all the extensions supported by xcb-proto this way; on the other hand, the binding is not very comfortable to use. Because of that, we decided to write our own binding, based on the xpyb-ctypes code (so, big thanks to xpyb!). The ooxcb wrapper generator uses so-called interface files that describe the desired Python API of a specific extension - so we can create an API that is more comfortable and easy-to-use. However, someone has to write these interface files, and depending on the size and complexity of the extension, that’s a time-intensive job. At the moment, everything of the xproto extension (the core extension) is wrapped, but some parts need testing. The xtest extension is already usable, too. Additionally, ooxcb comes with a simple and powerful event dispatching system (stolen from pyglet) - you don’t have to use it necessarily, but it can make life much easier.

1.3 How does it look?

Here’s a minimal example that displays a white window and exits if a mouse button is pressed: import sys import ooxcb from ooxcb.protocol.xproto import * conn= ooxcb.connect()

3 ooxcb Documentation, Release 1.2

screen= conn.setup.roots[conn.pref_screen] win= Window.create_toplevel_on_screen(conn, screen, back_pixel=screen.white_pixel, event_mask=EventMask.Exposure| EventMask.ButtonPress ) with conn.bunch(): win.configure(width=100) win.map()

@win.event def on_button_press(evt): print ’Button pressed, exiting!’ conn.disconnect() sys.exit() while True: try: conn.wait_for_event().dispatch() except ooxcb.ProtocolException, error: print "Protocol error %s received!"% error.__class__.__name__ break conn.disconnect()

1.4 Is it usable?

As said above, the xproto extension is already wrapped, and ooxcb is relatively stable, so it should be possible to use it (we are already using it for samurai-x). If you stumble upon bugs, please report them on the bug tracker.

4 Chapter 1. Introduction CHAPTER 2

Getting Started

The following tries to be something like a tutorial for ooxcb programming. It requires a bit of knowledge of the X concept, but I tried to keep it simple. Please contact us if you have any suggestions. You can find the final version of this application in your source distribution in examples/gettingstarted.py or online here. Please don’t forget the api documentation! So, let’s start: If you want to use ooxcb in your application, you first have to import it. You also need to import a module that provides with a core protocol implementation. That’s most likely the ooxcb.protocol.xproto module: import sys

import ooxcb from ooxcb.protocol import xproto

The second import registers the xproto module as core module, so that import is necessary. Then, you will want to establish a connection to the X server. That is done using the ooxcb.connect() method: conn= ooxcb.connect()

That connects to the default X display, specified by the DISPLAY environment variable. You could also connect to another display: conn= ooxcb.connect(’:1’)

See the api documentation on ooxcb.connect() for more details. At the end of the script, we do disconnect cleanly: conn.disconnect()

That’s not really required, but recommended. So, after you have established a connection, you will most likely want to get some information about the available screens. You can get the connection setup information by accessing the setup property of the connection: setup= conn.setup # That’s equivalent to setup= conn.get_setup()

There’s exactly no difference between the two calls, the setup information are cached in any case. You can see all attributes of the setup here: ooxcb.Setup (not really documented, however). You can access the screens (there is often only one) by the attribute roots. And there is a pref_screen attribute on the connection that is the preferred screen index:

5 ooxcb Documentation, Release 1.2

screen= conn.setup.roots[conn.pref_screen]

Yay. We have a screen. Now, if we want to create a window on this screen, that looks complicated, but it isn’t (really!). window= xproto.Window.create(conn, screen.root, screen.root_depth, screen.root_visual )

That’s the easiest call possible. It will create a window with the screen’s root window as parent, its root depth as depth and its root visual as visual. Fortunately, there is a shortcut for this boilerplate code: window= xproto.Window.create_toplevel_on_screen(conn, screen)

Woah! So easy! These two calls will create a new (unmapped: invisible) window with the root window as parent: a top-level window. It will be 640x480 pixels huge, have no border and be located at the top left edge of the screen (x=0, y=0). Now ... window.map() print conn.wait_for_event()

Shouldn’t this display a window? Why doesn’t it do? It just does nothing and doesn’t even stop! killall python helps, but ... how to fix it? As Christophe Tronche explains in his “Short Tutorial” (worth reading!), we need to flush after we have done a bunch of requests. They are cached until you check a request or call flush, then all cached requests will be delivered. So, change the lines above to: window.map() conn.flush() print conn.wait_for_event()

As a convenience function, you can also use ooxcb.conn.Connection.bunch() in a with stament. After the execution of the with block, the connection gets flushed. with conn.bunch(): window.map() print conn.wait_for_event()

Of course, that makes more sense if you have more requests at a time. And - the window appears, but with ‘nothing in it’. We actually want to see something, and so we’ll set the background color of the window to plain white. That is done by modifying the window creation line: window= xproto.Window.create_toplevel_on_screen(conn, screen, back_pixel=screen.white_pixel)

And - it has a white background. Awesome! Now, before we can start to draw anything here, we have to talk about events. We are communiating with the X server, and the X server is communicating with us. We send requests, he sends responses. And sometimes, he sends events. It is possible to handle events in an Xlib style here: while 1: evt = conn.wait_for_event() if isinstance(evt, xproto.ExposeEvent): print ’Got an expose event!’ elif ...

6 Chapter 2. Getting Started ooxcb Documentation, Release 1.2

But ooxcb also comes with an event dispatching framework, and it is very convenient to use because you don’t have to figure out who has to handle the event yourself. @window.event def on_expose(evt): print ’Got an expose event for %s!’% repr(window)

while 1: conn.wait_for_event().dispatch()

So, on_expose is called only if window is exposed. To draw in the window at the right time, we will register for the expose event and draw if we receive one. We first have to register for the expose events to receive any. Don’t forget to register for events! We can do that in the window creation line, too: window= xproto.Window.create_toplevel_on_screen(conn, screen, back_pixel=screen.white_pixel, event_mask=xproto.EventMask.Exposure )

Now, let’s listen to expose events. We have a new mainloop now: @window.event def on_expose(evt): " drawing here ..."

# Our mainloop. while 1: conn.wait_for_event().dispatch()

Now, if we want to draw something in the window now, we need a graphics context first. A graphics context is required for drawing anything on a drawable. Fortunately, a window is a drawable, so it is rather easy to start. Put the following in the beginning of the script: gc= xproto.GContext.create(conn, window)

We will draw a line from (0, 0) to (640, 480) now. A diagonal line through the whole window. Put it in on_expose: @window.event def on_expose(evt): gc.poly_line(window, [(0,0), (640, 480)]) conn.flush()

You see, we are giving poly_line a list of tuples of (x, y) here. That’s useful if we want to draw multiple lines at once, e.g. a triangle: gc.poly_line(window, [(10, 10), (600, 400), (10, 400), (10, 10)]) conn.flush()

Also note that we have to pass window to each drawing function again. Don’t forget that. And don’t forget to flush. Well, we have a very cool triangle now. But if we click on the tiny X to close the window, we get a very bad “IOError: I/O error on X server connection.” exception. What can we do to avoid that? Ah, we could close the window gracefully if the user presses a button! That’s easy. Just register for the ButtonPress events ... window= xproto.Window.create_toplevel_on_screen(conn, screen, back_pixel=screen.white_pixel,

7 ooxcb Documentation, Release 1.2

event_mask=xproto.EventMask.Exposure| xproto.EventMask.ButtonPress )

note Multiple events to listen to are joined with the binary or operator |, the pipe. ... and now create an event handler that disconnects and quits if invoked: @window.event def on_button_press(evt): conn.disconnect() sys.exit()

... and you’re done.

8 Chapter 2. Getting Started CHAPTER 3

Concepts

3.1 Checked and unchecked requests

You’ll notice that all requests are wrapped in two methods. Let’s take the ordinary Window class for an exam- ple: There are change_attributes and change_attributes_checked. And, another example, there are get_attributes and get_attributes_unchecked. Interestingly, the change_attributes has an additional method with the _checked suffix, and change_attributes has one with the _unchecked suffix. Why? ooxcb uses the concept of the xcb for error handling, the so-called “error handling plan 7”. But there’s one major difference: If a request fails somehow in ooxcb, you’ll always get an exception. Whether you call normal or _checked, normal or _unchecked methods just changes the detailedness of the exception. In the X world, some requests have replies, and some have none. Both types of requests can fail, e.g. if you passed an invalid value. Requests with replies are checked normally, and requests without replies are not. If you want to do unchecked requests with replies, or checked requests without replies, you have to say that explicitly, and that’s the reason for existence of the _checked and _unchecked methods. “Checking” means something like “seeing if the request was successful” here. Methods that trigger requests without replies have an additional _checked variant, methods that trigger requests with replies have an additional _unchecked variant.

Note: It seems like _unchecked methods aren’t as useful in Python as they are in the C. You’ll most likely never get in a situation where you want to use it. If you can think of one, contact us.

So, let’s say you do a change_attributes call (that’s a request without reply): my_window.change_attributes(...)

and it fails somehow. You won’t notice that immediately, you’ll notice after having flushed (in fact, that’s when the request is sent) and received events. Silly Example: conn.flush() conn.wait_for_event()

And ooxcb won’t be able to tell you what request has caused this error, a typical traceback will look like this: Traceback (most recent call last): File "my_script.py", line 13, in conn.wait_for_event() File ".../ooxcb/conn.py", line 236, in wait_for_event

9 ooxcb Documentation, Release 1.2

ctypes.POINTER(libxcb.xcb_generic_error_t))) File ".../ooxcb/protobj.py", line 154, in set raise exception(conn, inst) ooxcb.protocol.xproto.BadWindow: (, )

Well, that’s not really helpful. We know that an error has occured, we know the kind of error that occured (“BadWin- dow”), but we don’t know which request caused it. To get a more helpful traceback, use _checked in combination with the check method: my_window.change_attributes_checked().check()

No need to flush, check will send this request. You get a nicer traceback then: Traceback (most recent call last): File "my_script.py", line 11, in my_window.change_attributes_checked().check() File ".../ooxcb/cookie.py", line 69, in check Error.set(self.conn, error) File ".../ooxcb/protobj.py", line 154, in set raise exception(conn, inst) ooxcb.protocol.xproto.BadWindow: (, )

Yay, that’s all we need! Also, if you do a request with the _checked method, it won’t be sent until you invoke the check method. Now imagine we send a request with reply that fails somehow, for example the get_attributes request: attributes= my_window.get_attributes().reply()

We already get a nice traceback, because requests with replies default to be checked: Traceback (most recent call last): File "my_script.py", line 11, in attributes = my_window.get_attributes().reply() File ".../ooxcb/cookie.py", line 84, in reply Error.set(self.conn, error) File ".../ooxcb/protobj.py", line 154, in set raise exception(conn, inst) ooxcb.protocol.xproto.BadWindow: (, )

Keep in mind that the request is not sent here either until you call reply. Now, imagine the very unlikely, but possible case that you don’t want to check the reply: attributes= my_window.get_attributes_unchecked()

With this variant, the request is sent when you flush the next time (or you call reply), and if it fails, you’ll just get an exception once you have received events. If you try to get a reply from a failed request, you get a very sparse error message: Traceback (most recent call last): File "my_script.py", line 11, in my_window.get_attributes_unchecked().reply() File ".../ooxcb/ooxcb/cookie.py", line 86, in reply raise IOError("I/O error on X server connection.") IOError: I/O error on X server connection.

Getting a reply from a successful request works as expected.

10 Chapter 3. Concepts ooxcb Documentation, Release 1.2

3.2 The ‘oo’ of ‘ooxcb’

... stands for object oriented. Yes, ooxcb tries to be as object oriented as possible, like Python. The X world often is object oriented. There are some server-side things that are identified by an X ID: let’s call them resources. Examples for resources are Windows, GCs, Drawables or Fonts. In contrast to xpyb, ooxcb creates wrapper classes for them, and it also tries to adopt the X server’s kind of object type inheritance: A Window is a subclass of Drawable. GC is a subclass of Fontable, same for Font. And they have got real Python methods. In most cases, it is easy to figure out what the ‘subject’ of a request is (e.g. ConfigureWindow should map to a configure method on Window objects). Sometimes it isn’t, but we try to use the best solution. You can always get the X id of a resource by calling its get_internal method, or, more obvious, by accessing its xid attribute.

3.3 The Cache

If the X IDs of two objects are equal, they are representing identical objects. And it is not nice to have two objects for the same X resource in Python. So we need a cache, and ooxcb has one! However, it is a very simple cache. Assuming that two different objects will not have the same X id if they are not identical, regardless if they have the same ‘type’, it is possible to use an X id -> Python object dictionary as a cache. In the samurai-x2 ctypes pyxcb binding, we had an implicit cache: # Note: That is NOT working in ooxcb! a= Window(conn, 123) b= Window(conn, 123) a is b # -> True

(that was done using some metaclass magic) However, as we all know, explicit is better than implicit, and because of that, the above code snippet will not produce identical objects a and b in ooxcb. You will have to manually invoke the cache: # if there is no object managing the X id 123, instantiate Window and return. a= conn.get_from_cache_fallback(123, Window) # so, there is one now, so return it from the cache. b= conn.get_from_cache_fallback(123, Window) a is b # -> True

That’s a bit more verbose, but explicit. The connection uses a weak value dictionary as cache, so you don’t have to explictly remove items from the cache. If you want to do anyway, try this: # will raise a KeyError if there is no object managing the X id 123. conn.remove_from_cache(123) # that one won’t. conn.remove_from_cache_safe(123)

3.4 Mixins

So, ooxcb is object-oriented. The module of the core protocol, ooxcb.protocol.xproto, defines some classes, and each class has some methods. All fine.

3.2. The ‘oo’ of ‘ooxcb’ 11 ooxcb Documentation, Release 1.2

But what if you want to load and use an extension module now? Let’s say you want to use the xtest extension. It defines one method whose subject is a window: compare_cursor. It would be consistent to have that method as a member of the ordinary Window class, so that we don’t have to write calls like ooxcb.protocol.xtest.window_compare_cursor(my_window, my_cursor) - my_window.compare_cursor(my_cursor) is much clearer and consistent. So, ooxcb uses mixins for extensions. However, not everyone likes mixins, so they’re optional - if you want an extension to mix its additional methods into the core classes, you have to say that explicitly by calling its mixin function. Let’s take the xtest example. If you want to call the compare_cursor method on a window object (let’s call it my_window) with the argument my_cursor, you can do it that way using mixins: import ooxcb.protocol.xtest # The following method makes xtest mix all additional methods into the base classes. ooxcb.protocol.xtest.mixin() # Now we can call them, just as they were regular methods. my_window.compare_cursor(my_cursor)

If you don’t like mixins, you can achieve the same without them: import ooxcb.protocol.xtest # We don’t call .mixin() here. # Now, just call the method with the subject (‘self‘) as the first argument. ooxcb.protocol.xtest.WindowMixin.compare_cursor(my_window, my_cursor) # A bit verbose. Keep in mind that you can of course use # imports to get rid of the namespaces - like ‘from ooxcb.protocol import xtest‘.

You see, the class that defines compare_cursor inside the xtest module is named WindowMixin - it’s just the name of the target class plus ‘Mixin’.

Note: Don’t try to instantiate WindowMixin or any other mixin class. It won’t work.

This concept of mixins doesn’t only apply to protocol extensions, but also to some of the modules inside ooxcb.contrib (e.g. ooxcb.contrib.ewmh). However, these don’t necessarily use the concept of classes whose methods are mixed into other classes; it is also possible that they just add a defined set of functions as methods to a class. For more information, just check out the corresponding module documentation.

3.4.1 Using it in your code ooxcb provides two kinds of mixins.

Mixin Functions

Let’s say you have this function: def say_hello(window, greet): print "%s! My XID is: %!"% (greet, window.get_internal())

Of course you’re already able to call say_hello(my_window, "Hello World"). But say you want to be able to call it using my_window.say_hello("Hello World"), you have to use ooxcb’s mixin functions capabili- ties: from ooxcb.protocol.xproto import Window from ooxcb.util import mixin_functions

12 Chapter 3. Concepts ooxcb Documentation, Release 1.2

mixin_functions([say_hello], Window)

The first argument of mixin_functions is an iterable containing functions that should mixed into the class passed in the second argument. The mixin code should reside within a function called mixin within your module to allow the user to use it with or without mixins.

Mixin classes

If you have some more functions, it might be more convenient to use a mixin class instead of ordinary functions: from ooxcb.protocol.xproto import Window from ooxcb.util import Mixin

class WindowMixin(Mixin): target_class= Window

def say_hello(self, greet): print "%s! My XID is: %d!"% (greet, self.get_internal())

Note: It’s not required that mixin classes should be named like this (Original class + ‘Mixin’), but it’s a convention.

If you now want to add all methods you have defined to the target class you have specified in the class attribute target_class, you can use the mixin class method: WindowMixin.mixin()

Now you can use the methods of WindowMixin as they were regular methods of ooxcb.protocol.xproto.Window: my_window.say_hello("Hello World")

But you can also use the methods the mixin class defines this way: WindowMixin.say_hello(my_window,"Hello World")

3.4. Mixins 13 ooxcb Documentation, Release 1.2

14 Chapter 3. Concepts CHAPTER 4

How to ...

4.1 ... get the title of the current window

There are several properties that can contain the title of the current window. First, there is _NET_WM_VISIBLE_NAME (UTF-8 encoded). If that property does not exist, there is _NET_WM_NAME (UTF-8). If that property does not exist, there is WM_NAME (latin-1). If that property does not exist, there is no title set. For your convenience, there is the ewmh_get_window_title method in the ooxcb.contrib.ewmh mixin module (see Mixins).

4.2 ... integrate it with your favourite gui toolkit

4.2.1

That’s the minimal skeleton to integrate ooxcb into the gobject mainloop: import sys sys.path.append(’..’) import ooxcb from ooxcb import xproto import import gobject def ooxcb_callback(source, cb_condition, connection): while connection.alive: # ‘if connection.conn:‘ for ooxcb 1.0 break evt = connection.poll_for_event() if evt is None: break evt.dispatch() # return True so that the callback will be called again. return True conn = ooxcb.connect() # That’s the important line. It makes gobject call ‘ooxcb_callback‘ # when data is available. gobject.io_add_watch( conn.get_file_descriptor(),

15 ooxcb Documentation, Release 1.2

gobject.IO_IN, ooxcb_callback, conn) gtk.main()

16 Chapter 4. How to ... CHAPTER 5

ooxcb api documentation

5.1 Additional modules ooxcb is shipped with some additional modules that can be useful. If you have written an useful module, too, let us know ;)

5.1.1 ooxcb.contrib.

This module is a ctypes wrapper of the cairo library and its xcb backend, with some modifications that make it possible to use it with ooxcb. The API is the same as the original C api, so you can use the cairo api documentation. See examples/cairo.py for a little example how to use that module.

5.1.2 ooxcb.contrib.cursors class ooxcb.contrib.cursors.Cursors(connection) A dictionary holding some Cursor instances, generated from the ‘cursor’ font. Currently it has the following items (each cursor listed with its corresponding cursor on http://tronche.com/gui/x/xlib/appendix/b/): ‘Normal’ XC_left_ptr ‘Resize’ XC_sizing ‘ResizeH’ XC_sb_h_double_arrow ‘ResizeV’ XC_sb_v_double_arrow ‘Move’ XC_fleur ‘TopRight’ XC_top_right_corner ‘TopLeft’ XC_top_left_corner ‘BotRight’ XC_bottom_right_corner ‘BotLeft’ XC_bottom_left_corner Example:

17 ooxcb Documentation, Release 1.2

cursors= Cursors(my_connection) print cursors[’Resize’]

5.1.3 ooxcb.contrib.ewmh

This module contains some helper functions and methods dealing with the ewmh standard. They can also mixed into their corresponding classes. ooxcb.contrib.ewmh.ewmh_get_client_list(screen) return a list of ooxcb.protocol.xproto.Window instances, or None if the _NET_CLIENT_LIST prop- erty is not set. ooxcb.contrib.ewmh.ewmh_get_client_list_stacking(screen) return a list of ooxcb.protocol.xproto.Window instances, or None if the _NET_CLIENT_LIST_STACKING property is not set. ooxcb.contrib.ewmh.ewmh_get_current_desktop(screen) return the current desktop index (starting at 0), or None if the _NET_CURRENT_DESKTOP property is not set. ooxcb.contrib.ewmh.ewmh_get_desktop(window) return the desktop of the window or None if the _NET_WM_DESKTOP property is not set. 0xffffffff is returned if the window wants to be visible on all desktops (according to the ewmh spec) ooxcb.contrib.ewmh.ewmh_get_number_of_desktops(screen) return the number of desktops, or None if the property _NET_NUMBER_OF_DESKTOPS is not set. ooxcb.contrib.ewmh.ewmh_get_window_name(window) returns the window title you should use. Since it respects the icccm and the ewmh standard, it will use: •_NET_WM_VISIBLE_NAME if available. if not, •_NET_WM_NAME if available. if not, •WM_NAME If WM_NAME is not available, it will return an empty string.

Note: WM_NAME’s encoding is latin-1, _NET_WM_NAME and _NET_WM_VISIBLE_NAME are utf-8- encoded.

ooxcb.contrib.ewmh.mixin() mix em all

5.1.4 ooxcb.contrib.icccm

This module contains some helper functions for the icccm standard. class ooxcb.contrib.icccm.WMHints(flags, input, initial_state, icon_pixmap, icon_window, icon_x, icon_y, icon_mask) a container class for the WM_HINTS property. flags a mask of the WMHintsFlags values input The client’s input model (True/False)

18 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

initial_state The state when first mapped icon_pixmap The pixmap for the icon image icon_window The window for the icon image icon_x X coordinate of the icon location icon_y Y coordinate of the icon location icon_mask The mask for the icon shape class ooxcb.contrib.icccm.WMState(state, icon) container class for the WM_STATE property. state one member of ooxcb.xproto.WMState icon The icon window, either a ooxcb.xproto.Window instance or None. ooxcb.contrib.icccm.icccm_get_wm_hints(window) return a WMHints instance or None if there is no WM_HINTS property or the value is invalid. ooxcb.contrib.icccm.icccm_get_wm_state(window) return a WMState instance or None if there is no WM_STATE property.

5.1.5 ooxcb.contrib.

5.1.6 ooxcb.contrib.pil

This module contains functions for putting and getting images as PIL Image instances. ooxcb.contrib.pil.get_pil_image(drawable, x=0, y=0, width=None, height=None) get an image of drawable as a PIL Image instance. Parameters x: int x offset y: int y offset width: int or None set to drawable’s width if None height: int or None set to drawable’s height if None ooxcb.contrib.pil.mixin() add put_pil_image() and get_pil_image() as methods to ooxcb.xproto.Window. ooxcb.contrib.pil.put_pil_image(gc, drawable, image, dst_x=0, dst_y=0) display the PIL image instance image on the drawable drawable using the graphics context gc, at x = dst_x and y = dst_y. You have to take care that the depths of the drawable and the window match. No connection flushing is done. Todo use image’s depth

5.1. Additional modules 19 ooxcb Documentation, Release 1.2

5.1.7 ooxcb.contrib.sizehints class ooxcb.contrib.sizehints.SizeHints(**kwargs) SizeHints is a convenience class for parsing the WM_NORMAL_HINTS property (as defined in the icccm) properties The tuple of allowed property values. (’flags’,’x’,’y’,’width’,’height’,’min_width’, ’min_height’,’max_width’,’max_height’,’width_inc’, ’height_inc’,’min_aspect_num’,’min_aspect_den’, ’max_aspect_num’,’max_aspect_den’,’base_width’, ’base_height’,’win_gravity’)

compute(geom) compute geom in-place. If self is not valid, nothing is changed. classmethod from_values(values) create a SizeHints instance from a list of integers, e.g. from a GetPropertyReply

5.2 ooxcb.protocol

5.2.1 ooxcb.protocol.bigreq class ooxcb.protocol.bigreq.EnableReply

__init__(self, conn) maximum_request_length class ooxcb.protocol.bigreq.bigreqExtension

header enable(self ) enable_unchecked(self ) class ooxcb.protocol.bigreq.EnableCookie

5.2.2 ooxcb.protocol. class ooxcb.protocol.composite.Redirect

Automatic Manual class ooxcb.protocol.composite.GetOverlayWindowReply

__init__(self, conn) overlay_win class ooxcb.protocol.composite.WindowMixin

20 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

target_class redirect_checked(self, update=Redirect.Automatic) redirect(self, update=Redirect.Automatic) redirect_subwindows_checked(self, update=Redirect.Automatic) redirect_subwindows(self, update=Redirect.Automatic) unredirect_checked(self, update=Redirect.Automatic) unredirect(self, update=Redirect.Automatic) unredirect_subwindows_checked(self, update=Redirect.Automatic) unredirect_subwindows(self, update=Redirect.Automatic) name_pixmap_checked(self, pixmap) name_pixmap(self, pixmap) get_overlay_window(self ) get_overlay_window_unchecked(self ) release_overlay_window_checked(self ) release_overlay_window(self ) class ooxcb.protocol.composite.QueryVersionReply

__init__(self, conn) major_version minor_version class ooxcb.protocol.composite.QueryVersionCookie class ooxcb.protocol.composite.GetOverlayWindowCookie class ooxcb.protocol.composite.RegionMixin

target_class classmethod create_from_border_clip(cls, conn, window) class ooxcb.protocol.composite.compositeExtension

header query_version(self, client_major_version, client_minor_version) query_version_unchecked(self, client_major_version, client_minor_version) create_region_from_border_clip_checked(self, region, window) create_region_from_border_clip(self, region, window)

5.2.3 ooxcb.protocol.damage class ooxcb.protocol.damage.ReportLevel

5.2. ooxcb.protocol 21 ooxcb Documentation, Release 1.2

RawRectangles DeltaRectangles BoundingBox NonEmpty class ooxcb.protocol.damage.damageExtension

header query_version(self, client_major_version, client_minor_version) query_version_unchecked(self, client_major_version, client_minor_version) create_checked(self, damage, drawable, level) create(self, damage, drawable, level) class ooxcb.protocol.damage.DrawableMixin

target_class damage_add_checked(self, region) damage_add(self, region) class ooxcb.protocol.damage.DamageNotifyEvent

event_name opcode event_target_class __init__(self, conn) area geometry timestamp level damage response_type drawable class ooxcb.protocol.damage.Damage

__init__(self, conn, xid) destroy_checked(self ) destroy(self ) subtract_checked(self, repair, parts) subtract(self, repair, parts) classmethod create(cls, conn, drawable, level)

22 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

class ooxcb.protocol.damage.BadDamage class ooxcb.protocol.damage.QueryVersionCookie class ooxcb.protocol.damage.DamageError

__init__(self, conn) class ooxcb.protocol.damage.QueryVersionReply

__init__(self, conn) major_version minor_version

5.2.4 ooxcb.protocol.record class ooxcb.protocol.record.Category

FromServer FromClient ClientStarted ClientDied StartOfData EndOfData class ooxcb.protocol.record.recordExtension

header query_version(self, major_version, minor_version) query_version_unchecked(self, major_version, minor_version) create_context_checked(self, context, element_header, client_specs, ranges) create_context(self, context, element_header, client_specs, ranges) class ooxcb.protocol.record.ElementHeader

__init__(self, conn, xid) class ooxcb.protocol.record.ClientInfo

__init__(self, conn) ranges num_ranges client_resource class ooxcb.protocol.record.BadContext

5.2. ooxcb.protocol 23 ooxcb Documentation, Release 1.2

class ooxcb.protocol.record.ContextError

__init__(self, conn) invalid_record class ooxcb.protocol.record.EnableContextCookie class ooxcb.protocol.record.QueryVersionCookie class ooxcb.protocol.record.GetContextCookie class ooxcb.protocol.record.GetContextReply

__init__(self, conn) enabled num_intercepted_clients element_header intercepted_clients class ooxcb.protocol.record.Range16

__init__(self, conn) classmethod create(cls, conn, first, last) last first class ooxcb.protocol.record.ExtRange

__init__(self, conn) classmethod create(cls, conn, major_first, major_last, minor_first, minor_last) major minor class ooxcb.protocol.record.Range

__init__(self, conn) classmethod create(cls, conn, core_requests, core_replies, ext_requests, ext_replies, delivered_events, device_events, errors, client_started, client_died) client_started ext_requests device_events core_replies core_requests client_died errors

24 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

ext_replies delivered_events class ooxcb.protocol.record.HType

FromServerTime FromClientTime FromClientSequence class ooxcb.protocol.record.Context

__init__(self, conn, xid) register_clients_checked(self, element_header, client_specs, ranges) register_clients(self, element_header, client_specs, ranges) unregister_clients_checked(self, client_specs) unregister_clients(self, client_specs) get(self ) get_unchecked(self ) enable(self ) enable_unchecked(self ) disable_checked(self ) disable(self ) free_checked(self ) free(self ) classmethod create(cls, conn, element_header, client_specs, ranges) class ooxcb.protocol.record.Clientspec

__init__(self, conn, xid) class ooxcb.protocol.record.CS

CurrentClients FutureClients AllClients class ooxcb.protocol.record.Range8

__init__(self, conn) classmethod create(cls, conn, first, last) last first

5.2. ooxcb.protocol 25 ooxcb Documentation, Release 1.2

class ooxcb.protocol.record.EnableContextReply

__init__(self, conn) category server_time xid_base client_swapped element_header rec_sequence_num data class ooxcb.protocol.record.QueryVersionReply

__init__(self, conn) major_version minor_version

5.2.5 ooxcb.protocol.render

class ooxcb.protocol.render.BadGlyph class ooxcb.protocol.render.PictFormatError

__init__(self, conn) class ooxcb.protocol.render.Directformat

__init__(self, conn) alpha_shift blue_shift red_shift blue_mask alpha_mask green_mask red_mask green_shift class ooxcb.protocol.render.ScreenMixin

target_class get_render_pictformat(self ) class ooxcb.protocol.render.GlyphSetError

26 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

__init__(self, conn) class ooxcb.protocol.render.BadPicture class ooxcb.protocol.render.QueryVersionCookie class ooxcb.protocol.render.Pictdepth

__init__(self, conn) visuals num_visuals depth class ooxcb.protocol.render.PictureError

__init__(self, conn) class ooxcb.protocol.render.Picture

__init__(self, conn, xid) change_checked(self, **values) change(self, **values) set_clip_rectangles_checked(self, clip_x_origin, clip_y_origin, rectangles) set_clip_rectangles(self, clip_x_origin, clip_y_origin, rectangles) free_checked(self ) free(self ) composite_checked(self, op, mask, dst, width, height, src_x=0, src_y=0, mask_x=0, mask_y=0, dst_x=0, dst_y=0) composite(self, op, mask, dst, width, height, src_x=0, src_y=0, mask_x=0, mask_y=0, dst_x=0, dst_y=0) trapezoids_checked(self, op, dst, traps, mask_format=None, src_x=0, src_y=0) trapezoids(self, op, dst, traps, mask_format=None, src_x=0, src_y=0) triangles_checked(self, op, dst, triangles, mask_format=None, src_x=0, src_y=0) triangles(self, op, dst, triangles, mask_format=None, src_x=0, src_y=0) tri_strip_checked(self, op, dst, points, mask_format=None, src_x=0, src_y=0) tri_strip(self, op, dst, points, mask_format=None, src_x=0, src_y=0) tri_fan_checked(self, op, dst, points, mask_format=None, src_x=0, src_y=0) tri_fan(self, op, dst, points, mask_format=None, src_x=0, src_y=0) composite_glyphs8_checked(self, op, dst, glyphset, glyphcmds, mask_format=None, src_x=0, src_y=0) composite_glyphs8(self, op, dst, glyphset, glyphcmds, mask_format=None, src_x=0, src_y=0) composite_glyphs16_checked(self, op, dst, glyphset, glyphcmds, mask_format=None, src_x=0, src_y=0) composite_glyphs16(self, op, dst, glyphset, glyphcmds, mask_format=None, src_x=0, src_y=0)

5.2. ooxcb.protocol 27 ooxcb Documentation, Release 1.2

composite_glyphs32_checked(self, op, dst, glyphset, glyphcmds, mask_format=None, src_x=0, src_y=0) composite_glyphs32(self, op, dst, glyphset, glyphcmds, mask_format=None, src_x=0, src_y=0) fill_rectangles_checked(self, op, color, rects) fill_rectangles(self, op, color, rects) set_transform_checked(self, transform) set_transform(self, transform) set_filter_checked(self, filter, values) set_filter(self, filter, values) add_traps_checked(self, traps, x_off=0, y_off=0) add_traps(self, traps, x_off=0, y_off=0) classmethod create(cls, conn, drawable, format, **values) classmethod create_solid_fill(cls, conn, color) classmethod create_linear_gradient(cls, p1, p2, num_stops, stops, colors) classmethod create_radial_gradient(cls, p1, p2, num_stops, stops, colors) classmethod create_conical_gradient(cls, center, angle, num_stops, stops, colors) class ooxcb.protocol.render.Repeat

_None Normal Pad Reflect class ooxcb.protocol.render.Triangle

__init__(self, conn) p2 p3 p1 class ooxcb.protocol.render.Glyphset

__init__(self, conn, xid) reference_checked(self, existing) reference(self, existing) free_checked(self ) free(self ) add_glyphs_checked(self, glyphids, glyphs, data) add_glyphs(self, glyphids, glyphs, data) free_glyphs_checked(self, glyphs)

28 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

free_glyphs(self, glyphs) class ooxcb.protocol.render.Pictvisual

__init__(self, conn) visual format class ooxcb.protocol.render.Spanfix

__init__(self, conn) y r l class ooxcb.protocol.render.DrawableMixin

target_class query_filters(self ) query_filters_unchecked(self ) class ooxcb.protocol.render.PictOp

Clear Src Dst Over OverReverse In InReverse Out OutReverse Atop AtopReverse Xor Add Saturate DisjointClear DisjointSrc DisjointDst DisjointOver

5.2. ooxcb.protocol 29 ooxcb Documentation, Release 1.2

DisjointOverReverse DisjointIn DisjointInReverse DisjointOut DisjointOutReverse DisjointAtop DisjointAtopReverse DisjointXor ConjointClear ConjointSrc ConjointDst ConjointOver ConjointOverReverse ConjointIn ConjointInReverse ConjointOut ConjointOutReverse ConjointAtop ConjointAtopReverse ConjointXor class ooxcb.protocol.render.Pictscreen

__init__(self, conn) depths fallback num_depths class ooxcb.protocol.render.Animcursorelt

__init__(self, conn) cursor delay class ooxcb.protocol.render.GlyphSet

classmethod create(cls, conn, format) class ooxcb.protocol.render.renderExtension

header

30 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

query_version(self, client_major_version, client_minor_version) query_version_unchecked(self, client_major_version, client_minor_version) query_pict_formats(self ) query_pict_formats_unchecked(self ) create_picture_checked(self, pid, drawable, format, value_mask, value_list) create_picture(self, pid, drawable, format, value_mask, value_list) create_glyph_set_checked(self, gsid, format) create_glyph_set(self, gsid, format) create_cursor_checked(self, cid, source, x, y) create_cursor(self, cid, source, x, y) create_anim_cursor_checked(self, cid, cursors) create_anim_cursor(self, cid, cursors) create_solid_fill_checked(self, picture, color) create_solid_fill(self, picture, color) create_linear_gradient_checked(self, picture, p1, p2, num_stops, stops, colors) create_linear_gradient(self, picture, p1, p2, num_stops, stops, colors) create_radial_gradient_checked(self, picture, inner, outer, inner_radius, outer_radius, num_stops, stops, colors) create_radial_gradient(self, picture, inner, outer, inner_radius, outer_radius, num_stops, stops, colors) create_conical_gradient_checked(self, picture, center, angle, num_stops, stops, colors) create_conical_gradient(self, picture, center, angle, num_stops, stops, colors) class ooxcb.protocol.render.Pictforminfo

__init__(self, conn) colormap depth type id direct class ooxcb.protocol.render.BadGlyphSet class ooxcb.protocol.render.PictType

Indexed Direct class ooxcb.protocol.render.SubPixel

Unknown

5.2. ooxcb.protocol 31 ooxcb Documentation, Release 1.2

HorizontalRGB HorizontalBGR VerticalRGB VerticalBGR _None class ooxcb.protocol.render.Pointfix

__init__(self, conn) y x class ooxcb.protocol.render.BadPictFormat class ooxcb.protocol.render.Indexvalue

__init__(self, conn) blue alpha green pixel red class ooxcb.protocol.render.Cursor

classmethod create(cls, conn, source, x=0, y=0) classmethod create_anim(cls, cursors) class ooxcb.protocol.render.QueryPictIndexValuesReply

__init__(self, conn) num_values values class ooxcb.protocol.render.QueryFiltersReply

__init__(self, conn) aliases filters num_aliases num_filters class ooxcb.protocol.render.Linefix

__init__(self, conn)

32 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

p2 p1 class ooxcb.protocol.render.Trapezoid

__init__(self, conn) top left right bottom class ooxcb.protocol.render.Trap

__init__(self, conn) top bot class ooxcb.protocol.render.CP

Repeat AlphaMap AlphaXOrigin AlphaYOrigin ClipXOrigin ClipYOrigin ClipMask GraphicsExposure SubwindowMode PolyEdge PolyMode Dither ComponentAlpha class ooxcb.protocol.render.QueryPictIndexValuesCookie class ooxcb.protocol.render.QueryVersionReply

__init__(self, conn) major_version minor_version class ooxcb.protocol.render.PictOpError

__init__(self, conn)

5.2. ooxcb.protocol 33 ooxcb Documentation, Release 1.2 class ooxcb.protocol.render.Glyphinfo

__init__(self, conn) x_off height width y x y_off class ooxcb.protocol.render.QueryPictFormatsCookie class ooxcb.protocol.render.PolyEdge

Sharp Smooth class ooxcb.protocol.render.Color

__init__(self, conn) classmethod create(cls, conn, red, green, blue, alpha) blue alpha green red class ooxcb.protocol.render.BadPictOp class ooxcb.protocol.render.GlyphError

__init__(self, conn) class ooxcb.protocol.render.Transform

__init__(self, conn) matrix21 matrix23 matrix22 matrix11 matrix12 matrix13 matrix32 matrix33 matrix31

34 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2 class ooxcb.protocol.render.Pictformat

__init__(self, conn, xid) query_pict_index_values(self ) query_pict_index_values_unchecked(self ) class ooxcb.protocol.render.QueryFiltersCookie class ooxcb.protocol.render.PolyMode

Precise Imprecise class ooxcb.protocol.render.QueryPictFormatsReply

__init__(self, conn) num_formats num_subpixel screens num_screens formats num_visuals num_depths subpixels class ooxcb.protocol.render.Glyph

__init__(self, conn, xid)

5.2.6 ooxcb.protocol.screensaver class ooxcb.protocol.screensaver.Kind

Blanked Internal External class ooxcb.protocol.screensaver.WindowMixin

target_class class ooxcb.protocol.screensaver.QueryVersionReply

__init__(self, conn) server_minor_version

5.2. ooxcb.protocol 35 ooxcb Documentation, Release 1.2

server_major_version class ooxcb.protocol.screensaver.screensaverExtension

header query_version(self, client_major_version, client_minor_version) query_version_unchecked(self, client_major_version, client_minor_version) suspend_checked(self, suspend) suspend(self, suspend) class ooxcb.protocol.screensaver.DrawableMixin

target_class query_info(self ) query_info_unchecked(self ) select_input_checked(self, event_mask) select_input(self, event_mask) set_attributes_checked(self, x, y, width, height, border_width, _class, depth, visual, value_mask, value_list) set_attributes(self, x, y, width, height, border_width, _class, depth, visual, value_mask, value_list) unset_attributes_checked(self ) unset_attributes(self ) class ooxcb.protocol.screensaver.NotifyEvent

event_name opcode event_target_class __init__(self, conn) forced kind code window state response_type time root sequence_number class ooxcb.protocol.screensaver.QueryVersionCookie class ooxcb.protocol.screensaver.State

36 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

Off On Cycle Disabled class ooxcb.protocol.screensaver.QueryInfoCookie class ooxcb.protocol.screensaver.QueryInfoReply

__init__(self, conn) saver_window ms_since_user_input event_mask ms_until_server kind state class ooxcb.protocol.screensaver.CW

BackPixmap BackPixel BorderPixmap BorderPixel BitGravity WinGravity BackingStore BackingPlanes BackingPixel OverrideRedirect SaveUnder EventMask DontPropagate Colormap Cursor class ooxcb.protocol.screensaver.Event

NotifyMask CycleMask

5.2. ooxcb.protocol 37 ooxcb Documentation, Release 1.2

5.2.7 ooxcb.protocol.shape class ooxcb.protocol.shape.shapeExtension

header query_version(self ) query_version_unchecked(self ) class ooxcb.protocol.shape.WindowMixin

target_class shape_rectangles_checked(self, operation, destination_kind, ordering, x_offset, y_offset, rectan- gles) shape_rectangles(self, operation, destination_kind, ordering, x_offset, y_offset, rectangles) shape_mask_checked(self, operation, destination_kind, x_offset, y_offset, source_bitmap) shape_mask(self, operation, destination_kind, x_offset, y_offset, source_bitmap) shape_combine_checked(self, operation, destination_kind, source_kind, x_offset, y_offset, source_window) shape_combine(self, operation, destination_kind, source_kind, x_offset, y_offset, source_window) shape_offset_checked(self, destination_kind, x_offset, y_offset) shape_offset(self, destination_kind, x_offset, y_offset) shape_query_extents(self ) shape_query_extents_unchecked(self ) shape_select_input_checked(self, enable) shape_select_input(self, enable) shape_input_selected(self ) shape_input_selected_unchecked(self ) shape_get_rectangles(self, source_kind) shape_get_rectangles_unchecked(self, source_kind) class ooxcb.protocol.shape.QueryVersionReply

__init__(self, conn) major_version minor_version class ooxcb.protocol.shape.QueryVersionCookie class ooxcb.protocol.shape.NotifyEvent

event_name opcode event_target_class

38 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

__init__(self, conn) server_time shaped extents_y extents_x affected_window extents_height extents_width shape_kind response_type class ooxcb.protocol.shape.GetRectanglesReply

__init__(self, conn) ordering rectangles rectangles_len class ooxcb.protocol.shape.QueryExtentsCookie class ooxcb.protocol.shape.SK

Bounding Clip Input class ooxcb.protocol.shape.SO

Set Union Intersect Subtract Invert class ooxcb.protocol.shape.InputSelectedReply

__init__(self, conn) enabled class ooxcb.protocol.shape.QueryExtentsReply

__init__(self, conn) clip_shape_extents_width bounding_shape_extents_y

5.2. ooxcb.protocol 39 ooxcb Documentation, Release 1.2

bounding_shaped bounding_shape_extents_width bounding_shape_extents_height clip_shape_extents_y clip_shape_extents_x clip_shape_extents_height clip_shaped bounding_shape_extents_x class ooxcb.protocol.shape.GetRectanglesCookie class ooxcb.protocol.shape.InputSelectedCookie

5.2.8 ooxcb.protocol.xfixes class ooxcb.protocol.xfixes.BadRegion class ooxcb.protocol.xfixes.SelectionEventMask

SetSelectionOwner SelectionWindowDestroy SelectionClientClose class ooxcb.protocol.xfixes.SaveSetMode

Insert Delete class ooxcb.protocol.xfixes.CursorNotify

DisplayCursor class ooxcb.protocol.xfixes.CursorNotifyEvent

event_name opcode event_target_class __init__(self, conn) cursor_serial name timestamp subtype window response_type

40 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2 class ooxcb.protocol.xfixes.WindowMixin

target_class change_save_set_checked(self, mode, target, map) change_save_set(self, mode, target, map) select_selection_input_checked(self, selection, event_mask) select_selection_input(self, selection, event_mask) select_cursor_input_checked(self, event_mask) select_cursor_input(self, event_mask) set_shape_region_checked(self, dest_kind, x_offset, y_offset, region) set_shape_region(self, dest_kind, x_offset, y_offset, region) hide_cursor_checked(self ) hide_cursor(self ) show_cursor_checked(self ) show_cursor(self ) class ooxcb.protocol.xfixes.FetchRegionCookie class ooxcb.protocol.xfixes.FetchRegionReply

__init__(self, conn) rectangles extents class ooxcb.protocol.xfixes.RegionError

__init__(self, conn) class ooxcb.protocol.xfixes.SelectionEvent

SetSelectionOwner SelectionWindowDestroy SelectionClientClose class ooxcb.protocol.xfixes.xfixesExtension

header query_version(self, client_major_version, client_minor_version) query_version_unchecked(self, client_major_version, client_minor_version) get_cursor_image(self ) get_cursor_image_unchecked(self ) create_region_checked(self, region, rectangles) create_region(self, region, rectangles)

5.2. ooxcb.protocol 41 ooxcb Documentation, Release 1.2

create_region_from_bitmap_checked(self, region, bitmap) create_region_from_bitmap(self, region, bitmap) create_region_from_window_checked(self, region, window, kind) create_region_from_window(self, region, window, kind) create_region_from_g_c_checked(self, region, gc) create_region_from_g_c(self, region, gc) create_region_from_picture_checked(self, region, picture) create_region_from_picture(self, region, picture) get_cursor_name(self, cursor) get_cursor_name_unchecked(self, cursor) get_cursor_image_and_name(self ) get_cursor_image_and_name_unchecked(self ) class ooxcb.protocol.xfixes.GetCursorNameReply

__init__(self, conn) nbytes name atom class ooxcb.protocol.xfixes.QueryVersionCookie class ooxcb.protocol.xfixes.Region

__init__(self, conn, xid) destroy_checked(self ) destroy(self ) set_checked(self, rectangles) set(self, rectangles) copy_checked(self, destination) copy(self, destination) union_checked(self, source2, destination) union(self, source2, destination) intersect_checked(self, source2, destination) intersect(self, source2, destination) subtract_checked(self, source2, destination) subtract(self, source2, destination) invert_checked(self, bounds, destination) invert(self, bounds, destination) translate_checked(self, dx, dy)

42 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

translate(self, dx, dy) extents_checked(self, destination) extents(self, destination) fetch(self ) fetch_unchecked(self ) expand_checked(self, destination, left, right, top, bottom) expand(self, destination, left, right, top, bottom) classmethod create(cls, conn, rectangles) classmethod create_from_bitmap(cls, conn, bitmap) classmethod create_from_window(cls, conn, window, kind) classmethod create_from_gc(cls, conn, gc) classmethod create_from_picture(cls, conn, picture) class ooxcb.protocol.xfixes.SaveSetMapping

Map Unmap class ooxcb.protocol.xfixes.PictureMixin

target_class set_clip_region_checked(self, region, x_origin, y_origin) set_clip_region(self, region, x_origin, y_origin) class ooxcb.protocol.xfixes.GetCursorImageReply

__init__(self, conn) yhot cursor_serial cursor_image height width y x xhot class ooxcb.protocol.xfixes.SaveSetTarget

Nearest Root class ooxcb.protocol.xfixes.GContextMixin

5.2. ooxcb.protocol 43 ooxcb Documentation, Release 1.2

target_class set_clip_region_checked(self, region, x_origin, y_origin) set_clip_region(self, region, x_origin, y_origin) class ooxcb.protocol.xfixes.QueryVersionReply

__init__(self, conn) major_version minor_version class ooxcb.protocol.xfixes.SelectionNotifyEvent

event_name opcode event_target_class __init__(self, conn) selection timestamp subtype window selection_timestamp response_type owner class ooxcb.protocol.xfixes.GetCursorImageAndNameReply

__init__(self, conn) cursor_atom yhot cursor_serial name cursor_image height width nbytes y x xhot class ooxcb.protocol.xfixes.GetCursorImageCookie class ooxcb.protocol.xfixes.GetCursorNameCookie

44 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2 class ooxcb.protocol.xfixes.GetCursorImageAndNameCookie class ooxcb.protocol.xfixes.CursorNotifyMask

DisplayCursor class ooxcb.protocol.xfixes.CursorMixin

target_class set_name_checked(self, name) set_name(self, name) change_checked(self, destination) change(self, destination) change_by_name_checked(self, name) change_by_name(self, name)

5.2.9 ooxcb.protocol.xproto class ooxcb.protocol.xproto.GetModifierMappingCookie class ooxcb.protocol.xproto.TranslateCoordinatesReply

__init__(self, conn) dst_y dst_x same_screen child class ooxcb.protocol.xproto.PropMode

Replace Prepend Append class ooxcb.protocol.xproto.HostMode

Insert Delete class ooxcb.protocol.xproto.QueryBestSizeCookie class ooxcb.protocol.xproto.GraphicsExposureEvent

event_name opcode event_target_class

5.2. ooxcb.protocol 45 ooxcb Documentation, Release 1.2

__init__(self, conn) count width major_opcode height minor_opcode response_type y x drawable class ooxcb.protocol.xproto.FontDraw

LeftToRight RightToLeft class ooxcb.protocol.xproto.ClientMessageData

__init__(self, conn) class ooxcb.protocol.xproto.QueryExtensionReply

__init__(self, conn) first_event first_error major_opcode present class ooxcb.protocol.xproto.QueryTreeReply

__init__(self, conn) children_len root children parent class ooxcb.protocol.xproto.ListInstalledColormapsReply

__init__(self, conn) cmaps_len cmaps class ooxcb.protocol.xproto.Rgb

46 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

__init__(self, conn) blue green red class ooxcb.protocol.xproto.QueryTreeCookie class ooxcb.protocol.xproto.VisualClass

StaticGray GrayScale StaticColor PseudoColor TrueColor DirectColor class ooxcb.protocol.xproto.GetWindowAttributesReply

__init__(self, conn) your_event_mask override_redirect backing_pixel bit_gravity all_event_masks save_under visual do_not_propagate_mask map_state backing_store win_gravity backing_planes map_is_installed _class colormap class ooxcb.protocol.xproto.AllocColorCookie class ooxcb.protocol.xproto.Exposures

NotAllowed Allowed Default

5.2. ooxcb.protocol 47 ooxcb Documentation, Release 1.2 class ooxcb.protocol.xproto.AllocError

__init__(self, conn) minor_opcode major_opcode bad_value class ooxcb.protocol.xproto.ButtonIndex

Any _1 _2 _3 _4 _5 class ooxcb.protocol.xproto.Colormap

__init__(self, conn, xid) free_checked(self ) free(self ) copy_colormap_and_free_checked(self, mid) copy_colormap_and_free(self, mid) install_checked(self ) install(self ) uninstall_checked(self ) uninstall(self ) alloc_color(self, red, green, blue) alloc_color_unchecked(self, red, green, blue) alloc_named_color(self, name) alloc_named_color_unchecked(self, name) alloc_color_cells(self, contiguous, colors, planes) alloc_color_cells_unchecked(self, contiguous, colors, planes) alloc_color_planes(self, contiguous, colors, reds, greens, blues) alloc_color_planes_unchecked(self, contiguous, colors, reds, greens, blues) free_colors_checked(self, pixels, plane_mask) free_colors(self, pixels, plane_mask) store_colors_checked(self, items) store_colors(self, items)

48 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

store_named_color_checked(self, flags, pixel, name) store_named_color(self, flags, pixel, name) query_colors(self, pixels) query_colors_unchecked(self, pixels) lookup_color(self, name) lookup_color_unchecked(self, name) alloc_hex_color(self, color) classmethod create(cls, window, visual, alloc=0) class ooxcb.protocol.xproto.SetModifierMappingReply

__init__(self, conn) status class ooxcb.protocol.xproto.ConfigWindow

X Y Width Height BorderWidth Sibling StackMode class ooxcb.protocol.xproto.GrabPointerReply

__init__(self, conn) status class ooxcb.protocol.xproto.NameError

__init__(self, conn) minor_opcode major_opcode bad_value class ooxcb.protocol.xproto.BadAtom class ooxcb.protocol.xproto.BadCursor class ooxcb.protocol.xproto.GContextError

__init__(self, conn) minor_opcode major_opcode

5.2. ooxcb.protocol 49 ooxcb Documentation, Release 1.2

bad_value class ooxcb.protocol.xproto.GetPropertyType

Any class ooxcb.protocol.xproto.Coloritem

__init__(self, conn) blue flags green pixel red class ooxcb.protocol.xproto.BadAccess class ooxcb.protocol.xproto.RequestError

__init__(self, conn) minor_opcode major_opcode bad_value class ooxcb.protocol.xproto.Setupauthenticate

__init__(self, conn) status length reason class ooxcb.protocol.xproto.GetScreenSaverReply

__init__(self, conn) interval prefer_blanking timeout allow_exposures class ooxcb.protocol.xproto.LengthError

__init__(self, conn) minor_opcode major_opcode bad_value

50 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2 class ooxcb.protocol.xproto.AccessControl

Disable Enable class ooxcb.protocol.xproto.ListFontsWithInfoCookie class ooxcb.protocol.xproto.Blanking

NotPreferred Preferred Default class ooxcb.protocol.xproto.Fontable

__init__(self, conn, xid) query(self ) query_unchecked(self ) query_text_extents(self, string) query_text_extents_unchecked(self, string) class ooxcb.protocol.xproto.QueryShapeOf

LargestCursor FastestTile FastestStipple class ooxcb.protocol.xproto.ConfigureNotifyEvent

event_name opcode event_target_class __init__(self, conn) override_redirect above_sibling height width window response_type y x border_width event

5.2. ooxcb.protocol 51 ooxcb Documentation, Release 1.2 class ooxcb.protocol.xproto.Setup

__init__(self, conn) status protocol_major_version roots_len bitmap_format_bit_order resource_id_base max_keycode bitmap_format_scanline_pad min_keycode protocol_minor_version release_number vendor length vendor_len bitmap_format_scanline_unit pixmap_formats pixmap_formats_len image_byte_order motion_buffer_size maximum_request_length roots resource_id_mask class ooxcb.protocol.xproto.WindowClass

CopyFromParent InputOutput InputOnly class ooxcb.protocol.xproto.SelectionClearEvent

event_name opcode event_target_class __init__(self, conn) owner selection

52 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

response_type time class ooxcb.protocol.xproto.GX

clear _and andReverse copy andInverted noop xor _or nor equiv invert orReverse copyInverted orInverted nand set class ooxcb.protocol.xproto.Motion

Normal Hint class ooxcb.protocol.xproto.GC

Function PlaneMask Foreground Background LineWidth LineStyle CapStyle JoinStyle FillStyle FillRule Tile

5.2. ooxcb.protocol 53 ooxcb Documentation, Release 1.2

Stipple TileStippleOriginX TileStippleOriginY Font SubwindowMode GraphicsExposures ClipOriginX ClipOriginY ClipMask DashOffset DashList ArcMode class ooxcb.protocol.xproto.GetSelectionOwnerCookie class ooxcb.protocol.xproto.ImplementationError

__init__(self, conn) minor_opcode major_opcode bad_value class ooxcb.protocol.xproto.ListHostsReply

__init__(self, conn) hosts_len hosts mode class ooxcb.protocol.xproto.GetModifierMappingReply

__init__(self, conn) keycodes keycodes_per_modifier class ooxcb.protocol.xproto.GetPointerMappingReply

__init__(self, conn) map_len map class ooxcb.protocol.xproto.DestroyNotifyEvent

event_name

54 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

opcode event_target_class __init__(self, conn) window event response_type class ooxcb.protocol.xproto.QueryKeymapReply

__init__(self, conn) keys class ooxcb.protocol.xproto.AllocColorReply

__init__(self, conn) blue green pixel red class ooxcb.protocol.xproto.BadName class ooxcb.protocol.xproto.ListInstalledColormapsCookie class ooxcb.protocol.xproto.GetScreenSaverCookie class ooxcb.protocol.xproto.Arc

__init__(self, conn) classmethod create(cls, conn, x, y, width, height, angle1, angle2) height width angle1 angle2 y x class ooxcb.protocol.xproto.Kill

AllTemporary class ooxcb.protocol.xproto.QueryFontCookie class ooxcb.protocol.xproto.Font

__init__(self, conn, xid) close_checked(self )

5.2. ooxcb.protocol 55 ooxcb Documentation, Release 1.2

close(self ) classmethod open(cls, conn, name) class ooxcb.protocol.xproto.QueryKeymapCookie class ooxcb.protocol.xproto.ExposeEvent

event_name opcode event_target_class __init__(self, conn) count height width window response_type y x class ooxcb.protocol.xproto.GravityNotifyEvent

event_name opcode event_target_class __init__(self, conn) y x window event response_type class ooxcb.protocol.xproto.GrabKeyboardReply

__init__(self, conn) status class ooxcb.protocol.xproto.ListPropertiesReply

__init__(self, conn) atoms atoms_len class ooxcb.protocol.xproto.ListExtensionsReply

56 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

__init__(self, conn) names_len names class ooxcb.protocol.xproto.CapStyle

NotLast Butt Round Projecting class ooxcb.protocol.xproto.AllocNamedColorCookie class ooxcb.protocol.xproto.MatchError

__init__(self, conn) minor_opcode major_opcode bad_value class ooxcb.protocol.xproto.UnmapNotifyEvent

event_name opcode event_target_class __init__(self, conn) window response_type event from_configure class ooxcb.protocol.xproto.Setupfailed

__init__(self, conn) status protocol_major_version length protocol_minor_version reason reason_len class ooxcb.protocol.xproto.IDChoiceError

__init__(self, conn)

5.2. ooxcb.protocol 57 ooxcb Documentation, Release 1.2

minor_opcode major_opcode bad_value class ooxcb.protocol.xproto.AllocColorCellsReply

__init__(self, conn) pixels_len masks_len pixels masks class ooxcb.protocol.xproto.ConfigureRequestEvent

event_name opcode event_target_class __init__(self, conn) parent width stack_mode height sibling window response_type y x border_width value_mask class ooxcb.protocol.xproto.BadImplementation class ooxcb.protocol.xproto.TranslateCoordinatesCookie class ooxcb.protocol.xproto.BadRequest class ooxcb.protocol.xproto.FillRule

EvenOdd Winding class ooxcb.protocol.xproto.GrabMode

Sync

58 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

Async class ooxcb.protocol.xproto.GetKeyboardControlCookie class ooxcb.protocol.xproto.WMState

Withdrawn Normal Iconic class ooxcb.protocol.xproto.ColormapAlloc

_None All class ooxcb.protocol.xproto.FontError

__init__(self, conn) minor_opcode major_opcode bad_value class ooxcb.protocol.xproto.ModMask

Shift Lock Control _1 _2 _3 _4 _5 Any class ooxcb.protocol.xproto.Setuprequest

__init__(self, conn) byte_order authorization_protocol_name protocol_minor_version authorization_protocol_data authorization_protocol_data_len protocol_major_version authorization_protocol_name_len

5.2. ooxcb.protocol 59 ooxcb Documentation, Release 1.2 class ooxcb.protocol.xproto.Visibility

Unobscured PartiallyObscured FullyObscured class ooxcb.protocol.xproto.FillStyle

Solid Tiled Stippled OpaqueStippled class ooxcb.protocol.xproto.LedMode

Off On class ooxcb.protocol.xproto.KeymapNotifyEvent

event_name opcode event_target_class __init__(self, conn) keys response_type class ooxcb.protocol.xproto.BadIDChoice class ooxcb.protocol.xproto.GetKeyboardMappingCookie class ooxcb.protocol.xproto.SubwindowMode

ClipByChildren IncludeInferiors class ooxcb.protocol.xproto.Circulate

RaiseLowest LowerHighest class ooxcb.protocol.xproto.AutoRepeatMode

Off On Default

60 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2 class ooxcb.protocol.xproto.BackingStore

NotUseful WhenMapped Always class ooxcb.protocol.xproto.StackMode

Above Below TopIf BottomIf Opposite class ooxcb.protocol.xproto.AllocColorPlanesCookie class ooxcb.protocol.xproto.BadMatch class ooxcb.protocol.xproto.Visualtype

__init__(self, conn) colormap_entries visual_id blue_mask green_mask red_mask _class bits_per_rgb_value class ooxcb.protocol.xproto.ArcMode

Chord PieSlice class ooxcb.protocol.xproto.BackPixmap

_None ParentRelative class ooxcb.protocol.xproto.BadFont class ooxcb.protocol.xproto.Cursor

__init__(self, conn, xid) free_checked(self ) free(self )

5.2. ooxcb.protocol 61 ooxcb Documentation, Release 1.2

recolor_checked(self, fore_red, fore_green, fore_blue, back_red, back_green, back_blue) recolor(self, fore_red, fore_green, fore_blue, back_red, back_green, back_blue) classmethod create(cls, conn, source, mask, fore_red, fore_green, fore_blue, back_red, back_green, back_blue, x, y) classmethod create_glyph(cls, conn, source_font, mask_font, source_char, mask_char, fore_red, fore_green, fore_blue, back_red, back_green, back_blue) class ooxcb.protocol.xproto.Place

OnTop OnBottom class ooxcb.protocol.xproto.GrabPointerCookie class ooxcb.protocol.xproto.BadValue class ooxcb.protocol.xproto.GetInputFocusCookie class ooxcb.protocol.xproto.Grab

Any class ooxcb.protocol.xproto.Property

NewValue Delete class ooxcb.protocol.xproto.DrawableError

__init__(self, conn) minor_opcode major_opcode bad_value class ooxcb.protocol.xproto.AllocColorCellsCookie class ooxcb.protocol.xproto.MappingStatus

Success Busy Failure class ooxcb.protocol.xproto.SetPointerMappingCookie class ooxcb.protocol.xproto.Point

__init__(self, conn) y x

62 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2 class ooxcb.protocol.xproto.KeyButMask

Shift Lock Control Mod1 Mod2 Mod3 Mod4 Mod5 Button1 Button2 Button3 Button4 Button5 class ooxcb.protocol.xproto.BadColormap class ooxcb.protocol.xproto.NoExposureEvent

event_name opcode event_target_class __init__(self, conn) minor_opcode drawable major_opcode response_type class ooxcb.protocol.xproto.BadPixmap class ooxcb.protocol.xproto.ColormapState

Uninstalled Installed class ooxcb.protocol.xproto.ListPropertiesCookie class ooxcb.protocol.xproto.ColorFlag

Red Green Blue

5.2. ooxcb.protocol 63 ooxcb Documentation, Release 1.2 class ooxcb.protocol.xproto.BadGContext class ooxcb.protocol.xproto.GetGeometryCookie class ooxcb.protocol.xproto.BadDrawable class ooxcb.protocol.xproto.Allow

AsyncPointer SyncPointer ReplayPointer AsyncKeyboard SyncKeyboard ReplayKeyboard AsyncBoth SyncBoth class ooxcb.protocol.xproto.AllocNamedColorReply

__init__(self, conn) exact_red visual_green exact_green exact_blue visual_red visual_blue pixel class ooxcb.protocol.xproto.GetImageCookie class ooxcb.protocol.xproto.LookupColorCookie class ooxcb.protocol.xproto.EnterNotifyEvent

event_name opcode event_target_class __init__(self, conn) event_y time detail same_screen_focus state mode

64 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

child event_x root_y root_x root event response_type class ooxcb.protocol.xproto.MapRequestEvent

event_name opcode event_target_class __init__(self, conn) window response_type parent class ooxcb.protocol.xproto.QueryPointerCookie class ooxcb.protocol.xproto.ColormapError

__init__(self, conn) minor_opcode major_opcode bad_value class ooxcb.protocol.xproto.NotifyDetail

Ancestor Virtual Inferior Nonlinear NonlinearVirtual Pointer PointerRoot _None class ooxcb.protocol.xproto.AccessError

__init__(self, conn) minor_opcode

5.2. ooxcb.protocol 65 ooxcb Documentation, Release 1.2

major_opcode bad_value class ooxcb.protocol.xproto.GrabKeyboardCookie class ooxcb.protocol.xproto.KeyReleaseEvent

event_name opcode event_target_class __init__(self, conn) event_y time detail state response_type child event_x root_y root_x root event same_screen class ooxcb.protocol.xproto.QueryTextExtentsCookie class ooxcb.protocol.xproto.ClipOrdering

Unsorted YSorted YXSorted YXBanded class ooxcb.protocol.xproto.Rectangle

__init__(self, conn) classmethod create(cls, conn, x, y, width, height) y x height width

66 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2 class ooxcb.protocol.xproto.ImageOrder

LSBFirst MSBFirst class ooxcb.protocol.xproto.ListFontsCookie class ooxcb.protocol.xproto.GetPropertyReply

__init__(self, conn) exists(self ) typed_value(self ) bytes_after value_len type value format class ooxcb.protocol.xproto.LookupColorReply

__init__(self, conn) exact_red visual_green exact_green exact_blue visual_red visual_blue class ooxcb.protocol.xproto.GetImageReply

__init__(self, conn) depth data visual class ooxcb.protocol.xproto.Screen

__init__(self, conn) get_active_window(self ) rgba_colormap(self ) get_root_visual_type(self ) get_rgba_visual(self ) min_installed_maps

5.2. ooxcb.protocol 67 ooxcb Documentation, Release 1.2

max_installed_maps default_colormap width_in_pixels backing_stores height_in_pixels white_pixel save_unders width_in_millimeters current_input_masks root_depth black_pixel root_visual height_in_millimeters root allowed_depths allowed_depths_len class ooxcb.protocol.xproto.ReparentNotifyEvent

event_name opcode event_target_class __init__(self, conn) override_redirect parent window response_type y x event class ooxcb.protocol.xproto.ClientMessageEvent

event_name opcode event_target_class __init__(self, conn) classmethod create(cls, conn, type, window, format, values) data

68 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

window type response_type format class ooxcb.protocol.xproto.Host

__init__(self, conn) address family address_len class ooxcb.protocol.xproto.Char2b

__init__(self, conn) byte2 byte1 class ooxcb.protocol.xproto.InternAtomCookie class ooxcb.protocol.xproto.ListFontsWithInfoReply

__init__(self, conn) max_bounds name_len font_ascent name properties_len replies_hint font_descent draw_direction min_char_or_byte2 default_char max_char_or_byte2 max_byte1 min_byte1 all_chars_exist properties min_bounds class ooxcb.protocol.xproto.QueryTextExtentsReply

5.2. ooxcb.protocol 69 ooxcb Documentation, Release 1.2

__init__(self, conn) font_descent overall_left overall_right overall_descent overall_ascent draw_direction font_ascent overall_width class ooxcb.protocol.xproto.ButtonReleaseEvent

event_name opcode event_target_class __init__(self, conn) event_y time detail state response_type child event_x root_y root_x root event same_screen class ooxcb.protocol.xproto.MapIndex

Shift Lock Control _1 _2 _3 _4 _5

70 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2 class ooxcb.protocol.xproto.Charinfo

__init__(self, conn) descent right_side_bearing character_width left_side_bearing attributes ascent class ooxcb.protocol.xproto.BadLength class ooxcb.protocol.xproto.xprotoExtension

header create_window_checked(self, depth, wid, parent, x, y, width, height, border_width, _class, visual, value_mask, value_list) create_window(self, depth, wid, parent, x, y, width, height, border_width, _class, visual, value_mask, value_list) intern_atom(self, name, only_if_exists=False) intern_atom_unchecked(self, name, only_if_exists=False) ungrab_pointer_checked(self, time=Time.CurrentTime) ungrab_pointer(self, time=Time.CurrentTime) change_active_pointer_grab_checked(self, cursor, time, event_mask) change_active_pointer_grab(self, cursor, time, event_mask) ungrab_keyboard_checked(self, time=0) ungrab_keyboard(self, time=0) allow_events_checked(self, mode, time=0) allow_events(self, mode, time=0) grab_server_checked(self ) grab_server(self ) ungrab_server_checked(self ) ungrab_server(self ) warp_pointer_checked(self, src_window, dst_window, src_x, src_y, src_width, src_height, dst_x, dst_y) warp_pointer(self, src_window, dst_window, src_x, src_y, src_width, src_height, dst_x, dst_y) get_input_focus(self ) get_input_focus_unchecked(self ) query_keymap(self ) query_keymap_unchecked(self )

5.2. ooxcb.protocol 71 ooxcb Documentation, Release 1.2

open_font_checked(self, fid, name) open_font(self, fid, name) list_fonts(self, max_names, pattern) list_fonts_unchecked(self, max_names, pattern) list_fonts_with_info(self, max_names, pattern) list_fonts_with_info_unchecked(self, max_names, pattern) set_font_path_checked(self, path) set_font_path(self, path) get_font_path(self ) get_font_path_unchecked(self ) create_pixmap_checked(self, depth, pid, drawable, width, height) create_pixmap(self, depth, pid, drawable, width, height) create_g_c_checked(self, cid, drawable, value_mask, value_list) create_g_c(self, cid, drawable, value_mask, value_list) create_colormap_checked(self, alloc, mid, window, visual) create_colormap(self, alloc, mid, window, visual) create_cursor_checked(self, cid, source, mask, fore_red, fore_green, fore_blue, back_red, back_green, back_blue, x, y) create_cursor(self, cid, source, mask, fore_red, fore_green, fore_blue, back_red, back_green, back_blue, x, y) create_glyph_cursor_checked(self, cid, source_font, mask_font, source_char, mask_char, fore_red, fore_green, fore_blue, back_red, back_green, back_blue) create_glyph_cursor(self, cid, source_font, mask_font, source_char, mask_char, fore_red, fore_green, fore_blue, back_red, back_green, back_blue) query_extension(self, name) query_extension_unchecked(self, name) list_extensions(self ) list_extensions_unchecked(self ) change_keyboard_mapping_checked(self, keycode_count, first_keycode, keysyms_per_keycode, keysyms) change_keyboard_mapping(self, keycode_count, first_keycode, keysyms_per_keycode, keysyms) get_keyboard_mapping(self, first_keycode, count) get_keyboard_mapping_unchecked(self, first_keycode, count) change_keyboard_control_checked(self, **values) change_keyboard_control(self, **values) get_keyboard_control(self ) get_keyboard_control_unchecked(self ) bell_checked(self, percent=0)

72 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

bell(self, percent=0) change_pointer_control_checked(self, acceleration_numerator, acceleration_denominator, threshold, do_acceleration, do_threshold) change_pointer_control(self, acceleration_numerator, acceleration_denominator, threshold, do_acceleration, do_threshold) get_pointer_control(self ) get_pointer_control_unchecked(self ) set_screen_saver_checked(self, timeout, interval, prefer_blanking, allow_exposures) set_screen_saver(self, timeout, interval, prefer_blanking, allow_exposures) get_screen_saver(self ) get_screen_saver_unchecked(self ) change_hosts_checked(self, mode, family, address) change_hosts(self, mode, family, address) list_hosts(self ) list_hosts_unchecked(self ) set_access_control_checked(self, mode) set_access_control(self, mode) set_close_down_mode_checked(self, mode) set_close_down_mode(self, mode) kill_client_checked(self, resource) kill_client(self, resource) force_screen_saver_checked(self, mode) force_screen_saver(self, mode) set_pointer_mapping(self, map) set_pointer_mapping_unchecked(self, map) get_pointer_mapping(self ) get_pointer_mapping_unchecked(self ) set_modifier_mapping(self, keycodes_per_modifier, keycodes) set_modifier_mapping_unchecked(self, keycodes_per_modifier, keycodes) get_modifier_mapping(self ) get_modifier_mapping_unchecked(self ) no_operation_checked(self ) no_operation(self ) list_all_fonts_with_info(self, max_names, pattern) class ooxcb.protocol.xproto.ButtonPressEvent

event_name

5.2. ooxcb.protocol 73 ooxcb Documentation, Release 1.2

opcode event_target_class __init__(self, conn) event_y time detail state response_type child event_x root_y root_x root event same_screen class ooxcb.protocol.xproto.GetKeyboardControlReply

__init__(self, conn) auto_repeats bell_pitch global_auto_repeat bell_percent key_click_percent led_mask bell_duration class ooxcb.protocol.xproto.GetPointerControlCookie class ooxcb.protocol.xproto.GetPropertyCookie class ooxcb.protocol.xproto.JoinStyle

Miter Round Bevel class ooxcb.protocol.xproto.Gravity

BitForget WinUnmap NorthWest

74 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

North NorthEast West Center East SouthWest South SouthEast Static class ooxcb.protocol.xproto.GetAtomNameCookie class ooxcb.protocol.xproto.Str

__init__(self, conn) __str__(self ) __repr__(self ) pythonize_lazy(self ) classmethod create_lazy(cls, conn, string) name_len name class ooxcb.protocol.xproto.Time

CurrentTime class ooxcb.protocol.xproto.AllocColorPlanesReply

__init__(self, conn) red_mask pixels_len blue_mask green_mask pixels class ooxcb.protocol.xproto.CirculateNotifyEvent

event_name opcode event_target_class __init__(self, conn) window

5.2. ooxcb.protocol 75 ooxcb Documentation, Release 1.2

place event response_type class ooxcb.protocol.xproto.CW

BackPixmap BackPixel BorderPixmap BorderPixel BitGravity WinGravity BackingStore BackingPlanes BackingPixel OverrideRedirect SaveUnder EventMask DontPropagate Colormap Cursor class ooxcb.protocol.xproto.QueryExtensionCookie class ooxcb.protocol.xproto.GetWindowAttributesCookie class ooxcb.protocol.xproto.KB

KeyClickPercent BellPercent BellPitch BellDuration Led LedMode Key AutoRepeatMode class ooxcb.protocol.xproto.GetMotionEventsReply

__init__(self, conn) events_len events

76 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2 class ooxcb.protocol.xproto.ListFontsReply

__init__(self, conn) names_len names class ooxcb.protocol.xproto.Family

Internet DECnet Chaos ServerInterpreted Internet6 class ooxcb.protocol.xproto.EventMask

NoEvent KeyPress KeyRelease ButtonPress ButtonRelease EnterWindow LeaveWindow PointerMotion PointerMotionHint Button1Motion Button2Motion Button3Motion Button4Motion Button5Motion ButtonMotion KeymapState Exposure VisibilityChange StructureNotify ResizeRedirect SubstructureNotify SubstructureRedirect FocusChange

5.2. ooxcb.protocol 77 ooxcb Documentation, Release 1.2

PropertyChange ColorMapChange OwnerGrabButton class ooxcb.protocol.xproto.InternAtomReply

__init__(self, conn) atom class ooxcb.protocol.xproto.KeyPressEvent

event_name opcode event_target_class __init__(self, conn) event_y time detail state response_type child event_x root_y root_x root event same_screen class ooxcb.protocol.xproto.GetPointerControlReply

__init__(self, conn) threshold acceleration_denominator acceleration_numerator class ooxcb.protocol.xproto.GetFontPathCookie class ooxcb.protocol.xproto.LeaveNotifyEvent

event_name opcode event_target_class

78 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

__init__(self, conn) event_y time detail same_screen_focus state mode child event_x root_y root_x root event response_type class ooxcb.protocol.xproto.QueryColorsCookie class ooxcb.protocol.xproto.AtomError

__init__(self, conn) minor_opcode major_opcode bad_value class ooxcb.protocol.xproto.ListHostsCookie class ooxcb.protocol.xproto.GetMotionEventsCookie class ooxcb.protocol.xproto.Pixmap

__init__(self, conn, xid) free_checked(self ) free(self ) classmethod create(cls, conn, drawable, width, height, depth) class ooxcb.protocol.xproto.MapNotifyEvent

event_name opcode event_target_class __init__(self, conn) window response_type

5.2. ooxcb.protocol 79 ooxcb Documentation, Release 1.2

event override_redirect class ooxcb.protocol.xproto.GetAtomNameReply

__init__(self, conn) name_len name class ooxcb.protocol.xproto.Fontprop

__init__(self, conn) name value class ooxcb.protocol.xproto.Window

__init__(self, conn, xid) change_attributes_checked(self, **values) change_attributes(self, **values) get_attributes(self ) get_attributes_unchecked(self ) destroy_checked(self ) destroy(self ) destroy_subwindows_checked(self ) destroy_subwindows(self ) change_save_set_checked(self, mode) change_save_set(self, mode) reparent_checked(self, parent, x=0, y=0) reparent(self, parent, x=0, y=0) map_checked(self ) map(self ) map_subwindows_checked(self ) map_subwindows(self ) unmap_checked(self ) unmap(self ) unmap_subwindows_checked(self ) unmap_subwindows(self ) configure_checked(self, **values) configure(self, **values)

80 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

circulate_window_checked(self, direction) circulate_window(self, direction) query_tree(self ) query_tree_unchecked(self ) change_property_checked(self, property, type, format, data, mode=PropMode.Replace) change_property(self, property, type, format, data, mode=PropMode.Replace) delete_property_checked(self, property) delete_property(self, property) get_property(self, property, type, delete=False, long_offset=0, long_length=2**32-1) get_property_unchecked(self, property, type, delete=False, long_offset=0, long_length=2**32- 1) list_properties(self ) list_properties_unchecked(self ) send_event_checked(self, event_mask, event, propagate=False) send_event(self, event_mask, event, propagate=False) grab_pointer(self, event_mask, owner_events=True, pointer_mode=GrabMode.Async, keyboard_mode=GrabMode.Async, confine_to=None, cursor=None, time=Time.CurrentTime) grab_pointer_unchecked(self, event_mask, owner_events=True, pointer_mode=GrabMode.Async, keyboard_mode=GrabMode.Async, confine_to=None, cursor=None, time=Time.CurrentTime) grab_button_checked(self, event_mask, button, modifiers, owner_events=True, pointer_mode=GrabMode.Async, keyboard_mode=GrabMode.Async, confine_to=None, cursor=None) grab_button(self, event_mask, button, modifiers, owner_events=True, pointer_mode=GrabMode.Async, keyboard_mode=GrabMode.Async, con- fine_to=None, cursor=None) ungrab_button_checked(self, button, modifiers) ungrab_button(self, button, modifiers) grab_keyboard(self, owner_events=True, time=Time.CurrentTime, pointer_mode=GrabMode.Async, keyboard_mode=GrabMode.Async) grab_keyboard_unchecked(self, owner_events=True, time=Time.CurrentTime, pointer_mode=GrabMode.Async, key- board_mode=GrabMode.Async) grab_key_checked(self, key, modifiers, owner_events=True, pointer_mode=GrabMode.Async, key- board_mode=GrabMode.Async) grab_key(self, key, modifiers, owner_events=True, pointer_mode=GrabMode.Async, key- board_mode=GrabMode.Async) ungrab_key_checked(self, key, modifiers) ungrab_key(self, key, modifiers) query_pointer(self ) query_pointer_unchecked(self )

5.2. ooxcb.protocol 81 ooxcb Documentation, Release 1.2

get_motion_events(self, start, stop) get_motion_events_unchecked(self, start, stop) translate_coordinates(self, dst_window, src_x, src_y) translate_coordinates_unchecked(self, dst_window, src_x, src_y) set_input_focus_checked(self, revert_to=InputFocus.PointerRoot, time=Time.CurrentTime) set_input_focus(self, revert_to=InputFocus.PointerRoot, time=Time.CurrentTime) clear_area_checked(self, x, y, width, height, exposures=False) clear_area(self, x, y, width, height, exposures=False) list_installed_colormaps(self ) list_installed_colormaps_unchecked(self ) rotate_properties_checked(self, atoms, delta) rotate_properties(self, atoms, delta) classmethod create(cls, conn, parent, depth, visual, x=0, y=0, width=640, height=480, bor- der_width=0, _class=WindowClass.InputOutput, **values) classmethod create_toplevel_on_screen(cls, conn, screen, *args, **kwargs) add_to_save_set(self ) remove_from_save_set(self ) class ooxcb.protocol.xproto.CoordMode

Origin Previous class ooxcb.protocol.xproto.ImageFormat

XYBitmap XYPixmap ZPixmap class ooxcb.protocol.xproto.GrabStatus

Success AlreadyGrabbed InvalidTime NotViewable Frozen class ooxcb.protocol.xproto.Timecoord

__init__(self, conn) y x

82 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

time class ooxcb.protocol.xproto.LineStyle

Solid OnOffDash DoubleDash class ooxcb.protocol.xproto.QueryBestSizeReply

__init__(self, conn) width height class ooxcb.protocol.xproto.InputFocus

_None PointerRoot Parent class ooxcb.protocol.xproto.VisibilityNotifyEvent

event_name opcode event_target_class __init__(self, conn) window state response_type class ooxcb.protocol.xproto.FocusOutEvent

event_name opcode event_target_class __init__(self, conn) mode response_type detail event class ooxcb.protocol.xproto.SendEventDest

PointerWindow

5.2. ooxcb.protocol 83 ooxcb Documentation, Release 1.2

ItemFocus class ooxcb.protocol.xproto.Format

__init__(self, conn) depth scanline_pad bits_per_pixel class ooxcb.protocol.xproto.ColormapNotifyEvent

event_name opcode event_target_class __init__(self, conn) new window response_type colormap state class ooxcb.protocol.xproto.CirculateRequestEvent

event_name opcode event_target_class __init__(self, conn) window place event response_type class ooxcb.protocol.xproto.QueryFontReply

__init__(self, conn) max_bounds all_chars_exist font_ascent char_infos_len properties_len font_descent

84 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

draw_direction min_char_or_byte2 default_char max_char_or_byte2 char_infos max_byte1 min_byte1 properties min_bounds class ooxcb.protocol.xproto.CreateNotifyEvent

event_name opcode event_target_class __init__(self, conn) override_redirect parent height width window response_type y x border_width class ooxcb.protocol.xproto.Mapping

Modifier Keyboard Pointer class ooxcb.protocol.xproto.ResizeRequestEvent

event_name opcode event_target_class __init__(self, conn) width window

5.2. ooxcb.protocol 85 ooxcb Documentation, Release 1.2

response_type height class ooxcb.protocol.xproto.QueryColorsReply

__init__(self, conn) colors_len colors class ooxcb.protocol.xproto.MotionNotifyEvent

event_name opcode event_target_class __init__(self, conn) event_y time detail state response_type child event_x root_y root_x root event same_screen class ooxcb.protocol.xproto.Atom

__init__(self, conn, xid) get_name(self ) get_name_unchecked(self ) set_selection_owner_checked(self, owner=None, time=0) set_selection_owner(self, owner=None, time=0) get_selection_owner(self ) get_selection_owner_unchecked(self ) convert_selection_checked(self, requestor, target, property=None, time=0) convert_selection(self, requestor, target, property=None, time=0) __repr__(self )

86 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

name(self ) _cache_name(self, name) has_cached_name(self ) class ooxcb.protocol.xproto.ScreenSaver

Reset Active class ooxcb.protocol.xproto.CloseDown

DestroyAll RetainPermanent RetainTemporary class ooxcb.protocol.xproto.SetPointerMappingReply

__init__(self, conn) status class ooxcb.protocol.xproto.Segment

__init__(self, conn) y1 x2 x1 y2 class ooxcb.protocol.xproto.ValueError

__init__(self, conn) minor_opcode major_opcode bad_value class ooxcb.protocol.xproto.GetInputFocusReply

__init__(self, conn) revert_to focus class ooxcb.protocol.xproto.MappingNotifyEvent

event_name opcode

5.2. ooxcb.protocol 87 ooxcb Documentation, Release 1.2

event_target_class __init__(self, conn) first_keycode count request response_type class ooxcb.protocol.xproto.GetGeometryReply

__init__(self, conn) height width depth y x border_width root class ooxcb.protocol.xproto.SelectionRequestEvent

event_name opcode event_target_class __init__(self, conn) selection target requestor response_type time owner property class ooxcb.protocol.xproto.BadWindow class ooxcb.protocol.xproto.MapState

Unmapped Unviewable Viewable class ooxcb.protocol.xproto.Depth

88 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

__init__(self, conn) visuals depth visuals_len class ooxcb.protocol.xproto.ListExtensionsCookie class ooxcb.protocol.xproto.ButtonMask

_1 _2 _3 _4 _5 Any class ooxcb.protocol.xproto.CursorError

__init__(self, conn) minor_opcode major_opcode bad_value class ooxcb.protocol.xproto.Drawable

__init__(self, conn, xid) get_geometry(self ) get_geometry_unchecked(self ) get_image(self, format, x, y, width, height, plane_mask) get_image_unchecked(self, format, x, y, width, height, plane_mask) query_best_size(self, _class, width, height) query_best_size_unchecked(self, _class, width, height) class ooxcb.protocol.xproto.FocusInEvent

event_name opcode event_target_class __init__(self, conn) mode response_type detail

5.2. ooxcb.protocol 89 ooxcb Documentation, Release 1.2

event class ooxcb.protocol.xproto.GContext

__init__(self, conn, xid) change_checked(self, **values) change(self, **values) copy_checked(self, values=()) copy(self, values=()) set_dashes_checked(self, dash_offset, dashes) set_dashes(self, dash_offset, dashes) set_clip_rectangles_checked(self, clip_x_origin, clip_y_origin, ordering, rectangles) set_clip_rectangles(self, clip_x_origin, clip_y_origin, ordering, rectangles) free_checked(self ) free(self ) copy_area_checked(self, src_drawable, dst_drawable, src_x, src_y, dst_x, dst_y, width, height) copy_area(self, src_drawable, dst_drawable, src_x, src_y, dst_x, dst_y, width, height) copy_plane_checked(self, src_drawable, dst_drawable, src_x, src_y, dst_x, dst_y, width, height, bit_plane) copy_plane(self, src_drawable, dst_drawable, src_x, src_y, dst_x, dst_y, width, height, bit_plane) poly_point_checked(self, drawable, points, coordinate_mode=0) poly_point(self, drawable, points, coordinate_mode=0) poly_line_checked(self, drawable, points, coordinate_mode=0) poly_line(self, drawable, points, coordinate_mode=0) poly_segment_checked(self, drawable, segments) poly_segment(self, drawable, segments) poly_rectangle_checked(self, drawable, rectangles) poly_rectangle(self, drawable, rectangles) poly_arc_checked(self, drawable, arcs) poly_arc(self, drawable, arcs) fill_poly_checked(self, drawable, points, shape=0, coordinate_mode=0) fill_poly(self, drawable, points, shape=0, coordinate_mode=0) poly_fill_rectangle_checked(self, drawable, rectangles) poly_fill_rectangle(self, drawable, rectangles) poly_fill_arc_checked(self, drawable, arcs) poly_fill_arc(self, drawable, arcs) put_image_checked(self, drawable, format, width, height, dst_x, dst_y, depth, left_pad, data) put_image(self, drawable, format, width, height, dst_x, dst_y, depth, left_pad, data)

90 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

poly_text8_checked(self, drawable, x, y, string) poly_text8(self, drawable, x, y, string) poly_text16_checked(self, drawable, x, y, string) poly_text16(self, drawable, x, y, string) image_text8_checked(self, drawable, x, y, string) image_text8(self, drawable, x, y, string) image_text16_checked(self, drawable, x, y, string) image_text16(self, drawable, x, y, string) classmethod create(cls, conn, drawable, **values) class ooxcb.protocol.xproto.PixmapError

__init__(self, conn) minor_opcode major_opcode bad_value class ooxcb.protocol.xproto.BadAlloc class ooxcb.protocol.xproto.QueryPointerReply

__init__(self, conn) mask same_screen child root_y root_x root win_x win_y class ooxcb.protocol.xproto.SelectionNotifyEvent

event_name opcode event_target_class __init__(self, conn) selection target requestor response_type

5.2. ooxcb.protocol 91 ooxcb Documentation, Release 1.2

time property class ooxcb.protocol.xproto.PolyShape

Complex Nonconvex Convex class ooxcb.protocol.xproto.SetModifierMappingCookie class ooxcb.protocol.xproto.GetPointerMappingCookie class ooxcb.protocol.xproto.GetSelectionOwnerReply

__init__(self, conn) owner class ooxcb.protocol.xproto.WindowError

__init__(self, conn) minor_opcode major_opcode bad_value class ooxcb.protocol.xproto.SetMode

Insert Delete class ooxcb.protocol.xproto.NotifyMode

Normal Grab Ungrab WhileGrabbed class ooxcb.protocol.xproto.PropertyNotifyEvent

event_name opcode event_target_class __init__(self, conn) window time response_type

92 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

state atom class ooxcb.protocol.xproto.GetFontPathReply

__init__(self, conn) path path_len class ooxcb.protocol.xproto.GetKeyboardMappingReply

__init__(self, conn) keysyms_per_keycode keysyms

5.2.10 ooxcb.protocol.xtest class ooxcb.protocol.xtest.GetVersionReply

__init__(self, conn) major_version minor_version class ooxcb.protocol.xtest.WindowMixin

target_class compare_cursor(self, cursor) compare_cursor_unchecked(self, cursor) class ooxcb.protocol.xtest.xtestExtension

header get_version(self, major_version, minor_version) get_version_unchecked(self, major_version, minor_version) fake_input_checked(self, type, detail=0, time=0, window=None, rootX=0, rootY=0, deviceid=0) fake_input(self, type, detail=0, time=0, window=None, rootX=0, rootY=0, deviceid=0) grab_control_checked(self, impervious) grab_control(self, impervious) class ooxcb.protocol.xtest.CompareCursorReply

__init__(self, conn) same class ooxcb.protocol.xtest.CompareCursorCookie

5.2. ooxcb.protocol 93 ooxcb Documentation, Release 1.2 class ooxcb.protocol.xtest.Cursor

_None Current class ooxcb.protocol.xtest.GetVersionCookie

5.3 ooxcb ooxcb.connect(display=’‘, fd=None, auth_string=None, cls=) establishes a connection to a X display. The X display to connect to can be specified ... •by display, an X display string. If display is an empty string, the DISPLAY environment variable will be used. •by fd, an open file descriptor. auth_string is not relevant here. cls can be used to customize the connection class. There has to be an X core protocol module loaded, otherwise an XcbException is raised. connect() returns a ready to use instance of cls. ooxcb.parse_auth(authstr) Parse the X11 authentication string authstr and return a new libxcb.xcb_auth_info instance. ooxcb.popcount(i) just a wrapper for the libxcb xcb_popcount function that determines the number of asserted bits in i. ooxcb.timestamp() return a cardinal timestamp. a shortcut. ooxcb.type_pad(t, i) calculates the needed type pad. Mostly for internal use.

5.4 ooxcb.atoms class ooxcb.atoms.AtomDict(conn, *boo, **far) A dictionary which is able to lazily load an atom and that contains all predefined atoms from ooxcb.constant. dic= AtomDict(my_connection) print dic[’WM_CLASS’] # Yay, it is lazily loaded! aid= dic[’WM_CLASS’].get_internal() # ... and vice-versa: assert dic.get_by_id(aid) == dic[’WM_CLASS’]

You should not modify the dictionary manually. add_atom(name, atom) add the atom atom with the name name to the cache. get_by_id(aid) return an atom instance for the ID aid. That is not part of the connection’s XID cache because atom ids do not seem to be part of the XID space; they have their own space.

94 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

For aid == 0, it will return None, but this may change in the future. Todo currently, this depends on ooxcb.protocol.xproto. That’s not really consistent.

5.5 ooxcb.conn class ooxcb.Connection(core) The ooxcb connection class is the main point of ooxcb. It is similar to libX11’s Display. The Connection class is an event dispatcher, so you can register for events. The Connection instance has a core attribute that is the core extension instance, and it also sets the xproto attribute for the xproto extension. Todo describe events synchronous_check If synchronous_check is True, all requests will be sent as checked (regardless if x() or x_checked() is called) and each requests will be checked automatically (and that’s slow). Additionally, it also provokes lazy programming, because if a request is checked, it is immediately sent. If you are not careful, you will have a non-working program if you turn out the synchronous checks because you didn’t care about calling conn.flush() at the correct places :) keysyms A ooxcb.keysyms.Keysyms helper instance. atoms A ooxcb.atoms.AtomDict helper instance. conn The opaque libxcb connection pointer. You will most likely do not have to use that. add_to_cache(xid, obj) add the X object obj with the X ID xid to the internal X object cache. alive True if the connection is valid, False if it is not (ie disconnected) bunch(*args, **kwds) Use this in a with statement. Example: with conn.bunch(): for window in windows: window.map()

When the with statement is left, the connection will be flushed. check_conn() checks self.conn and raises an IOError if it’s None. disconnect() disconnect from the X server gracefully and set self.conn to None. do_initial_setup() loads the core events, the core errors and sets them up. Note Internally called by ooxcb.connect(). flush() flushes the connection. All cached requests are sent.

5.5. ooxcb.conn 95 ooxcb Documentation, Release 1.2

generate_id() generates a new X ID and return it. get_file_descriptor() get the unix file descriptor. get_from_cache_fallback(xid, cls) If there is a resource using the xid xid in the cache, return it. If not, instantiate cls, add to cache and return the newly created object. get_maximum_request_length() return the connection’s maxmimum request length. get_setup() get the connection’s setup and return it. The setup instance is cached. has_error() returns True if the connection has encountered an error. load_ext(key) load an extension. Note internally called poll_for_event() polls for an event (non-blocking) and returns it. If there was no event, None is returned. See wait_for_event pref_screen_object Return the preferred protocol.xproto.Screen instance. Shortcut for conn.setup.roots[conn.pref_screen] prefetch_maximum_request_length() prefetches the maximum request length without blocking. remove_from_cache(xid) removes the object managing the X resource with the X id xid from the cache. Will raise a KeyError if there is no such resource in the cache. remove_from_cache_safe(xid) same as remove_from_cache(), but does not raise a KeyError. Instead, it does nothing. It is safe. setup get the connection’s setup and return it. The setup instance is cached. setup_helper(ext, events, errors) gets all events and errors from ext and registers them. Note Internal method. wait_for_event() waits for an event (blocking) and returns it. If an connection IO error encountered, it raises an IOError. This can also raise Xcb protocol errors.

5.6 ooxcb.constant ooxcb.constant just contains some predefined numeric constants. ooxcb.constant.XA_ARC ooxcb.constant.XA_ATOM

96 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2 ooxcb.constant.XA_BITMAP ooxcb.constant.XA_CAP_HEIGHT ooxcb.constant.XA_CARDINAL ooxcb.constant.XA_COLORMAP ooxcb.constant.XA_COPYRIGHT ooxcb.constant.XA_CURSOR ooxcb.constant.XA_CUT_BUFFER0 ooxcb.constant.XA_CUT_BUFFER1 ooxcb.constant.XA_CUT_BUFFER2 ooxcb.constant.XA_CUT_BUFFER3 ooxcb.constant.XA_CUT_BUFFER4 ooxcb.constant.XA_CUT_BUFFER5 ooxcb.constant.XA_CUT_BUFFER6 ooxcb.constant.XA_CUT_BUFFER7 ooxcb.constant.XA_DRAWABLE ooxcb.constant.XA_END_SPACE ooxcb.constant.XA_FAMILY_NAME ooxcb.constant.XA_FONT ooxcb.constant.XA_FONT_NAME ooxcb.constant.XA_FULL_NAME ooxcb.constant.XA_INTEGER ooxcb.constant.XA_ITALIC_ANGLE ooxcb.constant.XA_LAST_PREDEFINED ooxcb.constant.XA_MAX_SPACE ooxcb.constant.XA_MIN_SPACE ooxcb.constant.XA_NORM_SPACE ooxcb.constant.XA_NOTICE ooxcb.constant.XA_PIXMAP ooxcb.constant.XA_POINT ooxcb.constant.XA_POINT_SIZE ooxcb.constant.XA_PRIMARY ooxcb.constant.XA_QUAD_WIDTH ooxcb.constant.XA_RECTANGLE ooxcb.constant.XA_RESOLUTION ooxcb.constant.XA_RESOURCE_MANAGER ooxcb.constant.XA_RGB_BEST_MAP ooxcb.constant.XA_RGB_BLUE_MAP ooxcb.constant.XA_RGB_COLOR_MAP ooxcb.constant.XA_RGB_DEFAULT_MAP ooxcb.constant.XA_RGB_GRAY_MAP ooxcb.constant.XA_RGB_GREEN_MAP ooxcb.constant.XA_RGB_RED_MAP ooxcb.constant.XA_SECONDARY ooxcb.constant.XA_STRIKEOUT_ASCENT ooxcb.constant.XA_STRIKEOUT_DESCENT ooxcb.constant.XA_STRING ooxcb.constant.XA_SUBSCRIPT_X ooxcb.constant.XA_SUBSCRIPT_Y ooxcb.constant.XA_SUPERSCRIPT_X ooxcb.constant.XA_SUPERSCRIPT_Y ooxcb.constant.XA_UNDERLINE_POSITION ooxcb.constant.XA_UNDERLINE_THICKNESS ooxcb.constant.XA_VISUALID ooxcb.constant.XA_WEIGHT

5.6. ooxcb.constant 97 ooxcb Documentation, Release 1.2

ooxcb.constant.XA_WINDOW ooxcb.constant.XA_WM_CLASS ooxcb.constant.XA_WM_CLIENT_MACHINE ooxcb.constant.XA_WM_COMMAND ooxcb.constant.XA_WM_HINTS ooxcb.constant.XA_WM_ICON_NAME ooxcb.constant.XA_WM_ICON_SIZE ooxcb.constant.XA_WM_NAME ooxcb.constant.XA_WM_NORMAL_HINTS ooxcb.constant.XA_WM_SIZE_HINTS ooxcb.constant.XA_WM_TRANSIENT_FOR ooxcb.constant.XA_WM_ZOOM_HINTS ooxcb.constant.XA_X_HEIGHT

5.7 ooxcb.cookie

class ooxcb.cookie.Cookie A Cookie is something like a placeholder for a request’s response. When invoking a request method, you will get a ooxcb.cookie.Cookie subclass instance as return value. If you need the reply, you just call the ooxcb.cookie.Cookie.reply() method and you get a ooxcb.response.Response subclass instance. The request is sent and handled just when you call reply. If you have a request without a response (a void request), you have to call the ..._checked method to be able to check this specific cookie using the ooxcb.cookie.Cookie.check() method. See http://lists.freedesktop.org/archives/xorg-announce/2006-September/000134.html for a better description of checked and unchecked requests :) check() Explicitly check a void, checked request. Raises an error if there is one. If there is none, None is returned. That will raise an XcbException if the request is not checked and/or not void. poll_for_reply() return the reply of the request if there is one. If not, don’t wait for the reply to come, just return None. That will raise a XcbException if the request is void. reply() wait for the reply of the request and return it. That will raise a XcbException if the request is void. class ooxcb.cookie.VoidCookie a void cookie class.

5.8 ooxcb.eventsys

This event system module is stolen from pyglet. Thanks for this great module! Event dispatch framework. All objects that produce events in pyglet implement EventDispatcher, providing a consistent interface for registering and manipulating event handlers. A commonly used event dispatcher is pyglet.window.Window.

5.8.1 Event types

For each event dispatcher there is a set of events that it dispatches; these correspond with the type of event handlers you can attach. Event types are identified by their name, for example, ‘’on_resize’‘. If you are creating a new class which implements EventDispatcher, you must call EventDispatcher.register_event_type for each event type.

98 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

5.8.2 Attaching event handlers

An event handler is simply a function or method. You can attach an event handler by setting the appropriate function on the instance: def on_resize(width, height): # ... dispatcher.on_resize = on_resize

There is also a convenience decorator that reduces typing: @dispatcher.event def on_resize(width, height): # ...

You may prefer to subclass and override the event handlers instead: class MyDispatcher(DispatcherClass): def on_resize(self, width, height): # ...

5.8.3 Event handler stack

When attaching an event handler to a dispatcher using the above methods, it replaces any existing handler (causing the original handler to no longer be called). Each dispatcher maintains a stack of event handlers, allowing you to insert an event handler “above” the existing one rather than replacing it. There are two main use cases for “pushing” event handlers: • Temporarily intercepting the events coming from the dispatcher by pushing a custom set of handlers onto the dispatcher, then later “popping” them all off at once. • Creating “chains” of event handlers, where the event propogates from the top-most (most recently added) handler to the bottom, until a handler takes care of it. Use EventDispatcher.push_handlers to create a new level in the stack and attach handlers to it. You can push several handlers at once: dispatcher.push_handlers(on_resize, on_key_press)

If your function handlers have different names to the events they handle, use keyword arguments: dispatcher.push_handlers(on_resize=my_resize, on_key_press=my_key_press)

After an event handler has processed an event, it is passed on to the next-lowest event handler, unless the handler returns EVENT_HANDLED, which prevents further propogation. To remove all handlers on the top stack level, use EventDispatcher.pop_handlers. Note that any handlers pushed onto the stack have precedence over the handlers set directly on the instance (for example, using the methods described in the previous section), regardless of when they were set. For example, handler foo is called before handler bar in the following example: dispatcher.push_handlers(on_resize=foo) dispatcher.on_resize= bar

5.8. ooxcb.eventsys 99 ooxcb Documentation, Release 1.2

5.8.4 Dispatching events pyglet uses a single-threaded model for all application code. Event handlers are only ever invoked as a result of calling EventDispatcher.dispatch_events‘. It is up to the specific event dispatcher to queue relevant events until they can be dispatched, at which point the handlers are called in the order the events were originally generated. This implies that your application runs with a main loop that continously updates the application state and checks for new events: while True: dispatcher.dispatch_events() # ... additional per-frame processing

Not all event dispatchers require the call to dispatch_events; check with the particular class documentation. class ooxcb.eventsys.EventDispatcher Generic event dispatcher interface. See the module docstring for usage. dispatch_event(event_type, *args) Dispatch a single event to the attached handlers. The event is propogated to all handlers from from the top of the stack until one returns EVENT_HANDLED. This method should be used only by EventDispatcher implementors; applications should call the dispatch_events method. Since pyglet 1.2, the method returns EVENT_HANDLED if an event handler returned EVENT_HANDLED or EVENT_UNHANDLED if all events returned EVENT_UNHANDLED. If no matching event handlers are in the stack, False is returned. Parameters event_type [str] Name of the event. args [sequence] Arguments to pass to the event handler. Return type bool or None Returns (Since pyglet 1.2) EVENT_HANDLED if an event handler returned EVENT_HANDLED; EVENT_UNHANDLED if one or more event handlers were in- voked but returned only EVENT_UNHANDLED; otherwise False. In pyglet 1.1 and earler, the return value is always None. event(*args) Function decorator for an event handler. Usage: win = window.Window()

@win.event def on_resize(self, width, height): # ...

or: @win.event(’on_resize’) def foo(self, width, height): # ...

100 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

pop_handlers() Pop the top level of event handlers off the stack. push_handlers(*args, **kwargs) Push a level onto the top of the handler stack, then attach zero or more event handlers. If keyword arguments are given, they name the event type to attach. Otherwise, a callable’s __name__ attribute will be used. Any other object may also be specified, in which case it will be searched for callables with event names. classmethod register_event_type(name) Register an event type with the dispatcher. Registering event types allows the dispatcher to validate event handler names as they are attached, and to search attached objects for suitable handlers. Parameters name [str] Name of the event to register. remove_handler(name, handler) Remove a single event handler. The given event handler is removed from the first handler stack frame it appears in. The handler must be the exact same callable as passed to set_handler, set_handlers or push_handlers; and the name must match the event type it is bound to. No error is raised if the event handler is not set. Parameters name [str] Name of the event type to remove. handler [callable] Event handler to remove. remove_handlers(*args, **kwargs) Remove event handlers from the event stack. See push_handlers for the accepted argument types. All handlers are removed from the first stack frame that contains any of the given handlers. No error is raised if any handler does not appear in that frame, or if no stack frame contains any of the given handlers. If the stack frame is empty after removing the handlers, it is removed from the stack. Note that this interferes with the expected symmetry of push_handlers and pop_handlers. set_handler(name, handler) Attach a single event handler. Parameters name [str] Name of the event type to attach to. handler [callable] Event handler to attach. set_handlers(*args, **kwargs) Attach one or more event handlers to the top level of the handler stack. See push_handlers for the accepted argument types. class ooxcb.eventsys.EventDispatcherMeta just a meta class making sure that each EventDispatcher subclass has its own event_types descriptor. exception ooxcb.eventsys.EventException An exception raised when an event handler could not be attached.

5.8. ooxcb.eventsys 101 ooxcb Documentation, Release 1.2

5.9 ooxcb.exception

This module defines some special Xcb exception classes. exception ooxcb.exception.ProtocolException X extension modules define error subclasses of ProtocolException. An ProtocolExtension subclass in- stance is raised if there was an error in the X11 protocol, e.g. unsuitable values. Examples are ooxcb.xproto.BadWindow or ooxcb.xproto.BadLength. exception ooxcb.exception.XcbException The basic exception class, suitable for many errors :)

5.10 ooxcb.ext class ooxcb.ext.Extension(conn, key=None) A wrapper for an X11 extension. This class provides with a Extension.send_request() method. You will most likely do not have to use this class directly. send_request(request, cookie, reply_cls=None) sends request to the X server. Then it provides cookie with the needed attributes and re- turns it. reply_cls is the optional reply class which will also be redirected to cookie. If ooxcb.conn.Connection.synchronous_check is True, this will also force every request to be checked and check it immediately after sending. class ooxcb.ext.ExtensionKey(name) just a wrapper class for libxcb.xcb_extension_t. :todo: explain what an extension key is

5.11 ooxcb.keysymdef ooxcb.keysymdef contains two dictionaries: keysyms and names. keysyms maps names to keysym values, and names maps keysym values to names. So, if you want to get a keysym from a name, use keysyms, if you want it the other way, use names. The keysym values are: • 0 • 1 • 2 • 3 • 3270_AltCursor • 3270_Attn • 3270_BackTab • 3270_ChangeScreen • 3270_Copy • 3270_CursorBlink • 3270_CursorSelect • 3270_DeleteWord

102 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

• 3270_Duplicate • 3270_Enter • 3270_EraseEOF • 3270_EraseInput • 3270_ExSelect • 3270_FieldMark • 3270_Ident • 3270_Jump • 3270_KeyClick • 3270_Left2 • 3270_PA1 • 3270_PA2 • 3270_PA3 • 3270_Play • 3270_PrintScreen • 3270_Quit • 3270_Record • 3270_Reset • 3270_Right2 • 3270_Rule • 3270_Setup • 3270_Test • 4 • 5 • 6 • 7 • 8 • 9 • A • AE • Aacute • Abelowdot • Abreve • Abreveacute • Abrevebelowdot • Abrevegrave

5.11. ooxcb.keysymdef 103 ooxcb Documentation, Release 1.2

• Abrevehook • Abrevetilde • AccessX_Enable • AccessX_Feedback_Enable • Acircumflex • Acircumflexacute • Acircumflexbelowdot • Acircumflexgrave • Acircumflexhook • Acircumflextilde • Adiaeresis • Agrave • Ahook • Alt_L • Alt_R • Amacron • Aogonek • Arabic_0 • Arabic_1 • Arabic_2 • Arabic_3 • Arabic_4 • Arabic_5 • Arabic_6 • Arabic_7 • Arabic_8 • Arabic_9 • Arabic_ain • Arabic_alef • Arabic_alefmaksura • Arabic_beh • Arabic_comma • Arabic_dad • Arabic_dal • Arabic_damma • Arabic_dammatan

104 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

• Arabic_ddal • Arabic_farsi_yeh • Arabic_fatha • Arabic_fathatan • Arabic_feh • Arabic_fullstop • Arabic_gaf • Arabic_ghain • Arabic_ha • Arabic_hah • Arabic_hamza • Arabic_hamza_above • Arabic_hamza_below • Arabic_hamzaonalef • Arabic_hamzaonwaw • Arabic_hamzaonyeh • Arabic_hamzaunderalef • Arabic_heh • Arabic_heh_doachashmee • Arabic_heh_goal • Arabic_jeem • Arabic_jeh • Arabic_kaf • Arabic_kasra • Arabic_kasratan • Arabic_keheh • Arabic_khah • Arabic_lam • Arabic_madda_above • Arabic_maddaonalef • Arabic_meem • Arabic_noon • Arabic_noon_ghunna • Arabic_peh • Arabic_percent • Arabic_qaf

5.11. ooxcb.keysymdef 105 ooxcb Documentation, Release 1.2

• Arabic_question_mark • Arabic_ra • Arabic_rreh • Arabic_sad • Arabic_seen • Arabic_semicolon • Arabic_shadda • Arabic_sheen • Arabic_sukun • Arabic_superscript_alef • Arabic_switch • Arabic_tah • Arabic_tatweel • Arabic_tcheh • Arabic_teh • Arabic_tehmarbuta • Arabic_thal • Arabic_theh • Arabic_tteh • Arabic_veh • Arabic_waw • Arabic_yeh • Arabic_yeh_baree • Arabic_zah • Arabic_zain • Aring • Armenian_AT • Armenian_AYB • Armenian_BEN • Armenian_CHA • Armenian_DA • Armenian_DZA • Armenian_E • Armenian_FE • Armenian_GHAT • Armenian_GIM

106 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

• Armenian_HI • Armenian_HO • Armenian_INI • Armenian_JE • Armenian_KE • Armenian_KEN • Armenian_KHE • Armenian_LYUN • Armenian_MEN • Armenian_NU • Armenian_O • Armenian_PE • Armenian_PYUR • Armenian_RA • Armenian_RE • Armenian_SE • Armenian_SHA • Armenian_TCHE • Armenian_TO • Armenian_TSA • Armenian_TSO • Armenian_TYUN • Armenian_VEV • Armenian_VO • Armenian_VYUN • Armenian_YECH • Armenian_ZA • Armenian_ZHE • Armenian_accent • Armenian_amanak • Armenian_apostrophe • Armenian_at • Armenian_ayb • Armenian_ben • Armenian_but • Armenian_cha

5.11. ooxcb.keysymdef 107 ooxcb Documentation, Release 1.2

• Armenian_da • Armenian_dza • Armenian_e • Armenian_exclam • Armenian_fe • Armenian_full_stop • Armenian_ghat • Armenian_gim • Armenian_hi • Armenian_ho • Armenian_hyphen • Armenian_ini • Armenian_je • Armenian_ke • Armenian_ken • Armenian_khe • Armenian_ligature_ew • Armenian_lyun • Armenian_men • Armenian_nu • Armenian_o • Armenian_paruyk • Armenian_pe • Armenian_pyur • Armenian_question • Armenian_ra • Armenian_re • Armenian_se • Armenian_separation_mark • Armenian_sha • Armenian_shesht • Armenian_tche • Armenian_to • Armenian_tsa • Armenian_tso • Armenian_tyun

108 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

• Armenian_verjaket • Armenian_vev • Armenian_vo • Armenian_vyun • Armenian_yech • Armenian_yentamna • Armenian_za • Armenian_zhe • Atilde • AudibleBell_Enable • B • Babovedot • BackSpace • Begin • BounceKeys_Enable • Break • Byelorussian_SHORTU • Byelorussian_shortu • C • Cabovedot • Cacute • Cancel • Caps_Lock • Ccaron • Ccedilla • Ccircumflex • Clear • Codeinput • ColonSign • Control_L • Control_R • CruzeiroSign • Cyrillic_A • Cyrillic_BE • Cyrillic_CHE • Cyrillic_CHE_descender

5.11. ooxcb.keysymdef 109 ooxcb Documentation, Release 1.2

• Cyrillic_CHE_vertstroke • Cyrillic_DE • Cyrillic_DZHE • Cyrillic_E • Cyrillic_EF • Cyrillic_EL • Cyrillic_EM • Cyrillic_EN • Cyrillic_EN_descender • Cyrillic_ER • Cyrillic_ES • Cyrillic_GHE • Cyrillic_GHE_bar • Cyrillic_HA • Cyrillic_HARDSIGN • Cyrillic_HA_descender • Cyrillic_I • Cyrillic_IE • Cyrillic_IO • Cyrillic_I_macron • Cyrillic_JE • Cyrillic_KA • Cyrillic_KA_descender • Cyrillic_KA_vertstroke • Cyrillic_LJE • Cyrillic_NJE • Cyrillic_O • Cyrillic_O_bar • Cyrillic_PE • Cyrillic_SCHWA • Cyrillic_SHA • Cyrillic_SHCHA • Cyrillic_SHHA • Cyrillic_SHORTI • Cyrillic_SOFTSIGN • Cyrillic_TE

110 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

• Cyrillic_TSE • Cyrillic_U • Cyrillic_U_macron • Cyrillic_U_straight • Cyrillic_U_straight_bar • Cyrillic_VE • Cyrillic_YA • Cyrillic_YERU • Cyrillic_YU • Cyrillic_ZE • Cyrillic_ZHE • Cyrillic_ZHE_descender • Cyrillic_a • Cyrillic_be • Cyrillic_che • Cyrillic_che_descender • Cyrillic_che_vertstroke • Cyrillic_de • Cyrillic_dzhe • Cyrillic_e • Cyrillic_ef • Cyrillic_el • Cyrillic_em • Cyrillic_en • Cyrillic_en_descender • Cyrillic_er • Cyrillic_es • Cyrillic_ghe • Cyrillic_ghe_bar • Cyrillic_ha • Cyrillic_ha_descender • Cyrillic_hardsign • Cyrillic_i • Cyrillic_i_macron • Cyrillic_ie • Cyrillic_io

5.11. ooxcb.keysymdef 111 ooxcb Documentation, Release 1.2

• Cyrillic_je • Cyrillic_ka • Cyrillic_ka_descender • Cyrillic_ka_vertstroke • Cyrillic_lje • Cyrillic_nje • Cyrillic_o • Cyrillic_o_bar • Cyrillic_pe • Cyrillic_schwa • Cyrillic_sha • Cyrillic_shcha • Cyrillic_shha • Cyrillic_shorti • Cyrillic_softsign • Cyrillic_te • Cyrillic_tse • Cyrillic_u • Cyrillic_u_macron • Cyrillic_u_straight • Cyrillic_u_straight_bar • Cyrillic_ve • Cyrillic_ya • Cyrillic_yeru • Cyrillic_yu • Cyrillic_ze • Cyrillic_zhe • Cyrillic_zhe_descender • D • Dabovedot • Dcaron • Delete • DongSign • Down • Dstroke • E

112 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

• ENG • ETH • Eabovedot • Eacute • Ebelowdot • Ecaron • Ecircumflex • Ecircumflexacute • Ecircumflexbelowdot • Ecircumflexgrave • Ecircumflexhook • Ecircumflextilde • EcuSign • Ediaeresis • Egrave • Ehook • Eisu_Shift • Eisu_toggle • Emacron • End • Eogonek • Escape • Eth • Etilde • EuroSign • Execute • F • F1 • F10 • F11 • F12 • F13 • F14 • F15 • F16 • F17

5.11. ooxcb.keysymdef 113 ooxcb Documentation, Release 1.2

• F18 • F19 • F2 • F20 • F21 • F22 • F23 • F24 • F25 • F26 • F27 • F28 • F29 • F3 • F30 • F31 • F32 • F33 • F34 • F35 • F4 • F5 • F6 • F7 • F8 • F9 • FFrancSign • Fabovedot • Farsi_0 • Farsi_1 • Farsi_2 • Farsi_3 • Farsi_4 • Farsi_5 • Farsi_6 • Farsi_7

114 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

• Farsi_8 • Farsi_9 • Farsi_yeh • Find • First_Virtual_Screen • G • Gabovedot • Gbreve • Gcaron • Gcedilla • Gcircumflex • Georgian_an • Georgian_ban • Georgian_can • Georgian_char • Georgian_chin • Georgian_cil • Georgian_don • Georgian_en • Georgian_fi • Georgian_gan • Georgian_ghan • Georgian_hae • Georgian_har • Georgian_he • Georgian_hie • Georgian_hoe • Georgian_in • Georgian_jhan • Georgian_jil • Georgian_kan • Georgian_khar • Georgian_las • Georgian_man • Georgian_nar • Georgian_on

5.11. ooxcb.keysymdef 115 ooxcb Documentation, Release 1.2

• Georgian_par • Georgian_phar • Georgian_qar • Georgian_rae • Georgian_san • Georgian_shin • Georgian_tan • Georgian_tar • Georgian_un • Georgian_vin • Georgian_we • Georgian_xan • Georgian_zen • Georgian_zhar • Greek_ALPHA • Greek_ALPHAaccent • Greek_BETA • Greek_CHI • Greek_DELTA • Greek_EPSILON • Greek_EPSILONaccent • Greek_ETA • Greek_ETAaccent • Greek_GAMMA • Greek_IOTA • Greek_IOTAaccent • Greek_IOTAdiaeresis • Greek_IOTAdieresis • Greek_KAPPA • Greek_LAMBDA • Greek_LAMDA • Greek_MU • Greek_NU • Greek_OMEGA • Greek_OMEGAaccent • Greek_OMICRON

116 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

• Greek_OMICRONaccent • Greek_PHI • Greek_PI • Greek_PSI • Greek_RHO • Greek_SIGMA • Greek_TAU • Greek_THETA • Greek_UPSILON • Greek_UPSILONaccent • Greek_UPSILONdieresis • Greek_XI • Greek_ZETA • Greek_accentdieresis • Greek_alpha • Greek_alphaaccent • Greek_beta • Greek_chi • Greek_delta • Greek_epsilon • Greek_epsilonaccent • Greek_eta • Greek_etaaccent • Greek_finalsmallsigma • Greek_gamma • Greek_horizbar • Greek_iota • Greek_iotaaccent • Greek_iotaaccentdieresis • Greek_iotadieresis • Greek_kappa • Greek_lambda • Greek_lamda • Greek_mu • Greek_nu • Greek_omega

5.11. ooxcb.keysymdef 117 ooxcb Documentation, Release 1.2

• Greek_omegaaccent • Greek_omicron • Greek_omicronaccent • Greek_phi • Greek_pi • Greek_psi • Greek_rho • Greek_sigma • Greek_switch • Greek_tau • Greek_theta • Greek_upsilon • Greek_upsilonaccent • Greek_upsilonaccentdieresis • Greek_upsilondieresis • Greek_xi • Greek_zeta • H • Hangul • Hangul_A • Hangul_AE • Hangul_AraeA • Hangul_AraeAE • Hangul_Banja • Hangul_Cieuc • Hangul_Codeinput • Hangul_Dikeud • Hangul_E • Hangul_EO • Hangul_EU • Hangul_End • Hangul_Hanja • Hangul_Hieuh • Hangul_I • Hangul_Ieung • Hangul_J_Cieuc

118 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

• Hangul_J_Dikeud • Hangul_J_Hieuh • Hangul_J_Ieung • Hangul_J_Jieuj • Hangul_J_Khieuq • Hangul_J_Kiyeog • Hangul_J_KiyeogSios • Hangul_J_KkogjiDalrinIeung • Hangul_J_Mieum • Hangul_J_Nieun • Hangul_J_NieunHieuh • Hangul_J_NieunJieuj • Hangul_J_PanSios • Hangul_J_Phieuf • Hangul_J_Pieub • Hangul_J_PieubSios • Hangul_J_Rieul • Hangul_J_RieulHieuh • Hangul_J_RieulKiyeog • Hangul_J_RieulMieum • Hangul_J_RieulPhieuf • Hangul_J_RieulPieub • Hangul_J_RieulSios • Hangul_J_RieulTieut • Hangul_J_Sios • Hangul_J_SsangKiyeog • Hangul_J_SsangSios • Hangul_J_Tieut • Hangul_J_YeorinHieuh • Hangul_Jamo • Hangul_Jeonja • Hangul_Jieuj • Hangul_Khieuq • Hangul_Kiyeog • Hangul_KiyeogSios • Hangul_KkogjiDalrinIeung

5.11. ooxcb.keysymdef 119 ooxcb Documentation, Release 1.2

• Hangul_Mieum • Hangul_MultipleCandidate • Hangul_Nieun • Hangul_NieunHieuh • Hangul_NieunJieuj • Hangul_O • Hangul_OE • Hangul_PanSios • Hangul_Phieuf • Hangul_Pieub • Hangul_PieubSios • Hangul_PostHanja • Hangul_PreHanja • Hangul_PreviousCandidate • Hangul_Rieul • Hangul_RieulHieuh • Hangul_RieulKiyeog • Hangul_RieulMieum • Hangul_RieulPhieuf • Hangul_RieulPieub • Hangul_RieulSios • Hangul_RieulTieut • Hangul_RieulYeorinHieuh • Hangul_Romaja • Hangul_SingleCandidate • Hangul_Sios • Hangul_Special • Hangul_SsangDikeud • Hangul_SsangJieuj • Hangul_SsangKiyeog • Hangul_SsangPieub • Hangul_SsangSios • Hangul_Start • Hangul_SunkyeongeumMieum • Hangul_SunkyeongeumPhieuf • Hangul_SunkyeongeumPieub

120 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

• Hangul_Tieut • Hangul_U • Hangul_WA • Hangul_WAE • Hangul_WE • Hangul_WEO • Hangul_WI • Hangul_YA • Hangul_YAE • Hangul_YE • Hangul_YEO • Hangul_YI • Hangul_YO • Hangul_YU • Hangul_YeorinHieuh • Hangul_switch • Hankaku • Hcircumflex • Hebrew_switch • Help • Henkan • Henkan_Mode • Hiragana • Hiragana_Katakana • Home • Hstroke • Hyper_L • Hyper_R • I • ISO_Center_Object • ISO_Continuous_Underline • ISO_Discontinuous_Underline • ISO_Emphasize • ISO_Enter • ISO_Fast_Cursor_Down • ISO_Fast_Cursor_Left

5.11. ooxcb.keysymdef 121 ooxcb Documentation, Release 1.2

• ISO_Fast_Cursor_Right • ISO_Fast_Cursor_Up • ISO_First_Group • ISO_First_Group_Lock • ISO_Group_Latch • ISO_Group_Lock • ISO_Group_Shift • ISO_Last_Group • ISO_Last_Group_Lock • ISO_Left_Tab • ISO_Level2_Latch • ISO_Level3_Latch • ISO_Level3_Lock • ISO_Level3_Shift • ISO_Level5_Latch • ISO_Level5_Lock • ISO_Level5_Shift • ISO_Lock • ISO_Move_Line_Down • ISO_Move_Line_Up • ISO_Next_Group • ISO_Next_Group_Lock • ISO_Partial_Line_Down • ISO_Partial_Line_Up • ISO_Partial_Space_Left • ISO_Partial_Space_Right • ISO_Prev_Group • ISO_Prev_Group_Lock • ISO_Release_Both_Margins • ISO_Release_Margin_Left • ISO_Release_Margin_Right • ISO_Set_Margin_Left • ISO_Set_Margin_Right • Iabovedot • Iacute • Ibelowdot

122 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

• Ibreve • Icircumflex • Idiaeresis • Igrave • Ihook • Imacron • Insert • Iogonek • Itilde • J • Jcircumflex • K • KP_0 • KP_1 • KP_2 • KP_3 • KP_4 • KP_5 • KP_6 • KP_7 • KP_8 • KP_9 • KP_Add • KP_Begin • KP_Decimal • KP_Delete • KP_Divide • KP_Down • KP_End • KP_Enter • KP_Equal • KP_F1 • KP_F2 • KP_F3 • KP_F4 • KP_Home

5.11. ooxcb.keysymdef 123 ooxcb Documentation, Release 1.2

• KP_Insert • KP_Left • KP_Multiply • KP_Next • KP_Page_Down • KP_Page_Up • KP_Prior • KP_Right • KP_Separator • KP_Space • KP_Subtract • KP_Tab • KP_Up • Kana_Lock • Kana_Shift • Kanji • Kanji_Bangou • Katakana • Kcedilla • Korean_Won • L • L1 • L10 • L2 • L3 • L4 • L5 • L6 • L7 • L8 • L9 • Lacute • Last_Virtual_Screen • Lbelowdot • Lcaron • Lcedilla

124 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

• Left • Linefeed • LiraSign • Lstroke • M • Mabovedot • Macedonia_DSE • Macedonia_GJE • Macedonia_KJE • Macedonia_dse • Macedonia_gje • Macedonia_kje • Mae_Koho • Massyo • Menu • Meta_L • Meta_R • MillSign • Mode_switch • MouseKeys_Accel_Enable • MouseKeys_Enable • Muhenkan • Multi_key • MultipleCandidate • N • Nacute • NairaSign • Ncaron • Ncedilla • NewSheqelSign • Next • Next_Virtual_Screen • Ntilde • Num_Lock • O • OE

5.11. ooxcb.keysymdef 125 ooxcb Documentation, Release 1.2

• Oacute • Obarred • Obelowdot • Ocaron • Ocircumflex • Ocircumflexacute • Ocircumflexbelowdot • Ocircumflexgrave • Ocircumflexhook • Ocircumflextilde • Odiaeresis • Odoubleacute • Ograve • Ohook • Ohorn • Ohornacute • Ohornbelowdot • Ohorngrave • Ohornhook • Ohorntilde • Omacron • Ooblique • Oslash • Otilde • Overlay1_Enable • Overlay2_Enable • P • Pabovedot • Page_Down • Page_Up • Pause • PesetaSign • Pointer_Accelerate • Pointer_Button1 • Pointer_Button2 • Pointer_Button3

126 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

• Pointer_Button4 • Pointer_Button5 • Pointer_Button_Dflt • Pointer_DblClick1 • Pointer_DblClick2 • Pointer_DblClick3 • Pointer_DblClick4 • Pointer_DblClick5 • Pointer_DblClick_Dflt • Pointer_DfltBtnNext • Pointer_DfltBtnPrev • Pointer_Down • Pointer_DownLeft • Pointer_DownRight • Pointer_Drag1 • Pointer_Drag2 • Pointer_Drag3 • Pointer_Drag4 • Pointer_Drag5 • Pointer_Drag_Dflt • Pointer_EnableKeys • Pointer_Left • Pointer_Right • Pointer_Up • Pointer_UpLeft • Pointer_UpRight • Prev_Virtual_Screen • PreviousCandidate • Print • Prior • Q • R • R1 • R10 • R11 • R12

5.11. ooxcb.keysymdef 127 ooxcb Documentation, Release 1.2

• R13 • R14 • R15 • R2 • R3 • R4 • R5 • R6 • R7 • R8 • R9 • Racute • Rcaron • Rcedilla • Redo • RepeatKeys_Enable • Return • Right • Romaji • RupeeSign • S • SCHWA • Sabovedot • Sacute • Scaron • Scedilla • Scircumflex • Scroll_Lock • Select • Serbian_DJE • Serbian_DZE • Serbian_JE • Serbian_LJE • Serbian_NJE • Serbian_TSHE • Serbian_dje

128 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

• Serbian_dze • Serbian_je • Serbian_lje • Serbian_nje • Serbian_tshe • Shift_L • Shift_Lock • Shift_R • SingleCandidate • SlowKeys_Enable • StickyKeys_Enable • Super_L • Super_R • Sys_Req • T • THORN • Tab • Tabovedot • Tcaron • Tcedilla • Terminate_Server • Thai_baht • Thai_bobaimai • Thai_chochan • Thai_chochang • Thai_choching • Thai_chochoe • Thai_dochada • Thai_dodek • Thai_fofa • Thai_fofan • Thai_hohip • Thai_honokhuk • Thai_khokhai • Thai_khokhon • Thai_khokhuat

5.11. ooxcb.keysymdef 129 ooxcb Documentation, Release 1.2

• Thai_khokhwai • Thai_khorakhang • Thai_kokai • Thai_lakkhangyao • Thai_lekchet • Thai_lekha • Thai_lekhok • Thai_lekkao • Thai_leknung • Thai_lekpaet • Thai_leksam • Thai_leksi • Thai_leksong • Thai_leksun • Thai_lochula • Thai_loling • Thai_lu • Thai_maichattawa • Thai_maiek • Thai_maihanakat • Thai_maihanakat_maitho • Thai_maitaikhu • Thai_maitho • Thai_maitri • Thai_maiyamok • Thai_moma • Thai_ngongu • Thai_nikhahit • Thai_nonen • Thai_nonu • Thai_oang • Thai_paiyannoi • Thai_phinthu • Thai_phophan • Thai_phophung • Thai_phosamphao

130 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

• Thai_popla • Thai_rorua • Thai_ru • Thai_saraa • Thai_saraaa • Thai_saraae • Thai_saraaimaimalai • Thai_saraaimaimuan • Thai_saraam • Thai_sarae • Thai_sarai • Thai_saraii • Thai_sarao • Thai_sarau • Thai_saraue • Thai_sarauee • Thai_sarauu • Thai_sorusi • Thai_sosala • Thai_soso • Thai_sosua • Thai_thanthakhat • Thai_thonangmontho • Thai_thophuthao • Thai_thothahan • Thai_thothan • Thai_thothong • Thai_thothung • Thai_topatak • Thai_totao • Thai_wowaen • Thai_yoyak • Thai_yoying • Thorn • Touroku • Tslash

5.11. ooxcb.keysymdef 131 ooxcb Documentation, Release 1.2

• U • Uacute • Ubelowdot • Ubreve • Ucircumflex • Udiaeresis • Udoubleacute • Ugrave • Uhook • Uhorn • Uhornacute • Uhornbelowdot • Uhorngrave • Uhornhook • Uhorntilde • Ukrainian_GHE_WITH_UPTURN • Ukrainian_I • Ukrainian_IE • Ukrainian_YI • Ukrainian_ghe_with_upturn • Ukrainian_i • Ukrainian_ie • Ukrainian_yi • Ukranian_I • Ukranian_JE • Ukranian_YI • Ukranian_i • Ukranian_je • Ukranian_yi • Umacron • Undo • Uogonek • Up • Uring • Utilde • V

132 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

• VoidSymbol • W • Wacute • Wcircumflex • Wdiaeresis • Wgrave • WonSign • X • Xabovedot • Y • Yacute • Ybelowdot • Ycircumflex • Ydiaeresis • Ygrave • Yhook • Ytilde • Z • Zabovedot • Zacute • Zcaron • Zen_Koho • Zenkaku • Zenkaku_Hankaku • Zstroke • a • aacute • abelowdot • abovedot • abreve • abreveacute • abrevebelowdot • abrevegrave • abrevehook • abrevetilde • acircumflex

5.11. ooxcb.keysymdef 133 ooxcb Documentation, Release 1.2

• acircumflexacute • acircumflexbelowdot • acircumflexgrave • acircumflexhook • acircumflextilde • acute • adiaeresis • ae • agrave • ahook • amacron • ampersand • aogonek • apostrophe • approxeq • approximate • aring • asciicircum • asciitilde • asterisk • at • atilde • b • babovedot • backslash • ballotcross • bar • because • blank • botintegral • botleftparens • botleftsqbracket • botleftsummation • botrightparens • botrightsqbracket • botrightsummation

134 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

• bott • botvertsummationconnector • braceleft • braceright • bracketleft • bracketright • braille_blank • braille_dot_1 • braille_dot_10 • braille_dot_2 • braille_dot_3 • braille_dot_4 • braille_dot_5 • braille_dot_6 • braille_dot_7 • braille_dot_8 • braille_dot_9 • braille_dots_1 • braille_dots_12 • braille_dots_123 • braille_dots_1234 • braille_dots_12345 • braille_dots_123456 • braille_dots_1234567 • braille_dots_12345678 • braille_dots_1234568 • braille_dots_123457 • braille_dots_1234578 • braille_dots_123458 • braille_dots_12346 • braille_dots_123467 • braille_dots_1234678 • braille_dots_123468 • braille_dots_12347 • braille_dots_123478 • braille_dots_12348

5.11. ooxcb.keysymdef 135 ooxcb Documentation, Release 1.2

• braille_dots_1235 • braille_dots_12356 • braille_dots_123567 • braille_dots_1235678 • braille_dots_123568 • braille_dots_12357 • braille_dots_123578 • braille_dots_12358 • braille_dots_1236 • braille_dots_12367 • braille_dots_123678 • braille_dots_12368 • braille_dots_1237 • braille_dots_12378 • braille_dots_1238 • braille_dots_124 • braille_dots_1245 • braille_dots_12456 • braille_dots_124567 • braille_dots_1245678 • braille_dots_124568 • braille_dots_12457 • braille_dots_124578 • braille_dots_12458 • braille_dots_1246 • braille_dots_12467 • braille_dots_124678 • braille_dots_12468 • braille_dots_1247 • braille_dots_12478 • braille_dots_1248 • braille_dots_125 • braille_dots_1256 • braille_dots_12567 • braille_dots_125678 • braille_dots_12568

136 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

• braille_dots_1257 • braille_dots_12578 • braille_dots_1258 • braille_dots_126 • braille_dots_1267 • braille_dots_12678 • braille_dots_1268 • braille_dots_127 • braille_dots_1278 • braille_dots_128 • braille_dots_13 • braille_dots_134 • braille_dots_1345 • braille_dots_13456 • braille_dots_134567 • braille_dots_1345678 • braille_dots_134568 • braille_dots_13457 • braille_dots_134578 • braille_dots_13458 • braille_dots_1346 • braille_dots_13467 • braille_dots_134678 • braille_dots_13468 • braille_dots_1347 • braille_dots_13478 • braille_dots_1348 • braille_dots_135 • braille_dots_1356 • braille_dots_13567 • braille_dots_135678 • braille_dots_13568 • braille_dots_1357 • braille_dots_13578 • braille_dots_1358 • braille_dots_136

5.11. ooxcb.keysymdef 137 ooxcb Documentation, Release 1.2

• braille_dots_1367 • braille_dots_13678 • braille_dots_1368 • braille_dots_137 • braille_dots_1378 • braille_dots_138 • braille_dots_14 • braille_dots_145 • braille_dots_1456 • braille_dots_14567 • braille_dots_145678 • braille_dots_14568 • braille_dots_1457 • braille_dots_14578 • braille_dots_1458 • braille_dots_146 • braille_dots_1467 • braille_dots_14678 • braille_dots_1468 • braille_dots_147 • braille_dots_1478 • braille_dots_148 • braille_dots_15 • braille_dots_156 • braille_dots_1567 • braille_dots_15678 • braille_dots_1568 • braille_dots_157 • braille_dots_1578 • braille_dots_158 • braille_dots_16 • braille_dots_167 • braille_dots_1678 • braille_dots_168 • braille_dots_17 • braille_dots_178

138 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

• braille_dots_18 • braille_dots_2 • braille_dots_23 • braille_dots_234 • braille_dots_2345 • braille_dots_23456 • braille_dots_234567 • braille_dots_2345678 • braille_dots_234568 • braille_dots_23457 • braille_dots_234578 • braille_dots_23458 • braille_dots_2346 • braille_dots_23467 • braille_dots_234678 • braille_dots_23468 • braille_dots_2347 • braille_dots_23478 • braille_dots_2348 • braille_dots_235 • braille_dots_2356 • braille_dots_23567 • braille_dots_235678 • braille_dots_23568 • braille_dots_2357 • braille_dots_23578 • braille_dots_2358 • braille_dots_236 • braille_dots_2367 • braille_dots_23678 • braille_dots_2368 • braille_dots_237 • braille_dots_2378 • braille_dots_238 • braille_dots_24 • braille_dots_245

5.11. ooxcb.keysymdef 139 ooxcb Documentation, Release 1.2

• braille_dots_2456 • braille_dots_24567 • braille_dots_245678 • braille_dots_24568 • braille_dots_2457 • braille_dots_24578 • braille_dots_2458 • braille_dots_246 • braille_dots_2467 • braille_dots_24678 • braille_dots_2468 • braille_dots_247 • braille_dots_2478 • braille_dots_248 • braille_dots_25 • braille_dots_256 • braille_dots_2567 • braille_dots_25678 • braille_dots_2568 • braille_dots_257 • braille_dots_2578 • braille_dots_258 • braille_dots_26 • braille_dots_267 • braille_dots_2678 • braille_dots_268 • braille_dots_27 • braille_dots_278 • braille_dots_28 • braille_dots_3 • braille_dots_34 • braille_dots_345 • braille_dots_3456 • braille_dots_34567 • braille_dots_345678 • braille_dots_34568

140 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

• braille_dots_3457 • braille_dots_34578 • braille_dots_3458 • braille_dots_346 • braille_dots_3467 • braille_dots_34678 • braille_dots_3468 • braille_dots_347 • braille_dots_3478 • braille_dots_348 • braille_dots_35 • braille_dots_356 • braille_dots_3567 • braille_dots_35678 • braille_dots_3568 • braille_dots_357 • braille_dots_3578 • braille_dots_358 • braille_dots_36 • braille_dots_367 • braille_dots_3678 • braille_dots_368 • braille_dots_37 • braille_dots_378 • braille_dots_38 • braille_dots_4 • braille_dots_45 • braille_dots_456 • braille_dots_4567 • braille_dots_45678 • braille_dots_4568 • braille_dots_457 • braille_dots_4578 • braille_dots_458 • braille_dots_46 • braille_dots_467

5.11. ooxcb.keysymdef 141 ooxcb Documentation, Release 1.2

• braille_dots_4678 • braille_dots_468 • braille_dots_47 • braille_dots_478 • braille_dots_48 • braille_dots_5 • braille_dots_56 • braille_dots_567 • braille_dots_5678 • braille_dots_568 • braille_dots_57 • braille_dots_578 • braille_dots_58 • braille_dots_6 • braille_dots_67 • braille_dots_678 • braille_dots_68 • braille_dots_7 • braille_dots_78 • braille_dots_8 • breve • brokenbar • c • cabovedot • cacute • careof • caret • caron • ccaron • ccedilla • ccircumflex • cedilla • cent • checkerboard • checkmark • circle

142 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

• club • colon • comma • containsas • copyright • cr • crossinglines • cuberoot • currency • cursor • d • dabovedot • dagger • dcaron • dead_A • dead_E • dead_I • dead_O • dead_U • dead_a • dead_abovecomma • dead_abovedot • dead_abovereversedcomma • dead_abovering • dead_acute • dead_belowbreve • dead_belowcircumflex • dead_belowcomma • dead_belowdiaeresis • dead_belowdot • dead_belowmacron • dead_belowring • dead_belowtilde • dead_breve • dead_capital_schwa • dead_caron

5.11. ooxcb.keysymdef 143 ooxcb Documentation, Release 1.2

• dead_cedilla • dead_circumflex • dead_currency • dead_dasia • dead_diaeresis • dead_doubleacute • dead_doublegrave • dead_e • dead_grave • dead_hook • dead_horn • dead_i • dead_invertedbreve • dead_iota • dead_macron • dead_o • dead_ogonek • dead_perispomeni • dead_psili • dead_semivoiced_sound • dead_small_schwa • dead_stroke • dead_tilde • dead_u • dead_voiced_sound • decimalpoint • degree • diaeresis • diamond • digitspace • dintegral • division • dollar • doubbaselinedot • doubleacute • doubledagger

144 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

• doublelowquotemark • downarrow • downcaret • downshoe • downstile • downtack • dstroke • e • eabovedot • eacute • ebelowdot • ecaron • ecircumflex • ecircumflexacute • ecircumflexbelowdot • ecircumflexgrave • ecircumflexhook • ecircumflextilde • ediaeresis • egrave • ehook • eightsubscript • eightsuperior • elementof • ellipsis • em3space • em4space • emacron • emdash • emfilledcircle • emfilledrect • emopencircle • emopenrectangle • emptyset • emspace • endash

5.11. ooxcb.keysymdef 145 ooxcb Documentation, Release 1.2

• enfilledcircbullet • enfilledsqbullet • eng • enopencircbullet • enopensquarebullet • enspace • eogonek • equal • eth • etilde • exclam • exclamdown • f • fabovedot • femalesymbol • ff • figdash • filledlefttribullet • filledrectbullet • filledrighttribullet • filledtribulletdown • filledtribulletup • fiveeighths • fivesixths • fivesubscript • fivesuperior • fourfifths • foursubscript • foursuperior • fourthroot • function • g • gabovedot • gbreve • gcaron • gcedilla

146 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

• gcircumflex • grave • greater • greaterthanequal • guillemotleft • guillemotright • h • hairspace • hcircumflex • heart • hebrew_aleph • hebrew_ayin • hebrew_bet • hebrew_beth • hebrew_chet • hebrew_dalet • hebrew_daleth • hebrew_doublelowline • hebrew_finalkaph • hebrew_finalmem • hebrew_finalnun • hebrew_finalpe • hebrew_finalzade • hebrew_finalzadi • hebrew_gimel • hebrew_gimmel • hebrew_he • hebrew_het • hebrew_kaph • hebrew_kuf • hebrew_lamed • hebrew_mem • hebrew_nun • hebrew_pe • hebrew_qoph • hebrew_resh

5.11. ooxcb.keysymdef 147 ooxcb Documentation, Release 1.2

• hebrew_samech • hebrew_samekh • hebrew_shin • hebrew_taf • hebrew_taw • hebrew_tet • hebrew_teth • hebrew_waw • hebrew_yod • hebrew_zade • hebrew_zadi • hebrew_zain • hebrew_zayin • hexagram • horizconnector • horizlinescan1 • horizlinescan3 • horizlinescan5 • horizlinescan7 • horizlinescan9 • hstroke • ht • hyphen • i • iacute • ibelowdot • ibreve • icircumflex • identical • idiaeresis • idotless • ifonlyif • igrave • ihook • imacron • implies

148 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

• includedin • includes • infinity • integral • intersection • iogonek • itilde • j • jcircumflex • jot • k • kana_A • kana_CHI • kana_E • kana_FU • kana_HA • kana_HE • kana_HI • kana_HO • kana_HU • kana_I • kana_KA • kana_KE • kana_KI • kana_KO • kana_KU • kana_MA • kana_ME • kana_MI • kana_MO • kana_MU • kana_N • kana_NA • kana_NE • kana_NI • kana_NO

5.11. ooxcb.keysymdef 149 ooxcb Documentation, Release 1.2

• kana_NU • kana_O • kana_RA • kana_RE • kana_RI • kana_RO • kana_RU • kana_SA • kana_SE • kana_SHI • kana_SO • kana_SU • kana_TA • kana_TE • kana_TI • kana_TO • kana_TSU • kana_TU • kana_U • kana_WA • kana_WO • kana_YA • kana_YO • kana_YU • kana_a • kana_closingbracket • kana_comma • kana_conjunctive • kana_e • kana_fullstop • kana_i • kana_middledot • kana_o • kana_openingbracket • kana_switch • kana_tsu

150 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

• kana_tu • kana_u • kana_ya • kana_yo • kana_yu • kappa • kcedilla • kra • l • lacute • latincross • lbelowdot • lcaron • lcedilla • leftanglebracket • leftarrow • leftcaret • leftdoublequotemark • leftmiddlecurlybrace • leftopentriangle • leftpointer • leftradical • leftshoe • leftsinglequotemark • leftt • lefttack • less • lessthanequal • lf • logicaland • logicalor • lowleftcorner • lowrightcorner • lstroke • m • mabovedot

5.11. ooxcb.keysymdef 151 ooxcb Documentation, Release 1.2

• macron • malesymbol • maltesecross • marker • masculine • minus • minutes • mu • multiply • musicalflat • musicalsharp • n • nabla • nacute • ncaron • ncedilla • ninesubscript • ninesuperior • nl • nobreakspace • notapproxeq • notelementof • notequal • notidentical • notsign • ntilde • numbersign • numerosign • o • oacute • obarred • obelowdot • ocaron • ocircumflex • ocircumflexacute • ocircumflexbelowdot

152 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

• ocircumflexgrave • ocircumflexhook • ocircumflextilde • odiaeresis • odoubleacute • oe • ogonek • ograve • ohook • ohorn • ohornacute • ohornbelowdot • ohorngrave • ohornhook • ohorntilde • omacron • oneeighth • onefifth • onehalf • onequarter • onesixth • onesubscript • onesuperior • onethird • ooblique • openrectbullet • openstar • opentribulletdown • opentribulletup • ordfeminine • oslash • otilde • overbar • overline • p • pabovedot

5.11. ooxcb.keysymdef 153 ooxcb Documentation, Release 1.2

• paragraph • parenleft • parenright • partdifferential • partialderivative • percent • period • periodcentered • phonographcopyright • plus • plusminus • prescription • prolongedsound • punctspace • q • quad • question • questiondown • quotedbl • quoteleft • quoteright • r • racute • radical • rcaron • rcedilla • registered • rightanglebracket • rightarrow • rightcaret • rightdoublequotemark • rightmiddlecurlybrace • rightmiddlesummation • rightopentriangle • rightpointer • rightshoe

154 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

• rightsinglequotemark • rightt • righttack • s • sabovedot • sacute • scaron • scedilla • schwa • scircumflex • script_switch • seconds • section • semicolon • semivoicedsound • seveneighths • sevensubscript • sevensuperior • signaturemark • signifblank • similarequal • singlelowquotemark • sixsubscript • sixsuperior • slash • soliddiamond • space • squareroot • ssharp • sterling • stricteq • t • tabovedot • tcaron • tcedilla • telephone

5.11. ooxcb.keysymdef 155 ooxcb Documentation, Release 1.2

• telephonerecorder • therefore • thinspace • thorn • threeeighths • threefifths • threequarters • threesubscript • threesuperior • tintegral • topintegral • topleftparens • topleftradical • topleftsqbracket • topleftsummation • toprightparens • toprightsqbracket • toprightsummation • topt • topvertsummationconnector • trademark • trademarkincircle • tslash • twofifths • twosubscript • twosuperior • twothirds • u • uacute • ubelowdot • ubreve • ucircumflex • udiaeresis • udoubleacute • ugrave • uhook

156 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

• uhorn • uhornacute • uhornbelowdot • uhorngrave • uhornhook • uhorntilde • umacron • underbar • underscore • union • uogonek • uparrow • upcaret • upleftcorner • uprightcorner • upshoe • upstile • uptack • uring • utilde • v • variation • vertbar • vertconnector • voicedsound • vt • w • wacute • wcircumflex • wdiaeresis • wgrave • x • xabovedot • y • yacute • ybelowdot

5.11. ooxcb.keysymdef 157 ooxcb Documentation, Release 1.2

• ycircumflex • ydiaeresis • yen • ygrave • yhook • ytilde • z • zabovedot • zacute • zcaron • zerosubscript • zerosuperior • zstroke

5.12 ooxcb.keysyms

This module is a direct C -> Python port of the keysyms module from xcb-util which can be found here: http://cgit.freedesktop.org/xcb/util xcb-keysyms license: Copyright © 2008 Ian Osgood Copyright © 2008 Jamey Sharp Copyright © 2008 Josh Triplett Copyright © 2008 Ulrich Eckhardt

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Except as contained in this notice, the names of the authors or their institutions shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from the authors.

158 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2 ooxcb.keysyms.X_KEYS list of X key names class ooxcb.keysyms.Keysyms(conn) a simple helper for keycodes and keysyms. get_keycode(keysym) return the corresponding keycode for keysym or None. get_keysym(keycode, col) return the corresponding keysym for keycode in column col. Todo no error checking for now :) ooxcb.keysyms.convert_case(sym) return (lower, upper) for internal use. Note direct port of http://cgit.freedesktop.org/xcb/util/tree/keysyms/keysyms.c#n361 ooxcb.keysyms.keysym_to_char(keysym) try to convert keysym (an int) to a character and return it as an unicode string. If it couldn’t be converted or keysym is NoSymbol / VoidSymbol, a ConversionError is raised. The approach is described in http://www.cl.cam.ac.uk/~mgk25/ucs/X11.keysyms.pdf. It is able to convert latin-1, unicode and legacy keysyms. Special, function and vendor keysyms will raise a ConversionError. ooxcb.keysyms.keysym_to_str(keysym) convert a keysym to its equivalent character or key description and return it. Returns an empty for an unknown keysym. That’s just a shortcut for ooxcb.keysymdef.

5.13 ooxcb.libxcb

This module contains some auto-generated wrapper functions for libxcb. It is generated by pyglet‘s wraptypes. todo not everything is documented yet. ooxcb.libxcb.xcb_connection_t alias of struct_xcb_connection_t ooxcb.libxcb.xcb_generic_iterator_t alias of struct_anon_25 ooxcb.libxcb.xcb_generic_reply_t alias of struct_anon_26 ooxcb.libxcb.xcb_generic_event_t alias of struct_anon_27 ooxcb.libxcb.xcb_ge_event_t alias of struct_anon_28 ooxcb.libxcb.xcb_generic_error_t alias of struct_anon_29 ooxcb.libxcb.xcb_void_cookie_t alias of struct_anon_30 ooxcb.libxcb.xcb_auth_info_t alias of struct_xcb_auth_info_t ooxcb.libxcb.xcb_extension_t alias of struct_xcb_extension_t

5.13. ooxcb.libxcb 159 ooxcb Documentation, Release 1.2 ooxcb.libxcb.xcb_protocol_request_t alias of struct_anon_31

5.14 ooxcb.list class ooxcb.list.List(conn, stream, length, type, size=-1) List is a list subclass that reads its members from a memory stream. It also provides with methods to convert this data to more useful values. static from_atoms(atoms) returns an ordinary Python list that contains the atom ids of the atoms in atoms. Note Actually that’s the same as from_resources(). But explicit is better than implicit ... static from_resources(resources) returns an ordinary Python list that contains the X ids of the resources in resources. static from_string(string) returns a Python list containing the ordinal values of string‘s chars (should also for unicode objects) static from_stringlist(stringlist) returns a Python list containing the ordinal values of each string in stringlist, all of them linked together by x00 bytes and with a trailing x00 byte. to_atoms() my value is a list of atom ids, return a list of Atom instances. to_resources(cls) interpret the data as a homogenous list of X ids. Parameters cls – The resource class to instantiate if the corresponding X id couldn’t be found in the cache. Returns a list of cls instances to_string() my value is a list of ordinal values; return the string. to_utf8() interpret the string returned by to_string() as utf-8 and return a Python unicode object. to_windows() I am a list of ooxcb.protocol.xproto.Window Ids. Just a shortcut for to_resources().

5.15 ooxcb.memstream class ooxcb.memstream.MemoryInputStream(address) MemoryInputStream is an object implementing the buffer interface which reads its data from a certain memory buffer. It is interpreted as an infinite array of 8-bit chars. This stream is used for ooxcb protocol parsing. address close() closed fileno() We are not using a file descriptor

160 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

flush() isatty() read(b=None) readable() readall() readinto(b) readline(limit) readlines(hint) seek(offset, whence=0) Currently you can not use whence=2. The stream has no end. seekable() tell() truncate() That’s a no-op here. I can’t think of anyone needing that for a memory buffer, really. However, it will raise a NotImplementedError. But we can remove that. writable() write(b)

5.16 ooxcb.protobj

class ooxcb.protobj.Error(conn) An error is a special kind of response that is used when an error occured. It will be “packed into” a Python exception in Error.set(). classmethod set(conn, err) raise the right exception for the ooxcb.libxcb.xcb_generic_error_t struct err if it is an error. Parameters err – a ctypes pointer to a ooxcb.libxcb.xcb_generic_error_t. class ooxcb.protobj.Event(conn) An event is a special kind of response. And in ooxcb, it comes with a builtin ability to be dispatched. For that purpose, every Event subclass has an event_name member. That’s the name of the event, e.g. ‘on_configure_notify’. It is ‘on_event’ as fallback here, so if you stumble upon ‘on_event’ somewhere, there is something wrong. So, if you want to dispatch an event, just call dispatch(). A typical line in the main loop would then be: conn.wait_for_event().dispatch()

which will automatically dispatch every received event. Every event will be dispatched to an appropriate target, e.g. a ooxcb.xproto.ButtonPressEvent will be dispatched to the window the event happened in. The targets are defined in the interface files. The fallback target is the connection. If you want to know which event types a class receives, you can access the event_types attribute that is a list of event names. If you want to know the event target of an event, you can access its event_target attribute.

5.16. ooxcb.protobj 161 ooxcb Documentation, Release 1.2

Every event is sent with the event itself as the first and only argument. So all ooxcb event handlers have the following signature: def on_blabla(evt)

dispatch() dispatch self to my event target class ooxcb.protobj.Protobj(conn) Base class for all protocol objects. create_lazy None as default, but it can be a classmethod used to create a Protobj instance lazily for convenience. See ooxcb.builder.build_list() pythonize_lazy None as default, but if it can be a method used to pythonize a protocol object lazily if it’s inside a list. See ooxcb.list.List classmethod create_from_address(conn, address) Parameters address – an int pointing to the data in the memory classmethod create_from_stream(conn, stream) Parameters stream – a stream-like object to read from. read(stream) Placeholder for subclasses. :param stream: an object providing a buffer interface. Read myself from that stream! read_from_address(address) parse the memory at address class ooxcb.protobj.Reply(conn) a reply is a response.Response subclass. length The reply length. class ooxcb.protobj.Request(conn, buffer, opcode, void, checked) mostly just a value holder for ooxcb.ext.Extension.send_request() class ooxcb.protobj.Response(conn) a response wrapper. Had a sequence getter in the past, but it isn’t used. If it should be added again, file a bug. class ooxcb.protobj.Struct(conn) also just a subclass of protobj.Protobj. Nothing special here. class ooxcb.protobj.Union(conn) the baseclass for Unions. Nothing special.

5.17 ooxcb.resource class ooxcb.resource.Resource(conn, xid) A resource is nearly every object in the X world having an X ID: Windows, Graphics Contexts, Fonts ... Except atoms. Atoms are not part of the XID space, and they have a separate cache. Each resource has an xid attribute. It can also be accessed by get_internal().

162 Chapter 5. ooxcb api documentation ooxcb Documentation, Release 1.2

Resources are also ooxcb.eventsys.EventDispatcher subclasses. get_internal() The internal representation of a resource is its X id. Return it. ooxcb.resource.get_internal(obj) get the stream-ready internal representation of obj. There are multiple possible cases: •If obj has a get_internal method, the return value of that will be returned. •If obj is an int, it will be returned immediately. •If obj is None, 0 will be returned. •If obj is something else, a ProtocolDataError will be raised.

5.18 ooxcb.types ooxcb.types.build_list(conn, stream, list_, type) writes a list_ of objects of the elementar data type type (where type is a struct-compatible type char) to stream. For each item, this checks if the item is a ooxcb.protobj.Protobj. If it is, the object’s build method is called. ooxcb.types.make_array(data, typecode) return a packed representation of the data data. Parameters data: list or str or unicode should be a list of numeric values, each item suitable for the given typecode. If it’s a str or unicode instance, each char is converted to its ordinal value and then packed. Any element’s get_internal method will be called if present. typecode: str one of: • ‘b’, 8 bit signed • ‘B’, 8 bit unsigned • ‘h’, 16 bit signed, • ‘H’, 16 bit unsigned • ‘i’, 32 bit signed • ‘I’, 32 bit unsigned • ‘f’, float • ‘d’, double Returns a string ooxcb.types.make_void_array(data, format) Return a packed representation of the data data. The only difference to make_array is that you pass the count of bytes per value to make_void_array, and all values are treated as unsigned. Parameters format – the count of bits to pack per value, one of 8, 16, 32.

5.18. ooxcb.types 163 ooxcb Documentation, Release 1.2

5.19 ooxcb.util

ooxcb.util.Mixin alias of __init__ class ooxcb.util.MixinMeta a metaclass for mixin classes that transforms all methods to static methods. So the user is able to mix them into the class or to call them manually if he wants that. class ooxcb.util.cached_classproperty(func) a modified version of cached_property that allows to define cached properties on classes. class ooxcb.util.cached_property(func) A simple cached property descriptor. from http://ronny.uberhost.de/simple-cached-for-properties-done-right ooxcb.util.mixin_functions(functions, into) Add all functions in functions to the class into.

164 Chapter 5. ooxcb api documentation CHAPTER 6

Indices and tables

• genindex • modindex • search

165 ooxcb Documentation, Release 1.2

166 Chapter 6. Indices and tables Python Module Index

o ooxcb, ?? ooxcb.atoms, ?? ooxcb.conn, ?? ooxcb.constant, ?? ooxcb.contrib.cairo, ?? ooxcb.contrib.cursors, ?? ooxcb.contrib.ewmh, ?? ooxcb.contrib.icccm, ?? ooxcb.contrib.pil, ?? ooxcb.contrib.sizehints, ?? ooxcb.cookie, ?? ooxcb.eventsys, ?? ooxcb.exception, ?? ooxcb.ext, ?? ooxcb.keysymdef, ?? ooxcb.keysyms, ?? ooxcb.libxcb, ?? ooxcb.list, ?? ooxcb.memstream, ?? ooxcb.protobj, ?? ooxcb.protocol.bigreq, ?? ooxcb.protocol.composite, ?? ooxcb.protocol.damage, ?? ooxcb.protocol.record, ?? ooxcb.protocol.render, ?? ooxcb.protocol.screensaver, ?? ooxcb.protocol.shape, ?? ooxcb.protocol.xfixes, ?? ooxcb.protocol.xproto, ?? ooxcb.protocol.xtest, ?? ooxcb.resource, ?? ooxcb.types, ?? ooxcb.util, ??

167