[go: up one dir, main page]

File: inkblot.h

package info (click to toggle)
inkblot 0.99.9-2
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 1,020 kB
  • ctags: 120
  • sloc: sh: 3,769; ansic: 994; makefile: 79
file content (75 lines) | stat: -rw-r--r-- 2,187 bytes parent folder | download | duplicates (2)
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
/*
 * Copyright (C) 2004 Mike Newman <mikegtn@gnome.org> 
 *
 * 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., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 */

#ifdef HAVE_CONFIG_H
#  include <config.h>
#endif
#include <gnome.h>

#ifndef INKBLOT_H
#define INKBLOT_H

/* Inkblot - GConf Key Names */
#define INKBLOT_PORT_KEY "/apps/inkblot/port"
#define INKBLOT_BUS_KEY "/apps/inkblot/bus"
#define INKBLOT_CONFIG_KEY "/apps/inkblot/first-run"

/* Inkblot - Types and Enums */
typedef enum {
	INKBLOT_ERROR_OK,
	INKBLOT_ERROR_GLADE,
	INKBLOT_ERROR_NO_CONFIG,
	INKBLOT_ERROR_NO_PRINTER,
	INKBLOT_ERROR_INVALID_RESPONSE,
	INKBLOT_ERROR_UNKNOWN
} InkblotError;

typedef enum {
	INKBLOT_OK,
	INKBLOT_WARN,
	INKBLOT_LOW,
	INKBLOT_EMPTY,
	INKBLOT_ERROR,
	INKBLOT_QUERY
} InkblotStatus;

typedef struct {
	gchar *model;
	gint bus;
	gint port;
} InkblotPrinter;

/* Inkblot - Function Definitions */
GdkPixbuf*	inkblot_tray_icon_display ( InkblotStatus );
gboolean	inkblot_tray_menu (GtkWidget *, GdkEventButton *, gpointer);
gboolean 	inkblot_check_status_event ( gpointer );
void 		inkblot_dialog_response (GtkWidget *, gint, gpointer);
gint 		inkblot_scan_devices ( void );
InkblotStatus 	inkblot_get_overall_status ( void );
void 		inkblot_tray_icon_clicked ( GtkWidget *, GdkEventButton *, 
					    gpointer );
void 		inkblot_toggle_dialog ( void );
static gint 	inkblot_save_session (GnomeClient *, gint, GnomeRestartStyle, 
				      gint, GnomeInteractStyle,gint,gpointer);
gint		inkblot_error_dialog (InkblotError);

/* Inkblot: Globals */
guint timer_id;

#endif