Пример #1
0
/**
 * @param n: The Ewl_Notebook to work with
 * @param page: The page to get the tab text from
 * @return Returns the text of the pages tab
 * @brief Get the text of the notebook page @p page
 */
const char *
ewl_notebook_page_tab_text_get(Ewl_Notebook *n, Ewl_Widget *page)
{
        Ewl_Widget *o;

        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET(n, EWL_NOTEBOOK_TYPE);
        DCHECK_PARAM_PTR_RET(page, EWL_WIDGET_TYPE);
        DCHECK_TYPE_RET(n, EWL_NOTEBOOK_TYPE, NULL);
        DCHECK_TYPE_RET(page, EWL_WIDGET_TYPE, NULL);

        /* get the label widget */
        o = ewl_notebook_page_tab_widget_get(n, page);

        DRETURN_PTR((o ? ewl_label_text_get(EWL_LABEL(o)) : NULL), DLEVEL_STABLE);
}
Пример #2
0
/**
 * @param e: The entry to clear the selection of
 * @return Returns TRUE if a selection was cleared, FALSE otherwise.
 * @brief Clear the current selection in the entry
 */
unsigned int
ewl_entry_selection_clear(Ewl_Entry *e)
{
        Ewl_Text_Trigger *sel;

        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET(e, FALSE);
        DCHECK_TYPE_RET(e, EWL_ENTRY_TYPE, FALSE);

        sel = EWL_TEXT_TRIGGER(ewl_text_selection_get(EWL_TEXT(e)));
        if (sel)
        {
                unsigned int len, pos;

                len = ewl_text_trigger_length_get(sel);
                pos = ewl_text_trigger_start_pos_get(sel);
                ewl_text_cursor_position_set(EWL_TEXT(e), pos);
                ewl_text_text_delete(EWL_TEXT(e), len);

                /* remove the selection */
                ewl_text_trigger_length_set(sel, 0);

                DRETURN_INT(TRUE, DLEVEL_STABLE);
        }

        DRETURN_INT(FALSE, DLEVEL_STABLE);
}
int
ewl_io_manager_plugin_uri_write(Ewl_Widget *data, const char *uri)
{
        FILE *file;
        int ret = FALSE;

        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET(data, FALSE);
        DCHECK_PARAM_PTR_RET(uri, FALSE);
        DCHECK_TYPE_RET(data, EWL_TEXT_TYPE, FALSE);

        file = fopen(uri, "w");
        if (file)
        {
                char *txt;

                txt = ewl_text_text_get(EWL_TEXT(data));
                fwrite(txt, sizeof(char), strlen(txt), file);

                FREE(txt);
                fclose(file);

                ret = TRUE;
        }

        DRETURN_INT(ret, DLEVEL_STABLE);
}
Пример #4
0
/**
 * @param dvi: the dvi widget to get the current page of
 * @return Returns the current page of the dvi (NULL on failure)
 * @brief get the current page of the dvi
 */
const Edvi_Page *ewl_dvi_dvi_page_get (Ewl_Dvi *dvi)
{
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET(dvi, NULL);
        DCHECK_TYPE_RET(dvi, EWL_DVI_TYPE, NULL);

        DRETURN_PTR(dvi->dvi_page, DLEVEL_STABLE);
}
Пример #5
0
/**
 * @param pdf the pdf widget to get the current page of
 * @return Returns the current page of the pdf (NULL on failure)
 * @brief get the current page of the pdf
 */
Epdf_Page *
ewl_pdf_pdf_page_get(Ewl_Pdf *pdf)
{
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET(pdf, NULL);
        DCHECK_TYPE_RET(pdf, EWL_PDF_TYPE, NULL);

        DRETURN_PTR(pdf->pdf_page, DLEVEL_STABLE);
}
Пример #6
0
/**
 * @param sp: The Ewl_Spectrum to get the type from
 * @return Returns the spectrum type
 * @brief Get the type of the spectrum
 */
Ewl_Spectrum_Type
ewl_spectrum_type_get(Ewl_Spectrum *sp)
{
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET(sp, EWL_SPECTRUM_TYPE_SQUARE);
        DCHECK_TYPE_RET(sp, EWL_SPECTRUM_TYPE, EWL_SPECTRUM_TYPE_SQUARE);

        DRETURN_INT(sp->type, DLEVEL_STABLE);
}
Пример #7
0
/**
 * @param t: The toolbar to get the orientation from
 * @return Returns the orientation currently set on the toolbar
 * @brief This retrieves the current orientation of the toolbar
 */
Ewl_Orientation
ewl_toolbar_orientation_get(Ewl_Toolbar *t)
{
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET(t, EWL_ORIENTATION_HORIZONTAL);
        DCHECK_TYPE_RET(t, EWL_TOOLBAR_TYPE, EWL_ORIENTATION_HORIZONTAL);

        DRETURN_INT(ewl_menubar_orientation_get(EWL_MENUBAR(t)), DLEVEL_STABLE);
}
Пример #8
0
/**
 * @param s: The scrollport to work with
 * @return Returns the minimum velocity
 * @brief Gets the minimum velocity for kinetic scrolling
 */
double
ewl_scrollport_kinetic_min_velocity_get(Ewl_Scrollport *s)
{
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET(s, -1);
        DCHECK_TYPE_RET(s, EWL_SCROLLPORT_TYPE, -1);

        DRETURN_INT(s->kinfo->vmin, DLEVEL_STABLE);
}
Пример #9
0
/**
 * @param n: The Ewl_Notebook to get the tabbar position of
 * @return Returns the current Ewl_Position of the tabbar
 * @brief Get the position of the tabbar in the notebook widget
 */
Ewl_Position
ewl_notebook_tabbar_position_get(Ewl_Notebook *n)
{
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET(n, EWL_POSITION_TOP);
        DCHECK_TYPE_RET(n, EWL_NOTEBOOK_TYPE, EWL_POSITION_TOP);

        DRETURN_INT(n->tabbar_position, DLEVEL_STABLE);
}
Пример #10
0
/**
 * @param p: The popup to get the follow from
 * @return Returns the follow of the popup
 * @brief
 */
Ewl_Widget *
ewl_popup_follow_get(Ewl_Popup *p)
{
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET(p, NULL);
        DCHECK_TYPE_RET(p, EWL_POPUP_TYPE, NULL);

        DRETURN_PTR(p->follow, DLEVEL_STABLE);
}
Пример #11
0
/**
 * @param win: window to retrieve dialog state
 * @return Returns TRUE if window is an dialog window, FALSE otherwise.
 * @brief Retrieves the current dialog state on a window.
 */
int
ewl_window_dialog_get(Ewl_Window *win)
{
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET(win, FALSE);
        DCHECK_TYPE_RET(win, EWL_WINDOW_TYPE, FALSE);

        DRETURN_INT((!!(win->flags & EWL_WINDOW_DIALOG)), DLEVEL_STABLE);
}
Пример #12
0
/**
 * @param win: The window to get the border settings from
 * @return Returns TRUE if the window is borderless, FALSE otherwise
 * @brief Retrieves the borderless flag for the window
 */
unsigned int
ewl_window_borderless_get(Ewl_Window *win)
{
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET(win, FALSE);
        DCHECK_TYPE_RET(win, EWL_WINDOW_TYPE, FALSE);

        DRETURN_INT(!!(win->flags & EWL_WINDOW_BORDERLESS), DLEVEL_STABLE);
}
Пример #13
0
/**
 * @param win: the window to retrieve the window
 * @return Returns a pointer to a new copy of the class, NULL on failure.
 * @brief Retrieve the class of the specified window
 *
 * The returned class should not be freed, and should be copied immediately if
 * needed for extended use.
 */
const char *
ewl_window_class_get(Ewl_Window *win)
{
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET(win, NULL);
        DCHECK_TYPE_RET(win, EWL_WINDOW_TYPE, NULL);

        DRETURN_PTR(win->classname, DLEVEL_STABLE);
}
Пример #14
0
/**
 * @param e: The Ewl_Entry to get the editable status from
 * @return Returns the editable status of the entry
 * @brief Retrieve if the entry is editable or not
 */
unsigned int
ewl_entry_editable_get(Ewl_Entry *e)
{
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET(e, 0);
        DCHECK_TYPE_RET(e, EWL_ENTRY_TYPE, 0);

        DRETURN_INT(e->editable, DLEVEL_STABLE);
}
Пример #15
0
/**
 * @param s: The separator to get the orientation from
 * @return Returns the orientation currently set on the separator
 * @brief This retrieves the current orientation of the separator
 */
Ewl_Orientation
ewl_separator_orientation_get(Ewl_Separator *s)
{
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET(s, EWL_ORIENTATION_HORIZONTAL);
        DCHECK_TYPE_RET(s, EWL_SEPARATOR_TYPE, EWL_ORIENTATION_HORIZONTAL);

        DRETURN_INT(s->orientation, DLEVEL_STABLE);
}
Пример #16
0
/**
 * @param pdf the pdf widget to get the index of
 * @return Returns the poppler index of the pdf (NULL on failure)
 * @brief get the poppler index of the pdf
 */
Ecore_List *
ewl_pdf_pdf_index_get(Ewl_Pdf *pdf)
{
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET(pdf, NULL);
        DCHECK_TYPE_RET(pdf, EWL_PDF_TYPE, NULL);

        DRETURN_PTR(pdf->pdf_index, DLEVEL_STABLE);
}
Пример #17
0
/**
 * @param p: The popup to get the type from
 * @return Returns the type of the popup
 * @brief This is to get the type of the popup. The type defines how the
 * popup will handle the positioning
 */
Ewl_Popup_Type
ewl_popup_type_get(Ewl_Popup *p)
{
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET(p, EWL_POPUP_TYPE_NONE);
        DCHECK_TYPE_RET(p, EWL_POPUP_TYPE, EWL_POPUP_TYPE_NONE);

        DRETURN_INT(p->type, DLEVEL_STABLE);
}
Пример #18
0
/**
 * @param win: The window to work with
 * @return Returns TRUE if the window is fullscreen, FALSE otherwise
 * @brief Retrieve the fullscreen setting for the window
 */
unsigned int
ewl_window_fullscreen_get(Ewl_Window *win)
{
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET(win, FALSE);
        DCHECK_TYPE_RET(win, EWL_WINDOW_TYPE, FALSE);

        DRETURN_INT((!!(win->flags & EWL_WINDOW_FULLSCREEN)), DLEVEL_STABLE);
}
Пример #19
0
/**
 * @param p: The popup
 * @return Returns if the popup is set to fit the size of the follow
 * @brief
 */
int
ewl_popup_fit_to_follow_get(Ewl_Popup *p)
{
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET(p, EWL_POPUP_TYPE_NONE);
        DCHECK_TYPE_RET(p, EWL_POPUP_TYPE, EWL_POPUP_TYPE_NONE);

        DRETURN_INT(p->fit_to_follow, DLEVEL_STABLE);
}
Пример #20
0
/**
 * @param win: The window to work with
 * @return Returns TRUE if the window is to be skipped for the pager,
 *                FALSE otherwise
 * @brief Retrieve the skip pager setting for the window
 */
unsigned int
ewl_window_skip_pager_get(Ewl_Window *win)
{
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET(win, FALSE);
        DCHECK_TYPE_RET(win, EWL_WINDOW_TYPE, FALSE);

        DRETURN_INT((!!(win->flags & EWL_WINDOW_SKIP_PAGER)), DLEVEL_STABLE);
}
Пример #21
0
/**
 * @param n: The Ewl_Notebook to get the visible page of
 * @return Returns the visible page of the notebook
 * @brief Get the current visible page of the notebook
 */
Ewl_Widget *
ewl_notebook_visible_page_get(Ewl_Notebook *n)
{
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET(n, NULL);
        DCHECK_TYPE_RET(n, EWL_NOTEBOOK_TYPE, NULL);

        DRETURN_PTR(n->cur_page, DLEVEL_STABLE);
}
Пример #22
0
/**
 * @param win: the window to work with.
 * @return the urgent state
 * @brief Get the window urgent state
 */
unsigned int
ewl_window_urgent_get(Ewl_Window *win)
{
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET(win, FALSE);
        DCHECK_TYPE_RET(win, EWL_WINDOW_TYPE, FALSE);

        DRETURN_INT(!!(win->flags & EWL_WINDOW_URGENT), DLEVEL_STABLE);
}
Пример #23
0
/**
 * @param s: The scrollport to use
 * @return Returns the type of scrolling used
 * @brief Gets the type of kinetic scrolling used
 */
Ewl_Kinetic_Scroll
ewl_scrollport_kinetic_scrolling_get(Ewl_Scrollport *s)
{
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET(s, EWL_KINETIC_SCROLL_NONE);
        DCHECK_TYPE_RET(s, EWL_SCROLLPORT_TYPE, EWL_KINETIC_SCROLL_NONE);

        DRETURN_INT(s->type, DLEVEL_STABLE);
}
Пример #24
0
/**
 * @param win: The window to work with
 * @return Returns a boolean indicating if the window is modal.
 * @brief Gets the boolean flag indicating if @a win is modal
 */
int
ewl_window_modal_get(Ewl_Window *win)
{
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET(win, FALSE);
        DCHECK_TYPE_RET(win, EWL_WINDOW_TYPE, FALSE);

        DRETURN_INT(!!(win->flags & EWL_WINDOW_MODAL), DLEVEL_STABLE);
}
Пример #25
0
/**
 * @param s: The scrollport to work with
 * @return Returns the current frames per second
 * brief Gets the times per second the timer used for scrolling will be called
 */
int
ewl_scrollport_kinetic_fps_get(Ewl_Scrollport *s)
{
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET(s, -1);
        DCHECK_TYPE_RET(s, EWL_SCROLLPORT_TYPE, -1);

        DRETURN_INT(s->kinfo->fps, DLEVEL_STABLE);
}
Пример #26
0
/**
 * @param b: The Ewl_Border to get the label position from
 * @return Returns the Ewl_Position setting of the label on this border
 * @brief Gets the label position of the border
 */
Ewl_Position
ewl_border_label_position_get(Ewl_Border *b)
{
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET(b, EWL_POSITION_LEFT);
        DCHECK_TYPE_RET(b, EWL_BORDER_TYPE, EWL_POSITION_LEFT);

        DRETURN_INT(b->label_position, DLEVEL_STABLE);
}
Пример #27
0
/**
 * @param t: The toolbar to get the hidden part
 * @return Returns the hidden icon part
 * @brief Retrieve the hidden part
 */
Ewl_Icon_Part
ewl_toolbar_icon_part_hidden_get(Ewl_Toolbar *t)
{
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET(t, EWL_ICON_PART_NONE);
        DCHECK_TYPE_RET(t, EWL_TOOLBAR_TYPE, EWL_ICON_PART_NONE);

        DRETURN_INT(t->hidden, DLEVEL_STABLE);
}
Пример #28
0
/**
 * @param b: the border to retrieve the label text
 * @return Returns the border label text on success, NULL on failure.
 * @brief Get the label from a border widget
 */
const char *
ewl_border_label_get(Ewl_Border *b)
{
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET(b, NULL);
        DCHECK_TYPE_RET(b, EWL_BORDER_TYPE, NULL);

        DRETURN_PTR(ewl_label_text_get(EWL_LABEL(b->label)), DLEVEL_STABLE);
}
Пример #29
0
/**
 * @param sp: The Ewl_Spectrum to get the mode from
 * @return Returns the mode of the spectrum
 * @brief Get the mode of the spectrum
 */
Ewl_Color_Mode
ewl_spectrum_mode_get(Ewl_Spectrum *sp)
{
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET(sp, EWL_COLOR_MODE_HSV_HUE);
        DCHECK_TYPE_RET(sp, EWL_SPECTRUM_TYPE, EWL_COLOR_MODE_HSV_HUE);

        DRETURN_INT(sp->mode, DLEVEL_STABLE);
}
Пример #30
0
/**
 * @param dvi the dvi widget to get the file of
 * @return Returns the currently set file name
 * @brief get the file name this dvi uses
 */
const char *
ewl_dvi_file_get(Ewl_Dvi *dvi)
{
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET(dvi, NULL);
        DCHECK_TYPE_RET(dvi, EWL_DVI_TYPE, NULL);

        DRETURN_PTR(dvi->filename, DLEVEL_STABLE);
}