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

« back to all changes in this revision

Viewing changes to write_hints.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
                                write_hints.c
 
6
 
 
7
Purpose:
 
8
        Write some hints to the hidden pixmap.
 
9
 
 
10
Input:
 
11
        (1) Pointer to GUIS structure, with GUI data.
 
12
 
 
13
Output:
 
14
        (1) Some hints (textual information) written to hidden pixmap.
 
15
        (2) Return value.
 
16
 
 
17
Return value:
 
18
        (1) Positive always (trivial).
 
19
 
 
20
========includes:============================================================*/
 
21
 
 
22
#include <stdio.h>
 
23
 
 
24
#include <string.h>
 
25
 
 
26
#include <X11/Xlib.h>
 
27
#include <X11/Xutil.h>
 
28
#include <X11/Xos.h>
 
29
#include <X11/Xatom.h>
 
30
 
 
31
#include "defines.h"
 
32
#include "typedefs.h"
 
33
 
 
34
/*======write some hints to the hidden pixmap:===============================*/
 
35
 
 
36
int WriteHints_ (GUIS *guiSP)
 
37
{
 
38
int             screen_x, screen_y, delta_y;
 
39
char            stringA[STRINGSIZE];
 
40
 
 
41
/* Prepare the text color: */
 
42
XSetForeground (guiSP->displaySP, guiSP->theGCA[0],
 
43
                guiSP->main_winS.fg_colorID);
 
44
 
 
45
 
 
46
/* Draw hints: */
 
47
delta_y = guiSP->input_winS.text_line_height;
 
48
screen_x = 10;
 
49
 
 
50
screen_y = 60 + delta_y;
 
51
strcpy (stringA, "Home page: http://pref.etfos.hr/garlic");
 
52
XDrawString (guiSP->displaySP, guiSP->main_hidden_pixmapID, guiSP->theGCA[0],
 
53
             screen_x, screen_y, stringA, strlen (stringA));
 
54
 
 
55
screen_y += delta_y;
 
56
strcpy (stringA, "HTML documentation:");
 
57
XDrawString (guiSP->displaySP, guiSP->main_hidden_pixmapID, guiSP->theGCA[0],
 
58
             screen_x, screen_y, stringA, strlen (stringA));
 
59
 
 
60
screen_x = 40;
 
61
 
 
62
screen_y += delta_y;
 
63
strcpy (stringA,
 
64
        "http://pref.etfos.hr/controls (rotations, translations etc.)");
 
65
XDrawString (guiSP->displaySP, guiSP->main_hidden_pixmapID, guiSP->theGCA[0],
 
66
             screen_x, screen_y, stringA, strlen (stringA));
 
67
 
 
68
screen_y += delta_y;
 
69
strcpy (stringA, "http://pref.etfos.hr/commands (garlic command language)");
 
70
XDrawString (guiSP->displaySP, guiSP->main_hidden_pixmapID, guiSP->theGCA[0],
 
71
             screen_x, screen_y, stringA, strlen (stringA));
 
72
 
 
73
screen_y += delta_y;
 
74
strcpy (stringA, "http://pref.etfos.hr/refcard (reference card -> print it!)");
 
75
XDrawString (guiSP->displaySP, guiSP->main_hidden_pixmapID, guiSP->theGCA[0],
 
76
             screen_x, screen_y, stringA, strlen (stringA));
 
77
 
 
78
screen_x = 10;
 
79
 
 
80
screen_y += delta_y;
 
81
strcpy (stringA, "Documentation (packed -> download via ftp):");
 
82
XDrawString (guiSP->displaySP, guiSP->main_hidden_pixmapID, guiSP->theGCA[0],
 
83
             screen_x, screen_y, stringA, strlen (stringA));
 
84
 
 
85
screen_x = 40;
 
86
 
 
87
screen_y += delta_y;
 
88
strcpy (stringA, "ftp://pref.etfos.hr/pub/garlic/source/garlic-doc.tar.gz");
 
89
XDrawString (guiSP->displaySP, guiSP->main_hidden_pixmapID, guiSP->theGCA[0],
 
90
             screen_x, screen_y, stringA, strlen (stringA));
 
91
 
 
92
screen_x = 10;
 
93
 
 
94
screen_y += delta_y;
 
95
strcpy (stringA, "License (GPL): http://pref.etfos.hr/garlic/license");
 
96
XDrawString (guiSP->displaySP, guiSP->main_hidden_pixmapID, guiSP->theGCA[0],
 
97
             screen_x, screen_y, stringA, strlen (stringA));
 
98
 
 
99
screen_y += delta_y;
 
100
strcpy (stringA, "Author: http://pref.etfos.hr/zucic");
 
101
XDrawString (guiSP->displaySP, guiSP->main_hidden_pixmapID, guiSP->theGCA[0],
 
102
             screen_x, screen_y, stringA, strlen (stringA));
 
103
 
 
104
screen_y += 2 * delta_y;
 
105
strcpy (stringA, "Encourage garlic development - type reg to register!");
 
106
XDrawString (guiSP->displaySP, guiSP->main_hidden_pixmapID, guiSP->theGCA[0],
 
107
             screen_x, screen_y, stringA, strlen (stringA));
 
108
 
 
109
/* Return positive value (trivial): */
 
110
return 1;
 
111
}
 
112
 
 
113
/*===========================================================================*/
 
114
 
 
115