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