JX Application Framework
Loading...
Searching...
No Matches
Functions | Variables
jXUtil.cpp File Reference
#include "jXUtil.h"
#include "JXDisplay.h"
#include "JXImageMask.h"
#include <X11/Xatom.h>
#include <jx-af/jcore/JStringIterator.h>
#include <jx-af/jcore/JStringMatch.h>
#include <jx-af/jcore/JSubstitute.h>
#include <jx-af/jcore/JRegex.h>
#include <jx-af/jcore/jFileUtil.h>
#include <jx-af/jcore/jGlobals.h>
#include <jx-af/jcore/jAssert.h>
Include dependency graph for jXUtil.cpp:

Functions

XRectangle JXJToXRect (const JRect &rect)
 
Region JXRectangleRegion (XRectangle *r)
 
Region JXRectangleRegion (const JRect &r)
 
JRect JXGetRegionBounds (Region region)
 
bool JXRegionIsRectangle (Region region, JRect *rect)
 
Region JXCopyRegion (Region region)
 
void JXIntersectRectWithRegion (XRectangle *rectangle, Region src_region, Region dest_region)
 
void JXSubtractRectFromRegion (Region src_region, XRectangle *rectangle, Region dest_region)
 
Pixmap JXIntersection (JXDisplay *display, Region region, const JPoint &regionOffset, const JXImageMask &p, const JPoint &pixmapOffset, const JRect &resultRect)
 
Pixmap JXIntersection (JXDisplay *display, const JXImageMask &pix1, const JPoint &p1Offset, const JXImageMask &pix2, const JPoint &p2Offset, const JRect &resultRect)
 
JString JXPackStrings (const JPtrArray< JString > &strList, const JUtf8Byte *separator, const JSize sepLength)
 
void JXUnpackStrings (const JUtf8Byte *origData, const JSize byteCount, JPtrArray< JString > *strList, const JUtf8Byte *separator, const JSize sepLength)
 
JString JXPackFileNames (const JPtrArray< JString > &fileNameList)
 
void JXUnpackFileNames (const JUtf8Byte *data, const JSize byteCount, JPtrArray< JString > *fileNameList, JPtrArray< JString > *urlList)
 
void JXReportUnreachableHosts (const JPtrArray< JString > &urlList)
 
bool JXFixBrokenURLs (const JUtf8Byte *data, const JSize byteCount, JXDisplay *display, const Window srcWindow, JString *newData)
 

Variables

const JSize kURISeparatorLength = 2
 
const JUtf8Byte kURICommentMarker = '#'
 

Function Documentation

◆ JXCopyRegion()

Region JXCopyRegion ( Region  region)

XUnionRectWithRegion would probably be faster, but it doesn't work with an empty rectangle.

◆ JXFixBrokenURLs()

bool JXFixBrokenURLs ( const JUtf8Byte data,
const JSize  byteCount,
JXDisplay display,
const Window  srcWindow,
JString newData 
)

◆ JXGetRegionBounds()

JRect JXGetRegionBounds ( Region  region)

If the region is a rectangle and rect != nullptr, *rect contains the rectangle.

◆ JXIntersection() [1/2]

Pixmap JXIntersection ( JXDisplay display,
const JXImageMask pix1,
const JPoint p1Offset,
const JXImageMask pix2,
const JPoint p2Offset,
const JRect resultRect 
)

◆ JXIntersection() [2/2]

Pixmap JXIntersection ( JXDisplay display,
Region  region,
const JPoint regionOffset,
const JXImageMask p,
const JPoint pixmapOffset,
const JRect resultRect 
)

◆ JXIntersectRectWithRegion()

void JXIntersectRectWithRegion ( XRectangle *  rectangle,
Region  src_region,
Region  dest_region 
)

dest_region can be the same as src_region

◆ JXJToXRect()

XRectangle JXJToXRect ( const JRect rect)

◆ JXPackFileNames()

JString JXPackFileNames ( const JPtrArray< JString > &  fileNameList)

◆ JXPackStrings()

JString JXPackStrings ( const JPtrArray< JString > &  strList,
const JUtf8Byte separator,
const JSize  sepLength 
)

These routines pack and unpack a list of strings using the standard X format of nullptr separation.

JXUnpackStrings() does not clear strList.

◆ JXRectangleRegion() [1/2]

Region JXRectangleRegion ( const JRect r)

◆ JXRectangleRegion() [2/2]

Region JXRectangleRegion ( XRectangle *  r)

◆ JXRegionIsRectangle()

bool JXRegionIsRectangle ( Region  region,
JRect rect 
)

If the region is a rectangle and rect != nullptr, *rect contains the rectangle.

◆ JXReportUnreachableHosts()

void JXReportUnreachableHosts ( const JPtrArray< JString > &  urlList)

◆ JXSubtractRectFromRegion()

void JXSubtractRectFromRegion ( Region  src_region,
XRectangle *  rectangle,
Region  dest_region 
)

dest_region can be the same as src_region

◆ JXUnpackFileNames()

void JXUnpackFileNames ( const JUtf8Byte data,
const JSize  byteCount,
JPtrArray< JString > *  fileNameList,
JPtrArray< JString > *  urlList 
)

◆ JXUnpackStrings()

void JXUnpackStrings ( const JUtf8Byte origData,
const JSize  byteCount,
JPtrArray< JString > *  strList,
const JUtf8Byte separator,
const JSize  sepLength 
)

Variable Documentation

◆ kURICommentMarker

const JUtf8Byte kURICommentMarker = '#'

◆ kURISeparatorLength

const JSize kURISeparatorLength = 2