]> cgit.babelmonkeys.de Git - jubjub.git/blob - src/gui/gtk/OFObject+GLibThread.h
Add and use -[OFObject performSelectorOnGLibThread:]
[jubjub.git] / src / gui / gtk / OFObject+GLibThread.h
1 #import <ObjFW/OFObject.h>
2
3 #ifdef __cplusplus
4 extern "C" {
5 #endif
6 extern int _OFObject_JubGlibThread_reference;
7 #ifdef __cplusplus
8 }
9 #endif
10
11 /**
12  * @brief A category that provides methods for running selectors
13  *        on the GLib Thread
14  */
15 @interface OFObject (JubGLibThread)
16 /**
17  * @brief Performs the specified selector on the GLib thread.
18  *
19  * @param selector The selector to perform
20  */
21 - (void)performSelectorOnGLibThread: (SEL)selector;
22
23 /**
24  * @brief Performs the specified selector on the GLib thread with the specified
25  *        object.
26  *
27  * @param selector The selector to perform
28  * @param object The object that is passed to the method specified by the
29  *               selector
30  */
31 - (void)performSelectorOnGLibThread: (SEL)selector
32                          withObject: (id)object;
33
34 /**
35  * @brief Performs the specified selector on the GLib thread with the specified
36  *        objects.
37  *
38  * @param selector The selector to perform
39  * @param object1 The first object that is passed to the method specified by the
40  *               selector
41  * @param object2 The second object that is passed to the method specified by
42  *                the selector
43  */
44 - (void)performSelectorOnGLibThread: (SEL)selector
45                          withObject: (id)object1
46                          withObject: (id)object2;
47 @end