Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasAdam committed Dec 22, 2024
1 parent d8242aa commit c40bf06
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 0 deletions.
33 changes: 33 additions & 0 deletions libs/mcomms.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/* 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, see: <http://www.gnu.org/licenses/>
*/

#include "config.h"
#include "log.h"
#include "mcomms.h"

const char *m_register[] = {
"new_window"
};

bool
m_register_interest(int *fd, const char *type, ...)
{
va_list ap;

va_start(ap, type);
vfprintf(stderr, type, ap);
va_end(ap);

return true;
}
42 changes: 42 additions & 0 deletions libs/mcomms.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#ifndef FVWMLIB_MCOMMS_H
#define FVWMLIB_MCOMMS_H

#include <stdarg.h>
#include <stdbool.h>

struct m_add_window {
char *window;
int title_height;
int border_width;

struct {
int window;
int x;
int y;
int width;
int height;
} frame;

struct {
int base_width;
int base_height;
int inc_width;
int inc_height;
int orig_inc_width;
int orig_inc_height;
int min_width;
int min_height;
int max_width;
int max_height;
} hints;

struct {
int layer;
int desktop;
int window_type;
} ewmh;
};

bool m_register_interest(int *, const char *, ...);

#endif
4 changes: 4 additions & 0 deletions modules/FvwmIdent/FvwmIdent.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@
#include "libs/XError.h"
#include "libs/log.h"

#include "libs/mcomms.h"

#include "FvwmIdent.h"

static RETSIGTYPE TerminateHandler(int);
Expand Down Expand Up @@ -214,6 +216,8 @@ int main(int argc, char **argv)
InitGetConfigLine(fd, mname);
GetConfigLine(fd,&tline);

m_register_interest(fd, "new_window", "this", "that");

while (tline != (char *)0)
{
if (strlen(tline) <= 1)
Expand Down

0 comments on commit c40bf06

Please sign in to comment.