~raof/mir/fix-threaded-dispatcher-death-test-race

« back to all changes in this revision

Viewing changes to include/client/mir_toolkit/mir_surface.h

  • Committer: Tarmac
  • Author(s): Cemil Azizoglu
  • Date: 2017-01-08 01:48:23 UTC
  • mfrom: (3882.13.6 mir-dev)
  • Revision ID: tarmac-20170108014823-hm013c3qanqjoilu
Rename a bunch of MirSurface functions.

Approved by mir-ci-bot, Brandon Schaefer.

Show diffs side-by-side

added added

removed removed

Lines of Context:
423
423
 * \param [in] context    Additional argument to be passed to callback
424
424
 */
425
425
void mir_window_spec_set_event_handler(MirWindowSpec* spec,
426
 
                                       mir_surface_event_callback callback,
 
426
                                       mir_window_event_callback callback,
427
427
                                       void* context);
428
428
 
429
429
/**
600
600
 *   \return              True if the supplied window is valid, or
601
601
 *                        false otherwise.
602
602
 */
603
 
bool mir_window_is_valid(MirWindow *window);
 
603
bool mir_window_is_valid(MirWindow* window);
 
604
 
 
605
/**
 
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,
 
611
 *            simultaneously.
 
612
 *   \param [in] window         The window
 
613
 *   \param [in] callback       The callback function
 
614
 *   \param [in] context        Additional argument to be passed to callback
 
615
 */
 
616
void mir_window_set_event_handler(MirWindow* window,
 
617
                                  mir_window_event_callback callback,
 
618
                                  void* context);
 
619
 
 
620
/**
 
621
 * Retrieve the primary MirBufferStream associated with a window (to advance buffers,
 
622
 * obtain EGLNativeWindow, etc...)
 
623
 *
 
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
 
632
 */
 
633
MirBufferStream* mir_window_get_buffer_stream(MirWindow* window);
 
634
 
 
635
/**
 
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.
 
643
 */
 
644
char const* mir_window_get_error_message(MirWindow* window);
 
645
 
 
646
/**
 
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
 
651
 */
 
652
void mir_window_get_parameters(MirWindow* window, MirWindowParameters* parameters);
 
653
 
 
654
/**
 
655
 * Get the orientation of a window.
 
656
 *   \param [in] window  The window to query
 
657
 *   \return              The orientation of the window
 
658
 */
 
659
MirOrientation mir_window_get_orientation(MirWindow* window);
 
660
 
 
661
/**
 
662
 * Attempts to raise the window to the front.
 
663
 *
 
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.
 
667
 */
 
668
void mir_window_raise(MirWindow* window, MirCookie const* cookie);
604
669
 
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")));
793
858
 
794
 
/**
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,
800
 
 *            simultaneously.
801
 
 *   \param [in] surface        The surface
802
 
 *   \param [in] callback       The callback function
803
 
 *   \param [in] context        Additional argument to be passed to callback
804
 
 */
805
859
void mir_surface_set_event_handler(MirSurface *surface,
806
860
                                   mir_surface_event_callback callback,
807
861
                                   void* context);
 
862
//__attribute__((deprecated("use mir_window_set_event_handler() instead")));
808
863
 
809
 
/**
810
 
 * Retrieve the primary MirBufferStream associated with a surface (to advance buffers,
811
 
 * obtain EGLNativeWindow, etc...)
812
 
 *
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
821
 
 */
822
864
MirBufferStream* mir_surface_get_buffer_stream(MirSurface *surface);
823
 
 
824
 
/**
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.
832
 
 */
833
 
char const *mir_surface_get_error_message(MirSurface *surface);
834
 
 
835
 
/**
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
840
 
 */
 
865
//__attribute__((deprecated("use mir_window_get_buffer_stream() instead")));
 
866
 
 
867
char const* mir_surface_get_error_message(MirSurface *surface);
 
868
//__attribute__((deprecated("use mir_window_get_error_message() instead")));
 
869
 
841
870
void mir_surface_get_parameters(MirSurface *surface, MirSurfaceParameters *parameters);
 
871
//__attribute__((deprecated("use mir_window_get_parameters() instead")));
842
872
 
843
873
/**
844
874
 * Get the type (purpose) of a surface.
913
943
 */
914
944
MirWaitHandle* mir_surface_configure_cursor(MirSurface *surface, MirCursorConfiguration const* parameters);
915
945
 
916
 
/**
917
 
 * Get the orientation of a surface.
918
 
 *   \param [in] surface  The surface to query
919
 
 *   \return              The orientation of the surface
920
 
 */
921
946
MirOrientation mir_surface_get_orientation(MirSurface *surface);
 
947
//__attribute__((deprecated("use mir_window_get_orientation() instead")));
922
948
 
923
949
/**
924
950
 * Request to set the preferred orientations of a surface.
960
986
 */
961
987
MirPersistentId* mir_surface_request_persistent_id_sync(MirSurface *surface);
962
988
 
963
 
/**
964
 
 * Attempts to raise the surface to the front.
965
 
 *
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.
969
 
 */
970
989
void mir_surface_raise(MirSurface* surface, MirCookie const* cookie);
 
990
//__attribute__((deprecated("use mir_window_raise() instead")));
971
991
 
972
992
//#pragma GCC diagnostic pop
973
993