KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > swt > internal > gnome > GNOME


1 /*******************************************************************************
2  * Copyright (c) 2000, 2004 IBM Corporation and others. All rights reserved.
3  * The contents of this file are made available under the terms
4  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
5  * accompanies this distribution (lgpl-v21.txt). The LGPL is also
6  * available at http://www.gnu.org/licenses/lgpl.html. If the version
7  * of the LGPL at http://www.gnu.org is different to the version of
8  * the LGPL accompanying this distribution and there is any conflict
9  * between the two license versions, the terms of the LGPL accompanying
10  * this distribution shall govern.
11  *******************************************************************************/

12 package org.eclipse.swt.internal.gnome;
13
14 import org.eclipse.swt.internal.*;
15
16 public class GNOME extends Platform {
17     static {
18         Library.loadLibrary("swt-gnome");
19     }
20
21 public static final int GNOME_FILE_DOMAIN_PIXMAP = 4;
22 public static final int GNOME_ICON_LOOKUP_FLAGS_NONE = 0;
23 public static final int GNOME_PARAM_NONE = 0;
24 public static final int GNOME_VFS_MIME_APPLICATION_ARGUMENT_TYPE_URIS = 0;
25 public static final int GNOME_VFS_OK = 0;
26 public static final int GNOME_VFS_MAKE_URI_DIR_NONE = 0;
27 public static final int GNOME_VFS_MAKE_URI_DIR_HOMEDIR = 1<<0;
28 public static final int GNOME_VFS_MAKE_URI_DIR_CURRENT = 1<<1;
29
30 /** 64 bit */
31 public static final native int GnomeVFSMimeApplication_sizeof();
32
33 /** Natives */
34 public static final native int _dlclose(int /*long*/ handle);
35 public static final int dlclose(int /*long*/ handle) {
36     lock.lock();
37     try {
38         return _dlclose(handle);
39     } finally {
40         lock.unlock();
41     }
42 }
43 public static final native int /*long*/ _dlopen(byte[] filename, int flag);
44 public static final int /*long*/ dlopen(byte[] filename, int flag) {
45     lock.lock();
46     try {
47         return _dlopen(filename, flag);
48     } finally {
49         lock.unlock();
50     }
51 }
52 public static final native int /*long*/ _dlsym(int /*long*/ handle, byte[] symbol);
53 public static final int /*long*/ dlsym(int /*long*/ handle, byte[] symbol) {
54     lock.lock();
55     try {
56         return _dlsym(handle, symbol);
57     } finally {
58         lock.unlock();
59     }
60 }
61 public static final native void _g_free(int /*long*/ mem);
62 public static final void g_free(int /*long*/ mem) {
63     lock.lock();
64     try {
65         _g_free(mem);
66     } finally {
67         lock.unlock();
68     }
69 }
70 public static final native int /*long*/ _g_list_append(int /*long*/ list, int /*long*/ data);
71 public static final int /*long*/ g_list_append(int /*long*/ list, int /*long*/ data) {
72     lock.lock();
73     try {
74         return _g_list_append(list, data);
75     } finally {
76         lock.unlock();
77     }
78 }
79 public static final native void _g_list_free(int /*long*/ list);
80 public static final void g_list_free(int /*long*/ list) {
81     lock.lock();
82     try {
83         _g_list_free(list);
84     } finally {
85         lock.unlock();
86     }
87 }
88 public static final native int /*long*/ _g_list_next(int /*long*/ list);
89 public static final int /*long*/ g_list_next(int /*long*/ list) {
90     lock.lock();
91     try {
92         return _g_list_next(list);
93     } finally {
94         lock.unlock();
95     }
96 }
97 public static final native void _g_object_unref(int /*long*/ object);
98 public static final void g_object_unref(int /*long*/ object) {
99     lock.lock();
100     try {
101         _g_object_unref(object);
102     } finally {
103         lock.unlock();
104     }
105 }
106 public static final native int /*long*/ _gnome_icon_lookup(int /*long*/ icon_theme, int /*long*/ thumbnail_factory, byte[] file_uri, byte[] custom_icon, int /*long*/ file_info, byte[] mime_type, int flags, int[] result);
107 public static final int /*long*/ gnome_icon_lookup(int /*long*/ icon_theme, int /*long*/ thumbnail_factory, byte[] file_uri, byte[] custom_icon, int /*long*/ file_info, byte[] mime_type, int flags, int[] result) {
108     lock.lock();
109     try {
110         return _gnome_icon_lookup(icon_theme, thumbnail_factory, file_uri, custom_icon, file_info, mime_type, flags, result);
111     } finally {
112         lock.unlock();
113     }
114 }
115 public static final native int /*long*/ _gnome_icon_theme_lookup_icon(int /*long*/ theme, int /*long*/ icon_name, int size, int /*long*/[] icon_data, int[] base_size);
116 public static final int /*long*/ gnome_icon_theme_lookup_icon(int /*long*/ theme, int /*long*/ icon_name, int size, int /*long*/[] icon_data, int[] base_size) {
117     lock.lock();
118     try {
119         return _gnome_icon_theme_lookup_icon(theme, icon_name, size, icon_data, base_size);
120     } finally {
121         lock.unlock();
122     }
123 }
124 public static final native int /*long*/ _gnome_icon_theme_new();
125 public static final int /*long*/ gnome_icon_theme_new() {
126     lock.lock();
127     try {
128         return _gnome_icon_theme_new();
129     } finally {
130         lock.unlock();
131     }
132 }
133 public static final native int /*long*/ _gnome_vfs_get_registered_mime_types();
134 public static final int /*long*/ gnome_vfs_get_registered_mime_types() {
135     lock.lock();
136     try {
137         return _gnome_vfs_get_registered_mime_types();
138     } finally {
139         lock.unlock();
140     }
141 }
142 public static final native boolean _gnome_vfs_init();
143 public static final boolean gnome_vfs_init() {
144     lock.lock();
145     try {
146         return _gnome_vfs_init();
147     } finally {
148         lock.unlock();
149     }
150 }
151 public static final native int /*long*/ _gnome_vfs_make_uri_from_input(byte[] uri);
152 public static final int /*long*/ gnome_vfs_make_uri_from_input(byte[] uri) {
153     lock.lock();
154     try {
155         return _gnome_vfs_make_uri_from_input(uri);
156     } finally {
157         lock.unlock();
158     }
159 }
160 public static final native int /*long*/ _gnome_vfs_make_uri_from_input_with_dirs(byte[] uri, int dirs);
161 public static final int /*long*/ gnome_vfs_make_uri_from_input_with_dirs(byte[] uri, int dirs) {
162     lock.lock();
163     try {
164         return _gnome_vfs_make_uri_from_input_with_dirs(uri, dirs);
165     } finally {
166         lock.unlock();
167     }
168 }
169 public static final native void _gnome_vfs_mime_application_free(int /*long*/ application);
170 public static final void gnome_vfs_mime_application_free(int /*long*/ application) {
171     lock.lock();
172     try {
173         _gnome_vfs_mime_application_free(application);
174     } finally {
175         lock.unlock();
176     }
177 }
178 public static final native int _gnome_vfs_mime_application_launch(int /*long*/ application, int /*long*/ uris);
179 public static final int gnome_vfs_mime_application_launch(int /*long*/ application, int /*long*/ uris) {
180     lock.lock();
181     try {
182         return _gnome_vfs_mime_application_launch(application, uris);
183     } finally {
184         lock.unlock();
185     }
186 }
187 public static final native void _gnome_vfs_mime_extensions_list_free(int /*long*/ list);
188 public static final void gnome_vfs_mime_extensions_list_free(int /*long*/ list) {
189     lock.lock();
190     try {
191         _gnome_vfs_mime_extensions_list_free(list);
192     } finally {
193         lock.unlock();
194     }
195 }
196 public static final native int /*long*/ _gnome_vfs_mime_get_default_application(byte[] mimeType);
197 public static final int /*long*/ gnome_vfs_mime_get_default_application(byte[] mimeType) {
198     lock.lock();
199     try {
200         return _gnome_vfs_mime_get_default_application(mimeType);
201     } finally {
202         lock.unlock();
203     }
204 }
205 public static final native int /*long*/ _gnome_vfs_mime_get_extensions_list(int /*long*/ mime_type);
206 public static final int /*long*/ gnome_vfs_mime_get_extensions_list(int /*long*/ mime_type) {
207     lock.lock();
208     try {
209         return _gnome_vfs_mime_get_extensions_list(mime_type);
210     } finally {
211         lock.unlock();
212     }
213 }
214 public static final native void _gnome_vfs_mime_registered_mime_type_list_free(int /*long*/ list);
215 public static final void gnome_vfs_mime_registered_mime_type_list_free(int /*long*/ list) {
216     lock.lock();
217     try {
218         _gnome_vfs_mime_registered_mime_type_list_free(list);
219     } finally {
220         lock.unlock();
221     }
222 }
223 public static final native int /*long*/ _gnome_vfs_mime_type_from_name(byte[] file);
224 public static final int /*long*/ gnome_vfs_mime_type_from_name(byte[] file) {
225     lock.lock();
226     try {
227         return _gnome_vfs_mime_type_from_name(file);
228     } finally {
229         lock.unlock();
230     }
231 }
232 public static final native int _gnome_vfs_url_show(int /*long*/ url);
233 public static final int gnome_vfs_url_show(int /*long*/ url) {
234     lock.lock();
235     try {
236         return _gnome_vfs_url_show(url);
237     } finally {
238         lock.unlock();
239     }
240 }
241 public static final native void memmove (GnomeVFSMimeApplication dest, int /*long*/ src, int /*long*/ count);
242 }
243
Popular Tags