600
600
* \return True if the supplied window is valid, or
601
601
* false otherwise.
603
bool mir_window_is_valid(MirWindow *window);
603
bool mir_window_is_valid(MirWindow* window);
606
* Set the event handler to be called when events arrive for a window.
607
* \warning event_handler could be called from another thread. You must do
608
* any locking appropriate to protect your data accessed in the
609
* callback. There is also a chance that different events will be
610
* called back in different threads, for the same window,
612
* \param [in] window The window
613
* \param [in] callback The callback function
614
* \param [in] context Additional argument to be passed to callback
616
void mir_window_set_event_handler(MirWindow* window,
617
mir_window_event_callback callback,
621
* Retrieve the primary MirBufferStream associated with a window (to advance buffers,
622
* obtain EGLNativeWindow, etc...)
624
* \deprecated Users should use mir_window_spec_set_streams() to arrange
625
* the content of a window, instead of relying on a stream
626
* being created by default.
627
* \warning If the window was created with, or modified to have a
628
* MirWindowSpec containing streams added through
629
* mir_window_spec_set_streams(), the default stream will
630
* be removed, and this function will return NULL.
631
* \param[in] window The window
633
MirBufferStream* mir_window_get_buffer_stream(MirWindow* window);
636
* Retrieve a text description of the error. The returned string is owned by
637
* the library and remains valid until the window or the associated
638
* connection has been released.
639
* \param [in] window The window
640
* \return A text description of any error resulting in an
641
* invalid window, or the empty string "" if the
642
* connection is valid.
644
char const* mir_window_get_error_message(MirWindow* window);
647
* Get a window's parameters.
648
* \pre The window is valid
649
* \param [in] window The window
650
* \param [out] parameters Structure to be populated
652
void mir_window_get_parameters(MirWindow* window, MirWindowParameters* parameters);
655
* Get the orientation of a window.
656
* \param [in] window The window to query
657
* \return The orientation of the window
659
MirOrientation mir_window_get_orientation(MirWindow* window);
662
* Attempts to raise the window to the front.
664
* \param [in] window The window to raise
665
* \param [in] cookie A cookie instance obtained from an input event.
666
* An invalid cookie will terminate the client connection.
668
void mir_window_raise(MirWindow* window, MirCookie const* cookie);
605
670
// Functions in this pragma section are to be deprecated
606
671
//#pragma GCC diagnostic push
791
856
void mir_surface_release_sync(MirSurface *surface);
792
857
//__attribute__((deprecated("use mir_window_release_sync() instead")));
795
* Set the event handler to be called when events arrive for a surface.
796
* \warning event_handler could be called from another thread. You must do
797
* any locking appropriate to protect your data accessed in the
798
* callback. There is also a chance that different events will be
799
* called back in different threads, for the same surface,
801
* \param [in] surface The surface
802
* \param [in] callback The callback function
803
* \param [in] context Additional argument to be passed to callback
805
859
void mir_surface_set_event_handler(MirSurface *surface,
806
860
mir_surface_event_callback callback,
862
//__attribute__((deprecated("use mir_window_set_event_handler() instead")));
810
* Retrieve the primary MirBufferStream associated with a surface (to advance buffers,
811
* obtain EGLNativeWindow, etc...)
813
* \deprecated Users should use mir_window_spec_set_streams() to arrange
814
* the content of a surface, instead of relying on a stream
815
* being created by default.
816
* \warning If the surface was created with, or modified to have a
817
* MirSurfaceSpec containing streams added through
818
* mir_window_spec_set_streams(), the default stream will
819
* be removed, and this function will return NULL.
820
* \param[in] surface The surface
822
864
MirBufferStream* mir_surface_get_buffer_stream(MirSurface *surface);
825
* Retrieve a text description of the error. The returned string is owned by
826
* the library and remains valid until the surface or the associated
827
* connection has been released.
828
* \param [in] surface The surface
829
* \return A text description of any error resulting in an
830
* invalid surface, or the empty string "" if the
831
* connection is valid.
833
char const *mir_surface_get_error_message(MirSurface *surface);
836
* Get a surface's parameters.
837
* \pre The surface is valid
838
* \param [in] surface The surface
839
* \param [out] parameters Structure to be populated
865
//__attribute__((deprecated("use mir_window_get_buffer_stream() instead")));
867
char const* mir_surface_get_error_message(MirSurface *surface);
868
//__attribute__((deprecated("use mir_window_get_error_message() instead")));
841
870
void mir_surface_get_parameters(MirSurface *surface, MirSurfaceParameters *parameters);
871
//__attribute__((deprecated("use mir_window_get_parameters() instead")));
844
874
* Get the type (purpose) of a surface.
914
944
MirWaitHandle* mir_surface_configure_cursor(MirSurface *surface, MirCursorConfiguration const* parameters);
917
* Get the orientation of a surface.
918
* \param [in] surface The surface to query
919
* \return The orientation of the surface
921
946
MirOrientation mir_surface_get_orientation(MirSurface *surface);
947
//__attribute__((deprecated("use mir_window_get_orientation() instead")));
924
950
* Request to set the preferred orientations of a surface.
961
987
MirPersistentId* mir_surface_request_persistent_id_sync(MirSurface *surface);
964
* Attempts to raise the surface to the front.
966
* \param [in] surface The surface to raise
967
* \param [in] cookie A cookie instance obtained from an input event.
968
* An invalid cookie will terminate the client connection.
970
989
void mir_surface_raise(MirSurface* surface, MirCookie const* cookie);
990
//__attribute__((deprecated("use mir_window_raise() instead")));
972
992
//#pragma GCC diagnostic pop