2011-02-23 10:52:22 +00:00
|
|
|
/*
|
2007-12-24 18:27:28 +00:00
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
2018-06-01 18:19:39 +02:00
|
|
|
* of the License, or (at your option) any later version.
|
2007-12-24 18:27:28 +00:00
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software Foundation,
|
2010-02-12 13:34:04 +00:00
|
|
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2007-12-24 18:27:28 +00:00
|
|
|
*
|
|
|
|
* The Original Code is Copyright (C) 2007 Blender Foundation.
|
|
|
|
* All rights reserved.
|
|
|
|
*/
|
|
|
|
|
2019-02-18 08:08:12 +11:00
|
|
|
/** \file
|
|
|
|
* \ingroup wm
|
2011-02-25 14:04:21 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
2012-02-17 18:59:41 +00:00
|
|
|
#ifndef __WM_WINDOW_H__
|
|
|
|
#define __WM_WINDOW_H__
|
2007-12-24 18:27:28 +00:00
|
|
|
|
2017-03-13 10:43:49 +01:00
|
|
|
struct EnumPropertyItem;
|
|
|
|
struct PointerRNA;
|
|
|
|
struct PropertyRNA;
|
2019-01-28 21:08:24 +11:00
|
|
|
struct wmEvent;
|
|
|
|
struct wmOperator;
|
2007-12-24 18:27:28 +00:00
|
|
|
|
|
|
|
/* *************** internal api ************** */
|
|
|
|
void wm_ghost_init (bContext *C);
|
2009-08-05 02:40:51 +00:00
|
|
|
void wm_ghost_exit(void);
|
2007-12-24 18:27:28 +00:00
|
|
|
|
2015-05-08 07:25:39 +10:00
|
|
|
void wm_get_screensize(int *r_width, int *r_height);
|
|
|
|
void wm_get_desktopsize(int *r_width, int *r_height);
|
2010-08-16 12:14:09 +00:00
|
|
|
|
2018-07-03 15:34:26 +02:00
|
|
|
wmWindow *wm_window_new (bContext *C, wmWindow *parent);
|
|
|
|
wmWindow *wm_window_copy (bContext *C, wmWindow *win_src, const bool duplicate_layout, const bool child);
|
|
|
|
wmWindow *wm_window_copy_test (bContext *C, wmWindow *win_src, const bool duplicate_layout, const bool child);
|
2009-10-20 13:58:53 +00:00
|
|
|
void wm_window_free (bContext *C, wmWindowManager *wm, wmWindow *win);
|
|
|
|
void wm_window_close (bContext *C, wmWindowManager *wm, wmWindow *win);
|
2009-02-13 13:33:01 +00:00
|
|
|
|
2009-02-18 13:29:54 +00:00
|
|
|
void wm_window_title (wmWindowManager *wm, wmWindow *win);
|
2015-10-07 00:27:27 +11:00
|
|
|
void wm_window_ghostwindows_ensure(wmWindowManager *wm);
|
|
|
|
void wm_window_ghostwindows_remove_invalid(bContext *C, wmWindowManager *wm);
|
2008-12-22 12:57:53 +00:00
|
|
|
void wm_window_process_events (const bContext *C);
|
2010-10-16 02:40:31 +00:00
|
|
|
void wm_window_process_events_nosleep(void);
|
2007-12-24 18:27:28 +00:00
|
|
|
|
2018-07-23 17:44:16 +02:00
|
|
|
void wm_window_clear_drawable(wmWindowManager *wm);
|
2013-04-18 16:28:39 +00:00
|
|
|
void wm_window_make_drawable(wmWindowManager *wm, wmWindow *win);
|
2018-02-26 19:41:17 +01:00
|
|
|
void wm_window_reset_drawable(void);
|
2007-12-24 18:27:28 +00:00
|
|
|
|
|
|
|
void wm_window_raise (wmWindow *win);
|
|
|
|
void wm_window_lower (wmWindow *win);
|
|
|
|
void wm_window_set_size (wmWindow *win, int width, int height);
|
2015-05-08 07:25:39 +10:00
|
|
|
void wm_window_get_position (wmWindow *win, int *r_pos_x, int *r_pos_y);
|
2007-12-24 18:27:28 +00:00
|
|
|
void wm_window_swap_buffers (wmWindow *win);
|
2014-10-07 15:46:19 -05:00
|
|
|
void wm_window_set_swap_interval(wmWindow *win, int interval);
|
|
|
|
bool wm_window_get_swap_interval(wmWindow *win, int *intervalOut);
|
2007-12-24 18:27:28 +00:00
|
|
|
|
2015-10-03 03:37:41 +02:00
|
|
|
void wm_get_cursor_position (wmWindow *win, int *x, int *y);
|
|
|
|
void wm_cursor_position_from_ghost (wmWindow *win, int *x, int *y);
|
|
|
|
void wm_cursor_position_to_ghost (wmWindow *win, int *x, int *y);
|
2009-12-07 18:06:37 +00:00
|
|
|
|
2008-12-30 13:16:14 +00:00
|
|
|
void wm_window_testbreak (void);
|
|
|
|
|
2014-12-07 00:58:17 +01:00
|
|
|
#ifdef WITH_INPUT_IME
|
|
|
|
void wm_window_IME_begin (wmWindow *win, int x, int y, int w, int h, bool complete);
|
|
|
|
void wm_window_IME_end (wmWindow *win);
|
|
|
|
#endif
|
|
|
|
|
2007-12-24 18:27:28 +00:00
|
|
|
/* *************** window operators ************** */
|
2015-10-20 15:41:13 +11:00
|
|
|
int wm_window_close_exec(bContext *C, struct wmOperator *op);
|
2010-10-16 02:40:31 +00:00
|
|
|
int wm_window_fullscreen_toggle_exec(bContext *C, struct wmOperator *op);
|
2018-03-23 02:00:14 +01:00
|
|
|
void wm_quit_with_optional_confirmation_prompt(bContext *C, wmWindow *win) ATTR_NONNULL();
|
2007-12-24 18:27:28 +00:00
|
|
|
|
2017-03-13 10:43:49 +01:00
|
|
|
int wm_window_new_exec(bContext *C, struct wmOperator *op);
|
2018-07-03 15:34:26 +02:00
|
|
|
int wm_window_new_main_exec(bContext *C, struct wmOperator *op);
|
2017-03-13 10:43:49 +01:00
|
|
|
|
2018-11-01 18:32:37 +01:00
|
|
|
void wm_test_autorun_warning(bContext *C);
|
|
|
|
|
2013-02-07 14:41:08 +00:00
|
|
|
/* Initial (unmaximized) size to start with for
|
|
|
|
* systems that can't find it for themselves (X11).
|
|
|
|
* Clamped by real desktop limits */
|
|
|
|
#define WM_WIN_INIT_SIZE_X 1800
|
|
|
|
#define WM_WIN_INIT_SIZE_Y 1000
|
2013-03-12 14:55:52 +00:00
|
|
|
#define WM_WIN_INIT_PAD 40
|
2013-02-07 14:41:08 +00:00
|
|
|
|
2012-02-17 18:59:41 +00:00
|
|
|
#endif /* __WM_WINDOW_H__ */
|