~ubuntu-branches/ubuntu/breezy/garlic/breezy

« back to all changes in this revision

Viewing changes to show_no_refresh.c

  • Committer: Bazaar Package Importer
  • Author(s): zhaoway
  • Date: 2001-04-24 07:09:13 UTC
  • Revision ID: james.westby@ubuntu.com-20010424070913-uzpupnwdfhmliebz
Tags: upstream-1.1
ImportĀ upstreamĀ versionĀ 1.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Copyright (C) 2000 Damir Zucic */
 
2
 
 
3
/*=============================================================================
 
4
 
 
5
                                show_no_refresh.c
 
6
 
 
7
Purpose:
 
8
        Show selected atoms but do not refresh graphics.
 
9
 
 
10
Input:
 
11
        (1) Pointer to MolComplexS structure, with macromol. complexes.
 
12
        (2) The number of macromolecular complexes.
 
13
 
 
14
Output:
 
15
        (1) The hiddenF set for each atom in each caught complex.
 
16
        (2) Return value.
 
17
 
 
18
Return value:
 
19
        (1) Always positive (trivial).
 
20
 
 
21
========includes:============================================================*/
 
22
 
 
23
#include <stdio.h>
 
24
 
 
25
#include <X11/Xlib.h>
 
26
#include <X11/Xutil.h>
 
27
#include <X11/Xos.h>
 
28
#include <X11/Xatom.h>
 
29
 
 
30
#include "defines.h"
 
31
#include "typedefs.h"
 
32
 
 
33
/*======show selected atoms:=================================================*/
 
34
 
 
35
int ShowNoRefresh_ (MolComplexS *mol_complexSP, int mol_complexesN)
 
36
{
 
37
int             mol_complexI;
 
38
MolComplexS     *curr_mol_complexSP;
 
39
size_t          atomsN, atomI;
 
40
AtomS           *curr_atomSP;
 
41
 
 
42
/* Check every macromolecular complex: */
 
43
for (mol_complexI = 0; mol_complexI < mol_complexesN; mol_complexI++)
 
44
        {
 
45
        /** Pointer to the current macromolecular complex: **/
 
46
        curr_mol_complexSP = mol_complexSP + mol_complexI;
 
47
 
 
48
        /** Check is the current macromolecular complex caught: **/
 
49
        if (curr_mol_complexSP->catchF == 0) continue;
 
50
 
 
51
        /** Number of atoms in a macromolecular complex: **/
 
52
        atomsN = curr_mol_complexSP->atomsN;
 
53
 
 
54
        /** Scan all atoms in the current complex: **/
 
55
        for (atomI = 0; atomI < atomsN; atomI++)
 
56
                {
 
57
                /** Pointer to the current atom: **/
 
58
                curr_atomSP = curr_mol_complexSP->atomSP + atomI;
 
59
 
 
60
                /** Check the selection flag; show selected atoms: **/
 
61
                if (curr_atomSP->selectedF) curr_atomSP->hiddenF = 0;
 
62
                }
 
63
        }
 
64
 
 
65
/* Return positive value (trivial): */
 
66
return 1;
 
67
}
 
68
 
 
69
/*===========================================================================*/
 
70
 
 
71