comparison gtk3/dw.c @ 2506:fa976a5bc7bd

Add DW_FEATURE_WINDOW_PLACEMENT for platforms supporting arbitrary window placement. Several of the new platforms supported do not allow arbitrary window placement. GTK3/4 with Wayland does not allow you to specify the location, just the size. iOS and Android by default the window is the full screen, or fraction of it. GTK2/3/4 with X11, Windows, OS/2 and MacOS support arbitrary window placement.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Thu, 06 May 2021 23:19:46 +0000
parents ed955edc7204
children eaac1317b851
comparison
equal deleted inserted replaced
2505:a149dabf6a1f 2506:fa976a5bc7bd
12638 case DW_FEATURE_TASK_BAR: 12638 case DW_FEATURE_TASK_BAR:
12639 case DW_FEATURE_UTF8_UNICODE: 12639 case DW_FEATURE_UTF8_UNICODE:
12640 case DW_FEATURE_MLE_WORD_WRAP: 12640 case DW_FEATURE_MLE_WORD_WRAP:
12641 case DW_FEATURE_TREE: 12641 case DW_FEATURE_TREE:
12642 return DW_FEATURE_ENABLED; 12642 return DW_FEATURE_ENABLED;
12643 #ifdef GDK_WINDOWING_X11
12644 case DW_FEATURE_WINDOW_PLACEMENT:
12645 {
12646 int _locked_by_me = FALSE, retval = DW_FEATURE_UNSUPPORTED;
12647 GdkDisplay *display;
12648
12649 DW_MUTEX_LOCK;
12650 display = gdk_display_get_default();
12651
12652 if(display && GDK_IS_X11_DISPLAY(display))
12653 retval = DW_ERROR_ENABLED;
12654 DW_MUTEX_UNLOCK;
12655 return retval;
12656 }
12657 #endif
12643 default: 12658 default:
12644 return DW_FEATURE_UNSUPPORTED; 12659 return DW_FEATURE_UNSUPPORTED;
12645 } 12660 }
12646 } 12661 }
12647 12662
12681 case DW_FEATURE_TASK_BAR: 12696 case DW_FEATURE_TASK_BAR:
12682 case DW_FEATURE_UTF8_UNICODE: 12697 case DW_FEATURE_UTF8_UNICODE:
12683 case DW_FEATURE_MLE_WORD_WRAP: 12698 case DW_FEATURE_MLE_WORD_WRAP:
12684 case DW_FEATURE_TREE: 12699 case DW_FEATURE_TREE:
12685 return DW_ERROR_GENERAL; 12700 return DW_ERROR_GENERAL;
12701 #ifdef GDK_WINDOWING_X11
12702 case DW_FEATURE_WINDOW_PLACEMENT:
12703 {
12704 int _locked_by_me = FALSE, retval = DW_FEATURE_UNSUPPORTED;
12705 GdkDisplay *display;
12706
12707 DW_MUTEX_LOCK;
12708 display = gdk_display_get_default();
12709
12710 if(display && GDK_IS_X11_DISPLAY(display))
12711 retval = DW_ERROR_GENERAL;
12712 DW_MUTEX_UNLOCK;
12713 return retval;
12714 }
12715 #endif
12686 /* These features are supported and configurable */ 12716 /* These features are supported and configurable */
12687 default: 12717 default:
12688 return DW_FEATURE_UNSUPPORTED; 12718 return DW_FEATURE_UNSUPPORTED;
12689 } 12719 }
12690 } 12720 }