mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-28 09:22:27 +01:00
changed indentation to use spaces only
This commit is contained in:
@@ -55,29 +55,29 @@ typedef struct {
|
||||
* range INT_MIN+1 to INT_MAX
|
||||
*/
|
||||
enum {
|
||||
WMDesktopWindowLevel = -1000, /* GNUstep addition */
|
||||
WMNormalWindowLevel = 0,
|
||||
WMFloatingWindowLevel = 3,
|
||||
WMSubmenuWindowLevel = 3,
|
||||
WMTornOffMenuWindowLevel = 3,
|
||||
WMMainMenuWindowLevel = 20,
|
||||
WMDockWindowLevel = 21, /* Deprecated - use NSStatusWindowLevel */
|
||||
WMStatusWindowLevel = 21,
|
||||
WMModalPanelWindowLevel = 100,
|
||||
WMPopUpMenuWindowLevel = 101,
|
||||
WMScreenSaverWindowLevel = 1000
|
||||
WMDesktopWindowLevel = -1000, /* GNUstep addition */
|
||||
WMNormalWindowLevel = 0,
|
||||
WMFloatingWindowLevel = 3,
|
||||
WMSubmenuWindowLevel = 3,
|
||||
WMTornOffMenuWindowLevel = 3,
|
||||
WMMainMenuWindowLevel = 20,
|
||||
WMDockWindowLevel = 21, /* Deprecated - use NSStatusWindowLevel */
|
||||
WMStatusWindowLevel = 21,
|
||||
WMModalPanelWindowLevel = 100,
|
||||
WMPopUpMenuWindowLevel = 101,
|
||||
WMScreenSaverWindowLevel = 1000
|
||||
};
|
||||
|
||||
|
||||
/* window attributes */
|
||||
enum {
|
||||
WMBorderlessWindowMask = 0,
|
||||
WMTitledWindowMask = 1,
|
||||
WMClosableWindowMask = 2,
|
||||
WMMiniaturizableWindowMask = 4,
|
||||
WMResizableWindowMask = 8,
|
||||
WMIconWindowMask = 64,
|
||||
WMMiniWindowMask = 128
|
||||
WMBorderlessWindowMask = 0,
|
||||
WMTitledWindowMask = 1,
|
||||
WMClosableWindowMask = 2,
|
||||
WMMiniaturizableWindowMask = 4,
|
||||
WMResizableWindowMask = 8,
|
||||
WMIconWindowMask = 64,
|
||||
WMMiniWindowMask = 128
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -400,18 +400,18 @@ typedef struct WMAlertPanel {
|
||||
typedef struct WMGenericPanel {
|
||||
WMWindow *win;
|
||||
WMBox *vbox;
|
||||
|
||||
|
||||
WMLabel *iLbl;
|
||||
WMLabel *tLbl;
|
||||
|
||||
|
||||
WMFrame *line;
|
||||
|
||||
|
||||
WMFrame *content;
|
||||
|
||||
|
||||
WMBox *buttonBox;
|
||||
WMButton *defBtn;
|
||||
WMButton *altBtn;
|
||||
|
||||
|
||||
short result;
|
||||
} WMGenericPanel;
|
||||
|
||||
@@ -443,7 +443,7 @@ typedef struct {
|
||||
unsigned short right; /* right margin marker */
|
||||
unsigned short first; /* indentation marker for first line only */
|
||||
unsigned short body; /* body indentation marker */
|
||||
unsigned short retainCount;
|
||||
unsigned short retainCount;
|
||||
} WMRulerMargins;
|
||||
/* All indentation and tab markers are _relative_ to the left margin marker */
|
||||
|
||||
@@ -464,10 +464,11 @@ typedef void WMAction2(void *self, void *clientData);
|
||||
typedef void WMListDrawProc(WMList *lPtr, int index, Drawable d, char *text,
|
||||
int state, WMRect *rect);
|
||||
|
||||
|
||||
/*
|
||||
typedef void WMSplitViewResizeSubviewsProc(WMSplitView *sPtr,
|
||||
unsigned int oldWidth,
|
||||
unsigned int oldHeight);
|
||||
unsigned int oldWidth,
|
||||
unsigned int oldHeight);
|
||||
*/
|
||||
|
||||
typedef void WMSplitViewConstrainProc(WMSplitView *sPtr, int dividerIndex,
|
||||
@@ -499,7 +500,7 @@ typedef struct WMTextFieldDelegate {
|
||||
void (*didBeginEditing)(struct WMTextFieldDelegate *self,
|
||||
WMNotification *notif);
|
||||
|
||||
void (*didChange)(struct WMTextFieldDelegate *self,
|
||||
void (*didChange)(struct WMTextFieldDelegate *self,
|
||||
WMNotification *notif);
|
||||
|
||||
void (*didEndEditing)(struct WMTextFieldDelegate *self,
|
||||
@@ -532,7 +533,7 @@ typedef struct WMTabViewDelegate {
|
||||
void (*didSelectItem)(struct WMTabViewDelegate *self, WMTabView *tabView,
|
||||
WMTabViewItem *item);
|
||||
|
||||
Bool (*shouldSelectItem)(struct WMTabViewDelegate *self, WMTabView *tabView,
|
||||
Bool (*shouldSelectItem)(struct WMTabViewDelegate *self, WMTabView *tabView,
|
||||
WMTabViewItem *item);
|
||||
|
||||
void (*willSelectItem)(struct WMTabViewDelegate *self, WMTabView *tabView,
|
||||
@@ -563,29 +564,29 @@ typedef struct W_DragOperationtItem WMDragOperationItem;
|
||||
|
||||
|
||||
typedef struct W_DragSourceProcs {
|
||||
WMArray* (*dropDataTypes)(WMView *self);
|
||||
WMArray* (*dropDataTypes)(WMView *self);
|
||||
WMDragOperationType (*wantedDropOperation)(WMView *self);
|
||||
WMArray* (*askedOperations)(WMView *self);
|
||||
Bool (*acceptDropOperation)(WMView *self, WMDragOperationType operation);
|
||||
WMArray* (*askedOperations)(WMView *self);
|
||||
Bool (*acceptDropOperation)(WMView *self, WMDragOperationType operation);
|
||||
void (*beganDrag)(WMView *self, WMPoint *point);
|
||||
void (*endedDrag)(WMView *self, WMPoint *point, Bool deposited);
|
||||
WMData* (*fetchDragData)(WMView *self, char *type);
|
||||
/* Bool (*ignoreModifierKeysWhileDragging)(WMView *view);*/
|
||||
/*Bool (*ignoreModifierKeysWhileDragging)(WMView *view);*/
|
||||
} WMDragSourceProcs;
|
||||
|
||||
|
||||
|
||||
typedef struct W_DragDestinationProcs {
|
||||
void (*prepareForDragOperation)(WMView *self);
|
||||
WMArray* (*requiredDataTypes)(WMView *self, WMDragOperationType request,
|
||||
void (*prepareForDragOperation)(WMView *self);
|
||||
WMArray* (*requiredDataTypes)(WMView *self, WMDragOperationType request,
|
||||
WMArray *sourceDataTypes);
|
||||
WMDragOperationType (*allowedOperation)(WMView *self,
|
||||
WMDragOperationType request,
|
||||
WMArray *sourceDataTypes);
|
||||
Bool (*inspectDropData)(WMView *self, WMArray *dropData);
|
||||
void (*performDragOperation)(WMView *self, WMArray *dropData,
|
||||
Bool (*inspectDropData)(WMView *self, WMArray *dropData);
|
||||
void (*performDragOperation)(WMView *self, WMArray *dropData,
|
||||
WMArray *operations, WMPoint *dropLocation);
|
||||
void (*concludeDragOperation)(WMView *self);
|
||||
void (*concludeDragOperation)(WMView *self);
|
||||
} WMDragDestinationProcs;
|
||||
|
||||
|
||||
@@ -621,7 +622,7 @@ char* WMPathForResourceOfType(char *resource, char *ext);
|
||||
WMScreen* WMOpenScreen(const char *display);
|
||||
|
||||
WMScreen* WMCreateScreenWithRContext(Display *display, int screen,
|
||||
RContext *context);
|
||||
RContext *context);
|
||||
|
||||
WMScreen* WMCreateScreen(Display *display, int screen);
|
||||
|
||||
@@ -663,10 +664,10 @@ int WMHandleEvent(XEvent *event);
|
||||
Bool WMScreenPending(WMScreen *scr);
|
||||
|
||||
void WMCreateEventHandler(WMView *view, unsigned long mask,
|
||||
WMEventProc *eventProc, void *clientData);
|
||||
WMEventProc *eventProc, void *clientData);
|
||||
|
||||
void WMDeleteEventHandler(WMView *view, unsigned long mask,
|
||||
WMEventProc *eventProc, void *clientData);
|
||||
WMEventProc *eventProc, void *clientData);
|
||||
|
||||
int WMIsDoubleClick(XEvent *event);
|
||||
|
||||
@@ -681,13 +682,13 @@ void WMMaskEvent(Display *dpy, long mask, XEvent *event);
|
||||
|
||||
|
||||
Bool WMCreateSelectionHandler(WMView *view, Atom selection, Time timestamp,
|
||||
WMSelectionProcs *procs, void *cdata);
|
||||
WMSelectionProcs *procs, void *cdata);
|
||||
|
||||
void WMDeleteSelectionHandler(WMView *view, Atom selection, Time timestamp);
|
||||
|
||||
Bool WMRequestSelection(WMView *view, Atom selection, Atom target,
|
||||
Time timestamp, WMSelectionCallback *callback,
|
||||
void *cdata);
|
||||
Bool WMRequestSelection(WMView *view, Atom selection, Atom target,
|
||||
Time timestamp, WMSelectionCallback *callback,
|
||||
void *cdata);
|
||||
|
||||
|
||||
extern char *WMSelectionOwnerDidChangeNotification;
|
||||
@@ -814,7 +815,7 @@ GC WMColorGC(WMColor *color);
|
||||
|
||||
WMPixel WMColorPixel(WMColor *color);
|
||||
|
||||
void WMPaintColorSwatch(WMColor *color, Drawable d, int x, int y,
|
||||
void WMPaintColorSwatch(WMColor *color, Drawable d, int x, int y,
|
||||
unsigned int width, unsigned int height);
|
||||
|
||||
void WMReleaseColor(WMColor *color);
|
||||
@@ -909,7 +910,7 @@ void WMRedisplayWidget(WMWidget *w);
|
||||
|
||||
void WMSetViewNotifySizeChanges(WMView *view, Bool flag);
|
||||
|
||||
void WMSetViewExpandsToParent(WMView *view, int topOffs, int leftOffs,
|
||||
void WMSetViewExpandsToParent(WMView *view, int topOffs, int leftOffs,
|
||||
int rightOffs, int bottomOffs);
|
||||
|
||||
WMSize WMGetViewSize(WMView *view);
|
||||
@@ -994,16 +995,16 @@ void WMCloseWindow(WMWindow *win);
|
||||
void WMSetButtonAction(WMButton *bPtr, WMAction *action, void *clientData);
|
||||
|
||||
#define WMCreateCommandButton(parent) \
|
||||
WMCreateCustomButton((parent), WBBSpringLoadedMask\
|
||||
|WBBPushInMask\
|
||||
|WBBPushLightMask\
|
||||
|WBBPushChangeMask)
|
||||
WMCreateCustomButton((parent), WBBSpringLoadedMask\
|
||||
|WBBPushInMask\
|
||||
|WBBPushLightMask\
|
||||
|WBBPushChangeMask)
|
||||
|
||||
#define WMCreateRadioButton(parent) \
|
||||
WMCreateButton((parent), WBTRadio)
|
||||
WMCreateButton((parent), WBTRadio)
|
||||
|
||||
#define WMCreateSwitchButton(parent) \
|
||||
WMCreateButton((parent), WBTSwitch)
|
||||
WMCreateButton((parent), WBTSwitch)
|
||||
|
||||
WMButton* WMCreateButton(WMWidget *parent, WMButtonType type);
|
||||
|
||||
@@ -1138,7 +1139,7 @@ extern char *WMTextDidEndEditingNotification;
|
||||
|
||||
WMScroller* WMCreateScroller(WMWidget *parent);
|
||||
|
||||
void WMSetScrollerParameters(WMScroller *sPtr, float floatValue,
|
||||
void WMSetScrollerParameters(WMScroller *sPtr, float floatValue,
|
||||
float knobProportion);
|
||||
|
||||
float WMGetScrollerKnobProportion(WMScroller *sPtr);
|
||||
@@ -1149,8 +1150,8 @@ WMScrollerPart WMGetScrollerHitPart(WMScroller *sPtr);
|
||||
|
||||
void WMSetScrollerAction(WMScroller *sPtr, WMAction *action, void *clientData);
|
||||
|
||||
void WMSetScrollerArrowsPosition(WMScroller *sPtr,
|
||||
WMScrollArrowPosition position);
|
||||
void WMSetScrollerArrowsPosition(WMScroller *sPtr,
|
||||
WMScrollArrowPosition position);
|
||||
|
||||
extern char *WMScrollerDidScrollNotification;
|
||||
|
||||
@@ -1277,7 +1278,7 @@ WMArray* WMGetBrowserPaths(WMBrowser *bPtr);
|
||||
|
||||
void WMSetBrowserAction(WMBrowser *bPtr, WMAction *action, void *clientData);
|
||||
|
||||
void WMSetBrowserDoubleAction(WMBrowser *bPtr, WMAction *action,
|
||||
void WMSetBrowserDoubleAction(WMBrowser *bPtr, WMAction *action,
|
||||
void *clientData);
|
||||
|
||||
WMListItem* WMGetBrowserSelectedItemInColumn(WMBrowser *bPtr, int column);
|
||||
@@ -1358,18 +1359,18 @@ void WMSetMenuItemMixedStatePixmap(WMMenuItem *item, WMPixmap *pixmap);
|
||||
WMPixmap* WMGetMenuItemMixedStatePixmap(WMMenuItem *item);
|
||||
|
||||
/*void WMSetMenuItemSubmenu(WMMenuItem *item, WMMenu *submenu);
|
||||
|
||||
|
||||
|
||||
WMMenu* WMGetMenuItemSubmenu(WMMenuItem *item);
|
||||
|
||||
Bool WMGetMenuItemHasSubmenu(WMMenuItem *item);
|
||||
*/
|
||||
*/
|
||||
|
||||
/* ....................................................................... */
|
||||
|
||||
WMPopUpButton* WMCreatePopUpButton(WMWidget *parent);
|
||||
|
||||
void WMSetPopUpButtonAction(WMPopUpButton *sPtr, WMAction *action,
|
||||
void WMSetPopUpButtonAction(WMPopUpButton *sPtr, WMAction *action,
|
||||
void *clientData);
|
||||
|
||||
void WMSetPopUpButtonPullsDown(WMPopUpButton *bPtr, Bool flag);
|
||||
@@ -1529,8 +1530,8 @@ void WMSetSplitViewConstrainProc(WMSplitView *sPtr,
|
||||
WMSplitViewConstrainProc *proc);
|
||||
|
||||
/*
|
||||
void WMSetSplitViewResizeSubviewsProc(WMSplitView *sPtr,
|
||||
WMSplitViewResizeSubviewsProc *proc);
|
||||
void WMSetSplitViewResizeSubviewsProc(WMSplitView *sPtr,
|
||||
WMSplitViewResizeSubviewsProc *proc);
|
||||
*/
|
||||
|
||||
int WMGetSplitViewDividerThickness(WMSplitView *sPtr);
|
||||
@@ -1568,9 +1569,9 @@ WMText* WMCreateTextForDocumentType(WMWidget *parent, WMAction *parser,
|
||||
|
||||
void WMSetTextDelegate(WMText *tPtr, WMTextDelegate *delegate);
|
||||
|
||||
void WMFreezeText(WMText *tPtr);
|
||||
void WMFreezeText(WMText *tPtr);
|
||||
|
||||
#define WMRefreshText(tPtr) WMThawText((tPtr))
|
||||
#define WMRefreshText(tPtr) WMThawText((tPtr))
|
||||
|
||||
void WMThawText(WMText *tPtr);
|
||||
|
||||
@@ -1770,9 +1771,9 @@ void WMSetBoxHorizontal(WMBox *box, Bool flag);
|
||||
|
||||
/* ....................................................................... */
|
||||
|
||||
int WMRunAlertPanel(WMScreen *app, WMWindow *owner, char *title, char *msg,
|
||||
char *defaultButton, char *alternateButton,
|
||||
char *otherButton);
|
||||
int WMRunAlertPanel(WMScreen *app, WMWindow *owner, char *title, char *msg,
|
||||
char *defaultButton, char *alternateButton,
|
||||
char *otherButton);
|
||||
|
||||
/* you can free the returned string */
|
||||
char* WMRunInputPanel(WMScreen *app, WMWindow *owner, char *title, char *msg,
|
||||
|
||||
@@ -79,7 +79,7 @@ typedef struct W_Color {
|
||||
short refCount;
|
||||
GC gc;
|
||||
struct {
|
||||
unsigned int exact:1;
|
||||
unsigned int exact:1;
|
||||
} flags;
|
||||
} W_Color;
|
||||
|
||||
@@ -196,13 +196,13 @@ typedef struct W_Screen {
|
||||
struct W_Window *windowList; /* list of windows in the app */
|
||||
|
||||
Window groupLeader; /* the leader of the application */
|
||||
/* also used for other things */
|
||||
/* also used for other things */
|
||||
|
||||
struct W_SelectionHandlers *selectionHandlerList;
|
||||
|
||||
struct {
|
||||
unsigned int hasAppIcon:1;
|
||||
unsigned int simpleApplication:1;
|
||||
unsigned int hasAppIcon:1;
|
||||
unsigned int simpleApplication:1;
|
||||
} aflags;
|
||||
|
||||
WMOpenPanel *sharedOpenPanel;
|
||||
@@ -296,7 +296,7 @@ typedef struct W_Screen {
|
||||
struct W_Pixmap *altUnmountIcon;
|
||||
|
||||
struct W_Pixmap *magnifyIcon;
|
||||
/* struct W_Pixmap *altMagnifyIcon;*/
|
||||
/*struct W_Pixmap *altMagnifyIcon;*/
|
||||
struct W_Pixmap *wheelIcon;
|
||||
struct W_Pixmap *grayIcon;
|
||||
struct W_Pixmap *rgbIcon;
|
||||
@@ -364,7 +364,7 @@ typedef struct W_ViewDelegate {
|
||||
void (*willMove)(struct W_ViewDelegate*, WMView*, int*, int*);
|
||||
|
||||
void (*willResize)(struct W_ViewDelegate*, WMView*,
|
||||
unsigned int*, unsigned int*);
|
||||
unsigned int*, unsigned int*);
|
||||
} W_ViewDelegate;
|
||||
|
||||
|
||||
@@ -373,7 +373,7 @@ typedef struct W_View {
|
||||
struct W_Screen *screen;
|
||||
|
||||
WMWidget *self; /* must point to the widget the
|
||||
* view belongs to */
|
||||
* view belongs to */
|
||||
|
||||
W_ViewDelegate *delegate;
|
||||
|
||||
@@ -553,8 +553,8 @@ void W_PaintTextAndImage(W_View *view, int wrap, WMColor *textColor,
|
||||
WMImagePosition position, WMColor *backColor, int ofs);
|
||||
|
||||
void W_PaintText(W_View *view, Drawable d, WMFont *font, int x, int y,
|
||||
int width, WMAlignment alignment, WMColor *color,
|
||||
int wrap, char *text, int length);
|
||||
int width, WMAlignment alignment, WMColor *color,
|
||||
int wrap, char *text, int length);
|
||||
|
||||
int W_GetTextHeight(WMFont *font, char *text, int width, int wrap);
|
||||
|
||||
@@ -649,3 +649,4 @@ void W_FreeViewXdndPart(WMView *view);
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* _WINGSP_H_ */
|
||||
|
||||
|
||||
@@ -47,18 +47,18 @@
|
||||
#else /* !DEBUG */
|
||||
|
||||
#define wassertr(expr) \
|
||||
if (!(expr)) { \
|
||||
wwarning("%s line %i (%s): assertion %s failed",\
|
||||
__FILE__, __LINE__, __ASSERT_FUNCTION, #expr);\
|
||||
return;\
|
||||
}
|
||||
if (!(expr)) { \
|
||||
wwarning("%s line %i (%s): assertion %s failed",\
|
||||
__FILE__, __LINE__, __ASSERT_FUNCTION, #expr);\
|
||||
return;\
|
||||
}
|
||||
|
||||
#define wassertrv(expr, val) \
|
||||
if (!(expr)) { \
|
||||
wwarning("%s line %i (%s): assertion %s failed",\
|
||||
__FILE__, __LINE__, __ASSERT_FUNCTION, #expr);\
|
||||
return (val);\
|
||||
}
|
||||
if (!(expr)) { \
|
||||
wwarning("%s line %i (%s): assertion %s failed",\
|
||||
__FILE__, __LINE__, __ASSERT_FUNCTION, #expr);\
|
||||
return (val);\
|
||||
}
|
||||
#endif /* !DEBUG */
|
||||
|
||||
#endif /* !NDEBUG */
|
||||
@@ -71,15 +71,15 @@ extern "C" {
|
||||
|
||||
typedef enum {
|
||||
WMPostWhenIdle = 1,
|
||||
WMPostASAP = 2,
|
||||
WMPostNow = 3
|
||||
WMPostASAP = 2,
|
||||
WMPostNow = 3
|
||||
} WMPostingStyle;
|
||||
|
||||
|
||||
typedef enum {
|
||||
WNCNone = 0,
|
||||
WNCOnName = 1,
|
||||
WNCOnSender = 2
|
||||
WNCOnName = 1,
|
||||
WNCOnSender = 2
|
||||
} WMNotificationCoalescing;
|
||||
|
||||
|
||||
@@ -166,7 +166,7 @@ typedef struct {
|
||||
/* NULL does nothing */
|
||||
void* (*retainKey)(const void *);
|
||||
/* NULL does nothing */
|
||||
void (*releaseKey)(const void *);
|
||||
void (*releaseKey)(const void *);
|
||||
} WMHashTableCallbacks;
|
||||
|
||||
|
||||
@@ -201,8 +201,8 @@ typedef struct ConnectionDelegate {
|
||||
} ConnectionDelegate;
|
||||
|
||||
|
||||
typedef void WMNotificationObserverAction(void *observerData,
|
||||
WMNotification *notification);
|
||||
typedef void WMNotificationObserverAction(void *observerData,
|
||||
WMNotification *notification);
|
||||
|
||||
|
||||
|
||||
@@ -285,7 +285,7 @@ void wusleep(unsigned int microsec);
|
||||
|
||||
#if 0
|
||||
int wsprintesc(char *buffer, int length, char *format, WMSEscapes **escapes,
|
||||
int count);
|
||||
int count);
|
||||
#endif
|
||||
|
||||
/*......................................................................*/
|
||||
@@ -293,7 +293,7 @@ int wsprintesc(char *buffer, int length, char *format, WMSEscapes **escapes,
|
||||
/* Event handlers: timer, idle, input */
|
||||
|
||||
WMHandlerID WMAddTimerHandler(int milliseconds, WMCallback *callback,
|
||||
void *cdata);
|
||||
void *cdata);
|
||||
|
||||
WMHandlerID WMAddPersistentTimerHandler(int milliseconds, WMCallback *callback,
|
||||
void *cdata);
|
||||
@@ -306,8 +306,8 @@ WMHandlerID WMAddIdleHandler(WMCallback *callback, void *cdata);
|
||||
|
||||
void WMDeleteIdleHandler(WMHandlerID handlerID);
|
||||
|
||||
WMHandlerID WMAddInputHandler(int fd, int condition, WMInputProc *proc,
|
||||
void *clientData);
|
||||
WMHandlerID WMAddInputHandler(int fd, int condition, WMInputProc *proc,
|
||||
void *clientData);
|
||||
|
||||
void WMDeleteInputHandler(WMHandlerID handlerID);
|
||||
|
||||
@@ -373,7 +373,7 @@ extern const WMHashTableCallbacks WMIntHashCallbacks;
|
||||
/* sizeof(keys) are <= sizeof(void*) */
|
||||
|
||||
extern const WMHashTableCallbacks WMStringHashCallbacks;
|
||||
/* keys are strings. Strings will be copied with wstrdup()
|
||||
/* keys are strings. Strings will be copied with wstrdup()
|
||||
* and freed with wfree() */
|
||||
|
||||
extern const WMHashTableCallbacks WMStringPointerHashCallbacks;
|
||||
@@ -392,7 +392,7 @@ extern const WMHashTableCallbacks WMStringPointerHashCallbacks;
|
||||
* Fast [O(1)] push/pop
|
||||
*
|
||||
* Cons:
|
||||
* A little slower [O(n)] for insertion/deletion of elements that
|
||||
* A little slower [O(n)] for insertion/deletion of elements that
|
||||
* aren't in the end
|
||||
*/
|
||||
|
||||
@@ -475,23 +475,23 @@ void* WMArrayPrevious(WMArray *array, WMArrayIterator *iter);
|
||||
|
||||
/* The following 2 macros assume that the array doesn't change in the for loop */
|
||||
#define WM_ITERATE_ARRAY(array, var, i) \
|
||||
for (var = WMArrayFirst(array, &(i)); (i) != WANotFound; \
|
||||
var = WMArrayNext(array, &(i)))
|
||||
for (var = WMArrayFirst(array, &(i)); (i) != WANotFound; \
|
||||
var = WMArrayNext(array, &(i)))
|
||||
|
||||
#define WM_ETARETI_ARRAY(array, var, i) \
|
||||
for (var = WMArrayLast(array, &(i)); (i) != WANotFound; \
|
||||
var = WMArrayPrevious(array, &(i)))
|
||||
for (var = WMArrayLast(array, &(i)); (i) != WANotFound; \
|
||||
var = WMArrayPrevious(array, &(i)))
|
||||
|
||||
/*..........................................................................*/
|
||||
|
||||
/*
|
||||
* Tree bags use a red-black tree for storage.
|
||||
* Item indexes may be any integer number.
|
||||
*
|
||||
*
|
||||
* Pros:
|
||||
* O(lg n) insertion/deletion/search
|
||||
* Good for large numbers of elements with sparse indexes
|
||||
*
|
||||
*
|
||||
* Cons:
|
||||
* O(lg n) insertion/deletion/search
|
||||
* Slow for storing small numbers of elements
|
||||
@@ -565,12 +565,12 @@ int WMBagIndexForIterator(WMBag *bag, WMBagIterator ptr);
|
||||
|
||||
/* The following 2 macros assume that the bag doesn't change in the for loop */
|
||||
#define WM_ITERATE_BAG(bag, var, i) \
|
||||
for (var = WMBagFirst(bag, &(i)); (i) != NULL; \
|
||||
var = WMBagNext(bag, &(i)))
|
||||
for (var = WMBagFirst(bag, &(i)); (i) != NULL; \
|
||||
var = WMBagNext(bag, &(i)))
|
||||
|
||||
#define WM_ETARETI_BAG(bag, var, i) \
|
||||
for (var = WMBagLast(bag, &(i)); (i) != NULL; \
|
||||
var = WMBagPrevious(bag, &(i)))
|
||||
for (var = WMBagLast(bag, &(i)); (i) != NULL; \
|
||||
var = WMBagPrevious(bag, &(i)))
|
||||
|
||||
|
||||
|
||||
@@ -703,15 +703,15 @@ void* WMGetNotificationObject(WMNotification *notification);
|
||||
const char* WMGetNotificationName(WMNotification *notification);
|
||||
|
||||
|
||||
void WMAddNotificationObserver(WMNotificationObserverAction *observerAction,
|
||||
void *observer, const char *name, void *object);
|
||||
void WMAddNotificationObserver(WMNotificationObserverAction *observerAction,
|
||||
void *observer, const char *name, void *object);
|
||||
|
||||
void WMPostNotification(WMNotification *notification);
|
||||
|
||||
void WMRemoveNotificationObserver(void *observer);
|
||||
|
||||
void WMRemoveNotificationObserverWithName(void *observer, const char *name,
|
||||
void *object);
|
||||
void WMRemoveNotificationObserverWithName(void *observer, const char *name,
|
||||
void *object);
|
||||
|
||||
void WMPostNotificationName(const char *name, void *object, void *clientData);
|
||||
|
||||
@@ -719,18 +719,18 @@ WMNotificationQueue* WMGetDefaultNotificationQueue(void);
|
||||
|
||||
WMNotificationQueue* WMCreateNotificationQueue(void);
|
||||
|
||||
void WMDequeueNotificationMatching(WMNotificationQueue *queue,
|
||||
WMNotification *notification,
|
||||
unsigned mask);
|
||||
void WMDequeueNotificationMatching(WMNotificationQueue *queue,
|
||||
WMNotification *notification,
|
||||
unsigned mask);
|
||||
|
||||
void WMEnqueueNotification(WMNotificationQueue *queue,
|
||||
WMNotification *notification,
|
||||
WMPostingStyle postingStyle);
|
||||
WMNotification *notification,
|
||||
WMPostingStyle postingStyle);
|
||||
|
||||
void WMEnqueueCoalesceNotification(WMNotificationQueue *queue,
|
||||
WMNotification *notification,
|
||||
WMPostingStyle postingStyle,
|
||||
unsigned coalesceMask);
|
||||
void WMEnqueueCoalesceNotification(WMNotificationQueue *queue,
|
||||
WMNotification *notification,
|
||||
WMPostingStyle postingStyle,
|
||||
unsigned coalesceMask);
|
||||
|
||||
|
||||
/*......................................................................*/
|
||||
@@ -855,7 +855,7 @@ WMPropList* WMGetUDKeys(WMUserDefaults *database);
|
||||
WMPropList* WMGetUDObjectForKey(WMUserDefaults *database, char *defaultName);
|
||||
|
||||
void WMSetUDObjectForKey(WMUserDefaults *database, WMPropList *object,
|
||||
char *defaultName);
|
||||
char *defaultName);
|
||||
|
||||
void WMRemoveUDObjectForKey(WMUserDefaults *database, char *defaultName);
|
||||
|
||||
@@ -867,17 +867,17 @@ float WMGetUDFloatForKey(WMUserDefaults *database, char *defaultName);
|
||||
|
||||
Bool WMGetUDBoolForKey(WMUserDefaults *database, char *defaultName);
|
||||
|
||||
void WMSetUDStringForKey(WMUserDefaults *database, char *value,
|
||||
char *defaultName);
|
||||
void WMSetUDStringForKey(WMUserDefaults *database, char *value,
|
||||
char *defaultName);
|
||||
|
||||
void WMSetUDIntegerForKey(WMUserDefaults *database, int value,
|
||||
char *defaultName);
|
||||
void WMSetUDIntegerForKey(WMUserDefaults *database, int value,
|
||||
char *defaultName);
|
||||
|
||||
void WMSetUDFloatForKey(WMUserDefaults *database, float value,
|
||||
char *defaultName);
|
||||
void WMSetUDFloatForKey(WMUserDefaults *database, float value,
|
||||
char *defaultName);
|
||||
|
||||
void WMSetUDBoolForKey(WMUserDefaults *database, Bool value,
|
||||
char *defaultName);
|
||||
char *defaultName);
|
||||
|
||||
WMPropList* WMGetUDSearchList(WMUserDefaults *database);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user