LiVES 2.4.6

- Main Page
- Namespaces
- Data Structures
- Files

- File List
- Globals

All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
widget-helper-gtk.h
Go to the documentation of this file.
1 // widget-helper-gtk.h
2 // LiVES
3 // (c) G. Finch 2012 - 2015 <salsaman@gmail.com>
4 // released under the GNU GPL 3 or later
5 // see file ../COPYING or www.gnu.org for licensing details
6
7 // widget implementation for GTK+
8
9 #ifndef HAS_LIVES_WIDGET_HELPER_GTK_H
10 #define HAS_LIVES_WIDGET_HELPER_GTK_H
11
12 #ifdef GUI_GTK
13
14
15 #define GTK_RADIO_MENU_BUG // a bug where gtk_radio_menu_item_set_active() does not update visually
16 #define GTK_SUBMENU_SENS_BUG // a bug where setting a menuitem insensitive fails if it has a submenu
17 #define GTK_TEXT_VIEW_CSS_BUG // a bug where named textviews cannot be set by CSS
18
19
20 #ifndef IS_MINGW
21 typedef gboolean boolean;
22 #endif
23
24 #ifdef GDK_WINDOWING_WIN32
25 #include <gdk/gdkwin32.h>
26
27 #ifndef GDK_IS_WIN32_DISPLAY
28 #define GDK_IS_WIN32_DISPLAY(display) (TRUE)
29 #endif
30
31 #endif //GDK_WINDOWING_WIN32
32
33 #ifdef GDK_WINDOWING_X11
34
35 // needed for GDK_WINDOW_XID - for fileselector preview
36 // needed for gdk_x11_screen_get_window_manager_name()
37
38 #include <gdk/gdkx.h>
39
40 #ifndef GDK_IS_X11_DISPLAY
41 #define GDK_IS_X11_DISPLAY(display) (TRUE)
42 #endif
43
44 #ifndef GDK_IS_WIN32_DISPLAY
45 #define GDK_IS_WIN32_DISPLAY(display) (FALSE)
46 #endif
47
48
49 #else
50
51 #ifndef GDK_IS_X11_DISPLAY
52 #define GDK_IS_X11_DISPLAY(display) (FALSE)
53 #endif
54
55 #endif // GDK_WINDOWING_X11
56
57 #endif // GUI_GTK
58
59
60 #ifdef PAINTER_CAIRO
61
62 #ifndef GUI_GTK
63 #include <cairo/cairo.h>
64 #endif
65
66
67 typedef cairo_t lives_painter_t;
68 typedef cairo_surface_t lives_painter_surface_t;
69
70 boolean lives_painter_surface_destroy(lives_painter_surface_t *);
71
72
73 typedef cairo_format_t lives_painter_format_t;
74
75 #define LIVES_PAINTER_FORMAT_A1 CAIRO_FORMAT_A1
76 #define LIVES_PAINTER_FORMAT_A8 CAIRO_FORMAT_A8
77 #define LIVES_PAINTER_FORMAT_ARGB32 CAIRO_FORMAT_ARGB32
78
79
80 typedef cairo_content_t lives_painter_content_t; // eg. color, alpha, color+alpha
81
82 #define LIVES_PAINTER_CONTENT_COLOR CAIRO_CONTENT_COLOR
83
84
85 typedef cairo_operator_t lives_painter_operator_t;
86
87 #define LIVES_PAINTER_OPERATOR_UNKNOWN CAIRO_OPERATOR_OVER
88 #define LIVES_PAINTER_OPERATOR_DEFAULT CAIRO_OPERATOR_OVER
89
90 #define LIVES_PAINTER_OPERATOR_DEST_OUT CAIRO_OPERATOR_DEST_OUT
91 #if CAIRO_VERSION < CAIRO_VERSION_ENCODE(1, 10, 0)
92 #define LIVES_PAINTER_OPERATOR_DIFFERENCE CAIRO_OPERATOR_OVER
93 #define LIVES_PAINTER_OPERATOR_OVERLAY CAIRO_OPERATOR_OVER
94 #else
95 #define LIVES_PAINTER_OPERATOR_DIFFERENCE CAIRO_OPERATOR_DIFFERENCE
96 #define LIVES_PAINTER_OPERATOR_OVERLAY CAIRO_OPERATOR_OVERLAY
97 #endif
98
99 typedef cairo_fill_rule_t lives_painter_fill_rule_t;
100
101 #define LIVES_PAINTER_FILL_RULE_WINDING CAIRO_FILL_RULE_WINDING
102 #define LIVES_PAINTER_FILL_RULE_EVEN_ODD CAIRO_FILL_RULE_EVEN_ODD
103
104
105 #endif
106
107
108 #ifdef GUI_GTK
109
110 #include "support.h"
111
112 #define USE_MONOTONIC_TIME
113 #define lives_get_monotonic_time() g_get_monotonic_time()
114
115
116 #if GTK_CHECK_VERSION(3,8,0)
117 #define USE_GDK_FRAME_CLOCK
118 #endif
119
121 #ifndef G_ENCODE_VERSION
122 #define G_ENCODE_VERSION(major,minor) ((major) << 16 | (minor) << 8)
123 #endif
124
125 #define lives_free(a) g_free(a)
126 #define lives_malloc(a) g_malloc(a)
127 #define lives_malloc0(a) g_malloc0(a)
128 #define lives_realloc(a,b) g_realloc(a,b)
129 #define lives_try_malloc0_n(a,b) g_try_malloc0_n(a,b)
130 #define lives_try_malloc(a) g_try_malloc(a)
131 #define lives_try_malloc0(a) g_try_malloc0(a)
132 #define lives_try_realloc(a,b) g_try_realloc(a,b)
133
134
135 typedef GError LiVESError;
136
137 typedef GList LiVESList;
138 typedef GSList LiVESSList;
139
140 typedef gpointer livespointer;
141 typedef gconstpointer livesconstpointer;
142
143 typedef GClosure LiVESWidgetClosure;
144
145 typedef GObject LiVESObject;
146
147 typedef GLogLevelFlags LiVESLogLevelFlags;
148
149 #define LIVES_LOG_LEVEL_WARNING G_LOG_LEVEL_WARNING
150 #define LIVES_LOG_LEVEL_MASK G_LOG_LEVEL_MASK
151 #define LIVES_LOG_LEVEL_CRITICAL G_LOG_LEVEL_CRITICAL
152 #define LIVES_LOG_FATAL_MASK G_LOG_FATAL_MASK
153
155
156 #if GTK_CHECK_VERSION(3,10,0)
157 #define LIVES_TABLE_IS_GRID 1
158 #endif
159
160 #define return_true gtk_true
161
162 typedef void (*LiVESGuiCallback)(void);
163 typedef void (*LiVESWidgetCallback)(GtkWidget *widget, gpointer data);
164 typedef gboolean(*LiVESWidgetSourceFunc)(gpointer data);
165 typedef gint(*LiVESCompareFunc)(gconstpointer a, gconstpointer b);
166
167 #define LIVES_LITTLE_ENDIAN G_LITTLE_ENDIAN
168 #define LIVES_BIG_ENDIAN G_BIG_ENDIAN
169
170 #define LIVES_MAXINT G_MAXINT
171 #define LIVES_MAXUINT32 G_MAXUINT32
172 #define LIVES_MAXSIZE G_MAXSIZE
173 #define LIVES_MAXFLOAT G_MAXFLOAT
174
175 #define LIVES_IS_RTL (gtk_widget_get_default_direction()==GTK_TEXT_DIR_RTL)
176
177 #define LIVES_GUI_CALLBACK(f) ((LiVESGuiCallback) (f))
178
179 #define lives_printerr(args...) g_printerr(args)
180 #define lives_strdup_printf(args...) g_strdup_printf(args)
181 #define lives_strdup_vprintf(args...) g_strdup_vprintf(args)
182 #define lives_strndup_printf(args...) g_strndup_printf(args)
183 #define lives_strndup(a,b) g_strndup(a,b)
184 #define lives_snprintf(a,b,args...) g_snprintf(a,b,args)
185 #define lives_strsplit(a,b,c) g_strsplit(a,b,c)
186 #define lives_strfreev(a) g_strfreev(a)
187 #define lives_ascii_strcasecmp(a,b) g_ascii_strcasecmp(a,b)
188 #define lives_ascii_strncasecmp(a,b,c) g_ascii_strncasecmp(a,b,c)
189 #define lives_strconcat(a,args...) g_strconcat(a,args)
190 #define lives_strstrip(a) g_strstrip(a)
191 #define lives_strrstr(a,b) g_strrstr(a,b)
192 #define lives_strstr_len(a,b,c) g_strstr_len(a,b,c)
193 #define lives_strdelimit(a,b,c) g_strdelimit(a,b,c)
194
195 #define LIVES_NORMALIZE_DEFAULT G_NORMALIZE_DEFAULT
196
197 #define lives_utf8_normalize(a,b,c) g_utf8_normalize(a,b,c)
198
199
200 #define lives_list_nth_data(list,i) g_list_nth_data(list,i)
201 #define lives_list_nth(list,i) g_list_nth(list,i)
202 #define lives_list_length(list) g_list_length(list)
203 #define lives_list_free(list) g_list_free(list)
204 #define lives_list_append(list,data) g_list_append(list,data)
205 #define lives_list_prepend(list,data) g_list_prepend(list,data)
206 #define lives_list_find(list,data) g_list_find(list,data)
207 #define lives_list_previous(list) g_list_previous(list)
208 #define lives_list_last(list) g_list_last(list)
209 #define lives_list_delete_link(list,link) g_list_delete_link(list,link)
210 #define lives_list_copy(list) g_list_copy(list)
211 #define lives_list_next(list) g_list_next(list)
212 #define lives_list_first(list) g_list_first(list)
213 #define lives_list_remove(list,data) g_list_remove(list,data)
214 #define lives_list_remove_link(list,data) g_list_remove_link(list,data)
215 #define lives_list_concat(list,data) g_list_concat(list,data)
216 #define lives_list_insert(list,data,pos) g_list_insert(list,data,pos)
217 #define lives_list_index(list,data) g_list_index(list,data)
218 #define lives_list_find_custom(list,data,func) g_list_find_custom(list,data,func)
219
220 #define lives_slist_free(list) g_slist_free(list)
221 #define lives_slist_length(list) g_slist_length(list)
222 #define lives_slist_nth_data(list,i) g_slist_nth_data(list,i)
223 #define lives_slist_append(list,data) g_slist_append(list,data)
224
225 #define lives_build_filename(args...) g_build_filename(args)
226 #define lives_filename_to_utf8(a,b,c,d,e) g_filename_to_utf8(a,b,c,d,e)
227 #define lives_filename_from_utf8(a,b,c,d,e) g_filename_from_utf8(a,b,c,d,e)
228
229 #define lives_utf8_strdown(a,b) g_utf8_strdown(a,b)
230
231 #define lives_find_program_in_path(a) g_find_program_in_path(a)
232
233 #define lives_idle_add(a,b) g_idle_add(a,b)
234 #define lives_idle_add_full(a,b,c,d) g_idle_add_full(a,b,c,d)
235
236 #define lives_set_application_name(a) g_set_application_name(a)
237 #define lives_get_application_name() g_get_application_name()
238
239 #define lives_usleep(a) g_usleep(a)
240
241 #define lives_mkdir_with_parents(a,b) g_mkdir_with_parents(a,b)
242
243 #define lives_strtod(a,b) g_strtod(a,b)
244
245 #define lives_path_get_basename(a) g_path_get_basename(a)
246
247 #define LIVES_UNLIKELY(a) G_UNLIKELY(a)
248 #define LIVES_LIKELY(a) G_LIKELY(a)
249
250 #define lives_file_test(a,b) g_file_test(a,b)
251
252 #define lives_get_current_dir() g_get_current_dir()
253
254 #define lives_error_free(a) g_error_free(a)
255
256 #define lives_strerror(a) g_strerror(a)
257
258 #define lives_cclosure_new(a,b,c) g_cclosure_new(a,b,c)
259
260 #define lives_path_get_dirname(a) g_path_get_dirname(a)
261
262 #define U82L(String) ( g_locale_from_utf8 (String,-1,NULL,NULL,NULL) )
263 #define L2U8(String) ( g_locale_to_utf8 (String,-1,NULL,NULL,NULL) )
264
265 #define U82F(String) ( g_filename_from_utf8 (String,-1,NULL,NULL,NULL) )
266 #define F2U8(String) ( g_filename_to_utf8 (String,-1,NULL,NULL,NULL) )
267
268
269 #define LIVES_FILE_TEST_EXISTS G_FILE_TEST_EXISTS
270 #define LIVES_FILE_TEST_IS_DIR G_FILE_TEST_IS_DIR
271 #define LIVES_FILE_TEST_IS_REGULAR G_FILE_TEST_IS_REGULAR
272
273 #define LIVES_DIR_SEPARATOR_S G_DIR_SEPARATOR_S
274
275 typedef GtkJustification LiVESJustification;
276
277 #define LIVES_JUSTIFY_LEFT GTK_JUSTIFY_LEFT
278 #define LIVES_JUSTIFY_RIGHT GTK_JUSTIFY_RIGHT
279 #define LIVES_JUSTIFY_CENTER GTK_JUSTIFY_CENTER
280 #define LIVES_JUSTIFY_FILL GTK_JUSTIFY_RIGHT
281
282 typedef GtkOrientation LiVESOrientation;
283 #define LIVES_ORIENTATION_HORIZONTAL GTK_ORIENTATION_HORIZONTAL
284 #define LIVES_ORIENTATION_VERTICAL GTK_ORIENTATION_VERTICAL
285
286 typedef GdkEvent LiVESXEvent;
287 typedef GdkXEvent LiVESXXEvent;
288 typedef GdkEventButton LiVESXEventButton;
289 typedef GdkEventMotion LiVESXEventMotion;
290 typedef GdkEventScroll LiVESXEventScroll;
291 typedef GdkEventExpose LiVESXEventExpose;
292 typedef GdkEventCrossing LiVESXEventCrossing;
293 typedef GdkEventConfigure LiVESXEventConfigure;
294 typedef GdkEventFocus LiVESXEventFocus;
295 typedef GdkEvent LiVESXEventDelete;
296 typedef GdkDisplay LiVESXDisplay;
297 typedef GdkScreen LiVESXScreen;
298 typedef GdkDevice LiVESXDevice;
299
300
301 #define LIVES_SCROLL_UP GDK_SCROLL_UP
302 #define LIVES_SCROLL_DOWN GDK_SCROLL_DOWN
303
304 #if GTK_CHECK_VERSION(3,0,0)
305 #undef LIVES_HAS_DEVICE_MANAGER
306 #define LIVES_HAS_DEVICE_MANAGER 1
307 typedef GdkDeviceManager LiVESXDeviceManager;
308 #endif
309
310 #if GTK_CHECK_VERSION(3,0,0)
311 #define LIVES_WIDGET_EXPOSE_EVENT "draw"
312 #define LIVES_GUI_OBJECT(a) a
313 #else
314 #define LIVES_GUI_OBJECT(a) GTK_OBJECT(a)
315 #define LIVES_WIDGET_EXPOSE_EVENT "expose_event"
316 #define LIVES_GUI_OBJECT_CLASS(a) GTK_OBJECT_CLASS(a)
317 #endif
318
319 #define lives_widget_object_set_data(a, b, c) g_object_set_data(a, b, c)
320 #define lives_widget_object_get_data(a, b) g_object_get_data(a, b)
321
322 #define LIVES_WIDGET_OBJECT(a) G_OBJECT(a)
323
324 #if GTK_CHECK_VERSION(3,0,0)
325 #define NO_MEM_OVERRIDE TRUE
326 #else
327 #define NO_MEM_OVERRIDE g_mem_is_system_malloc()
328 #endif
329
330 typedef GMemVTable LiVESMemVTable;
331 typedef GIOChannel LiVESIOChannel;
332
333 typedef GtkTargetEntry LiVESTargetEntry;
334
335 typedef GdkFilterReturn LiVESFilterReturn;
336
337 #define LIVES_FILTER_REMOVE GDK_FILTER_REMOVE
338 #define LIVES_FILTER_CONTINUE GDK_FILTER_CONTINUE
339
340 // events
341 #define LIVES_WIDGET_SCROLL_EVENT "scroll-event"
342 #define LIVES_WIDGET_CONFIGURE_EVENT "configure-event"
343 #define LIVES_WIDGET_ENTER_EVENT "enter-notify-event"
344 #define LIVES_WIDGET_BUTTON_PRESS_EVENT "button-press-event"
345 #define LIVES_WIDGET_BUTTON_RELEASE_EVENT "button-release-event"
346 #define LIVES_WIDGET_MOTION_NOTIFY_EVENT "motion-notify-event"
347 #define LIVES_WIDGET_LEAVE_NOTIFY_EVENT "leave-notify-event"
348 #define LIVES_WIDGET_FOCUS_OUT_EVENT "focus-out-event"
349 #define LIVES_WIDGET_DELETE_EVENT "delete-event"
350
351 // signals
352 #define LIVES_WIDGET_CLICKED_SIGNAL "clicked"
353 #define LIVES_WIDGET_TOGGLED_SIGNAL "toggled"
354 #define LIVES_WIDGET_CHANGED_SIGNAL "changed"
355 #define LIVES_WIDGET_ACTIVATE_SIGNAL "activate"
356 #define LIVES_WIDGET_VALUE_CHANGED_SIGNAL "value-changed"
357 #define LIVES_WIDGET_SELECTION_CHANGED_SIGNAL "selection-changed"
358 #define LIVES_WIDGET_CURRENT_FOLDER_CHANGED_SIGNAL "current-folder-changed"
359 #define LIVES_WIDGET_RESPONSE_SIGNAL "response"
360 #define LIVES_WIDGET_DRAG_DATA_RECEIVED_SIGNAL "drag-data-received"
361 #define LIVES_WIDGET_SIZE_PREPARED_SIGNAL "size-prepared"
362 #define LIVES_WIDGET_MODE_CHANGED_SIGNAL "mode-changed"
363 #define LIVES_WIDGET_ACCEPT_POSITION_SIGNAL "accept-position"
364 #define LIVES_WIDGET_SWITCH_PAGE_SIGNAL "switch-page"
365 #define LIVES_WIDGET_UNMAP_SIGNAL "unmap"
366 #define LIVES_WIDGET_EDITED_SIGNAL "edited"
367 #define LIVES_WIDGET_ROW_EXPANDED_SIGNAL "row-expanded"
368 #define LIVES_WIDGET_COLOR_SET_SIGNAL "color-set"
369 #define LIVES_WIDGET_SET_FOCUS_CHILD_SIGNAL "set-focus-child"
370
371 #if GTK_CHECK_VERSION(3,0,0)
372 #define LIVES_WIDGET_STATE_CHANGED_SIGNAL "state-flags-changed"
373 #else
374 #define LIVES_WIDGET_STATE_CHANGED_SIGNAL "state-changed"
375 #endif
376
377
378 typedef GtkWidget LiVESWidget;
379 typedef GtkWindow LiVESWindow;
380 typedef GtkContainer LiVESContainer;
381 typedef GtkBin LiVESBin;
382 typedef GtkDialog LiVESDialog;
383 typedef GtkBox LiVESBox;
384 typedef GtkFrame LiVESFrame;
385 typedef GtkComboBox LiVESCombo;
386 typedef GtkComboBox LiVESComboBox;
387 typedef GtkButton LiVESButton;
388 typedef GtkButtonBox LiVESButtonBox;
389 typedef GtkToggleButton LiVESToggleButton;
390
391 typedef GtkTextView LiVESTextView;
392 typedef GtkTextBuffer LiVESTextBuffer;
393 typedef GtkTextMark LiVESTextMark;
394 typedef GtkTextIter LiVESTextIter;
395
396 typedef GtkEntry LiVESEntry;
397 typedef GtkEntryCompletion LiVESEntryCompletion;
398 typedef GtkRadioButton LiVESRadioButton;
399 typedef GtkSpinButton LiVESSpinButton;
400 typedef GtkColorButton LiVESColorButton;
401 typedef GtkToolButton LiVESToolButton;
402 typedef GtkLabel LiVESLabel;
403 typedef GtkImage LiVESImage;
404 typedef GtkFileChooser LiVESFileChooser;
405 typedef GtkAlignment LiVESAlignment;
406 typedef GtkMenu LiVESMenu;
407 typedef GtkMenuShell LiVESMenuShell;
408 typedef GtkMenuItem LiVESMenuItem;
409 typedef GtkMenuToolButton LiVESMenuToolButton;
410 typedef GtkCheckMenuItem LiVESCheckMenuItem;
411 typedef GtkImageMenuItem LiVESImageMenuItem;
412 typedef GtkRadioMenuItem LiVESRadioMenuItem;
413
414 typedef GtkNotebook LiVESNotebook;
415
416 typedef GtkExpander LiVESExpander;
417
418 typedef GtkProgressBar LiVESProgressBar;
419
420 typedef GtkAboutDialog LiVESAboutDialog;
421
422 #define LIVES_COL_TYPE_STRING G_TYPE_STRING
423 #define LIVES_COL_TYPE_INT G_TYPE_INT
424 #define LIVES_COL_TYPE_UINT G_TYPE_UINT
425 #define LIVES_COL_TYPE_BOOLEAN G_TYPE_BOOLEAN
426 #define LIVES_COL_TYPE_PIXBUF GDK_TYPE_PIXBUF
427
428
429 typedef GtkTreeView LiVESTreeView;
430 typedef GtkTreeViewColumn LiVESTreeViewColumn;
431
432 typedef GtkTreeViewColumnSizing LiVESTreeViewColumnSizing;
433 #define LIVES_TREE_VIEW_COLUMN_GROW_ONLY GTK_TREE_VIEW_COLUMN_GROW_ONLY
434 #define LIVES_TREE_VIEW_COLUMN_AUTOSIZE GTK_TREE_VIEW_COLUMN_AUTOSIZE
435 #define LIVES_TREE_VIEW_COLUMN_FIXED GTK_TREE_VIEW_COLUMN_FIXED
436
437
438 typedef GtkCellRenderer LiVESCellRenderer;
439 typedef GtkTreeModel LiVESTreeModel;
440 typedef GtkTreeIter LiVESTreeIter;
441 typedef GtkTreePath LiVESTreePath;
442 typedef GtkTreeStore LiVESTreeStore;
443 typedef GtkTreeSelection LiVESTreeSelection;
444 typedef GtkListStore LiVESListStore;
445
446
447 typedef GtkScrolledWindow LiVESScrolledWindow;
448 typedef GtkScrollbar LiVESScrollbar;
449 typedef GtkHScrollbar LiVESHScrollbar;
450 typedef GtkToolbar LiVESToolbar;
451 typedef GtkToolItem LiVESToolItem;
452
453 #if GTK_CHECK_VERSION(2,14,0)
454 typedef GtkScaleButton LiVESScaleButton;
455 #else
456 typedef GtkRange LiVESScaleButton;
457 #endif
458
459 #if GTK_CHECK_VERSION(3,2,0)
460 typedef GtkGrid LiVESGrid;
461 #undef LIVES_HAS_GRID_WIDGET
462 #define LIVES_HAS_GRID_WIDGET 1
463 #else
464 typedef LiVESWidget LiVESGrid;
465 #endif
466
467 #ifdef LIVES_TABLE_IS_GRID
468 typedef GtkGrid LiVESTable;
469 #else
470 typedef GtkTable LiVESTable;
471 #endif
472
473 typedef GtkEditable LiVESEditable;
474
475 #if GTK_CHECK_VERSION(3,0,0)
476 #define LIVES_WIDGET_COLOR_HAS_ALPHA (1)
477 #define LIVES_WIDGET_COLOR_SCALE(x) (x)
478 #define LIVES_WIDGET_COLOR_SCALE_255(x) ((double)x/255.)
479 typedef GdkRGBA LiVESWidgetColor;
480
481 typedef GtkStateFlags LiVESWidgetState;
482
483 #define LIVES_WIDGET_STATE_NORMAL GTK_STATE_FLAG_NORMAL
484 #define LIVES_WIDGET_STATE_ACTIVE GTK_STATE_FLAG_ACTIVE
485 #define LIVES_WIDGET_STATE_PRELIGHT GTK_STATE_FLAG_PRELIGHT
486 #define LIVES_WIDGET_STATE_SELECTED GTK_STATE_FLAG_SELECTED
487 #define LIVES_WIDGET_STATE_INSENSITIVE GTK_STATE_FLAG_INSENSITIVE
488 #define LIVES_WIDGET_STATE_INCONSISTENT GTK_STATE_FLAG_INCONSISTENT
489 #define LIVES_WIDGET_STATE_FOCUSED GTK_STATE_FLAG_FOCUSED
490 #define LIVES_WIDGET_STATE_BACKDROP GTK_STATE_FLAG_BACKDROP
491
492 #else
493 #define LIVES_WIDGET_COLOR_HAS_ALPHA (0)
494 #define LIVES_WIDGET_COLOR_SCALE(x) ((double)x/65535.)
495 #define LIVES_WIDGET_COLOR_SCALE_255(x) ((int)((double)x*256.+.5))
496 typedef GdkColor LiVESWidgetColor;
497 typedef GtkStateType LiVESWidgetState;
498
499 #define LIVES_WIDGET_STATE_NORMAL GTK_STATE_NORMAL
500 #define LIVES_WIDGET_STATE_ACTIVE GTK_STATE_ACTIVE
501 #define LIVES_WIDGET_STATE_PRELIGHT GTK_STATE_PRELIGHT
502 #define LIVES_WIDGET_STATE_SELECTED GTK_STATE_SELECTED
503 #define LIVES_WIDGET_STATE_INSENSITIVE GTK_STATE_INSENSITIVE
504 #define LIVES_WIDGET_STATE_INCONSISTENT (GTK_STATE_INSENSITIVE+1)
505 #define LIVES_WIDGET_STATE_FOCUSED (GTK_STATE_INSENSITIVE+2)
506 #define LIVES_WIDGET_STATE_BACKDROP (GTK_STATE_INSENSITIVE+3)
507 #endif
508
509
510 typedef int LiVESResponseType;
511 #define LIVES_RESPONSE_NONE GTK_RESPONSE_NONE
512 #define LIVES_RESPONSE_OK GTK_RESPONSE_OK
513 #define LIVES_RESPONSE_CANCEL GTK_RESPONSE_CANCEL
514 #define LIVES_RESPONSE_ACCEPT GTK_RESPONSE_ACCEPT
515 #define LIVES_RESPONSE_YES GTK_RESPONSE_YES
516 #define LIVES_RESPONSE_NO GTK_RESPONSE_NO
517
518 // positive values for custom responses
519 #define LIVES_RESPONSE_INVALID 0
520 #define LIVES_RESPONSE_RETRY 1
521 #define LIVES_RESPONSE_ABORT 2
522 #define LIVES_RESPONSE_RESET 3
523 #define LIVES_RESPONSE_SHOW_DETAILS 4
524
525
526 typedef GtkAttachOptions LiVESAttachOptions;
527 #define LIVES_EXPAND GTK_EXPAND
528 #define LIVES_SHRINK GTK_SHRINK
529 #define LIVES_FILL GTK_FILL
530
531
532 typedef GtkWindowType LiVESWindowType;
533 #define LIVES_WINDOW_TOPLEVEL GTK_WINDOW_TOPLEVEL
534 #define LIVES_WINDOW_POPUP GTK_WINDOW_POPUP
535
536
537 typedef GtkDialogFlags LiVESDialogFlags;
538
539 typedef GtkMessageType LiVESMessageType;
540 #define LIVES_MESSAGE_INFO GTK_MESSAGE_INFO
541 #define LIVES_MESSAGE_WARNING GTK_MESSAGE_WARNING
542 #define LIVES_MESSAGE_QUESTION GTK_MESSAGE_QUESTION
543 #define LIVES_MESSAGE_ERROR GTK_MESSAGE_ERROR
544 #define LIVES_MESSAGE_OTHER GTK_MESSAGE_OTHER
545
546 typedef GtkButtonsType LiVESButtonsType;
547 #define LIVES_BUTTONS_NONE GTK_BUTTONS_NONE
548
549
550 typedef GtkFileChooserAction LiVESFileChooserAction;
551 #define LIVES_FILE_CHOOSER_ACTION_OPEN GTK_FILE_CHOOSER_ACTION_OPEN
552 #define LIVES_FILE_CHOOSER_ACTION_SAVE GTK_FILE_CHOOSER_ACTION_SAVE
553 #define LIVES_FILE_CHOOSER_ACTION_SELECT_FOLDER GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER
554 #define LIVES_FILE_CHOOSER_ACTION_CREATE_FOLDER GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER
555 #define LIVES_FILE_CHOOSER_ACTION_SELECT_DEVICE ((GtkFileChooserAction)(GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER+1))
556
557
558 typedef GtkIconSize LiVESIconSize;
559 #define LIVES_ICON_SIZE_INVALID GTK_ICON_SIZE_INVALID
560 #define LIVES_ICON_SIZE_MENU GTK_ICON_SIZE_MENU
561 #define LIVES_ICON_SIZE_SMALL_TOOLBAR GTK_ICON_SIZE_SMALL_TOOLBAR
562 #define LIVES_ICON_SIZE_LARGE_TOOLBAR GTK_ICON_SIZE_LARGE_TOOLBAR
563 #define LIVES_ICON_SIZE_BUTTON GTK_ICON_SIZE_BUTTON
564 #define LIVES_ICON_SIZE_DND GTK_ICON_SIZE_DND
565 #define LIVES_ICON_SIZE_DIALOG GTK_ICON_SIZE_DIALOG
566
567
568
569 // scrolledwindow policies
570 typedef GtkPolicyType LiVESPolicyType;
571 #define LIVES_POLICY_ALWAYS GTK_POLICY_ALWAYS
572 #define LIVES_POLICY_AUTOMATIC GTK_POLICY_AUTOMATIC
573 #define LIVES_POLICY_NEVER GTK_POLICY_NEVER
574
575
576 typedef GtkPositionType LiVESPositionType;
577 #define LIVES_POS_LEFT GTK_POS_LEFT
578 #define LIVES_POS_RIGHT GTK_POS_RIGHT
579 #define LIVES_POS_TOP GTK_POS_TOP
580 #define LIVES_POS_BOTTOM GTK_POS_BOTTOM
581
582
583 typedef GtkArrowType LiVESArrowType;
584 #define LIVES_ARROW_UP GTK_ARROW_UP
585 #define LIVES_ARROW_DOWN GTK_ARROW_DOWN
586 #define LIVES_ARROW_LEFT GTK_ARROW_LEFT
587 #define LIVES_ARROW_RIGHT GTK_ARROW_RIGHT
588 #define LIVES_ARROW_NONE GTK_ARROW_NONE
589
590
591 typedef GtkWrapMode LiVESWrapMode;
592 #define LIVES_WRAP_NONE GTK_WRAP_NONE
593 //#define LIVES_WRAP_CHAR GTK_WRAP_CHAR
594 #define LIVES_WRAP_WORD GTK_WRAP_WORD
595 //#define LIVES_WRAP_WORD_CHAR GTK_WRAP_WORD_CHAR
596
597 typedef GtkReliefStyle LiVESReliefStyle;
598 #define LIVES_RELIEF_NORMAL GTK_RELIEF_NORMAL
599 #define LIVES_RELIEF_HALF GTK_RELIEF_HALF
600 #define LIVES_RELIEF_NONE GTK_RELIEF_NONE
601
602 #define LIVES_ACCEL_VISIBLE GTK_ACCEL_VISIBLE
603
604 typedef GtkToolbarStyle LiVESToolbarStyle;
605 #define LIVES_TOOLBAR_ICONS GTK_TOOLBAR_ICONS
606 #define LIVES_TOOLBAR_TEXT GTK_TOOLBAR_TEXT
607
608
609 typedef GtkSelectionMode LiVESSelectionMode;
610 #define LIVES_SELECTION_NONE GTK_SELECTION_NONE
611 #define LIVES_SELECTION_SINGLE GTK_SELECTION_SINGLE
612 //#define LIVES_SELECTION_BROWSE GTK_SELECTION_BROWSE
613 #define LIVES_SELECTION_MULTIPLE GTK_SELECTION_MULTIPLE
614
615 typedef GtkButtonBoxStyle LiVESButtonBoxStyle;
616 #define LIVES_BUTTONBOX_DEFAULT_STYLE GTK_BUTTONBOX_DEFAULT_STYLE
617 #define LIVES_BUTTONBOX_SPREAD GTK_BUTTONBOX_SPREAD
618 #define LIVES_BUTTONBOX_EDGE GTK_BUTTONBOX_EDGE
619 #define LIVES_BUTTONBOX_START GTK_BUTTONBOX_START
620 #define LIVES_BUTTONBOX_END GTK_BUTTONBOX_END
621 #define LIVES_BUTTONBOX_CENTER GTK_BUTTONBOX_CENTER
622
623
624 typedef GdkEventMask LiVESEventMask;
625 #define LIVES_EXPOSURE_MASK GDK_EXPOSURE_MASK
626 #define LIVES_POINTER_MOTION_MASK GDK_POINTER_MOTION_MASK
627 #define LIVES_POINTER_MOTION_HINT_MASK GDK_POINTER_MOTION_HINT_MASK
628 #define LIVES_BUTTON_MOTION_MASK GDK_BUTTON_MOTION_MASK
629 #define LIVES_BUTTON1_MOTION_MASK GDK_BUTTON1_MOTION_MASK
630 #define LIVES_BUTTON2_MOTION_MASK GDK_BUTTON2_MOTION_MASK
631 #define LIVES_BUTTON3_MOTION_MASK GDK_BUTTON3_MOTION_MASK
632 #define LIVES_BUTTON_PRESS_MASK GDK_BUTTON_PRESS_MASK
633 #define LIVES_BUTTON_RELEASE_MASK GDK_BUTTON_RELEASE_MASK
634 #define LIVES_KEY_PRESS_MASK GDK_KEY_PRESS_MASK
635 #define LIVES_KEY_RELEASE_MASK GDK_KEY_RELEASE_MASK
636 #define LIVES_ENTER_NOTIFY_MASK GDK_ENTER_NOTIFY_MASK
637 #define LIVES_LEAVE_NOTIFY_MASK GDK_LEAVE_NOTIFY_MASK
638 #define LIVES_FOCUS_CHANGE_MASK GDK_FOCUS_CHANGE_MASK
639 #define LIVES_STRUCTURE_MASK GDK_STRUCTURE_MASK
640 #define LIVES_PROPERTY_CHANGE_MASK GDK_PROPERTY_CHANGE_MASK
641 #define LIVES_VISIBILITY_NOTIFY_MASK GDK_VISIBILITY_NOTIFY_MASK
642 #define LIVES_PROXIMITY_IN_MASK GDK_PROXIMITY_IN_MASK
643 #define LIVES_PROXIMITY_OUT_MASK GDK_PROXIMITY_OUT_MASK
644 #define LIVES_SUBSTRUCTURE_MASK GDK_SUBSTRUCTURE_MASK
645 #define LIVES_SCROLL_MASK GDK_SCROLL_MASK
646
647
648 #define LIVES_BUTTON_PRESS GDK_BUTTON_PRESS
649 #define LIVES_BUTTON_RELEASE GDK_BUTTON_RELEASE
650 #define LIVES_BUTTON2_PRESS GDK_2BUTTON_PRESS
651
652 #if GTK_CHECK_VERSION(3,4,0)
653 #define LIVES_TOUCH_MASK GDK_TOUCH_MASK
654 #define LIVES_SMOOTH_SCROLL_MASK GDK_SMOOTH_SCROLL_MASK
655 #endif
656
657 #define LIVES_ALL_EVENTS_MASK GDK_ALL_EVENTS_MASK
658
659
660 typedef GtkShadowType LiVESShadowType;
661 #define LIVES_SHADOW_NONE GTK_SHADOW_NONE
662 #define LIVES_SHADOW_IN GTK_SHADOW_IN
663 #define LIVES_SHADOW_OUT GTK_SHADOW_OUT
664 #define LIVES_SHADOW_ETCHED_IN GTK_SHADOW_ETCHED_IN
665 #define LIVES_SHADOW_ETCHED_OUT GTK_SHADOW_ETCHED_OUT
666
667 typedef GtkWindowPosition LiVESWindowPosition;
668 #define LIVES_WIN_POS_CENTER_ALWAYS GTK_WIN_POS_CENTER_ALWAYS
669
670
671 #if GTK_CHECK_VERSION(3,0,0)
672 typedef GtkScale LiVESRuler;
673 typedef GtkBox LiVESVBox;
674 typedef GtkBox LiVESHBox;
675 #else
676 typedef GtkRuler LiVESRuler;
677 typedef GtkVBox LiVESVBox;
678 typedef GtkHBox LiVESHBox;
679 #endif
680
681 typedef GtkEventBox LiVESEventBox;
682
683 typedef GtkRange LiVESRange;
684
685 typedef GtkAdjustment LiVESAdjustment;
686
687 typedef GdkPixbuf LiVESPixbuf;
688
689 typedef GdkWindow LiVESXWindow;
690
691 typedef GdkCursor LiVESXCursor;
692
693 typedef GdkModifierType LiVESXModifierType;
694
695 typedef GtkAccelGroup LiVESAccelGroup;
696 typedef GtkAccelFlags LiVESAccelFlags;
697
698 typedef GtkRequisition LiVESRequisition;
699
700 typedef GtkPaned LiVESPaned;
701
702 typedef GtkScale LiVESScale;
703
704 typedef GdkPixbufDestroyNotify LiVESPixbufDestroyNotify;
705
706 typedef GdkInterpType LiVESInterpType;
707
708 #define LIVES_WIDGET(widget) GTK_WIDGET(widget)
709 #define LIVES_PIXBUF(widget) GDK_PIXBUF(widget)
710 #define LIVES_WINDOW(widget) GTK_WINDOW(widget)
711 #define LIVES_XWINDOW(widget) GDK_WINDOW(widget)
712 #define LIVES_BOX(widget) GTK_BOX(widget)
713 #define LIVES_EVENT_BOX(widget) GTK_EVENT_BOX(widget)
714 #define LIVES_ENTRY(widget) GTK_ENTRY(widget)
715 #define LIVES_FRAME(widget) GTK_FRAME(widget)
716 #define LIVES_CONTAINER(widget) GTK_CONTAINER(widget)
717 #define LIVES_BIN(widget) GTK_BIN(widget)
718 #define LIVES_ADJUSTMENT(widget) GTK_ADJUSTMENT(widget)
719 #define LIVES_DIALOG(widget) GTK_DIALOG(widget)
720 #define LIVES_SCALE(widget) GTK_SCALE(widget)
721 #define LIVES_PANED(widget) GTK_PANED(widget)
722 #define LIVES_COMBO(widget) GTK_COMBO_BOX(widget)
723 #define LIVES_COMBO_BOX(widget) GTK_COMBO_BOX(widget)
724 #define LIVES_BUTTON(widget) GTK_BUTTON(widget)
725 #define LIVES_BUTTON_BOX(widget) GTK_BUTTON_BOX(widget)
726 #define LIVES_LABEL(widget) GTK_LABEL(widget)
727 #define LIVES_ALIGNMENT(widget) GTK_ALIGNMENT(widget)
728 #define LIVES_FILES_CHOOSER(widget) GTK_FILE_CHOOSER(widget)
729 #define LIVES_RADIO_BUTTON(widget) GTK_RADIO_BUTTON(widget)
730 #define LIVES_SPIN_BUTTON(widget) GTK_SPIN_BUTTON(widget)
731 #define LIVES_COLOR_BUTTON(widget) GTK_COLOR_BUTTON(widget)
732 #define LIVES_TOOL_BUTTON(widget) GTK_TOOL_BUTTON(widget)
733
734 #define LIVES_MENU(widget) GTK_MENU(widget)
735 #define LIVES_MENU_SHELL(widget) GTK_MENU_SHELL(widget)
736 #define LIVES_MENU_TOOL_BUTTON(widget) GTK_MENU_TOOL_BUTTON(widget)
737 #define LIVES_MENU_ITEM(widget) GTK_MENU_ITEM(widget)
738 #define LIVES_IMAGE(widget) GTK_IMAGE(widget)
739 #define LIVES_CHECK_MENU_ITEM(widget) GTK_CHECK_MENU_ITEM(widget)
740 #define LIVES_RADIO_MENU_ITEM(widget) GTK_RADIO_MENU_ITEM(widget)
741 #define LIVES_FILE_CHOOSER(widget) GTK_FILE_CHOOSER(widget)
742 #define LIVES_SCROLLED_WINDOW(widget) GTK_SCROLLED_WINDOW(widget)
743 #define LIVES_TOOLBAR(widget) GTK_TOOLBAR(widget)
744 #define LIVES_TOOL_ITEM(widget) GTK_TOOL_ITEM(widget)
745
746 #define LIVES_NOTEBOOK(widget) GTK_NOTEBOOK(widget)
747
748 #define LIVES_PROGRESS_BAR(widget) GTK_PROGRESS_BAR(widget)
749
750 #define LIVES_EXPANDER(widget) GTK_EXPANDER(widget)
751
752 #define LIVES_MISC(widget) GTK_MISC(widget)
753
754 #if GTK_CHECK_VERSION(2,14,0)
755 #define LIVES_SCALE_BUTTON(widget) GTK_SCALE_BUTTON(widget)
756 #else
757 #define LIVES_SCALE_BUTTON(widget) GTK_RANGE(widget)
758 #endif
759
760 #define LIVES_TOGGLE_BUTTON(widget) GTK_TOGGLE_BUTTON(widget)
761 #define LIVES_TEXT_VIEW(widget) GTK_TEXT_VIEW(widget)
762 #define LIVES_TEXT_BUFFER(widget) GTK_TEXT_BUFFER(widget)
763
764 #define LIVES_TREE_VIEW(widget) GTK_TREE_VIEW(widget)
765 #define LIVES_TREE_MODEL(object) GTK_TREE_MODEL(object)
766
767 #define LIVES_LIST_STORE(object) GTK_LIST_STORE(object)
768
769 #define LIVES_ACCEL_GROUP(object) GTK_ACCEL_GROUP(object)
770
771
772 #if GTK_CHECK_VERSION(3,0,0)
773 #define LIVES_RULER(widget) GTK_SCALE(widget)
774 #define LIVES_ORIENTABLE(widget) GTK_ORIENTABLE(widget)
775 #define LIVES_VBOX(widget) GTK_BOX(widget)
776 #define LIVES_HBOX(widget) GTK_BOX(widget)
777 #else
778 #define LIVES_RULER(widget) GTK_RULER(widget)
779 #define LIVES_VBOX(widget) GTK_VBOX(widget)
780 #define LIVES_HBOX(widget) GTK_HBOX(widget)
781 #endif
782
783 #if GTK_CHECK_VERSION(3,2,0)
784 #define LIVES_GRID(widget) GTK_GRID(widget)
785 #else
786 #define LIVES_GRID(widget) GTK_WIDGET(widget)
787 #endif
788
789 #if GTK_CHECK_VERSION(3,10,0)
790 #define LIVES_IMAGE_MENU_ITEM(widget) GTK_MENU_ITEM(widget)
791 #else
792 #define LIVES_IMAGE_MENU_ITEM(widget) GTK_IMAGE_MENU_ITEM(widget)
793 #undef LIVES_HAS_IMAGE_MENU_ITEM
794 #define LIVES_HAS_IMAGE_MENU_ITEM 1
795 #endif
796
797 #if LIVES_TABLE_IS_GRID
798 #define LIVES_TABLE(widget) GTK_GRID(widget)
799 #else
800 #define LIVES_TABLE(widget) GTK_TABLE(widget)
801 #endif
802
803 #define LIVES_RANGE(widget) GTK_RANGE(widget)
804
805 #define LIVES_EDITABLE(widget) GTK_EDITABLE(widget)
806
807
808 #define LIVES_XEVENT(event) GDK_EVENT(event)
809
810 #define LIVES_IS_WIDGET_OBJECT(object) G_IS_OBJECT(object)
811 #define LIVES_IS_WIDGET(widget) GTK_IS_WIDGET(widget)
812 #define LIVES_IS_WINDOW(widget) GTK_IS_WINDOW(widget)
813 #define LIVES_IS_XWINDOW(widget) GDK_IS_WINDOW(widget)
814 #define LIVES_IS_PIXBUF(widget) GDK_IS_PIXBUF(widget)
815 #define LIVES_IS_CONTAINER(widget) GTK_IS_CONTAINER(widget)
816
817 #if GTK_CHECK_VERSION(3,0,0)
818 #define LIVES_IS_HBOX(widget) (GTK_IS_BOX(widget)&&gtk_orientable_get_orientation(GTK_ORIENTABLE(widget))==GTK_ORIENTATION_HORIZONTAL)
819 #define LIVES_IS_VBOX(widget) (GTK_IS_BOX(widget)&&gtk_orientable_get_orientation(GTK_ORIENTABLE(widget))==GTK_ORIENTATION_HORIZONTAL)
820 #define LIVES_IS_SCROLLABLE(widget) GTK_IS_SCROLLABLE(widget)
821 #else
822 #define LIVES_IS_HBOX(widget) GTK_IS_HBOX(widget)
823 #define LIVES_IS_VBOX(widget) GTK_IS_VBOX(widget)
824 #endif
825
826 #define LIVES_IS_BOX(widget) (LIVES_IS_HBOX(widget) || LIVES_IS_VBOX(widget))
827
828 #define LIVES_IS_TOOLBAR(widget) GTK_IS_TOOLBAR(widget)
829 #define LIVES_IS_EVENT_BOX(widget) GTK_IS_EVENT_BOX(widget)
830
831 #define LIVES_IS_COMBO(widget) GTK_IS_COMBO_BOX(widget)
832 #define LIVES_IS_LABEL(widget) GTK_IS_LABEL(widget)
833 #define LIVES_IS_BUTTON(widget) GTK_IS_BUTTON(widget)
834 #define LIVES_IS_SPIN_BUTTON(widget) GTK_IS_SPIN_BUTTON(widget)
835 #define LIVES_IS_TOGGLE_BUTTON(widget) GTK_IS_TOGGLE_BUTTON(widget)
836 #define LIVES_IS_IMAGE(widget) GTK_IS_IMAGE(widget)
837 #define LIVES_IS_ENTRY(widget) GTK_IS_ENTRY(widget)
838 #define LIVES_IS_RANGE(widget) GTK_IS_RANGE(widget)
839 #define LIVES_IS_PROGRESS_BAR(widget) GTK_IS_PROGRESS_BAR(widget)
840 #define LIVES_IS_TEXT_VIEW(widget) GTK_IS_TEXT_VIEW(widget)
841 #define LIVES_IS_MENU_ITEM(widget) GTK_IS_MENU_ITEM(widget)
842 #define LIVES_IS_FILE_CHOOSER(widget) GTK_IS_FILE_CHOOSER(widget)
843 #define LIVES_IS_BUTTON_BOX(widget) GTK_IS_BUTTON_BOX(widget)
844
845 // (image resize) interpolation types
846 #define LIVES_INTERP_BEST GDK_INTERP_HYPER
847 #define LIVES_INTERP_NORMAL GDK_INTERP_BILINEAR
848 #define LIVES_INTERP_FAST GDK_INTERP_NEAREST
849
850
851 #if GTK_CHECK_VERSION(3,10,0)
852 #define LIVES_STOCK_YES "gtk-yes" // non-standard image ?
853 #define LIVES_STOCK_APPLY "gtk-apply" // non-standard image ?
854 #define LIVES_STOCK_CANCEL "gtk-cancel" // non-standard image ?
855 #define LIVES_STOCK_OK "gtk-ok" // non-standard image ?
856 #define LIVES_STOCK_UNDO "edit-undo"
857 #define LIVES_STOCK_REDO "edit-redo"
858 #define LIVES_STOCK_ADD "list-add"
859 #define LIVES_STOCK_REMOVE "list-remove"
860 #define LIVES_STOCK_NO "media-record"
861 #define LIVES_STOCK_QUIT "application-exit"
862 #define LIVES_STOCK_OPEN "document-open"
863 #define LIVES_STOCK_CLOSE "window-close"
864 #define LIVES_STOCK_CLEAR "edit-clear"
865 #define LIVES_STOCK_DELETE "edit-delete"
866 #define LIVES_STOCK_SAVE_AS "document-save-as"
867 #define LIVES_STOCK_SAVE "document-save"
868 #define LIVES_STOCK_REFRESH "view-refresh"
869 #define LIVES_STOCK_REVERT_TO_SAVED "document-revert"
870 #define LIVES_STOCK_GO_BACK "go-previous"
871 #define LIVES_STOCK_GO_FORWARD "go-next"
872 #define LIVES_STOCK_GO_UP "go-up"
873 #define LIVES_STOCK_GO_DOWN "go-down"
874 #define LIVES_STOCK_REFRESH "view-refresh"
875 #define LIVES_STOCK_MEDIA_PLAY "media-playback-start"
876 #define LIVES_STOCK_MEDIA_STOP "media-playback-stop"
877 #define LIVES_STOCK_MEDIA_REWIND "media-seek-backward"
878 #define LIVES_STOCK_MEDIA_FORWARD "media-seek-forward"
879 #define LIVES_STOCK_MEDIA_RECORD "media-record"
880 #define LIVES_STOCK_MEDIA_PAUSE "media-pause"
881 #define LIVES_STOCK_PREFERENCES "preferences-system"
882 #define LIVES_STOCK_DIALOG_INFO "dialog-information"
883 #define LIVES_STOCK_MISSING_IMAGE "image-missing"
884
885 char LIVES_STOCK_LABEL_CANCEL[32];
886 char LIVES_STOCK_LABEL_OK[32];
887 char LIVES_STOCK_LABEL_YES[32];
888 char LIVES_STOCK_LABEL_NO[32];
889 char LIVES_STOCK_LABEL_SAVE[32];
890 char LIVES_STOCK_LABEL_SAVE_AS[32];
891 char LIVES_STOCK_LABEL_OPEN[32];
892 char LIVES_STOCK_LABEL_QUIT[32];
893 char LIVES_STOCK_LABEL_APPLY[32];
894 char LIVES_STOCK_LABEL_CLOSE[32];
895 char LIVES_STOCK_LABEL_REVERT[32];
896 char LIVES_STOCK_LABEL_REFRESH[32];
897 char LIVES_STOCK_LABEL_DELETE[32];
898 char LIVES_STOCK_LABEL_GO_FORWARD[32];
899
900 char LIVES_STOCK_LABEL_MEDIA_FORWARD[32];
901 char LIVES_STOCK_LABEL_MEDIA_REWIND[32];
902 char LIVES_STOCK_LABEL_MEDIA_STOP[32];
903 char LIVES_STOCK_LABEL_MEDIA_PLAY[32];
904 char LIVES_STOCK_LABEL_MEDIA_PAUSE[32];
905 char LIVES_STOCK_LABEL_MEDIA_RECORD[32];
906
907
908 #else
909 #define LIVES_STOCK_UNDO GTK_STOCK_UNDO
910 #define LIVES_STOCK_REDO GTK_STOCK_REDO
911 #define LIVES_STOCK_ADD GTK_STOCK_ADD
912 #define LIVES_STOCK_APPLY GTK_STOCK_APPLY
913 #define LIVES_STOCK_REMOVE GTK_STOCK_REMOVE
914 #define LIVES_STOCK_NO GTK_STOCK_NO
915 #define LIVES_STOCK_YES GTK_STOCK_YES
916 #define LIVES_STOCK_QUIT GTK_STOCK_QUIT
917 #define LIVES_STOCK_OPEN GTK_STOCK_OPEN
918 #define LIVES_STOCK_CLOSE GTK_STOCK_CLOSE
919 #define LIVES_STOCK_CANCEL GTK_STOCK_CANCEL
920 #define LIVES_STOCK_OK GTK_STOCK_OK
921 #define LIVES_STOCK_CLEAR GTK_STOCK_CLEAR
922 #define LIVES_STOCK_DELETE GTK_STOCK_DELETE
923 #define LIVES_STOCK_SAVE_AS GTK_STOCK_SAVE_AS
924 #define LIVES_STOCK_SAVE GTK_STOCK_SAVE
925 #define LIVES_STOCK_REFRESH GTK_STOCK_REFRESH
926 #define LIVES_STOCK_REVERT_TO_SAVED GTK_STOCK_REVERT_TO_SAVED
927 #define LIVES_STOCK_GO_BACK GTK_STOCK_GO_BACK
928 #define LIVES_STOCK_GO_FORWARD GTK_STOCK_GO_FORWARD
929 #define LIVES_STOCK_REFRESH GTK_STOCK_REFRESH
930 #define LIVES_STOCK_PREFERENCES GTK_STOCK_PREFERENCES
931 #define LIVES_STOCK_DIALOG_INFO GTK_STOCK_DIALOG_INFO
932 #define LIVES_STOCK_MISSING_IMAGE GTK_STOCK_MISSING_IMAGE
933
934 #define LIVES_STOCK_LABEL_CANCEL GTK_STOCK_CANCEL
935 #define LIVES_STOCK_LABEL_OK GTK_STOCK_OK
936 #define LIVES_STOCK_LABEL_OPEN GTK_STOCK_OPEN
937 #define LIVES_STOCK_LABEL_SAVE GTK_STOCK_SAVE
938 #define LIVES_STOCK_LABEL_QUIT GTK_STOCK_QUIT
939
940
941 #if GTK_CHECK_VERSION(2,6,0)
942 #define LIVES_STOCK_LABEL_MEDIA_FORWARD GTK_STOCK_MEDIA_FORWARD
943 #define LIVES_STOCK_LABEL_MEDIA_REWIND GTK_STOCK_MEDIA_REWIND
944 #define LIVES_STOCK_LABEL_MEDIA_STOP GTK_STOCK_MEDIA_STOP
945 #define LIVES_STOCK_LABEL_MEDIA_PLAY GTK_STOCK_MEDIA_PLAY
946 #define LIVES_STOCK_LABEL_MEDIA_PAUSE GTK_STOCK_MEDIA_PAUSE
947 #define LIVES_STOCK_LABEL_MEDIA_RECORD GTK_STOCK_MEDIA_RECORD
948 #else
949 #define LIVES_STOCK_LABEL_MEDIA_FORWARD GTK_STOCK_GOTO_LAST
950 #define LIVES_STOCK_LABEL_MEDIA_REWIND GTK_STOCK_GOTO_FIRST
951 #define LIVES_STOCK_LABEL_MEDIA_STOP GTK_STOCK_NO
952 #define LIVES_STOCK_LABEL_MEDIA_PLAY GTK_STOCK_GO_FORWARD
953 #define LIVES_STOCK_LABEL_MEDIA_PAUSE GTK_STOCK_REFRESH
954 #define LIVES_STOCK_LABEL_MEDIA_RECORD GTK_STOCK_NO
955 #endif
956
957
958 #if GTK_CHECK_VERSION(2,6,0)
959 #define LIVES_STOCK_MEDIA_PAUSE GTK_STOCK_MEDIA_PAUSE
960 #else
961 #define LIVES_STOCK_MEDIA_PAUSE GTK_STOCK_REFRESH
962 #endif
963
964 #if GTK_CHECK_VERSION(2,6,0)
965 #define LIVES_STOCK_MEDIA_PLAY GTK_STOCK_MEDIA_PLAY
966 #else
967 #define LIVES_STOCK_MEDIA_PLAY GTK_STOCK_GO_FORWARD
968 #endif
969 #if GTK_CHECK_VERSION(2,6,0)
970 #define LIVES_STOCK_MEDIA_STOP GTK_STOCK_MEDIA_STOP
971 #else
972 #define LIVES_STOCK_MEDIA_STOP GTK_STOCK_STOP
973 #endif
974 #if GTK_CHECK_VERSION(2,6,0)
975 #define LIVES_STOCK_MEDIA_REWIND GTK_STOCK_MEDIA_REWIND
976 #else
977 #define LIVES_STOCK_MEDIA_REWIND GTK_STOCK_GOTO_FIRST
978 #endif
979 #if GTK_CHECK_VERSION(2,6,0)
980 #define LIVES_STOCK_MEDIA_FORWARD GTK_STOCK_MEDIA_FORWARD
981 #else
982 #define LIVES_STOCK_MEDIA_FORWARD GTK_STOCK_GOTO_LAST
983 #endif
984 #if GTK_CHECK_VERSION(2,6,0)
985 #define LIVES_STOCK_MEDIA_RECORD GTK_STOCK_MEDIA_RECORD
986 #else
987 #define LIVES_STOCK_MEDIA_RECORD GTK_STOCK_NO
988 #endif
989
990 #endif
991
992
993 #define LIVES_CONTROL_MASK GDK_CONTROL_MASK
994 #define LIVES_ALT_MASK GDK_MOD1_MASK
995 #define LIVES_SHIFT_MASK GDK_SHIFT_MASK
996 #define LIVES_LOCK_MASK GDK_LOCK_MASK
997
998 #ifdef GDK_KEY_a
999 #define LIVES_KEY_Left GDK_KEY_Left
1000 #define LIVES_KEY_Right GDK_KEY_Right
1001 #define LIVES_KEY_Up GDK_KEY_Up
1002 #define LIVES_KEY_Down GDK_KEY_Down
1003
1004 #define LIVES_KEY_BackSpace GDK_KEY_BackSpace
1005 #define LIVES_KEY_Return GDK_KEY_Return
1006 #define LIVES_KEY_Tab GDK_KEY_Tab
1007 #define LIVES_KEY_Home GDK_KEY_Home
1008 #define LIVES_KEY_End GDK_KEY_End
1009 #define LIVES_KEY_Slash GDK_KEY_slash
1010 #define LIVES_KEY_Space GDK_KEY_space
1011 #define LIVES_KEY_Plus GDK_KEY_plus
1012 #define LIVES_KEY_Minus GDK_KEY_minus
1013 #define LIVES_KEY_Equal GDK_KEY_equal
1014
1015 #define LIVES_KEY_1 GDK_KEY_1
1016 #define LIVES_KEY_2 GDK_KEY_2
1017 #define LIVES_KEY_3 GDK_KEY_3
1018 #define LIVES_KEY_4 GDK_KEY_4
1019 #define LIVES_KEY_5 GDK_KEY_5
1020 #define LIVES_KEY_6 GDK_KEY_6
1021 #define LIVES_KEY_7 GDK_KEY_7
1022 #define LIVES_KEY_8 GDK_KEY_8
1023 #define LIVES_KEY_9 GDK_KEY_9
1024 #define LIVES_KEY_0 GDK_KEY_0
1025
1026 #define LIVES_KEY_a GDK_KEY_a
1027 #define LIVES_KEY_b GDK_KEY_b
1028 #define LIVES_KEY_c GDK_KEY_c
1029 #define LIVES_KEY_d GDK_KEY_d
1030 #define LIVES_KEY_e GDK_KEY_e
1031 #define LIVES_KEY_f GDK_KEY_f
1032 #define LIVES_KEY_g GDK_KEY_g
1033 #define LIVES_KEY_h GDK_KEY_h
1034 #define LIVES_KEY_i GDK_KEY_i
1035 #define LIVES_KEY_j GDK_KEY_j
1036 #define LIVES_KEY_k GDK_KEY_k
1037 #define LIVES_KEY_l GDK_KEY_l
1038 #define LIVES_KEY_m GDK_KEY_m
1039 #define LIVES_KEY_n GDK_KEY_n
1040 #define LIVES_KEY_o GDK_KEY_o
1041 #define LIVES_KEY_p GDK_KEY_p
1042 #define LIVES_KEY_q GDK_KEY_q
1043 #define LIVES_KEY_r GDK_KEY_r
1044 #define LIVES_KEY_s GDK_KEY_s
1045 #define LIVES_KEY_t GDK_KEY_t
1046 #define LIVES_KEY_u GDK_KEY_u
1047 #define LIVES_KEY_v GDK_KEY_v
1048 #define LIVES_KEY_w GDK_KEY_w
1049 #define LIVES_KEY_x GDK_KEY_x
1050 #define LIVES_KEY_y GDK_KEY_y
1051 #define LIVES_KEY_z GDK_KEY_z
1052
1053 #define LIVES_KEY_F1 GDK_KEY_F1
1054 #define LIVES_KEY_F2 GDK_KEY_F2
1055 #define LIVES_KEY_F3 GDK_KEY_F3
1056 #define LIVES_KEY_F4 GDK_KEY_F4
1057 #define LIVES_KEY_F5 GDK_KEY_F5
1058 #define LIVES_KEY_F6 GDK_KEY_F6
1059 #define LIVES_KEY_F7 GDK_KEY_F7
1060 #define LIVES_KEY_F8 GDK_KEY_F8
1061 #define LIVES_KEY_F9 GDK_KEY_F9
1062 #define LIVES_KEY_F10 GDK_KEY_F10
1063 #define LIVES_KEY_F11 GDK_KEY_F11
1064 #define LIVES_KEY_F12 GDK_KEY_F12
1065
1066 #define LIVES_KEY_Page_Up GDK_KEY_Page_Up
1067 #define LIVES_KEY_Page_Down GDK_KEY_Page_Down
1068
1069 #define LIVES_KEY_Escape GDK_KEY_Escape
1070
1071 #else
1072 #define LIVES_KEY_Left GDK_Left
1073 #define LIVES_KEY_Right GDK_Right
1074 #define LIVES_KEY_Up GDK_Up
1075 #define LIVES_KEY_Down GDK_Down
1076
1077 #define LIVES_KEY_BackSpace GDK_BackSpace
1078 #define LIVES_KEY_Return GDK_Return
1079 #define LIVES_KEY_Tab GDK_Tab
1080 #define LIVES_KEY_Home GDK_Home
1081 #define LIVES_KEY_End GDK_End
1082 #define LIVES_KEY_Slash GDK_slash
1083 #define LIVES_KEY_Space GDK_space
1084 #define LIVES_KEY_Plus GDK_plus
1085 #define LIVES_KEY_Minus GDK_minus
1086 #define LIVES_KEY_Equal GDK_equal
1087
1088 #define LIVES_KEY_1 GDK_1
1089 #define LIVES_KEY_2 GDK_2
1090 #define LIVES_KEY_3 GDK_3
1091 #define LIVES_KEY_4 GDK_4
1092 #define LIVES_KEY_5 GDK_5
1093 #define LIVES_KEY_6 GDK_6
1094 #define LIVES_KEY_7 GDK_7
1095 #define LIVES_KEY_8 GDK_8
1096 #define LIVES_KEY_9 GDK_9
1097 #define LIVES_KEY_0 GDK_0
1098
1099 #define LIVES_KEY_a GDK_a
1100 #define LIVES_KEY_b GDK_b
1101 #define LIVES_KEY_c GDK_c
1102 #define LIVES_KEY_d GDK_d
1103 #define LIVES_KEY_e GDK_e
1104 #define LIVES_KEY_f GDK_f
1105 #define LIVES_KEY_g GDK_g
1106 #define LIVES_KEY_h GDK_h
1107 #define LIVES_KEY_i GDK_i
1108 #define LIVES_KEY_j GDK_j
1109 #define LIVES_KEY_k GDK_k
1110 #define LIVES_KEY_l GDK_l
1111 #define LIVES_KEY_m GDK_m
1112 #define LIVES_KEY_n GDK_n
1113 #define LIVES_KEY_o GDK_o
1114 #define LIVES_KEY_p GDK_p
1115 #define LIVES_KEY_q GDK_q
1116 #define LIVES_KEY_r GDK_r
1117 #define LIVES_KEY_s GDK_s
1118 #define LIVES_KEY_t GDK_t
1119 #define LIVES_KEY_u GDK_u
1120 #define LIVES_KEY_v GDK_v
1121 #define LIVES_KEY_w GDK_w
1122 #define LIVES_KEY_x GDK_x
1123 #define LIVES_KEY_y GDK_y
1124 #define LIVES_KEY_z GDK_z
1125
1126 #define LIVES_KEY_F1 GDK_F1
1127 #define LIVES_KEY_F2 GDK_F2
1128 #define LIVES_KEY_F3 GDK_F3
1129 #define LIVES_KEY_F4 GDK_F4
1130 #define LIVES_KEY_F5 GDK_F5
1131 #define LIVES_KEY_F6 GDK_F6
1132 #define LIVES_KEY_F7 GDK_F7
1133 #define LIVES_KEY_F8 GDK_F8
1134 #define LIVES_KEY_F9 GDK_F9
1135 #define LIVES_KEY_F10 GDK_F10
1136 #define LIVES_KEY_F11 GDK_F11
1137 #define LIVES_KEY_F12 GDK_F12
1138
1139 #define LIVES_KEY_Page_Up GDK_Page_Up
1140 #define LIVES_KEY_Page_Down GDK_Page_Down
1141
1142 #define LIVES_KEY_Escape GDK_Escape
1143
1144 #endif
1145
1146 #define LIVES_INT_TO_POINTER GINT_TO_POINTER
1147 #define LIVES_UINT_TO_POINTER GUINT_TO_POINTER
1148 #define LIVES_POINTER_TO_INT GPOINTER_TO_INT
1149
1150 // pango stuff
1151 typedef PangoLayout LingoLayout;
1152 #define lingo_layout_set_alignment(a,b) pango_layout_set_alignment(a,b)
1153
1154 #define LINGO_ALIGN_LEFT PANGO_ALIGN_LEFT
1155 #define LINGO_ALIGN_RIGHT PANGO_ALIGN_RIGHT
1156 #define LINGO_ALIGN_CENTER PANGO_ALIGN_CENTER
1157
1158 #define lingo_layout_set_text(a,b,c) pango_layout_set_text(a,b,c)
1159 #define lingo_painter_show_layout(a,b) pango_cairo_show_layout(a,b)
1160
1161 #define lingo_layout_get_size(a,b,c,d,e) pango_layout_get_size(a,b,c)
1162
1163 #define LINGO_SCALE PANGO_SCALE
1164
1165 #endif
1166
1167
1168 #endif
support.h
boolean
int boolean
Definition: videoplugin.h:50
lives_painter_surface_destroy
LIVES_INLINE boolean lives_painter_surface_destroy(lives_painter_surface_t *surf)
Definition: widget-helper.c:186