diff mac/dw.m @ 2626:401a3b9f21ba

Massive continuation of code style standardization. Only tested on Mac and iOS, may require follow up commits to get things building again as I test on various platforms.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sun, 01 Aug 2021 12:17:07 +0000
parents e63c1373c010
children cff8f6b6e302
line wrap: on
line diff
--- a/mac/dw.m	Tue Jul 27 23:09:52 2021 +0000
+++ b/mac/dw.m	Sun Aug 01 12:17:07 2021 +0000
@@ -469,9 +469,9 @@
     pthread_setspecific(_dw_bg_color_key, NULL);
 }
 
-typedef struct _sighandler
-{
-    struct _sighandler   *next;
+typedef struct _dwsighandler
+{
+    struct _dwsighandler   *next;
     ULONG message;
     HWND window;
     int id;
@@ -479,9 +479,9 @@
     void *discfunction;
     void *data;
 
-} SignalHandler;
-
-static SignalHandler *DWRoot = NULL;
+} DWSignalHandler;
+
+static DWSignalHandler *DWRoot = NULL;
 
 /* Some internal prototypes */
 static void _dw_do_resize(Box *thisbox, int x, int y);
@@ -507,9 +507,9 @@
     }
 }
 
-SignalHandler *_dw_get_handler(HWND window, int messageid)
-{
-    SignalHandler *tmp = DWRoot;
+DWSignalHandler *_dw_get_handler(HWND window, int messageid)
+{
+    DWSignalHandler *tmp = DWRoot;
 
     /* Find any callbacks for this function */
     while(tmp)
@@ -557,7 +557,7 @@
 
 int _dw_event_handler1(id object, NSEvent *event, int message)
 {
-    SignalHandler *handler = _dw_get_handler(object, message);
+    DWSignalHandler *handler = _dw_get_handler(object, message);
     /* NSLog(@"Event handler - type %d\n", message); */
 
     if(handler)
@@ -3587,7 +3587,7 @@
  */
 void _dw_new_signal(ULONG message, HWND window, int msgid, void *signalfunction, void *discfunc, void *data)
 {
-    SignalHandler *new = malloc(sizeof(SignalHandler));
+    DWSignalHandler *new = malloc(sizeof(DWSignalHandler));
 
     new->message = message;
     new->window = window;
@@ -3601,7 +3601,7 @@
         DWRoot = new;
     else
     {
-        SignalHandler *prev = NULL, *tmp = DWRoot;
+        DWSignalHandler *prev = NULL, *tmp = DWRoot;
         while(tmp)
         {
             if(tmp->message == message &&
@@ -11555,7 +11555,7 @@
  */
 void API dw_timer_disconnect(HTIMER timerid)
 {
-    SignalHandler *prev = NULL, *tmp = DWRoot;
+    DWSignalHandler *prev = NULL, *tmp = DWRoot;
     NSTimer *thistimer;
 
     /* 0 is an invalid timer ID */
@@ -11640,7 +11640,7 @@
  */
 void API dw_signal_disconnect_by_name(HWND window, const char *signame)
 {
-    SignalHandler *prev = NULL, *tmp = DWRoot;
+    DWSignalHandler *prev = NULL, *tmp = DWRoot;
     ULONG message;
 
     if(!window || !signame || (message = _dw_findsigmessage(signame)) == 0)
@@ -11685,7 +11685,7 @@
  */
 void API dw_signal_disconnect_by_window(HWND window)
 {
-    SignalHandler *prev = NULL, *tmp = DWRoot;
+    DWSignalHandler *prev = NULL, *tmp = DWRoot;
 
     while(tmp)
     {
@@ -11727,7 +11727,7 @@
  */
 void API dw_signal_disconnect_by_data(HWND window, void *data)
 {
-    SignalHandler *prev = NULL, *tmp = DWRoot;
+    DWSignalHandler *prev = NULL, *tmp = DWRoot;
 
     while(tmp)
     {