File: accelerators.c

package info (click to toggle)
java-gnome 4.1.3-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 9,468 kB
  • ctags: 7,285
  • sloc: java: 27,001; ansic: 4,518; perl: 1,650; python: 1,187; makefile: 135
file content (30 lines) | stat: -rw-r--r-- 773 bytes parent folder | download | duplicates (4)
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
/*
 * accelerators.c
 *
 * Copyright (c) 2008 Operational Dynamics Consulting Pty Ltd and Others
 *
 * The code in this file, and the library it is a part of, are made available
 * to you by the authors under the terms of the "GNU General Public Licence,
 * version 2" See the LICENCE file for the terms governing usage and
 * redistribution.
 */

/*
 * Experiment with GTK Accelerator Groups.
 *
 *    gcc `pkg-config --cflags --libs gtk+-2.0` -o accelerators accelerators.c
 *
 * ought to build this for you.
 */

#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>

int main(int argc, char **argv) {
	gtk_init(&argc, &argv);

	printf("%s\n", gtk_accelerator_name(GDK_q, GDK_CONTROL_MASK));
	printf("%s\n", gtk_accelerator_get_label(GDK_q, GDK_CONTROL_MASK));

	return 0;
}