1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-20 12:58:08 +01:00

New file placement.h

The file placement.h hold the definitions for placement.c
This commit is contained in:
Rodolfo García Peñas (kix)
2013-04-03 20:01:48 +02:00
committed by Carlos R. Mafra
parent 6fe23037ef
commit 389a0a252c
8 changed files with 40 additions and 8 deletions

View File

@@ -56,6 +56,7 @@ wmaker_SOURCES = \
pixmap.c \
pixmap.h \
placement.c \
placement.h \
properties.c \
properties.h \
resources.c \

View File

@@ -46,6 +46,7 @@
#include "workspace.h"
#include "xinerama.h"
#include "usermenu.h"
#include "placement.h"
/****** Global Variables ******/
@@ -55,7 +56,6 @@ extern Time LastFocusChange;
extern WPreferences wPreferences;
extern Atom _XA_WM_TAKE_FOCUS;
extern void ProcessPendingEvents();
extern int calcIntersectionLength(int p1, int l1, int p2, int l2);
static void find_Maximus_geometry(WWindow *wwin, WArea usableArea, int *new_x, int *new_y,
unsigned int *new_width, unsigned int *new_height);

View File

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

View File

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

View File

@@ -40,12 +40,9 @@ void OpenWindowMenu2(WWindow *wwin, int x, int y, int keyboard);
void OpenMiniwindowMenu(WWindow *wwin, int x, int y);
void CloseWindowMenu(WScreen *scr);
void DestroyWindowMenu(WScreen *scr);
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 PlaceWindow(WWindow *wwin, int *x_ret, int *y_ret,
unsigned int width, unsigned int height);
void ParseWindowName(WMPropList *value, char **winstance, char **wclass,
char *where);
@@ -60,9 +57,6 @@ WMagicNumber wAddDeathHandler(pid_t pid, WDeathHandler *callback, void *cdata);
Pixmap LoadIcon(WScreen *scr, char *path, char *mask, int title_height);
int calcIntersectionArea(int x1, int y1, int w1, int h1,
int x2, int y2, int w2, int h2);
char * StrConcatDot(char *a, char *b);
char * ExpandOptions(WScreen *scr, char *cmdline);
char * ShrinkString(WMFont *font, char *string, int width);

34
src/placement.h Normal file
View File

@@ -0,0 +1,34 @@
/* placement.h - window and icon placement on screen
*
* 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.
*/
void PlaceIcon(WScreen *scr, int *x_ret, int *y_ret, int head);
/* Computes the intersecting length of two line sections */
int calcIntersectionLength(int p1, int l1, int p2, int l2);
/* Computes the intersecting area of two rectangles */
int calcIntersectionArea(int x1, int y1, int w1, int h1, int x2, int y2, int w2, int h2);
void PlaceWindow(WWindow *wwin, int *x_ret, int *y_ret, unsigned width, unsigned height);
/* Set the points x and y inside the screen */
void get_right_position_on_screen(WScreen *scr, int *x, int *y, int size_x, int size_y);

View File

@@ -60,6 +60,7 @@
#include "appicon.h"
#include "superfluous.h"
#include "rootmenu.h"
#include "placement.h"
#ifdef MWM_HINTS
# include "motif.h"

View File

@@ -25,7 +25,7 @@
#include "screen.h"
#include "window.h"
#include "framewin.h"
#include "funcs.h"
#include "placement.h"
#ifdef XINERAMA
# ifdef SOLARIS_XINERAMA /* sucks */