32 #include "YSettings.h"
50 friend class YUIFunction;
57 YUI(
bool withThreads );
271 friend void *start_ui_thread(
void *ui_int );
int pipe_from_ui[2]
Used to synchronize data transfer with the ui thread.
void unblockEvents()
Unblock events previously blocked.
Abstract base class for macro player.
virtual ~YUI()
Destructor.
void terminateUIThread()
Tells the ui thread that it should terminate and waits until it does so.
Abstract base class of a libYUI user interface.
static YUI * ui()
Access the global UI.
bool _eventsBlocked
Flag that keeps track of blocked events.
bool _terminate_ui_thread
This is a flag that signals the ui thread that it should terminate.
void setBuiltinCaller(YBuiltinCaller *caller)
Set the transparent inter-thread communication.
void shutdownThreads()
Shut down multithreading.
virtual void blockEvents(bool block=true)
Block (or unblock) events.
void setButtonOrderFromEnvironment()
Set the button order (in YButtonBox widgets) from environment variables:
Class to load one of the concrete UI plug-ins: Qt, NCurses, Gtk.
virtual YEvent * runPkgSelection(YWidget *packageSelector)=0
UI-specific runPkgSelection method.
virtual YOptionalWidgetFactory * createOptionalWidgetFactory()=0
Create the widget factory that provides all the createXY() methods for optional ("special") widgets a...
static YOptionalWidgetFactory * optionalWidgetFactory()
Return the widget factory that provides all the createXY() methods for optional ("special") widgets a...
YWidget * sendWidgetID(const std::string &id)
Send a widget ID.
YBuiltinCaller * _builtinCaller
Inter-thread communication between the YCP thread and the UI thread: The YCP thread supplies data her...
Abstract base class for transparently calling a built-in function.
bool waitForYCPThread()
Waits for the ycp thread to send one byte through the pipe to the ycp thread and reads this byte from...
Class for application-wide values and functions.
Abstract base class for events to be returned upon UI::UserInput() and related functions.
YBuiltinCaller * builtinCaller() const
Return the transparent inter-thread communication.
virtual bool eventsBlocked() const
Returns 'true' if events are currently blocked.
bool waitForUIThread()
Waits for the ui thread to send one byte through the pipe to the ycp thread and reads this byte from ...
virtual YWidgetFactory * createWidgetFactory()=0
Create the widget factory that provides all the createXY() methods for standard (mandatory,...
virtual YApplication * createApplication()=0
Create the YApplication object that provides global methods.
void signalUIThread()
Signals the ui thread by sending one byte through the pipe to it.
bool runningWithThreads() const
Running with threads?
void createUIThread()
Creates and launches the ui thread.
void topmostConstructorHasFinished()
Must be called after the constructor of the Qt/NCurses ui is ready.
static YApplication * app()
Return the global YApplication object.
virtual void idleLoop(int fd_ycp)=0
This virtual method is called when threads are activated in case the execution control is currently o...
virtual void uiThreadDestructor()
Destructor for the UI thread.
YUI(bool withThreads)
Constructor.
bool _withThreads
true if a seperate UI thread is created
static void ensureUICreated()
Make sure there is a UI (with a UI plug-in) created.
virtual void deleteNotify(YWidget *widget)
Notification that a widget is being deleted.
static YWidgetFactory * widgetFactory()
Return the widget factory that provides all the createXY() methods for standard (mandatory,...
Abstract base class for macro recorders.
pthread_t _uiThread
Handle to the ui thread.
A window in the desktop environment.
void signalYCPThread()
Signals the ycp thread by sending one byte through the pipe to it.
static YApplication * application()
Aliases for YUI::app()
int pipe_to_ui[2]
Used to synchronize data transfer with the ui thread.
void uiThreadMainLoop()
This method implements the UI thread in case it is existing.