Make some unused public WMNotification APIs private.
`WMRetainNotification`, `WMGetDefaultNotificationQueue`, `WMDequeueNotificationMatching`, `WMEnqueueNotification`, and `WMEnqueueCoalesceNotification`, are only used in WINGs/notification.c. To reduce the API surface area that needs to be migrated to Rust, they are being made private.
This commit is contained in:
+1
-19
@@ -596,15 +596,13 @@ WMTreeNode *WMFindInTreeWithDepthLimit(WMTreeNode * aTree, int (*match)(const WM
|
||||
/* Walk every node of aNode with `walk' */
|
||||
void WMTreeWalk(WMTreeNode *aNode, WMTreeWalkProc * walk, void *data);
|
||||
|
||||
/* ---[ WINGs/data.c ]---------------------------------------------------- */
|
||||
/* ---[ WINGs/notification.c ]---------------------------------------------------- */
|
||||
|
||||
|
||||
WMNotification* WMCreateNotification(const char *name, void *object, void *clientData);
|
||||
|
||||
void WMReleaseNotification(WMNotification *notification);
|
||||
|
||||
WMNotification* WMRetainNotification(WMNotification *notification);
|
||||
|
||||
void* WMGetNotificationClientData(WMNotification *notification);
|
||||
|
||||
void* WMGetNotificationObject(WMNotification *notification);
|
||||
@@ -624,24 +622,8 @@ void WMRemoveNotificationObserverWithName(void *observer, const char *name,
|
||||
|
||||
void WMPostNotificationName(const char *name, void *object, void *clientData);
|
||||
|
||||
WMNotificationQueue* WMGetDefaultNotificationQueue(void);
|
||||
|
||||
WMNotificationQueue* WMCreateNotificationQueue(void);
|
||||
|
||||
void WMDequeueNotificationMatching(WMNotificationQueue *queue,
|
||||
WMNotification *notification,
|
||||
unsigned mask);
|
||||
|
||||
void WMEnqueueNotification(WMNotificationQueue *queue,
|
||||
WMNotification *notification,
|
||||
WMPostingStyle postingStyle);
|
||||
|
||||
void WMEnqueueCoalesceNotification(WMNotificationQueue *queue,
|
||||
WMNotification *notification,
|
||||
WMPostingStyle postingStyle,
|
||||
unsigned coalesceMask);
|
||||
|
||||
|
||||
/* Property Lists handling */
|
||||
|
||||
/* ---[ WINGs/proplist.c ]------------------------------------------------ */
|
||||
|
||||
+18
-5
@@ -16,6 +16,19 @@ typedef struct W_Notification {
|
||||
} Notification;
|
||||
|
||||
|
||||
static WMNotification* WMRetainNotification(WMNotification *notification);
|
||||
static WMNotificationQueue* WMGetDefaultNotificationQueue(void);
|
||||
static void WMDequeueNotificationMatching(WMNotificationQueue *queue,
|
||||
WMNotification *notification,
|
||||
unsigned mask);
|
||||
static void WMEnqueueNotification(WMNotificationQueue *queue,
|
||||
WMNotification *notification,
|
||||
WMPostingStyle postingStyle);
|
||||
static void WMEnqueueCoalesceNotification(WMNotificationQueue *queue,
|
||||
WMNotification *notification,
|
||||
WMPostingStyle postingStyle,
|
||||
unsigned coalesceMask);
|
||||
|
||||
const char *WMGetNotificationName(WMNotification * notification)
|
||||
{
|
||||
return notification->name;
|
||||
@@ -53,7 +66,7 @@ void WMReleaseNotification(WMNotification * notification)
|
||||
}
|
||||
}
|
||||
|
||||
WMNotification *WMRetainNotification(WMNotification * notification)
|
||||
static WMNotification *WMRetainNotification(WMNotification * notification)
|
||||
{
|
||||
notification->refCount++;
|
||||
|
||||
@@ -365,7 +378,7 @@ static WMNotificationQueue *notificationQueueList = NULL;
|
||||
/* default queue */
|
||||
static WMNotificationQueue *notificationQueue = NULL;
|
||||
|
||||
WMNotificationQueue *WMGetDefaultNotificationQueue(void)
|
||||
static WMNotificationQueue *WMGetDefaultNotificationQueue(void)
|
||||
{
|
||||
if (!notificationQueue)
|
||||
notificationQueue = WMCreateNotificationQueue();
|
||||
@@ -387,7 +400,7 @@ WMNotificationQueue *WMCreateNotificationQueue(void)
|
||||
return queue;
|
||||
}
|
||||
|
||||
void WMEnqueueNotification(WMNotificationQueue * queue, WMNotification * notification, WMPostingStyle postingStyle)
|
||||
static void WMEnqueueNotification(WMNotificationQueue * queue, WMNotification * notification, WMPostingStyle postingStyle)
|
||||
{
|
||||
WMEnqueueCoalesceNotification(queue, notification, postingStyle, WNCOnName | WNCOnSender);
|
||||
}
|
||||
@@ -413,7 +426,7 @@ static int matchName(const void *item, const void *cdata)
|
||||
#undef NOTIF
|
||||
#undef ITEM
|
||||
|
||||
void WMDequeueNotificationMatching(WMNotificationQueue * queue, WMNotification * notification, unsigned mask)
|
||||
static void WMDequeueNotificationMatching(WMNotificationQueue * queue, WMNotification * notification, unsigned mask)
|
||||
{
|
||||
WMMatchDataProc *matchFunc;
|
||||
|
||||
@@ -430,7 +443,7 @@ void WMDequeueNotificationMatching(WMNotificationQueue * queue, WMNotification *
|
||||
WMRemoveFromArrayMatching(queue->idleQueue, matchFunc, notification);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
WMEnqueueCoalesceNotification(WMNotificationQueue * queue,
|
||||
WMNotification * notification, WMPostingStyle postingStyle, unsigned coalesceMask)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user