File: docking_resize.c

package info (click to toggle)
garlic 1.1-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 2,492 kB
  • ctags: 1,013
  • sloc: ansic: 29,925; makefile: 753
file content (54 lines) | stat: -rw-r--r-- 1,324 bytes parent folder | download | duplicates (6)
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
/* Copyright (C) 2000 Damir Zucic */

/*=============================================================================

				docking_resize.c

Purpose:
	Handle ConfigureNotify event for docking window.

Input:
	(1) Pointer to RuntimeS structure.
	(2) Pointer to GUIS structure.
	(3) Pointer to XConfigureEvent structure.

Output:
	(1) Two geometric parameters updated.
	(2) Return value.

Return value:
	(1) Positive if geometric parameters are updated.
	(2) Zero if nothing should be done.

========includes:============================================================*/

#include <stdio.h>

#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xos.h>
#include <X11/Xatom.h>

#include "defines.h"
#include "typedefs.h"

/*======handle ConfigureNotify event for docking window:=====================*/

int DockingResize_ (RuntimeS *runtimeSP, GUIS *guiSP,
		    XConfigureEvent *configure_eventSP)
{

/* If this event was not generated for docking window, do nothing: */
if (configure_eventSP->window != guiSP->docking_winS.ID) return 0;

/* New width and height of docking window: */
guiSP->docking_winS.width = configure_eventSP->width;
guiSP->docking_winS.height = configure_eventSP->height;

/* Return positive value: */
return 1;
}

/*===========================================================================*/