mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-20 21:08:08 +01:00
New file placement.h
The file placement.h hold the definitions for placement.c
This commit is contained in:
committed by
Carlos R. Mafra
parent
6fe23037ef
commit
389a0a252c
@@ -56,6 +56,7 @@ wmaker_SOURCES = \
|
|||||||
pixmap.c \
|
pixmap.c \
|
||||||
pixmap.h \
|
pixmap.h \
|
||||||
placement.c \
|
placement.c \
|
||||||
|
placement.h \
|
||||||
properties.c \
|
properties.c \
|
||||||
properties.h \
|
properties.h \
|
||||||
resources.c \
|
resources.c \
|
||||||
|
|||||||
@@ -46,6 +46,7 @@
|
|||||||
#include "workspace.h"
|
#include "workspace.h"
|
||||||
#include "xinerama.h"
|
#include "xinerama.h"
|
||||||
#include "usermenu.h"
|
#include "usermenu.h"
|
||||||
|
#include "placement.h"
|
||||||
|
|
||||||
/****** Global Variables ******/
|
/****** Global Variables ******/
|
||||||
|
|
||||||
@@ -55,7 +56,6 @@ extern Time LastFocusChange;
|
|||||||
extern WPreferences wPreferences;
|
extern WPreferences wPreferences;
|
||||||
extern Atom _XA_WM_TAKE_FOCUS;
|
extern Atom _XA_WM_TAKE_FOCUS;
|
||||||
extern void ProcessPendingEvents();
|
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,
|
static void find_Maximus_geometry(WWindow *wwin, WArea usableArea, int *new_x, int *new_y,
|
||||||
unsigned int *new_width, unsigned int *new_height);
|
unsigned int *new_width, unsigned int *new_height);
|
||||||
|
|||||||
@@ -47,6 +47,7 @@
|
|||||||
#include "dialog.h"
|
#include "dialog.h"
|
||||||
#include "xinerama.h"
|
#include "xinerama.h"
|
||||||
#include "client.h"
|
#include "client.h"
|
||||||
|
#include "placement.h"
|
||||||
#ifdef XDND
|
#ifdef XDND
|
||||||
#include "xdnd.h"
|
#include "xdnd.h"
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -54,6 +54,7 @@
|
|||||||
#include "framewin.h"
|
#include "framewin.h"
|
||||||
#include "superfluous.h"
|
#include "superfluous.h"
|
||||||
#include "xinerama.h"
|
#include "xinerama.h"
|
||||||
|
#include "placement.h"
|
||||||
|
|
||||||
/**** Local variables ****/
|
/**** Local variables ****/
|
||||||
#define CLIP_REWIND 1
|
#define CLIP_REWIND 1
|
||||||
|
|||||||
@@ -40,12 +40,9 @@ void OpenWindowMenu2(WWindow *wwin, int x, int y, int keyboard);
|
|||||||
void OpenMiniwindowMenu(WWindow *wwin, int x, int y);
|
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 PlaceIcon(WScreen *scr, int *x_ret, int *y_ret, int head);
|
|
||||||
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 SendHelperMessage(WScreen *scr, char type, int workspace, char *msg);
|
||||||
void UnescapeWM_CLASS(char *str, char **name, char **class);
|
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,
|
void ParseWindowName(WMPropList *value, char **winstance, char **wclass,
|
||||||
char *where);
|
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);
|
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 * StrConcatDot(char *a, char *b);
|
||||||
char * ExpandOptions(WScreen *scr, char *cmdline);
|
char * ExpandOptions(WScreen *scr, char *cmdline);
|
||||||
char * ShrinkString(WMFont *font, char *string, int width);
|
char * ShrinkString(WMFont *font, char *string, int width);
|
||||||
|
|||||||
34
src/placement.h
Normal file
34
src/placement.h
Normal 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);
|
||||||
@@ -60,6 +60,7 @@
|
|||||||
#include "appicon.h"
|
#include "appicon.h"
|
||||||
#include "superfluous.h"
|
#include "superfluous.h"
|
||||||
#include "rootmenu.h"
|
#include "rootmenu.h"
|
||||||
|
#include "placement.h"
|
||||||
|
|
||||||
#ifdef MWM_HINTS
|
#ifdef MWM_HINTS
|
||||||
# include "motif.h"
|
# include "motif.h"
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
#include "screen.h"
|
#include "screen.h"
|
||||||
#include "window.h"
|
#include "window.h"
|
||||||
#include "framewin.h"
|
#include "framewin.h"
|
||||||
#include "funcs.h"
|
#include "placement.h"
|
||||||
|
|
||||||
#ifdef XINERAMA
|
#ifdef XINERAMA
|
||||||
# ifdef SOLARIS_XINERAMA /* sucks */
|
# ifdef SOLARIS_XINERAMA /* sucks */
|
||||||
|
|||||||
Reference in New Issue
Block a user