1 // widget-helper-gtk.h 2 // LiVES 3 // (c) G. Finch 2012 - 2019 <salsaman+lives@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 #ifdef ENABLE_GIW_3 15 #include "giw/giwtimeline.h" 16 #endif 17 18 #ifdef ENABLE_GIW 19 #include "giw/giwvslider.h" 20 #include "giw/giwled.h" 21 #endif 22 23 // a bug where gtk_radio_menu_item_set_active() does not update visually 24 // workaround: use check menuitems and update manually 25 #define GTK_RADIO_MENU_BUG 26 27 // a bug where setting a menuitem insensitive fails if it has a submenu 28 // workaround: (?) unparent submenu, change its state, reparent it 29 // not a bug, was setting menu instead of menuitem (or vice-versa ?) 30 #define GTK_SUBMENU_SENS_BUG 31 32 // a bug where textview crashes if too much text in it (maybe not a bug, was missing expose function ?) 33 #define GTK_TEXT_VIEW_DRAW_BUG 34 35 #if !GTK_CHECK_VERSION(3, 18, 9) // fixed version 36 // a bug where named textviews cannot be set by CSS: (res. not a bug, need to set the "text" node) 37 #define GTK_TEXT_VIEW_CSS_BUG 38 #endif 39 40 #if GTK_CHECK_VERSION(3, 16, 0) 41 #define USE_SPECIAL_BUTTONS 42 #endif 43 44 #define COMBO_LIST_LIMIT 256 // if we get a combo longer than this, we use a tree store 45 46 #ifndef IS_MINGW 47 typedef gboolean boolean; 48 #else 49 50 #ifdef GDK_WINDOWING_WIN32 51 #include <gdk/gdkwin32.h> 52 53 #ifndef GDK_IS_WIN32_DISPLAY 54 #define GDK_IS_WIN32_DISPLAY(display) (TRUE) 55 #endif 56 57 typedef uint8_t boolean; 58 59 #endif //GDK_WINDOWING_WIN32 60 61 #endif // IS_MINGW 62 63 #ifdef GDK_WINDOWING_X11 64 65 // needed for GDK_WINDOW_XID - for fileselector preview 66 // needed for gdk_x11_screen_get_window_manager_name() 67 68 #include <gdk/gdkx.h> 69 70 #ifndef GDK_IS_X11_DISPLAY 71 #define GDK_IS_X11_DISPLAY(display) (TRUE) 72 #endif 73 74 #ifndef GDK_IS_WIN32_DISPLAY 75 #define GDK_IS_WIN32_DISPLAY(display) (FALSE) 76 #endif 77 78 #define LIVES_XWINDOW_XID(z) GDK_WINDOW_XID(z) 79 80 #else 81 82 #ifndef GDK_IS_X11_DISPLAY 83 #define GDK_IS_X11_DISPLAY(display) (FALSE) 84 #endif 85 86 #define LIVES_XWINDOW_XID(z) (z) 87 88 #endif // GDK_WINDOWING_X11 89 90 #endif // GUI_GTK 91 92 #ifdef GUI_GTK 93 94 /// custom tweaks 95 #define PROGBAR_IS_ENTRY 1 96 97 /// Glib type stuff ////////////////////////////////////////// 98 #ifndef G_ENCODE_VERSION 99 #define G_ENCODE_VERSION(major, minor) ((major) << 16 | (minor) << 8) 100 #endif 101 102 typedef GMainContext LiVESWidgetContext; 103 typedef GMainLoop LiVESWidgetLoop; 104 105 typedef GError LiVESError; 106 107 typedef GList LiVESList; 108 typedef GSList LiVESSList; 109 110 typedef gpointer livespointer; 111 typedef gconstpointer livesconstpointer; 112 113 typedef GClosure LiVESWidgetClosure; 114 typedef GCClosure LiVESWidgetCClosure; 115 116 //typedef GObject LiVESWidgetObject; 117 typedef GObject LiVESWidgetObject; 118 119 typedef GLogLevelFlags LiVESLogLevelFlags; 120 121 #define LIVES_LOG_LEVEL_MASK G_LOG_LEVEL_MASK 122 #define LIVES_LOG_FATAL_MASK G_LOG_FATAL_MASK 123 124 #define LIVES_LOG_FLAG_FATAL G_LOG_FLAG_FATAL ///< glib internal flag 125 #define LIVES_LOG_FLAG_RECURSION G_LOG_FLAG_RECURSION ///< glib internal flag 126 127 #define LIVES_LOG_LEVEL_FATAL G_LOG_LEVEL_ERROR 128 #define LIVES_LOG_LEVEL_CRITICAL G_LOG_LEVEL_CRITICAL 129 #define LIVES_LOG_LEVEL_WARNING G_LOG_LEVEL_WARNING 130 #define LIVES_LOG_LEVEL_MESSAGE G_LOG_LEVEL_MESSAGE 131 #define LIVES_LOG_LEVEL_INFO G_LOG_LEVEL_INFO 132 #define LIVES_LOG_LEVEL_DEBUG G_LOG_LEVEL_DEBUG 133 134 ////////////////////////////////////////////////// 135 136 #if GTK_CHECK_VERSION(3, 10, 0) 137 #define LIVES_TABLE_IS_GRID 1 138 #endif 139 140 #define LIVES_ACCEL_PATH_QUIT "<LiVES>/quit" 141 #define LIVES_ACCEL_PATH_SAVE "<LiVES>/save" 142 143 #define return_true gtk_true 144 145 typedef void (*LiVESGuiCallback)(void); 146 typedef void (*LiVESWidgetCallback)(GtkWidget *widget, gpointer data); 147 typedef gboolean(*LiVESWidgetSourceFunc)(gpointer data); 148 typedef gint(*LiVESCompareFunc)(gconstpointer a, gconstpointer b); 149 150 #define LIVES_LITTLE_ENDIAN G_LITTLE_ENDIAN 151 #define LIVES_BIG_ENDIAN G_BIG_ENDIAN 152 153 #define LIVES_MAXINT G_MAXINT 154 #define LIVES_MAXUINT32 G_MAXUINT32 155 #define LIVES_MAXINT32 G_MAXINT32 156 #define LIVES_MAXUINT64 G_MAXUINT64 157 #define LIVES_MAXINT64 G_MAXINT64 158 #define LIVES_MAXSIZE G_MAXSIZE 159 #define LIVES_MAXFLOAT G_MAXFLOAT 160 #define LIVES_MAXDOUBLE G_MAXDOUBLE 161 162 #define LIVES_IS_RTL (gtk_widget_get_default_direction() == GTK_TEXT_DIR_RTL) 163 164 #define LIVES_GUI_CALLBACK(f) ((LiVESGuiCallback) (f)) 165 166 #define lives_widget_context_new() g_main_context_new() 167 #define lives_widget_context_unref(ctx) g_main_context_unref(ctx) 168 #define lives_widget_context_get_thread_default() g_main_context_get_thread_default() 169 #define lives_widget_context_default() g_main_context_default() 170 #define lives_widget_context_push_thread_default(ctx) g_main_context_push_thread_default(ctx) 171 #define lives_widget_context_pop_thread_default(ctx) g_main_context_pop_thread_default(ctx) 172 #define lives_widget_context_invoke(ctx, func, arg) g_main_context_invoke(ctx, func, arg) 173 #define lives_widget_context_iteration(ctx, block) g_main_context_iteration(ctx, block) 174 #define lives_widget_context_pending(ctx) g_main_context_pending(ctx) 175 #define lives_widgets_get_current_event() gtk_get_current_event() 176 177 #define lives_idle_add_simple(func, data) g_idle_add(func, data) 178 #if GTK_CHECK_VERSION(3, 0, 0) 179 #define lives_timer_add_simple(interval, func, data) (interval < 1000 ? g_timeout_add(interval, func, data) \ 180 : g_timeout_add_seconds(interval / 1000., func, data)) 181 #else 182 #define lives_timer_add_simple(interval, func, data) g_timeout_add(interval, func, data) 183 #endif 184 185 #define lives_markup_escape_text(a, b) g_markup_escape_text(a, b) 186 #define lives_markup_printf_escaped(...) g_markup_printf_escaped(__VA_ARGS__) 187 188 #define lives_printerr(...) g_printerr(__VA_ARGS__) 189 #define lives_strdup_printf(...) g_strdup_printf(__VA_ARGS__) 190 #define lives_strdup_free(a, ...) (lives_free_and_return((a)) ? NULL : lives_strdup(__VA_ARGS__)) 191 #define lives_strdup_printf_free(a, ...) (lives_free_and_return((a)) ? NULL : lives_strdup_printf(__VA_ARGS__)) 192 #define lives_strdup_vprintf(...) g_strdup_vprintf(__VA_ARGS__) 193 #define lives_strndup(a, b) g_strndup(a, b) 194 #define lives_snprintf(a, b, ...) g_snprintf(a, b, __VA_ARGS__) 195 #define lives_strsplit(a, b, c) g_strsplit(a, b, c) 196 #define lives_strfreev(a) g_strfreev(a) 197 #define lives_strdup(a) g_strdup(a) 198 #define lives_ascii_strup(a, b) g_ascii_strup(a, b) 199 #define lives_ascii_strcasecmp(a, b) g_ascii_strcasecmp(a, b) 200 #define lives_ascii_strncasecmp(a, b, c) g_ascii_strncasecmp(a, b, c) 201 #define lives_strconcat(a, ...) g_strconcat(a, __VA_ARGS__) 202 #define lives_strstrip(a) g_strstrip(a) 203 #define lives_strrstr(a, b) g_strrstr(a, b) 204 #define lives_strstr_len(a, b, c) g_strstr_len(a, b, c) 205 #define lives_strdelimit(a, b, c) g_strdelimit(a, b, c) 206 207 #define lives_utf8_collate(a, b) g_utf8_collate(a, b) 208 #define lives_utf8_collate_key(a, b) g_utf8_collate_key(a, b) 209 #define lives_utf8_casefold(a, b) g_utf8_casefold(a, b) 210 211 #define lives_list_nth_data(list, i) g_list_nth_data(list, i) 212 #define lives_list_nth(list, i) g_list_nth(list, i) 213 #define lives_list_length(list) g_list_length(list) 214 #define lives_list_free(list) g_list_free(list) 215 #define _lives_list_free g_list_free 216 #define lives_list_append(list, data) g_list_append(list, data) 217 #define lives_list_prepend(list, data) g_list_prepend(list, data) 218 #define lives_list_find(list, data) g_list_find(list, data) 219 #define lives_list_previous(list) g_list_previous(list) 220 #define lives_list_last(list) g_list_last(list) 221 #define lives_list_delete_link(list, link) g_list_delete_link(list, link) 222 #define lives_list_copy(list) g_list_copy(list) 223 #define lives_list_next(list) g_list_next(list) 224 #define lives_list_first(list) g_list_first(list) 225 #define lives_list_reverse(list) g_list_reverse(list) 226 #define lives_list_remove(list, data) g_list_remove(list, data) 227 #define lives_list_remove_link(list, data) g_list_remove_link(list, data) 228 #define lives_list_concat(list, data) g_list_concat(list, data) 229 #define lives_list_insert(list, data, pos) g_list_insert(list, data, pos) 230 #define lives_list_index(list, data) g_list_index(list, data) 231 #define lives_list_sort(list, cmp_func) g_list_sort(list, cmp_func) 232 #define lives_list_sort_with_data(list, cmp_func, userdata) g_list_sort_with_data(list, cmp_func, userdata) 233 #define lives_list_find_custom(list, data, func) g_list_find_custom(list, data, func) 234 235 #define lives_slist_free(list) g_slist_free(list) 236 #define lives_slist_length(list) g_slist_length(list) 237 #define lives_slist_nth_data(list, i) g_slist_nth_data(list, i) 238 #define lives_slist_append(list, data) g_slist_append(list, data) 239 #define lives_slist_prepend(list, data) g_slist_prepend(list, data) 240 241 #define lives_build_filename(...) g_build_filename(__VA_ARGS__) 242 #define lives_build_path(...) g_build_path(LIVES_DIR_SEP, __VA_ARGS__) 243 #define lives_filename_to_utf8(a, b, c, d, e) g_filename_to_utf8(a, b, c, d, e) 244 #define lives_filename_from_utf8(a, b, c, d, e) g_filename_from_utf8(a, b, c, d, e) 245 246 #define lives_utf8_strdown(a, b) g_utf8_strdown(a, b) 247 #define lives_utf8_strup(a, b) g_utf8_strup(a, b) 248 249 #define lives_find_program_in_path(a) g_find_program_in_path(a) 250 251 #define lives_set_application_name(a) g_set_application_name(a) 252 #define lives_get_application_name() g_get_application_name() 253 254 #define lives_usleep(a) g_usleep(a) 255 256 #define lives_mkdir_with_parents(a, b) g_mkdir_with_parents(a, b) 257 258 #define lives_strtod(a, b) g_strtod(a, b) 259 260 #define lives_path_get_basename(a) g_path_get_basename(a) 261 262 #define LIVES_UNLIKELY(a) G_UNLIKELY(a) 263 #define LIVES_LIKELY(a) G_LIKELY(a) 264 265 #define lives_file_test(a, b) g_file_test(a, b) 266 267 #define lives_get_current_dir() g_get_current_dir() 268 269 #define lives_error_free(a) g_error_free(a) 270 271 #define lives_strerror(a) g_strerror(a) 272 273 #define lives_cclosure_new(a, b, c) g_cclosure_new(a, b, c) 274 275 #define lives_path_get_dirname(a) g_path_get_dirname(a) 276 277 #ifndef lives_locale_to_utf8 278 #define lives_locale_to_utf8(a, b, c, d, e) g_locale_to_utf8(a, b, c, d, e) 279 #endif 280 281 #define lives_charset_convert(String, from, to) (g_convert(String, -1, from, to, NULL, NULL, NULL)) 282 283 #define U82L(String) (g_locale_from_utf8(String, -1, NULL, NULL, NULL)) 284 #define L2U8(String) (g_locale_to_utf8(String, -1, NULL, NULL, NULL)) 285 286 #define U82F(String) (g_filename_from_utf8(String, -1, NULL, NULL, NULL)) 287 #define F2U8(String) (g_filename_to_utf8(String, -1, NULL, NULL, NULL)) 288 289 #define LIVES_FILE_TEST_EXISTS G_FILE_TEST_EXISTS 290 #define LIVES_FILE_TEST_IS_DIR G_FILE_TEST_IS_DIR 291 #define LIVES_FILE_TEST_IS_REGULAR G_FILE_TEST_IS_REGULAR 292 #define LIVES_FILE_TEST_IS_SYMLINK G_FILE_TEST_IS_SYMLINK 293 #define LIVES_FILE_TEST_IS_EXECUTABLE G_FILE_TEST_IS_EXECUTABLE 294 295 typedef GtkJustification LiVESJustification; 296 297 #define LIVES_JUSTIFY_START GTK_JUSTIFY_LEFT 298 #define LIVES_JUSTIFY_END GTK_JUSTIFY_RIGHT 299 #define LIVES_JUSTIFY_CENTER GTK_JUSTIFY_CENTER 300 #define LIVES_JUSTIFY_FILL GTK_JUSTIFY_RIGHT 301 302 typedef GtkOrientation LiVESOrientation; 303 #define LIVES_ORIENTATION_HORIZONTAL GTK_ORIENTATION_HORIZONTAL 304 #define LIVES_ORIENTATION_VERTICAL GTK_ORIENTATION_VERTICAL 305 306 typedef GdkEvent LiVESXEvent; 307 typedef GdkXEvent LiVESXXEvent; 308 typedef GdkEventButton LiVESXEventButton; 309 typedef GdkEventMotion LiVESXEventMotion; 310 typedef GdkEventScroll LiVESXEventScroll; 311 typedef GdkEventExpose LiVESXEventExpose; 312 typedef GdkEventCrossing LiVESXEventCrossing; 313 typedef GdkEventConfigure LiVESXEventConfigure; 314 typedef GdkEventFocus LiVESXEventFocus; 315 typedef GdkEventKey LiVESXEventKey; 316 typedef GdkEvent LiVESXEventDelete; 317 typedef GdkDisplay LiVESXDisplay; 318 typedef GdkScreen LiVESXScreen; 319 #if GTK_CHECK_VERSION(3, 22, 0) 320 typedef GdkMonitor LiVESXMonitor; 321 #endif 322 typedef GdkDevice LiVESXDevice; 323 324 #define LIVES_KEY_RELEASE GDK_KEY_RELEASE 325 #define LIVES_KEY_PRESS GDK_KEY_PRESS 326 327 #define LiVESScrollDirection GdkScrollDirection 328 #define LIVES_SCROLL_UP GDK_SCROLL_UP 329 #define LIVES_SCROLL_DOWN GDK_SCROLL_DOWN 330 331 #if GTK_CHECK_VERSION(3, 0, 0) 332 #undef LIVES_HAS_DEVICE_MANAGER 333 #define LIVES_HAS_DEVICE_MANAGER 1 334 typedef GdkDeviceManager LiVESXDeviceManager; 335 #endif 336 337 #if GTK_CHECK_VERSION(3, 0, 0) 338 #if GTK_CHECK_VERSION(4, 0, 0) 339 // gtk+ 4 340 #define EXPOSE_FN_DECL(fn, widget, user_data) \ 341 boolean fn(LiVESWidget *widget, \lives_painter_t *cairo, int width, int height, livespointer user_data) \ 342 {LiVESXEventExpose *event = NULL; (void)event; // avoid compiler warnings 343 344 #define EXPOSE_FN_PAINTER 345 #define EXPOSE_FN_PROTOTYPE(fn) boolean fn(LiVESWidget *, lives_painter_t *, int, int, livespointer); 346 347 #else 348 // gtk+ 3 349 350 #define EXPOSE_FN_DECL(fn, widget, user_data) \ 351 boolean fn(LiVESWidget *widget, lives_painter_t *cairo, livespointer user_data) {LiVESXEventExpose *event = NULL; (void)event; 352 353 #define EXPOSE_FN_PAINTER 354 #define EXPOSE_FN_PROTOTYPE(fn) boolean fn(LiVESWidget *, lives_painter_t *, livespointer); 355 #endif 356 357 #else 358 // gtk+ 2 359 360 #define EXPOSE_FN_DECL(fn, widget, user_data) boolean fn(LiVESWidget *widget, LiVESXEventExpose *event, \ 361 livespointer user_data) {lives_painter_t *cairo = NULL; 362 363 #define EXPOSE_FN_EVENT 364 #define EXPOSE_FN_PROTOTYPE(fn) boolean fn(LiVESWidget *, LiVESXEventExpose *, livespointer); 365 #endif 366 367 #define EXPOSE_FN_END } 368 369 #if GTK_CHECK_VERSION(3, 0, 0) 370 #if GTK_CHECK_VERSION(4, 0, 0) 371 #define LIVES_WIDGET_EXPOSE_EVENT "snapshot" 372 #else 373 #define LIVES_WIDGET_EXPOSE_EVENT "draw" 374 #endif 375 #define LIVES_GUI_OBJECT(a) a 376 #else 377 #define LIVES_GUI_OBJECT(a) GTK_OBJECT(a) 378 #define LIVES_GUI_OBJECT_CLASS(a) GTK_OBJECT_CLASS(a) 379 #define LIVES_WIDGET_EXPOSE_EVENT "expose_event" 380 #endif 381 382 #define lives_widget_object_set_data(a, b, c) g_object_set_data(a, b, c) 383 #define lives_widget_object_set_data_full(a, b, c, d) g_object_set_data_full(a, b, c, d) 384 #define lives_widget_object_get_data(a, b) g_object_get_data(a, b) 385 #define lives_widget_object_steal_data(a, b) g_object_steal_data(a, b) 386 387 #define lives_widget_object_set(a, b, c) g_object_set(a, b, c, NULL) 388 #define lives_widget_object_get(a, b, c) g_object_get(a, b, c, NULL) 389 390 #define LIVES_WIDGET_OBJECT(a) G_OBJECT(a) 391 392 #define lives_widget_object_freeze_notify(a) g_object_freeze_notify(a) 393 #define lives_widget_object_thaw_notify(a) g_object_thaw_notify(a) 394 395 #if GTK_CHECK_VERSION(3, 0, 0) 396 #define NO_MEM_OVERRIDE TRUE 397 #else 398 #define NO_MEM_OVERRIDE g_mem_is_system_malloc() 399 #endif 400 401 typedef GMemVTable LiVESMemVTable; 402 typedef GIOChannel LiVESIOChannel; 403 404 typedef GtkTargetEntry LiVESTargetEntry; 405 406 typedef GdkFilterReturn LiVESFilterReturn; 407 408 #define LIVES_FILTER_REMOVE GDK_FILTER_REMOVE 409 #define LIVES_FILTER_CONTINUE GDK_FILTER_CONTINUE 410 411 typedef GtkIconTheme LiVESIconTheme; 412 413 // events 414 #define LIVES_WIDGET_EVENT "event" 415 #define LIVES_WIDGET_SCROLL_EVENT "scroll-event" 416 #define LIVES_WIDGET_CONFIGURE_EVENT "configure-event" 417 #define LIVES_WIDGET_ENTER_EVENT "enter-notify-event" 418 #define LIVES_WIDGET_BUTTON_PRESS_EVENT "button-press-event" 419 #define LIVES_WIDGET_BUTTON_RELEASE_EVENT "button-release-event" 420 #define LIVES_WIDGET_MOTION_NOTIFY_EVENT "motion-notify-event" 421 #define LIVES_WIDGET_LEAVE_NOTIFY_EVENT "leave-notify-event" 422 #define LIVES_WIDGET_FOCUS_IN_EVENT "focus-in-event" 423 #define LIVES_WIDGET_FOCUS_OUT_EVENT "focus-out-event" 424 #define LIVES_WIDGET_DELETE_EVENT "delete-event" 425 #define LIVES_WIDGET_KEY_PRESS_EVENT "key-press-event" 426 #define LIVES_WIDGET_KEY_RELEASE_EVENT "key-release-event" 427 428 // signals 429 #define LIVES_WIDGET_DESTROY_SIGNAL "destroy" 430 #define LIVES_WIDGET_CLICKED_SIGNAL "clicked" 431 #define LIVES_WIDGET_TOGGLED_SIGNAL "toggled" 432 #define LIVES_WIDGET_CHANGED_SIGNAL "changed" 433 #define LIVES_WIDGET_ACTIVATE_SIGNAL "activate" 434 #define LIVES_WIDGET_VALUE_CHANGED_SIGNAL "value-changed" 435 #define LIVES_WIDGET_SELECTION_CHANGED_SIGNAL "selection-changed" 436 #define LIVES_WIDGET_CURRENT_FOLDER_CHANGED_SIGNAL "current-folder-changed" 437 #define LIVES_WIDGET_RESPONSE_SIGNAL "response" 438 #define LIVES_WIDGET_DRAG_DATA_RECEIVED_SIGNAL "drag-data-received" 439 #define LIVES_WIDGET_SIZE_PREPARED_SIGNAL "size-prepared" 440 #define LIVES_WIDGET_MODE_CHANGED_SIGNAL "mode-changed" 441 #define LIVES_WIDGET_SWITCH_PAGE_SIGNAL "switch-page" 442 #define LIVES_WIDGET_UNMAP_SIGNAL "unmap" 443 #define LIVES_WIDGET_EDITED_SIGNAL "edited" 444 #define LIVES_WIDGET_ROW_EXPANDED_SIGNAL "row-expanded" 445 #define LIVES_WIDGET_COLOR_SET_SIGNAL "color-set" 446 #define LIVES_WIDGET_SET_FOCUS_CHILD_SIGNAL "set-focus-child" 447 #define LIVES_WIDGET_SHOW_SIGNAL "show" 448 #define LIVES_WIDGET_HIDE_SIGNAL "hide" 449 #define LIVES_WIDGET_FONT_SET_SIGNAL "font-set" 450 451 #if GTK_CHECK_VERSION(3, 0, 0) 452 #define LIVES_WIDGET_STATE_CHANGED_SIGNAL "state-flags-changed" 453 #else 454 #define LIVES_WIDGET_STATE_CHANGED_SIGNAL "state-changed" 455 #endif 456 457 #define LIVES_WIDGET_NOTIFY_SIGNAL "notify::" 458 459 typedef GtkWidget LiVESWidget; 460 typedef GtkWindow LiVESWindow; 461 typedef GtkContainer LiVESContainer; 462 typedef GtkBin LiVESBin; 463 typedef GtkDialog LiVESDialog; 464 typedef GtkBox LiVESBox; 465 typedef GtkFrame LiVESFrame; 466 typedef GtkComboBox LiVESCombo; 467 typedef GtkComboBox LiVESComboBox; 468 typedef GtkButton LiVESButton; 469 typedef GtkButtonBox LiVESButtonBox; 470 471 typedef GtkTextView LiVESTextView; 472 typedef GtkTextBuffer LiVESTextBuffer; 473 typedef GtkTextMark LiVESTextMark; 474 typedef GtkTextIter LiVESTextIter; 475 476 typedef GtkEntry LiVESEntry; 477 typedef GtkEntryCompletion LiVESEntryCompletion; 478 typedef GtkRadioButton LiVESRadioButton; 479 typedef GtkSpinButton LiVESSpinButton; 480 typedef GtkColorButton LiVESColorButton; 481 typedef GtkToolButton LiVESToolButton; 482 typedef GtkLabel LiVESLabel; 483 typedef GtkImage LiVESImage; 484 typedef GtkFileChooser LiVESFileChooser; 485 #if GTK_CHECK_VERSION(3,2,0) 486 typedef GtkFontChooser LiVESFontChooser; 487 typedef GtkFontButton LiVESFontButton; 488 #endif 489 typedef GtkAlignment LiVESAlignment; 490 typedef GtkAllocation LiVESAllocation; 491 typedef GtkMenu LiVESMenu; 492 typedef GtkMenuShell LiVESMenuShell; 493 typedef GtkMenuItem LiVESMenuItem; 494 typedef GtkMenuToolButton LiVESMenuToolButton; 495 typedef GtkToggleToolButton LiVESToggleToolButton; 496 typedef GtkCheckMenuItem LiVESCheckMenuItem; 497 typedef GtkImageMenuItem LiVESImageMenuItem; 498 typedef GtkRadioMenuItem LiVESRadioMenuItem; 499 500 typedef GtkNotebook LiVESNotebook; 501 502 typedef GtkExpander LiVESExpander; 503 504 #if GTK_CHECK_VERSION(2, 20, 0) 505 #define LIVES_HAS_SPINNER_WIDGET 1 506 typedef GtkSpinner LiVESSpinner; 507 #else 508 typedef GtkWidget LiVESSpinner; 509 #endif 510 511 #ifdef PROGBAR_IS_ENTRY 512 typedef GtkEntry LiVESProgressBar; 513 #else 514 typedef GtkProgressBar LiVESProgressBar; 515 #endif 516 517 typedef GtkAboutDialog LiVESAboutDialog; 518 519 // values here are long unsigned int 520 #define LIVES_COL_TYPE_OBJECT G_TYPE_OBJECT 521 #define LIVES_COL_TYPE_STRING G_TYPE_STRING 522 #define LIVES_COL_TYPE_INT G_TYPE_INT 523 #define LIVES_COL_TYPE_UINT G_TYPE_UINT 524 #define LIVES_COL_TYPE_BOOLEAN G_TYPE_BOOLEAN 525 #define LIVES_COL_TYPE_PIXBUF GDK_TYPE_PIXBUF 526 527 typedef GtkTreeView LiVESTreeView; 528 typedef GtkTreeViewColumn LiVESTreeViewColumn; 529 530 typedef GtkTreeViewColumnSizing LiVESTreeViewColumnSizing; 531 #define LIVES_TREE_VIEW_COLUMN_GROW_ONLY GTK_TREE_VIEW_COLUMN_GROW_ONLY 532 #define LIVES_TREE_VIEW_COLUMN_AUTOSIZE GTK_TREE_VIEW_COLUMN_AUTOSIZE 533 #define LIVES_TREE_VIEW_COLUMN_FIXED GTK_TREE_VIEW_COLUMN_FIXED 534 535 #define LIVES_TREE_VIEW_COLUMN_TEXT "text" 536 #define LIVES_TREE_VIEW_COLUMN_PIXBUF "pixbuf" 537 538 typedef GtkCellRenderer LiVESCellRenderer; 539 typedef GtkTreeModel LiVESTreeModel; 540 typedef GtkTreeIter LiVESTreeIter; 541 typedef GtkTreePath LiVESTreePath; 542 typedef GtkTreeStore LiVESTreeStore; 543 typedef GtkTreeSelection LiVESTreeSelection; 544 typedef GtkListStore LiVESListStore; 545 546 typedef GtkScrolledWindow LiVESScrolledWindow; 547 typedef GtkScrollbar LiVESScrollbar; 548 typedef GtkHScrollbar LiVESHScrollbar; 549 typedef GtkToolbar LiVESToolbar; 550 typedef GtkToolItem LiVESToolItem; 551 552 #if GTK_CHECK_VERSION(2, 14, 0) 553 typedef GtkScaleButton LiVESScaleButton; 554 #else 555 typedef GtkRange LiVESScaleButton; 556 #endif 557 558 #if GTK_CHECK_VERSION(3, 2, 0) 559 typedef GtkGrid LiVESGrid; 560 #undef LIVES_HAS_GRID_WIDGET 561 #define LIVES_HAS_GRID_WIDGET 1 562 #else 563 typedef LiVESWidget LiVESGrid; 564 #endif 565 566 #if LIVES_TABLE_IS_GRID 567 typedef GtkGrid LiVESTable; 568 #else 569 typedef GtkTable LiVESTable; 570 #endif 571 572 #if GTK_CHECK_VERSION(3, 0, 0) 573 #undef LIVES_HAS_SWITCH_WIDGET 574 #define LIVES_HAS_SWITCH_WIDGET 1 575 typedef GtkSwitch LiVESSwitch; 576 typedef GtkWidget LiVESToggleButton; 577 #else 578 typedef LiVESWidget LiVESSwitch; 579 typedef GtkToggleButton LiVESToggleButton; 580 #endif 581 582 #define LiVESLayout LiVESTable 583 584 typedef GtkEditable LiVESEditable; 585 586 #if GTK_CHECK_VERSION(3, 0, 0) 587 #define LIVES_WIDGET_COLOR_HAS_ALPHA (1) 588 #define LIVES_WIDGET_COLOR_SCALE(x) (x) ///< macro to get 0. to 1. from widget colour 589 #define LIVES_WIDGET_COLOR_STRETCH(x) (x * 65535.) ///< macro to get 0. to 65535. from widget colour 590 #define LIVES_WIDGET_COLOR_SCALE_65535(x) ((double)x / 65535.) ///< macro to convert from (0. - 65535.) to widget color 591 #define LIVES_WIDGET_COLOR_SCALE_255(x) ((double)x / 255.) ///< macro to convert from (0. - 255.) to widget color 592 typedef GdkRGBA LiVESWidgetColor; ///< component values are 0. to 1. 593 594 typedef GtkStateFlags LiVESWidgetState; 595 596 #define LIVES_WIDGET_STATE_NORMAL GTK_STATE_FLAG_NORMAL // 0 597 #define LIVES_WIDGET_STATE_ACTIVE GTK_STATE_FLAG_ACTIVE // 1 598 #define LIVES_WIDGET_STATE_PRELIGHT GTK_STATE_FLAG_PRELIGHT // 2 599 #define LIVES_WIDGET_STATE_SELECTED GTK_STATE_FLAG_SELECTED // 4 600 #define LIVES_WIDGET_STATE_INSENSITIVE GTK_STATE_FLAG_INSENSITIVE // 8 601 #define LIVES_WIDGET_STATE_INCONSISTENT GTK_STATE_FLAG_INCONSISTENT // 16 602 #define LIVES_WIDGET_STATE_FOCUSED GTK_STATE_FLAG_FOCUSED // 32 603 #define LIVES_WIDGET_STATE_BACKDROP GTK_STATE_FLAG_BACKDROP // 64 604 #if GTK_CHECK_VERSION(3, 14, 0) 605 #define LIVES_WIDGET_STATE_CHECKED GTK_STATE_FLAG_CHECKED 606 #endif 607 #else 608 609 #define LIVES_WIDGET_COLOR_HAS_ALPHA (0) 610 #define LIVES_WIDGET_COLOR_SCALE(x) ((double)x/65535.) ///< macro to get 0. to 1. from widget color 611 #define LIVES_WIDGET_COLOR_STRETCH(x) (x) ///< macro to get 0 to 65535 from widget color 612 #define LIVES_WIDGET_COLOR_SCALE_65535(x) (x) ///< macro to get 0 - 65535 to widget color 613 #define LIVES_WIDGET_COLOR_SCALE_255(x) ((int)((double)x*256.+.5)) ///< macro to get 0 - 255 to widget color 614 typedef GdkColor LiVESWidgetColor; ///< component values are 0 to 65535 615 typedef GtkStateType LiVESWidgetState; 616 617 #define LIVES_WIDGET_STATE_NORMAL GTK_STATE_NORMAL 618 #define LIVES_WIDGET_STATE_ACTIVE GTK_STATE_ACTIVE 619 #define LIVES_WIDGET_STATE_PRELIGHT GTK_STATE_PRELIGHT 620 #define LIVES_WIDGET_STATE_SELECTED GTK_STATE_SELECTED 621 #define LIVES_WIDGET_STATE_INSENSITIVE GTK_STATE_INSENSITIVE 622 623 #define LIVES_WIDGET_STATE_INCONSISTENT (GTK_STATE_INSENSITIVE+1) 624 #define LIVES_WIDGET_STATE_FOCUSED (GTK_STATE_INSENSITIVE+2) 625 #define LIVES_WIDGET_STATE_BACKDROP (GTK_STATE_INSENSITIVE+3) 626 #endif 627 628 typedef int LiVESResponseType; 629 #define LIVES_RESPONSE_NONE GTK_RESPONSE_NONE 630 #define LIVES_RESPONSE_OK GTK_RESPONSE_OK // -6 631 #define LIVES_RESPONSE_CANCEL GTK_RESPONSE_CANCEL // -5 632 #define LIVES_RESPONSE_ACCEPT GTK_RESPONSE_ACCEPT // 633 #define LIVES_RESPONSE_YES GTK_RESPONSE_YES // -8 634 #define LIVES_RESPONSE_NO GTK_RESPONSE_NO // -9 635 636 // positive values for custom responses 637 #define LIVES_RESPONSE_INVALID 0 638 #define LIVES_RESPONSE_RETRY 1 639 #define LIVES_RESPONSE_ABORT 2 640 #define LIVES_RESPONSE_RESET 3 // be careful NOT to confuse this with RETRY !! 641 #define LIVES_RESPONSE_SHOW_DETAILS 4 642 #define LIVES_RESPONSE_BROWSE 5 643 644 typedef GtkAttachOptions LiVESAttachOptions; 645 #define LIVES_EXPAND GTK_EXPAND 646 #define LIVES_SHRINK GTK_SHRINK 647 #define LIVES_FILL GTK_FILL 648 649 typedef GtkPackType LiVESPackType; 650 #define LIVES_PACK_START GTK_PACK_START 651 #define LIVES_PACK_END GTK_PACK_END 652 653 typedef GtkWindowType LiVESWindowType; 654 #define LIVES_WINDOW_TOPLEVEL GTK_WINDOW_TOPLEVEL 655 #define LIVES_WINDOW_POPUP GTK_WINDOW_POPUP 656 657 typedef GtkDialogFlags LiVESDialogFlags; 658 659 typedef GtkMessageType LiVESMessageType; 660 #define LIVES_MESSAGE_INFO GTK_MESSAGE_INFO 661 #define LIVES_MESSAGE_WARNING GTK_MESSAGE_WARNING 662 #define LIVES_MESSAGE_QUESTION GTK_MESSAGE_QUESTION 663 #define LIVES_MESSAGE_ERROR GTK_MESSAGE_ERROR 664 #define LIVES_MESSAGE_OTHER GTK_MESSAGE_OTHER 665 666 typedef GtkButtonsType LiVESButtonsType; 667 #define LIVES_BUTTONS_NONE GTK_BUTTONS_NONE 668 669 typedef GtkFileChooserAction LiVESFileChooserAction; 670 #define LIVES_FILE_CHOOSER_ACTION_OPEN GTK_FILE_CHOOSER_ACTION_OPEN 671 #define LIVES_FILE_CHOOSER_ACTION_SAVE GTK_FILE_CHOOSER_ACTION_SAVE 672 #define LIVES_FILE_CHOOSER_ACTION_SELECT_FOLDER GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER 673 #define LIVES_FILE_CHOOSER_ACTION_CREATE_FOLDER GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER 674 #define LIVES_FILE_CHOOSER_ACTION_SELECT_FILE ((GtkFileChooserAction)(GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER + 1)) 675 #define LIVES_FILE_CHOOSER_ACTION_SELECT_DEVICE ((GtkFileChooserAction)(GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER + 2)) 676 677 typedef GtkIconSize LiVESIconSize; 678 #define LIVES_ICON_SIZE_INVALID GTK_ICON_SIZE_INVALID 679 #define LIVES_ICON_SIZE_MENU GTK_ICON_SIZE_MENU // 16px 680 #define LIVES_ICON_SIZE_SMALL_TOOLBAR GTK_ICON_SIZE_SMALL_TOOLBAR // 16px 681 #define LIVES_ICON_SIZE_LARGE_TOOLBAR GTK_ICON_SIZE_LARGE_TOOLBAR // 24px 682 #define LIVES_ICON_SIZE_BUTTON GTK_ICON_SIZE_BUTTON // 16px 683 #define LIVES_ICON_SIZE_DND GTK_ICON_SIZE_DND // 32px 684 #define LIVES_ICON_SIZE_DIALOG GTK_ICON_SIZE_DIALOG // 48px 685 #define LIVES_ICON_SIZE_CUSTOM 1024 686 687 // scrolledwindow policies 688 typedef GtkPolicyType LiVESPolicyType; 689 #define LIVES_POLICY_ALWAYS GTK_POLICY_ALWAYS 690 #define LIVES_POLICY_AUTOMATIC GTK_POLICY_AUTOMATIC 691 #define LIVES_POLICY_NEVER GTK_POLICY_NEVER 692 693 typedef GtkPositionType LiVESPositionType; 694 #define LIVES_POS_LEFT GTK_POS_LEFT 695 #define LIVES_POS_RIGHT GTK_POS_RIGHT 696 #define LIVES_POS_TOP GTK_POS_TOP 697 #define LIVES_POS_BOTTOM GTK_POS_BOTTOM 698 699 typedef GtkArrowType LiVESArrowType; 700 #define LIVES_ARROW_UP GTK_ARROW_UP 701 #define LIVES_ARROW_DOWN GTK_ARROW_DOWN 702 #define LIVES_ARROW_LEFT GTK_ARROW_LEFT 703 #define LIVES_ARROW_RIGHT GTK_ARROW_RIGHT 704 #define LIVES_ARROW_NONE GTK_ARROW_NONE 705 706 #if GTK_CHECK_VERSION(3, 0, 0) 707 typedef GtkAlign LiVESAlign; 708 #define LIVES_ALIGN_FILL GTK_ALIGN_FILL 709 #define LIVES_ALIGN_START GTK_ALIGN_START 710 #define LIVES_ALIGN_END GTK_ALIGN_END 711 #define LIVES_ALIGN_CENTER GTK_ALIGN_CENTER 712 #else 713 typedef int LiVESAlign; 714 #define LIVES_ALIGN_FILL 0 715 #define LIVES_ALIGN_START 1 716 #define LIVES_ALIGN_END 2 717 #define LIVES_ALIGN_CENTER 3 718 #endif 719 720 721 #if GTK_CHECK_VERSION(3, 10, 0) 722 #define LIVES_ALIGN_BASELINE GTK_ALIGN_BASELINE 723 #endif 724 725 typedef GtkWrapMode LiVESWrapMode; 726 #define LIVES_WRAP_NONE GTK_WRAP_NONE 727 //#define LIVES_WRAP_CHAR GTK_WRAP_CHAR 728 #define LIVES_WRAP_WORD GTK_WRAP_WORD 729 //#define LIVES_WRAP_WORD_CHAR GTK_WRAP_WORD_CHAR 730 731 typedef GtkReliefStyle LiVESReliefStyle; 732 #define LIVES_RELIEF_NORMAL GTK_RELIEF_NORMAL 733 #define LIVES_RELIEF_HALF GTK_RELIEF_HALF 734 #define LIVES_RELIEF_NONE GTK_RELIEF_NONE 735 736 #define LIVES_ACCEL_VISIBLE GTK_ACCEL_VISIBLE 737 738 typedef GtkToolbarStyle LiVESToolbarStyle; 739 #define LIVES_TOOLBAR_ICONS GTK_TOOLBAR_ICONS 740 #define LIVES_TOOLBAR_TEXT GTK_TOOLBAR_TEXT 741 742 typedef GtkSelectionMode LiVESSelectionMode; 743 #define LIVES_SELECTION_NONE GTK_SELECTION_NONE 744 #define LIVES_SELECTION_SINGLE GTK_SELECTION_SINGLE 745 //#define LIVES_SELECTION_BROWSE GTK_SELECTION_BROWSE 746 #define LIVES_SELECTION_MULTIPLE GTK_SELECTION_MULTIPLE 747 748 typedef GtkButtonBoxStyle LiVESButtonBoxStyle; 749 #define LIVES_BUTTONBOX_DEFAULT_STYLE GTK_BUTTONBOX_DEFAULT_STYLE 750 #define LIVES_BUTTONBOX_SPREAD GTK_BUTTONBOX_SPREAD 751 #define LIVES_BUTTONBOX_EDGE GTK_BUTTONBOX_EDGE // like SPREAD but buttons touch edges 752 #define LIVES_BUTTONBOX_START GTK_BUTTONBOX_START 753 #define LIVES_BUTTONBOX_END GTK_BUTTONBOX_END 754 #define LIVES_BUTTONBOX_CENTER GTK_BUTTONBOX_CENTER 755 #if GTK_CHECK_VERSION(3, 12, 0) 756 #define LIVES_BUTTONBOX_EXPAND GTK_BUTTONBOX_EXPAND // buttons take max size 757 #else 758 #define LIVES_BUTTONBOX_EXPAND 9999 759 #endif 760 761 typedef GdkEventMask LiVESEventMask; 762 #define LIVES_EXPOSURE_MASK GDK_EXPOSURE_MASK 763 #define LIVES_POINTER_MOTION_MASK GDK_POINTER_MOTION_MASK 764 #define LIVES_POINTER_MOTION_HINT_MASK GDK_POINTER_MOTION_HINT_MASK 765 #define LIVES_BUTTON_MOTION_MASK GDK_BUTTON_MOTION_MASK 766 #define LIVES_BUTTON1_MOTION_MASK GDK_BUTTON1_MOTION_MASK 767 #define LIVES_BUTTON2_MOTION_MASK GDK_BUTTON2_MOTION_MASK 768 #define LIVES_BUTTON3_MOTION_MASK GDK_BUTTON3_MOTION_MASK 769 #define LIVES_BUTTON_PRESS_MASK GDK_BUTTON_PRESS_MASK 770 #define LIVES_BUTTON_RELEASE_MASK GDK_BUTTON_RELEASE_MASK 771 #define LIVES_KEY_PRESS_MASK GDK_KEY_PRESS_MASK 772 #define LIVES_KEY_RELEASE_MASK GDK_KEY_RELEASE_MASK 773 #define LIVES_ENTER_NOTIFY_MASK GDK_ENTER_NOTIFY_MASK 774 #define LIVES_LEAVE_NOTIFY_MASK GDK_LEAVE_NOTIFY_MASK 775 #define LIVES_FOCUS_CHANGE_MASK GDK_FOCUS_CHANGE_MASK 776 #define LIVES_STRUCTURE_MASK GDK_STRUCTURE_MASK 777 #define LIVES_PROPERTY_CHANGE_MASK GDK_PROPERTY_CHANGE_MASK 778 #define LIVES_VISIBILITY_NOTIFY_MASK GDK_VISIBILITY_NOTIFY_MASK 779 #define LIVES_PROXIMITY_IN_MASK GDK_PROXIMITY_IN_MASK 780 #define LIVES_PROXIMITY_OUT_MASK GDK_PROXIMITY_OUT_MASK 781 #define LIVES_SUBSTRUCTURE_MASK GDK_SUBSTRUCTURE_MASK 782 #define LIVES_SCROLL_MASK GDK_SCROLL_MASK 783 784 #define LIVES_BUTTON_PRESS GDK_BUTTON_PRESS 785 #define LIVES_BUTTON_RELEASE GDK_BUTTON_RELEASE 786 #define LIVES_BUTTON2_PRESS GDK_2BUTTON_PRESS 787 788 #if GTK_CHECK_VERSION(3, 4, 0) 789 #define LIVES_TOUCH_MASK GDK_TOUCH_MASK 790 #define LIVES_SMOOTH_SCROLL_MASK GDK_SMOOTH_SCROLL_MASK 791 #else 792 #define LIVES_TOUCH_MASK 0 793 #define LIVES_SMOOTH_SCROLL_MASK 0 794 #endif 795 796 #define LIVES_ALL_EVENTS_MASK GDK_ALL_EVENTS_MASK 797 798 typedef GtkShadowType LiVESShadowType; 799 #define LIVES_SHADOW_NONE GTK_SHADOW_NONE 800 #define LIVES_SHADOW_IN GTK_SHADOW_IN 801 #define LIVES_SHADOW_OUT GTK_SHADOW_OUT 802 #define LIVES_SHADOW_ETCHED_IN GTK_SHADOW_ETCHED_IN 803 #define LIVES_SHADOW_ETCHED_OUT GTK_SHADOW_ETCHED_OUT 804 805 typedef GtkWindowPosition LiVESWindowPosition; 806 #define LIVES_WIN_POS_NONE GTK_WIN_POS_NONE 807 #define LIVES_WIN_POS_CENTER_ALWAYS GTK_WIN_POS_CENTER_ALWAYS 808 809 #if GTK_CHECK_VERSION(3, 0, 0) 810 typedef GtkScale LiVESRuler; 811 typedef GtkBox LiVESVBox; 812 typedef GtkBox LiVESHBox; 813 #else 814 typedef GtkWidget LiVESSwitch; 815 typedef GtkRuler LiVESRuler; 816 typedef GtkVBox LiVESVBox; 817 typedef GtkHBox LiVESHBox; 818 #endif 819 820 typedef GtkEventBox LiVESEventBox; 821 822 typedef GtkRange LiVESRange; 823 824 typedef GtkAdjustment LiVESAdjustment; 825 826 typedef GdkPixbuf LiVESPixbuf; 827 828 typedef GdkWindow LiVESXWindow; 829 830 typedef GdkCursor LiVESXCursor; 831 832 typedef GdkModifierType LiVESXModifierType; 833 834 typedef GtkAccelGroup LiVESAccelGroup; 835 typedef GtkAccelFlags LiVESAccelFlags; 836 837 typedef GtkRequisition LiVESRequisition; 838 839 typedef GtkPaned LiVESPaned; 840 841 typedef GtkScale LiVESScale; 842 843 typedef GdkPixbufDestroyNotify LiVESPixbufDestroyNotify; 844 typedef GDestroyNotify LiVESDestroyNotify; 845 846 typedef GdkInterpType LiVESInterpType; 847 848 #define LIVES_WIDGET(widget) GTK_WIDGET(widget) 849 #define LIVES_PIXBUF(widget) GDK_PIXBUF(widget) 850 #define LIVES_WINDOW(widget) GTK_WINDOW(widget) 851 #define LIVES_XWINDOW(widget) GDK_WINDOW(widget) 852 #define LIVES_BOX(widget) GTK_BOX(widget) 853 #define LIVES_EVENT_BOX(widget) GTK_EVENT_BOX(widget) 854 #define LIVES_ENTRY(widget) GTK_ENTRY(widget) 855 #define LIVES_FRAME(widget) GTK_FRAME(widget) 856 #define LIVES_CONTAINER(widget) GTK_CONTAINER(widget) 857 #define LIVES_BIN(widget) GTK_BIN(widget) 858 #define LIVES_ADJUSTMENT(widget) GTK_ADJUSTMENT(widget) 859 #define LIVES_DIALOG(widget) GTK_DIALOG(widget) 860 #define LIVES_SCALE(widget) GTK_SCALE(widget) 861 #define LIVES_PANED(widget) GTK_PANED(widget) 862 #define LIVES_COMBO(widget) GTK_COMBO_BOX(widget) 863 #define LIVES_COMBO_BOX(widget) GTK_COMBO_BOX(widget) 864 #define LIVES_BUTTON(widget) GTK_BUTTON(widget) 865 #define LIVES_BUTTON_BOX(widget) GTK_BUTTON_BOX(widget) 866 #define LIVES_LABEL(widget) GTK_LABEL(widget) 867 #define LIVES_ALIGNMENT(widget) GTK_ALIGNMENT(widget) 868 #define LIVES_FILES_CHOOSER(widget) GTK_FILE_CHOOSER(widget) 869 #if GTK_CHECK_VERSION(3, 2, 0) 870 #define LIVES_FONT_CHOOSER(widget) GTK_FONT_CHOOSER(widget) 871 #define LIVES_FONT_BUTTON(widget) GTK_FONT_BUTTON(widget) 872 #endif 873 #define LIVES_RADIO_BUTTON(widget) GTK_RADIO_BUTTON(widget) 874 #define LIVES_SPIN_BUTTON(widget) GTK_SPIN_BUTTON(widget) 875 #define LIVES_COLOR_BUTTON(widget) GTK_COLOR_BUTTON(widget) 876 #define LIVES_TOOL_BUTTON(widget) GTK_TOOL_BUTTON(widget) 877 878 #define LIVES_MENU(widget) GTK_MENU(widget) 879 #define LIVES_MENU_SHELL(widget) GTK_MENU_SHELL(widget) 880 #define LIVES_MENU_TOOL_BUTTON(widget) GTK_MENU_TOOL_BUTTON(widget) 881 #define LIVES_MENU_ITEM(widget) GTK_MENU_ITEM(widget) 882 #define LIVES_IMAGE(widget) GTK_IMAGE(widget) 883 #define LIVES_CHECK_MENU_ITEM(widget) GTK_CHECK_MENU_ITEM(widget) 884 #define LIVES_RADIO_MENU_ITEM(widget) GTK_RADIO_MENU_ITEM(widget) 885 #define LIVES_FILE_CHOOSER(widget) GTK_FILE_CHOOSER(widget) 886 #define LIVES_SCROLLED_WINDOW(widget) GTK_SCROLLED_WINDOW(widget) 887 #define LIVES_TOOLBAR(widget) GTK_TOOLBAR(widget) 888 #define LIVES_TOOL_ITEM(widget) GTK_TOOL_ITEM(widget) 889 890 #define LIVES_NOTEBOOK(widget) GTK_NOTEBOOK(widget) 891 892 #ifdef PROGBAR_IS_ENTRY 893 #define LIVES_PROGRESS_BAR(widget) GTK_ENTRY(widget) 894 #else 895 #define LIVES_PROGRESS_BAR(widget) GTK_PROGRESS_BAR(widget) 896 #endif 897 898 #if LIVES_HAS_SPINNER_WIDGET 899 #define LIVES_SPINNER(widget) GTK_SPINNER(widget) 900 #endif 901 902 #define LIVES_EXPANDER(widget) GTK_EXPANDER(widget) 903 904 #define LIVES_MISC(widget) GTK_MISC(widget) 905 906 #if GTK_CHECK_VERSION(2, 14, 0) 907 #define LIVES_SCALE_BUTTON(widget) GTK_SCALE_BUTTON(widget) 908 #else 909 #define LIVES_SCALE_BUTTON(widget) GTK_RANGE(widget) 910 #endif 911 912 #define LIVES_TOGGLE_TOOL_BUTTON(widget) GTK_TOGGLE_TOOL_BUTTON(widget) 913 #define LIVES_TEXT_VIEW(widget) GTK_TEXT_VIEW(widget) 914 #define LIVES_TEXT_BUFFER(widget) GTK_TEXT_BUFFER(widget) 915 916 #define LIVES_TREE_VIEW(widget) GTK_TREE_VIEW(widget) 917 #define LIVES_TREE_MODEL(object) GTK_TREE_MODEL(object) 918 919 #define LIVES_LIST_STORE(object) GTK_LIST_STORE(object) 920 921 #define LIVES_ACCEL_GROUP(object) GTK_ACCEL_GROUP(object) 922 923 #if GTK_CHECK_VERSION(3, 0, 0) 924 #define LIVES_RULER(widget) GTK_SCALE(widget) 925 #define LIVES_ORIENTABLE(widget) GTK_ORIENTABLE(widget) 926 #define LIVES_VBOX(widget) GTK_BOX(widget) 927 #define LIVES_HBOX(widget) GTK_BOX(widget) 928 #else 929 #define LIVES_RULER(widget) GTK_RULER(widget) 930 #define LIVES_VBOX(widget) GTK_VBOX(widget) 931 #define LIVES_HBOX(widget) GTK_HBOX(widget) 932 #endif 933 934 #if LIVES_HAS_SWITCH_WIDGET 935 #define LIVES_SWITCH(widget) GTK_SWITCH(widget) 936 #define LIVES_TOGGLE_BUTTON(widget) widget 937 #else 938 #define LIVES_SWITCH(widget) GTK_TOGGLE_BUTTON(widget) 939 #define LIVES_TOGGLE_BUTTON(widget) GTK_TOGGLE_BUTTON(widget) 940 #endif 941 942 #if GTK_CHECK_VERSION(3, 2, 0) 943 #define LIVES_GRID(widget) GTK_GRID(widget) 944 #else 945 #define LIVES_GRID(widget) GTK_WIDGET(widget) 946 #endif 947 948 #if GTK_CHECK_VERSION(3, 10, 0) 949 #define LIVES_IMAGE_MENU_ITEM(widget) GTK_MENU_ITEM(widget) 950 #else 951 #define LIVES_IMAGE_MENU_ITEM(widget) GTK_IMAGE_MENU_ITEM(widget) 952 #undef LIVES_HAS_IMAGE_MENU_ITEM 953 #define LIVES_HAS_IMAGE_MENU_ITEM 1 954 #endif 955 956 #if LIVES_TABLE_IS_GRID 957 #define LIVES_TABLE(widget) GTK_GRID(widget) 958 #define LIVES_IS_TABLE(widget) GTK_IS_GRID(widget) 959 #else 960 #define LIVES_TABLE(widget) GTK_TABLE(widget) 961 #define LIVES_IS_TABLE(widget) GTK_IS_TABLE(widget) 962 #endif 963 964 #define LIVES_LAYOUT LIVES_TABLE 965 966 #define LIVES_RANGE(widget) GTK_RANGE(widget) 967 968 #define LIVES_EDITABLE(widget) GTK_EDITABLE(widget) 969 970 #define LIVES_XEVENT(event) ((GdkEvent *)(event)) 971 972 #define LIVES_IS_WIDGET_OBJECT(object) G_IS_OBJECT(object) 973 #define LIVES_IS_WIDGET(widget) GTK_IS_WIDGET(widget) 974 #define LIVES_IS_WINDOW(widget) GTK_IS_WINDOW(widget) 975 #define LIVES_IS_XWINDOW(widget) GDK_IS_WINDOW(widget) 976 #define LIVES_IS_PIXBUF(widget) GDK_IS_PIXBUF(widget) 977 #define LIVES_IS_CONTAINER(widget) GTK_IS_CONTAINER(widget) 978 #define LIVES_IS_BIN(widget) GTK_IS_BIN(widget) 979 #define LIVES_IS_SCROLLBAR(widget) GTK_IS_SCROLLBAR(widget) 980 #define LIVES_IS_TOOL_BUTTON(widget) GTK_IS_TOOL_BUTTON(widget) 981 982 #if GTK_CHECK_VERSION(3, 0, 0) 983 #define LIVES_IS_HBOX(widget) (GTK_IS_BOX(widget) && gtk_orientable_get_orientation(GTK_ORIENTABLE(widget)) \ 984 == GTK_ORIENTATION_HORIZONTAL) 985 #define LIVES_IS_VBOX(widget) (GTK_IS_BOX(widget) && gtk_orientable_get_orientation(GTK_ORIENTABLE(widget)) \ 986 == GTK_ORIENTATION_VERTICAL) 987 #define LIVES_IS_SCROLLABLE(widget) GTK_IS_SCROLLABLE(widget) 988 #else 989 #define LIVES_IS_HBOX(widget) GTK_IS_HBOX(widget) 990 #define LIVES_IS_VBOX(widget) GTK_IS_VBOX(widget) 991 #endif 992 993 #ifdef LIVES_HAS_SWITCH_WIDGET 994 #define LIVES_IS_SWITCH(widget) GTK_IS_SWITCH(widget) 995 #else 996 #define LIVES_IS_SWITCH(widget) 0 997 #endif 998 999 #define LIVES_IS_BOX(widget) (LIVES_IS_HBOX(widget) || LIVES_IS_VBOX(widget)) 1000 1001 #define LIVES_IS_FRAME(widget) GTK_IS_FRAME(widget) 1002 1003 #define LIVES_IS_TOOLBAR(widget) GTK_IS_TOOLBAR(widget) 1004 #define LIVES_IS_EVENT_BOX(widget) GTK_IS_EVENT_BOX(widget) 1005 1006 #define LIVES_IS_COMBO(widget) GTK_IS_COMBO_BOX(widget) 1007 #define LIVES_IS_DIALOG(widget) GTK_IS_DIALOG(widget) 1008 #define LIVES_IS_LABEL(widget) GTK_IS_LABEL(widget) 1009 #define LIVES_IS_BUTTON(widget) GTK_IS_BUTTON(widget) 1010 #define LIVES_IS_DRAWING_AREA(widget) GTK_IS_DRAWING_AREA(widget) 1011 #define LIVES_IS_SPIN_BUTTON(widget) GTK_IS_SPIN_BUTTON(widget) 1012 #if LIVES_HAS_SWITCH_WIDGET 1013 #define LIVES_IS_TOGGLE_BUTTON(widget) (GTK_IS_SWITCH(widget) ? 1 : GTK_IS_TOGGLE_BUTTON(widget)) 1014 #else 1015 #define LIVES_IS_TOGGLE_BUTTON(widget) GTK_IS_TOGGLE_BUTTON(widget) 1016 #endif 1017 #define LIVES_IS_TOGGLE_TOOL_BUTTON(widget) GTK_IS_TOGGLE_TOOL_BUTTON(widget) 1018 #define LIVES_IS_IMAGE(widget) GTK_IS_IMAGE(widget) 1019 #define LIVES_IS_ENTRY(widget) GTK_IS_ENTRY(widget) 1020 #define LIVES_IS_RANGE(widget) GTK_IS_RANGE(widget) 1021 #ifdef PROGBAR_IS_ENTRY 1022 #define LIVES_IS_PROGRESS_BAR(widget) GTK_IS_ENTRY(widget) 1023 #else 1024 #define LIVES_IS_PROGRESS_BAR(widget) GTK_IS_PROGRESS_BAR(widget) 1025 #endif 1026 #define LIVES_IS_TEXT_VIEW(widget) GTK_IS_TEXT_VIEW(widget) 1027 #define LIVES_IS_MENU_ITEM(widget) GTK_IS_MENU_ITEM(widget) 1028 #define LIVES_IS_CHECK_MENU_ITEM(widget) GTK_IS_CHECK_MENU_ITEM(widget) 1029 #define LIVES_IS_FILE_CHOOSER(widget) GTK_IS_FILE_CHOOSER(widget) 1030 #define LIVES_IS_BUTTON_BOX(widget) GTK_IS_BUTTON_BOX(widget) 1031 1032 #define LIVES_IS_ADJUSTMENT(adj) GTK_IS_ADJUSTMENT(adj) 1033 1034 // (image resize) interpolation types 1035 #define LIVES_INTERP_BEST GDK_INTERP_HYPER 1036 #define LIVES_INTERP_NORMAL GDK_INTERP_BILINEAR 1037 #define LIVES_INTERP_FAST GDK_INTERP_NEAREST 1038 1039 #if GTK_CHECK_VERSION(3, 10, 0) 1040 #define STOCK_ALTS_MEDIA_PAUSE 0 1041 #define STOCK_ALTS_KEEP 1 1042 #define N_STOCK_ALTS 2 1043 1044 #define GET_STOCK_ALT(stock_name) (lives_get_stock_icon_alt((stock_name))) 1045 1046 #define LIVES_STOCK_YES "gtk-yes" 1047 #define LIVES_STOCK_NO "gtk-no" 1048 #define LIVES_STOCK_APPLY "gtk-apply" 1049 #define LIVES_STOCK_CANCEL "gtk-cancel" 1050 #define LIVES_STOCK_OK "gtk-ok" 1051 #define LIVES_STOCK_EDIT "gtk-edit" 1052 1053 #define LIVES_STOCK_UNDO "edit-undo" 1054 #define LIVES_STOCK_REDO "edit-redo" 1055 #define LIVES_STOCK_ADD "list-add" 1056 #define LIVES_STOCK_REMOVE "list-remove" 1057 #define LIVES_STOCK_NO2 "media-record" 1058 #define LIVES_STOCK_QUIT "application-exit" 1059 #define LIVES_STOCK_OPEN "document-open" 1060 #define LIVES_STOCK_CLOSE "window-close" 1061 #define LIVES_STOCK_CLEAR "edit-clear" 1062 #define LIVES_STOCK_DELETE "edit-delete" 1063 #define LIVES_STOCK_SAVE_AS "document-save-as" 1064 #define LIVES_STOCK_SAVE "document-save" 1065 #define LIVES_STOCK_REFRESH "view-refresh" 1066 #define LIVES_STOCK_REVERT_TO_SAVED "document-revert" 1067 #define LIVES_STOCK_GO_BACK "go-previous" 1068 #define LIVES_STOCK_GO_FORWARD "go-next" 1069 #define LIVES_STOCK_GO_UP "go-up" 1070 #define LIVES_STOCK_GO_DOWN "go-down" 1071 #define LIVES_STOCK_STOP "stop" 1072 #define LIVES_STOCK_SELECT_ALL "edit-select-all" 1073 #define LIVES_STOCK_MEDIA_PLAY "media-playback-start" 1074 #define LIVES_STOCK_MEDIA_STOP "media-playback-stop" 1075 #define LIVES_STOCK_MEDIA_REWIND "media-seek-backward" 1076 #define LIVES_STOCK_MEDIA_FORWARD "media-seek-forward" 1077 #define LIVES_STOCK_MEDIA_RECORD "media-record" 1078 1079 #define LIVES_STOCK_LOOP "system-reboot" 1080 1081 #define LIVES_STOCK_PREFERENCES "preferences-system" 1082 #define LIVES_STOCK_DIALOG_INFO "gtk-dialog-info" 1083 #define LIVES_STOCK_DIALOG_WARNING "dialog-warning" 1084 #define LIVES_STOCK_DIALOG_QUESTION "dialog-question" 1085 #define LIVES_STOCK_MISSING_IMAGE "image-missing" 1086 1087 #define LIVES_STOCK_MEDIA_PAUSE_ALT_1 "media-playback-pause" 1088 #define LIVES_STOCK_MEDIA_PAUSE_ALT_2 "media-pause" 1089 #define LIVES_STOCK_MEDIA_PAUSE GET_STOCK_ALT(STOCK_ALTS_MEDIA_PAUSE) 1090 1091 #define LIVES_STOCK_KEEP_ALT_1 "gtk-jump" 1092 #define LIVES_STOCK_KEEP_ALT_2 "gtk-jump-to-ltr" 1093 #define LIVES_STOCK_KEEP GET_STOCK_ALT(STOCK_ALTS_KEEP) 1094 1095 #else 1096 1097 #define LIVES_STOCK_UNDO GTK_STOCK_UNDO 1098 #define LIVES_STOCK_REDO GTK_STOCK_REDO 1099 #define LIVES_STOCK_ADD GTK_STOCK_ADD 1100 #define LIVES_STOCK_APPLY GTK_STOCK_APPLY 1101 #define LIVES_STOCK_REMOVE GTK_STOCK_REMOVE 1102 #define LIVES_STOCK_NO GTK_STOCK_NO 1103 #define LIVES_STOCK_YES GTK_STOCK_YES 1104 #define LIVES_STOCK_KEEP GTK_STOCK_KEEP 1105 #define LIVES_STOCK_QUIT GTK_STOCK_QUIT 1106 #define LIVES_STOCK_OPEN GTK_STOCK_OPEN 1107 #define LIVES_STOCK_CLOSE GTK_STOCK_CLOSE 1108 #define LIVES_STOCK_CANCEL GTK_STOCK_CANCEL 1109 #define LIVES_STOCK_OK GTK_STOCK_OK 1110 #define LIVES_STOCK_CLEAR GTK_STOCK_CLEAR 1111 #define LIVES_STOCK_DELETE GTK_STOCK_DELETE 1112 #define LIVES_STOCK_SAVE_AS GTK_STOCK_SAVE_AS 1113 #define LIVES_STOCK_SAVE GTK_STOCK_SAVE 1114 #define LIVES_STOCK_REFRESH GTK_STOCK_REFRESH 1115 #define LIVES_STOCK_REVERT_TO_SAVED GTK_STOCK_REVERT_TO_SAVED 1116 #define LIVES_STOCK_GO_BACK GTK_STOCK_GO_BACK 1117 #define LIVES_STOCK_GO_FORWARD GTK_STOCK_GO_FORWARD 1118 #define LIVES_STOCK_REFRESH GTK_STOCK_REFRESH 1119 #define LIVES_STOCK_SELECT_ALL GTK_STOCK_SELECT_ALL 1120 #define LIVES_STOCK_PREFERENCES GTK_STOCK_PREFERENCES 1121 #define LIVES_STOCK_DIALOG_INFO GTK_STOCK_DIALOG_INFO 1122 #define LIVES_STOCK_DIALOG_WARNING GTK_STOCK_DIALOG_WARNING 1123 #define LIVES_STOCK_DIALOG_QUESTION GTK_STOCK_DIALOG_QUESTION 1124 #define LIVES_STOCK_MISSING_IMAGE GTK_STOCK_MISSING_IMAGE 1125 1126 #if GTK_CHECK_VERSION(2, 6, 0) 1127 #define LIVES_STOCK_MEDIA_PAUSE GTK_STOCK_MEDIA_PAUSE 1128 #else 1129 #define LIVES_STOCK_MEDIA_PAUSE GTK_STOCK_REFRESH 1130 #endif 1131 1132 #if GTK_CHECK_VERSION(2, 6, 0) 1133 #define LIVES_STOCK_MEDIA_PLAY GTK_STOCK_MEDIA_PLAY 1134 #else 1135 #define LIVES_STOCK_MEDIA_PLAY GTK_STOCK_GO_FORWARD 1136 #endif 1137 #if GTK_CHECK_VERSION(2, 6, 0) 1138 #define LIVES_STOCK_MEDIA_STOP GTK_STOCK_MEDIA_STOP 1139 #else 1140 #define LIVES_STOCK_MEDIA_STOP GTK_STOCK_STOP 1141 #endif 1142 #if GTK_CHECK_VERSION(2, 6, 0) 1143 #define LIVES_STOCK_MEDIA_REWIND GTK_STOCK_MEDIA_REWIND 1144 #else 1145 #define LIVES_STOCK_MEDIA_REWIND GTK_STOCK_GOTO_FIRST 1146 #endif 1147 #if GTK_CHECK_VERSION(2, 6, 0) 1148 #define LIVES_STOCK_MEDIA_FORWARD GTK_STOCK_MEDIA_FORWARD 1149 #else 1150 #define LIVES_STOCK_MEDIA_FORWARD GTK_STOCK_GOTO_LAST 1151 #endif 1152 #if GTK_CHECK_VERSION(2, 6, 0) 1153 #define LIVES_STOCK_MEDIA_RECORD GTK_STOCK_MEDIA_RECORD 1154 #else 1155 #define LIVES_STOCK_MEDIA_RECORD GTK_STOCK_NO 1156 #endif 1157 1158 #endif 1159 1160 //#define LIVES_LIVES_STOCK_LOCKED "lives-locked" 1161 //#define LIVES_LIVES_STOCK_UNLOCKED "lives-unlocked" 1162 1163 #if GTK_CHECK_VERSION(3, 2, 0) 1164 #define LIVES_LIVES_STOCK_LOCKED "changes-prevent" 1165 #define LIVES_LIVES_STOCK_UNLOCKED "changes-allow" 1166 #else 1167 #define LIVES_LIVES_STOCK_LOCKED "locked" 1168 #define LIVES_LIVES_STOCK_UNLOCKED "unlocked" 1169 #endif 1170 1171 #define LIVES_DEFAULT_MOD_MASK (gtk_accelerator_get_default_mod_mask ()) 1172 1173 #define LIVES_CONTROL_MASK GDK_CONTROL_MASK // 4 1174 #define LIVES_ALT_MASK GDK_MOD1_MASK // 8 1175 #define LIVES_NUMLOCK_MASK GDK_MOD2_MASK // 16 1176 #define LIVES_SHIFT_MASK GDK_SHIFT_MASK // 1 1177 #define LIVES_LOCK_MASK GDK_LOCK_MASK // 2 (capslock) 1178 1179 #define LIVES_BUTTON1_MASK GDK_BUTTON1_MASK 1180 #define LIVES_BUTTON2_MASK GDK_BUTTON2_MASK 1181 #define LIVES_BUTTON3_MASK GDK_BUTTON3_MASK 1182 #define LIVES_BUTTON4_MASK GDK_BUTTON4_MASK 1183 #define LIVES_BUTTON5_MASK GDK_BUTTON5_MASK 1184 1185 #define LIVES_SPECIAL_MASK (1 << 31) 1186 1187 #ifdef GDK_KEY_a 1188 #define LIVES_KEY_Left GDK_KEY_Left 1189 #define LIVES_KEY_Right GDK_KEY_Right 1190 #define LIVES_KEY_Up GDK_KEY_Up 1191 #define LIVES_KEY_Down GDK_KEY_Down 1192 1193 #define LIVES_KEY_BackSpace GDK_KEY_BackSpace 1194 #define LIVES_KEY_Return GDK_KEY_Return 1195 #define LIVES_KEY_Tab GDK_KEY_Tab 1196 #define LIVES_KEY_Home GDK_KEY_Home 1197 #define LIVES_KEY_End GDK_KEY_End 1198 #define LIVES_KEY_Slash GDK_KEY_slash 1199 #define LIVES_KEY_Space GDK_KEY_space 1200 #define LIVES_KEY_Plus GDK_KEY_plus 1201 #define LIVES_KEY_Less GDK_KEY_less 1202 #define LIVES_KEY_Greater GDK_KEY_greater 1203 #define LIVES_KEY_Minus GDK_KEY_minus 1204 #define LIVES_KEY_Equal GDK_KEY_equal 1205 #define LIVES_KEY_Delete GDK_KEY_Delete 1206 1207 #define LIVES_KEY_1 GDK_KEY_1 1208 #define LIVES_KEY_2 GDK_KEY_2 1209 #define LIVES_KEY_3 GDK_KEY_3 1210 #define LIVES_KEY_4 GDK_KEY_4 1211 #define LIVES_KEY_5 GDK_KEY_5 1212 #define LIVES_KEY_6 GDK_KEY_6 1213 #define LIVES_KEY_7 GDK_KEY_7 1214 #define LIVES_KEY_8 GDK_KEY_8 1215 #define LIVES_KEY_9 GDK_KEY_9 1216 #define LIVES_KEY_0 GDK_KEY_0 1217 1218 #define LIVES_KEY_a GDK_KEY_a 1219 #define LIVES_KEY_b GDK_KEY_b 1220 #define LIVES_KEY_c GDK_KEY_c 1221 #define LIVES_KEY_d GDK_KEY_d 1222 #define LIVES_KEY_e GDK_KEY_e 1223 #define LIVES_KEY_f GDK_KEY_f 1224 #define LIVES_KEY_g GDK_KEY_g 1225 #define LIVES_KEY_h GDK_KEY_h 1226 #define LIVES_KEY_i GDK_KEY_i 1227 #define LIVES_KEY_j GDK_KEY_j 1228 #define LIVES_KEY_k GDK_KEY_k 1229 #define LIVES_KEY_l GDK_KEY_l 1230 #define LIVES_KEY_m GDK_KEY_m 1231 #define LIVES_KEY_n GDK_KEY_n 1232 #define LIVES_KEY_o GDK_KEY_o 1233 #define LIVES_KEY_p GDK_KEY_p 1234 #define LIVES_KEY_q GDK_KEY_q 1235 #define LIVES_KEY_r GDK_KEY_r 1236 #define LIVES_KEY_s GDK_KEY_s 1237 #define LIVES_KEY_t GDK_KEY_t 1238 #define LIVES_KEY_u GDK_KEY_u 1239 #define LIVES_KEY_v GDK_KEY_v 1240 #define LIVES_KEY_w GDK_KEY_w 1241 #define LIVES_KEY_x GDK_KEY_x 1242 #define LIVES_KEY_y GDK_KEY_y 1243 #define LIVES_KEY_z GDK_KEY_z 1244 1245 #define LIVES_KEY_F1 GDK_KEY_F1 1246 #define LIVES_KEY_F2 GDK_KEY_F2 1247 #define LIVES_KEY_F3 GDK_KEY_F3 1248 #define LIVES_KEY_F4 GDK_KEY_F4 1249 #define LIVES_KEY_F5 GDK_KEY_F5 1250 #define LIVES_KEY_F6 GDK_KEY_F6 1251 #define LIVES_KEY_F7 GDK_KEY_F7 1252 #define LIVES_KEY_F8 GDK_KEY_F8 1253 #define LIVES_KEY_F9 GDK_KEY_F9 1254 #define LIVES_KEY_F10 GDK_KEY_F10 1255 #define LIVES_KEY_F11 GDK_KEY_F11 1256 #define LIVES_KEY_F12 GDK_KEY_F12 1257 1258 #define LIVES_KEY_Page_Up GDK_KEY_Page_Up 1259 #define LIVES_KEY_Page_Down GDK_KEY_Page_Down 1260 1261 #define LIVES_KEY_Escape GDK_KEY_Escape 1262 1263 #else 1264 #define LIVES_KEY_Left GDK_Left 1265 #define LIVES_KEY_Right GDK_Right 1266 #define LIVES_KEY_Up GDK_Up 1267 #define LIVES_KEY_Down GDK_Down 1268 1269 #define LIVES_KEY_BackSpace GDK_BackSpace 1270 #define LIVES_KEY_Return GDK_Return 1271 #define LIVES_KEY_Tab GDK_Tab 1272 #define LIVES_KEY_Home GDK_Home 1273 #define LIVES_KEY_End GDK_End 1274 #define LIVES_KEY_Slash GDK_slash 1275 #define LIVES_KEY_Space GDK_space 1276 #define LIVES_KEY_Plus GDK_plus 1277 #define LIVES_KEY_Less GDK_less 1278 #define LIVES_KEY_Greater GDK_greater 1279 #define LIVES_KEY_Minus GDK_minus 1280 #define LIVES_KEY_Equal GDK_equal 1281 #define LIVES_KEY_Delete GDK_delete 1282 1283 #define LIVES_KEY_1 GDK_1 1284 #define LIVES_KEY_2 GDK_2 1285 #define LIVES_KEY_3 GDK_3 1286 #define LIVES_KEY_4 GDK_4 1287 #define LIVES_KEY_5 GDK_5 1288 #define LIVES_KEY_6 GDK_6 1289 #define LIVES_KEY_7 GDK_7 1290 #define LIVES_KEY_8 GDK_8 1291 #define LIVES_KEY_9 GDK_9 1292 #define LIVES_KEY_0 GDK_0 1293 1294 #define LIVES_KEY_a GDK_a 1295 #define LIVES_KEY_b GDK_b 1296 #define LIVES_KEY_c GDK_c 1297 #define LIVES_KEY_d GDK_d 1298 #define LIVES_KEY_e GDK_e 1299 #define LIVES_KEY_f GDK_f 1300 #define LIVES_KEY_g GDK_g 1301 #define LIVES_KEY_h GDK_h 1302 #define LIVES_KEY_i GDK_i 1303 #define LIVES_KEY_j GDK_j 1304 #define LIVES_KEY_k GDK_k 1305 #define LIVES_KEY_l GDK_l 1306 #define LIVES_KEY_m GDK_m 1307 #define LIVES_KEY_n GDK_n 1308 #define LIVES_KEY_o GDK_o 1309 #define LIVES_KEY_p GDK_p 1310 #define LIVES_KEY_q GDK_q 1311 #define LIVES_KEY_r GDK_r 1312 #define LIVES_KEY_s GDK_s 1313 #define LIVES_KEY_t GDK_t 1314 #define LIVES_KEY_u GDK_u 1315 #define LIVES_KEY_v GDK_v 1316 #define LIVES_KEY_w GDK_w 1317 #define LIVES_KEY_x GDK_x 1318 #define LIVES_KEY_y GDK_y 1319 #define LIVES_KEY_z GDK_z 1320 1321 #define LIVES_KEY_F1 GDK_F1 1322 #define LIVES_KEY_F2 GDK_F2 1323 #define LIVES_KEY_F3 GDK_F3 1324 #define LIVES_KEY_F4 GDK_F4 1325 #define LIVES_KEY_F5 GDK_F5 1326 #define LIVES_KEY_F6 GDK_F6 1327 #define LIVES_KEY_F7 GDK_F7 1328 #define LIVES_KEY_F8 GDK_F8 1329 #define LIVES_KEY_F9 GDK_F9 1330 #define LIVES_KEY_F10 GDK_F10 1331 #define LIVES_KEY_F11 GDK_F11 1332 #define LIVES_KEY_F12 GDK_F12 1333 1334 #define LIVES_KEY_Page_Up GDK_Page_Up 1335 #define LIVES_KEY_Page_Down GDK_Page_Down 1336 1337 #define LIVES_KEY_Escape GDK_Escape 1338 1339 #endif 1340 1341 #define LIVES_INT_TO_POINTER GINT_TO_POINTER 1342 #define LIVES_UINT_TO_POINTER GUINT_TO_POINTER 1343 #define LIVES_POINTER_TO_INT GPOINTER_TO_INT 1344 1345 #endif 1346 1347 #endif 1348