Includes

2012-06-24 Thread Rodolfo García Peñas
Hi Carlos,

> I'm afraid this is not right. For example, appicon.h must know what
> WApplication (defined in application.h) is because it has, inter alia,
> 
> void paint_app_icon(WApplication *wapp);
> 
> It also uses 'Window', which AFAICT is defined in X11/X.h, which is
> indirectly included via wraster.h

I agree with you. If we have a prototype function included in a header file, 
the header file should be self-contained and include the needed includes. Doing 
this, we don't need take care about the order of the includes in the .c files.

BUT, if you see the current includes, are crap :-)

First, all files include Windowmaker.h, and this file is the first include. 
Windowmaker.h has a lot of externs,...

kix@osaka:~/src/wmaker-crm/src$ ls *.h -l | wc
 44 3962221
kix@osaka:~/src/wmaker-crm/src$ grep WindowMaker.h *.c | wc
 44  881548

Of course:

kix@osaka:~/src/wmaker-crm/src$ grep WindowMaker.h *.h 
screen.h:#include "WindowMaker.h"

should be removed.

On the other hand,

kix@osaka:~/src/wmaker-crm/src$ ls *.h -1 | wc
 43  43 461

kix@osaka:~/src/wmaker-crm/src$ ls *.c -1 | wc
 52  52 544

Therefore, not all the .c files have .h file. This is possible, but he main 
reason is because some of them are using "funcs.h" and "Windowmaker.h" to 
include their structs and prototypes. Of course, funcs.c and Windowmaker.c 
doesn't exists :-)

For this reason, I think we need "a plan":

1. Remove the prototypes and structs,... included in Windowmaker.h and funcs.h 
to the correct file. For example:

void Exit(int status) __attribute__((noreturn));
void Restart(char *manager, Bool abortOnFailure);
void SetupEnvironment(WScreen *scr);
void ExecuteShellCommand(WScreen *scr, char *command);
Bool RelaunchWindow(WWindow *wwin);
void wAbort(Bool dumpCore);
void ExecExitScript(void);

should be included in "main.h".

In this step, we should avoid add includes in the header files, because all the 
includes are in Windowmaker.h, but we must not add more includes in 
Windowmaker.h or funcs.h.

Of course, for this step we must include the correct file header in the files 
that need it. We should try to remove the "include funcs.h" if is possible.

2. At this point, funcs.h should be empty, or hold really the shared stuff. The 
same with Windowmaker.h. Now, we should try to remove Windowmaker.h and funcs.h 
from the files, adding the needed includes in the .c files or .h files.

I will send an example for main.h.

Comments are welcome.

kix
-- 
||// //\\// Rodolfo "kix" Garcia
||\\// //\\ http://www.kix.es/


-- 
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.


[PATCH 1/3] rootmenu header file updated

2012-06-24 Thread Rodolfo García Peñas

>From ed3d031bfc939f388b8e1f844bd442ac20c5e9a4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?"Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20(kix)"?= 
Date: Sun, 24 Jun 2012 10:48:22 +0200
Subject: [PATCH 1/3] rootmenu header file updated

The contents of the rootmenu.h file are not used and can be removed,
but the prototypes of roormenu.c are in funcs.h and should be moved
to the correct (rootmenu.h) file.
---
 src/event.c|1 +
 src/funcs.h|3 ---
 src/menu.c |1 +
 src/rootmenu.h |   21 +++--
 src/screen.c   |1 +
 src/window.c   |1 +
 6 files changed, 7 insertions(+), 21 deletions(-)

diff --git a/src/event.c b/src/event.c
index d31ba35..be98466 100644
--- a/src/event.c
+++ b/src/event.c
@@ -66,6 +66,7 @@
 #include "balloon.h"
 #include "xinerama.h"
 #include "wmspec.h"
+#include "rootmenu.h"
 
 / Global Variables **/
 extern XContext wWinContext;
diff --git a/src/funcs.h b/src/funcs.h
index 48fd5b3..598f602 100644
--- a/src/funcs.h
+++ b/src/funcs.h
@@ -37,8 +37,6 @@ void Restart(char *manager, Bool abortOnFailure);
 void SetupEnvironment(WScreen *scr);
 void DispatchEvent(XEvent *event);
 void UpdateSwitchMenu(WScreen *scr, WWindow *wwin, int action);
-void wRootMenuBindShortcuts(Window window);
-void OpenRootMenu(WScreen *scr, int x, int y, int keyboard);
 void OpenSwitchMenu(WScreen *scr, int x, int y, int keyboard);
 void InitializeSwitchMenu(void);
 void OpenWindowMenu(WWindow *wwin, int x, int y, int keyboard);
@@ -86,7 +84,6 @@ char * FindImage(char *paths, char *file);
 char * GetShortcutString(char *text);
 char * EscapeWM_CLASS(char *name, char *class);
 
-Bool wRootMenuPerformShortcut(XEvent *event);
 Bool RelaunchWindow(WWindow *wwin);
 Bool IsDoubleClick(WScreen *scr, XEvent *event);
 Bool UpdateDomainFile(WDDomain *domain);
diff --git a/src/menu.c b/src/menu.c
index f438385..6231e06 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -42,6 +42,7 @@
 #include "xinerama.h"
 #include "workspace.h"
 #include "dialog.h"
+#include "rootmenu.h"
 
 /** Global Variables **/
 
diff --git a/src/rootmenu.h b/src/rootmenu.h
index e7ed855..497b526 100644
--- a/src/rootmenu.h
+++ b/src/rootmenu.h
@@ -22,23 +22,8 @@
 #ifndef WMROOTMENU_H
 #define WMROOTMENU_H
 
-#include "WindowMaker.h"
-
-
-typedef void *WRootMenuData;
-
-
-typedef struct _WRootMenuReader {
-Bool (*checkMenuChange)(char *path, time_t lastAccessTime);
-
-WRootMenuData (*openMenuFile)(char *path);
-Bool (*hasMoreData)(WRootMenuData *data);
-Bool (*nextCommand)(WRootMenuData *data,
-char **title,
-char **command,
-char **parameter,
-char **shortcut);
-void (*closeMenuFile)(WRootMenuData *data);
-} WRootMenuReader;
+Bool wRootMenuPerformShortcut(XEvent * event);
+void wRootMenuBindShortcuts(Window window);
+void OpenRootMenu(WScreen * scr, int x, int y, int keyboard);
 
 #endif /* WMROOTMENU_H */
diff --git a/src/screen.c b/src/screen.c
index 27decbd..c9ae4c5 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -55,6 +55,7 @@
 #include "balloon.h"
 #include "geomview.h"
 #include "wmspec.h"
+#include "rootmenu.h"
 
 #include "xinerama.h"
 
diff --git a/src/window.c b/src/window.c
index 91ad63f..c7f41d0 100644
--- a/src/window.c
+++ b/src/window.c
@@ -58,6 +58,7 @@
 #include "appmenu.h"
 #include "appicon.h"
 #include "superfluous.h"
+#include "rootmenu.h"
 
 #ifdef MWM_HINTS
 # include "motif.h"
-- 
1.7.10

-- 
||// //\\// Rodolfo "kix" Garcia
||\\// //\\ http://www.kix.es/
>From ed3d031bfc939f388b8e1f844bd442ac20c5e9a4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?"Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20(kix)"?= 
Date: Sun, 24 Jun 2012 10:48:22 +0200
Subject: [PATCH 1/3] rootmenu header file updated

The contents of the rootmenu.h file are not used and can be removed,
but the prototypes of roormenu.c are in funcs.h and should be moved
to the correct (rootmenu.h) file.
---
 src/event.c|1 +
 src/funcs.h|3 ---
 src/menu.c |1 +
 src/rootmenu.h |   21 +++--
 src/screen.c   |1 +
 src/window.c   |1 +
 6 files changed, 7 insertions(+), 21 deletions(-)

diff --git a/src/event.c b/src/event.c
index d31ba35..be98466 100644
--- a/src/event.c
+++ b/src/event.c
@@ -66,6 +66,7 @@
 #include "balloon.h"
 #include "xinerama.h"
 #include "wmspec.h"
+#include "rootmenu.h"
 
 / Global Variables **/
 extern XContext wWinContext;
diff --git a/src/funcs.h b/src/funcs.h
index 48fd5b3..598f602 100644
--- a/src/funcs.h
+++ b/src/funcs.h
@@ -37,8 +37,6 @@ void Restart(char *manager, Bool abortOnFailure);
 void SetupEnvironment(WScreen *scr);
 void DispatchEvent(XEvent *event);
 void UpdateSwitchMenu(WScreen *scr, WWindow *wwin, int action);
-void wRootMenuBindShortcuts(Window window);
-void OpenRootMenu(WScreen *scr, int x, int y, int keyboard);
 void OpenSwitchMenu(WScreen *scr, int x, int y, int keyboard);
 void InitializeSwitchMenu(void);
 void OpenWindo

[PATCH 2/3] XKeycodeToKeysym deprecated function

2012-06-24 Thread Rodolfo García Peñas

>From 731ddae64a35e3bebce94c6d6bfb701b630df017 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?"Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20(kix)"?= 
Date: Sun, 24 Jun 2012 11:11:46 +0200
Subject: [PATCH 2/3] XKeycodeToKeysym deprecated function

The function XKeycodeToKeysym is deprecated and should be replaced
by XkbKeycodeToKeysym.
---
 src/winmenu.c   |3 ++-
 src/xmodifier.c |3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/winmenu.c b/src/winmenu.c
index c967164..4e2b64f 100644
--- a/src/winmenu.c
+++ b/src/winmenu.c
@@ -28,6 +28,7 @@
 
 #include 
 #include 
+#include 
 
 #include "WindowMaker.h"
 #include "actions.h"
@@ -246,7 +247,7 @@ static void updateWorkspaceMenu(WMenu * menu)
 static char *getShortcutString(WShortKey key)
 {
char *tmp = NULL;
-   char *k = XKeysymToString(XKeycodeToKeysym(dpy, key.keycode, 0));
+   char *k = XKeysymToString(XkbKeycodeToKeysym(dpy, key.keycode, 0, 0));
if (!k) return NULL;
 
char **m = wPreferences.modifier_labels;
diff --git a/src/xmodifier.c b/src/xmodifier.c
index 7bae013..7642443 100644
--- a/src/xmodifier.c
+++ b/src/xmodifier.c
@@ -33,6 +33,7 @@ Perpetrator: Sudish Joseph , Sept. 
1997. */
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include "xmodifier.h"
@@ -160,7 +161,7 @@ static void x_reset_modifier_mapping(Display * display)
for (column = 0; column < 4; column += 2) {
KeyCode code = 
x_modifier_keymap->modifiermap[modifier_index * mkpm
  + 
modifier_key];
-   KeySym sym = (code ? XKeycodeToKeysym(display, 
code, column) : 0);
+   KeySym sym = (code ? 
XkbKeycodeToKeysym(display, code, 0, column) : 0);
if (sym == last_sym)
continue;
last_sym = sym;
-- 
1.7.10

-- 
||// //\\// Rodolfo "kix" Garcia
||\\// //\\ http://www.kix.es/
>From 731ddae64a35e3bebce94c6d6bfb701b630df017 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?"Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20(kix)"?= 
Date: Sun, 24 Jun 2012 11:11:46 +0200
Subject: [PATCH 2/3] XKeycodeToKeysym deprecated function

The function XKeycodeToKeysym is deprecated and should be replaced
by XkbKeycodeToKeysym.
---
 src/winmenu.c   |3 ++-
 src/xmodifier.c |3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/winmenu.c b/src/winmenu.c
index c967164..4e2b64f 100644
--- a/src/winmenu.c
+++ b/src/winmenu.c
@@ -28,6 +28,7 @@
 
 #include 
 #include 
+#include 
 
 #include "WindowMaker.h"
 #include "actions.h"
@@ -246,7 +247,7 @@ static void updateWorkspaceMenu(WMenu * menu)
 static char *getShortcutString(WShortKey key)
 {
 	char *tmp = NULL;
-	char *k = XKeysymToString(XKeycodeToKeysym(dpy, key.keycode, 0));
+	char *k = XKeysymToString(XkbKeycodeToKeysym(dpy, key.keycode, 0, 0));
 	if (!k) return NULL;
 
 	char **m = wPreferences.modifier_labels;
diff --git a/src/xmodifier.c b/src/xmodifier.c
index 7bae013..7642443 100644
--- a/src/xmodifier.c
+++ b/src/xmodifier.c
@@ -33,6 +33,7 @@ Perpetrator: Sudish Joseph , Sept. 1997. */
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include "xmodifier.h"
@@ -160,7 +161,7 @@ static void x_reset_modifier_mapping(Display * display)
 			for (column = 0; column < 4; column += 2) {
 KeyCode code = x_modifier_keymap->modifiermap[modifier_index * mkpm
 	  + modifier_key];
-KeySym sym = (code ? XKeycodeToKeysym(display, code, column) : 0);
+KeySym sym = (code ? XkbKeycodeToKeysym(display, code, 0, column) : 0);
 if (sym == last_sym)
 	continue;
 last_sym = sym;
-- 
1.7.10



[PATCH 3/3] Moving header functions to main.h

2012-06-24 Thread Rodolfo García Peñas

>From 45857d70e0dc08885fc96d8ffb94dc2d28858c49 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?"Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20(kix)"?= 
Date: Sun, 24 Jun 2012 12:35:24 +0200
Subject: [PATCH 3/3] Moving header functions to main.h

The header functions of main.c should be included in main.h,
not in funcs.h. This patch addes the main.h file and moves the
functions this file.

The not needed "include funcs.h" are removed.
---
 src/WindowMaker.h |8 
 src/appicon.c |2 +-
 src/defaults.c|2 +-
 src/dock.c|2 +-
 src/event.c   |2 +-
 src/funcs.h   |6 --
 src/main.c|   10 +-
 src/main.h|   33 +
 src/monitor.c |2 +-
 src/rootmenu.c|1 +
 src/screen.c  |1 +
 src/session.c |2 +-
 src/shutdown.c|1 +
 src/startup.c |2 +-
 src/winmenu.c |2 +-
 15 files changed, 49 insertions(+), 27 deletions(-)
 create mode 100644 src/main.h

diff --git a/src/WindowMaker.h b/src/WindowMaker.h
index 745cd42..5388fdd 100644
--- a/src/WindowMaker.h
+++ b/src/WindowMaker.h
@@ -448,19 +448,12 @@ typedef struct WPreferences {
 } flags;  /* internal flags */
 } WPreferences;
 
-
-
 /** Global Variables  **/
 extern Display *dpy;
 extern unsigned int ValidModMask;
 extern char WProgramState;
 extern char WProgramSigState;
 
-
-/** Global Functions **/
-extern void wAbort(Bool dumpCore);
-
-
 /** Notifications **/
 extern const char *WMNManaged;
 extern const char *WMNUnmanaged;
@@ -477,4 +470,3 @@ extern const char *WMNWorkspaceNameChanged;
 
 extern const char *WMNResetStacking;
 #endif
-
diff --git a/src/appicon.c b/src/appicon.c
index 6e6b87a..546c3ac 100644
--- a/src/appicon.c
+++ b/src/appicon.c
@@ -38,7 +38,7 @@
 #include "actions.h"
 #include "stacking.h"
 #include "dock.h"
-#include "funcs.h"
+#include "main.h"
 #include "defaults.h"
 #include "workspace.h"
 #include "superfluous.h"
diff --git a/src/defaults.c b/src/defaults.c
index 86edfa4..e512a8b 100644
--- a/src/defaults.c
+++ b/src/defaults.c
@@ -56,7 +56,7 @@
 #include "keybind.h"
 #include "xmodifier.h"
 #include "icon.h"
-#include "funcs.h"
+#include "main.h"
 #include "actions.h"
 #include "dock.h"
 #include "workspace.h"
diff --git a/src/dock.c b/src/dock.c
index 193bc01..d5d5003 100644
--- a/src/dock.c
+++ b/src/dock.c
@@ -45,7 +45,7 @@
 #include "dock.h"
 #include "dockedapp.h"
 #include "dialog.h"
-#include "funcs.h"
+#include "main.h"
 #include "properties.h"
 #include "menu.h"
 #include "client.h"
diff --git a/src/event.c b/src/event.c
index be98466..8e287d1 100644
--- a/src/event.c
+++ b/src/event.c
@@ -54,7 +54,7 @@
 #include "window.h"
 #include "actions.h"
 #include "client.h"
-#include "funcs.h"
+#include "main.h"
 #include "keybind.h"
 #include "application.h"
 #include "stacking.h"
diff --git a/src/funcs.h b/src/funcs.h
index 598f602..ff6ee6c 100644
--- a/src/funcs.h
+++ b/src/funcs.h
@@ -32,9 +32,6 @@ typedef void (WDeathHandler)(pid_t pid, unsigned int status, 
void *cdata);
 
 void Shutdown(WShutdownMode mode);
 void RestoreDesktop(WScreen *scr);
-void Exit(int status) __attribute__((noreturn));
-void Restart(char *manager, Bool abortOnFailure);
-void SetupEnvironment(WScreen *scr);
 void DispatchEvent(XEvent *event);
 void UpdateSwitchMenu(WScreen *scr, WWindow *wwin, int action);
 void OpenSwitchMenu(WScreen *scr, int x, int y, int keyboard);
@@ -52,8 +49,6 @@ void PlaceIcon(WScreen *scr, int *x_ret, int *y_ret, int 
head);
 void StartWindozeCycle(WWindow *wwin, XEvent *event, Bool next, Bool 
class_only);
 void SendHelperMessage(WScreen *scr, char type, int workspace, char *msg);
 void UnescapeWM_CLASS(char *str, char **name, char **class);
-void ExecuteShellCommand(WScreen *scr, char *command);
-void ExecExitScript();
 void PlaceWindow(WWindow *wwin, int *x_ret, int *y_ret,
  unsigned int width, unsigned int height);
 
@@ -84,7 +79,6 @@ char * FindImage(char *paths, char *file);
 char * GetShortcutString(char *text);
 char * EscapeWM_CLASS(char *name, char *class);
 
-Bool RelaunchWindow(WWindow *wwin);
 Bool IsDoubleClick(WScreen *scr, XEvent *event);
 Bool UpdateDomainFile(WDDomain *domain);
 
diff --git a/src/main.c b/src/main.c
index 431d41b..169f830 100644
--- a/src/main.c
+++ b/src/main.c
@@ -485,7 +485,7 @@ void wAbort(Bool dumpCore)
exit(1);
 }
 
-void print_help()
+static void print_help(void)
 {
printf(_("Usage: %s [options]\n"), ProgName);
puts(_("The Window Maker window manager for the X window system"));
@@ -511,7 +511,7 @@ void print_help()
puts(_(" --help show this message"));
 }
 
-void check_defaults()
+static void check_defaults(void)
 {
char *path;
 
@@ -537,7 +537,7 @@ void check_defaults()
  * files have changed, using linux kernel inotify mechanism
  */
 
-static void inotifyWatchConfig()
+static void inotifyWatchConfig(void)
 {
char

Re: Windowmaker on OS X Mac

2012-06-24 Thread Rodolfo

> Can someone please point me to a resource that describes how to build and
> deploy to OS X. I'm using Lion.
>
> Cheers

Hi Upi,

I am not using OS X, but probably you should install XCode, GCC, or
MacPorts to do it.

I am cc: wmaker-dev because other developers can help you.

Cheers,
kix

>
> --
> To unsubscribe, send mail to
> wmaker-user-unsubscr...@lists.windowmaker.org.
>


-- 
Rodolfo García AKA kix
http://www.kix.es/
EA4ERH (@IN80ER)


--
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.


Re: Includes

2012-06-24 Thread Carlos R. Mafra
On Sun, 24 Jun 2012 at 12:34:54 +0200, Rodolfo García Peñas wrote:
> 
> For this reason, I think we need "a plan":
> 
> 1. Remove the prototypes and structs,... included in Windowmaker.h and 
> funcs.h to the correct file. For example:
> 
> void Exit(int status) __attribute__((noreturn));
> void Restart(char *manager, Bool abortOnFailure);
> void SetupEnvironment(WScreen *scr);
> void ExecuteShellCommand(WScreen *scr, char *command);
> Bool RelaunchWindow(WWindow *wwin);
> void wAbort(Bool dumpCore);
> void ExecExitScript(void);
> 
> should be included in "main.h".
> 
> In this step, we should avoid add includes in the header files, because all 
> the includes are in Windowmaker.h, but we must not add more includes in 
> Windowmaker.h or funcs.h.

I'm not sure I understand this step about not adding includes in header
files.
 
> Of course, for this step we must include the correct file header in the files 
> that need it. We should try to remove the "include funcs.h" if is possible.
> 
> 2. At this point, funcs.h should be empty, or hold really the shared stuff. 
> The same with Windowmaker.h. Now, we should try to remove Windowmaker.h and 
> funcs.h from the files, adding the needed includes in the .c files or .h 
> files.
> 
> I will send an example for main.h.
> 
> Comments are welcome.

I agree with the overall plan, and with having a 1:1 mapping between
.c and .h files such that the #include's are not so messy.


-- 
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.


Re: Includes

2012-06-24 Thread Rodolfo

> On Sun, 24 Jun 2012 at 12:34:54 +0200, Rodolfo García Peñas wrote:
>>
>> For this reason, I think we need "a plan":
>>
>> 1. Remove the prototypes and structs,... included in Windowmaker.h and
>> funcs.h to the correct file. For example:
>>
>> void Exit(int status) __attribute__((noreturn));
>> void Restart(char *manager, Bool abortOnFailure);
>> void SetupEnvironment(WScreen *scr);
>> void ExecuteShellCommand(WScreen *scr, char *command);
>> Bool RelaunchWindow(WWindow *wwin);
>> void wAbort(Bool dumpCore);
>> void ExecExitScript(void);
>>
>> should be included in "main.h".
>>
>> In this step, we should avoid add includes in the header files, because
>> all the includes are in Windowmaker.h, but we must not add more includes
>> in Windowmaker.h or funcs.h.
>
> I'm not sure I understand this step about not adding includes in header
> files.

I am trying to say that we should not add more includes in the .h files
(yes in .c files if needed), to avoid include recursion, and we must not
add nothing in Windowmaker.h nor funcs.h (because we are cleaning them,
and because when we add something to these 2 files, we are adding it to
all the files, because these files are included widely).

>> Of course, for this step we must include the correct file header in the
>> files that need it. We should try to remove the "include funcs.h" if is
>> possible.
>>
>> 2. At this point, funcs.h should be empty, or hold really the shared
>> stuff. The same with Windowmaker.h. Now, we should try to remove
>> Windowmaker.h and funcs.h from the files, adding the needed includes in
>> the .c files or .h files.
>>
>> I will send an example for main.h.
>>
>> Comments are welcome.
>
> I agree with the overall plan, and with having a 1:1 mapping between
> .c and .h files such that the #include's are not so messy.

perfect :-)

> --
> To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.
>


-- 
Rodolfo García AKA kix
http://www.kix.es/
EA4ERH (@IN80ER)


--
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.


Re: [PATCH 3/3] Moving header functions to main.h

2012-06-24 Thread Carlos R. Mafra
On Sun, 24 Jun 2012 at 12:38:50 +0200, Rodolfo García Peñas wrote:

> Subject: [PATCH 3/3] Moving header functions to main.h

Thanks, all 3 patches are in #next now.


-- 
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.


Re: Windowmaker on OS X Mac

2012-06-24 Thread BALATON Zoltan

On Sun, 24 Jun 2012, "Rodolfo "kix" Garc?a " wrote:

I am not using OS X, but probably you should install XCode, GCC, or
MacPorts to do it.


Apparently it's in MacPorts, see:

https://trac.macports.org/browser/trunk/dports/x11/windowmaker/Portfile

(albeit not the latest version) so it's probably the easiest to try that 
first. After that you might try to update the portfile to the latest 
version or fix any errors you encounter, see how to make a local version 
of the port you can work on here:


http://guide.macports.org/#development.local-repositories

It's also in fink (but no binary since 10.5):

http://pdb.finkproject.org/pdb/package.php/windowmaker

But maybe unless you use X11 in a full root window on OS X, Window Maker 
might not be that useful because normally the Aqua WM will manage X apps. 
(I may be wrong though, I've never tried Window Maker on OS X.)


Regards,
BALATON Zoltan

Re: Includes

2012-06-24 Thread BALATON Zoltan

On Sun, 24 Jun 2012, Rodolfo García Peñas wrote:
Therefore, not all the .c files have .h file. This is possible, but he 
main reason is because some of them are using "funcs.h" and 
"Windowmaker.h" to include their structs and prototypes. Of course, 
funcs.c and Windowmaker.c doesn't exists :-)


For this reason, I think we need "a plan":


You may want to consider that .h files are not necessarily belong to .c 
files and it does not have to be a one-to-one mapping. In the object 
oriented paradigm .h would declare the methods or the interface of an 
object and the .c would contain the implementation (the actual method 
definitions). Thus it's fine to have internal functions defined in the .c 
file and also fine to split the implementation into multiple .c files 
while there's still only one .h file. You could also think of this as 
modules. The functions declared in WindowMaker.h might belong to a core 
module which is implemeted in multiple .c files. Of course this can be 
changed and fixed if this is not anymore the case but the point is that it 
should follow some logic and not just make every .c file have a .h file 
declaring every funtion. That's why we need a plan and have to think about 
what are the modules that need a .h file first :-)


Regards,
BALATON Zoltan

Re: Includes

2012-06-24 Thread Rodolfo

> On Sun, 24 Jun 2012, Rodolfo García Peñas wrote:
>> Therefore, not all the .c files have .h file. This is possible, but he
>> main reason is because some of them are using "funcs.h" and
>> "Windowmaker.h" to include their structs and prototypes. Of course,
>> funcs.c and Windowmaker.c doesn't exists :-)
>>
>> For this reason, I think we need "a plan":
>
> You may want to consider that .h files are not necessarily belong to .c
> files and it does not have to be a one-to-one mapping. In the object

Yes yes :-) I know. See the "This is possible..."

> oriented paradigm .h would declare the methods or the interface of an
> object and the .c would contain the implementation (the actual method
> definitions). Thus it's fine to have internal functions defined in the .c
> file and also fine to split the implementation into multiple .c files
> while there's still only one .h file. You could also think of this as
> modules. The functions declared in WindowMaker.h might belong to a core
> module which is implemeted in multiple .c files. Of course this can be
> changed and fixed if this is not anymore the case but the point is that it
> should follow some logic and not just make every .c file have a .h file
> declaring every funtion. That's why we need a plan and have to think about
> what are the modules that need a .h file first :-)

I agree.

Thanks,
kix

> Regards,
> BALATON Zoltan


-- 
Rodolfo García AKA kix
http://www.kix.es/
EA4ERH (@IN80ER)


--
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.