Mercurial > vim
annotate src/gui_gtk_f.h @ 10613:196757b230a2 v8.0.0196
patch 8.0.0196: profile test is slo and does not work on MS-Windows
commit https://github.com/vim/vim/commit/c011a3d083001bcd9853b4447422f1819f3cee2f
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Jan 16 22:37:42 2017 +0100
patch 8.0.0196: profile test is slo and does not work on MS-Windows
Problem: The test for :profile is slow and does not work on MS-Windows.
Solution: Use the "-es" argument. (Dominique Pelle) Swap single and double
quotes for system()
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Mon, 16 Jan 2017 22:45:04 +0100 |
parents | 4aead6a9b7a9 |
children | cd8dbed175a1 |
rev | line source |
---|---|
10042
4aead6a9b7a9
commit https://github.com/vim/vim/commit/edf3f97ae2af024708ebb4ac614227327033ca47
Christian Brabandt <cb@256bit.org>
parents:
8218
diff
changeset
|
1 /* vi:set ts=8 sts=4 sw=4 noet: |
7 | 2 * |
3 * VIM - Vi IMproved by Bram Moolenaar | |
4 * | |
5 * Do ":help uganda" in Vim to read copying and usage conditions. | |
6 * Do ":help credits" in Vim to see a list of people who contributed. | |
7 */ | |
8 | |
9 #ifndef __GTK_FORM_H__ | |
10 #define __GTK_FORM_H__ | |
11 | |
8218
3456e2ebebd4
commit https://github.com/vim/vim/commit/9892189d2e7ab94b750f99e6da4cbfc3c8014517
Christian Brabandt <cb@256bit.org>
parents:
2275
diff
changeset
|
12 #ifdef USE_GTK3 |
3456e2ebebd4
commit https://github.com/vim/vim/commit/9892189d2e7ab94b750f99e6da4cbfc3c8014517
Christian Brabandt <cb@256bit.org>
parents:
2275
diff
changeset
|
13 #include <gtk/gtk.h> |
3456e2ebebd4
commit https://github.com/vim/vim/commit/9892189d2e7ab94b750f99e6da4cbfc3c8014517
Christian Brabandt <cb@256bit.org>
parents:
2275
diff
changeset
|
14 #else |
7 | 15 #include <gdk/gdk.h> |
16 #include <gtk/gtkcontainer.h> | |
8218
3456e2ebebd4
commit https://github.com/vim/vim/commit/9892189d2e7ab94b750f99e6da4cbfc3c8014517
Christian Brabandt <cb@256bit.org>
parents:
2275
diff
changeset
|
17 #endif |
7 | 18 |
19 | |
20 #ifdef __cplusplus | |
21 extern "C" { | |
22 #endif | |
23 | |
24 #define GTK_TYPE_FORM (gtk_form_get_type ()) | |
8218
3456e2ebebd4
commit https://github.com/vim/vim/commit/9892189d2e7ab94b750f99e6da4cbfc3c8014517
Christian Brabandt <cb@256bit.org>
parents:
2275
diff
changeset
|
25 #ifdef USE_GTK3 |
3456e2ebebd4
commit https://github.com/vim/vim/commit/9892189d2e7ab94b750f99e6da4cbfc3c8014517
Christian Brabandt <cb@256bit.org>
parents:
2275
diff
changeset
|
26 #define GTK_FORM(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GTK_TYPE_FORM, GtkForm)) |
3456e2ebebd4
commit https://github.com/vim/vim/commit/9892189d2e7ab94b750f99e6da4cbfc3c8014517
Christian Brabandt <cb@256bit.org>
parents:
2275
diff
changeset
|
27 #define GTK_FORM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GTK_TYPE_FORM, GtkFormClass)) |
3456e2ebebd4
commit https://github.com/vim/vim/commit/9892189d2e7ab94b750f99e6da4cbfc3c8014517
Christian Brabandt <cb@256bit.org>
parents:
2275
diff
changeset
|
28 #define GTK_IS_FORM(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GTK_TYPE_FORM)) |
3456e2ebebd4
commit https://github.com/vim/vim/commit/9892189d2e7ab94b750f99e6da4cbfc3c8014517
Christian Brabandt <cb@256bit.org>
parents:
2275
diff
changeset
|
29 #define GTK_IS_FORM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GTK_TYPE_FORM)) |
3456e2ebebd4
commit https://github.com/vim/vim/commit/9892189d2e7ab94b750f99e6da4cbfc3c8014517
Christian Brabandt <cb@256bit.org>
parents:
2275
diff
changeset
|
30 #else |
7 | 31 #define GTK_FORM(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_FORM, GtkForm)) |
32 #define GTK_FORM_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_FORM, GtkFormClass)) | |
33 #define GTK_IS_FORM(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_FORM)) | |
34 #define GTK_IS_FORM_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_FORM)) | |
8218
3456e2ebebd4
commit https://github.com/vim/vim/commit/9892189d2e7ab94b750f99e6da4cbfc3c8014517
Christian Brabandt <cb@256bit.org>
parents:
2275
diff
changeset
|
35 #endif |
7 | 36 |
37 | |
38 typedef struct _GtkForm GtkForm; | |
39 typedef struct _GtkFormClass GtkFormClass; | |
40 | |
41 struct _GtkForm | |
42 { | |
43 GtkContainer container; | |
44 | |
45 GList *children; | |
46 | |
8218
3456e2ebebd4
commit https://github.com/vim/vim/commit/9892189d2e7ab94b750f99e6da4cbfc3c8014517
Christian Brabandt <cb@256bit.org>
parents:
2275
diff
changeset
|
47 #ifndef USE_GTK3 |
7 | 48 guint width; |
49 guint height; | |
8218
3456e2ebebd4
commit https://github.com/vim/vim/commit/9892189d2e7ab94b750f99e6da4cbfc3c8014517
Christian Brabandt <cb@256bit.org>
parents:
2275
diff
changeset
|
50 #endif |
7 | 51 |
52 GdkWindow *bin_window; | |
53 | |
8218
3456e2ebebd4
commit https://github.com/vim/vim/commit/9892189d2e7ab94b750f99e6da4cbfc3c8014517
Christian Brabandt <cb@256bit.org>
parents:
2275
diff
changeset
|
54 #ifndef USE_GTK3 |
7 | 55 GdkVisibilityState visibility; |
56 gulong configure_serial; | |
8218
3456e2ebebd4
commit https://github.com/vim/vim/commit/9892189d2e7ab94b750f99e6da4cbfc3c8014517
Christian Brabandt <cb@256bit.org>
parents:
2275
diff
changeset
|
57 #endif |
7 | 58 |
59 gint freeze_count; | |
60 }; | |
61 | |
62 struct _GtkFormClass | |
63 { | |
64 GtkContainerClass parent_class; | |
65 }; | |
66 | |
8218
3456e2ebebd4
commit https://github.com/vim/vim/commit/9892189d2e7ab94b750f99e6da4cbfc3c8014517
Christian Brabandt <cb@256bit.org>
parents:
2275
diff
changeset
|
67 #ifdef USE_GTK3 |
3456e2ebebd4
commit https://github.com/vim/vim/commit/9892189d2e7ab94b750f99e6da4cbfc3c8014517
Christian Brabandt <cb@256bit.org>
parents:
2275
diff
changeset
|
68 GType gtk_form_get_type(void); |
3456e2ebebd4
commit https://github.com/vim/vim/commit/9892189d2e7ab94b750f99e6da4cbfc3c8014517
Christian Brabandt <cb@256bit.org>
parents:
2275
diff
changeset
|
69 #else |
7 | 70 GtkType gtk_form_get_type(void); |
8218
3456e2ebebd4
commit https://github.com/vim/vim/commit/9892189d2e7ab94b750f99e6da4cbfc3c8014517
Christian Brabandt <cb@256bit.org>
parents:
2275
diff
changeset
|
71 #endif |
7 | 72 |
73 GtkWidget *gtk_form_new(void); | |
74 | |
75 void gtk_form_put(GtkForm * form, GtkWidget * widget, | |
76 gint x, gint y); | |
77 | |
78 void gtk_form_move(GtkForm *form, GtkWidget * widget, | |
79 gint x, gint y); | |
80 | |
81 void gtk_form_move_resize(GtkForm * form, GtkWidget * widget, | |
82 gint x, gint y, | |
83 gint w, gint h); | |
84 | |
85 /* These disable and enable moving and repainting respectively. If you | |
86 * want to update the layout's offsets but do not want it to repaint | |
87 * itself, you should use these functions. | |
88 */ | |
89 | |
90 void gtk_form_freeze(GtkForm *form); | |
91 void gtk_form_thaw(GtkForm *form); | |
92 | |
93 | |
94 #ifdef __cplusplus | |
95 } | |
96 #endif | |
97 #endif /* __GTK_FORM_H__ */ |