-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit e5d3e85
Showing
59 changed files
with
5,033 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Makefile | ||
Makefile.in | ||
aclocal.m4 | ||
autom4te.cache | ||
config.guess | ||
config.log | ||
config.status | ||
config.sub | ||
configure | ||
depcomp | ||
install-sh | ||
libtool | ||
ltmain.sh | ||
missing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
PROJECT_NAME = XCB Utility | ||
PROJECT_NUMBER = | ||
OUTPUT_DIRECTORY = doc/ | ||
INPUT = xcb_util_intro image/ | ||
IMAGE_PATH = doc/img | ||
OUTPUT_LANGUAGE = English | ||
GENERATE_HTML = YES | ||
HTML_OUTPUT = html | ||
HTML_FILE_EXTENSION = .html | ||
HTML_HEADER = | ||
HTML_FOOTER = | ||
HTML_STYLESHEET = | ||
HTML_ALIGN_MEMBERS = YES | ||
ENUM_VALUES_PER_LINE = 1 | ||
GENERATE_HTMLHELP = NO | ||
CHM_FILE = | ||
HHC_LOCATION = | ||
GENERATE_CHI = NO | ||
BINARY_TOC = NO | ||
TOC_EXPAND = NO | ||
DISABLE_INDEX = NO | ||
EXTRACT_ALL = NO | ||
EXTRACT_PRIVATE = NO | ||
EXTRACT_STATIC = NO | ||
EXTRACT_LOCAL_CLASSES = NO | ||
HIDE_UNDOC_MEMBERS = YES | ||
HIDE_UNDOC_CLASSES = YES | ||
HIDE_FRIEND_COMPOUNDS = YES | ||
BRIEF_MEMBER_DESC = YES | ||
REPEAT_BRIEF = YES | ||
ALWAYS_DETAILED_SEC = NO | ||
INLINE_INHERITED_MEMB = NO | ||
FULL_PATH_NAMES = NO | ||
STRIP_FROM_PATH = | ||
INTERNAL_DOCS = NO | ||
STRIP_CODE_COMMENTS = YES | ||
CASE_SENSE_NAMES = YES | ||
SHORT_NAMES = NO | ||
HIDE_SCOPE_NAMES = NO | ||
VERBATIM_HEADERS = NO | ||
SHOW_INCLUDE_FILES = NO | ||
JAVADOC_AUTOBRIEF = YES | ||
MULTILINE_CPP_IS_BRIEF = NO | ||
DETAILS_AT_TOP = NO | ||
INHERIT_DOCS = YES | ||
INLINE_INFO = YES | ||
SORT_MEMBER_DOCS = YES | ||
DISTRIBUTE_GROUP_DOC = NO | ||
TAB_SIZE = 2 | ||
GENERATE_TODOLIST = YES | ||
GENERATE_TESTLIST = YES | ||
GENERATE_BUGLIST = YES | ||
GENERATE_DEPRECATEDLIST= YES | ||
ALIASES = | ||
ENABLED_SECTIONS = | ||
MAX_INITIALIZER_LINES = 30 | ||
OPTIMIZE_OUTPUT_FOR_C = YES | ||
OPTIMIZE_OUTPUT_JAVA = NO | ||
SHOW_USED_FILES = NO | ||
QUIET = NO | ||
WARNINGS = YES | ||
WARN_IF_UNDOCUMENTED = YES | ||
WARN_FORMAT = "$file:$line: $text" | ||
WARN_LOGFILE = | ||
FILE_PATTERNS = | ||
RECURSIVE = NO | ||
EXCLUDE = | ||
EXCLUDE_SYMLINKS = NO | ||
EXCLUDE_PATTERNS = | ||
EXAMPLE_PATH = | ||
EXAMPLE_PATTERNS = | ||
EXAMPLE_RECURSIVE = NO | ||
INPUT_FILTER = | ||
FILTER_SOURCE_FILES = NO | ||
SOURCE_BROWSER = NO | ||
INLINE_SOURCES = NO | ||
REFERENCED_BY_RELATION = YES | ||
REFERENCES_RELATION = YES | ||
ALPHABETICAL_INDEX = YES | ||
COLS_IN_ALPHA_INDEX = 2 | ||
IGNORE_PREFIX = | ||
GENERATE_TREEVIEW = NO | ||
TREEVIEW_WIDTH = 250 | ||
GENERATE_LATEX = YES | ||
LATEX_OUTPUT = latex | ||
LATEX_CMD_NAME = latex | ||
MAKEINDEX_CMD_NAME = makeindex | ||
COMPACT_LATEX = NO | ||
PAPER_TYPE = a4wide | ||
EXTRA_PACKAGES = | ||
LATEX_HEADER = | ||
PDF_HYPERLINKS = YES | ||
USE_PDFLATEX = NO | ||
LATEX_BATCHMODE = NO | ||
GENERATE_RTF = NO | ||
RTF_OUTPUT = rtf | ||
COMPACT_RTF = NO | ||
RTF_HYPERLINKS = NO | ||
RTF_STYLESHEET_FILE = | ||
RTF_EXTENSIONS_FILE = | ||
GENERATE_MAN = YES | ||
MAN_OUTPUT = man | ||
MAN_EXTENSION = .3 | ||
MAN_LINKS = YES | ||
GENERATE_XML = YES | ||
XML_SCHEMA = | ||
XML_DTD = | ||
GENERATE_AUTOGEN_DEF = NO | ||
ENABLE_PREPROCESSING = YES | ||
MACRO_EXPANSION = NO | ||
EXPAND_ONLY_PREDEF = NO | ||
SEARCH_INCLUDES = NO | ||
INCLUDE_PATH = | ||
INCLUDE_FILE_PATTERNS = | ||
PREDEFINED = | ||
EXPAND_AS_DEFINED = | ||
SKIP_FUNCTION_MACROS = YES | ||
TAGFILES = | ||
GENERATE_TAGFILE = | ||
ALLEXTERNALS = NO | ||
EXTERNAL_GROUPS = YES | ||
PERL_PATH = /usr/bin/perl | ||
CLASS_DIAGRAMS = NO | ||
HIDE_UNDOC_RELATIONS = YES | ||
HAVE_DOT = NO | ||
CLASS_GRAPH = NO | ||
COLLABORATION_GRAPH = NO | ||
TEMPLATE_RELATIONS = NO | ||
INCLUDE_GRAPH = NO | ||
INCLUDED_BY_GRAPH = NO | ||
GRAPHICAL_HIERARCHY = NO | ||
DOT_IMAGE_FORMAT = png | ||
DOT_PATH = | ||
DOTFILE_DIRS = | ||
MAX_DOT_GRAPH_WIDTH = 512 | ||
MAX_DOT_GRAPH_HEIGHT = 512 | ||
GENERATE_LEGEND = YES | ||
DOT_CLEANUP = YES | ||
SEARCHENGINE = NO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
MAINTAINERCLEANFILES = Makefile.in | ||
|
||
SUBDIRS = atom convenient event icccm image keysyms property reply wm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
.deps | ||
.libs | ||
Makefile | ||
Makefile.in | ||
*.lo | ||
*.loT | ||
*.la | ||
*.pc | ||
atoms.c | ||
atoms.gperf | ||
xcb_atom.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
|
||
MAINTAINERCLEANFILES = Makefile.in | ||
|
||
lib_LTLIBRARIES = libXCBAtom.la | ||
|
||
xcbinclude_HEADERS = xcb_atom.h | ||
|
||
AM_CFLAGS = -Wall | ||
INCLUDES = $(XCB_CFLAGS) | ||
LDADD = $(XCB_LIBS) | ||
|
||
libXCBAtom_la_SOURCES = atoms.c | ||
|
||
pkgconfig_DATA = xcb-atom.pc | ||
|
||
EXTRA_DIST = xcb-atom.pc.in | ||
|
||
BUILT_SOURCES = atoms.c atoms.gperf xcb_atom.h | ||
|
||
%.c: %.gperf | ||
$(GPERF) --output-file $@ $*.gperf | ||
|
||
atoms.gperf: atomlist.m4 | ||
xcb_atom.h: atomlist.m4 | ||
|
||
%: %.m4 | ||
$(M4) $< > $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
define(`FOREACH', `ifelse(`$1', , , `DO($1) | ||
FOREACH(shift($@))')')FOREACH( | ||
PRIMARY, | ||
SECONDARY, | ||
ARC, | ||
ATOM, | ||
BITMAP, | ||
CARDINAL, | ||
COLORMAP, | ||
CURSOR, | ||
CUT_BUFFER0, | ||
CUT_BUFFER1, | ||
CUT_BUFFER2, | ||
CUT_BUFFER3, | ||
CUT_BUFFER4, | ||
CUT_BUFFER5, | ||
CUT_BUFFER6, | ||
CUT_BUFFER7, | ||
DRAWABLE, | ||
FONT, | ||
INTEGER, | ||
PIXMAP, | ||
POINT, | ||
RECTANGLE, | ||
RESOURCE_MANAGER, | ||
RGB_COLOR_MAP, | ||
RGB_BEST_MAP, | ||
RGB_BLUE_MAP, | ||
RGB_DEFAULT_MAP, | ||
RGB_GRAY_MAP, | ||
RGB_GREEN_MAP, | ||
RGB_RED_MAP, | ||
STRING, | ||
VISUALID, | ||
WINDOW, | ||
WM_COMMAND, | ||
WM_HINTS, | ||
WM_CLIENT_MACHINE, | ||
WM_ICON_NAME, | ||
WM_ICON_SIZE, | ||
WM_NAME, | ||
WM_NORMAL_HINTS, | ||
WM_SIZE_HINTS, | ||
WM_ZOOM_HINTS, | ||
MIN_SPACE, | ||
NORM_SPACE, | ||
MAX_SPACE, | ||
END_SPACE, | ||
SUPERSCRIPT_X, | ||
SUPERSCRIPT_Y, | ||
SUBSCRIPT_X, | ||
SUBSCRIPT_Y, | ||
UNDERLINE_POSITION, | ||
UNDERLINE_THICKNESS, | ||
STRIKEOUT_ASCENT, | ||
STRIKEOUT_DESCENT, | ||
ITALIC_ANGLE, | ||
X_HEIGHT, | ||
QUAD_WIDTH, | ||
WEIGHT, | ||
POINT_SIZE, | ||
RESOLUTION, | ||
COPYRIGHT, | ||
NOTICE, | ||
FONT_NAME, | ||
FAMILY_NAME, | ||
FULL_NAME, | ||
CAP_HEIGHT, | ||
WM_CLASS, | ||
WM_TRANSIENT_FOR, | ||
)dnl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
%{ | ||
#include <X11/XCB/xcb.h> | ||
#include <stdlib.h> | ||
#include "xcb_atom.h" | ||
|
||
define(`COUNT', 0)dnl | ||
define(`DO', `const XCBATOM $1 = { define(`COUNT', incr(COUNT))COUNT };')dnl | ||
include(atomlist.m4)`'dnl | ||
%} | ||
|
||
%readonly-tables | ||
%pic | ||
%null-strings | ||
%enum | ||
%includes | ||
%compare-strncmp | ||
|
||
%struct-type | ||
struct atom_map { int name; XCBATOM value; }; | ||
%% | ||
define(`DO', `$1,{ define(`COUNT', incr(COUNT))COUNT }')dnl | ||
include(atomlist.m4)`'dnl | ||
%% | ||
static const char *const atom_names[] = { | ||
define(`DO', ` "$1",')dnl | ||
include(atomlist.m4)`'dnl | ||
}; | ||
|
||
XCBATOM InternAtomPredefined(CARD16 name_len, const char *name) | ||
{ | ||
const struct atom_map *value = in_word_set(name, name_len); | ||
XCBATOM ret = { None }; | ||
if(value) | ||
ret = value->value; | ||
return ret; | ||
} | ||
|
||
InternAtomFastCookie InternAtomFast(XCBConnection *c, BOOL only_if_exists, CARD16 name_len, const char *name) | ||
{ | ||
InternAtomFastCookie cookie; | ||
|
||
if((cookie.u.atom = InternAtomPredefined(name_len, name)).xid != None) | ||
{ | ||
cookie.tag = TAG_VALUE; | ||
return cookie; | ||
} | ||
|
||
cookie.tag = TAG_COOKIE; | ||
cookie.u.cookie = XCBInternAtom(c, only_if_exists, name_len, name); | ||
return cookie; | ||
} | ||
|
||
XCBATOM InternAtomFastReply(XCBConnection *c, InternAtomFastCookie cookie, XCBGenericError **e) | ||
{ | ||
switch(cookie.tag) | ||
{ | ||
XCBInternAtomRep *reply; | ||
case TAG_VALUE: | ||
if(e) | ||
*e = 0; | ||
break; | ||
case TAG_COOKIE: | ||
reply = XCBInternAtomReply(c, cookie.u.cookie, e); | ||
if(reply) | ||
{ | ||
cookie.u.atom = reply->atom; | ||
free(reply); | ||
} | ||
else | ||
cookie.u.atom.xid = 0; | ||
break; | ||
} | ||
return cookie.u.atom; | ||
} | ||
|
||
const char *GetAtomNamePredefined(XCBATOM 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) | ||
{ | ||
static char buf[100]; | ||
const char *name = GetAtomNamePredefined(atom); | ||
int len; | ||
XCBGetAtomNameCookie atomc; | ||
XCBGetAtomNameRep *atomr; | ||
if(name) | ||
{ | ||
*namep = name; | ||
*lengthp = strlen(name); | ||
return 1; | ||
} | ||
atomc = XCBGetAtomName(c, atom); | ||
atomr = XCBGetAtomNameReply(c, atomc, 0); | ||
if(!atomr) | ||
return 0; | ||
len = XCBGetAtomNameNameLength(atomr); | ||
if(len > sizeof(buf)) | ||
len = sizeof(buf); | ||
*lengthp = len; | ||
memcpy(buf, XCBGetAtomNameName(atomr), len); | ||
*namep = buf; | ||
free(atomr); | ||
return 1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
prefix=@prefix@ | ||
exec_prefix=@exec_prefix@ | ||
libdir=@libdir@ | ||
includedir=@includedir@ | ||
|
||
Name: XCBAtom | ||
Description: XCB atom cache | ||
Version: @PACKAGE_VERSION@ | ||
Requires: xcb | ||
Libs: -L${libdir} -lXCBAtom @LIBS@ | ||
Cflags: -I${includedir} |
Oops, something went wrong.