1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 12:28:22 +01:00

New file misc.h

This is the new file misc.h, with the function prototypes for misc.c.
This file is created using misc.c and removing the prototypes from funcs.h
This commit is contained in:
Rodolfo García Peñas (kix)
2013-04-14 23:13:26 +02:00
committed by Carlos R. Mafra
parent 25b5ca2566
commit 41da1b30db
23 changed files with 70 additions and 41 deletions

View File

@@ -47,6 +47,7 @@
#include "xinerama.h" #include "xinerama.h"
#include "usermenu.h" #include "usermenu.h"
#include "placement.h" #include "placement.h"
#include "misc.h"
/****** Global Variables ******/ /****** Global Variables ******/

View File

@@ -48,6 +48,7 @@
#include "xinerama.h" #include "xinerama.h"
#include "client.h" #include "client.h"
#include "placement.h" #include "placement.h"
#include "misc.h"
#ifdef XDND #ifdef XDND
#include "xdnd.h" #include "xdnd.h"
#endif #endif

View File

@@ -42,6 +42,7 @@
#include "appicon.h" #include "appicon.h"
#include "appmenu.h" #include "appmenu.h"
#include "wmspec.h" #include "wmspec.h"
#include "misc.h"
/****** Global Variables ******/ /****** Global Variables ******/

View File

@@ -61,6 +61,7 @@
#include "dock.h" #include "dock.h"
#include "workspace.h" #include "workspace.h"
#include "properties.h" #include "properties.h"
#include "misc.h"
#define MAX_SHORTCUT_LENGTH 32 #define MAX_SHORTCUT_LENGTH 32

View File

@@ -52,7 +52,7 @@
#include "GNUstep.h" #include "GNUstep.h"
#include "screen.h" #include "screen.h"
#include "dialog.h" #include "dialog.h"
#include "funcs.h" #include "misc.h"
#include "stacking.h" #include "stacking.h"
#include "framewin.h" #include "framewin.h"
#include "window.h" #include "window.h"

View File

@@ -55,6 +55,7 @@
#include "superfluous.h" #include "superfluous.h"
#include "xinerama.h" #include "xinerama.h"
#include "placement.h" #include "placement.h"
#include "misc.h"
/**** Local variables ****/ /**** Local variables ****/
#define CLIP_REWIND 1 #define CLIP_REWIND 1

View File

@@ -33,7 +33,7 @@
#include "dock.h" #include "dock.h"
#include "dockedapp.h" #include "dockedapp.h"
#include "dialog.h" #include "dialog.h"
#include "funcs.h" #include "misc.h"
#include "defaults.h" #include "defaults.h"
#include "framewin.h" #include "framewin.h"
#include "xinerama.h" #include "xinerama.h"

View File

@@ -70,6 +70,7 @@
#include "colormap.h" #include "colormap.h"
#include "screen.h" #include "screen.h"
#include "shutdown.h" #include "shutdown.h"
#include "misc.h"
/******** Global Variables **********/ /******** Global Variables **********/
extern XContext wWinContext; extern XContext wWinContext;

View File

@@ -39,7 +39,7 @@
#include "wcore.h" #include "wcore.h"
#include "framewin.h" #include "framewin.h"
#include "stacking.h" #include "stacking.h"
#include "funcs.h" #include "misc.h"
#define DBLCLICK_TIME wPreferences.dblclick_time #define DBLCLICK_TIME wPreferences.dblclick_time

View File

@@ -41,11 +41,6 @@ void OpenMiniwindowMenu(WWindow *wwin, int x, int y);
void CloseWindowMenu(WScreen *scr); void CloseWindowMenu(WScreen *scr);
void DestroyWindowMenu(WScreen *scr); void DestroyWindowMenu(WScreen *scr);
void StartWindozeCycle(WWindow *wwin, XEvent *event, Bool next, Bool class_only); 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 ParseWindowName(WMPropList *value, char **winstance, char **wclass,
char *where);
void wHackedGrabButton(unsigned int button, unsigned int modifiers, void wHackedGrabButton(unsigned int button, unsigned int modifiers,
Window grab_window, Bool owner_events, Window grab_window, Bool owner_events,
@@ -57,24 +52,11 @@ WMagicNumber wAddDeathHandler(pid_t pid, WDeathHandler *callback, void *cdata);
Pixmap LoadIcon(WScreen *scr, char *path, char *mask, int title_height); Pixmap LoadIcon(WScreen *scr, char *path, char *mask, int title_height);
char * StrConcatDot(char *a, char *b);
char * ExpandOptions(WScreen *scr, char *cmdline);
char * ShrinkString(WMFont *font, char *string, int width);
char * FindImage(char *paths, char *file);
char * GetShortcutString(char *text);
char * GetShortcutKey(WShortKey key);
char * EscapeWM_CLASS(char *name, char *class);
Bool IsDoubleClick(WScreen *scr, XEvent *event); Bool IsDoubleClick(WScreen *scr, XEvent *event);
Bool UpdateDomainFile(WDDomain *domain);
WWindow * NextToFocusAfter(WWindow *wwin); WWindow * NextToFocusAfter(WWindow *wwin);
WWindow * NextToFocusBefore(WWindow *wwin); WWindow * NextToFocusBefore(WWindow *wwin);
void move_window(Window win, int from_x, int from_y, int to_x, int to_y);
void SlideWindow(Window win, int from_x, int from_y, int to_x, int to_y);
void SlideWindows(Window *wins[], int n, int from_x, int from_y, int to_x, int to_y);
RImage * wGetImageForWindowName(WScreen *scr, char *winstance, char *wclass); RImage * wGetImageForWindowName(WScreen *scr, char *winstance, char *wclass);
#ifdef NUMLOCK_HACK #ifdef NUMLOCK_HACK
@@ -83,14 +65,6 @@ void wHackedGrabKey(int keycode, unsigned int modifiers,
int keyboard_mode); int keyboard_mode);
#endif #endif
/****** I18N Wrapper for XFetchName,XGetIconName ******/
Bool wFetchName(Display *dpy, Window win, char **winname);
Bool wGetIconName(Display *dpy, Window win, char **iconname);
/* Free returned string it when done. (applies to the next 2 functions) */
char * GetCommandForWindow(Window win);
Bool GetCommandForPid(int pid, char ***argv, int *argc); Bool GetCommandForPid(int pid, char ***argv, int *argc);
int getWVisualID(int screen); int getWVisualID(int screen);

View File

@@ -38,12 +38,12 @@
#include "window.h" #include "window.h"
#include "icon.h" #include "icon.h"
#include "actions.h" #include "actions.h"
#include "funcs.h"
#include "stacking.h" #include "stacking.h"
#include "application.h" #include "application.h"
#include "defaults.h" #include "defaults.h"
#include "appicon.h" #include "appicon.h"
#include "wmspec.h" #include "wmspec.h"
#include "misc.h"
/**** Global varianebles ****/ /**** Global varianebles ****/
extern WPreferences wPreferences; extern WPreferences wPreferences;

View File

@@ -38,13 +38,13 @@
#include <WINGs/WUtil.h> #include <WINGs/WUtil.h>
#include <wraster.h> #include <wraster.h>
#include "misc.h"
#include "WindowMaker.h" #include "WindowMaker.h"
#include "GNUstep.h" #include "GNUstep.h"
#include "screen.h" #include "screen.h"
#include "wcore.h" #include "wcore.h"
#include "window.h" #include "window.h"
#include "framewin.h" #include "framewin.h"
#include "funcs.h"
#include "dialog.h" #include "dialog.h"
#include "xutil.h" #include "xutil.h"
#include "xmodifier.h" #include "xmodifier.h"
@@ -53,6 +53,9 @@
extern WPreferences wPreferences; extern WPreferences wPreferences;
#define ICON_SIZE wPreferences.icon_size #define ICON_SIZE wPreferences.icon_size
/**** Local prototypes *****/
static void UnescapeWM_CLASS(char *str, char **name, char **class);
/* XFetchName Wrapper */ /* XFetchName Wrapper */
Bool wFetchName(Display *dpy, Window win, char **winname) Bool wFetchName(Display *dpy, Window win, char **winname)
{ {
@@ -862,7 +865,7 @@ char *EscapeWM_CLASS(char *name, char *class)
return ret; return ret;
} }
void UnescapeWM_CLASS(char *str, char **name, char **class) static void UnescapeWM_CLASS(char *str, char **name, char **class)
{ {
int i, j, k, dot; int i, j, k, dot;

45
src/misc.h Normal file
View File

@@ -0,0 +1,45 @@
/*
* Window Maker window manager
*
* Copyright (c) 1997-2003 Alfredo K. Kojima
* Copyright (c) 2013 Window Maker Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef WMMISC_H_
#define WMMISC_H_
#include "appicon.h"
Bool wFetchName(Display *dpy, Window win, char **winname);
Bool wGetIconName(Display *dpy, Window win, char **iconname);
Bool UpdateDomainFile(WDDomain * domain);
void move_window(Window win, int from_x, int from_y, int to_x, int to_y);
void SlideWindow(Window win, int from_x, int from_y, int to_x, int to_y);
void SlideWindows(Window *wins[], int n, int from_x, int from_y, int to_x, int to_y);
void ParseWindowName(WMPropList * value, char **winstance, char **wclass, char *where);
void SendHelperMessage(WScreen * scr, char type, int workspace, char *msg);
char *ShrinkString(WMFont * font, char *string, int width);
char *FindImage(char *paths, char *file);
char *ExpandOptions(WScreen * scr, char *cmdline);
char *GetShortcutString(char *text);
char *GetShortcutKey(WShortKey key);
char *EscapeWM_CLASS(char *name, char *class);
char *StrConcatDot(char *a, char *b);
char *GetCommandForWindow(Window win);
#endif

View File

@@ -41,7 +41,7 @@
#include "WindowMaker.h" #include "WindowMaker.h"
#include "actions.h" #include "actions.h"
#include "menu.h" #include "menu.h"
#include "funcs.h" #include "misc.h"
#include "main.h" #include "main.h"
#include "dialog.h" #include "dialog.h"
#include "keybind.h" #include "keybind.h"

View File

@@ -81,6 +81,7 @@
#include "application.h" #include "application.h"
#include "appicon.h" #include "appicon.h"
#include "dock.h" #include "dock.h"
#include "misc.h"
#include <WINGs/WUtil.h> #include <WINGs/WUtil.h>

View File

@@ -33,7 +33,7 @@
#include "window.h" #include "window.h"
#include "actions.h" #include "actions.h"
#include "client.h" #include "client.h"
#include "funcs.h" #include "misc.h"
#include "stacking.h" #include "stacking.h"
#include "workspace.h" #include "workspace.h"
#include "framewin.h" #include "framewin.h"

View File

@@ -31,7 +31,7 @@
#include "window.h" #include "window.h"
#include "defaults.h" #include "defaults.h"
#include "switchpanel.h" #include "switchpanel.h"
#include "funcs.h" #include "misc.h"
#include "xinerama.h" #include "xinerama.h"
extern Atom _XA_WM_IGNORE_FOCUS_EVENTS; extern Atom _XA_WM_IGNORE_FOCUS_EVENTS;

View File

@@ -31,7 +31,7 @@
#include "WindowMaker.h" #include "WindowMaker.h"
#include "texture.h" #include "texture.h"
#include "funcs.h" #include "misc.h"
extern WPreferences wPreferences; extern WPreferences wPreferences;

View File

@@ -38,10 +38,10 @@
#include "window.h" #include "window.h"
#include "appicon.h" #include "appicon.h"
#include "screen.h" #include "screen.h"
#include "funcs.h"
#include "workspace.h" #include "workspace.h"
#include "defaults.h" #include "defaults.h"
#include "icon.h" #include "icon.h"
#include "misc.h"
#define APPLY_VAL(value, flag, attrib) \ #define APPLY_VAL(value, flag, attrib) \
if (value) {attr->flag = getBool(attrib, value); \ if (value) {attr->flag = getBool(attrib, value); \

View File

@@ -49,7 +49,6 @@
#include "properties.h" #include "properties.h"
#include "actions.h" #include "actions.h"
#include "client.h" #include "client.h"
#include "funcs.h"
#include "colormap.h" #include "colormap.h"
#include "keybind.h" #include "keybind.h"
#include "stacking.h" #include "stacking.h"
@@ -61,6 +60,7 @@
#include "superfluous.h" #include "superfluous.h"
#include "rootmenu.h" #include "rootmenu.h"
#include "placement.h" #include "placement.h"
#include "misc.h"
#ifdef MWM_HINTS #ifdef MWM_HINTS
# include "motif.h" # include "motif.h"

View File

@@ -38,7 +38,7 @@
#include "client.h" #include "client.h"
#include "application.h" #include "application.h"
#include "keybind.h" #include "keybind.h"
#include "funcs.h" #include "misc.h"
#include "framewin.h" #include "framewin.h"
#include "workspace.h" #include "workspace.h"
#include "winspector.h" #include "winspector.h"

View File

@@ -35,7 +35,6 @@
#include "framewin.h" #include "framewin.h"
#include "window.h" #include "window.h"
#include "workspace.h" #include "workspace.h"
#include "funcs.h"
#include "defaults.h" #include "defaults.h"
#include "dialog.h" #include "dialog.h"
#include "icon.h" #include "icon.h"
@@ -47,6 +46,7 @@
#include "dock.h" #include "dock.h"
#include "client.h" #include "client.h"
#include "wmspec.h" #include "wmspec.h"
#include "misc.h"
#include <WINGs/WUtil.h> #include <WINGs/WUtil.h>

View File

@@ -39,7 +39,7 @@
#include "framewin.h" #include "framewin.h"
#include "window.h" #include "window.h"
#include "icon.h" #include "icon.h"
#include "funcs.h" #include "misc.h"
#include "menu.h" #include "menu.h"
#include "application.h" #include "application.h"
#include "dock.h" #include "dock.h"