File: struct.h

package info (click to toggle)
miwm 1.1-6
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 1,296 kB
  • ctags: 910
  • sloc: cpp: 8,179; sh: 231; makefile: 148
file content (124 lines) | stat: -rw-r--r-- 3,424 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
//-*-c++-*-
// -------------------------------------------
// RCS data:
// $Date: 2003/06/23 14:47:24 $
// $Revision: 1.1.1.1 $
// $Source: /cvsroot/miwm/miwm/miwm/struct.h,v $
// $Id: struct.h,v 1.1.1.1 2003/06/23 14:47:24 bwise837 Exp $
// $RCSfile: struct.h,v $
// -------------------------------------------
// Copyright by Ben Paul Wise.
// -------------------------------------------
// 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., 675 Mass Ave, Cambridge, MA 02139, USA.
// -------------------------------------------

#ifndef STRUCT_H
#define STRUCT_H

// -------------------------------------------

#include "miwm.h"

class WorkSpace;
class Menu;
class MenuItem;
class WindowManager;

// -------------------------------------------

typedef void (*WMOperation)(void);

// this is a simple list of (label, Client* , int) data.
// if the Client is non-null, then it refers to that client.
// if the client is null and the int is non-negative, it refers to that workspace.
typedef struct menuitem menuitem;

typedef struct Client Client;

// this is a menu of hidden clients or workspace names
// (if the client is 0, then it is just a workspace name)
struct menuitem {
  char * label;            // name to be displayed
  Client * client;        // client window (if any!)

// THIS IS NOT THE WORKSPACE OF THE CLIENT!
  int space;               // work space (if any!) 

  menuitem * next;   // next in list
};



enum BoxStatus {
  DBunarmed, DBarmed, DBundrawn
};

enum Mode { // Window Manager modes
  wmStartup, 
  wmShutdown, 
  wmReady,  // the base mode
  wmResizing, 
  wmMoving,
  wmKilling,
  wmMenuing
};

// the menu can be raised several ways.
// this list will expand ....
enum menuType {
  noMenu, 
  operationsMenu,    // perform various built-in operations
  hiddenClientMenu,           // hidden clients in WS
  allClientsMenu,                  // all clients in WS
  commandMenu,                   // user-defined shell commands we can run
  changeWSMenu,    // choice of WS
  sendCtoWSMenu    // choice of WS
};

//	Window internal state. Yuck.

typedef enum {
    IPendingReparenting, INormal
} IState ;


// Window edge, used in resizing. The `edge' ENone is used to signify a
//  window move rather than a resize. The code is sufficiently similar that
//  this isn't a special case to be treated separately.

//  These MUST be in the same order as they appear in cursor.cc !

typedef enum {
    ETopLeft = 0,	ETop =1,		ETopRight=2,
    ERight =3,		ENone =4,		ELeft =5,
    EBottomLeft =6,	EBottom =7,	EBottomRight =8
} Edge ;


// 	c->proto is a bitarray of these
enum {
    Pdelete = 1,
    Ptakefocus = 2
};





// -------------------------------------------
#endif
// -------------------------------------------
// end of struct.h
// -------------------------------------------