Apply clang-format to source tree
[alexxy/gromacs.git] / src / programs / view / popup.h
index fac384316e1482aa0a2d3ca29dc2c01c1e24f217..924e364b7700c0e73d22fd35eba937e14cf5eb0d 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013, by the GROMACS development team, led by
+ * Copyright (c) 2013,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
 #include "x11.h"
 #include "xutil.h"
 
-typedef struct {
+typedef struct
+{
     Window      send_to;  /* Window to send messages to                        */
     int         nreturn;  /* Value returned when entry is selected  */
     bool        bChecked; /* Indicate whether menu item is check-marked        */
-    const char *str;      /* Text for menu entry                               */
+    const charstr;      /* Text for menu entry                               */
 } t_mentry;
 
-typedef struct {
-    t_windata  wd;     /* The window struct                            */
-    t_mentry  *m;      /* The menu entry                               */
-    Window     Parent; /* Parent window id                             */
+typedef struct
+{
+    t_windata wd;     /* The window struct                             */
+    t_mentry* m;      /* The menu entry                                */
+    Window    Parent; /* Parent window id                              */
 } t_child;
 
-typedef struct {
-    t_windata     wd;       /* The window struct                */
-    Window        Parent;   /* The parent of the menu                   */
-    int           nitem;    /* The number of menu items                        */
-    t_child      *item;     /* Array of child windows                   */
-    bool          bGrabbed; /* Did this menu grab the pointer?              */
+typedef struct
+{
+    t_windata wd;       /* The window struct                */
+    Window    Parent;   /* The parent of the menu                   */
+    int       nitem;    /* The number of menu items                    */
+    t_child*  item;     /* Array of child windows                   */
+    bool      bGrabbed; /* Did this menu grab the pointer?              */
 } t_menu;
 
-extern t_menu *init_menu(t_x11 *x11, Window Parent, unsigned long fg, unsigned long bg,
-                         int nent, t_mentry ent[], int ncol);
+extern t_menu*
+init_menu(t_x11* x11, Window Parent, unsigned long fg, unsigned long bg, int nent, t_mentry ent[], int ncol);
 /* This routine will create a popup menu. It will create a
  * a base window, and child windows for all the items.
  * If ncol != 0 then ncol columns of items will be created;
@@ -78,7 +81,7 @@ extern t_menu *init_menu(t_x11 *x11, Window Parent, unsigned long fg, unsigned l
  * has to be shown, call show_menu.
  */
 
-extern void show_menu(t_x11 *x11, t_menu *m, int x, int y, bool bGrab);
+extern void show_menu(t_x11* x11, t_menu* m, int x, int y, bool bGrab);
 /* Show the menu in m at (x,y)
  * This will popup the menu, and when a button is released in the
  * menu send a ClientMessage to the Parent window of the menu
@@ -86,22 +89,22 @@ extern void show_menu(t_x11 *x11, t_menu *m, int x, int y, bool bGrab);
  * bGrab specifies whether or not to grab the pointer.
  */
 
-extern void hide_menu(t_x11 *x11, t_menu *m);
+extern void hide_menu(t_x11* x11, t_menu* m);
 /* Unmaps the window for m, hides the window */
 
-extern void check_menu_item(t_menu *m, int nreturn, bool bStatus);
+extern void check_menu_item(t_menum, int nreturn, bool bStatus);
 /* Set the bChecked field in the menu item with return code
  * nreturn to bStatus. This function must always be called when
  * the bChecked flag has to changed.
  */
 
-extern void done_menu(t_x11 *x11, t_menu *m);
+extern void done_menu(t_x11* x11, t_menu* m);
 /* This routine destroys the menu m, and unregisters it with x11 */
 
-extern int menu_width(t_menu *m);
+extern int menu_width(t_menum);
 /* Return the width of the window */
 
-extern int menu_height(t_menu *m);
+extern int menu_height(t_menum);
 /* Return the height of the window */
 
-#endif  /* _popup_h */
+#endif /* _popup_h */