summaryrefslogtreecommitdiff
path: root/atom
diff options
context:
space:
mode:
authorIan Osgood <iano@quirkster.com>2006-09-24 13:34:03 -0700
committerIan Osgood <iano@quirkster.com>2006-09-24 13:34:03 -0700
commit15c55898f203bcb3ef1ca67fb09d5e9405949543 (patch)
tree6929287f5ede13ba1dcc8a15161f1ca144fae0ff /atom
parentb902f41214d6da43a4069659ab06ebccc295a6ab (diff)
All xcb-util libraries compile after the Great Renaming.
Many of the exported library functions still need to follow the new convention.
Diffstat (limited to 'atom')
-rw-r--r--atom/atoms.gperf.m440
-rw-r--r--atom/xcb_atom.h.m416
2 files changed, 28 insertions, 28 deletions
diff --git a/atom/atoms.gperf.m4 b/atom/atoms.gperf.m4
index a628097..9a4e889 100644
--- a/atom/atoms.gperf.m4
+++ b/atom/atoms.gperf.m4
@@ -4,7 +4,7 @@
#include "xcb_atom.h"
define(`COUNT', 0)dnl
-define(`DO', `const XCBATOM $1 = { define(`COUNT', incr(COUNT))COUNT };')dnl
+define(`DO', `const xcb_atom_t $1 = { define(`COUNT', incr(COUNT))COUNT };')dnl
include(atomlist.m4)`'dnl
%}
@@ -16,7 +16,7 @@ include(atomlist.m4)`'dnl
%compare-strncmp
%struct-type
-struct atom_map { int name; XCBATOM value; };
+struct atom_map { int name; xcb_atom_t value; };
%%
define(`DO', `$1,{ define(`COUNT', incr(COUNT))COUNT }')dnl
include(atomlist.m4)`'dnl
@@ -26,41 +26,41 @@ define(`DO', ` "$1",')dnl
include(atomlist.m4)`'dnl
};
-XCBATOM InternAtomPredefined(CARD16 name_len, const char *name)
+xcb_atom_t intern_atom_predefined(uint16_t name_len, const char *name)
{
const struct atom_map *value = in_word_set(name, name_len);
- XCBATOM ret = { XCBNone };
+ xcb_atom_t ret = { XCB_NONE };
if(value)
ret = value->value;
return ret;
}
-InternAtomFastCookie InternAtomFast(XCBConnection *c, BOOL only_if_exists, CARD16 name_len, const char *name)
+intern_atom_fast_cookie_t intern_atom_fast(xcb_connection_t *c, uint8_t only_if_exists, uint16_t name_len, const char *name)
{
- InternAtomFastCookie cookie;
+ intern_atom_fast_cookie_t cookie;
- if((cookie.u.atom = InternAtomPredefined(name_len, name)).xid != XCBNone)
+ if((cookie.u.atom = intern_atom_predefined(name_len, name)).xid != XCB_NONE)
{
cookie.tag = TAG_VALUE;
return cookie;
}
cookie.tag = TAG_COOKIE;
- cookie.u.cookie = XCBInternAtom(c, only_if_exists, name_len, name);
+ cookie.u.cookie = xcb_intern_atom(c, only_if_exists, name_len, name);
return cookie;
}
-XCBATOM InternAtomFastReply(XCBConnection *c, InternAtomFastCookie cookie, XCBGenericError **e)
+xcb_atom_t intern_atom_fast_reply(xcb_connection_t *c, intern_atom_fast_cookie_t cookie, xcb_generic_error_t **e)
{
switch(cookie.tag)
{
- XCBInternAtomRep *reply;
+ xcb_intern_atom_reply_t *reply;
case TAG_VALUE:
if(e)
*e = 0;
break;
case TAG_COOKIE:
- reply = XCBInternAtomReply(c, cookie.u.cookie, e);
+ reply = xcb_intern_atom_reply(c, cookie.u.cookie, e);
if(reply)
{
cookie.u.atom = reply->atom;
@@ -73,35 +73,35 @@ XCBATOM InternAtomFastReply(XCBConnection *c, InternAtomFastCookie cookie, XCBGe
return cookie.u.atom;
}
-const char *GetAtomNamePredefined(XCBATOM atom)
+const char *get_atom_name_predefined(xcb_atom_t atom)
{
if(atom.xid <= 0 || atom.xid > (sizeof(atom_names) / sizeof(*atom_names)))
return 0;
return atom_names[atom.xid - 1];
}
-int GetAtomName(XCBConnection *c, XCBATOM atom, const char **namep, int *lengthp)
+int get_atom_name(xcb_connection_t *c, xcb_atom_t atom, const char **namep, int *lengthp)
{
static char buf[100];
- const char *name = GetAtomNamePredefined(atom);
+ const char *name = get_atom_name_predefined(atom);
int len;
- XCBGetAtomNameCookie atomc;
- XCBGetAtomNameRep *atomr;
+ xcb_get_atom_name_cookie_t atomc;
+ xcb_get_atom_name_reply_t *atomr;
if(name)
{
*namep = name;
*lengthp = strlen(name);
return 1;
}
- atomc = XCBGetAtomName(c, atom);
- atomr = XCBGetAtomNameReply(c, atomc, 0);
+ atomc = xcb_get_atom_name(c, atom);
+ atomr = xcb_get_atom_name_reply(c, atomc, 0);
if(!atomr)
return 0;
- len = XCBGetAtomNameNameLength(atomr);
+ len = xcb_get_atom_name_name_length(atomr);
if(len > sizeof(buf))
len = sizeof(buf);
*lengthp = len;
- memcpy(buf, XCBGetAtomNameName(atomr), len);
+ memcpy(buf, xcb_get_atom_name_name(atomr), len);
*namep = buf;
free(atomr);
return 1;
diff --git a/atom/xcb_atom.h.m4 b/atom/xcb_atom.h.m4
index 7a88cfc..b5f0f5d 100644
--- a/atom/xcb_atom.h.m4
+++ b/atom/xcb_atom.h.m4
@@ -8,19 +8,19 @@ enum tag_t {
typedef struct {
enum tag_t tag;
union {
- XCBInternAtomCookie cookie;
- XCBATOM atom;
+ xcb_intern_atom_cookie_t cookie;
+ xcb_atom_t atom;
} u;
} InternAtomFastCookie;
-XCBATOM InternAtomPredefined(CARD16 name_len, const char *name);
-InternAtomFastCookie InternAtomFast(XCBConnection *c, BOOL only_if_exists, CARD16 name_len, const char *name);
-XCBATOM InternAtomFastReply(XCBConnection *c, InternAtomFastCookie cookie, XCBGenericError **e);
+xcb_atom_t InternAtomPredefined(uint16_t name_len, const char *name);
+InternAtomFastCookie InternAtomFast(xcb_connection_t *c, uint8_t only_if_exists, uint16_t name_len, const char *name);
+xcb_atom_t InternAtomFastReply(xcb_connection_t *c, InternAtomFastCookie cookie, xcb_generic_error_t **e);
-const char *GetAtomNamePredefined(XCBATOM atom);
-int GetAtomName(XCBConnection *c, XCBATOM atom, const char **namep, int *lengthp);
+const char *GetAtomNamePredefined(xcb_atom_t atom);
+int GetAtomName(xcb_connection_t *c, xcb_atom_t atom, const char **namep, int *lengthp);
-define(`DO', `extern const XCBATOM $1;')dnl
+define(`DO', `extern const xcb_atom_t $1;')dnl
include(atomlist.m4)`'dnl
#endif /* ATOMS_H */