diff options
Diffstat (limited to 'info.c')
-rw-r--r-- | info.c | 112 |
1 files changed, 24 insertions, 88 deletions
@@ -23,10 +23,13 @@ Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. ******************************************************************************/ +/* $XFree86: xc/programs/xsm/info.c,v 1.6 2001/12/14 20:02:25 dawes Exp $ */ #include "xsm.h" #include "restart.h" #include "popup.h" +#include "info.h" +#include "prop.h" #include <X11/Shell.h> #include <X11/Xaw/Form.h> @@ -64,10 +67,7 @@ Widget clientPropTextWidget; void -ShowHint (client) - -ClientRec *client; - +ShowHint(ClientRec *client) { static Widget active = NULL; int hint = client->restartHint; @@ -101,11 +101,7 @@ typedef struct { static void -AppendStr (buffer, str) - -Buffer *buffer; -char *str; - +AppendStr(Buffer *buffer, char *str) { int len = strlen (str); @@ -130,10 +126,7 @@ char *str; void -DisplayProps (client) - -ClientRec *client; - +DisplayProps(ClientRec *client) { int index; List *pl, *pj, *vl; @@ -265,12 +258,7 @@ ClientRec *client; static void -ClientListXtProc (w, client_data, callData) - -Widget w; -XtPointer client_data; -XtPointer callData; - +ClientListXtProc(Widget w, XtPointer client_data, XtPointer callData) { XawListReturnStruct *current = (XawListReturnStruct *) callData; ClientRec *client; @@ -289,12 +277,7 @@ XtPointer callData; static void -ViewPropXtProc (w, client_data, callData) - -Widget w; -XtPointer client_data; -XtPointer callData; - +ViewPropXtProc(Widget w, XtPointer client_data, XtPointer callData) { ClientRec *client; XawListReturnStruct *current; @@ -316,12 +299,7 @@ XtPointer callData; static void -CloneXtProc (w, client_data, callData) - -Widget w; -XtPointer client_data; -XtPointer callData; - +CloneXtProc(Widget w, XtPointer client_data, XtPointer callData) { ClientRec *client; XawListReturnStruct *current; @@ -346,12 +324,7 @@ XtPointer callData; static void -KillClientXtProc (w, client_data, callData) - -Widget w; -XtPointer client_data; -XtPointer callData; - +KillClientXtProc(Widget w, XtPointer client_data, XtPointer callData) { ClientRec *client; XawListReturnStruct *current; @@ -375,12 +348,7 @@ XtPointer callData; static void -listDoneXtProc (w, client_data, callData) - -Widget w; -XtPointer client_data; -XtPointer callData; - +listDoneXtProc(Widget w, XtPointer client_data, XtPointer callData) { XtPopdown (clientInfoPopup); client_info_visible = 0; @@ -389,10 +357,7 @@ XtPointer callData; char * -GetProgramName (fullname) - -char *fullname; - +GetProgramName(char *fullname) { char *lastSlash = NULL; int i; @@ -410,8 +375,7 @@ char *fullname; void -UpdateClientList () - +UpdateClientList(void) { ClientRec *client; char *progName, *hostname, *tmp1, *tmp2; @@ -617,12 +581,7 @@ UpdateClientList () static void -RestartHintXtProc (w, client_data, callData) - -Widget w; -XtPointer client_data; -XtPointer callData; - +RestartHintXtProc(Widget w, XtPointer client_data, XtPointer callData) { XawListReturnStruct *current; ClientRec *client; @@ -667,6 +626,7 @@ XtPointer callData; if (strcmp (SmRestartStyleHint, pprop->name) == 0) { List *vl = ListFirst (pprop->values); + PropValue *pval = (PropValue *) vl->thing; *((char *) (pval->value)) = hint; @@ -706,12 +666,7 @@ XtPointer callData; static void -clientPropDoneXtProc (w, client_data, callData) - -Widget w; -XtPointer client_data; -XtPointer callData; - +clientPropDoneXtProc(Widget w, XtPointer client_data, XtPointer callData) { XtPopdown (clientPropPopup); client_prop_visible = 0; @@ -720,13 +675,9 @@ XtPointer callData; void -ClientInfoStructureNotifyXtHandler (w, closure, event, continue_to_dispatch) - -Widget w; -XtPointer closure; -XEvent *event; -Boolean *continue_to_dispatch; - +ClientInfoStructureNotifyXtHandler(Widget w, XtPointer closure, + XEvent *event, + Boolean *continue_to_dispatch) { if (event->type == MapNotify) { @@ -743,11 +694,7 @@ Boolean *continue_to_dispatch; void -ClientInfoXtProc (w, client_data, callData) - Widget w; - XtPointer client_data; - XtPointer callData; - +ClientInfoXtProc(Widget w, XtPointer client_data, XtPointer callData) { static int first_time = 1; @@ -801,13 +748,8 @@ static unsigned char check_bits[] = { static void -DelClientInfoWinAction (w, event, params, num_params) - -Widget w; -XEvent *event; -String *params; -Cardinal *num_params; - +DelClientInfoWinAction(Widget w, XEvent *event, String *params, + Cardinal *num_params) { XtCallCallbacks (clientInfoDoneButton, XtNcallback, NULL); } @@ -815,13 +757,7 @@ Cardinal *num_params; static void -DelPropWinAction (w, event, params, num_params) - -Widget w; -XEvent *event; -String *params; -Cardinal *num_params; - +DelPropWinAction(Widget w, XEvent *event, String *params, Cardinal *num_params) { XtCallCallbacks (clientPropDoneButton, XtNcallback, NULL); } @@ -829,7 +765,7 @@ Cardinal *num_params; void -create_client_info_popup () +create_client_info_popup(void) { /* |