Const ptrs, cleanups.

SVN revision: 18104
This commit is contained in:
Kim Woelders 2005-10-29 13:09:31 +00:00
parent 729c2a92b4
commit 37350b71ee
3 changed files with 19 additions and 16 deletions

13
src/E.h
View File

@ -996,17 +996,10 @@ char *field(char *s, int fieldno);
void fword(char *s, int num, char *wd); void fword(char *s, int num, char *wd);
/* finders.c */ /* finders.c */
EWin *EwinFindByPtr(const EWin * ewin); Group **ListWinGroups(const EWin * ewin, char group_select,
EWin *EwinFindByFrame(Window win); int *num);
EWin *EwinFindByClient(Window win); EWin **ListWinGroupMembersForEwin(const EWin * ewin, int action,
EWin *EwinFindByChildren(Window win);
EWin *EwinFindByString(const char *win, int type);
Group **ListWinGroups(EWin * ewin, char group_select, int *num);
EWin **ListWinGroupMembersForEwin(EWin * ewin, int action,
char nogroup, int *num); char nogroup, int *num);
EWin **EwinListTransients(EWin * ewin, int *num, int group);
EWin **EwinListTransientFor(EWin * ewin, int *num);
/* focus.c */ /* focus.c */
#define FOCUS_NOP 0 #define FOCUS_NOP 0

View File

@ -328,6 +328,15 @@ void EwinOpSetOpacity(EWin * ewin, int opacity);
void EwinOpMoveToDesk(EWin * ewin, struct _desk *dsk, int inc); void EwinOpMoveToDesk(EWin * ewin, struct _desk *dsk, int inc);
void EwinOpMoveToArea(EWin * ewin, int x, int y); void EwinOpMoveToArea(EWin * ewin, int x, int y);
/* finders.c */
EWin *EwinFindByPtr(const EWin * ewin);
EWin *EwinFindByFrame(Window win);
EWin *EwinFindByClient(Window win);
EWin *EwinFindByChildren(Window win);
EWin *EwinFindByString(const char *win, int type);
EWin **EwinListTransients(const EWin * ewin, int *num, int group);
EWin **EwinListTransientFor(const EWin * ewin, int *num);
/* stacking.c */ /* stacking.c */
EWin *const *EwinListStackGet(int *num); EWin *const *EwinListStackGet(int *num);
EWin *const *EwinListFocusGet(int *num); EWin *const *EwinListFocusGet(int *num);

View File

@ -141,7 +141,7 @@ EwinFindByString(const char *match, int type)
} }
Group ** Group **
ListWinGroups(EWin * ewin, char group_select, int *num) ListWinGroups(const EWin * ewin, char group_select, int *num)
{ {
Group **groups = NULL; Group **groups = NULL;
Group **groups2 = NULL; Group **groups2 = NULL;
@ -190,7 +190,8 @@ ListWinGroups(EWin * ewin, char group_select, int *num)
} }
EWin ** EWin **
ListWinGroupMembersForEwin(EWin * ewin, int action, char nogroup, int *num) ListWinGroupMembersForEwin(const EWin * ewin, int action, char nogroup,
int *num)
{ {
EWin **gwins = NULL; EWin **gwins = NULL;
@ -202,7 +203,7 @@ ListWinGroupMembersForEwin(EWin * ewin, int action, char nogroup, int *num)
if (nogroup) if (nogroup)
{ {
gwins = Emalloc(sizeof(EWin *)); gwins = Emalloc(sizeof(EWin *));
gwins[0] = ewin; gwins[0] = (EWin *) ewin;
*num = 1; *num = 1;
return gwins; return gwins;
} }
@ -281,7 +282,7 @@ ListWinGroupMembersForEwin(EWin * ewin, int action, char nogroup, int *num)
if ((*num) == 0) if ((*num) == 0)
{ {
gwins = Emalloc(sizeof(EWin *)); gwins = Emalloc(sizeof(EWin *));
gwins[0] = ewin; gwins[0] = (EWin *) ewin;
*num = 1; *num = 1;
} }
return gwins; return gwins;
@ -294,7 +295,7 @@ ListWinGroupMembersForEwin(EWin * ewin, int action, char nogroup, int *num)
} }
EWin ** EWin **
EwinListTransients(EWin * ewin, int *num, int group) EwinListTransients(const EWin * ewin, int *num, int group)
{ {
EWin *const *ewins, **lst, *ew; EWin *const *ewins, **lst, *ew;
int i, j, n; int i, j, n;
@ -352,7 +353,7 @@ EwinListTransients(EWin * ewin, int *num, int group)
} }
EWin ** EWin **
EwinListTransientFor(EWin * ewin, int *num) EwinListTransientFor(const EWin * ewin, int *num)
{ {
EWin *const *ewins, **lst, *ew; EWin *const *ewins, **lst, *ew;
int i, j, n; int i, j, n;